Presentation is loading. Please wait.

Presentation is loading. Please wait.

Chapter 5 Understanding and Comparing Distributions Math2200.

Similar presentations


Presentation on theme: "Chapter 5 Understanding and Comparing Distributions Math2200."— Presentation transcript:

1 Chapter 5 Understanding and Comparing Distributions Math2200

2 Example: The Hopkins Memorial Forest A 2500-acre reserve in Massachusetts, New York, Vermont Managed by the Williams College center for Environmental Studies (CES) http://www.williams.edu/CES/hopkins.htm Average wind speed for every day in 1989 –Important for monitoring storms

3 Avg WindDay of YearMonth 1.8811 2.5721 4.0431 4.7341 2.4951 2.1761 3.5171 4.5981 4.491 1.85101 3.17111 3.44121 6.33131 2.39141 3.14151 2.56161 3.11171 1.64181 2.05191 2.98201 4.66211 0.81221 0.72231

4

5 Five-number summary Max8.670 Q32.930 Median1.900 Q11.150 Min0.200

6 Boxplot Invented by John W. Tukey

7 Constructing Boxplots 1.Draw a single vertical axis spanning the range of the data. Draw short horizontal lines at the lower and upper quartiles and at the median. Then connect them with vertical lines to form a box.

8 Constructing Boxplots (cont.) 2.Erect “fences” around the main part of the data. –The upper fence is 1.5 IQRs above the upper quartile. –The lower fence is 1.5 IQRs below the lower quartile. –Note: the fences only help with constructing the boxplot and should not appear in the final display.

9 Constructing Boxplots (cont.) 3.Use the fences to grow “whiskers.” –Draw lines from the ends of the box up and down to the most extreme data values found within the fences. –If a data value falls outside one of the fences, we do not connect it with a whisker.

10 Constructing Boxplots (cont.) 4.Add the outliers by displaying any data values beyond the fences with special symbols. –We often ( not always ) use a different symbol for “far outliers” that are farther than 3 IQRs from the quartiles.

11 How to make a boxplot? Draw a single vertical axis spanning the extent of the data Draw short horizontal lines at the Q1, median, Q3. Then connect them to make a box. Draw ‘fences’ –Upper fence = Q3 + 1.5 * IQR –Lower fence = Q1 - 1.5 * IQR Grow ‘whiskers’ Add outliers TI-83 can make boxplots

12

13 Comparing groups Relationship between a quantitative variable and a categorical variable –A categorical variable defines groups Is it windier in the winter or summer? –A binary categorical variable Spring/Summer: April -- September Fall/Winter: October – March –A quantitative variable: average wind speed

14

15

16 Comparison Spring/SummerFall/Winter shape modeunimodal symmetryskewed to the rightless skewed outliernoyes center mean1.5562.712 median1.3402.470 spread StdDev1.0051.359 IQR1.3151.865

17 Are some months windier than others?

18 Summary Average wind speed is lower and less variable in the summer, especially July Average wind speed is higher and more variable in the winter The highest winder speed occurs in November More outliers than when plotting for the entire year

19 Outliers Some outliers are obviously errors –Misplacing the decimal point –Digit transposed –Digits repeated or omitted –Units may be wrong –Incorrectly copied What to do with outliers? –If there are any clear outliers and you are reporting the mean and standard deviation, report them with the outliers present and with the outliers removed. The differences may be quite revealing. –Note: The median and IQR are not likely to be affected by the outliers.

20 Timeplots For some data sets, we are interested in how the data behave over time. In these cases, we construct timeplots of the data.

21 Timeplots

22 Re-expressing Skewed Data to Improve Symmetry When data are skewed, it is hard to simply summarize with a center and spread. Can we transform the data to be more symmetric? Histogram of the annual compensation to CEOs of the Fortune 500 companies in 2005

23 Re-expressing Skewed Data to Improve Symmetry (cont.) One way to make a skewed distribution more symmetric is to re- express or transform the data by applying a simple function (e.g., logarithmic function or square root).

24 Re-expressing to equalize spread across groups

25 After log transformation

26 What Can Go Wrong? Avoid inconsistent scales, either within the display or when comparing two displays. Label clearly so a reader knows what the plot displays. Beware of outliers Be careful when comparing groups that have very different spreads

27 What Can Go Wrong? (cont.)


Download ppt "Chapter 5 Understanding and Comparing Distributions Math2200."

Similar presentations


Ads by Google