The bell curve (normal distribution)
Read these first if they are new to you
The idea in one paragraph
Many measurements cluster around a typical value and thin out evenly on both sides: heights of adults, errors in a measurement, test scores. Their histogram has a bell shape. The normal distribution is the exact bell. Two numbers fix it: the mean puts its center, and the standard deviation sets its width. About 68% of draws land within one standard deviation of the mean, and about 95% within two. Programs that need random noise usually draw it from this bell.
Values pile up in the middle and thin out evenly on both sides
Measure the height of a thousand adults and sort them into bins, one bin per centimeter. Most heights fall near the average, fewer a little away from it, and very few far away. The bars form a hill with a rounded top and two tails that fade out. The same shape appears whenever a value is the sum of many small, separate effects that push it up or down.
The normal distribution, also called the Gaussian or the bell curve, is the smooth curve that such histograms approach. It is a distribution: it says how likely each value is. The height of the curve at a value says how densely the draws pile up there, and the area under the curve between two values is the chance that a draw lands between them. The total area is 1.
Two numbers describe a normal distribution completely. The mean μ (mu) is the center, where the curve peaks. The standard deviation σ (sigma) is the width: the typical distance of a draw from the mean. The mean-and-spread unit shows how to compute both from a list of numbers.
68, 95 and 99.7 percent fall within one, two and three standard deviations
Every normal distribution has the same proportions once you measure in standard deviations. About 68% of draws land within 1 σ of the mean, about 95% within 2 σ, and about 99.7% within 3 σ. So a value 3 standard deviations from the mean is rare: about 3 draws in 1000 are that far out.
Test scores follow a bell with mean 70 and standard deviation 10.
- One σ each side: 70 − 10 = 60 to 70 + 10 = 80. About 68% of students score in this range.
- Two σ each side: 50 to 90. About 95% score in this range.
- So about 5% score outside 50 to 90. The bell is symmetric, so half of those, about 2.5%, score above 90.
Your turn. Adult heights in some group have mean 170 cm and standard deviation 7 cm. What range holds the middle 95%? About what share is taller than 177 cm?
Answer
170 ± 14, so 156 cm to 184 cm. 177 cm is one σ above the mean. 68% lie within one σ, so 32% lie outside, and half of that, about 16%, lie above 177 cm.
For readers who want the formula, the height of the curve at x is:
p(x) = 1 / (σ√(2π)) × e−(x − μ)² / (2σ²)
The number e ≈ 2.718 is explained in the exponentials unit. You do not need the formula to use the bell: code draws from it directly. The normal distribution with mean 0 and standard deviation 1 is called the standard normal. A draw from any bell is a standard normal draw times σ, plus μ.
Real data are only roughly normal. The rule "a sum of many small, separate effects is close to a bell" is a theorem, the central limit theorem, but it needs conditions this page skips. Some data are not bell-shaped at all: incomes and waiting times have one long tail. Using the 68–95–99.7 rule on such data gives wrong answers.
bell.py: 100,000 draws, and the share within one and two standard deviations
import numpy as np
rng = np.random.default_rng(seed=0)
scores = rng.normal(loc=70, scale=10, size=100_000)
print(round(scores.mean(), 2), round(scores.std(), 2))
# Each test is True (1) or False (0) per draw, so np.mean gives the share that pass
print(np.mean(np.abs(scores - 70) < 10)) # within 1 standard deviation
print(np.mean(np.abs(scores - 70) < 20)) # within 2 standard deviations
print(np.mean(scores > 90)) # above 90
69.99 10.0 0.68391 0.9546 0.02255
loc is NumPy's name for the mean and scale for the standard
deviation.
Check yourself
-
For a standard normal (mean 0, standard deviation 1), which range holds about 95% of draws?
Answer
From −2 to 2. (The exact value is ±1.96.)
-
You double σ and keep μ fixed. What happens to the width and to the height of the peak? Why must the height change?
Answer
The bell becomes twice as wide and its peak half as tall. The total area must stay 1, so a wider bell has to be lower.
-
A machine fills bags with a mean of 500 g and a standard deviation of 4 g. Is a bag of 488 g unusual?
Answer
Yes. 488 g is 12 g, or 3 standard deviations, below the mean. Only about 0.13% of bags are that light or lighter.
Go further
Optional background, for readers who want more than this page.
-
Probability distributions: Central Limit Theorem Seeing Theory, Brown University; chapter 3, third section Interactive page Basic
Add up random draws and watch the bell shape form.
-
The 68–95–99.7 rule and "how many standard deviations away" in plain language.
-
Why sums of many small effects become bell-shaped, with the conditions this page skips.
Where this shows up
Units that build on this one
- Data augmentation: new views of an example Intermediate
- Generative models: making new examples Intermediate
- Flow matching: turning noise into shapes Advanced
- The diffusion noising process: from data to noise Advanced