chapter 3 descriptive statistics: numerical methods part b n measures of relative location and...

32
Chapter 3 Chapter 3 Descriptive Statistics: Numerical Descriptive Statistics: Numerical Methods Methods Part B Part B Measures of Relative Location and Measures of Relative Location and Detecting Outliers Detecting Outliers Exploratory Data Analysis Exploratory Data Analysis Measures of Association Between Two Measures of Association Between Two Variables Variables The Weighted Mean and The Weighted Mean and Working with Grouped Data Working with Grouped Data % x

Upload: brice-henry

Post on 18-Jan-2016

221 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: Chapter 3 Descriptive Statistics: Numerical Methods Part B n Measures of Relative Location and Detecting Outliers n Exploratory Data Analysis n Measures

Chapter 3Chapter 3 Descriptive Statistics: Numerical Descriptive Statistics: Numerical

MethodsMethodsPart BPart B

Measures of Relative Location and Detecting Measures of Relative Location and Detecting OutliersOutliers

Exploratory Data AnalysisExploratory Data Analysis Measures of Association Between Two Measures of Association Between Two

VariablesVariables The Weighted Mean and The Weighted Mean and

Working with Grouped DataWorking with Grouped Data

%%xx

Page 2: Chapter 3 Descriptive Statistics: Numerical Methods Part B n Measures of Relative Location and Detecting Outliers n Exploratory Data Analysis n Measures

Measures of Relative LocationMeasures of Relative Locationand Detecting Outliersand Detecting Outliers

z-Scoresz-Scores Chebyshev’s TheoremChebyshev’s Theorem Empirical RuleEmpirical Rule Detecting OutliersDetecting Outliers

Page 3: Chapter 3 Descriptive Statistics: Numerical Methods Part B n Measures of Relative Location and Detecting Outliers n Exploratory Data Analysis n Measures

z-Scoresz-Scores

The The z-scorez-score is often called the standardized is often called the standardized value.value.

It denotes the number of standard deviations a It denotes the number of standard deviations a data value data value xxii is from the mean. is from the mean.

A data value less than the sample mean will A data value less than the sample mean will have a z-score less than zero.have a z-score less than zero.

A data value greater than the sample mean A data value greater than the sample mean will have a z-score greater than zero.will have a z-score greater than zero.

A data value equal to the sample mean will A data value equal to the sample mean will have a z-score of zero.have a z-score of zero.

zx xsii

zx xsii

Page 4: Chapter 3 Descriptive Statistics: Numerical Methods Part B n Measures of Relative Location and Detecting Outliers n Exploratory Data Analysis n Measures

z-Score of Smallest Value (425)z-Score of Smallest Value (425)

Standardized Values for Apartment RentsStandardized Values for Apartment Rents

zx xsi

425 490 8054 74

1 20.

..z

x xsi

425 490 8054 74

1 20.

..

-1.20 -1.11 -1.11 -1.02 -1.02 -1.02 -1.02 -1.02 -0.93 -0.93-0.93 -0.93 -0.93 -0.84 -0.84 -0.84 -0.84 -0.84 -0.75 -0.75-0.75 -0.75 -0.75 -0.75 -0.75 -0.56 -0.56 -0.56 -0.47 -0.47-0.47 -0.38 -0.38 -0.34 -0.29 -0.29 -0.29 -0.20 -0.20 -0.20-0.20 -0.11 -0.01 -0.01 -0.01 0.17 0.17 0.17 0.17 0.350.35 0.44 0.62 0.62 0.62 0.81 1.06 1.08 1.45 1.451.54 1.54 1.63 1.81 1.99 1.99 1.99 1.99 2.27 2.27

-1.20 -1.11 -1.11 -1.02 -1.02 -1.02 -1.02 -1.02 -0.93 -0.93-0.93 -0.93 -0.93 -0.84 -0.84 -0.84 -0.84 -0.84 -0.75 -0.75-0.75 -0.75 -0.75 -0.75 -0.75 -0.56 -0.56 -0.56 -0.47 -0.47-0.47 -0.38 -0.38 -0.34 -0.29 -0.29 -0.29 -0.20 -0.20 -0.20-0.20 -0.11 -0.01 -0.01 -0.01 0.17 0.17 0.17 0.17 0.350.35 0.44 0.62 0.62 0.62 0.81 1.06 1.08 1.45 1.451.54 1.54 1.63 1.81 1.99 1.99 1.99 1.99 2.27 2.27

