Skip to main content

Comparing Distributions

Two groups can have the same typical wait time and feel very different to riders. We will compare center and spread, then see what changes when one observation is unusually large.

  • Center and spread: Summaries of a typical location and the amount of variation in a distribution.

Core ideas​

Shape and center​

Describe symmetry or skew and choose a center that helps summarize it. The mean balances values numerically, while the median marks the middle of the ordered data.

Measures of spread​

The interquartile range is Q3−Q1Q_3-Q_1. Standard deviation summarizes how far values typically lie from the mean.

Outliers​

Changing 2,3,42,3,4 to 2,3,402,3,40 moves the mean from 33 to 1515. The median remains 33.

Essential example​

Use the eight illustrative wait times 2,2,3,4,5,5,6,92,2,3,4,5,5,6,9 minutes. The sum is 3636 minutes, so the mean is 36/8=4.536/8=4.5 minutes. The median is also 4.54.5 minutes, halfway between the two middle observations 44 and 55. The first and third quartiles from the previous lesson are 2.52.5 and 5.55.5, so the interquartile range is 33 minutes.

Replace the final 99 with 2121. The median and quartiles stay the same under the same quartile convention. The mean rises by (21−9)/8=1.5(21-9)/8=1.5 minutes to 66 minutes. The longer right tail pulls the mean upward, while the central ranks stay fixed.

SummaryOriginalWith the longer wait
Mean4.54.5 min66 min
Median4.54.5 min4.54.5 min
Interquartile range33 min33 min
Range77 min1919 min

Compare spread around the mean​

Standard deviation uses squared distances from the mean, then takes a square root to return to the original units. For the complete set 2,4,62,4,6 minutes, the mean is 44 and the squared deviations are 4,0,44,0,4. Dividing their sum by 33 and taking the square root gives a population standard deviation of 8/3\sqrt{8/3} minutes. If estimating population spread from a sample, the usual sample formula divides by one less than the sample size.

Choose a summary with the display​

For strongly skewed data, the median and interquartile range often describe the middle more clearly. For roughly symmetric data without prominent outliers, the mean and standard deviation can be informative. A single summary can hide a gap or multiple clusters. Read it alongside the shape of the distribution.

Compare a shift with a change in spread​

Take the complete set 2,4,62,4,6 minutes. If each wait increases by three minutes, the values become 5,7,95,7,9. The mean moves from 44 to 77, but deviations from the mean remain −2,0,2-2,0,2. The standard deviation is unchanged. If each original wait doubles instead, the values become 4,8,124,8,12. Both the mean and the standard deviation double because each distance from the mean doubles.

Keep and continue​

Keep the distinction between a typical value and the variation around it. Next, examine variation around predictions that depend on another variable.

Course outline

Previous: Displaying Data

Next: Fitting and Interpreting Lines