The normal distribution, or bell curve, appears throughout statistics and data science. Understanding it, and its limits, helps you interpret data, spot unusual values and understand many statistical tests.
What it looks like
A normal distribution is symmetric around its mean, with most values near the centre and fewer towards the tails. It is fully described by two numbers: the mean (centre) and the standard deviation (spread).
Many measurements are roughly normal: heights, measurement errors, the weight of packaged goods from a machine, and averages of many independent samples.
The 68-95-99.7 rule
For a normal distribution:
- About 68% of values fall within 1 standard deviation of the mean.
- About 95% within 2 standard deviations.
- About 99.7% within 3 standard deviations.
If a filling machine at a fictional spice brand, MasalaMill, fills 200 g packets with a standard deviation of 2 g, nearly all packets fall between 194 g and 206 g. A 190 g packet would be very unusual and worth investigating.
Z-scores
A z-score says how many standard deviations a value is from the mean:
z = (value โ mean) / standard deviationimport numpy as np
weights = np.array([...])
z = (weights - weights.mean()) / weights.std()- z = 0: exactly average.
- z = 2: two standard deviations above average.
- z = โ1.5: one and a half below.
Use 1: comparing different scales
A student scores 72 in a hard maths test (class mean 60, standard deviation 8) and 80 in an easy English test (mean 78, standard deviation 5). Z-scores: maths (72 โ 60) / 8 = 1.5; English (80 โ 78) / 5 = 0.4. Relative to classmates, the maths result is the stronger performance.
Use 2: flagging outliers
A common rule flags values with |z| above 3 (sometimes 2.5). It works best when data is roughly normal. Remember that extreme values inflate the standard deviation itself, which can hide outliers; for skewed data, the IQR rule or percentiles are often better.
Use 3: standardising features for ML
Scaling each feature to z-scores (mean 0, standard deviation 1) is exactly what StandardScaler in scikit-learn does, so that features on large scales do not dominate distance-based models.
When data is not normal
Many business metrics are not normal:
- Order values, incomes and delivery times are right-skewed.
- Counts of rare events (complaints per day) are often better described by other distributions.
- Mixed groups produce two peaks.
Always plot a histogram before assuming normality. For skewed data, a log transform sometimes makes it closer to normal, and medians and percentiles describe it better.
Why normality matters for statistics
The central limit theorem says that averages of many independent samples tend towards a normal distribution, even when individual values are not normal. That is why many tests on averages work well with reasonably large samples.
Practise
Plot distributions and compare them with the bell shape in the distributions set, and simulate normal data yourself in the NumPy random set.
Practise what you just read
Reading helps; writing the code yourself is what sticks. Start here: