Documente Academic
Documente Profesional
Documente Cultură
1
2 2 PROPERTIES
The standard Gaussian distribution (with zero mean and The value of the normal distribution is practically zero
unit variance) is often denoted with the Greek letter ϕ when the value x lies more than a few standard deviations
(phi).[6] The alternative form of the Greek phi letter, φ, away from the mean. Therefore, it may not be an appro-
is also used quite often. priate model when one expects a significant fraction of
outliers—values that lie many standard deviations away
The normal distribution is also often denoted by N(μ, from the mean—and least squares and other statistical in-
σ2 ).[7] Thus when a random variable X is distributed nor- ference methods that are optimal for normally distributed
mally with mean μ and variance σ2 , we write variables often become highly unreliable when applied to
such data. In those cases, a more heavy-tailed distribution
should be assumed and the appropriate robust statistical
X ∼ N (µ, σ ). 2 inference methods applied.
The Gaussian distribution belongs to the family of
stable distributions which are the attractors of sums of
1.4 Alternative parameterizations independent, identically distributed distributions whether
or not the mean or variance is finite. Except for the Gaus-
Some authors advocate using the precision τ as the pa- sian which is a limiting case, all stable distributions have
rameter defining the width of the distribution, instead of heavy tails and infinite variance. It is one of the few dis-
the deviation σ or the variance σ2 . The precision is nor- tributions that are stable and that have probability density
mally defined as the reciprocal of the variance, 1/σ2 .[8] functions that can be expressed analytically, the others
The formula for the distribution then becomes being the Cauchy distribution and the Lévy distribution.
√
τ −τ (x−µ)2 2.1 Symmetries and derivatives
f (x) = e 2 .
2π
The normal distribution f(x), with any mean μ and any
This choice is claimed to have advantages in numerical
positive deviation σ, has the following properties:
computations when σ is very close to zero and simplify
formulas in some contexts, such as in the Bayesian infer-
ence of variables with multivariate normal distribution. • It is symmetric around the point x = μ, which is at
′ the same time the mode, the median and the mean
Also the reciprocal of the standard deviation τ = 1/σ of the distribution and it divides the data in half.[11]
might be defined as the precision and the expression of
the normal distribution becomes • It is unimodal: its first derivative is positive for x <
μ, negative for x > μ, and zero only at x = μ.
τ ′ −(τ ′ )2 (x−µ)2 • The area under the curve and over the x-axis is unity.
f (x) = √ e 2 .
2π
• Its density has two inflection points (where the sec-
According to Stigler, this formulation is advantageous ond derivative of f is zero and changes sign), located
because of a much simpler and easier-to-remember for- one standard deviation away from the mean, namely
mula, the fact that the pdf has unit height at zero, and at x = μ − σ and x = μ + σ.[11]
simple approximate formulas for the quantiles of the dis-
tribution. • Its density is log-concave.[11]
2.3 Fourier transform and characteristic function 3
• Its density is infinitely differentiable, indeed The central absolute moments coincide with plain mo-
supersmooth of order 2.[12] ments for all even orders, but are nonzero for odd orders.
For any non-negative integer p,
• Its second derivative f′′(x) is equal to its derivative
with respect to its variance σ2 .
{√ } p ( p+1 )
2
Furthermore, the density ϕ of the standard normal dis- E [|X| ] = σ (p−1)!!· ifpodd is 2 2Γ
p p π =σ ·p
√ 2
tribution (with μ = 0 and σ = 1) also has the following 1 ifpeven is π
properties:
The last formula is valid also for any non-integer p > −1.
• Its first derivative ϕ′(x) is −xϕ(x). When the mean μ is not zero, the plain and absolute mo-
ments can be expressed in terms of confluent hypergeo-
• Its second derivative ϕ′′(x) is (x2 − 1)ϕ(x) metric functions 1 F 1 and U.
• More generally, its n-th derivative ϕ(n) (x) is
(−1)n Hen(x)ϕ(x), where Hen is the nth (probabilist) ( )
√ p 1 1 1
Hermite polynomial. [13] E [X p
] = σ p
· (−i 2) U − p, , − (µ/σ) 2
,
2 2 2
• If we want to calculate the probability of a normally ( 1+p ) ( )
distributed variable X with known µ and σ . Then E [|X|p ] = σ p ·2 p2 Γ √ 2 1 F1 − 1 p, 1 , − 1 (µ/σ)2 .
we can calculate it by Standard Normal Distribution π 2 2 2
equivalent to Y = X−µ σ using probability table. These expressions remain valid even if p is not integer.
See also generalized Hermite polynomials.
2.1.1 Differential equation
2.4 Moment and cumulant generating The complement of the standard normal CDF, Q(x) =
functions 1 − Φ(x) , is often called the Q-function, especially
in engineering texts.[16][17] It gives the probability that
The moment generating function of a real random vari- the value of a standard normal random variable X will
able X is the expected value of etX , as a function of the exceed x. Other definitions of the Q-function, all of
real parameter t. For a normal distribution with mean μ which are simple transformations of Φ , are also used
and deviation σ, the moment generating function exists occasionally.[18]
and is equal to The graph of the standard normal CDF Φ has 2-fold
rotational symmetry around the point (0,1/2); that is,
1 2 2
Φ(−x)∫ = 1 − Φ(x)∫ . Its antiderivative (indefinite in-
M (t) = ϕ̂(−it) = eµt e 2 σ t tegral) Φ(x) dx is Φ(x) dx = xΦ(x) + ϕ(x) .
∫ x
1
e−t dt
2
erf(x) = √
π −x
[ ( )]
1 x
Φ(x) = 1 + erf √
2 2
For a generic normal distribution f with mean μ and de- For the normal distribution, the values less than one standard de-
viation σ, the cumulative distribution function is viation away from the mean account for 68.27% of the set; while
two standard deviations from the mean account for 95.45%; and
three standard deviations account for 99.73%.
( ) [ ( )]
x−µ 1 x−µ
F (x) = Φ = 1 + erf √ are within one standard deviation σ away from the mean;
σ 2 σ 2
5
about 95% of the values lie within two standard devia- However, one can define the normal distribution with zero
tions; and about 99.7% are within three standard devia- variance as a generalized function; specifically, as Dirac’s
tions. This fact is known as the 68-95-99.7 (empirical) “delta function” δ translated by the mean μ, that is f(x)
rule, or the 3-sigma rule. = δ(x−μ). Its CDF is then the Heaviside step function
More precisely, the probability that a normal deviate lies translated by the mean μ, namely
in the range μ − nσ and μ + nσ is given by
{
( ) F (x) = 0 ifx < µ
n 1 ifx ≥ µ
F (µ+nσ)−F (µ−nσ) = Φ(n)−Φ(−n) = erf √ ,
2
To 12 significant figures, the values for n = 1, 2, …, 6
are:[19] 5 Central limit theorem
√ 0.14
0.12
0.14
0.12 73 / 648
F −1 (p) = µ+σΦ−1 (p) = µ+σ 2 erf−1 (2p−1), p ∈ (0, 1).
0.10 0.10
0.08 0.08
0.05 0.05
The quantile Φ−1 (p) of the standard normal distribution 0.04
0.02
0.04
0.02
is commonly denoted as zp. These values are used in 0.00
123456 k
0.00
4 14 24 k
The central limit theorem states that under certain (fairly Of all probability distributions over the reals with a spec-
common) conditions, the sum of many random variables ified mean μ and variance σ2 , the normal distribution
will have an approximately normal distribution. More N(μ, σ2 ) is the one with maximum entropy.[22] If X is a
specifically, where X1 , …, Xn are independent and iden- continuous random variable with probability density f(x),
tically distributed random variables with the same arbi- then the entropy of X is defined as[23][24][25]
2
trary distribution, zero
√ mean, and variance σ ; and Z is
their mean scaled by n ∫ ∞
H(X) = − f (x) log f (x)dx = 12 (1 + log(2σ 2 π))
−∞
( )
1∑
n
√ where f(x) log f(x) is understood to be zero whenever
Z= n Xi
n i=1 f(x) = 0. This functional can be maximized, subject to
the constraints that the distribution is properly normalized
Then, as n increases, the probability distribution of Z will and has a specified variance, by using variational calculus.
tend to the normal distribution with zero mean and vari- A function with two Lagrange multipliers is defined:
ance σ2 .
∫ ∞ ( ∫ ∞ ) ( ∫ ∞
The theorem can be extended to variables Xi that are not
independent and/or not identically distributed if certain L = f (x) ln(f (x)) dx−λ 0 1 − f (x) dx −λ σ 2
− f (x
−∞ −∞ −∞
constraints are placed on the degree of dependence and
the moments of the distributions. where f(x) is, for now, regarded as some function with
mean μ and standard deviation σ . At maximum entropy,
Many test statistics, scores, and estimators encountered
a small variation δf(x) about f(x) will produce a variation
in practice contain sums of certain random variables in
δL about L which is equal to zero:
them, and even more estimators can be represented as
sums of random variables through the use of influence
functions. The central limit theorem implies that those ∫ ∞
( )
statistical parameters will have asymptotically normal 0 = δL = δf (x) ln(f (x)) + 1 + λ0 + λ(x − µ)2 dx
−∞
distributions.
The central limit theorem also implies that certain distri- Since this must hold for any small δf(x), the term in
butions can be approximated by the normal distribution, brackets must be zero, and solving for f(x) yields:
for example:
− Y are also independent and normally distributed, with (named after Józef Marcinkiewicz) asserts that Q
zero mean and variance 2σ2 . This is a special case of the can be at most a quadratic polynomial, and therefore
polarization identity.[26] X a normal random variable.[29] The consequence of
Also, if X1 , X2 are two independent normal deviates with this result is that the normal distribution is the only
mean μ and deviation σ, and a, b are arbitrary real num- distribution with a finite number (two) of non-zero
bers, then the variable cumulants.
0 2σ1 4
two distributions is normal if and only if both are nor-
mal. Cramér’s theorem implies that a linear combination 5. Normal distributions belongs to an exponential fam-
of independent non-Gaussian variables will never have an ily with natural parameters θ1 = σµ2 and θ2 = 2σ 2 , and
−1
11 Estimation of parameters √ d
n(µ̂ − µ) −
→ N (0, σ 2 ).
See also: Maximum likelihood § Continuous distribu-
tion, continuous parameter space 11.2 Sample variance
It is often the case that we don't know the parameters See also: Standard deviation § Estimation, and Variance
of the normal distribution, but instead want to estimate § Estimation
them. That is, having a sample (x1 , …, xn) from a nor-
mal N(μ, σ2 ) population we would like to learn the ap- The estimator σ̂2 is called the sample variance, since it
proximate values of parameters μ and σ2 . The stan- is the variance of the sample (x1 , …, xn). In practice,
dard approach to this problem is the maximum likeli- another estimator is often used instead of the σ̂2 . This
hood method, which requires maximization of the log- other estimator is denoted s2 , and is also called the sam-
likelihood function: ple variance, which represents a certain ambiguity in ter-
minology; its square root s is called the sample standard
deviation. The estimator s2 differs from σ̂2 by having (n −
∑n
n n 1 ∑n
ln L(µ, σ 2 ) = ln f (xi ; µ, σ 2 ) = − ln(2π)− ln σ 2 −1) instead
2
of −µ)
(x i
n in the
2 denominator (the so-called Bessel’s
.
i=1
2 2 correction):
2σ i=1
The first of these expressions shows that the variance of from the asymptotic distributions of µ̂ and s2 . The ap-
s2 is equal to 2σ4 /(n−1), which is slightly greater than the proximate formulas become valid for large values of n,
σσ-element of the inverse Fisher information matrix I −1 . and are more convenient for the manual calculation since
Thus, s2 is not an efficient estimator for σ2 , and moreover, the standard normal quantiles zα/2 do not depend on n.
since s2 is UMVU, we can conclude that the finite-sample In particular, the most popular value of α = 5%, results
efficient estimator for σ2 does not exist. in |z₀.₀₂₅| = 1.96.
Applying the asymptotic theory, both estimators s2 and
σ̂ 2 are consistent, that is they converge in probability to
σ2 as the sample size n → ∞. The two estimators are also 12 Bayesian analysis of the normal
both asymptotically normal: distribution
√ √ d Bayesian analysis of normally distributed data is compli-
n(σ̂ 2 − σ 2 ) ≃ n(s2 − σ 2 ) −
→ N (0, 2σ 4 ).
cated by the many different possibilities that may be con-
In particular, both estimators are asymptotically efficient sidered:
for σ2 .
• Either the mean, or the variance, or neither, may be
considered a fixed quantity.
11.3 Confidence intervals
• When the variance is unknown, analysis may be
See also: Studentization done directly in terms of the variance, or in terms
of the precision, the reciprocal of the variance. The
reason for expressing the formulas in terms of pre-
By Cochran’s theorem, for normal distributions the sam-
cision is that the analysis of most cases is simplified.
ple mean µ̂ and the sample variance s2 are independent,
which means there can be no gain in considering their • Both univariate and multivariate cases need to be
joint distribution. There is also a converse theorem: if in considered.
a sample the sample mean and sample variance are inde-
pendent, then the sample must have come from the nor- • Either conjugate or improper prior distributions may
mal distribution. The independence between µ̂ and s can be placed on the unknown variables.
be employed to construct the so-called t-statistic:
• An additional set of cases occurs in Bayesian lin-
ear regression, where in the basic model the data is
µ̂ − µ x−µ assumed to be normally distributed, and normal pri-
t= √ =√ ∑ ∼ tn−1 ors are placed on the regression coefficients. The
s/ n 1
(xi − x)2
n(n−1) resulting analysis is similar to the basic cases of
independent identically distributed data, but more
This quantity t has the Student’s t-distribution with (n − complex.
1) degrees of freedom, and it is an ancillary statistic (in-
dependent of the value of the parameters). Inverting the
distribution of this t-statistics will allow us to construct The formulas for the non-linear-regression cases are sum-
the confidence interval for μ;[43] similarly, inverting the marized in the conjugate prior article.
χ2 distribution of the statistic s2 will give us the confi-
dence interval for σ2 :[44]
12.1 Sum of two quadratics
[ ] [12.1.1 Scalar form ]
1 1 1 1
µ ∈ µ̂ − tn−1,1−α/2 √ s, µ̂ + tn−1,1−α/2 √ s ≈ µ̂ − |zα/2 | √ s, µ̂ + |zα/2 | √ s ,
n n n n
[ ] [ √ The following auxiliary
√ ] formula is useful for simplifying
(n − 1)s2
(n − 1)s2
2 the posterior update
2 equations, which otherwise become
σ2 ∈ , ≈ s2 − |zα/2 | √ s2 , s2 + |zα/2 | √ s2 ,
χ2n−1,1−α/2 χ2n−1,α/2 n fairly tedious. n
a+b has the form of a weighted average N (µ, σ ) with known variance σ , the conjugate prior
1. The factor ay+bz 2 2
total precision of the data to the prior total precision, and 2πσ 2 2σ i=1
form a new mean through a precision-weighted average, ( ) n2 [ ]
1 S
i.e. a weighted average of the data mean and the prior = exp − 2
2πσ 2 2σ
mean, each weighted by the associated total precision.
This makes logical sense if the precision is thought of as where
indicating the certainty of the observations: In the distri-
bution of the posterior mean, each of the input compo-
∑n
nents is weighted by its certainty, and the certainty of this S = (xi − µ)2 .
distribution is the sum of the individual certainties. (For i=1
the intuition of this, compare the expression “the whole
Then:
is (or is not) greater than the sum of its parts”. In addi-
tion, consider that the knowledge of the posterior comes
from a combination of the knowledge of the prior and p(σ 2 | X) ∝ p(X | σ 2 )p(σ 2 )
likelihood, so it makes sense that we are more certain of [ ]
( ) n2 [ ] 2 ν0 ν0 exp −ν0 σ02
it than of either of its components.) 1 S (σ0 2 ) 2 2σ 2
= 2
exp − 2 ( ν0 ) ν0
The above formula reveals why it is more convenient 2πσ 2σ Γ 2 2
(σ ) 21+
ν0′ = ν0 + n
′ 1
σ02 = ′ ∑
n
n
σ2 + 1
σ02 ν0′ σ02 = ν0 σ02 + (xi − µ)2
nx̄ µ0 i=1
σ2 + σ02
µ′0 = n 1
or equivalently
σ2 + σ02
1∑
n
x̄ = xi ν0′ = ν0 + n
n i=1 ∑n
′ ν0 σ02 + i=1 (xi − µ)2
σ02 =
ν0 + n
12.4 With known mean Reparameterizing in terms of an inverse gamma distribu-
tion, the result is:
For a set of i.i.d. normally distributed data points X
of size n where each individual point x follows x ∼ ′ n
N (µ, σ 2 ) with known mean μ, the conjugate prior of the α = α + 2
variance has an inverse gamma distribution or a scaled ∑n
i=1 (xi − µ)
2
′
inverse chi-squared distribution. The two are equivalent β = β + 2
except for having different parameterizations. Although
the inverse gamma is more commonly used, we use the
scaled inverse chi-squared for the sake of convenience. 12.5 With unknown mean and unknown
The prior for σ2 is as follows: variance
For a set of i.i.d. normally distributed data points X
[ ] [ ] of size n where each individual point x follows x ∼
−ν0 σ02 −ν0 σ02
(σ 2 ν0 ) 2 exp exp
ν0
2σ 2 N (µ, σ 2 ) with unknown mean μ and unknown variance
2σ 2
p(σ 2 | ν0 , σ02 ) = 0(2ν0 ) ν0 ∝ ν0 2
Γ 2 (σ 2 )1+ 2 (σ 2 )1+ 2 σ , a combined (multivariate) conjugate prior is placed
over the mean and variance, consisting of a normal-
The likelihood function from above, written in terms of inverse-gamma distribution. Logically, this originates as
the variance, is: follows:
14 12 BAYESIAN ANALYSIS OF THE NORMAL DISTRIBUTION
1. From the analysis of the case with unknown mean 6. This leads immediately to the normal-inverse-
but known variance, we see that the update equa- gamma distribution, which is the product of the two
tions involve sufficient statistics computed from the distributions just defined, with conjugate priors used
data consisting of the mean of the data points and the (an inverse gamma distribution over the variance,
total variance of the data points, computed in turn and a normal distribution over the mean, conditional
from the known variance divided by the number of on the variance) and with the same four parameters
data points. just defined.
ble. x̄ = xi
n i=1
4. To handle the case where both mean and variance n0 µ0 + nx̄
µ′0 =
are unknown, we could place independent priors n0 + n
over the mean and variance, with fixed estimates of ′
n0 = n0 + n
the average mean, total variance, number of data ν0′ = ν0 + n
points used to compute the variance prior, and sum
′ ∑n
n0 n
of squared deviations. Note however that in reality, ν0′ σ02 = ν0 σ02 + (xi − x̄)2 + (µ0 − x̄)2
the total variance of the mean depends on the un- i=1
n 0 + n
known variance, and the sum of squared deviations
that goes into the variance prior (appears to) depend The respective numbers of pseudo-observations add the
on the unknown mean. In practice, the latter depen- number of actual observations to them. The new mean
dence is relatively unimportant: Shifting the actual hyperparameter is once again a weighted average, this
mean shifts the generated points by an equal amount, time weighted by the relative numbers of observations.
′
and on average the squared deviations will remain Finally, the update for ν0′ σ02 is similar to the case with
the same. This is not the case, however, with the known mean, but in this case the sum of squared devi-
total variance of the mean: As the unknown vari- ations is taken with respect to the observed data mean
ance increases, the total variance of the mean will rather than the true mean, and as a result a new “interac-
increase proportionately, and we would like to cap- tion term” needs to be added to take care of the additional
ture this dependence. error source stemming from the deviation between prior
and data mean.
5. This suggests that we create a conditional prior of the
[Proof]
mean on the unknown variance, with a hyperparam-
eter specifying the mean of the pseudo-observations
associated with the prior, and another parameter The prior distributions are
specifying the number of pseudo-observations. This
number serves as a scaling parameter on the vari-
1 ( n )
ance, making it possible to control the overall vari- 0
p(µ | σ 2 ; µ0 , n0 ) ∼ N (µ0 , σ 2 /n0 ) = √ exp − 2 (µ − µ0 )2
ance of the mean relative to the actual variance 2π nσ0
2 2σ
parameter. The prior for the variance also has ( n )
two hyperparameters, one specifying the sum of ∝ (σ 2 )−1/2 exp − 2 (µ − µ0 )2
0
( )n/2 [ ( )]
1 1 ∑
n
p(X | µ, σ ) =
2
exp − 2 (xi − x̄)2 + n(x̄ − µ)2
2πσ 2 2σ i=1
[ ]
2 −n/2 1 ( )
∝σ exp − 2 S + n(x̄ − µ) 2
2σ
∑n
where S = i=1 (xi − x̄)2 .
Therefore, the posterior is (dropping the hyperparameters
as conditioning factors):
normal. The normal approximation will not be valid if • Measures of size of living tissue (length,
the effects act multiplicatively (instead of additively), or height, skin area, weight);[45]
if there is a single external influence that has a consider-
• The length of inert appendages (hair, claws,
ably larger magnitude than the rest of the effects.
nails, teeth) of biological specimens, in the di-
rection of growth; presumably the thickness of
• In counting problems, where the central limit the-
tree bark also falls under this category;
orem includes a discrete-to-continuum approxima-
tion and where infinitely divisible and decomposable • Certain physiological measurements, such as
distributions are involved, such as blood pressure of adult humans.
• Binomial random variables, associated with • In finance, in particular the Black–Scholes model,
binary response variables; changes in the logarithm of exchange rates, price in-
• Poisson random variables, associated with rare dices, and stock market indices are assumed normal
events; (these variables behave like compound interest, not
like simple interest, and so are multiplicative). Some
• Thermal radiation has a Bose–Einstein distribution mathematicians such as Benoit Mandelbrot have ar-
on very short time scales, and a normal distribution gued that log-Levy distributions, which possesses
on longer timescales due to the central limit theo- heavy tails would be a more appropriate model, in
rem. particular for the analysis for stock market crashes.
The use of the assumption of normal distribution oc-
13.3 Assumed normality curring in financial models has also been criticized
by Nassim Nicholas Taleb in his works.
There are statistical methods to empirically test that as- • In standardized testing, results can be made to have
sumption, see the above Normality tests section. a normal distribution by either selecting the number
and difficulty of questions (as in the IQ test) or trans-
• In biology, the logarithm of various variables tend forming the raw test scores into “output” scores by
to have a normal distribution, that is, they tend to fitting them to the normal distribution. For exam-
have a log-normal distribution (after separation on ple, the SAT's traditional range of 200–800 is based
male/female subpopulations), with examples includ- on a normal distribution with a mean of 500 and a
ing: standard deviation of 100.
17
• Many scores are derived from the normal distri- below all generate the standard normal deviates, since a
bution, including percentile ranks (“percentiles” or N(μ, σ2
“quantiles”), normal curve equivalents, stanines, ) can be generated as X = μ + σZ, where Z is stan-
z-scores, and T-scores. Additionally, some be- dard normal. All these algorithms rely on the availability
havioral statistical procedures assume that scores of a random number generator U capable of producing
are normally distributed; for example, t-tests and uniform random variates.
ANOVAs. Bell curve grading assigns relative grades
based on a normal distribution of scores. • The most straightforward method is based on the
probability integral transform property: if U is dis-
• In hydrology the distribution of long duration river
tributed uniformly on (0,1), then Φ−1 (U) will have
discharge or rainfall, e.g. monthly and yearly totals,
the standard normal distribution. The drawback of
is often thought to be practically normal according
this method is that it relies on calculation of the
to the central limit theorem.[47] The blue picture il-
probit function Φ−1 , which cannot be done analyt-
lustrates an example of fitting the normal distribu-
ically. Some approximate methods are described in
tion to ranked October rainfalls showing the 90%
Hart (1968) and in the erf article. Wichura gives
confidence belt based on the binomial distribution.
a fast algorithm for computing this function to 16
The rainfall data are represented by plotting posi-
decimal places,[48] which is used by R to compute
tions as part of the cumulative frequency analysis.
random variates of the normal distribution.
• An easy to program approximate approach, that re-
13.4 Produced normality lies on the central limit theorem, is as follows: gen-
erate 12 uniform U(0,1) deviates, add them all up,
In regression analysis, lack of normality in residuals sim- and subtract 6 – the resulting random variable will
ply indicates that the model postulated is inadequate in have approximately standard normal distribution. In
accounting for the tendency in the data and needs to be truth, the distribution will be Irwin–Hall, which is
augmented; in other words, normality in residuals can al- a 12-section eleventh-order polynomial approxima-
ways be achieved given a properly constructed model. tion to the normal distribution. This random deviate
will have a limited range of (−6, 6).[49]
14 Generating values from normal • The Box–Muller method uses two independent ran-
dom numbers U and V distributed uniformly on
distribution (0,1). Then the two random variables X and Y
√ √
X= −2 ln U cos(2πV ), Y = −2 ln U sin(2πV ).
are returned. Again, X and Y will be indepen- The values Φ(x) may be approximated very accurately
dent and standard normally distributed. by a variety of methods, such as numerical integration,
Taylor series, asymptotic series and continued fractions.
• The Ratio method is a rejection method. The al- Different approximations are used depending on the de-
[50]
• Generate two independent uniform deviates U • A very simple and practical approximation is given
and V; by Bell [56] with a maximum absolute error of 0.003:
{ [ ]1/2 }
• Compute X = √8/e (V − 0.5)/U; 1 −2x2 /π
Φ(x) ≈ 1 + sign(x) 1 − e
• Optional: if X2 ≤ 5 − 4e1/4 U then accept X 2
and terminate algorithm; The inverse is also easily obtained. The inverse nor-
• Optional: if X ≥ 4e
2 −1.35
/U + 1.4 then reject mal formula is...
X and start over from step 1;
{
• If X2 ≤ −4 lnU then accept X, otherwise start (−1.57079632679 ln(1 − (2x − 1)2 ))1/2 , x > 0.5,
over the algorithm. Φ−1 (x) ≈
(−1.57079632679 ln(1 − (2x)2 ))1/2 , otherwise.
The two optional steps allow the evaluation of Applying the following correction to the distribu-
the logarithm in the last step to be avoided tion’s tails...
in most cases. These steps can be greatly if abs(.5-CDF)>.321 then do; if CDF>.5 then x=
improved[51] so that the logarithm is rarely 1.0032*( x)^1.0362; else x=−1.0032*(-x)^1.0362;
evaluated. end; guarantees an absolute relative error < 1.42% in
x, for CDF in [.00001,.99999]. All of this is easily
• The ziggurat algorithm[52] is faster than the Box– confirmed for a range of x of nearly 9 sigma.
Muller transform and still exact. In about 97% of • Zelen & Severo (1964) give the approximation for
all cases it uses only two random numbers, one ran- Φ(x) for x > 0 with the absolute error | ε(x) | <
dom integer and one random uniform, one multipli- 7.5·10−8 (algorithm 26.2.17):
cation and an if-test. Only in 3% of the cases, where ( ) 1
the combination of those two falls outside the “core Φ(x) = 1−ϕ(x) b1 t + b2 t2 + b3 t3 + b4 t4 + b5 t5 +ε(x), t=
of the ziggurat” (a kind of rejection sampling using 1+b
logarithms), do exponentials and more uniform ran- where ϕ(x) is the standard normal PDF, and b 0 =
dom numbers have to be employed. 0.2316419, b1 = 0.319381530, b2 = −0.356563782,
b3 = 1.781477937, b4 = −1.821255978, b5 =
• Integer arithmetic can be used to sample from the 1.330274429.
standard normal distribution.[53] This method is ex-
act in the sense that it satisfies the conditions of ideal • Hart (1968) lists almost a hundred of rational func-
[54]
approximation; i.e., it is equivalent to sampling a tion approximations for the erfc() function. His al-
real number from the standard normal distribution gorithms vary in the degree of complexity and the
and rounding this to the nearest representable float- resulting precision, with maximum absolute preci-
ing point number. sion of 24 digits. An algorithm by West (2009) com-
bines Hart’s algorithm 5666 with a continued frac-
• There is also some investigation[55] into the con- tion approximation in the tail to provide a fast com-
nection between the fast Hadamard transform and putation algorithm with a 16-digit precision.
the normal distribution, since the transform employs
• Cody (1969) after recalling Hart68 solution is not
just addition and subtraction and by the central limit
suited for erf, gives a solution for both erf and
theorem random numbers from almost any distribu-
erfc, with maximal relative error bound, via Rational
tion will be transformed into the normal distribution.
Chebyshev Approximation.
In this regard a series of Hadamard transforms can
be combined with random permutations to turn ar- • Marsaglia (2004) suggested a simple algorithm[nb 1]
bitrary data sets into a normally distributed data. based on the Taylor series expansion
( )
1 x3 x5 x7 x9
Φ(x) = +ϕ(x) x + + + + + ···
2 3 3·5 3·5·7 3·5·7·9
15 Numerical approximations for
for calculating Φ(x) with arbitrary precision. The
the normal CDF drawback of this algorithm is comparatively slow
calculation time (for example it takes over 300 it-
The standard normal CDF is widely used in scientific and erations to calculate the function with 16 digits of
statistical computing. precision when x = 10).
16.1 Development 19
• The GNU Scientific Library calculates values of the tium" where among other things he introduces several im-
standard normal CDF using Hart’s algorithms and portant statistical concepts, such as the method of least
approximations with Chebyshev polynomials. squares, the method of maximum likelihood, and the nor-
mal distribution. Gauss used M, M′, M′′, … to denote the
Some more approximations can be found at: Error func- measurements of some unknown quantity V, and sought
tion#Approximation with elementary functions. the “most probable” estimator: the one that maximizes
the probability φ(M−V) · φ(M′−V) · φ(M′′−V) · … of
obtaining the observed experimental results. In his no-
tation φΔ is the probability law of the measurement er-
16 History rors of magnitude Δ. Not knowing what the function φ
is, Gauss requires that his method should reduce to the
16.1 Development well-known answer: the arithmetic mean of the measured
values.[nb 3] Starting from these principles, Gauss demon-
Some authors [57][58]
attribute the credit for the discovery strates that the only law that rationalizes the choice of
of the normal distribution to de Moivre, who in 1738[nb 2] arithmetic mean as an estimator of the location param-
[61]
published in the second edition of his "The Doctrine of eter, is the normal law of errors:
Chances" the study of the coefficients in the binomial ex- φ = √h e−hh∆∆ ,
π
pansion of (a + b)n . De Moivre proved that the middle
term where h is “the measure of the precision of the obser-
√ in this expansion has the approximate magnitude of
2/ 2πn , and that “If m or ½n be a Quantity infinitely vations”. Using this normal law as a generic model for
great, then the Logarithm of the Ratio, which a Term dis- errors in the experiments, Gauss formulates what is now
tant from the middle by the Interval ℓ, has to the middle known as the non-linear weighted least squares (NWLS)
[62]
Term, is − 2ℓℓn .”
[59]
Although this theorem can be inter- method.
preted as the first obscure expression for the normal prob-
ability law, Stigler points out that de Moivre himself did
not interpret his results as anything more than the approx-
imate rule for the binomial coefficients, and in particular
de Moivre lacked the concept of the probability density
function.[60]
in 1782, providing the normalization constant for the nor- cation parameter to the formula for normal distribution,
mal distribution.[64] Finally, it was Laplace who in 1810 expressing it in the way it is written nowadays:
proved and presented to the Academy the fundamental
central limit theorem, which emphasized the theoretical
importance of the normal distribution.[65] 1
e−(x−m) /(2σ ) dx
2 2
df = √
2
2σ π
It is of interest to note that in 1809 an American mathe-
matician Adrain published two derivations of the normal
The term “standard normal”, which denotes the normal
probability law, simultaneously and independently from
[66] distribution with zero mean and unit variance came into
Gauss. His works remained largely unnoticed by the
general use around the 1950s, appearing in the popular
scientific community, until in 1871 they were “rediscov-
[67] textbooks by P.G. Hoel (1947) "Introduction to mathe-
ered” by Abbe.
matical statistics" and A.M. Mood (1950) "Introduction
In the middle of the 19th century Maxwell demon- to the theory of statistics".[72]
strated that the normal distribution is not just a conve-
When the name is used, the “Gaussian distribution” was
nient mathematical tool, but may also occur in natural
[68] named after Carl Friedrich Gauss, who introduced the
phenomena: “The number of particles whose velocity,
distribution in 1809 as a way of rationalizing the method
resolved in a certain direction, lies between x and x + dx
of least squares as outlined above. Among English speak-
is
ers, both “normal distribution” and “Gaussian distribu-
tion” are in common use, with different terms preferred
by different communities.
1 x2
N √ e− α2 dx
α π
17 See also
16.2 Naming
• Behrens–Fisher problem — the long-standing prob-
Since its introduction, the normal distribution has been lem of testing whether two normal samples with dif-
known by many different names: the law of error, the ferent variances have same means;
law of facility of errors, Laplace’s second law, Gaussian
law, etc. Gauss himself apparently coined the term with • Bhattacharyya distance – method used to separate
reference to the “normal equations” involved in its ap- mixtures of normal distributions
plications, with normal having its technical meaning of
orthogonal rather than “usual”.[69] However, by the end • Erdős–Kac theorem—on the occurrence of the nor-
of the 19th century some authors[nb 5] had started using mal distribution in number theory
the name normal distribution, where the word “normal”
was used as an adjective – the term now being seen as a • Gaussian blur—convolution, which uses the normal
reflection of the fact that this distribution was seen as typ- distribution as a kernel
ical, common – and thus “normal”. Peirce (one of those
authors) once defined “normal” thus: "...the 'normal' is • Sum of normally distributed random variables
not the average (or any other kind of mean) of what ac-
tually occurs, but of what would, in the long run, occur • Normally distributed and uncorrelated does not im-
under certain circumstances.”[70] Around the turn of the ply independent
20th century Pearson popularized the term normal as a
• Tweedie distribution — The normal distribution is
designation for this distribution.[71]
a member of the family of Tweedie exponential dis-
persion models
Many years ago I called the Laplace–
Gaussian curve the normal curve, which • Z-test— using the normal distribution
name, while it avoids an international question
of priority, has the disadvantage of leading • Rayleigh distribution
people to believe that all other distributions
of frequency are in one sense or another • Multivariate normal distribution — a generalization
'abnormal'. of the normal distribution in multiple dimensions
— Pearson (1920)
18 Notes
Also, it was Pearson who first wrote the distribution in
terms of the standard deviation σ as in modern nota- [1] For example, this algorithm is given in the article Bc pro-
tion. Soon after this, in year 1915, Fisher added the lo- gramming language.
21
[2] De Moivre first published his findings in 1733, in a pam- [17] Barak, Ohad (April 6, 2006). “Q Function and Error
phlet “Approximatio ad Summam Terminorum Binomii Function” (PDF). Tel Aviv University.
(a + b)n in Seriem Expansi” that was designated for pri-
vate circulation only. But it was not until the year 1738 [18] Weisstein, Eric W. “Normal Distribution Function”.
that he made his results publicly available. The original MathWorld.
pamphlet was reprinted several times, see for example [19] WolframAlpha.com
Walker (1985).
[20] part 1, part 2
[3] “It has been customary certainly to regard as an axiom
the hypothesis that if any quantity has been determined [21] Normal Approximation to Poisson(λ) Distribution, http:
by several direct observations, made under the same cir- //www.stat.ucla.edu/
cumstances and with equal care, the arithmetical mean of
the observed values affords the most probable value, if not [22] Cover & Thomas (2006, p. 254)
rigorously, yet very nearly at least, so that it is always most [23] Williams, D. (2001) Weighing the Odds Cambridge UP
safe to adhere to it.” — Gauss (1809, section 177) ISBN 0-521-00618-X (pages 197-199)
[4] “My custom of terming the curve the Gauss–Laplacian [24] Bernardo, J.M., Smith, A.F.M. (2000) Bayesian Theory'.'
or normal curve saves us from proportioning the merit of Wiley. ISBN 0-471-49464-X (pages 209, 366)
discovery between the two great astronomer mathemati-
cians.” quote from Pearson (1905, p. 189) [25] O'Hagan, A. (1994) Kendall’s Advanced Theory of statis-
tics, Vol 2B, Bayesian Inference, Edward Arnold. ISBN
[5] Besides those specifically referenced here, such use is en- 0-340-52922-9 (Section 5.40)
countered in the works of Peirce, Galton (Galton (1889,
chapter V)) and Lexis (Lexis (1878), Rohrbasser & Véron [26] Bryc (1995, p. 27)
(2003)) c. 1875.
[27] Patel & Read (1996, [2.3.6])
[1] Normal Distribution, Gale Encyclopedia of Psychology [30] Lukacs & King (1954)
[2] Casella & Berger (2001, p. 102) [31] Quine, M.P. (1993). “On three characterisations of the
normal distribution”. Probability and Mathematical Statis-
[3] Lyon, A. (2014). Why are Normal Distributions Nor- tics. 14 (2): 257–263.
mal?, The British Journal for the Philosophy of Science.
[32] UIUC, Lecture 21. The Multivariate Normal Distribution,
[4] For the proof see Gaussian integral 21.6:"Individually Gaussian Versus Jointly Gaussian”.
[5] Stigler (1982) [33] Edward L. Melnick and Aaron Tenenbein, “Misspecifica-
tions of the Normal Distribution”, The American Statisti-
[6] Halperin, Hartley & Hoel (1965, item 7) cian, volume 36, number 4 November 1982, pages 372–
373
[7] McPherson (1990, p. 110)
[34] http://www.allisons.org/ll/MML/KL/Normal/
[8] Bernardo & Smith (2000), p. 121
[35] Jordan, Michael I. (February 8, 2010). “Stat260:
[9] Cover, Thomas M.; Thomas, Joy A. (2006). Elements of Bayesian Modeling and Inference: The Conjugate Prior
Information Theory. John Wiley and Sons. p. 254. for the Normal Distribution” (PDF).
[10] Park, Sung Y.; Bera, Anil K. (2009). “Maximum [36] Amari & Nagaoka (2000)
Entropy Autoregressive Conditional Heteroskedasticity
[37] Normal Product Distribution, Mathworld
Model” (PDF). Journal of Econometrics. Elsevier. 150
(2): 219–230. doi:10.1016/j.jeconom.2008.12.014. Re- [38] Lukacs, Eugene (1942). “A Characterization of the Nor-
trieved 2011-06-02. mal Distribution”. The Annals of Mathematical Statis-
tics. Institute of Mathematical Statistics. 13 (1): 91–
[11] Patel & Read (1996, [2.1.4])
3. doi:10.1214/aoms/1177731647. ISSN 0003-4851.
[12] Fan (1991, p. 1258) JSTOR 2236166 – via JSTOR. (registration required
(help)).
[13] Patel & Read (1996, [2.1.8])
[39] Basu, D.; Laha, R. G. (1954). “On Some Characteriza-
[14] Bryc (1995, p. 23) tions of the Normal Distribution”. Sankhyā. Indian Statis-
tical Institute. 13 (4): 359–62. ISSN 0036-4452. JSTOR
[15] Bryc (1995, p. 24) 25048183 – via JSTOR. (registration required (help)).
[16] Scott, Clayton; Nowak, Robert (August 7, 2003). “The [40] Lehmann, E. L. (1997). Testing Statistical Hypotheses
Q-function”. Connexions. (2nd ed.). Springer. p. 199. ISBN 0-387-94919-4.
22 20 REFERENCES
[41] John, S (1982). “The three parameter two-piece nor- [68] Maxwell (1860, p. 23)
mal family of distributions and its fitting”. Communica-
tions in statistics - Theory and Methods. 11 (8): 879–885. [69] Jaynes, Edwin J.; Probability Theory: The Logic of Sci-
doi:10.1080/03610928208828279. ence, Ch 7
[42] Krishnamoorthy (2006, p. 127) [70] Peirce, Charles S. (c. 1909 MS), Collected Papers v. 6,
paragraph 327
[43] Krishnamoorthy (2006, p. 130)
[71] Kruskal & Stigler (1997)
[44] Krishnamoorthy (2006, p. 133)
[72] “Earliest uses… (entry STANDARD NORMAL
[45] Huxley (1932) CURVE)".
[56] Bell, Jeff (2015). “A Simple and Pragmatic Approxima- • Cody, William J. (1969). "Rational Chebyshev
tion to the Normal Cumulative Probability Distribution”. Approximations for the Error Function". Math-
SSRN Electronic Journal. doi:10.2139/ssrn.2579686. ematics of Computation. 23 (107): 631–638.
doi:10.1090/S0025-5718-1969-0247736-4.
[57] Johnson, Kotz & Balakrishnan (1994, p. 85)
• Gauss, Carolo Friderico (1809). Theoria motvs cor- • Laplace, Pierre-Simon de (1774). “Mémoire sur
porvm coelestivm in sectionibvs conicis Solem ambi- la probabilité des causes par les événements”. Mé-
entivm [Theory of the Motion of the Heavenly Bodies moires de l'Académie royale des Sciences de Paris
Moving about the Sun in Conic Sections] (in Latin). (Savants étrangers), tome 6: 621–656. Translated by
English translation. Stephen M. Stigler in Statistical Science 1 (3), 1986:
JSTOR 2245476.
• Gould, Stephen Jay (1981). The Mismeasure of Man
(first ed.). W. W. Norton. ISBN 0-393-01489-4. • Laplace, Pierre-Simon (1812). Théorie analytique
des probabilités [Analytical theory of probabilities].
• Halperin, Max; Hartley, Herman O.; Hoel, Paul
G. (1965). “Recommended Standards for Statis- • Le Cam, Lucien; Lo Yang, Grace (2000). Asymp-
tical Symbols and Notation. COPSS Committee totics in Statistics: Some Basic Concepts (second ed.).
on Symbols and Notation”. The American Statisti- Springer. ISBN 0-387-95036-2.
cian. 19 (3): 12–14. doi:10.2307/2681417. JSTOR
2681417. • Leva, Joseph L. (1992). “A fast normal ran-
dom number generator”. ACM Transactions
• Hart, John F.; et al. (1968). Computer Approxi-
on Mathematical Software. 18 (4): 449–453.
mations. New York, NY: John Wiley & Sons, Inc.
doi:10.1145/138351.138364.
ISBN 0-88275-642-7.
• Hazewinkel, Michiel, ed. (2001), “Normal Dis- • Lexis, Wilhelm (1878). “Sur la durée normale de
tribution”, Encyclopedia of Mathematics, Springer, la vie humaine et sur la théorie de la stabilité des
ISBN 978-1-55608-010-4 rapports statistiques”. Annales de démographie in-
ternationale. Paris. II: 447–462.
• Herrnstein, Richard J.; Murray, Charles (1994).
The Bell Curve: Intelligence and Class Structure in • Lukacs, Eugene; King, Edgar P. (1954). “A
American Life. Free Press. ISBN 0-02-914673-9. Property of Normal Distribution”. The Annals
of Mathematical Statistics. 25 (2): 389–394.
• Huxley, Julian S. (1932). Problems of Relative doi:10.1214/aoms/1177728796. JSTOR 2236741.
Growth. London. ISBN 0-486-61114-0. OCLC
476909537. • McPherson, Glen (1990). Statistics in Scientific In-
vestigation: Its Basis, Application and Interpretation.
• Johnson, Norman L.; Kotz, Samuel; Balakrish- Springer-Verlag. ISBN 0-387-97137-8.
nan, Narayanaswamy (1994). Continuous Univari-
ate Distributions, Volume 1. Wiley. ISBN 0-471- • Marsaglia, George; Tsang, Wai Wan (2000). “The
58495-9. Ziggurat Method for Generating Random Vari-
ables”. Journal of Statistical Software. 5 (8).
• Johnson, Norman L.; Kotz, Samuel; Balakrish-
doi:10.18637/jss.v005.i08.
nan, Narayanaswamy (1995). Continuous Univari-
ate Distributions, Volume 2. Wiley. ISBN 0-471-
• Marsaglia, George (2004). “Evaluating the Normal
58494-0.
Distribution”. Journal of Statistical Software. 11
• Karney, C. F. F. (2016). “Sampling exactly (4). doi:10.18637/jss.v011.i04.
from the normal distribution”. ACM Transac-
tions on Mathematical Software. 42 (1): 3:1–14. • Maxwell, James Clerk (1860). “V. Illustrations of
the dynamical theory of gases. — Part I: On the
arXiv:1303.6257 . doi:10.1145/2710016.
motions and collisions of perfectly elastic spheres”.
• Kinderman, Albert J.; Monahan, John F. (1977). Philosophical Magazine, series 4. 19 (124): 19–32.
“Computer Generation of Random Variables Us- doi:10.1080/14786446008642818.
ing the Ratio of Uniform Deviates”. ACM Trans-
actions on Mathematical Software. 3 (3): 257–260. • Monahan, J. F. (1985). “Accuracy in random num-
doi:10.1145/355744.355750. ber generation”. Mathematics of Computation. 45
(172): 559–568. doi:10.1090/S0025-5718-1985-
• Krishnamoorthy, Kalimuthu (2006). Handbook of 0804945-X.
Statistical Distributions with Applications. Chapman
& Hall/CRC. ISBN 1-58488-635-8. • Patel, Jagdish K.; Read, Campbell B. (1996). Hand-
book of the Normal Distribution (2nd ed.). CRC
• Kruskal, William H.; Stigler, Stephen M. (1997). Press. ISBN 0-8247-9342-0.
Spencer, Bruce D., ed. Normative Terminology:
'Normal' in Statistics and Elsewhere. Statistics and • Pearson, Karl (1901). “On Lines and Planes of
Public Policy. Oxford University Press. ISBN 0- Closest Fit to Systems of Points in Space” (PDF).
19-852341-6. Philosophical Magazine. 6. 2: 559–572.
24 21 EXTERNAL LINKS
• Pearson, Karl (1905). "'Das Fehlergesetz und • Normal Distribution Video Tutorial Part 1-2 on
seine Verallgemeinerungen durch Fechner und Pear- YouTube
son'. A rejoinder”. Biometrika. 4 (1): 169–212.
doi:10.2307/2331536. JSTOR 2331536. • Normal distribution calculator
• Pearson, Karl (1920). “Notes on the History • An 8-foot-tall (2.4 m) Probability Machine (named
of Correlation”. Biometrika. 13 (1): 25–45. Sir Francis) comparing stock market returns to the
doi:10.1093/biomet/13.1.25. JSTOR 2331722. randomness of the beans dropping through the quin-
cunx pattern. on YouTube Link originating from
• Rohrbasser, Jean-Marc; Véron, Jacques (2003). Index Fund Advisors
“Wilhelm Lexis: The Normal Length of Life as an
Expression of the “Nature of Things"". Population.
58 (3): 303–322. doi:10.3917/pope.303.0303.
21 External links
• Hazewinkel, Michiel, ed. (2001), “Normal distribu-
tion”, Encyclopedia of Mathematics, Springer, ISBN
978-1-55608-010-4
25
22.2 Images
• File:Carl_Friedrich_Gauss.jpg Source: https://upload.wikimedia.org/wikipedia/commons/9/9b/Carl_Friedrich_Gauss.jpg License:
Public domain Contributors: Gauß-Gesellschaft Göttingen e.V. (Foto: A. Wittmann). Original artist: After Christian Albrecht Jensen
• File:Commons-logo.svg Source: https://upload.wikimedia.org/wikipedia/en/4/4a/Commons-logo.svg License: CC-BY-SA-3.0 Contribu-
tors: ? Original artist: ?
• File:De_moivre-laplace.gif Source: https://upload.wikimedia.org/wikipedia/commons/0/06/De_moivre-laplace.gif License: Public do-
main Contributors: Own work Original artist: Stpasha
• File:Dice_sum_central_limit_theorem.svg Source: https://upload.wikimedia.org/wikipedia/commons/8/8c/Dice_sum_central_limit_
theorem.svg License: CC BY-SA 3.0 Contributors: Own work Original artist: Cmglee
• File:Empirical_Rule.PNG Source: https://upload.wikimedia.org/wikipedia/commons/a/a9/Empirical_Rule.PNG License: CC BY-SA
4.0 Contributors: Own work Original artist: Dan Kernler
26 22 TEXT AND IMAGE SOURCES, CONTRIBUTORS, AND LICENSES