HookThe stock index that rounded itself to death
In January 1980 the Vancouver Stock Exchange launched a shiny new index at exactly 1000 points. Over the next 22 months the market it tracked was roughly flat — yet by November 1983 the index read 524.811, seemingly half the market's value gone. The culprit was not a crash but arithmetic: the index was recomputed after every trade, around 2,800 times a day, and each time the result was truncated to three decimal places rather than rounded. Each truncation threw away a sliver between 0 and 0.001 points — worth about half a thousandth of a point on average, invisible individually, but repeated nearly three thousand times daily, every day, in the same direction. When consultants recalculated the index properly over a weekend, it reopened at 1098.892: the exchange had quietly shredded 574 points, one truncation at a time.
To see disaster coming in a system like that, you need the machinery of this section. Each tiny error is a continuous random variable — it can take any value in an interval, so probability lives not in a list of outcomes but in a probability density function whose integrals give probabilities. From the pdf flow all the summaries: the cumulative distribution function, the median and quartiles, and the mean and variance via \(\mathrm{E}(X)=\int xf(x)\,dx\). The truncation error itself is the section's simplest model, the rectangular distribution, and the final act — the expectation and variance of a sum of independent variables — is exactly the calculation that prices 2,800 daily slivers at 574 points. By the end you can audit the Vancouver fiasco yourself, to the point.
ModelFrom probability bars to probability density
A discrete random variable carries its probability in lumps: \(P(X=x)\) is a genuine number for each listed value, and the lumps sum to 1. A continuous variable — a lifetime, an error, a waiting time — has uncountably many possible values, so lumps are impossible: for any single point, \(P(X=x)=0\). Probability instead has a density, a function \(f(x)\) whose value is not a probability but a probability-per-unit-length, exactly as a metal rod has mass per unit length rather than mass at a point. Probabilities are recovered by integration:
\[P(a\le X\le b)=\int_a^b f(x)\,dx,\]
and a valid pdf needs just two credentials: \(f(x)\ge 0\) everywhere, and \(\int_{-\infty}^{\infty}f(x)\,dx=1\). Note what is not required — \(f(x)\) may happily exceed 1 on a short interval, because it is a density, not a probability. And because single points carry zero probability, \(P(X<a)=P(X\le a)\): strict and non-strict inequalities are interchangeable for continuous variables, which they never were for discrete ones. AQA also expects you to handle hybrids — a variable can be part discrete, part continuous, like daily rainfall (a genuine lump of probability at exactly zero, a density over positive amounts) or an insurance payout (a lump at £0 for no claim, continuous above). For these, the lumps and the integral of the density must together sum to 1.
The working lifetime in years, \(X\), of a sensor is modelled by \(f(x)=kx^2\) for \(0\le x\le 2\) and \(f(x)=0\) otherwise. Step 1 — find \(k\): \(\int_0^2 kx^2\,dx=k\left[\frac{x^3}{3}\right]_0^2=\frac{8k}{3}=1\), so \(k=\frac{3}{8}\). Step 2 — a probability is an integral: \(P(1\le X\le 1.5)=\int_1^{1.5}\frac{3x^2}{8}\,dx=\left[\frac{x^3}{8}\right]_1^{1.5}=\frac{3.375-1}{8}=0.297\) (3 s.f.). Step 3 — sanity checks that examiners reward: \(f\ge 0\) on the interval, the total integrates to 1, and \(P(X=1.5)\) exactly is 0 — only intervals carry probability. This sensor pdf now runs through the whole section.
ModelThe cumulative distribution function — probability's running total
The cumulative distribution function converts the density into a running total:
\[F(x)=P(X\le x)=\int_{-\infty}^{x}f(t)\,dt,\qquad f(x)=\frac{d}{dx}F(x),\]
so integration turns \(f\) into \(F\) and differentiation turns \(F\) back into \(f\) — a two-way street you must be able to drive in both directions, including the dummy-variable hygiene of integrating \(f(t)\) up to a limit of \(x\). A cdf climbs from 0 to 1, never decreases, and must be defined piecewise for all real \(x\): 0 below the support, the accumulating integral across it, 1 above. Its virtues are practical. Interval probabilities become subtractions, \(P(a<X\le b)=F(b)-F(a)\), with no fresh integration. And the position summaries drop out as equation-solving: the median \(m\) satisfies \(F(m)=\frac{1}{2}\), the lower and upper quartiles solve \(F(Q_1)=\frac{1}{4}\) and \(F(Q_3)=\frac{3}{4}\), and any percentile follows the same pattern. For a skewed density the median and the mean part company — the mean is dragged toward the long tail — and quoting both, with a sentence about which way the skew pulls, is a standard interpretation mark.
For the sensor, \(F(x)=\int_0^x\frac{3t^2}{8}\,dt=\frac{x^3}{8}\) for \(0\le x\le 2\), with \(F(x)=0\) for \(x<0\) and \(F(x)=1\) for \(x>2\). Step 1 — median: \(\frac{m^3}{8}=\frac{1}{2}\Rightarrow m^3=4\Rightarrow m=\sqrt[3]{4}=1.587\) years. Step 2 — quartiles: \(Q_1^3=2\Rightarrow Q_1=\sqrt[3]{2}=1.260\) and \(Q_3^3=6\Rightarrow Q_3=\sqrt[3]{6}=1.817\), so the interquartile range is \(1.817-1.260=0.557\) years. Step 3 — read the shape: the density \(\frac{3x^2}{8}\) rises toward \(x=2\), so probability piles up late; the median sits well above the interval midpoint of 1, and the lower quartile is further from the median (0.327 below) than the upper is (0.230 above) — a left-skewed lifetime distribution in which early failures are rare but not impossible.
ModelMean, variance, and what happens under a change of units
Expectation for continuous variables replaces the discrete \(\sum x_ip_i\) with its integral twin:
\[\mathrm{E}(X)=\int xf(x)\,dx,\qquad \mathrm{E}(X^2)=\int x^2f(x)\,dx,\qquad \mathrm{Var}(X)=\mathrm{E}(X^2)-\big[\mathrm{E}(X)\big]^2,\]
all integrals running over the support. The variance shortcut \(\mathrm{E}(X^2)-[\mathrm{E}(X)]^2\) is all but mandatory in practice — integrating \((x-\mu)^2f(x)\) directly triples the algebra for no reward. Linear functions transform exactly as in the discrete case, because the rules are facts about expectation itself, not about any particular distribution:
\[\mathrm{E}(aX+b)=a\mathrm{E}(X)+b,\qquad \mathrm{Var}(aX+b)=a^2\mathrm{Var}(X).\]
The asymmetry is the point to internalise. Adding a constant \(b\) shifts every outcome equally, moving the mean but leaving the spread untouched — so \(b\) vanishes from the variance. Scaling by \(a\) stretches deviations by \(a\), and variance, being built from squared deviations, picks up \(a^2\) — while the standard deviation scales by \(|a|\). Currency conversions, temperature-scale changes and unit swaps are all this one lemma wearing different costumes.
Sensor again, \(f(x)=\frac{3x^2}{8}\) on \([0,2]\). Step 1 — mean: \(\mathrm{E}(X)=\int_0^2 x\cdot\frac{3x^2}{8}\,dx=\frac{3}{8}\left[\frac{x^4}{4}\right]_0^2=\frac{3}{8}\times 4=1.5\) years. Step 2 — second moment: \(\mathrm{E}(X^2)=\int_0^2\frac{3x^4}{8}\,dx=\frac{3}{8}\times\frac{32}{5}=2.4\). Step 3 — variance: \(\mathrm{Var}(X)=2.4-1.5^2=0.15\), so \(\sigma=\sqrt{0.15}=0.387\) years. Step 4 — note \(\mathrm{E}(X)=1.5<1.587=\) median, the mean tugged below the median by the thin left tail of early failures. Step 5 — a linear function: suppose each sensor earns \(Y=10X+5\) pounds of value (a £5 fitting fee plus £10 per year of service). Then \(\mathrm{E}(Y)=10\times 1.5+5=£20\) and \(\mathrm{Var}(Y)=10^2\times 0.15=15\), so \(\sigma_Y=£3.87\) — the +5 moved the mean only, and the standard deviation scaled by 10, not 100.
MechanismThe rectangular distribution — total ignorance between two walls
The rectangular (uniform) distribution \(X\sim\mathrm{U}(a,b)\) is the flat pdf
\[f(x)=\frac{1}{b-a},\quad a\le x\le b,\]
and zero elsewhere — the model for a value known to lie between two walls with no reason to favour any point between them. Its natural habitat is quantisation: when a value is rounded to the nearest unit, the rounding error is modelled as \(\mathrm{U}(-0.5,0.5)\) in units of the last digit; when it is truncated, as Vancouver's index was, the discarded amount is \(\mathrm{U}(0,1)\) in those units — all loss, no gain. Probabilities need no integration (they are just lengths over \(b-a\)), and the cdf is the ramp \(F(x)=\frac{x-a}{b-a}\). AQA requires the mean and variance with proofs, which are two clean integrals. Mean: \(\mathrm{E}(X)=\int_a^b\frac{x}{b-a}\,dx=\frac{b^2-a^2}{2(b-a)}=\frac{a+b}{2}\), the midpoint, as symmetry demands. Variance: \(\mathrm{E}(X^2)=\int_a^b\frac{x^2}{b-a}\,dx=\frac{b^3-a^3}{3(b-a)}=\frac{a^2+ab+b^2}{3}\), and then
\[\mathrm{Var}(X)=\frac{a^2+ab+b^2}{3}-\left(\frac{a+b}{2}\right)^2=\frac{4a^2+4ab+4b^2-3a^2-6ab-3b^2}{12}=\frac{(b-a)^2}{12}.\]
That 12 in the denominator is worth memorising as a fact and reproducing as a proof: examiners set both versions, and the difference-of-cubes factorisation \(b^3-a^3=(b-a)(a^2+ab+b^2)\) is the step that separates the two.
A digital scale reports mass to the nearest gram, so the reporting error is \(E\sim\mathrm{U}(-0.5,0.5)\) grams. Step 1 — from the proved formulae: \(\mathrm{E}(E)=\frac{-0.5+0.5}{2}=0\) and \(\mathrm{Var}(E)=\frac{(0.5-(-0.5))^2}{12}=\frac{1}{12}=0.0833\), so \(\sigma=0.289\) g. Step 2 — a probability is a length: \(P(|E|>0.3)=P(E<-0.3)+P(E>0.3)=\frac{0.2}{1}+\frac{0.2}{1}=0.4\). Step 3 — the Vancouver contrast: a truncation error in units of the third decimal place is \(\mathrm{U}(-0.001,0)\) index points, with mean \(-0.0005\), not zero. Rounding errors are unbiased and tend to cancel; truncation errors all point the same way — which is why one index bled and your scale does not.
CaseSums of independent variables — how 574 points walked out the door
The final tool is the algebra of sums. For any two random variables, expectations add: \(\mathrm{E}(X+Y)=\mathrm{E}(X)+\mathrm{E}(Y)\). For independent variables, variances add too:
\[\mathrm{Var}(X+Y)=\mathrm{Var}(X)+\mathrm{Var}(Y),\]
and by extension \(\mathrm{Var}(X-Y)=\mathrm{Var}(X)+\mathrm{Var}(Y)\) as well — subtracting an independent noisy quantity adds its noise, never removes it. Two consequences do most of the exam work. First, variances add but standard deviations do not: for \(n\) independent copies of a variable, the sum has mean \(n\mu\) and variance \(n\sigma^2\), so its standard deviation grows like \(\sqrt{n}\,\sigma\), slower than the mean's \(n\mu\). Second, watch the distinction between \(2X\) — the same measurement doubled, variance \(4\sigma^2\) — and \(X_1+X_2\), two independent measurements added, variance \(2\sigma^2\). They have identical means and different spreads, and confusing them is the classic trap.
Now audit Vancouver. Each truncation error was, in effect, \(\mathrm{U}(-0.001,0)\): mean \(-0.0005\) points, variance \(\frac{0.001^2}{12}=8.3\times 10^{-8}\). Independence across trades is reasonable, so a day of 2,800 truncations drifts by \(2800\times(-0.0005)=-1.4\) points, with standard deviation \(\sqrt{2800\times 8.3\times 10^{-8}}=0.015\) points — a bias a hundred times its own noise, utterly systematic. Over the roughly 410 trading days from launch to the November 1983 recalculation: \(410\times(-1.4)\approx -574\) points. The reported correction was 574.081. The model is three lines of this section's algebra, and it prices the fiasco to the point.
VocabularyKey terms the mark scheme pays for
TrapsMisconceptions that cost marks
ExamWhat examiners want
Nearly every question in this topic is a chain built on one pdf, and the chain has a fixed grammar: find the constant from \(\int f=1\); build \(F(x)\) as a full piecewise definition (0 below, formula across, 1 above — the piecewise statement itself carries a mark); solve \(F(m)=\frac{1}{2}\) for the median; integrate for \(\mathrm{E}(X)\) and \(\mathrm{E}(X^2)\); assemble \(\mathrm{Var}(X)\) by the shortcut. Show limits on every integral and use a dummy variable \(t\) inside any integral whose upper limit is \(x\) — both are things mark schemes look for explicitly. Attach units to every mean, median and standard deviation, and remember the variance carries squared units.
Two proofs are standing exam furniture: the rectangular distribution's mean and variance (know the difference-of-cubes step), and be ready to verify a proposed \(F\) by differentiating back to \(f\) — differentiation is the cheap direction and works as a check on any cdf you construct. In modelling parts, name the assumption before using additivity: 'assuming the errors are independent, variances add'. And for interpretation marks, compare mean with median and state the direction of skew, or read a probability from the cdf rather than re-integrating — examiners reward candidates who treat \(F\) as the working object it is, not a decorative by-product.