Continuous distribution · also called Gaussian
Normal distribution
A quantity that is the sum of many small independent effects, which the central limit theorem says will be close to normal whatever the effects are: measurement error, heights, test scores, the average of a large sample. It is fixed by its mean and standard deviation ; about 68% of it lies within of the mean and 95% within .
Normal probability calculator
P(X ≤ 0) = 0.5
At the parameters set by the sliders. The shaded region on the plot is the probability; the dots on the CDF mark F at its ends.
CDF
mean 0 · variance 1 · sd 1 · mode 0 · entropy 1.419 nats
Formulas
| Parameters |
|
|---|---|
| Support | |
| CDF | |
| Mean | |
| Variance | |
| Mode | |
| MGF | |
| Entropy |
Of all distributions with a given variance, the normal has the largest entropy. Libraries take the standard deviation , not the variance.
Worked example
Adult heights in a population are normal with mean 170 cm and standard deviation 7 cm. What fraction are taller than 180 cm?
Standardize: . Then , about 7.7%. answer checked by code
How it relates to others
- Limit← Binomial: For large , Binomial() is approximately Normal() (de Moivre–Laplace), best with a continuity correction. checked by code
- Limit← Poisson: For large , Poisson() is approximately Normal(). checked by code
- Transformation→ Chi-squared: If are independent standard normals, is Chi-squared(). checked by code
- Transformation→ Log-normal: If is Normal(), is Log-normal(). checked by code
- SumThe sum of independent Normal() and Normal() variables is Normal().
- Limit← Student's t: As , Student's tends to the standard normal. checked by code
- Transformation→ Cauchy: The ratio of two independent standard normals is standard Cauchy. checked by code
- Transformation→ Rayleigh: If are independent Normal(), is Rayleigh(). checked by code
- Special case← Multivariate normal: Each coordinate of a multivariate normal is normal, , and so is any linear combination . checked by code
- Conjugate prior← Inverse gamma: An Inverse gamma() prior on the variance of a normal with known mean gives an Inverse gamma() posterior. checked by code
- Conjugate priorA Normal() prior on the mean of a normal with known variance gives a normal posterior with precision and mean the precision-weighted average of and . checked by code
- Limit← Skellam: For large , Skellam() is approximately Normal(). checked by code
- Transformation→ Half-normal: If is Normal(), is Half-normal(). checked by code
- Special case← Skew normal: Skew normal() is Normal(). checked by code
- Limit← Truncated normal: As and , the truncated normal tends to the untruncated Normal(). checked by code
- Limit← Inverse Gaussian: As with fixed, Inverse Gaussian() is approximately Normal(). checked by code
- Transformation→ Rice: If is Normal() and an independent Normal(), is Rice(). checked by code
- Limit← Von Mises: As , Von Mises() is approximately Normal(). checked by code
- Transformation→ Noncentral chi-squared: If are independent standard normals, is Noncentral chi-squared(). checked by code
- Transformation→ Lévy: If is standard normal, is Lévy(). checked by code
All the relationships, as a diagram →
In Python
from scipy import stats
import numpy as np
X = stats.norm(loc=0, scale=1)
X.pdf(0.5) # f(0.5) = 0.3521
X.cdf(0.5) # P(X ≤ 0.5) = 0.6915
X.mean(), X.var() # 0, 1
X.ppf(0.95) # 95th percentile
X.rvs(size=10, random_state=0)
rng = np.random.default_rng(0)
rng.normal(loc=0, scale=1, size=10)Choosing between this and its neighbours? Which distribution for measurements and errors? · Which prior distribution should I use?