Example: Apartment RentsExample: Apartment Rents

Page 5: Chapter 3 Descriptive Statistics: Numerical Methods Part B n Measures of Relative Location and Detecting Outliers n Exploratory Data Analysis n Measures

Chebyshev’s TheoremChebyshev’s Theorem

At least (1 - 1/At least (1 - 1/zz22) of the items in ) of the items in anyany data set will be data set will be

within within zz standard deviations of the mean, where standard deviations of the mean, where z z isis

any value greater than 1.any value greater than 1.

• At least At least 75%75% of the items must be within of the items must be within

z z = 2 standard deviations= 2 standard deviations of the mean. of the mean.

• At least At least 89%89% of the items must be within of the items must be within

zz = 3 standard deviations = 3 standard deviations of the mean. of the mean.

• At least At least 94%94% of the items must be within of the items must be within

zz = 4 standard deviations = 4 standard deviations of the mean. of the mean.

At least (1 - 1/At least (1 - 1/zz22) of the items in ) of the items in anyany data set will be data set will be

within within zz standard deviations of the mean, where standard deviations of the mean, where z z isis

any value greater than 1.any value greater than 1.

• At least At least 75%75% of the items must be within of the items must be within

z z = 2 standard deviations= 2 standard deviations of the mean. of the mean.

• At least At least 89%89% of the items must be within of the items must be within

zz = 3 standard deviations = 3 standard deviations of the mean. of the mean.

• At least At least 94%94% of the items must be within of the items must be within

zz = 4 standard deviations = 4 standard deviations of the mean. of the mean.

Page 6: Chapter 3 Descriptive Statistics: Numerical Methods Part B n Measures of Relative Location and Detecting Outliers n Exploratory Data Analysis n Measures

Example: Apartment RentsExample: Apartment Rents

Chebyshev’s TheoremChebyshev’s Theorem

Let Let zz = 1.5 with = 490.80 and = 1.5 with = 490.80 and ss = = 54.7454.74

At least (1 - 1/(1.5)At least (1 - 1/(1.5)22) = 1 - 0.44 = 0.56 or ) = 1 - 0.44 = 0.56 or 56% 56%

of the rent values must be betweenof the rent values must be between

- - zz((ss) = 490.80 - 1.5(54.74) = ) = 490.80 - 1.5(54.74) = 409409

andand

+ + zz((ss) = 490.80 + 1.5(54.74) = ) = 490.80 + 1.5(54.74) = 573573

xx

xx

xx

Page 7: Chapter 3 Descriptive Statistics: Numerical Methods Part B n Measures of Relative Location and Detecting Outliers n Exploratory Data Analysis n Measures

Chebyshev’s Theorem (continued)Chebyshev’s Theorem (continued)

Actually, 86% of the rent valuesActually, 86% of the rent values

are between 409 and 573. are between 409 and 573.

425 430 430 435 435 435 435 435 440 440440 440 440 445 445 445 445 445 450 450450 450 450 450 450 460 460 460 465 465465 470 470 472 475 475 475 480 480 480480 485 490 490 490 500 500 500 500 510510 515 525 525 525 535 549 550 570 570575 575 580 590 600 600 600 600 615 615

425 430 430 435 435 435 435 435 440 440440 440 440 445 445 445 445 445 450 450450 450 450 450 450 460 460 460 465 465465 470 470 472 475 475 475 480 480 480480 485 490 490 490 500 500 500 500 510510 515 525 525 525 535 549 550 570 570575 575 580 590 600 600 600 600 615 615

Example: Apartment RentsExample: Apartment Rents

Page 8: Chapter 3 Descriptive Statistics: Numerical Methods Part B n Measures of Relative Location and Detecting Outliers n Exploratory Data Analysis n Measures

Empirical RuleEmpirical Rule

For data having a bell-shaped distribution:For data having a bell-shaped distribution:

• Approximately Approximately 68%68% of the data values will of the data values will be within be within oneone standard deviationstandard deviation of the of the mean.mean.

