Presentation on theme: "Describing Distributions with Numbers"— Presentation transcript:
1 Describing Distributions with Numbers Section 1.3Describing Distributions with Numbers
2 Quantitative Data Measuring Center Measuring Spread Boxplots Mean MedianMeasuring SpreadQuartilesFive Number SummaryStandard deviationBoxplots
3 Basic Practice of Statistics - 3rd Edition Measuring Center: The MeanThe most common measure of center is the arithmetic average, or mean.To find the mean (pronounced “x-bar”) of a set of observations, add their values, and divide by the number of observations. If the n observations are x1, x2, x3, …, xn, their mean is:In more compact notation:3Chapter 5
5 Calculations Mean highway mileage for the 19 2-seaters: Average: 25.8 miles/gallonIssue here: Honda Insight 68 miles/gallon!Exclude it, the mean mileage: only 23.4 mpgWhat does this say about the mean?
6 Median is the midpoint of a distribution. Problem: Mean can be easily influenced by outliers. It is NOT a resistant measure of center. MedianMedian is the midpoint of a distribution.Resistant or robust measure of center.i.e. not sensitive to extreme observations
7 Mean vs. Median In a symmetric distribution, mean = median In a skewed distribution, the mean is further out in the long tail than the median.Example: house prices are usually right skewedThe mean price of existing houses sold in 2014 in West Lafayete is 231,000. (Mean chases the right tail)The median price of these houses was only 169,900.
8 Measuring Center: The Median Because the mean cannot resist the influence of extreme observations, it is not a resistant measure of center.Another common measure of center is the median.The median M is the midpoint of a distribution, the number such that half of the observations are smaller and the other half are larger.To find the median of a distribution:Arrange all observations from smallest to largest.If the number of observations n is odd, the median M is the center observation in the ordered list.If the number of observations n is even, the median M is the average of the two center observations in the ordered list.
9 Measures of spreadQuartiles: Divides data into four parts (with the Median)pth percentile – p percent of the observations fall at or below it.Median – 50th percentileFirst Quartile (Q1) – 25th percentile (median of the lower half of data)Third Quartile (Q3) – 75th percentile (median of the upper half of data)The median and the two quartiles break the data into four 25% pieces.
10 Calculating medianTrick: Always the (n+1)/2 position from the ordered dataExample: Data:(n+1)/2 = 5, so median is the 5th positionMedian = 5Example: Data:(n+1)/2 = 5.5, so median is the 5.5th positionMedian = just the average of 5 and 6 = 5.5
11 Calculating Quartiles: Example: Data:Median = 5 = “Q2”Q1 is the median of the lower half =Q3 is the median of the upper half =(ignore the median when counting)Example: Data:Median = 5.5Q1 =Q3 =
14 BoxplotsThe median and quartiles divide the distribution roughly into quarters. This leads to a new way to display quantitative data, the boxplot.How to Make a BoxplotDraw and label a number line that includes the range of the distribution.Draw a central box from Q1 to Q3.Note the median M inside the box.Extend lines (whiskers) from the box out to the minimum and maximum values that are not outliers.
16 Find the 5 # summary and make a boxplot Numbers of home runs that Hank Aaron hit in each of his 23 years in the Major Leagues:
17 Criterion for suspected outliers Interquartile Range (IQR) = Q3 - Q1Observation is a suspected outlier IF it is:greater than Q *IQRORless than Q1 – 1.5*IQR
18 Criterion for suspected outliers Are there any outliers?
19 Criterion for suspected outliers Find 5 number summary:Min Q1 Median Q3 MaxAre there any outliers?Q3 – Q1 = 200 – 54.5 = 145.5Times by 1.5: *1.5 =Add to Q3: =Anything higher is a high outlier 7 obs.Subtract from Q1: 54.5 – =Anything lower is a low outlier no obs.
20 Criterion for suspected outliers Seven high outliers circled…Find and circle the eighth outlier.
21 Modified Boxplot Has outliers as dots or stars. The line extends only to the first non-outlier.
22 Standard deviationDeviation :Variance : s2Standard Deviation : s
23 Finding the standard deviation by hand: DATA points:Mean = 1600Finding the standard deviation by hand:Find the deviations from the mean:Deviation1 = 1792 – 1600 = 192Deviation2 = 1666 – 1600 = 66… Deviation7 = 1439 – 1600 = -161Square the deviations.Add them up and divide the sum by n-1 = 6, this gives you s2.Take square root: Standard Deviation = s =
24 Properties of the standard deviation Standard deviation is always non-negatives = 0 when there is no spreads has the same units as the original observationss is not resistant to presence of outliers5-number summary usually better describes a skewed distribution or a distribution with outliers.s is used when we use the meanMean and standard deviation are usually used for reasonably symmetric distributions without outliers.
25 Find the mean and standard deviation. Numbers of home runs that Hank Aaron hit in each of his 23 years in the Major Leagues:
26 Linear Transformations: changing units of measurements xnew = a + bxoldCommon conversionsDistance: 100km is equivalent to 62 milesxmiles = xkmWeight: 1ounce is equivalent to gramsxg= xoz ,Temperature:_
27 Linear Transformations Do not change shape of distributionHowever, change center and spreadExample: weights of newly hatched pythons:PythonWeight12345oz1.131.021.231.061.16g3229353033
28 Ounces Grams Mean weight = (1.13+…+1.16)/5 = 1.12 oz Standard deviation = 0.084GramsMean weight =(32+…+33)/5 = 31.8 gor 1.12 * = 31.8Standard deviation = 2.38or * = 2.38
29 Effect of a linear transformation Multiplying each observation by a positive number b multiplies both measures of center (mean and median) and measures of spread (IQR and standard deviation) by b.Adding the same number a to each observation adds a to measures of center and to quartiles and other percentiles but does not change measures of spread (IQR and standard deviation)
30 Effects of Linear Transformations Your Transformation: xnew = a + b*xoldmeannew = a + b*meanmediannew = a + b*medianstdevnew = |b|*stdevIQRnew = |b|*IQR|b|= absolute value of b (value without sign)
31 Example Winter temperature recorded in Fahrenheit mean = 20stdev = 10median = 22IQR = 11Convert into Celsius:mean = -160/9 + 5/9 * 20 = Cstdev = 5/9 * 10 = 5.56median =IQR =
32 SAS tips“proc univariate” procedure generates all the descriptive summaries.For the time being, draw boxplots by hand from the 5-number summaryOptional: proc boxplot.See plot.doc
33 Summary (1.2) Measures of location: Mean, Median, Quartiles Measures of spread: stdev, IQRMean, stdevaffected by extreme observationsMedian, IQRrobust to extreme observationsFive number summary and boxplotLinear Transformations