Learn · Chapter 8

The standard normal and z-scores

Standardising, the 68-95-99.7 rule and the normal approximation to the binomial.

Standardising

Every normal distribution is the same bell drawn on a different scale. Subtract the mean and divide by the standard deviation, and any \(X \sim N(\mu, \sigma)\) becomes the standard normal \(Z \sim N(0, 1)\):

The z-score says how many standard deviations a value lies from the mean, and in which direction. \(\mu\) and \(\sigma\) here are the distribution's, the mean and spread of the process the value comes from, not the mean and standard deviation of a handful of values that happen to be at hand. \(\Phi\) is the standard normal CDF, the function a z-table prints.

Comparing unlike quantities

A courier's deliveries take on average 35 minutes with a standard deviation of 8 minutes. An online shop's baskets average £62 with a standard deviation of £15. Today one delivery took 51 minutes and one customer spent £98. Minutes and pounds cannot be compared, but their z-scores can:

The basket is further out. If both are roughly normal, a delivery at least this slow happens with probability \(P(Z > 2) = 0.0228\), about one in 44, and a basket at least this large with probability \(P(Z > 2.4) = 0.0082\), about one in 122. The basket is the more unusual event.

Try this Compare two values of your own, each against its own mean and standard deviation.

The 68-95-99.7 rule

Because every normal is the standard normal rescaled, the share within a given number of standard deviations of the mean is the same for all of them:

Rounded, that is the 68-95-99.7 rule. For the deliveries, about 68 % take between 27 and 43 minutes, 95 % between 19 and 51, and nearly all between 11 and 59. The exact multiple for 95 % is 1.96, not 2: \(P(|Z| \le 1.96) = 0.95\).

x = -1

P(-1 ≤ X ≤ 1) = 0.6827

Open this set-up in the explorer
The standard normal with the middle band, P(−1 ≤ Z ≤ 1), shaded
Try this See the three bands shaded on a normal of your choice.

Percentiles from z

Turn the standardising round to find a percentile: \(x = \mu + z\sigma\). The 90th percentile of the standard normal is \(z = 1.2816\), so 90 % of deliveries arrive within \(35 + 1.2816 \times 8 = 45.25\) minutes.

The normal approximation to the binomial

A binomial with many trials is close to a normal with the same mean and standard deviation, \(\mu = np\) and \(\sigma = \sqrt{np(1 - p)}\). Before software, this was how large binomials were computed; today it matters because it explains why so many counts look bell-shaped.

A bar at a whole number \(k\) stands for the interval from \(k - \tfrac{1}{2}\) to \(k + \tfrac{1}{2}\), so the area that matches \(P(X \le k)\) runs to \(k + \tfrac{1}{2}\). That half is the continuity correction:

An e-mail campaign goes to 200 customers, each opening it with probability 0.25, so \(\mu = 50\) and \(\sigma = 6.1237\). The chance of at most 45 opens is exactly 0.2332. The normal with the correction gives 0.2312; without it, 0.2071. The half makes the approximation more than ten times as accurate here.

k = 45

P(X ≤ 45) = 0.2332

Open this set-up in the explorer
An e-mail campaign to 200 customers, each opening with probability 0.25, with P(X ≤ 45) shaded
P(X ≤ k) for B(n, 0.3), with k a quarter of n: the corrected normal closes in on the exact answer as n grows
nkExactNormal, correctedNormal, not correctedError, corrected
510.52820.50.31280.0282
1020.38280.3650.24510.0177
2050.41640.40360.31280.0127
50120.22290.22020.17730.0027
100250.16310.16310.13760.0001
200500.06950.07130.06140.0018
Try this Watch n step up from 5 to 200 and the bars thin into the normal curve, with the error of each approximation.

When the approximation fails

The binomial is symmetric only at \(p = 0.5\); with \(p\) near 0 or 1 it is skewed, and the symmetric normal fits it badly unless \(n\) is large. A common rule of thumb asks for \(np \ge 5\) and \(n(1 - p) \ge 5\). For 20 LED bulbs with a fault rate of 0.05, \(np = 1\): the chance of no faulty bulb is exactly 0.3585, and the corrected normal gives 0.304, wrong in the second decimal. With software at hand, compute the binomial exactly; use the approximation to understand the shape.

In code

What it computes Python (scipy.stats) Excel
A z-score (51 - 35) / 8 =STANDARDIZE(51, 35, 8)
P(Z > 2.4) norm.sf(2.4) =1-NORM.S.DIST(2.4, TRUE)
P(|Z| ≤ 2) norm.cdf(2) - norm.cdf(-2) =NORM.S.DIST(2, TRUE)-NORM.S.DIST(-2, TRUE)
The 90th percentile of deliveries norm.ppf(0.9, 35, 8) =NORM.INV(0.9, 35, 8)
At most 45 opens, exactly binom.cdf(45, 200, 0.25) =BINOM.DIST(45, 200, 0.25, TRUE)
The same, by the corrected normal norm.cdf(45.5, 50, np.sqrt(200*0.25*0.75)) =NORM.DIST(45.5, 50, SQRT(200*0.25*0.75), TRUE)
Remember: A z-score, \(z = \tfrac{x - \mu}{\sigma}\), puts any normal on one scale, with the distribution's own \(\mu\) and \(\sigma\). About 68 %, 95 % and 99.7 % of values lie within 1, 2 and 3 standard deviations. A binomial with large \(n\) is close to \(N(np, \sqrt{np(1 - p)})\), and the continuity correction, a half, makes the approximation far better.

Quiz

Three questions on the chapter. Your best score is kept in this browser.

1. A delivery took 51 minutes (mean 35, standard deviation 8) and a basket was £98 (mean £62, standard deviation £15). Which is more unusual?
2. About what share of a normal lies more than 2 standard deviations from the mean?
3. Using the normal approximation to \(X \sim B(200, 0.25)\), which value of \(x\) goes into the normal CDF for \(P(X \le 45)\)?
Answer every question first.
An unhandled error has occurred. Reload 🗙

Reconnecting…

Your connection to Introduction to Probability Lab dropped, probably a Wi-Fi blip. Hold on while it reconnects.

The connection could not be restored. The page will reload in a few seconds.