Page 9: Chapter 3 Descriptive Statistics: Numerical Methods Part B n Measures of Relative Location and Detecting Outliers n Exploratory Data Analysis n Measures

Empirical RuleEmpirical Rule

For data having a bell-shaped For data having a bell-shaped distribution:distribution:

• Approximately Approximately 95%95% of the data values will of the data values will be within be within twotwo standard deviationsstandard deviations of the of the mean.mean.

Page 10: Chapter 3 Descriptive Statistics: Numerical Methods Part B n Measures of Relative Location and Detecting Outliers n Exploratory Data Analysis n Measures

Empirical RuleEmpirical Rule

For data having a bell-shaped For data having a bell-shaped distribution:distribution:

• Almost allAlmost all (99.7%) of the items will be (99.7%) of the items will be within within threethree standard deviationsstandard deviations of the of the mean.mean.

Page 11: Chapter 3 Descriptive Statistics: Numerical Methods Part B n Measures of Relative Location and Detecting Outliers n Exploratory Data Analysis n Measures

Example: Apartment RentsExample: Apartment Rents

Empirical RuleEmpirical Rule

IntervalInterval % in % in IntervalInterval

Within +/- 1Within +/- 1ss 434366.06 to 545.54.06 to 545.54 48/70 = 48/70 = 69%69%

Within +/- 2Within +/- 2ss 381.32 to 600.28381.32 to 600.28 68/70 = 68/70 = 97%97%

Within +/- 3Within +/- 3ss 326.58 to 655.02326.58 to 655.02 70/70 = 70/70 = 100%100%

425 430 430 435 435 435 435 435 440 440440 440 440 445 445 445 445 445 450 450450 450 450 450 450 460 460 460 465 465465 470 470 472 475 475 475 480 480 480480 485 490 490 490 500 500 500 500 510510 515 525 525 525 535 549 550 570 570575 575 580 590 600 600 600 600 615 615

Page 12: Chapter 3 Descriptive Statistics: Numerical Methods Part B n Measures of Relative Location and Detecting Outliers n Exploratory Data Analysis n Measures

Detecting OutliersDetecting Outliers

An An outlieroutlier is an unusually small or unusually is an unusually small or unusually large value in a data set.large value in a data set.

A data value with a z-score less than -3 or A data value with a z-score less than -3 or greater than +3 might be considered an greater than +3 might be considered an outlier. outlier.

It might be:It might be:

• an incorrectly recorded data valuean incorrectly recorded data value

• a data value that was incorrectly included in a data value that was incorrectly included in the data setthe data set

• a correctly recorded data value that belongs a correctly recorded data value that belongs in the data setin the data set

Page 13: Chapter 3 Descriptive Statistics: Numerical Methods Part B n Measures of Relative Location and Detecting Outliers n Exploratory Data Analysis n Measures

Example: Apartment RentsExample: Apartment Rents

Detecting OutliersDetecting OutliersThe most extreme z-scores are -1.20 and The most extreme z-scores are -1.20 and

2.27.2.27.Using |Using |zz| | >> 3 as the criterion for an 3 as the criterion for an

outlier, outlier, there are no outliers in this data set. there are no outliers in this data set.

Standardized Values for Apartment RentsStandardized Values for Apartment Rents-1.20 -1.11 -1.11 -1.02 -1.02 -1.02 -1.02 -1.02 -0.93 -0.93-0.93 -0.93 -0.93 -0.84 -0.84 -0.84 -0.84 -0.84 -0.75 -0.75-0.75 -0.75 -0.75 -0.75 -0.75 -0.56 -0.56 -0.56 -0.47 -0.47-0.47 -0.38 -0.38 -0.34 -0.29 -0.29 -0.29 -0.20 -0.20 -0.20-0.20 -0.11 -0.01 -0.01 -0.01 0.17 0.17 0.17 0.17 0.350.35 0.44 0.62 0.62 0.62 0.81 1.06 1.08 1.45 1.451.54 1.54 1.63 1.81 1.99 1.99 1.99 1.99 2.27 2.27

