Educerie

Educerie · AP · Statistics

AP Statistics 1.9

Comparisons of the Distributions for One Quantitative Variable

How do we describe data about one variable, and how must the data be collected before we can trust what they say?

What you will learn

  • Understand how to compare two distributions feature by feature, with both groups in each sentence
  • Know which features each type of graph can and cannot show
  • Understand that a z-score counts standard deviations from the mean
  • Know that z-scores let you compare values from different distributions

You must be able to

  1. Compare two distributions in context using center, variability, shape and outliers
  2. Compare two groups from side-by-side boxplots using medians and IQRs
  3. Justify a claim using a number from each group
  4. Calculate a z-score and interpret it as above or below the mean
  5. Compare two values from different distributions using z-scores

In the exam. Section I multiple choice, as two graphs or two summaries to compare, or a z-score to calculate. In Section II, the data-analysis question gives two sets of values, often as side-by-side boxplots or summary tables, and asks you to compare center and variability, to name outliers and to choose a measure to justify a claim. Comparisons need comparing words, not two separate descriptions.

1Comparing with dotplots

Figure 1 puts the two classes on the same scale.

Figure 1. Dotplots of the daily homework minutes of 20 students in Class A and 20 in Class B on the same scale: Class A is tightly bunched around 60, Class B is spread out and trails to 130 20 40 60 80 100 120 140 0 Homework (minutes per day) Class A Class B
Figure 1 · Dotplots of the daily homework minutes of 20 students in Class A and 20 in Class B on the same scale: Class A is tightly bunched around 60, Class B is spread out and trails to 130

A shared horizontal axis is what makes the comparison fair. Read it like this:

  • Center: Class A's dots sit around 60 minutes. Class B's dots sit lower, with most between 20 and 65.
  • Variability: Class A's dots run from 35 to 80. Class B's run from 20 to 130, with a few well above the rest.
  • Shape: Class A looks approximately symmetric. Class B is skewed to the right.
  • Unusual features: Class B has an isolated value at 130. Class A has none.

Never describe the two graphs one after the other and leave the reader to compare. Put the comparison in one sentence: "Class B's homework times are more spread out than Class A's."

2Comparing with two groups on one set of stems

A back-to-back stem-and-leaf plot uses one column of stems for two groups, with one group's leaves on the left and the other's on the right.

      Class A | Class B
              |  2 | 0 5 8
            5 |  3 | 0 2 5 8
        8 5 2 |  4 | 0 2 4 6 8
  8 6 5 3 2 0 |  5 | 2 5
  8 6 5 3 1 0 |  6 | 0 5
        5 2 0 |  7 | 2
            0 |  8 | 5
              |  9 | 5
              | 10 |
              | 11 |
              | 12 |
              | 13 | 0

Key: 5 | 3 | 0 means 35 minutes in Class A and 30 minutes in Class B

On the left the leaves run outward from the stem, largest furthest. Count the leaves on each side. Each side has 20, which is nn for each class.

The plot shows the same story: Class A's leaves bunch around stems 5 and 6, and Class B's trail down the stems to 13.

3Comparing with boxplots

Boxplots can compare center, variability, outliers and skewness (or symmetry). Figure 2 shows the same two classes.

Figure 2. Parallel boxplots of the same two classes: Class B has the lower median (45 against 59), the wider box (IQR 29 against 16) and one outlier at 130; Class A has no outliers 20 40 60 80 100 120 140 0 Homework (minutes per day) * Class A Class B
Figure 2 · Parallel boxplots of the same two classes: Class B has the lower median (45 against 59), the wider box (IQR 29 against 16) and one outlier at 130; Class A has no outliers

The five-number summaries:

MinimumQ1Q_1MedianQ3Q_3MaximumIQR
Class A355159678016
Class B2033.54562.513029

Check Class B's outlier: 62.5+1.5(29)=10662.5 + 1.5(29) = 106, and 130 is above 106. So 130 is an outlier. For Class A, 67+1.5(16)=9167 + 1.5(16) = 91 and 51−24=2751 - 24 = 27. No value falls outside, so there are no outliers by this rule.

What the boxplots allow you to say:

  • Center: the median for Class A (59) is higher than for Class B (45).
  • Variability: Class A's IQR (16) is smaller than Class B's (29). Class A is more consistent.
  • Skew: Class A's box is nearly symmetric, with the median close to the middle. Class B's median is 11.5 above its Q1Q_1 and 17.5 below its Q3Q_3, so it is skewed to the right.
  • Outliers: Class B has one, at 130 minutes. Class A has none.

What the boxplots do not allow you to say: anything about peaks, gaps or clusters.

4Comparing with summary statistics

Other statistics can enter the comparison too. Here are the means and standard deviations.

MeanStandard deviationMedianIQR
Class A58.711.65916
Class B52.126.94529

