Representation and measures of data
A-Level Mathematics · Probability & Statistics 1
Histograms with unequal classes
The area of each bar represents the frequency, so the vertical axis is frequency density:
$$\text{frequency density}=\frac{\text{frequency}}{\text{class width}}$$Plotting frequency itself against unequal widths distorts the picture — that is the whole reason frequency density exists.
Cumulative frequency
Plot cumulative frequency against the upper class boundary, never the midpoint. From the curve read off the median ($\tfrac{1}{2}n$), the quartiles ($\tfrac{1}{4}n$ and $\tfrac{3}{4}n$), and hence the interquartile range.
Mean and standard deviation
$$\bar x=\frac{\sum fx}{\sum f},\qquad \text{Var}=\frac{\sum fx^{2}}{\sum f}-\bar x^{2}$$For grouped data, $x$ is the class midpoint, so mean and variance are estimates: the raw values inside each class are no longer known.
Coding
If $y=ax+b$ then $\bar y=a\bar x+b$ but $\sigma_{y}=|a|\sigma_{x}$ — the shift $b$ moves the data without spreading it, so it does not affect the standard deviation.
Worked example: estimating the mean and standard deviation from grouped data
The times $t$ minutes of $80$ people are recorded as follows. Estimate the mean and the standard deviation.
| $t$ | $0\le t<10$ | $10\le t<20$ | $20\le t<40$ | $40\le t<70$ |
|---|---|---|---|---|
| Frequency | $12$ | $28$ | $26$ | $14$ |
Solution
Step 1 — take the midpoint of each class. This is the very step that turns the answer into an estimate: we assume every value in a class lies at the middle of the class.
| Midpoint $x$ | $5$ | $15$ | $30$ | $55$ |
|---|---|---|---|---|
| $f$ | $12$ | $28$ | $26$ | $14$ |
Step 2 — two sums.
$$\sum fx=12(5)+28(15)+26(30)+14(55)=60+420+780+770=2030$$$$\sum fx^{2}=12(25)+28(225)+26(900)+14(3025)=300+6300+23400+42350=72\,350$$Step 3 — mean and variance.
$$\bar t=\frac{2030}{80}=25.4\ \text{minutes}$$$$\text{Var}=\frac{72\,350}{80}-25.375^{2}=904.375-643.891=260.484$$$$\sigma=\sqrt{260.484}=16.1\ \text{minutes}$$Note that you should keep $25.375$ unrounded when squaring, and round only on the last line. Rounding $\bar t$ to $25.4$ before squaring pushes error into the third digit of $\sigma$ — and Paper 5 is marked to three significant figures.
Worked example: coding data
A data set $x$ has mean $8$ and standard deviation $3$. Let $y=2x+5$. Find the mean and standard deviation of $y$, and explain why the two quantities are affected differently.
Solution
Mean: every linear transformation passes straight through the mean:
$$\bar y=2(8)+5=21$$Standard deviation: only the multiplier has an effect:
$$\sigma_{y}=|2|(3)=6$$Why they differ. Adding $5$ is a shift of the whole data set five units to the right: every gap between values stays the same, so the spread is unchanged. Multiplying by $2$ is a stretch: every gap doubles, so the spread doubles too.
In short: the mean measures position so it sees both operations; the standard deviation measures spread so it sees only the stretch. Anyone who writes $\sigma_{y}=2(3)+5=11$ has given the added constant a role it does not have.