-1.20 -1.11 -1.11 -1.02 -1.02 -1.02 -1.02 -1.02 -0.93 -0.93-0.93 -0.93 -0.93 -0.84 -0.84 -0.84 -0.84 -0.84 -0.75 -0.75-0.75 -0.75 -0.75 -0.75 -0.75 -0.56 -0.56 -0.56 -0.47 -0.47-0.47 -0.38 -0.38 -0.34 -0.29 -0.29 -0.29 -0.20 -0.20 -0.20-0.20 -0.11 -0.01 -0.01 -0.01 0.17 0.17 0.17 0.17 0.350.35 0.44 0.62 0.62 0.62 0.81 1.06 1.08 1.45 1.451.54 1.54 1.63 1.81 1.99 1.99 1.99 1.99 2.27 2.27

Page 14: Chapter 3 Descriptive Statistics: Numerical Methods Part B n Measures of Relative Location and Detecting Outliers n Exploratory Data Analysis n Measures

Exploratory Data AnalysisExploratory Data Analysis

Five-Number SummaryFive-Number Summary Box PlotBox Plot

Page 15: Chapter 3 Descriptive Statistics: Numerical Methods Part B n Measures of Relative Location and Detecting Outliers n Exploratory Data Analysis n Measures

Five-Number SummaryFive-Number Summary

Smallest ValueSmallest Value First QuartileFirst Quartile MedianMedian Third QuartileThird Quartile Largest ValueLargest Value

Page 16: Chapter 3 Descriptive Statistics: Numerical Methods Part B n Measures of Relative Location and Detecting Outliers n Exploratory Data Analysis n Measures

Example: Apartment RentsExample: Apartment Rents

Five-Number SummaryFive-Number Summary

Lowest Value = 425Lowest Value = 425 First Quartile First Quartile = 450= 450

Median = 475Median = 475

Third Quartile = 525 Largest Value Third Quartile = 525 Largest Value = 615= 615425 430 430 435 435 435 435 435 440 440

440 440 440 445 445 445 445 445 450 450450 450 450 450 450 460 460 460 465 465465 470 470 472 475 475 475 480 480 480480 485 490 490 490 500 500 500 500 510510 515 525 525 525 535 549 550 570 570575 575 580 590 600 600 600 600 615 615

425 430 430 435 435 435 435 435 440 440440 440 440 445 445 445 445 445 450 450450 450 450 450 450 460 460 460 465 465465 470 470 472 475 475 475 480 480 480480 485 490 490 490 500 500 500 500 510510 515 525 525 525 535 549 550 570 570575 575 580 590 600 600 600 600 615 615

Page 17: Chapter 3 Descriptive Statistics: Numerical Methods Part B n Measures of Relative Location and Detecting Outliers n Exploratory Data Analysis n Measures

Box PlotBox Plot

A box is drawn with its ends located at the first A box is drawn with its ends located at the first and third quartiles.and third quartiles.

A vertical line is drawn in the box at the A vertical line is drawn in the box at the location of the median.location of the median.

Limits are located (not drawn) using the Limits are located (not drawn) using the interquartile range (IQR).interquartile range (IQR).

• The lower limit is located 1.5(IQR) below The lower limit is located 1.5(IQR) below QQ1.1.

• The upper limit is located 1.5(IQR) above The upper limit is located 1.5(IQR) above QQ3.3.

• Data outside these limits are considered Data outside these limits are considered outliersoutliers..

… … continuedcontinued

Page 18: Chapter 3 Descriptive Statistics: Numerical Methods Part B n Measures of Relative Location and Detecting Outliers n Exploratory Data Analysis n Measures

Box Plot (Continued)Box Plot (Continued)

Whiskers (dashed lines) are drawn from the Whiskers (dashed lines) are drawn from the ends of the box to the smallest and largest ends of the box to the smallest and largest data values inside the limits.data values inside the limits.

The locations of each outlier is shown with the The locations of each outlier is shown with the symbolsymbol * * ..

Page 19: Chapter 3 Descriptive Statistics: Numerical Methods Part B n Measures of Relative Location and Detecting Outliers n Exploratory Data Analysis n Measures

Example: Apartment RentsExample: Apartment Rents

Box PlotBox Plot

Lower Limit: Q1 - 1.5(IQR) = 450 - 1.5(75) Lower Limit: Q1 - 1.5(IQR) = 450 - 1.5(75) = 337.5 = 337.5

Upper Limit: Q3 + 1.5(IQR) = 525 + 1.5(75) Upper Limit: Q3 + 1.5(IQR) = 525 + 1.5(75) = 637.5= 637.5

There are no outliers.There are no outliers.

375375

400400

425425

450450

475475

500500

525525

550550 575575 600600 625625

Page 20: Chapter 3 Descriptive Statistics: Numerical Methods Part B n Measures of Relative Location and Detecting Outliers n Exploratory Data Analysis n Measures

Measures of Association Measures of Association Between Two VariablesBetween Two Variables

CovarianceCovariance Correlation CoefficientCorrelation Coefficient

Page 21: Chapter 3 Descriptive Statistics: Numerical Methods Part B n Measures of Relative Location and Detecting Outliers n Exploratory Data Analysis n Measures

CovarianceCovariance

The The covariancecovariance is a measure of the linear is a measure of the linear association between two variables.association between two variables.

Positive values indicate a positive relationship.Positive values indicate a positive relationship. Negative values indicate a negative Negative values indicate a negative

relationship.relationship.

Page 22: Chapter 3 Descriptive Statistics: Numerical Methods Part B n Measures of Relative Location and Detecting Outliers n Exploratory Data Analysis n Measures

If the data sets are samples, the covariance is If the data sets are samples, the covariance is denoted by denoted by ssxyxy..

If the data sets are populations, the covariance If the data sets are populations, the covariance is denoted by .is denoted by .

CovarianceCovariance

sx x y ynxy

i i

( )( )

1s

x x y ynxy

i i

( )( )

1

xyi x i yx y

N

( )( )

xy

i x i yx y

N

( )( )

xyxy

Page 23: Chapter 3 Descriptive Statistics: Numerical Methods Part B n Measures of Relative Location and Detecting Outliers n Exploratory Data Analysis n Measures

Correlation CoefficientCorrelation Coefficient

The coefficient can take on values between -1 and The coefficient can take on values between -1 and +1.+1.

Values near -1 indicate a Values near -1 indicate a strong negative linear strong negative linear relationshiprelationship..

Values near +1 indicate a Values near +1 indicate a strong positive linear strong positive linear relationshiprelationship..

If the data sets are samples, the coefficient is If the data sets are samples, the coefficient is rrxyxy..

If the data sets are populations, the coefficient If the data sets are populations, the coefficient is .is .

rs

s sxyxy

x yrs

s sxyxy

x y

xyxy

x y

xyxy

x y

xyxy

Page 24: Chapter 3 Descriptive Statistics: Numerical Methods Part B n Measures of Relative Location and Detecting Outliers n Exploratory Data Analysis n Measures

The Weighted Mean andThe Weighted Mean andWorking with Grouped DataWorking with Grouped Data

Weighted MeanWeighted Mean Mean for Grouped DataMean for Grouped Data Variance for Grouped DataVariance for Grouped Data Standard Deviation for Grouped DataStandard Deviation for Grouped Data

Page 25: Chapter 3 Descriptive Statistics: Numerical Methods Part B n Measures of Relative Location and Detecting Outliers n Exploratory Data Analysis n Measures

Weighted MeanWeighted Mean

When the mean is computed by giving each When the mean is computed by giving each data value a weight that reflects its data value a weight that reflects its importance, it is referred to as a importance, it is referred to as a weighted weighted meanmean..

In the computation of a grade point average In the computation of a grade point average (GPA), the weights are the number of credit (GPA), the weights are the number of credit hours earned for each grade.hours earned for each grade.

When data values vary in importance, the When data values vary in importance, the analyst must choose the weight that best analyst must choose the weight that best reflects the importance of each value.reflects the importance of each value.

Page 26: Chapter 3 Descriptive Statistics: Numerical Methods Part B n Measures of Relative Location and Detecting Outliers n Exploratory Data Analysis n Measures

Weighted MeanWeighted Mean

xx = = wwi i xxii

wwii

where:where:

xxii = value of observation = value of observation ii

wwi i = weight for observation = weight for observation ii

Page 27: Chapter 3 Descriptive Statistics: Numerical Methods Part B n Measures of Relative Location and Detecting Outliers n Exploratory Data Analysis n Measures

