CHAPTER 4:
DESCRIPTIVE
ANALYTICS &
VISUALIZATION
DR AZLIN AHMAD
CONTENT
Central tendency measures
Dispersion measure
Data visualization tools
MEASURE OF
CENTRAL
TENDENCY
WHAT IS MEASURE OF CENTRAL TENDENCY?
A summary statistic that represents the center point or typical value of a dataset.
These measures indicate where most values in a distribution fall and are also referred
to as the central location of a distribution.
In statistics, the three most common measures of central tendency are
the mean, median, and mode.
Each of these measures calculates the location of the central point using a different
method.
CONT..
The three distributions (refer to the
figures) represent different data
conditions
In each distribution, look for the
region where the most common
values fall
Even though the shapes and type of
data are different, you can find that
As the graphs highlight, you can see
central location. where most values tend to occur.
That is the area in the distribution That is the concept. Measures of
central tendency represent this idea
where the most common values are with a value.
located.
the mean does not always
MEAN locate the center of the data
accurately
incorporates all values in the
the arithmetic average, data. If you change any value,
the mean changes.
Calculating the mean is very
simple- just add up all of the
values and divide by the number
of observations in your dataset
OBSERVE THIS
• in a skewed distribution, the mean can miss the mark.
• In the histogram above, it is starting to fall outside the
central area.
• This problem occurs because outliers have a substantial
impact on the mean.
In a symmetric distribution, the mean locates the • Extreme values in an extended tail pull the mean away from
the center.
center accurately. • As the distribution becomes more skewed, the mean is
drawn further away from the center.
• Consequently, it’s best to use the mean as a measure of
the central tendency when you have a symmetric distribution.
MEAN The method for locating the
median varies slightly
depending on whether your
dataset has an even or odd
number of values.
the middle value- that
splits the dataset in half.
To find the median, order your
data from smallest to largest, and
then find the data point that has
an equal amount of values above
it and below it.
In the dataset with the odd When there is an even number of
number of observations, notice values, you count in to the two
how the number 12 has six values innermost values and then take the
above it and six below it. average. The average of 27 and 29 is
Therefore, 12 is the median of 28. Consequently, 28 is the median of
this dataset. this dataset.
In a symmetric distribution, the mean and In a skewed distribution, the outliers in the tail
median both find the center accurately. pull the mean away from the center towards the
They are approximately equal. longer tail.
MEAN If the data have multiple values that
are tied for occurring the most
frequently, you have a multimodal
distribution. If no value repeats, the
data do not have a mode.
the value that occurs the
most frequently in your
data set
On a bar chart, the mode is the
highest bar.
In the dataset, the value 5 occurs most frequently, Very Satisfied is the mode of
which makes it the mode. These data might this distribution because it is
represent a 5-point Likert scale. the most common value in
the data.
The mode is the only measure of central tendency
that you can use with categorical data—such as
the most preferred flavor of ice cream.
However, with categorical data, there is not a
central value because you cannot order the groups.
With ordinal and discrete data, the mode can be a
value that is not in the center. Again, the mode
represents the most common value.
DISPERSION
MEASURE
WHAT IS DISPERSION MEASURE?
Measures of dispersion measure how spread out a set of data is.
Common measurement:
• Variance
Standard Deviation
VARIANCE
The formulae for the variance and standard deviation are given below. m means the mean of the data.
The standard deviation, s, is the square root of the variance.
What the formula means:
(1) xr - m means take each value in turn and subtract the mean from each value.
(2) (xr - m)2 means square each of the results obtained from step (1). This is to get rid of any minus
signs.
(3) S(xr - m)2 means add up all of the results obtained from step (2).
(4) Divide step (3) by n, which is the number of numbers
(5) For the standard deviation, square root the answer to step (4).
Find the variance and standard deviation of the following numbers: 1, 3, 5, 5, 6, 7, 9, 10 .
The mean = 46/ 8 = 5.75
• take each value in turn and subtract the mean from each value
• (1 - 5.75), (3 - 5.75), (5 - 5.75), (5 - 5.75), (6 - 5.75), (7 - 5.75), (9 - 5.75), (10 - 5.75)
1 = -4.75, -2.75, -0.75, -0.75, 0.25, 1.25, 3.25, 4.25
• square each of the results obtained from step (1)
• 22.563, 7.563, 0.563, 0.563, 0.063, 1.563, 10.563, 18.063
2
• add up all of the results obtained from step (2).
• 22.563 + 7.563 + 0.563 + 0.563 + 0.063 + 1.563 + 10.563 + 18.063
3 = 61.504
• Divide step (3) by n, which is the number of numbers
• n = 8, therefore variance = 61.504/ 8 = 7.69 (3sf)
4
• For the standard deviation, square root the answer to step (4).
• standard deviation = 2.77 (3sf)
5
DATA
VISUALIZATION
WHAT IS DATA VISUALIZATION?
Data visualization refers to the graphical
representation of information and data.
By using visual elements like charts, graphs, and
maps, data visualization is an accessible way to see
and understand trends, outliers, and patterns in
data
In the world of Big Data, data visualization tools
and technologies are essential to analyse massive
amounts of information and make data- driven
decisions.
BENEFITS OF GOOD DATA VISUALISATION
Our eyes are drawn to colors and patterns - quickly identify red from
blue, square from circle.
Our culture is visual, including everything from art and advertisements
to TV and movies.
Data visualization is another form of visual art that grabs our interest
and keeps our eyes on the message.
When we see a chart, we quickly see trends and outliers- If we can see
something, we internalize it quickly.
It’s storytelling with a purpose. If you’ve ever stared at a massive
spreadsheet of data and couldn’t see a trend, you know how much
more effective a visualization can be.
CONT..
As the “age of Big Data” kicks into high-gear, visualization is an
increasingly key tool to make sense of the trillions of rows of data
generated every day.
Data visualization helps to tell stories by curating data into a form
easier to understand, highlighting the trends and outliers. A good
visualization tells a story, removing the noise from data and highlighting
the useful information.
However, it’s not simply as easy as just dressing up a graph to make it
look better or slapping on the “info” part of an infographic.
Effective data visualization is a delicate balancing act between form and
function.
The plainest graph could be too boring to catch any notice or it make
tell a powerful point; the most stunning visualization could utterly fail at
conveying the right message or it could speak volumes.
The data and the visuals need to work together, and there’s an art to
combining great analysis with great storytelling.
CHART
GRAPH
GENERAL TYPES OF DATA VISUALIZATION
MAP
TABLE
INFOGRAPHIC
DASHBOARD
More specific examples of methods to visualize data
• Area Chart • Matrix
• Bar Chart • Network
• Box-and-whisker Plots • Polar Area
• Bubble Cloud • Radial Tree
• Bullet Graph • Scatter Plot (2D or 3D)
• Cartogram • Streamgraph
• Circle View • Text Tables
• Dot Distribution Map • Timeline
• Gantt Chart • Treemap
• Heat Map • Wedge Stack Graph
• Highlight Table • Word Cloud
• Histogram
TREEMAP
• Treemaps are a powerful and compact way
to visualize hierarchical and part-to-whole
relationships.
• Each branch of the tree is represented as a
rectangle, with the size of a branch
proportionate to a specified measure of the
data.
• A lot of people like treemaps because they're
visually attractive, so understanding how to
leverage color is a plus.
Color is often used to show dimensions in a
treemap— heat maps work well if you want
to show a spectrum.
[Link]
embed =y&:loadOrderID=0&:display_count=yes
Learn how to build a tree map in Tableau
• [Link]
Learn how to build it in Tableau
• [Link] word-clouds-
and-bubble-charts-chart-type
HISTOGRAM
Histograms plot the number of
occurrences of a given variable in a set
of data.
They’re a great tool for getting an
overview of the entire distribution of a
variable, and they take the form of a bar
chart.
Imagine using histograms for retail
analytics, to count the number of sales
of individual products by category.
Or in customer analytics, to tally the
range of spending in a certain
demographic.
Learn how to build it in Tableau
• [Link]
BOXPLOT
• A box plot (or box-and-whisker plot) is a
diagram of a distribution of data best known
for highlighting these values:
• first quartile
• median
• third quartile
• whiskers (1.5 times the interquartile range away
from the mean) • outliers
• Box plots are useful for comparing sets of
data—especially the variations in the data.
• They're a favorite of statisticians, and used
commonly in statistical analytics.
• Tableau can plot hundreds of thousands of
rows per second, so it can convey much more
information than the standard box plot.
Learn how to build it in Tableau
• [Link]
GANTT CHART
• Gantt charts are the enemy of
procrastination, keeping those micro-
deadlines between projects well in view.
• They’re great for displaying a timeline such
as project stages or a product release—to
ensure you release the beta before the
product.
• The viewer can instantly see when parts of a
project begin and end in relation to each
other, without having to cross check between
pages or sheets.
• Did you know? The first Gantt-type chart was
developed in 1896, and was called a
harmonogram. So all your departments
can work in harmony.
Learn how to build it in Tableau
[Link]
us/buildexamples_gantt.html
WORD
CLOUD
• Word clouds are like bubble charts in
that words are sized according to
some numerical measure and all
packed into a designated space.
• They’re useful for presenting data
about—you guessed it—words.
• While word clouds are not the best for
accurate interpretation, sometimes
they add impact to a dashboard and
encourage more people to engage
with the data.
Learn how to build it in Tableau
• [Link] word-clouds-and-
bubble-charts-chart-type-8
ANY
QUESTIONS?
Lab work
• Go through each video on the following
URL. • [Link]
Reference:
[Link]
-mean-median-mode/