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.

0 10 20 40 70 1 2 3 f=12 f=28 f=26 f=14 frequency density Area of the bar = frequency, not the height
Why the $20$–$40$ class looks lower than the $10$–$20$ class even though they contain nearly the same amount of data. The $10$–$20$ class has $28$ values packed into a width of $10$; the $20$–$40$ class has $26$ values spread over a width of $20$. The height is the density, so the second class is only half as tall even though the frequency is nearly the same. Reading backwards from the picture: to get the frequency, multiply the height by the width, and the last bar — low but very wide — still contains $14$ values. Cambridge often gives a figure like this and then asks for the frequency of the widest bar, exactly where the naked eye misreads.

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.

Common mistake

Plotting the cumulative frequency at the class midpoint instead of the upper boundary. Cumulative frequency answers the question "how many values are less than or equal to this mark", and that question makes sense only at the upper boundary: for the class $10\le t<20$ the cumulative figure $40$ says there are $40$ values below $20$ — not below $15$. Plotting at the wrong mark shifts the whole curve left by half a class, and every value read from it afterwards — median, quartiles, interquartile range — is off in the same direction. This is a systematic error: every number still looks reasonable, the relationships between them are still right, only the whole result is displaced. There is no way to detect it other than doing it correctly from the start.

Key takeaway

The three diagrams in this topic answer three different questions: the histogram shows the shape of the distribution, the cumulative frequency curve gives percentile positions, the box plot summarizes the five numbers and highlights outliers. Choosing the wrong diagram means answering correctly a question the paper did not ask.

← Newton's laws, momentum, energy and power · All A-Level Mathematics lessons · Practice A-Level Mathematics questions (free, instant scoring) · Permutations, combinations and probability →