Normal distribution (source code)

= Normal distribution
{title2=$N(\mu,\sigma^2)$}
{wiki}

= Gaussian
{c}
{synonym}

= Normal
{synonym}

= Gaussian distribution
{c}
{synonym}

= Normally distributed
{synonym}

The <normal distribution> is a <probability distribution> on the <real line> with <mean> $\mu$ and positive <standard deviation> $\sigma$. Its <probability density function> is
$$
f_X(x)=\frac{1}{\sigma\sqrt{2\pi}}\exp\left(-\frac{(x-\mu)^2}{2\sigma^2}\right),\qquad x\in\mathbb R,\quad\sigma>0.
$$
In the notation $X\sim N(\mu,\sigma^2)$, the second parameter is the <variance> $\sigma^2$, not the <standard deviation> $\sigma$. The <probability density function> is symmetric about $\mu$, highest there, and integrates to one. These formulas and the parameter convention are given in https://ocw.mit.edu/courses/18-05-introduction-to-probability-and-statistics-spring-2022/mit18_05_s22_class05-prep-c.pdf[MIT 18.05, Reading 5c, §5: normal distributions].

The <normal distribution> is a <location-scale family>: if $Z$ is a <standard normal random variable>, then $X=\mu+\sigma Z$. Changing $\mu$ moves the center; changing $\sigma$ stretches the horizontal distances from it. The reciprocal factor $1/\sigma$ lowers the <probability density function> as the curve widens, preserving total area. This is why one <standard normal distribution> suffices to calculate probabilities for the whole family. https://itl.nist.gov/div898/handbook/eda/section3/eda3661.htm[NIST: normal density and location/scale parameters]{ref}.

\Image[/normal-location-and-scale.png]
{title=Normal location and scale change the center and width while preserving total area}
{description=Left: <normal distributions> with <mean> zero and <standard deviations> $0.5,1,2$ have respective peak heights approximately $0.798,0.399,0.199$, but each has total area one on the whole <real line>. Right: changing the <mean> with <standard deviation> one translates the curve. Both panels show a finite viewing window.}

The height $f_X(x)$ is a <probability density function> value, not $\mathbb P(X=x)$. For $a\leq b$, the <probability> $\mathbb P(a\leq X\leq b)=\int_a^b f_X(x)\,dx$ is an area, and $\mathbb P(X=x)=0$ for every individual $x$. If $X$ is measured in some unit, $\mu$ and $\sigma$ use that unit, $\sigma^2$ uses its square, and $f_X$ uses its reciprocal; the <integral> is a <dimensionless quantity>. A change of measurement unit therefore changes the height without changing the <probability>. The area interpretation is developed in https://ocw.mit.edu/courses/18-05-introduction-to-probability-and-statistics-spring-2022/mit18_05_s22_class05-prep-b.pdf[MIT 18.05, Reading 5b: continuous random variables].

The usefulness of the <normal distribution> goes beyond its simple shape. Under the <central limit theorem>, sums of <independent and identically distributed> <random variables> with finite positive <variance>, after centering and scaling, approach the <standard normal distribution>. Thus approximations by a <normal distribution> can arise even when the individual <random variables> have quite different <probability distributions>. The hypotheses matter: a model of <measurement error> still needs evidence that this approximation is appropriate. https://ocw.mit.edu/courses/18-05-introduction-to-probability-and-statistics-spring-2022/mit18_05_s22_class06-prep-b.pdf[MIT 18.05, Reading 6b, §5: standardization and the central limit theorem]{ref}. Exact closure under a <linear combination of independent normal random variables> provides another reason the family is convenient.

Historically, the curve appeared in a different problem from fitting measurements. In the 1756 edition of \i[The Doctrine of Chances], Abraham de Moivre reproduces work he dates to 12 November 1733 on approximating sums of <binomial distribution> <probabilities> for equally likely success and failure; page 245 already gives the one-sided central area as $0.341344$. https://archive.org/details/doctrineofchance00moiv/page/243/mode/2up[De Moivre, The Doctrine of Chances, 1756, pp. 242–246]{ref}. In his 1809 \i[Theoria motus], <Carl Friedrich Gauss> derived a <normal distribution> for <measurement error> from a condition on the <arithmetic mean>, then connected maximizing its <likelihood> to minimizing the sum of squared errors under that model, the principle behind <ordinary least squares>. These are distinct contributions: approximating <binomial distribution> <probabilities> and justifying an estimation rule. https://archive.org/details/theoryofmotionof00gausrich/page/258/mode/2up[Gauss, Theoria motus, 1809, §§177–179; Davis's 1857 English translation, pp. 258–260]{ref}.

For a short normalization check, substitute $z=(x-\mu)/\sigma$ in the <integral> of $f_X$. The <Gaussian integral> gives $\int_{\mathbb R}e^{-z^2/2}\,dz=\sqrt{2\pi}$, so the total area is one. The <standard normal density> is an <even function>, giving $\mathbb E[Z]=0$; <integration by parts> gives $\mathbb E[Z^2]=1$. Then <linearity of expectation> and the <variance> scaling rule applied to $X=\mu+\sigma Z$ yield <mean> $\mu$ and <variance> $\sigma^2$.