Professional Documents
Culture Documents
Session 2
Samprit Chakrabarti
Learning Objectives
population
To construct and interpret a boxplot
correlation
Numerical Descriptive Measures
X i
X1 X 2 Xn
X i 1
n n
Sample size Observed values
Measures of Central Tendency:
The Mean
(continued)
0 1 2 3 4 5 6 7 8 9 10 0 1 2 3 4 5 6 7 8 9 10
Mean = 3 Mean = 4
1 2 3 4 5 15 1 2 3 4 10 20
3 4
5 5 5 5
Measures of Central Tendency:
The Median
0 1 2 3 4 5 6 7 8 9 10 0 1 2 3 4 5 6 7 8 9 10
Median = 3 Median = 3
Not affected by extreme values
Measures of Central Tendency:
Locating the Median
The location of the median when the values are in numerical order
(smallest to largest):
n 1
Median position position in the ordered data
2
If the number of values is odd, the median is the middle number
n 1
Note that
2 is not the value of the median, only the position of
the median in the ranked data
Measures of Central Tendency:
The Mode
Value that occurs most often
Not affected by extreme values
Used for either numerical or categorical data
There may be no mode
There may be several modes
0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 0 1 2 3 4 5 6
No Mode
Mode = 9
Measures of Central Tendency:
Review Example
Central Tendency
X i
X i1
n Middle Most
value in the frequently
ordered observed
array value
Mean for Grouped Data
�f
Mean for Grouped Data
Example
Class 0-11-22-33-44-55-6
Frequency 1 4 8 7 3 2
Solution for the Example
Class 0-11-22-33-44-55-6
Frequency 1 4 8 7 3 2
Solution for the Example
Class Frequency Cumulative
Frequency
0-1 1 1
1-2 4 5
2-3 8 13
3-4 7 20
4-5 3 23
5-6 2 25
Total 25
Substituting in the formula the relevant values,
(n/2) m (25 / 2) 5
L
Median = c ,we have Median =2 1
f 8
= 2.9375
Mode for Grouped Data
Mode = d1
L c
d1 d 2
Where L =Lower limit of the modal class
d1 f1 f 0 d 2 f1 f 2
Class 0-11-22-33-44-55-6
Frequency 1 4 8 7 3 2
Solution for the Example
Class Frequency d1
0-1 1 Mode = L d d c
1-2 4 1 2
2-3 8
3-4 7 Ld= 2
1 f1 f 0
4-5 3
= 8-4 = 4
5-6 2
d 2 f1 f 2
Total 25
= 8-7 = 1
4
2 1
C = 1 Hence Mode = 5
= 2.8
Measures of Variation
Variation
Example:
0 1 2 3 4 5 6 7 8 9 10 11 12 13 14
Range = 13 - 1 = 12
Measures of Variation:
Why The Range Can Be Misleading
7 8 9 10 11 12 7 8 9 10 11 12
Range = 12 - 7 = 5 Range = 12 - 7 = 5
Sensitive to outliers
1,1,1,1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2,3,3,3,3,4,5
Range = 5 - 1 = 4
1,1,1,1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2,3,3,3,3,4,120
Range = 120 - 1 = 119
Measures of Variation:
The Variance
Average (approximately) of squared deviations of
values from the mean
n
Sample variance: (X i X) 2
S2 i 1
n -1
X = arithmetic mean
Where
n = sample size
Xi = ith value of the variable X
Measures of Variation:
The Standard Deviation
Most commonly used measure of variation
Shows variation about the mean
Is the square root of the variance
Has the same units as the original data
n
Sample standard deviation:
(X X) 2
i
S i1
n -1
Measures of Variation:
The Standard Deviation
Data A
Mean = 15.5
11 12 13 14 15 16 17 18 19 20 21
S = 3.338
2448.33
Standard Deviation = S = f(X X) 2 = 59 = 6.44
n 1
(Cell H12)
Measures of Variation:
Summary Characteristics
The more the data are spread out, the greater the range,
variance, and standard deviation.
The more the data are concentrated, the smaller the range,
variance, and standard deviation.
If the values are all the same (no variation), all these
measures will be zero.
S
CV 100%
X
Measures of Variation:
Comparing Coefficients of Variation
Stock A:
Average price last year = $50
Standard deviation = $5
S $5
CVA 100% 100% 10%
X $50 Both stocks
Stock B: have the
same
Average price last year = $100
standard
Standard deviation = $5 deviation, but
stock B is less
S $5 variable
CVB 100% 100% 5% relative to its
X $100 price
General Descriptive Stats Using
Microsoft Excel
1. Select Tools.
3. Select Descriptive
Statistics and click OK.
General Descriptive Stats Using
Microsoft Excel
$2,000,000
500,000
300,000
100,000
100,000
Numerical Descriptive
Measures for a Population
X i
X1 X 2 XN
i 1
N N
Where μ = population mean
N = population size
Xi = ith value of the variable X
Numerical Descriptive Measures
For A Population: The Variance σ2
σ2 i1
N
N
Population standard deviation: i
(X μ) 2
σ i 1
N
Sample statistics versus
population parameters
Q1 Q2 Q3
The first quartile, Q1, is the value for which 25% of the
observations are smaller and 75% are larger
Q2 is the same as the median (50% of the observations
are smaller and 50% are larger)
Only 25% of the observations are greater than the third
quartile
Quartile Measures:
Locating Quartiles
(n = 9)
Q1 is in the (9+1)/4 = 2.5 position of the ranked data
so use the value half way between the 2nd and 3rd values,
so Q1 = 12.5
Q1 and Q3 are measures of non-central location
Q2 = median, is a measure of central tendency
Quartile Measures
Calculating The Quartiles: Example
Sample Data in Ordered Array: 11 12 13 16 16 17 18 21 22
(n = 9)
Q1 is in the (9+1)/4 = 2.5 position of the ranked data,
so Q1 = (12+13)/2 = 12.5
Example:
Median X
X Q1 Q3 maximum
minimum (Q2)
25% 25% 25% 25%
12 30 45 57 70
Interquartile range
= 57 – 30 = 27
The Five Number Summary
> ≈ <
Xlargest – Median Xlargest – Median Xlargest – Median
Q1 – Xsmallest Q1 – Xsmallest Q1 – Xsmallest
> ≈ <
Xlargest – Q3 Xlargest – Q3 Xlargest – Q3
Median – Q1 Median – Q1 Median – Q1
> ≈ <
Q3 – Median Q3 – Median Q3 – Median
Five Number Summary and
The Boxplot
Q1 Q2 Q3 Q1 Q2 Q3 Q1 Q2 Q3
Boxplot Example
Xsmallest Q1 Q2 Q3 Xlargest
0 2 2 2 3 3 4 5 5 9 27
00 22 33 55 27
27
The data are right skewed, as the plot depicts
Boxplot example showing an
outlier
• The boxplot below of the same data shows the outlier
value of 27 plotted separately
• A value is considered an outlier if it is more than 1.5
times the interquartile range below Q1 or above Q3
The Covariance
The covariance measures the strength of the linear
relationship between two numerical variables (X & Y)
( X X)( Y Y )
i i
cov ( X , Y ) i1
n 1
Only concerned with the strength of the relationship
No causal effect is implied
Interpreting Covariance
cov (X , Y)
r
SX SY
where
n n n
(X X)(Y Y)
i i (X X)
i
2
(Y Y )
i
2
cov (X , Y) i1
SX i1
SY i1
n 1 n 1 n 1
Features of the
Coefficient of Correlation
The population coefficient of correlation is referred as ρ.
The sample coefficient of correlation is referred to as r.
Either ρ or r have the following features:
Unit free
Ranges between –1 and 1
The closer to –1, the stronger the negative linear relationship
The closer to 1, the stronger the positive linear relationship
The closer to 0, the weaker the linear relationship
Scatter Plots of Sample Data with
Various Coefficients of Correlation
Y Y
X X
r = -1 r = -.6
Y
Y Y
X X X
r = +1 r = +.3 r=0
The Coefficient of Correlation
Using Microsoft Excel
r = .733
There is a relatively
strong positive linear
relationship between test
score #1 and test score
#2.