The bell curve turns up everywhere — not by coincidence, but because sums of many small random effects are forced into this shape. Move μ and σ, shade any region, and sample from it to watch the curve build itself.
Controls
mean μ0.0
std dev σ1.0
Samples are drawn using the Box–Muller transform — genuinely normal random numbers.
Probability Density
68 – 95 – 99.7
Live Calculation
shaded area
0%
peak height
0
samples drawn
0
sample mean
–
The Normal Distribution
Two numbers describe the whole curve — and the central limit theorem explains why it is unavoidable.
Quick Context
The normal (or Gaussian) distribution is the familiar bell curve: symmetric, single-peaked, thin-tailed. It is completely specified by just two numbers — the mean μ sets where it sits, and the standard deviation σ sets how wide it is.
Two Knobs, Nothing Else
μ slides the curve left and right without changing its shape.
σ stretches or squeezes it. Watch the peak drop as you widen it — the total area must always equal 1, so a wider curve has to be shorter.
That fixed unit area is what makes it a probability density: area under a stretch of the curve is the probability of landing in that range.
The 68–95–99.7 Rule
These percentages hold for every normal distribution, whatever μ and σ are. Cycle the region selector and watch the shaded area match — the app integrates the curve numerically rather than quoting the constants.
The practical use is spotting anomalies: beyond 3σ you are in the outermost 0.3% of outcomes, which is why quality control and anomaly detection use it as a threshold.
Z-scores Put Everything on One Scale
A z-score restates a value as "how many standard deviations from the mean". It makes incomparable quantities comparable — a height and an exam score both become pure position. Setting μ = 0 and σ = 1 gives the standard normal, which is what every statistical table refers to, and what feature standardisation converts your data into.
Why It Appears Everywhere
The central limit theorem: when you add up many small independent random effects, their total tends toward a normal distribution regardless of how the individual effects were distributed. Height is the sum of many genetic and environmental nudges; measurement error is the sum of many tiny disturbances. Hence bells everywhere.
Press Sample 500 a few times and watch the histogram converge onto the curve. In machine learning this shows up as weight initialisation (drawn from a normal), Gaussian noise in diffusion models, and the assumption behind least-squares regression.
When Not to Assume It
Normal tails are extremely thin — a 5σ event should essentially never happen. Financial returns, city sizes and word frequencies have far fatter tails, so assuming normality there badly underestimates extreme events. The 2008 financial crisis is the textbook example of trusting a bell curve where none existed.
The shape that keeps appearing
The normal distribution is the symmetric bell curve, defined entirely by two numbers: the mean μ (where the peak sits) and the standard deviation σ (how wide it is).
Its most useful property is the empirical rule, which turns σ into a statement about proportions:
Range
Share of the data
μ ± 1σ
68%
μ ± 2σ
95%
μ ± 3σ
99.7%
So for adult heights with a mean of 170cm and σ of 10cm: about two thirds of people are between 160 and 180, 95% between 150 and 190, and someone at 200cm is a genuine three-sigma rarity — about 1 in 700.
That is the practical value of the curve. Two numbers, and you can answer "how unusual is this?" for any value.
The z-score
A z-score converts any value into "how many standard deviations from the mean":
z = (x − μ) / σ
A test score of 85 where the mean is 70 and σ is 10 gives z = 1.5 — one and a half standard deviations above average, better than about 93% of the group.
Standardising this way makes different scales comparable: a z of 1.5 means the same thing whether the underlying variable is heights, salaries or reaction times. That is exactly what StandardScaler does to every column before a distance-based model sees it.
z
Percentile
−2
2.3%
−1
15.9%
0
50%
1
84.1%
2
97.7%
3
99.9%
Why it appears so often: the central limit theorem
The reason the bell curve shows up everywhere is not that nature prefers it. It is a mathematical result: the sum or average of many independent contributions tends towards a normal distribution, whatever the shape of the individual contributions.
Roll one die and the outcomes are flat. Roll ten and add them, and the totals form a bell. Human height is the sum of many small genetic and environmental effects; measurement error is the sum of many small disturbances. Both end up normal for the same reason.
Two consequences for practical work:
Sample means are normally distributed even when the underlying data is not, which is why confidence intervals and t-tests work on skewed data given a reasonable sample size.
Individual measurements are often not normal. Incomes, city sizes and response times are famously right-skewed, and treating them as normal produces bad intervals and worse thresholds.
The mistake to avoid is assuming normality rather than checking it. A histogram, or a Q-Q plot, settles it in seconds.
Where it is used in machine learning
Standardisation. Subtracting the mean and dividing by σ is the standard preprocessing step for linear models, SVMs, KNN and neural networks.
Weight initialisation. Networks start with weights drawn from a normal distribution, scaled by the layer size (He, Xavier).
Assumed errors. Linear regression's inference — confidence intervals, p-values — assumes normally distributed residuals. The predictions themselves do not.
Gaussian mixtures model data as several overlapping bells, giving soft cluster membership.
Anomaly detection. Flag anything beyond three sigma, when the normality assumption holds.
Noise. Gaussian noise is the default in augmentation, differential privacy and diffusion models.
Exploration guide
Slide μ. The curve translates; its shape never changes.
Slide σ wider and watch the peak fall to compensate — fixed area in action.
Cycle ±1σ, ±2σ, ±3σ and confirm 68 / 95 / 99.7 for any μ and σ you choose.
Sample 20. The histogram looks nothing like a bell — small samples are deceptive. Now sample 500 repeatedly and watch it lock on.
Set a custom range beyond 3σ and read how vanishingly small the probability becomes.
Where that leaves you
Two parameters describe the entire curve, area equals probability, and 68/95/99.7 holds universally. The central limit theorem is why the shape is so common — but its thin tails mean it is the wrong model whenever extreme events actually matter.
When the data is not normal
Assuming a bell curve for skewed data has predictable consequences: thresholds set at three sigma fire far too often, confidence intervals are wrong, and models that assume symmetry systematically under-predict the tail.
Three responses, in order of preference:
Transform. A log transform straightens most right-skewed data — incomes, populations, counts. The Box-Cox and Yeo-Johnson transforms generalise this and can be fitted automatically.
Use a distribution that fits. Poisson for counts, exponential for waiting times, log-normal for anything multiplicative, Student's t when the tails are heavier than normal.
Stop assuming. Rank-based methods, quantile regression and bootstrapping make no distributional assumption at all. The bootstrap in particular is a general-purpose way to get a confidence interval from data of any shape: resample with replacement a few thousand times and read the interval off the resulting spread.
How to check quickly: plot a histogram, then a Q-Q plot — if the points fall on the diagonal, normality is a reasonable approximation. Formal tests such as Shapiro-Wilk exist but reject almost any large real dataset, since no real data is exactly normal.
Two relatives worth knowing
The log-normal distribution describes a variable whose logarithm is normal. It arises whenever effects multiply rather than add — incomes, file sizes, stock prices. It is right-skewed and strictly positive, which fits a great deal of real data that people mistakenly model as normal.
Student's t distribution looks like a normal curve with heavier tails. It is what you use for confidence intervals from small samples, where the extra tail weight honestly reflects the uncertainty in estimating σ from few observations. As the sample grows it converges to the normal.
Measure the 68-95-99.7 rule
Half a million draws, then count how many land inside one, two and three standard deviations. The rule is not a rule of thumb.
example_01.pyNumPy
import numpy as np
rng = np.random.default_rng(0)
x = rng.normal(loc=100, scale=15, size=500_000)
print("normal(mean=100, sd=15), 500,000 draws")
print(" measured mean %.3f, sd %.3f" % (x.mean(), x.std()))
print()
for k in (1, 2, 3):
inside = (np.abs(x - 100) < k * 15).mean()
print(" within %d sd (%.0f to %.0f): %6.3f" % (k, 100 - k * 15, 100 + k * 15, inside))
print()
print("the 68-95-99.7 rule is not a rule of thumb, it is the area under the curve.")
print()
print("a crude histogram:")
edges = np.arange(55, 150, 10)
counts = np.histogram(x, bins=edges)[0]
for lo, c in zip(edges, counts):
print(" %3d-%3d %s" % (lo, lo + 10, "#" * int(60 * c / counts.max())))
Output
Questions people ask
Does my data need to be normal for machine learning? Mostly no. Trees, forests and boosting do not care. Linear models' inference assumes normal residuals, not normal features. Distance-based models care about scale, which standardisation fixes regardless of shape.
What is the difference between standardisation and normalisation? Standardising subtracts the mean and divides by σ, giving mean 0 and σ 1. Normalising usually means rescaling to a fixed range such as [0, 1]. The words are used loosely; say which you mean.
Is the mean always at the peak? For a normal distribution the mean, median and mode coincide. For skewed data they separate, and the gap tells you the direction of the skew.
How many samples until the central limit theorem applies? The usual rule of thumb is 30, but heavily skewed data needs far more. Simulate it if the answer matters.
What is a three-sigma event? A value more than three standard deviations from the mean — about 0.3% of a normal distribution. In markets and other heavy-tailed settings they happen far more often than the normal model predicts.
Why do neural network weights start normally distributed? Because a symmetric, zero-centred spread breaks symmetry between neurons while keeping the initial activations in a sensible range.
Recap in one screen
Two numbers, the mean and the standard deviation, describe the whole curve.
68%, 95% and 99.7% fall within one, two and three standard deviations.
A z-score expresses any value as a number of standard deviations, making scales comparable.
The central limit theorem explains its ubiquity: sums and averages tend to normal.
Individual measurements are often skewed — check before assuming, and transform or use a better-fitting distribution.
Recall check
0 of 3
Say the answer out loud before you reveal it — recalling it is what makes it stick, and rereading it is not.
What does this module say about “Quick Context”?
The normal (or Gaussian) distribution is the familiar bell curve: symmetric, single-peaked, thin-tailed. It is completely specified by just two numbers — the mean μ sets where it sits, and the standard deviation σ sets how wide it is.
What does this module say about “Two Knobs, Nothing Else”?
That fixed unit area is what makes it a probability density: area under a stretch of the curve is the probability of landing in that range.
What does this module say about “The 68–95–99.7 Rule”?
These percentages hold for every normal distribution, whatever μ and σ are. Cycle the region selector and watch the shaded area match — the app integrates the curve numerically rather than quoting the constants.
Cheat sheet
The Normal Distribution
The bell curve turns up everywhere — not by coincidence, but because sums of many small random effects are forced into this shape. Move μ and σ, shade any region, and sample from it to watch the curve build itself.
Ashish Jangra builds and maintains VizLearn. Every module here is written and the visualisation behind it hand-built, so the numbers in a readout come from the same code that draws the picture. Corrections are genuinely welcome and get priority over everything else — if a page states something wrong, or an animation misrepresents what the algorithm does, get in touch.