Skip to content

Unit 1: Exploring One-Variable Data and Collecting Data

Comparisons of the Distributions for One Quantitative Variable

Compare two or more distributions by shape, center, variability and unusual features, justify claims from the comparison, and compare relative positions with z-scores.

Topic 1.9 · 8 min read

Do fish grow longer in one lake than another? Do people assemble furniture faster with video instructions than with a printed sheet? Questions like these compare the distribution of one quantitative variable across two or more groups, using the graphs and summary statistics of Topics 1.6 to 1.8 side by side.

A comparison uses comparative words

Comparing two distributions means comparing the same four features as in a description (shape, center, variability and unusual features), and stating how they differ. "Lake A's lengths have a median of 28.5 cm; Lake B's have a median of 22.5 cm" lists two facts. "The median length of the Lake A fish (28.5 cm) is greater than the median length of the Lake B fish (22.5 cm)" compares them. The second is what a comparison question asks for, and the exam scores it that way.

Each feature gets its own comparative statement:

  • Shape: are both skewed the same way, or is one symmetric and the other skewed?
  • Center: which group has the greater median (or mean)?
  • Variability: which group is more spread out, by IQR, range or standard deviation?
  • Unusual features: does one group have outliers, gaps or clusters that the other doesn't?

All of it is in context: name the variable, the groups and the units. Numerical summaries such as means, medians, standard deviations and IQRs can back up each statement, and when two measures disagree (a similar IQR but a much larger range, for instance) say what each one shows.

What each graph can and can't compare

To compare fairly, plot the groups on the same scale: one number line shared by parallel boxplots or stacked dotplots, or a back-to-back stemplot with one column of stems.

  • Dotplots, stemplots and histograms show every feature: shape, center, variability, outliers, gaps and clusters. A back-to-back stemplot puts one group's leaves on the left of the stems and the other group's on the right, so the leaves on the left are read from right to left.
  • Parallel boxplots compare centers (medians), variability (IQR and range), outliers and skew, and they make those comparisons quicker to read than any other display. They hide gaps, clusters and the number of peaks (Topic 1.8), and they don't show how many values are in each group.
  • Histograms of groups with different sizes should use relative frequency (proportion of the group in each class) on the vertical axis. With counts, a class with 20 out of 200 values looks taller than one with 15 out of 30, even though it holds a much smaller share of its group.

Justifying a claim from a comparison

Many claims about groups can be checked with quartiles, because each quartile tells you a percentage. If the third quartile of group A is below the median of group B, then at least 75% of group A falls below a value that at least half of group B reaches or exceeds. That is strong evidence that group A's values tend to be lower. The reverse comparison works too: a box that lies entirely to one side of the other group's median says the same thing about the middle half of the data.

A claim based on centers alone can mislead when the spreads are large. Two groups with medians of 30 and 32 but IQRs of 20 overlap so much that most individuals in the "higher" group aren't higher than most individuals in the other. Before concluding that one group's values are larger, look at how much the distributions overlap.

z-scores: comparing positions across distributions

A sprinter's 100-meter time and a long jumper's distance can't be compared directly: they're in different units, and a "good" value means opposite things (low for the time, high for the distance). What you can compare is how unusual each value is within its own distribution. A standardized score, or z-score, turns a value into a count of standard deviations from its own distribution's mean, with a sign that says which side of the mean it is on.

The units cancel (minutes over minutes), so z-scores from different variables are on the same scale and can be compared. A larger ∣z∣|z| means a value is farther from its own mean relative to that distribution's typical spread. Whether a positive or negative z-score is "better" depends on the variable: in a race, the time with the most negative z-score is the most impressive.

Rearranged, the formula turns a z-score back into a value: x=μ+zσx = \mu + z\sigma. A value 1.5 standard deviations below a mean of 70 with σ=6\sigma = 6 is 70−1.5(6)=6170 - 1.5(6) = 61.

Worked examples

Worked exampleExample 1: a back-to-back stemplot

A biologist measured the lengths, in centimeters, of 16 fish caught in each of two lakes.

