Mathematics RU

Practice · Chapter 49

Statistics: averages, errors, tests

The mean, the median and the spread, the standard error, a confidence interval and the sample size a poll needs, and at the top level the traps of hypothesis testing.

How to solve it

Statistics answers what a sample says about a large population, and how far to trust it. The mean and the median describe the centre, the standard deviation the spread, and the standard error the precision of the mean: it shrinks like the square root of the sample size.

Step by step

  1. The mean is the sum over $n$. The median is the middle of the sorted list (for even $n$, the average of the two middle numbers).
  2. The sample standard deviation: add the squared deviations from the mean, divide by $n - 1$, take the root.
  3. The standard error of the mean is $\frac{s}{\sqrt n}$; a 95% interval is the mean $\pm 1.96$ standard errors.
  4. The sample size for a proportion near $50\%$: the margin is $E = 1.96\sqrt{\frac{0.25}{n}}$, so $n = \frac{1.96^2 \cdot 0.25}{E^2}$, rounded up.
  5. With several tests the chance of at least one false alarm is $1 - (1 - \alpha)^k$.
The sample standard deviation, the spread of single values. Divide by $n - 1$: one degree of freedom went to the mean. The standard error, the spread of the mean itself. Example: $15, 12, 5, 6, 13, 9$: the mean is $10$, the squared deviations add to $25 + 4 + 25 + 16 + 9 + 1 = 80$, $s = \sqrt{\frac{80}{5}} = 4$.

Common mistakes

  • Dividing by $n$ instead of $n - 1$ in the sample deviation.
  • Confusing the standard deviation (the spread of the data) with the standard error (the precision of the mean).
  • Finding a median without sorting the numbers.
  • Thinking a false alarm is nearly impossible in five tests at the $0.05$ level: $1 - 0.95^5 \approx 0.23$.

Example