Unit 1 · Topic 1.7 Beta

Summary Statistics for One Quantitative Variable

5 min read · freeNot practiced

Topic 1.6 described center and spread by eye. This topic gives them numbers: the mean and median for center; the range, IQR and standard deviation for spread; quartiles and percentiles for position; and two rules for deciding what counts as an outlier. The key idea running through all of them is which summaries an extreme value can push around.

Measures of center: mean and median

The mean is the sum of the values divided by how many there are. For a sample it is written x¯\bar{x} ("x-bar"):

x¯=∑xin\bar{x} = \frac{\sum x_i}{n}

The median is the middle of the ordered values. With an odd number of values it is the middle one; with an even number it is the average of the two middle ones. Half the data are at or below the median.

Mean and median. The battery lives, in hours, of 12 phones in order: 7.2, 8.1, 8.4, 8.9, 9.0, 9.3, 9.5, 9.8, 10.1, 10.4, 10.6, 14.9.

Mean: x¯\bar{x}=7.2+8.1+⋯+14.912= \frac{7.2 + 8.1 + \cdots + 14.9}{12}=116.212= \frac{116.2}{12}=9.68= 9.68 hours.

Median: n=12n = 12 is even, so average the 6th and 7th values: 9.3+9.52=9.4\frac{9.3 + 9.5}{2} = 9.4 hours.

Two dotplots of battery life in hours on a scale from 7 to 15. Top: eleven phones from 7.2 to 10.6 hours, with median 9.30 and mean 9.21 close together. Bottom: the same phones plus one that lasts 14.9 hours; the median moves only to 9.40 while the mean moves to 9.68, pulled toward the large value.
Figure 1. One long-lasting phone pulls the mean up by almost half an hour; the median moves by 0.1 hour. LevlPrep original diagram.

Why are they different? The mean uses every value, so the one phone at 14.9 hours drags it up. The median only cares about order: make that phone last 30 hours and the median stays at 9.4. A summary that extreme values barely change is called resistant. The median is resistant; the mean is not. So the mean is pulled toward a long tail: in a right-skewed distribution the mean is usually larger than the median, and in a left-skewed one it is usually smaller.

Quartiles, percentiles and the IQR

The quartiles split the ordered data into quarters. Q1Q_1 is the median of the lower half and Q3Q_3 is the median of the upper half. When n is odd, leave the median itself out of both halves (this is the method the exam uses, and the one technology here uses).

The interquartile range, IQR=Q3−Q1\text{IQR} = Q_3 - Q_1, is the spread of the middle half of the data. The range is maximum minus minimum. Both are single numbers: write "the range is 7.7 hours", not "the range is 7.2 to 14.9".

A percentile gives position: the pth percentile is the value with p% of the data at or below it. Q1Q_1 is about the 25th percentile, the median the 50th, Q3Q_3 the 75th. A score at the 80th percentile is not 80% correct; it is a score that 80% of the scores are at or below.

Standard deviation

The standard deviation measures the typical distance of the values from the mean. Its recipe: find each distance from the mean, square it, add the squares, divide by n−1n - 1, and take the square root.

s=∑(xi−x¯)2n−1s = \sqrt{\frac{\sum (x_i - \bar{x})^2}{n - 1}}

Why square? The distances above and below the mean always add to 0, so they would cancel. Squaring makes each one count. Why divide by n−1n - 1 and not nn? A sample’s values sit a little closer to their own mean x¯\bar{x} than to the population mean, so the squared distances run a little small; dividing by n−1n - 1 makes up for that. The square of the standard deviation, s2s^2, is the variance.

A standard deviation by hand. The values 4, 6, 11 have mean x¯=213=7\bar{x} = \frac{21}{3} = 7.

Distances: 4−7=−34 - 7 = -3, 6−7=−16 - 7 = -1, 11−7=411 - 7 = 4. Squares: 9, 1, 16, which add to 26.

ss=263−1= \sqrt{\frac{26}{3 - 1}}=13= \sqrt{13}=3.61= 3.61. In words: the values are typically about 3.6 away from their mean of 7.

For the 12 phones, technology gives s=1.91s = 1.91 hours: battery lives typically differ from the mean of 9.68 hours by about 1.9 hours.

The standard deviation is 0 only when every value is the same, and it is not resistant: one far-out value adds a huge squared distance. For a whole population the mean and standard deviation are written μ\mu and σ\sigma; for a sample, x¯\bar{x} and ss.

Two rules for outliers

  • The 1.5×IQR1.5 \times \text{IQR} rule. A value is an outlier if it is below Q1−1.5×IQRQ_1 - 1.5 \times \text{IQR} or above Q3+1.5×IQRQ_3 + 1.5 \times \text{IQR}. These two cutoffs are the fences.
  • The 2 standard deviation rule. A value more than 2 standard deviations from the mean is flagged as unusual.

Use the fences. For the 12 phones: lower half 7.2 to 9.3, so Q1Q_1=8.4+8.92= \frac{8.4 + 8.9}{2}=8.65= 8.65; upper half 9.5 to 14.9, so Q3Q_3=10.1+10.42= \frac{10.1 + 10.4}{2}=10.25= 10.25. IQR=1.6\text{IQR} = 1.6.

Lower fence: 8.65−1.5(1.6)=6.258.65 - 1.5(1.6) = 6.25. Upper fence: 10.25+1.5(1.6)=12.6510.25 + 1.5(1.6) = 12.65.

Only 14.9 hours is beyond a fence, so it is the one outlier. In context: "The phone that lasted 14.9 hours is an outlier, since it is above the upper fence of 12.65 hours."

Which summaries to report

ResistantNot resistant
Centermedianmean
SpreadIQRstandard deviation, range
Report whenthe distribution is skewed or has outliersthe distribution is roughly symmetric with no outliers

Changing units

If you add the same constant to every value, every measure of center and position (mean, median, quartiles) shifts by that constant, and every measure of spread (range, IQR, standard deviation) stays the same: the values all move together. If you multiply every value by a constant, center, position and spread are all multiplied by it. Five plants grew 4, 5, 6, 8 and 12 inches, with mean 7 and standard deviation 3.16 inches. In centimeters (×2.54\times 2.54) the mean is 7×2.54=17.787 \times 2.54 = 17.78 cm and the standard deviation is 3.16×2.54=8.033.16 \times 2.54 = 8.03 cm.

Spot a mistake on this page?