Lake ALake B18  99  8  7  7  6  5  4  3  120  0  1  1  2  2  3  4  5  6  88  5  3  2  1  0  031  649\begin{array}{r|c|l} \text{Lake A} & & \text{Lake B} \\ \hline & 1 & 8\;9 \\ 9\;8\;7\;7\;6\;5\;4\;3\;1 & 2 & 0\;0\;1\;1\;2\;2\;3\;4\;5\;6\;8 \\ 8\;5\;3\;2\;1\;0\;0 & 3 & 1\;6 \\ & 4 & 9 \end{array}

Key: 1 ∣ 2 ∣ 01 \,|\, 2 \,|\, 0 means a Lake A fish of 21 cm and a Lake B fish of 20 cm.

Lake A: median 28.5, Q1=25.5Q_1 = 25.5, Q3=31.5Q_3 = 31.5. Lake B: median 22.5, Q1=20.5Q_1 = 20.5, Q3=27Q_3 = 27. Compare the distributions of fish length in the two lakes.

Show solution

Shape. The Lake A lengths are roughly symmetric, piled up in the high 20s and low 30s. The Lake B lengths are skewed right: most are from 18 to 28 cm, with a few long fish trailing off to 49 cm.

Center. The median length of Lake A fish (28.5 cm) is greater than that of Lake B fish (22.5 cm).

Variability. The middle halves are spread about equally: IQRA=31.5−25.5=6\text{IQR}_A = 31.5 - 25.5 = 6 cm and IQRB=27−20.5=6.5\text{IQR}_B = 27 - 20.5 = 6.5 cm. But the overall spread of Lake B is much larger: its range is 49−18=3149 - 18 = 31 cm, against 38−21=1738 - 21 = 17 cm for Lake A. The difference is all in Lake B's long right tail.

Unusual features. For Lake B, the upper fence is 27+1.5(6.5)=36.7527 + 1.5(6.5) = 36.75 cm, so the 49 cm fish is an outlier, and there is a gap from 37 to 48 cm. For Lake A, the fences are 25.5−9=16.525.5 - 9 = 16.5 and 31.5+9=40.531.5 + 9 = 40.5 cm, and every length is inside them: no outliers.

Worked exampleExample 2: who did better, relative to their event?

In a regional track league this season, 100-meter times had mean 12.8 seconds and standard deviation 0.5 seconds, and long-jump distances had mean 6.2 meters and standard deviation 0.4 meters. Ana ran the 100 meters in 12.1 seconds; Ben long-jumped 6.9 meters. Which performance was more impressive compared with others in the same event?

Show solution

The values are in different units and "good" points in opposite directions, so compare their z-scores, using the league's mean and standard deviation for each event.

zAna=12.1−12.80.5=−1.4,zBen=6.9−6.20.4=1.75.z_{\text{Ana}} = \frac{12.1 - 12.8}{0.5} = -1.4, \qquad z_{\text{Ben}} = \frac{6.9 - 6.2}{0.4} = 1.75.

Ana's time is 1.4 standard deviations below the mean 100-meter time, which is good because lower times are faster. Ben's jump is 1.75 standard deviations above the mean long-jump distance. Ben's performance is farther from its event's mean, in the better direction, so Ben's performance was more impressive relative to the league.

Worked exampleExample 3: parallel boxplots and a claim (exam style)

A furniture company randomly assigned 60 volunteers to assemble the same bookshelf, 30 with printed instructions and 30 with video instructions, and recorded each assembly time in minutes.

Parallel boxplots of assembly time in minutes on one scale from 10 to 60. Printed instructions: whiskers from 18 to 52, box from 26 to 38, median 31, no outliers. Video instructions: whiskers from 15 to 33, box from 20 to 27, median 23, and two outliers at 41 and 44.

The means and standard deviations were: printed, xˉ=32.0\bar{x} = 32.0 and s=8.1s = 8.1 minutes; video, xˉ=24.6\bar{x} = 24.6 and s=6.3s = 6.3 minutes.

(a) Compare the distributions of assembly time for the two groups. (b) The company claims that most people using the video finish faster than a typical person using printed instructions. Do the boxplots support this claim? Justify your answer.

Show solution

(a) Center: the median assembly time with video instructions (23 minutes) is less than with printed instructions (31 minutes), and so is the mean (24.6 against 32.0 minutes).