Mean against median tells you about skew (Topic 1.8). Class A's mean (58.7) is almost its median (59), so it is nearly symmetric. Class B's mean (52.1) is above its median (45), which fits right skew.

The numbers have to match the descriptions. Class B's standard deviation is more than twice Class A's (26.9 against 11.6). That agrees with the dotplot, where Class B is far more spread out.

When you choose between the pairs, choose by the shape and outliers (Topic 1.7). For Class B, whose distribution is skewed with an outlier, the median and IQR describe a typical student better than the mean and standard deviation.

5Writing the comparison in context

A full comparison:

The distributions of daily homework time for the two classes differ in center and variability. Class A has the higher typical time: its median is 59 minutes, compared with 45 minutes for Class B. Class A's times are also more consistent. Its IQR is 16 minutes, while Class B's is 29 minutes. Class A's distribution is approximately symmetric with no outliers, while Class B's is skewed to the right and has an outlier at 130 minutes.

What makes it good:

  • Both groups appear in every sentence and each is given a value.
  • Comparative words are used: "higher", "more consistent", "while".
  • Context is present: the variable (daily homework time), the units (minutes) and the groups.
  • All the features are covered: center, variability, shape and unusual features.

A common error is to give only one group's number, or to say "Class A is bigger" without saying what is bigger.

6Justifying a claim

Claim: "Students in Class A usually do more homework than students in Class B."

  • The median for Class A (59 minutes) is higher than for Class B (45 minutes).
  • The middle half of Class A (51 to 67 minutes) sits above the middle half of Class B (33.5 to 62.5 minutes).

Both statements support the claim. State the evidence. "It looks higher" is not enough.

Be careful that the claim is the one the data support. "Every student in Class A does more homework than every student in Class B" is false. The classes overlap: both have students between 35 and 80 minutes. Also, Class B's highest values (85, 95 and 130) exceed Class A's maximum of 80. Claims with "every", "always" or "never" usually fail.

7z-scores: where one value stands

z-score (standardized score) = the number of standard deviations a data value falls above or below the mean.

z=xi−μσthe value minus the population mean, divided by the population standard deviationz = \frac{x_i - \mu}{\sigma} \qquad \textcolor{#838c91}{\text{the value minus the population mean, divided by the population standard deviation}}

A positive z-score means the value is above the mean. A negative one means it is below. When the population mean and standard deviation are unknown, the sample mean xˉ\bar{x} and standard deviation ss may be used.

Example (invented): a student scored 84 on a math test, where the mean was 72 and the standard deviation was 8. Another student scored 80 on a biology test, where the mean was 65 and the standard deviation was 12.

zmath=84−728=1.51.5 standard deviations above the meanz_{\text{math}} = \frac{84 - 72}{8} = 1.5 \qquad \textcolor{#838c91}{\text{1.5 standard deviations above the mean}}zbiology=80−6512=1.251.25 standard deviations above the meanz_{\text{biology}} = \frac{80 - 65}{12} = 1.25 \qquad \textcolor{#838c91}{\text{1.25 standard deviations above the mean}}

The math score has the larger z-score, so it is the relatively better result, even though 84 and 80 are close. Say it in context: "The math score of 84 is 1.5 standard deviations above the math mean, which is higher relative to its group than the biology score of 80, at 1.25 standard deviations above its mean."

You can also run it backward. A student with z=−1.5z = -1.5 on the math test scored 72+(−1.5)(8)=6072 + (-1.5)(8) = 60.

Use z-scores to compare values from different distributions. A raw score alone does not allow that, because the two tests have different means and spreads.

8z-scores and the 2 standard deviation rule

A value with ∣z∣>2|z| > 2 is an outlier by the 2 standard deviation rule (Topic 1.7). Take a student who does 80 minutes of homework.

  • In Class A: z=80−58.711.6≈1.84z = \frac{80 - 58.7}{11.6} \approx 1.84. That is high, but under 2.
  • In Class B: z=80−52.126.9≈1.04z = \frac{80 - 52.1}{26.9} \approx 1.04. That is ordinary.

The same 80 minutes is unusual in a class that is tightly bunched and unremarkable in a class that is widely spread. Context decides.

For Class B's 130: z=130−52.126.9≈2.90z = \frac{130 - 52.1}{26.9} \approx 2.90. It is more than 2 standard deviations above the mean, which agrees with the 1.5 times IQR rule.

The two rules can differ. In Class A, the value 35 has z=35−58.711.6≈−2.05z = \frac{35 - 58.7}{11.6} \approx -2.05, so the 2 standard deviation rule flags it. The 1.5 times IQR rule does not, because 35 is above the lower fence of 27. State which rule you are using.

Practice questions

30 questions on this note, from easy to hard. Each one you get right lights a star of this topic's constellation.