1
1Slide
Chapter 3Descriptive Statistics: Numerical Measures
2Slide
Learning objectives
1. Single variable – Part I (Basic)1.1. How to calculate and use the measures of location1.2. How to calculate and use the measures of variability
2. Single variable – Part II (Application)2.1. Understand what the measures of location (e.g., mean,
median, mode) tell us about distribution shape - Discuss its use in manipulating simulated experiments
2.2. How to detect outliers using z-score and empirical rule2.3. How to use Box plot to explore data 2.4. How to calculate weighted mean 2.5. How to calculate mean and variance for grouped data
3. Two variables3.1. How to calculate and use the measures of association
- Covariance, Correlation coefficient
2
3Slide
L.O. 1. Numerical measures – Part I
n Numerical measures
n Measures of Location•Mean, median, mode, percentiles, quartiles
n Measures of Variability•Range, interquartile range, variance, standard
deviation, coefficient of variation
4Slide
Numerical Measures
If the measures are computedfor data from a sample,
they are called sample statistics.
If the measures are computedfor data from a population,
they are called population parameters.
A sample statistic is referred toas the point estimator of the
corresponding population parameter.
3
5Slide
Mean
n The mean of a data set is the average of all the data values.
n The sample mean is the point estimator of the population mean µ.
xx
Number ofobservationsin the sample
Sum of the valuesof the n observations
ixx
n=
∑ ixx
n=
∑
Number ofobservations inthe population
Sum of the valuesof the N observations
ix
Nµ =
∑ ix
Nµ =
∑
•L.O. 1.1.•Mean
•Median•Mode
•Percentile•Quartile
6Slide
Median
n The median of a data set is the value in the middle when the data items are arranged in ascending order.• For odd number of observations:§ the median is the middle value
• For even number of observations:§ the median is the average of the middle two values.
n Whenever a data set has extreme values, the median is the preferred measure of central location.• Often used in annual income and property value data
•L.O. 1.1.•Mean
•Median•Mode
•Percentile•Quartile
4
7Slide
Mode
n The mode of a data set is the value that occurs with the greatest frequency.
n The greatest frequency can occur at two ormore different values.• If the data have exactly two modes, the data are
bimodal.• If the data have more than two modes, the data are
multimodal.
•L.O. 1.1.•Mean
•Median•Mode
•Percentile•Quartile
8Slide
Example
n Q4 (p. 84)
Compute the mean, median, and mode of the following sample:
53, 55, 70, 58, 64, 57, 53, 69, 57, 68, 53
ØMean = 59.727 ØMedian = 57ØMode = 53
nWhat is the median, if 59 is added to the data?
ØMedian = 57.5 = (57+58)/2
•L.O. 1.1.•Mean
•Median•Mode
•Percentile•Quartile
5
9Slide
Percentiles
n A percentile provides information about how the data are spread over the interval from the smallest value to the largest value.• Admission test scores for colleges and universities are
frequently reported in terms of percentiles.
n The pth percentile of a data set is a value such that at least p percent of the items take on this value or less and at least (100 - p) percent of the items take on this value or more.
•L.O. 1.1.•Mean
•Median•Mode
•Percentile•Quartile
10Slide
Percentiles
Arrange the data in ascending order.
Compute index i, the position of the pth percentile.
i = (p/100)n
If i is not an integer, round up. The pth percentileis the value in the ith position.
If i is an integer, the pth percentile is the averageof the values in positions i and i+1.
•L.O. 1.1.•Mean
•Median•Mode
•Percentile•Quartile
6
11Slide
Quartiles
n Quartiles are specific percentiles.n First Quartile = 25th Percentilen Second Quartile = 50th Percentile = Mediann Third Quartile = 75th Percentile
•L.O. 1.1.•Mean
•Median•Mode
•Percentile•Quartile
12Slide
Example: Percentiles and Quartiles
n Q4 (p. 84)
Find 25th and 75th percentiles from the sample below:
53, 55, 70, 58, 64, 57, 53, 69, 57, 68, 53
Ø 25th percentile = First quartile = 53
Ø 75th percentile = Third quartile = 68
•L.O. 1.1.•Mean
•Median•Mode
•Percentile•Quartile
7
13Slide
Measures of Variability
n It is often desirable to consider measures of variability (dispersion), as well as measures of location.• For example, in choosing supplier A or supplier B we
might consider not only the average delivery time foreach, but also the variability in delivery time for each.
n Rangen Interquartile Rangen Variancen Standard Deviationn Coefficient of Variation
14Slide
Range
n The range of a data set is the difference between the largest and smallest data values.
n It is the simplest measure of variability.n It is very sensitive to the smallest and largest data
values.
n Range of the sample:53, 55, 70, 58, 64, 57, 53, 69, 57, 68, 53
= 70 – 53 = 17
•L.O. 1.2.•Range
•IQR•Variance
•St. Deviation•Coefficient of
variation
8
15Slide
Interquartile Range (IQR)
n The interquartile range of a data set is the difference between the third quartile and the first quartile.
n It is the range for the middle 50% of the data.
n It overcomes the sensitivity to extreme data values.
n IQR of the sample:53, 55, 70, 58, 64, 57, 53, 69, 57, 68, 53
= 68 – 53 = 15
•L.O. 1.2.•Range
•IQR•Variance
•St. Deviation•Coefficient of
variation
16Slide
The variance is a measure of variability that utilizesall the data.
Variance
The variance is computed as follows:
The variance is the average of the squareddifferences between each data value and the mean.
for asample
for apopulation
σµ2
2=
−∑( )xNiσ
µ22
=−∑( )x
Nis
xi xn
22
1=
−∑−
( )s
xi xn
22
1=
−∑−
( )
•L.O. 1.2.•Range
•IQR•Variance
•St. Deviation•Coefficient of
variation
9
17Slide
Standard Deviation
The standard deviation of a data set is the positivesquare root of the variance.
It is measured in the same units as the data, makingit more easily interpreted than the variance.
The standard deviation is computed as follows:
for asample
for apopulation
s s= 2s s= 2 σ σ= 2σ σ= 2
•L.O. 1.2.•Range
•IQR•Variance
•St. Deviation•Coefficient of
variation
18Slide
The coefficient of variation is computed as follows:
Coefficient of Variation
100 %sx
×
100 %sx
×
The coefficient of variation indicates how large thestandard deviation is in relation to the mean.
for asample
for apopulation
100 %σµ
×
100 %σ
µ
×
•L.O. 1.2.•Range
•IQR•Variance
•St. Deviation•Coefficient of
variation
10
19Slide
× = × = 6.74100 % 100 % 11.28%59.73
sx
× = × = 6.74100 % 100 % 11.28%59.73
sx
−= =
−∑ 2
2 ( ) 45.418
1ix x
sn
−= =
−∑ 2
2 ( ) 45.418
1ix x
sn
= = =2 33.82 6.74s s= = =2 33.82 6.74s s
the standarddeviation is
about 11% ofof the mean
n Variance
n Standard Deviation
n Coefficient of Variation
Example: Variance, Standard Deviation,And Coefficient of Variation
Consider the same data set:53, 55, 70, 58, 64, 57, 53, 69, 57, 68, 53
•L.O. 1.2.•Range
•IQR•Variance
•St. Deviation•Coefficient of
variation
20Slide
L.O. 2. Numerical measure – Part II
n Measures of Distribution Shapen Detecting Outliers
• z-score, empirical rule
n Exploratory Data Analysis
n The Weighted Mean and Working with Grouped Data
11
21Slide
Distribution Shape
n Symmetric (not skewed)• Skewness is zero.•Mean and median are equal.
Rela
tive
Freq
uenc
y
.05
.10
.15
.20
.25
.30
.35
0
•L.O. 2.•Shape
•z-score•Empirical Rule
•Exploratory•Weighted mean
•Grouped data
22Slide
Distribution Shape
n Moderately Skewed Left• Skewness is negative.•Mean will usually be less than the median.
Rela
tive
Freq
uenc
y
.05
.10
.15
.20
.25
.30
.35
0
•L.O. 2.•Shape
•z-score•Empirical Rule
•Exploratory•Weighted mean
•Grouped data
12
23Slide
Distribution Shape
n Moderately Skewed Right• Skewness is positive.•Mean will usually be more than the median.
Rela
tive
Freq
uenc
y
.05
.10
.15
.20
.25
.30
.35
0
•L.O. 2.•Shape
•z-score•Empirical Rule
•Exploratory•Weighted mean
•Grouped data
24Slide
Distribution Shape
n Highly Skewed Right• Skewness is positive (often above 1.0).•Mean will usually be more than the median.
Rela
tive
Freq
uenc
y
.05
.10
.15
.20
.25
.30
.35
0
•L.O. 2.•Shape
•z-score•Empirical Rule
•Exploratory•Weighted mean
•Grouped data
13
25Slide
The z-score is often called the standardized value.
It denotes the number of standard deviations a datavalue xi is from the mean.
z-Scores
z x xsi
i=−z x xsi
i=−
•L.O. 2.•Shape
•z-score•Empirical Rule
•Exploratory•Weighted mean
•Grouped data
26Slide
z-Scores
n A data value less than the sample mean will have az-score less than zero.
n A data value greater than the sample mean will havea z-score greater than zero.
n A data value equal to the sample mean will have az-score of zero.
n An observation’s z-score is a measure of the relativelocation of the observation in a data set.
•L.O. 2.•Shape
•z-score•Empirical Rule
•Exploratory•Weighted mean
•Grouped data
14
27Slide
Empirical Rule
For data having a bell-shaped distribution:
of the values of a normal random variableare within of its mean.68.26%
+/- 1 standard deviation
of the values of a normal random variableare within of its mean.95.44%
+/- 2 standard deviations
of the values of a normal random variableare within of its mean.99.72%
+/- 3 standard deviations
•L.O. 2.•Shape
•z-score•Empirical Rule
•Exploratory•Weighted mean
•Grouped data
28Slide
Empirical Rule
xµ – 3σ µ – 1σ
µ – 2σµ + 1σ
µ + 2σµ + 3σµ
68.26%95.44%99.72%
•L.O. 2.•Shape
•z-score•Empirical Rule
•Exploratory•Weighted mean
•Grouped data
15
29Slide
Detecting Outliers
n An outlier is an unusually small or unusually largevalue in a data set.
n A data value with a z-score less than -3 or greaterthan +3 might be considered an outlier.
n It might be:• an incorrectly recorded data value• a data value that was incorrectly included in the
data set• a correctly recorded data value that belongs in
the data set
•L.O. 2.•Shape
•z-score•Empirical Rule
•Exploratory•Weighted mean
•Grouped data
30Slide
Exploratory Data Analysis
• Five-Number Summary•Box Plot
n The techniques of exploratory data analysis consist ofsimple arithmetic and easy-to-draw pictures that canbe used to summarize data quickly.
•L.O. 2.•Shape
•z-score•Empirical Rule
•Exploratory•Weighted mean
•Grouped data
16
31Slide
Five-Number Summary
1 Smallest Value
First Quartile
Median
Third Quartile
Largest Value
2
3
4
5
Sample: 53, 55, 70, 58, 64, 57, 53, 69, 57, 68, 53
53
53
57
68
70
•L.O. 2.•Shape
•z-score•Empirical Rule
•Exploratory•Weighted mean
•Grouped data
32Slide
Box Plot
n A box plot is based on a five-number summary.
20 28 36 44 52 60 68 76 84 92 100
Q1 = 53 Q3 = 68Q2 = 57
Lower limit=30.5
1.5*IQR 1.5*IQR
Upper limit=90.5
Largest value (70)
Whisker
No whisker this side: smallest value = Q1
*
Outlier
•L.O. 2.•Shape
•z-score•Empirical Rule
•Exploratory•Weighted mean
•Grouped data
17
33Slide
The Weighted Mean andWorking with Grouped Data
n Weighted Meann Mean for Grouped Datan Variance for Grouped Datan Standard Deviation for Grouped Data
•L.O. 2.•Shape
•z-score•Empirical Rule
•Exploratory•Weighted mean
•Grouped data
34Slide
Weighted Mean
n When the mean is computed by giving each datavalue a weight that reflects its importance, it isreferred to as a weighted mean.
n Class grade is usually computed by weighted mean.
n When data values vary in importance, the analystmust choose the weight that best reflects theimportance of each value.
weightIn class midterm exam Descriptive statistics and distributions 40% Final group project Statistical inference 30% Group project presentation 10% Homework 10% Participation 10%
•L.O. 2.•Shape
•z-score•Empirical Rule
•Exploratory•Weighted mean
•Grouped data
18
35Slide
Weighted Mean
i i
i
w xx
w= ∑
∑i i
i
w xx
w= ∑
∑where:
xi = value of observation iwi = weight for observation i
•L.O. 2.•Shape
•z-score•Empirical Rule
•Exploratory•Weighted mean
•Grouped data
36Slide
Grouped Data
n The weighted mean computation can be used toobtain approximations of the mean, variance, andstandard deviation for the grouped data.
n To compute the weighted mean, we treat themidpoint of each class as though it were the meanof all items in the class.
n We compute a weighted mean of the class midpointsusing the class frequencies as weights.
n Similarly, in computing the variance and standarddeviation, the class frequencies are used as weights.
•L.O. 2.•Shape
•z-score•Empirical Rule
•Exploratory•Weighted mean
•Grouped data
19
37Slide
Mean for Grouped Data
i if Mx
n= ∑ i if M
xn
= ∑
NMf ii∑=µ
NMf ii∑=µ
where: fi = frequency of class i
Mi = midpoint of class i
n Sample Data
n Population Data
•L.O. 2.•Shape
•z-score•Empirical Rule
•Exploratory•Weighted mean
•Grouped data
38Slide
Given below is the previous sample of monthly rentsfor 70 efficiency apartments, presented here as groupeddata in the form of a frequency distribution.
Rent ($) Frequency420-439 8440-459 17460-479 12480-499 8500-519 7520-539 4540-559 2560-579 4580-599 2600-619 6
Sample Mean for Grouped Data•L.O. 2.•Shape
•z-score•Empirical Rule
•Exploratory•Weighted mean
•Grouped data
20
39Slide
Sample Mean for Grouped Data
This approximationdiffers by $2.41 fromthe actual samplemean of $490.80.
34,525 493.2170
x = =34,525 493.21
70x = =
Rent ($) f i
420-439 8440-459 17460-479 12480-499 8500-519 7520-539 4540-559 2560-579 4580-599 2600-619 6
Total 70
M i
429.5449.5469.5489.5509.5529.5549.5569.5589.5609.5
f iM i
3436.07641.55634.03916.03566.52118.01099.02278.01179.03657.034525.0
•L.O. 2.•Shape
•z-score•Empirical Rule
•Exploratory•Weighted mean
•Grouped data
40Slide
Variance for Grouped Data
s f M xn
i i22
1=
−∑−
( )s f M xn
i i22
1=
−∑−
( )
σ µ22
= −∑ f MN
i i( )σ µ22
= −∑ f MN
i i( )
n For sample data
n For population data
•L.O. 2.•Shape
•z-score•Empirical Rule
•Exploratory•Weighted mean
•Grouped data
21
41Slide
Rent ($) f i
420-439 8440-459 17460-479 12480-499 8500-519 7520-539 4540-559 2560-579 4580-599 2600-619 6
Total 70
M i
429.5449.5469.5489.5509.5529.5549.5569.5589.5609.5
Sample Variance for Grouped Data
M i - x-63.7-43.7-23.7-3.716.336.356.376.396.3116.3
f i(M i - x )2
32471.7132479.596745.97110.11
1857.555267.866337.13
23280.6618543.5381140.18
208234.29
(M i - x )2
4058.961910.56562.16
13.76265.36
1316.963168.565820.169271.76
13523.36
continued
•L.O. 2.•Shape
•z-score•Empirical Rule
•Exploratory•Weighted mean
•Grouped data
42Slide
3,017.89 54.94s = =3,017.89 54.94s = =
s2 = 208,234.29/(70 – 1) = 3,017.89
This approximation differs by only $.20 from the actual standard deviation of $54.74.
Sample Variance for Grouped Data
n Sample Variance
n Sample Standard Deviation
•L.O. 2.•Shape
•z-score•Empirical Rule
•Exploratory•Weighted mean
•Grouped data
22
43Slide
L.O. 3. Measures of Association Between Two Variables
n Covariancen Correlation Coefficient
44Slide
Covariance
Positive values indicate a positive relationship.
Negative values indicate a negative relationship.
The covariance is a measure of the linear associationbetween two variables.
•L.O. 3.•Covariance•Correlation
23
45Slide
Covariance
The correlation coefficient is computed as follows:
forsamples
forpopulations
s x x y ynxy
i i= − −∑−
( )( )1
s x x y ynxy
i i= − −∑−
( )( )1
σµ µ
xyi x i yx y
N=
− −∑( )( )σ
µ µxy
i x i yx yN
=− −∑( )( )
•L.O. 3.•Covariance•Correlation
46Slide
Correlation Coefficient
Values near +1 indicate a strong positive linearrelationship.
Values near -1 indicate a strong negative linearrelationship.
The coefficient can take on values between -1 and +1.
•L.O. 3.•Covariance•Correlation
24
47Slide
The correlation coefficient is computed as follows:
forsamples
forpopulations
rss sxy
xy
x y=r
ss sxy
xy
x y= ρ
σ
σ σxyxy
x y=ρ
σ
σ σxyxy
x y=
Correlation Coefficient•L.O. 3.
•Covariance•Correlation
48Slide
Correlation Coefficient
Just because two variables are highly correlated, it does not mean that one variable is the cause of theother.
Correlation is a measure of linear association and notnecessarily causation.
•L.O. 3.•Covariance•Correlation
25
49Slide
In class Exercise
n Q45 (p. 112)n Q46 (p. 112)
•L.O. 3.•Covariance•Correlation
50Slide
End of Chapter 3