Variability: times with printed instructions are more variable. Their IQR is 38−26=1238 - 26 = 12 minutes against 27−20=727 - 20 = 7 minutes for video, their range is 52−18=3452 - 18 = 34 minutes against 44−15=2944 - 15 = 29 minutes, and their standard deviation is larger (8.1 against 6.3 minutes).

Shape: both distributions are slightly skewed right. In each, the upper part of the box and the upper whisker are longer than the lower ones, and the video group's outliers are on the high side.

Outliers: the video group has two high outliers, 41 and 44 minutes (beyond its upper fence of 27+1.5(7)=37.527 + 1.5(7) = 37.5 minutes); the printed group has none, since its fences are 26−18=826 - 18 = 8 and 38+18=5638 + 18 = 56 minutes.

(b) Yes. The third quartile of the video times, 27 minutes, is below the median of the printed times, 31 minutes. So at least 75% of the video group finished in 27 minutes or less, faster than the typical (median) printed-instruction time of 31 minutes. Since 75% is a majority, the boxplots support the claim. Because the treatments were randomly assigned, a difference this large is evidence that the instructions caused it (Topic 1.10 explains why).

Where students lose points

On the exam

Comparison questions can come with parallel boxplots, side-by-side dotplots, back-to-back stemplots or a table of summary statistics. A complete answer compares every feature the question names, with numbers and comparative words, in context. A z-score question expects the formula with values substituted, the z-scores themselves, and a sentence comparing them in context.

Check yourself

  1. Question 1

    Scores on a statewide reading test have mean 74 and standard deviation 8. What is the z-score of a student who scored 62?

    1. A

      −1.5-1.5

    2. B

      1.51.5

    3. C

      −12-12

    4. D

      −0.67-0.67

    Show answer

    A

    z=62−748=−128=−1.5z = \frac{62 - 74}{8} = \frac{-12}{8} = -1.5: the score is 1.5 standard deviations below the mean. C forgets to divide by the standard deviation, B drops the sign, and D divides the standard deviation by the difference instead of the other way around.

  2. Question 2

    Parallel boxplots of daily sales at two shops show: Shop A, Q1=40Q_1 = 40, median 50, Q3=60Q_3 = 60; Shop B, Q1=42Q_1 = 42, median 45, Q3=48Q_3 = 48. Neither has outliers. Which statement is supported by the boxplots?

    1. A

      Shop A has more days with sales above 50 than Shop B has

    2. B

      The middle half of Shop B's daily sales is less spread out than the middle half of Shop A's

    3. C

      Shop B's sales distribution has a gap that Shop A's does not

    4. D

      Shop A recorded sales on more days than Shop B

    Show answer

    B

    Shop B's IQR is 48 − 42 = 6, less than Shop A's 60 − 40 = 20, so its middle half is less spread out. A and D need counts, which boxplots don't show (the shops could have recorded different numbers of days), and C needs a gap, which boxplots hide.

  3. Question 3

    A school has 24 students in its robotics club and 96 in its band. A teacher makes histograms of weekly practice hours for each group with frequency (count) on the vertical axis. Why should the histograms use relative frequency instead, to compare the groups?

    Show answer

    Because the groups differ in size, the band's bars will be about four times as tall as the club's even if the two distributions have the same shape and proportions. Relative frequency shows the proportion of each group in each class, which puts both groups on the same scale.

    A comparison of distributions is about the share of each group at each value, not the raw number of people. With counts, the larger group looks like it has more of everything.

  4. Question 4

    The weights of a breed of dog have mean 150 ounces at 8 weeks of age, with standard deviation 20 ounces. A puppy's weight has a z-score of 2.2. Find its weight and interpret the z-score.

    Show answer

    Its weight is 150+2.2(20)=194150 + 2.2(20) = 194 ounces. The puppy's weight is 2.2 standard deviations above the mean weight of 8-week-old puppies of this breed.

    Rearranging z=x−μσz = \frac{x - \mu}{\sigma} gives x=μ+zσx = \mu + z\sigma. A positive z-score means above the mean, and the interpretation names the variable and the population.

Go deeper