Grouped DataGrouped Data

The weighted mean computation can be used to The weighted mean computation can be used to obtain approximations of the mean, variance, obtain approximations of the mean, variance, and standard deviation for the grouped data.and standard deviation for the grouped data.

To compute the weighted mean, we treat the To compute the weighted mean, we treat the midpoint of each classmidpoint of each class as though it were the as though it were the mean of all items in the class.mean of all items in the class.

We compute a weighted mean of the class We compute a weighted mean of the class midpoints using the midpoints using the class frequenciesclass frequencies as weights. as weights.

Similarly, in computing the variance and Similarly, in computing the variance and standard deviation, the class frequencies are standard deviation, the class frequencies are used as weights.used as weights.

Page 28: Chapter 3 Descriptive Statistics: Numerical Methods Part B n Measures of Relative Location and Detecting Outliers n Exploratory Data Analysis n Measures

Sample DataSample Data

Population DataPopulation Data

where: where:

ffi i = frequency of class = frequency of class ii

MMi i = midpoint of class = midpoint of class ii

Mean for Grouped DataMean for Grouped Data

i

ii

f

Mfx

i

ii

f

Mfx

N

Mf iiN

Mf ii

Page 29: Chapter 3 Descriptive Statistics: Numerical Methods Part B n Measures of Relative Location and Detecting Outliers n Exploratory Data Analysis n Measures

Example: Apartment RentsExample: Apartment Rents

Given below is the previous sample of monthly Given below is the previous sample of monthly rentsrents

for one-bedroom apartments presented here as for one-bedroom apartments presented here as groupedgrouped

data in the form of a frequency distribution. data 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

Rent ($) Frequency420-439 8440-459 17460-479 12480-499 8500-519 7520-539 4540-559 2560-579 4580-599 2600-619 6

Page 30: Chapter 3 Descriptive Statistics: Numerical Methods Part B n Measures of Relative Location and Detecting Outliers n Exploratory Data Analysis n Measures

Example: Apartment RentsExample: Apartment Rents

Mean for Grouped DataMean for Grouped Data

This This approximationapproximation differs by $2.41 fromdiffers by $2.41 from

the actual the actual samplesample mean of $490.80.mean of $490.80.

Rent ($) f i M i f iM i

420-439 8 429.5 3436.0440-459 17 449.5 7641.5460-479 12 469.5 5634.0480-499 8 489.5 3916.0500-519 7 509.5 3566.5520-539 4 529.5 2118.0540-559 2 549.5 1099.0560-579 4 569.5 2278.0580-599 2 589.5 1179.0600-619 6 609.5 3657.0

Total 70 34525.0

Rent ($) f i M i f iM i

420-439 8 429.5 3436.0440-459 17 449.5 7641.5460-479 12 469.5 5634.0480-499 8 489.5 3916.0500-519 7 509.5 3566.5520-539 4 529.5 2118.0540-559 2 549.5 1099.0560-579 4 569.5 2278.0580-599 2 589.5 1179.0600-619 6 609.5 3657.0

Total 70 34525.0

x 34 52570

493 21,

.x 34 52570

493 21,

.

Page 31: Chapter 3 Descriptive Statistics: Numerical Methods Part B n Measures of Relative Location and Detecting Outliers n Exploratory Data Analysis n Measures

Variance for Grouped DataVariance for Grouped Data

Sample DataSample Data

Population DataPopulation Data

sf M xn

i i22

1

( )s

f M xn

i i22

1

( )

22

f M

Ni i( ) 2

2

f M

Ni i( )

Page 32: Chapter 3 Descriptive Statistics: Numerical Methods Part B n Measures of Relative Location and Detecting Outliers n Exploratory Data Analysis n Measures

Example: Apartment RentsExample: Apartment Rents

Variance for Grouped DataVariance for Grouped Data

Standard Deviation for Grouped DataStandard Deviation for Grouped Data

This approximation differs by only $.20 This approximation differs by only $.20

from the actual standard deviation of $54.74. from the actual standard deviation of $54.74.

s2 3 017 89 , .s2 3 017 89 , .

s 3 017 89 54 94, . .s 3 017 89 54 94, . .