Skip to main content
Back to module
Statistics Fundamentals · Probability Basics

The normal distribution

Reading38mLesson 3 of 3 in this module

Use z-scores and the normal curve to find the probability of values above, below or between limits.

Why this matters

Measurement errors, part dimensions, test scores and many biological measurements pile up in a familiar bell shape. That shape, the normal distribution, lets you answer practical questions from just two numbers: "What fraction of bolts will be out of tolerance?", "Is this lab result unusually high?", "What score puts someone in the top 5%?" It also sits underneath the confidence intervals and hypothesis tests later in this course.

The shape

A normal distribution is symmetric and bell-shaped, centred on its mean μ (mu), with spread set by its standard deviation σ (sigma). Mean, median and mode are all equal. The curve never quite touches zero, but values far from the mean are very rare.

Two normal curves with the same mean and different SDs have the same centre; the one with the bigger SD is wider and flatter. The total area under any probability curve is 1, and the area between two points is the probability of landing between them.

The 68-95-99.7 rule

For any normal distribution:

  • about 68% of values lie within 1 SD of the mean,
  • about 95% within 2 SD,
  • about 99.7% within 3 SD.

Example: adult resting heart rates in a study are roughly normal with mean 72 bpm and SD 8 bpm. About 95% of people are between 72 − 16 = 56 and 72 + 16 = 88 bpm. A reading of 100 is 3.5 SD above the mean, which is very unusual.

z-scores

A z-score says how many standard deviations a value is from the mean:

z = (x - mean) / sd
  • z = 0: exactly at the mean.
  • z = 1.5: one and a half SDs above.
  • z = −2: two SDs below.

z-scores let you compare values on different scales. A score of 82 on a test with mean 70 and SD 6 has z = 2.0. A score of 88 on a test with mean 80 and SD 8 has z = 1.0. The 82 is the more impressive result.

Turning values into z-scores is called standardising. Every normal distribution becomes the standard normal, with mean 0 and SD 1, so one table (or one function) answers every question.

From z to probability

The cumulative distribution function (CDF) gives P(Z ≤ z), the area to the left of z. Some values worth knowing:

z     P(Z <= z)
-2    0.023
-1    0.159
 0    0.500
 1    0.841
 1.645 0.950
 1.96 0.975
 2    0.977

Three question types:

P(X below a)         = cdf(z_a)
P(X above a)         = 1 - cdf(z_a)
P(X between a and b) = cdf(z_b) - cdf(z_a)

Worked example: tolerance

A machine cuts rods with mean length 50.0 mm and SD 0.2 mm. The spec is 49.6 to 50.3 mm. What fraction is in spec?

z_low  = (49.6 - 50.0) / 0.2 = -2.0    cdf = 0.0228
z_high = (50.3 - 50.0) / 0.2 =  1.5    cdf = 0.9332
in spec = 0.9332 - 0.0228 = 0.9104   (about 91%)

About 9% of rods are scrap, mostly on the long side. Centring the process at 49.95 mm would help more than buying a tighter machine.

In Python

The standard library has a normal distribution built in:

from statistics import NormalDist

rods = NormalDist(mu=50.0, sigma=0.2)
print(rods.cdf(50.3) - rods.cdf(49.6))   # 0.9104...

z = NormalDist()                          # standard normal
print(z.cdf(1.96))                        # 0.975...
print(z.inv_cdf(0.95))                    # 1.6448...: the 95th percentile

inv_cdf goes the other way: from a probability to the value that has that much area to its left.

When the normal model does not fit

Not everything is normal. Incomes, wait times and file sizes are right-skewed; counts of rare events are not bell-shaped at all. Always look at a histogram before you use normal probabilities. If the data is clearly skewed, the 68-95-99.7 rule and z-table answers will be wrong, sometimes badly in the tails.

Common mistakes

  • Using normal probabilities on skewed data.
  • Forgetting 1 − when the question asks for "above".
  • Dividing by the variance instead of the SD in the z formula.
  • Reading the table as the area to the right when it gives the area to the left.

Quick recap

  • Normal = symmetric bell set by mean and SD.
  • 68-95-99.7 within 1, 2, 3 SDs.
  • z = (x − mean) / sd; the CDF turns z into a probability.
  • Below: cdf. Above: 1 − cdf. Between: difference of two cdfs.

Try it

In the Do tab, write the z-score formula and use it to compute a tolerance yield.

Also in this lesson: