Professional Documents
Culture Documents
Statistical Learning - Measures of Data
Statistical Learning - Measures of Data
Proprietary content. ©Great Learning. All Rights Reserved. Unauthorized use or distribution prohibited
Outline
1. Raw Data
2. Frequency Distribution - Histograms
3. Cumulative Frequency Distribution
4. Measures of Central Tendency
5. Mean, Median, Mode
6. Measures of Dispersion
7. Range, IQR, Standard Deviation,coefficient of
variation
8. Normal distribution, Chebyshev Rule.
9. Five number summary, boxplots, QQ plots, Quantile
plot, scatter plot.
10.Visualization: scatter plot matrix, parallel coordinates.
11.Correlation analysis
Proprietary content. ©Great Learning. All Rights Reserved. Unauthorized use or distribution prohibited
Data versus Information
Proprietary content. ©Great Learning. All Rights Reserved. Unauthorized use or distribution prohibited
Raw Data
Proprietary content. ©Great Learning. All Rights Reserved. Unauthorized use or distribution prohibited
Information is Key
Proprietary content. ©Great Learning. All Rights Reserved. Unauthorized use or distribution prohibited
Frequency
Distribution
In simple terms, frequency distribution is
a summarized table in which raw data are arranged
into classes and frequencies.
Proprietary content. ©Great Learning. All Rights Reserved. Unauthorized use or distribution prohibited
HISTOGRAM
Histogram depicts the pattern of the distribution emerging from the characteristic
being measured.
Proprietary content. ©Great Learning. All Rights Reserved. Unauthorized use or distribution prohibited
Histogram- Example
Proprietary content. ©Great Learning. All Rights Reserved. Unauthorized use or distribution prohibited
Histogram Example Solution
1 1
5 2
1
Fre quency
7
0
5 2 3
1
0
8- 11- 14-17 17- 20-
11 14 20 23
Classe
s
Proprietary content. ©Great Learning. All Rights Reserved. Unauthorized use or distribution prohibited
Cumulative Frequency Distribution
A type of frequency distribution that shows how
many observations are above or below the lower
boundaries of the classes. You can formulate the
following from the previous example of hose clamping
force(torque)
Class Frequency Relative Cumulative Cumulative
Frequency Frequency Relative
Frequency
8-11 2 0.08 2 0.08
11-14 7 0.28 9 0.36
14-17 12 0.48 21 0.84
17-20 3 0.12 24 0.96
20-23 1 0.04 25 1.00
Total 25 1.00
Proprietary content. ©Great Learning. All Rights Reserved. Unauthorized use or distribution prohibited
Ogive (Cumulative Frequency Distribution
30
24 25
Cumulative 20 21
Frequency 10 9
0 2
11 14 17 20 23
Torque(less than
value)
Proprietary content. ©Great Learning. All Rights Reserved. Unauthorized use or distribution prohibited
What is Central Tendency?
Proprietary content. ©Great Learning. All Rights Reserved. Unauthorized use or distribution prohibited
Measures of Central Tendency
Proprietary content. ©Great Learning. All Rights Reserved. Unauthorized use or distribution prohibited
Arithmetic Mean
X = Arithmetic
Mean
= Indicates sum all X values in the data set
∑
X
= Total number of observations(Sample Size)
n Proprietary content. ©Great Learning. All Rights Reserved. Unauthorized use or distribution prohibited
Arithmetic Mean -Example
Proprietary content. ©Great Learning. All Rights Reserved. Unauthorized use or distribution prohibited
Median -
Example
Marks obtained by 7 students in Computer Science
Exam are given below: Compute the median.
45 40 60 80 90 65 55
90 80 65 60 55 45 40
Proprietary content. ©Great Learning. All Rights Reserved. Unauthorized use or distribution prohibited
Mode -Example
Proprietary content. ©Great Learning. All Rights Reserved. Unauthorized use or distribution prohibited
Comparison of
Mean, Median, Mode
Mean Median Mode
Defined as the arithmetic Defined as the Defined as the most
average of all observations middle value in the frequently occurring
in the data set. data set arranged in value in the distribution;
ascending or it has the largest
descending order. frequency.
Proprietary content. ©Great Learning. All Rights Reserved. Unauthorized use or distribution prohibited
Comparison of
Mean, Median, Mode Cont.
Proprietary content. ©Great Learning. All Rights Reserved. Unauthorized use or distribution prohibited
Measures of Dispersion
Proprietary content. ©Great Learning. All Rights Reserved. Unauthorized use or distribution prohibited
Range
Range is the simplest of all measures of dispersion. It
is calculated as the difference between maximum
and minimum value in the data set.
XMaximum −
Range = XMinimum
Proprietary content. ©Great Learning. All Rights Reserved. Unauthorized use or distribution prohibited
Range-Example
Range = = 18-9=9
Proprietary content. ©Great Learning. All Rights Reserved. Unauthorized use or distribution prohibited
Inter-Quartile Range(IQR)
IQR =Q3-Q1
Proprietary content. ©Great Learning. All Rights Reserved. Unauthorized use or distribution prohibited
Interquartile Range-Example
The following data represent the return on
percentage investment for 9 Calculate
mutual funds per annum.
interquartile range.
Data Set: 12, 14, 11, 18, 10.5, 12, 14, 11, 9
Arranging in ascending order, the data set becomes
9, 10.5, 11, 11, 12, 12, 14, 14, 18
IQR=Q3-Q1=14-10.75=3.25
Proprietary content. ©Great Learning. All Rights Reserved. Unauthorized use or distribution prohibited
Standard Deviation
Standard deviation forms the for
Statistics. cornerstone Inferent
ial
To define standard deviation, you need to define
another term called variance. In simple terms, standard
deviation is the square root of variance.
Proprietary content. ©Great Learning. All Rights Reserved. Unauthorized use or distribution prohibited
Key Formulas
Important Terms with Notations Remarks
Sample Variance
2 2
=∑
(X−X) 1. (X−X)
is an
2
S
n− n−
Sample1Standard Deviation ∑
S 2 =unbiased estimator
1 of
(X −μ) 2
σ =∑
2
S= ∑( X − X
2
n− ) N
1
Population Variance 2. X =
∑X is an
∑ (X −μ)
2
unbiased n
σ =
2
N estimator of ∑NX
Population Standard
2 3. The divisorμ n-1
=
is always
Deviation σ = ∑( X N− μ ) used while calculating
sample variance for ensuring
Where X =
∑X (Sample property of being unbiased
n
Mean) and
μ=
∑ X (Population Mean)
N
4. Standard deviation is always
n =Number of observations in the the square root of variance
sample(Sample size)
N =Number of observations in the
Population (Population Size)
Proprietary content. ©Great Learning. All Rights Reserved. Unauthorized use or distribution prohibited
Example for Standard Deviation
Proprietary content. ©Great Learning. All Rights Reserved. Unauthorized use or distribution prohibited
Solution for the Example
Proprietary content. ©Great Learning. All Rights Reserved. Unauthorized use or distribution prohibited
Coefficient of Variation
(Relative Dispersion)
Coefficient of Variation is defined the ratio
(CV) Standard as of
Deviation to Mean.
In symbolic form
CV = S for the sample data and = σ
for the population
X μ
data.
Proprietary content. ©Great Learning. All Rights Reserved. Unauthorized use or distribution prohibited
Coefficient of Variation
Example
Consider two Sales Persons in the
territory. The sales performance of these two same
working in the
context of selling PCs are given below. Comment on the
results.
Proprietary content. ©Great Learning. All Rights Reserved. Unauthorized use or distribution prohibited
Interpretation for the Example
Proprietary content. ©Great Learning. All Rights Reserved. Unauthorized use or distribution prohibited
The Empirical Rule
1σ
68%
μ
μ±
1σ
Proprietary content. ©Great Learning. All Rights Reserved. Unauthorized use or distribution prohibited
The Empirical Rule
• Approximately 95% of the data in a bell-shaped
distribution lies within two standard deviations of the
mean, or µ ± 2σ
95% 99.7%
μ± μ±
2σ 3σ
Proprietary content. ©Great Learning. All Rights Reserved. Unauthorized use or distribution prohibited
Chebyshev Rule
• Regardless of how the data are distributed, at least (1 -
1/k2) x 100% of the values will fall within k standard
deviations of the mean (for k > 1)
Proprietary content. ©Great Learning. All Rights Reserved. Unauthorized use or distribution prohibited
The Five Number Summary
The five numbers that help describe the center, spread and shape
of data are:
▪ Xsmallest
▪ First Quartile (Q1)
▪ Median (Q2)
▪ Third Quartile (Q3)
▪ Xlargest
Proprietary content. ©Great Learning. All Rights Reserved. Unauthorized use or distribution prohibited
Distribution Shape
Q1 Q2 Q1 Q2 Q3 Q1 Q2
Q3 Q3
Proprietary content. ©Great Learning. All Rights Reserved. Unauthorized use or distribution prohibited
Relationships among the five-number
summary and distribution shape
Left-Skewed Symmetric Right-Skewed
Median – Xsmallest Median – Xsmallest Median – Xsmallest
> ≈ <
Xlargest – Median Xlargest – Median Xlargest – Median
Q1 – Xsmallest Q1 – Xsmallest Q1 – Xsmallest
> ≈ <
Xlargest – Q3 Xlargest – Q3 Xlargest – Q3
> ≈ <
Xsmallest Xlarges
-- Q1 -- Median t
-- Q3 --
Example:
25% of data 25% 25% 25% of data
of data of data
Xsmallest Xlargest
Q1 Median
Q3
Proprietary content. ©Great Learning. All Rights Reserved. Unauthorized use or distribution prohibited
40
Five Number Summary:
Shape of Boxplots
• If data are symmetric around the median then the box
and central line are centered between the endpoints
Xsmallest Xlarges
Q1 Q3
Median t
Proprietary content. ©Great Learning. All Rights Reserved. Unauthorized use or distribution prohibited
Distribution Shape and
The Boxplot
Q1 Q2 Q1 Q2 Q3 Q1 Q2
Q3 Q3
Proprietary content. ©Great Learning. All Rights Reserved. Unauthorized use or distribution prohibited
Boxplot Example
0 0 22 3 3 5 5 22
The data are right skewed, as the plot depicts 77
Proprietary content. ©Great Learning. All Rights Reserved. Unauthorized use or distribution prohibited
Box plot example showing an outlier
0 5 1 15 2 2 3
0 0 5 0
Proprietary content. ©Great Learning. All Rights Reserved. Unauthorized use or distribution prohibited
Visualization of Data Dispersion: 3-D Boxplots
Proprietary content. ©Great Learning. All Rights Reserved. Unauthorized use or distribution prohibited
Graphic Displays of Basic Statistical
Descriptions
Proprietary content. ©Great Learning. All Rights Reserved. Unauthorized use or distribution prohibited
Quantile Plot
Displays all of the data (allowing the user to assess both the
overall behavior and unusual occurrences)
Plots quantile information
For a data xi data sorted in increasing order, fi indicates that
approximately 100 fi% of the data are below or equal to the
value xi
Proprietary content. ©Great Learning. All Rights Reserved. Unauthorized use or distribution prohibited
Quantile-Quantile (Q-Q)
Plot
Graphs the quantiles of one univariate distribution against the
corresponding quantiles of another
View: Is there is a shift in going from one distribution to another?
Example shows unit price of items sold at Branch 1 vs. Branch 2 for
each quantile. Unit prices of items sold at Branch 1 tend to be
lower than those at Branch 2.
Proprietary content. ©Great Learning. All Rights Reserved. Unauthorized use or distribution prohibited
Scatter plot
Proprietary content. ©Great Learning. All Rights Reserved. Unauthorized use or distribution prohibited
Positively and Negatively Correlated Data
Proprietary content. ©Great Learning. All Rights Reserved. Unauthorized use or distribution prohibited
Uncorrelated Data
Proprietary content. ©Great Learning. All Rights Reserved. Unauthorized use or distribution prohibited
Data Visualization
Proprietary content. ©Great Learning. All Rights Reserved. Unauthorized use or distribution prohibited
Pixel-Oriented Visualization Techniques
For a data set of m dimensions, create m windows on the screen, one for
each dimension
The m dimension values of a record are mapped to m pixels at the
corresponding positions in the windows
The colors of the pixels reflect the corresponding values
Proprietary content. ©Great Learning. All Rights Reserved. Unauthorized use or distribution prohibited
Correlation Analysis (Nominal Data): Chi-
Square Test
Proprietary content. ©Great Learning. All Rights Reserved. Unauthorized use or distribution prohibited
Correlation Analysis (Numeric Data)
Proprietary content. ©Great Learning. All Rights Reserved. Unauthorized use or distribution prohibited
Visually Evaluating Correlation
Scatter plots
showing the
similarity from
–1 to 1.
Proprietary content. ©Great Learning. All Rights Reserved. Unauthorized use or distribution prohibited
Summary
• Histograms
• Measures of central tendency: mean, mode, median
• Measures of dispersion: range, IQR, variance, std deviation,
coefficient of variation.
• Normal distribution, Chebyshev Rule.
• Five number summary, boxplots, QQ plots, Quantile plot,
scatter plot.
• Visualization: scatter plot matrix, parallel coordinates.
• Correlation analysis.
Proprietary content. ©Great Learning. All Rights Reserved. Unauthorized use or distribution prohibited
References