HOME

TheInfoList



OR:

In
statistics Statistics (from German language, German: ''wikt:Statistik#German, Statistik'', "description of a State (polity), state, a country") is the discipline that concerns the collection, organization, analysis, interpretation, and presentation of ...
, a normal distribution or Gaussian distribution is a type of
continuous probability distribution In probability theory and statistics, a probability distribution is the mathematical function that gives the probabilities of occurrence of different possible outcomes for an experiment. It is a mathematical description of a random phenomenon i ...
for a
real-valued In mathematics, value may refer to several, strongly related notions. In general, a mathematical value may be any definite mathematical object. In elementary mathematics, this is most often a number – for example, a real number such as or an i ...
random variable A random variable (also called random quantity, aleatory variable, or stochastic variable) is a mathematical formalization of a quantity or object which depends on random events. It is a mapping or a function from possible outcomes (e.g., the po ...
. The general form of its
probability density function In probability theory, a probability density function (PDF), or density of a continuous random variable, is a function whose value at any given sample (or point) in the sample space (the set of possible values taken by the random variable) can ...
is : f(x) = \frac e^ The parameter \mu is the
mean There are several kinds of mean in mathematics, especially in statistics. Each mean serves to summarize a given group of data, often to better understand the overall value (magnitude and sign) of a given data set. For a data set, the ''arithme ...
or expectation of the distribution (and also its
median In statistics and probability theory, the median is the value separating the higher half from the lower half of a data sample, a population, or a probability distribution. For a data set, it may be thought of as "the middle" value. The basic fe ...
and
mode Mode ( la, modus meaning "manner, tune, measure, due measure, rhythm, melody") may refer to: Arts and entertainment * '' MO''D''E (magazine)'', a defunct U.S. women's fashion magazine * ''Mode'' magazine, a fictional fashion magazine which is ...
), while the parameter \sigma is its
standard deviation In statistics, the standard deviation is a measure of the amount of variation or dispersion of a set of values. A low standard deviation indicates that the values tend to be close to the mean (also called the expected value) of the set, while ...
. The
variance In probability theory and statistics, variance is the expectation of the squared deviation of a random variable from its population mean or sample mean. Variance is a measure of dispersion, meaning it is a measure of how far a set of numbers ...
of the distribution is \sigma^2. A random variable with a Gaussian distribution is said to be normally distributed, and is called a normal deviate. Normal distributions are important in
statistics Statistics (from German language, German: ''wikt:Statistik#German, Statistik'', "description of a State (polity), state, a country") is the discipline that concerns the collection, organization, analysis, interpretation, and presentation of ...
and are often used in the
natural Nature, in the broadest sense, is the physical world or universe. "Nature" can refer to the phenomena of the physical world, and also to life in general. The study of nature is a large, if not the only, part of science. Although humans are p ...
and
social science Social science is one of the branches of science, devoted to the study of societies and the relationships among individuals within those societies. The term was formerly used to refer to the field of sociology, the original "science of soc ...
s to represent real-valued
random variable A random variable (also called random quantity, aleatory variable, or stochastic variable) is a mathematical formalization of a quantity or object which depends on random events. It is a mapping or a function from possible outcomes (e.g., the po ...
s whose distributions are not known. Their importance is partly due to the
central limit theorem In probability theory, the central limit theorem (CLT) establishes that, in many situations, when independent random variables are summed up, their properly normalized sum tends toward a normal distribution even if the original variables themselv ...
. It states that, under some conditions, the average of many samples (observations) of a random variable with finite mean and variance is itself a random variable—whose distribution converges to a normal distribution as the number of samples increases. Therefore, physical quantities that are expected to be the sum of many independent processes, such as
measurement error Observational error (or measurement error) is the difference between a measured value of a quantity and its true value.Dodge, Y. (2003) ''The Oxford Dictionary of Statistical Terms'', OUP. In statistics, an error is not necessarily a " mistake ...
s, often have distributions that are nearly normal. Moreover, Gaussian distributions have some unique properties that are valuable in analytic studies. For instance, any linear combination of a fixed collection of normal deviates is a normal deviate. Many results and methods, such as
propagation of uncertainty In statistics, propagation of uncertainty (or propagation of error) is the effect of variables' uncertainties (or errors, more specifically random errors) on the uncertainty of a function based on them. When the variables are the values of exp ...
and
least squares The method of least squares is a standard approach in regression analysis to approximate the solution of overdetermined systems (sets of equations in which there are more equations than unknowns) by minimizing the sum of the squares of the res ...
parameter fitting, can be derived analytically in explicit form when the relevant variables are normally distributed. A normal distribution is sometimes informally called a bell curve. However, many other distributions are bell-shaped (such as the
Cauchy Baron Augustin-Louis Cauchy (, ; ; 21 August 178923 May 1857) was a French mathematician, engineer, and physicist who made pioneering contributions to several branches of mathematics, including mathematical analysis and continuum mechanics. He w ...
, Student's ''t'', and logistic distributions). For other names, see
Naming Naming is assigning a name to something. Naming may refer to: * Naming (parliamentary procedure), a procedure in certain parliamentary bodies * Naming ceremony, an event at which an infant is named * Product naming, the discipline of deciding wha ...
. The univariate probability distribution is generalized for vectors in the
multivariate normal distribution In probability theory and statistics, the multivariate normal distribution, multivariate Gaussian distribution, or joint normal distribution is a generalization of the one-dimensional (univariate) normal distribution to higher dimensions. One d ...
and for matrices in the
matrix normal distribution In statistics, the matrix normal distribution or matrix Gaussian distribution is a probability distribution that is a generalization of the multivariate normal distribution to matrix-valued random variables. Definition The probability density ...
.


Definitions


Standard normal distribution

The simplest case of a normal distribution is known as the ''standard normal distribution'' or ''unit normal distribution''. This is a special case when \mu=0 and \sigma =1, and it is described by this
probability density function In probability theory, a probability density function (PDF), or density of a continuous random variable, is a function whose value at any given sample (or point) in the sample space (the set of possible values taken by the random variable) can ...
(or density): :\varphi(z) = \frac The variable z has a mean of 0 and a variance and standard deviation of 1. The density \varphi(z) has its peak 1/\sqrt at z=0 and
inflection point In differential calculus and differential geometry, an inflection point, point of inflection, flex, or inflection (British English: inflexion) is a point on a smooth plane curve at which the curvature changes sign. In particular, in the case of ...
s at z=+1 and z=-1. Although the density above is most commonly known as the ''standard normal,'' a few authors have used that term to describe other versions of the normal distribution.
Carl Friedrich Gauss Johann Carl Friedrich Gauss (; german: Gauß ; la, Carolus Fridericus Gauss; 30 April 177723 February 1855) was a German mathematician and physicist who made significant contributions to many fields in mathematics and science. Sometimes refer ...
, for example, once defined the standard normal as :\varphi(z) = \frac which has a variance of 1/2, and
Stephen Stigler Stephen Mack Stigler (born August 10, 1941) is Ernest DeWitt Burton Distinguished Service Professor at the Department of Statistics of the University of Chicago. He has authored several books on the history of statistics; he is the son of the e ...
once defined the standard normal as : \varphi(z) = e^ which has a simple functional form and a variance of \sigma^2 = 1/(2\pi)


General normal distribution

Every normal distribution is a version of the standard normal distribution, whose domain has been stretched by a factor \sigma (the standard deviation) and then translated by \mu (the mean value): : f(x \mid \mu, \sigma^2) =\frac 1 \sigma \varphi\left(\frac \sigma \right) The probability density must be scaled by 1/\sigma so that the integral is still 1. If Z is a
standard normal deviate A standard normal deviate is a normally distributed deviate. It is a realization of a standard normal random variable, defined as a random variable with expected value 0 and variance 1.Dodge, Y. (2003) The Oxford Dictionary of Statis ...
, then X=\sigma Z + \mu will have a normal distribution with expected value \mu and standard deviation \sigma. This is equivalent to saying that the "standard" normal distribution Z can be scaled/stretched by a factor of \sigma and shifted by \mu to yield a different normal distribution, called X. Conversely, if X is a normal deviate with parameters \mu and \sigma^2, then this X distribution can be re-scaled and shifted via the formula Z=(X-\mu)/\sigma to convert it to the "standard" normal distribution. This variate is also called the standardized form of X.


Notation

The probability density of the standard Gaussian distribution (standard normal distribution, with zero mean and unit variance) is often denoted with the Greek letter \phi (
phi Phi (; uppercase Φ, lowercase φ or ϕ; grc, ϕεῖ ''pheî'' ; Modern Greek: ''fi'' ) is the 21st letter of the Greek alphabet. In Archaic and Classical Greek (c. 9th century BC to 4th century BC), it represented an aspirated voicele ...
). The alternative form of the Greek letter phi, \varphi, is also used quite often. The normal distribution is often referred to as N(\mu,\sigma^2) or \mathcal(\mu,\sigma^2). Thus when a random variable X is normally distributed with mean \mu and standard deviation \sigma, one may write :X \sim \mathcal(\mu,\sigma^2).


Alternative parameterizations

Some authors advocate using the
precision Precision, precise or precisely may refer to: Science, and technology, and mathematics Mathematics and computing (general) * Accuracy and precision, measurement deviation from true value and its scatter * Significant figures, the number of digit ...
\tau as the parameter defining the width of the distribution, instead of the deviation \sigma or the variance \sigma^2. The precision is normally defined as the reciprocal of the variance, 1/\sigma^2. The formula for the distribution then becomes :f(x) = \sqrt e^. This choice is claimed to have advantages in numerical computations when \sigma is very close to zero, and simplifies formulas in some contexts, such as in the
Bayesian inference Bayesian inference is a method of statistical inference in which Bayes' theorem is used to update the probability for a hypothesis as more evidence or information becomes available. Bayesian inference is an important technique in statistics, a ...
of variables with
multivariate normal distribution In probability theory and statistics, the multivariate normal distribution, multivariate Gaussian distribution, or joint normal distribution is a generalization of the one-dimensional (univariate) normal distribution to higher dimensions. One d ...
. Alternatively, the reciprocal of the standard deviation \tau^\prime=1/\sigma might be defined as the ''precision'', in which case the expression of the normal distribution becomes : f(x) = \frac e^. According to Stigler, this formulation is advantageous because of a much simpler and easier-to-remember formula, and simple approximate formulas for the
quantile In statistics and probability, quantiles are cut points dividing the range of a probability distribution into continuous intervals with equal probabilities, or dividing the observations in a sample in the same way. There is one fewer quantile tha ...
s of the distribution. Normal distributions form an
exponential family In probability and statistics, an exponential family is a parametric set of probability distributions of a certain form, specified below. This special form is chosen for mathematical convenience, including the enabling of the user to calculate ...
with
natural parameter In probability and statistics, an exponential family is a parametric set of probability distributions of a certain form, specified below. This special form is chosen for mathematical convenience, including the enabling of the user to calculate ...
s \textstyle\theta_1=\frac and \textstyle\theta_2=\frac, and natural statistics ''x'' and ''x''2. The dual expectation parameters for normal distribution are and .


Cumulative distribution functions

The
cumulative distribution function In probability theory and statistics, the cumulative distribution function (CDF) of a real-valued random variable X, or just distribution function of X, evaluated at x, is the probability that X will take a value less than or equal to x. Ev ...
(CDF) of the standard normal distribution, usually denoted with the capital Greek letter \Phi (
phi Phi (; uppercase Φ, lowercase φ or ϕ; grc, ϕεῖ ''pheî'' ; Modern Greek: ''fi'' ) is the 21st letter of the Greek alphabet. In Archaic and Classical Greek (c. 9th century BC to 4th century BC), it represented an aspirated voicele ...
), is the integral :\Phi(x) = \frac 1 \int_^x e^ \, dt The related
error function In mathematics, the error function (also called the Gauss error function), often denoted by , is a complex function of a complex variable defined as: :\operatorname z = \frac\int_0^z e^\,\mathrm dt. This integral is a special (non-elementary ...
\operatorname(x) gives the probability of a random variable, with normal distribution of mean 0 and variance 1/2 falling in the range x, x/math>. That is: :\operatorname(x) = \frac 2 \int_0^x e^ \, dt These integrals cannot be expressed in terms of elementary functions, and are often said to be
special function Special functions are particular mathematical functions that have more or less established names and notations due to their importance in mathematical analysis, functional analysis, geometry, physics, or other applications. The term is defined by ...
s. However, many numerical approximations are known; see
below Below may refer to: *Earth *Ground (disambiguation) *Soil *Floor *Bottom (disambiguation) Bottom may refer to: Anatomy and sex * Bottom (BDSM), the partner in a BDSM who takes the passive, receiving, or obedient role, to that of the top or ...
for more. The two functions are closely related, namely : \Phi(x) = \frac \left + \operatorname\left( \frac x \right) \right/math> For a generic normal distribution with density f, mean \mu and deviation \sigma, the cumulative distribution function is : F(x) = \Phi\left(\frac \sigma \right) = \frac \left + \operatorname\left(\frac\right)\right The complement of the standard normal CDF, Q(x) = 1 - \Phi(x), is often called the
Q-function In statistics, the Q-function is the tail distribution function of the standard normal distribution. y) = P(X > x) = Q(x) where x = \frac. Other definitions of the ''Q''-function, all of which are simple transformations of the normal cumulati ...
, especially in engineering texts. It gives the probability that the value of a standard normal random variable X will exceed x: P(X>x). Other definitions of the Q-function, all of which are simple transformations of \Phi, are also used occasionally. The
graph Graph may refer to: Mathematics *Graph (discrete mathematics), a structure made of vertices and edges **Graph theory, the study of such graphs and their properties *Graph (topology), a topological space resembling a graph in the sense of discre ...
of the standard normal CDF \Phi has 2-fold
rotational symmetry Rotational symmetry, also known as radial symmetry in geometry, is the property a shape has when it looks the same after some rotation by a partial turn. An object's degree of rotational symmetry is the number of distinct orientations in which i ...
around the point (0,1/2); that is, \Phi(-x) = 1 - \Phi(x). Its
antiderivative In calculus, an antiderivative, inverse derivative, primitive function, primitive integral or indefinite integral of a function is a differentiable function whose derivative is equal to the original function . This can be stated symbolically ...
(indefinite integral) can be expressed as follows: :\int \Phi(x)\, dx = x\Phi(x) + \varphi(x) + C. The CDF of the standard normal distribution can be expanded by
Integration by parts In calculus, and more generally in mathematical analysis, integration by parts or partial integration is a process that finds the integral of a product of functions in terms of the integral of the product of their derivative and antiderivative. ...
into a series: :\Phi(x)=\frac + \frac\cdot e^ \left + \frac + \frac + \cdots + \frac + \cdots\right/math> where !! denotes the
double factorial In mathematics, the double factorial or semifactorial of a number , denoted by , is the product of all the integers from 1 up to that have the same parity (odd or even) as . That is, :n!! = \prod_^ (n-2k) = n (n-2) (n-4) \cdots. For even , the ...
. An
asymptotic expansion In mathematics, an asymptotic expansion, asymptotic series or Poincaré expansion (after Henri Poincaré) is a formal series of functions which has the property that truncating the series after a finite number of terms provides an approximation to ...
of the CDF for large ''x'' can also be derived using integration by parts. For more, see Error function#Asymptotic expansion. A quick approximation to the standard normal distribution's CDF can be found by using a Taylor series approximation: \Phi(x) \approx \frac+\frac\sum_^\frac


Standard deviation and coverage

About 68% of values drawn from a normal distribution are within one standard deviation ''σ'' away from the mean; about 95% of the values lie within two standard deviations; and about 99.7% are within three standard deviations. This fact is known as the 68-95-99.7 (empirical) rule, or the ''3-sigma rule''. More precisely, the probability that a normal deviate lies in the range between \mu-n\sigma and \mu+n\sigma is given by : F(\mu+n\sigma) - F(\mu-n\sigma) = \Phi(n)-\Phi(-n) = \operatorname \left(\frac\right). To 12 significant figures, the values for n=1,2,\ldots , 6 are: For large n, one can use the approximation 1 - p \approx \frac.


Quantile function

The
quantile function In probability and statistics, the quantile function, associated with a probability distribution of a random variable, specifies the value of the random variable such that the probability of the variable being less than or equal to that value equ ...
of a distribution is the inverse of the cumulative distribution function. The quantile function of the standard normal distribution is called the
probit function In probability theory and statistics, the probit function is the quantile function associated with the standard normal distribution. It has applications in data analysis and machine learning, in particular exploratory statistical graphics and ...
, and can be expressed in terms of the inverse
error function In mathematics, the error function (also called the Gauss error function), often denoted by , is a complex function of a complex variable defined as: :\operatorname z = \frac\int_0^z e^\,\mathrm dt. This integral is a special (non-elementary ...
: : \Phi^(p) = \sqrt2\operatorname^(2p - 1), \quad p\in(0,1). For a normal random variable with mean \mu and variance \sigma^2, the quantile function is : F^(p) = \mu + \sigma\Phi^(p) = \mu + \sigma\sqrt 2 \operatorname^(2p - 1), \quad p\in(0,1). The
quantile In statistics and probability, quantiles are cut points dividing the range of a probability distribution into continuous intervals with equal probabilities, or dividing the observations in a sample in the same way. There is one fewer quantile tha ...
\Phi^(p) of the standard normal distribution is commonly denoted as z_p. These values are used in
hypothesis testing A statistical hypothesis test is a method of statistical inference used to decide whether the data at hand sufficiently support a particular hypothesis. Hypothesis testing allows us to make probabilistic statements about population parameters. ...
, construction of
confidence interval In frequentist statistics, a confidence interval (CI) is a range of estimates for an unknown parameter. A confidence interval is computed at a designated ''confidence level''; the 95% confidence level is most common, but other levels, such as 9 ...
s and
Q–Q plot In statistics, a Q–Q plot (quantile-quantile plot) is a probability plot, a List of graphical methods, graphical method for comparing two probability distributions by plotting their ''quantiles'' against each other. A point on the plot co ...
s. A normal random variable X will exceed \mu + z_p\sigma with probability 1-p, and will lie outside the interval \mu \pm z_p\sigma with probability 2(1-p). In particular, the quantile z_ is
1.96 In probability and statistics, the 97.5th percentile point of the standard normal distribution is a number commonly used for statistical calculations. The approximate value of this number is 1.96, meaning that 95% of the area under a normal cu ...
; therefore a normal random variable will lie outside the interval \mu \pm 1.96\sigma in only 5% of cases. The following table gives the quantile z_p such that X will lie in the range \mu \pm z_p\sigma with a specified probability p. These values are useful to determine
tolerance interval A tolerance interval is a statistical interval within which, with some confidence level, a specified proportion of a sampled population falls. "More specifically, a 100×p%/100×(1−α) tolerance interval provides limits within which at least a ...
for sample averages and other statistical
estimator In statistics, an estimator is a rule for calculating an estimate of a given quantity based on observed data: thus the rule (the estimator), the quantity of interest (the estimand) and its result (the estimate) are distinguished. For example, the ...
s with normal (or
asymptotic In analytic geometry, an asymptote () of a curve is a line such that the distance between the curve and the line approaches zero as one or both of the ''x'' or ''y'' coordinates tends to infinity. In projective geometry and related contexts, ...
ally normal) distributions. Note that the following table shows \sqrt 2 \operatorname^(p)=\Phi^\left(\frac\right), not \Phi^(p) as defined above. For small p, the quantile function has the useful
asymptotic expansion In mathematics, an asymptotic expansion, asymptotic series or Poincaré expansion (after Henri Poincaré) is a formal series of functions which has the property that truncating the series after a finite number of terms provides an approximation to ...
\Phi^(p)=-\sqrt+\mathcal(1).


Properties

The normal distribution is the only distribution whose
cumulant In probability theory and statistics, the cumulants of a probability distribution are a set of quantities that provide an alternative to the '' moments'' of the distribution. Any two probability distributions whose moments are identical will ha ...
s beyond the first two (i.e., other than the mean and
variance In probability theory and statistics, variance is the expectation of the squared deviation of a random variable from its population mean or sample mean. Variance is a measure of dispersion, meaning it is a measure of how far a set of numbers ...
) are zero. It is also the continuous distribution with the maximum entropy for a specified mean and variance. Geary has shown, assuming that the mean and variance are finite, that the normal distribution is the only distribution where the mean and variance calculated from a set of independent draws are independent of each other.Geary RC(1936) The distribution of the "Student's" ratio for the non-normal samples". Supplement to the Journal of the Royal Statistical Society 3 (2): 178–184 The normal distribution is a subclass of the
elliptical distribution In probability and statistics, an elliptical distribution is any member of a broad family of probability distributions that generalize the multivariate normal distribution. Intuitively, in the simplified two and three dimensional case, the joint di ...
s. The normal distribution is
symmetric Symmetry (from grc, συμμετρία "agreement in dimensions, due proportion, arrangement") in everyday language refers to a sense of harmonious and beautiful proportion and balance. In mathematics, "symmetry" has a more precise definiti ...
about its mean, and is non-zero over the entire real line. As such it may not be a suitable model for variables that are inherently positive or strongly skewed, such as the
weight In science and engineering, the weight of an object is the force acting on the object due to gravity. Some standard textbooks define weight as a Euclidean vector, vector quantity, the gravitational force acting on the object. Others define weigh ...
of a person or the price of a share. Such variables may be better described by other distributions, such as the
log-normal distribution In probability theory, a log-normal (or lognormal) distribution is a continuous probability distribution of a random variable whose logarithm is normally distributed. Thus, if the random variable is log-normally distributed, then has a normal ...
or the
Pareto distribution The Pareto distribution, named after the Italian civil engineer, economist, and sociologist Vilfredo Pareto ( ), is a power-law probability distribution that is used in description of social, quality control, scientific, geophysical, actua ...
. The value of the normal distribution is practically zero when the value x lies more than a few
standard deviation In statistics, the standard deviation is a measure of the amount of variation or dispersion of a set of values. A low standard deviation indicates that the values tend to be close to the mean (also called the expected value) of the set, while ...
s away from the mean (e.g., a spread of three standard deviations covers all but 0.27% of the total distribution). Therefore, it may not be an appropriate model when one expects a significant fraction of
outlier In statistics, an outlier is a data point that differs significantly from other observations. An outlier may be due to a variability in the measurement, an indication of novel data, or it may be the result of experimental error; the latter are ...
s—values that lie many standard deviations away from the mean—and least squares and other
statistical inference Statistical inference is the process of using data analysis to infer properties of an underlying probability distribution, distribution of probability.Upton, G., Cook, I. (2008) ''Oxford Dictionary of Statistics'', OUP. . Inferential statistical ...
methods that are optimal for normally distributed variables often become highly unreliable when applied to such data. In those cases, a more
heavy-tailed In probability theory, heavy-tailed distributions are probability distributions whose tails are not exponentially bounded: that is, they have heavier tails than the exponential distribution. In many applications it is the right tail of the distrib ...
distribution should be assumed and the appropriate robust statistical inference methods applied. The Gaussian distribution belongs to the family of
stable distribution In probability theory, a distribution is said to be stable if a linear combination of two independent random variables with this distribution has the same distribution, up to location and scale parameters. A random variable is said to be stab ...
s which are the attractors of sums of
independent, identically distributed In probability theory and statistics, a collection of random variables is independent and identically distributed if each random variable has the same probability distribution as the others and all are mutually independent. This property is us ...
distributions whether or not the mean or variance is finite. Except for the Gaussian which is a limiting case, all stable distributions have heavy tails and infinite variance. It is one of the few distributions that are stable and that have probability density functions that can be expressed analytically, the others being the
Cauchy distribution The Cauchy distribution, named after Augustin Cauchy, is a continuous probability distribution. It is also known, especially among physicists, as the Lorentz distribution (after Hendrik Lorentz), Cauchy–Lorentz distribution, Lorentz(ian) fun ...
and the
Lévy distribution In probability theory and statistics, the Lévy distribution, named after Paul Lévy, is a continuous probability distribution for a non-negative random variable. In spectroscopy, this distribution, with frequency as the dependent variable, is kn ...
.


Symmetries and derivatives

The normal distribution with density f(x) (mean \mu and standard deviation \sigma > 0) has the following properties: * It is symmetric around the point x=\mu, which is at the same time the
mode Mode ( la, modus meaning "manner, tune, measure, due measure, rhythm, melody") may refer to: Arts and entertainment * '' MO''D''E (magazine)'', a defunct U.S. women's fashion magazine * ''Mode'' magazine, a fictional fashion magazine which is ...
, the
median In statistics and probability theory, the median is the value separating the higher half from the lower half of a data sample, a population, or a probability distribution. For a data set, it may be thought of as "the middle" value. The basic fe ...
and the
mean There are several kinds of mean in mathematics, especially in statistics. Each mean serves to summarize a given group of data, often to better understand the overall value (magnitude and sign) of a given data set. For a data set, the ''arithme ...
of the distribution. * It is
unimodal In mathematics, unimodality means possessing a unique mode. More generally, unimodality means there is only a single highest value, somehow defined, of some mathematical object. Unimodal probability distribution In statistics, a unimodal pr ...
: its first
derivative In mathematics, the derivative of a function of a real variable measures the sensitivity to change of the function value (output value) with respect to a change in its argument (input value). Derivatives are a fundamental tool of calculus. F ...
is positive for x<\mu, negative for x>\mu, and zero only at x=\mu. * The area bounded by the curve and the x-axis is unity (i.e. equal to one). * Its first derivative is f^\prime(x)=-\frac f(x). * Its density has two
inflection point In differential calculus and differential geometry, an inflection point, point of inflection, flex, or inflection (British English: inflexion) is a point on a smooth plane curve at which the curvature changes sign. In particular, in the case of ...
s (where the second derivative of f is zero and changes sign), located one standard deviation away from the mean, namely at x=\mu-\sigma and x=\mu+\sigma. * Its density is log-concave. * Its density is infinitely
differentiable In mathematics, a differentiable function of one real variable is a function whose derivative exists at each point in its domain. In other words, the graph of a differentiable function has a non-vertical tangent line at each interior point in its ...
, indeed supersmooth of order 2. Furthermore, the density \varphi of the standard normal distribution (i.e. \mu=0 and \sigma=1) also has the following properties: * Its first derivative is \varphi^\prime(x)=-x\varphi(x). * Its second derivative is \varphi^(x)=(x^2-1)\varphi(x) * More generally, its th derivative is \varphi^(x) = (-1)^n\operatorname_n(x)\varphi(x), where \operatorname_n(x) is the th (probabilist)
Hermite polynomial In mathematics, the Hermite polynomials are a classical orthogonal polynomial sequence. The polynomials arise in: * signal processing as Hermitian wavelets for wavelet transform analysis * probability, such as the Edgeworth series, as well as i ...
. * The probability that a normally distributed variable X with known \mu and \sigma is in a particular set, can be calculated by using the fact that the fraction Z = (X-\mu)/\sigma has a standard normal distribution.


Moments

The plain and absolute moments of a variable X are the expected values of X^p and , X, ^p, respectively. If the expected value \mu of X is zero, these parameters are called ''central moments;'' otherwise, these parameters are called ''non-central moments.'' Usually we are interested only in moments with integer order \ p. If X has a normal distribution, the non-central moments exist and are finite for any p whose real part is greater than −1. For any non-negative integer p, the plain central moments are: : \operatorname\left X-\mu)^p\right= \begin 0 & \textp\text \\ \sigma^p (p-1)!! & \textp\text \end Here n!! denotes the
double factorial In mathematics, the double factorial or semifactorial of a number , denoted by , is the product of all the integers from 1 up to that have the same parity (odd or even) as . That is, :n!! = \prod_^ (n-2k) = n (n-2) (n-4) \cdots. For even , the ...
, that is, the product of all numbers from n to 1 that have the same parity as n. The central absolute moments coincide with plain moments for all even orders, but are nonzero for odd orders. For any non-negative integer p, :\begin \operatorname\left confluent hypergeometric function In mathematics, a confluent hypergeometric function is a solution of a confluent hypergeometric equation, which is a degenerate form of a hypergeometric differential equation where two of the three regular singularities merge into an irregular ...
s _1F_1 and U. :\begin \operatorname\left ^p\right&= \sigma^p\cdot (-i\sqrt 2)^p U\left(-\frac, \frac, -\frac \left( \frac \mu \sigma \right)^2 \right), \\ \operatorname\left Hermite polynomials#"Negative variance", generalized Hermite polynomials. The expectation of X conditioned on the event that X lies in an interval ,b/math> is given by :\operatorname\left \mid a= \mu - \sigma^2\frac where f and F respectively are the density and the cumulative distribution function of X. For b=\infty this is known as the
inverse Mills ratio In probability theory, the Mills ratio (or Mills's ratio) of a continuous random variable X is the function : m(x) := \frac , where f(x) is the probability density function, and :\bar(x) := \Pr x.html" ;"title=">x">>x= \int_x^ f(u)\, du is the ...
. Note that above, density f of X is used instead of standard normal density as in inverse Mills ratio, so here we have \sigma^2 instead of \sigma.


Fourier transform and characteristic function

The
Fourier transform A Fourier transform (FT) is a mathematical transform that decomposes functions into frequency components, which are represented by the output of the transform as a function of frequency. Most commonly functions of time or space are transformed, ...
of a normal density f with mean \mu and standard deviation \sigma is : \hat f(t) = \int_^\infty f(x)e^ \, dx = e^ e^ where i is the
imaginary unit The imaginary unit or unit imaginary number () is a solution to the quadratic equation x^2+1=0. Although there is no real number with this property, can be used to extend the real numbers to what are called complex numbers, using addition an ...
. If the mean \mu=0, the first factor is 1, and the Fourier transform is, apart from a constant factor, a normal density on the
frequency domain In physics, electronics, control systems engineering, and statistics, the frequency domain refers to the analysis of mathematical functions or signals with respect to frequency, rather than time. Put simply, a time-domain graph shows how a signa ...
, with mean 0 and standard deviation 1/\sigma. In particular, the standard normal distribution \varphi is an
eigenfunction In mathematics, an eigenfunction of a linear operator ''D'' defined on some function space is any non-zero function f in that space that, when acted upon by ''D'', is only multiplied by some scaling factor called an eigenvalue. As an equation, th ...
of the Fourier transform. In probability theory, the Fourier transform of the probability distribution of a real-valued random variable X is closely connected to the
characteristic function In mathematics, the term "characteristic function" can refer to any of several distinct concepts: * The indicator function of a subset, that is the function ::\mathbf_A\colon X \to \, :which for a given subset ''A'' of ''X'', has value 1 at points ...
\varphi_X(t) of that variable, which is defined as the
expected value In probability theory, the expected value (also called expectation, expectancy, mathematical expectation, mean, average, or first moment) is a generalization of the weighted average. Informally, the expected value is the arithmetic mean of a l ...
of e^, as a function of the real variable t (the
frequency Frequency is the number of occurrences of a repeating event per unit of time. It is also occasionally referred to as ''temporal frequency'' for clarity, and is distinct from ''angular frequency''. Frequency is measured in hertz (Hz) which is eq ...
parameter of the Fourier transform). This definition can be analytically extended to a complex-value variable t. The relation between both is: :\varphi_X(t) = \hat f(-t)


Moment and cumulant generating functions

The
moment generating function In probability theory and statistics, the moment-generating function of a real-valued random variable is an alternative specification of its probability distribution. Thus, it provides the basis of an alternative route to analytical results compare ...
of a real random variable X is the expected value of e^, as a function of the real parameter t. For a normal distribution with density f, mean \mu and deviation \sigma, the moment generating function exists and is equal to :M(t) = \operatorname ^= \hat f(it) = e^ e^ The
cumulant generating function In probability theory and statistics, the cumulants of a probability distribution are a set of quantities that provide an alternative to the '' moments'' of the distribution. Any two probability distributions whose moments are identical will have ...
is the logarithm of the moment generating function, namely :g(t) = \ln M(t) = \mu t + \tfrac 12 \sigma^2 t^2 Since this is a quadratic polynomial in t, only the first two
cumulant In probability theory and statistics, the cumulants of a probability distribution are a set of quantities that provide an alternative to the '' moments'' of the distribution. Any two probability distributions whose moments are identical will ha ...
s are nonzero, namely the mean \mu and the variance \sigma^2.


Stein operator and class

Within
Stein's method Stein's method is a general method in probability theory to obtain bounds on the distance between two probability distributions with respect to a probability metric. It was introduced by Charles Stein, who first published it in 1972, to obtain ...
the Stein operator and class of a random variable X \sim \mathcal(\mu, \sigma^2) are \mathcalf(x) = \sigma^2 f'(x) - (x-\mu)f(x) and \mathcal the class of all absolutely continuous functions f : \R \to \R \mbox\mathbb limit (mathematics), limit when \sigma tends to zero, the probability density f(x) eventually tends to zero at any x\ne \mu, but grows without limit if x = \mu, while its integral remains equal to 1. Therefore, the normal distribution cannot be defined as an ordinary
function Function or functionality may refer to: Computing * Function key, a type of key on computer keyboards * Function model, a structured representation of processes in a system * Function object or functor or functionoid, a concept of object-oriente ...
when \sigma = 0. However, one can define the normal distribution with zero variance as a
generalized function In mathematics, generalized functions are objects extending the notion of functions. There is more than one recognized theory, for example the theory of distributions. Generalized functions are especially useful in making discontinuous functions ...
; specifically, as Dirac's "delta function" \delta translated by the mean \mu, that is f(x)=\delta(x-\mu). Its CDF is then the
Heaviside step function The Heaviside step function, or the unit step function, usually denoted by or (but sometimes , or ), is a step function, named after Oliver Heaviside (1850–1925), the value of which is zero for negative arguments and one for positive argume ...
translated by the mean \mu, namely :F(x) = \begin 0 & \textx < \mu \\ 1 & \textx \geq \mu \end


Maximum entropy

Of all probability distributions over the reals with a specified mean \mu and variance \sigma^2, the normal distribution N(\mu,\sigma^2) is the one with maximum entropy. If X is a
continuous random variable In probability theory and statistics, a probability distribution is the mathematical function that gives the probabilities of occurrence of different possible outcomes for an experiment. It is a mathematical description of a random phenomenon i ...
with
probability density In probability theory, a probability density function (PDF), or density of a continuous random variable, is a function whose value at any given sample (or point) in the sample space (the set of possible values taken by the random variable) can ...
f(x), then the entropy of X is defined as : H(X) = - \int_^\infty f(x)\log f(x)\, dx where f(x)\log f(x) is understood to be zero whenever f(x)=0. This functional can be maximized, subject to the constraints that the distribution is properly normalized and has a specified variance, by using
variational calculus The calculus of variations (or Variational Calculus) is a field of mathematical analysis that uses variations, which are small changes in functions and functionals, to find maxima and minima of functionals: mappings from a set of functions t ...
. A function with two
Lagrange multipliers In mathematical optimization, the method of Lagrange multipliers is a strategy for finding the local maxima and minima of a function subject to equality constraints (i.e., subject to the condition that one or more equations have to be satisfied ex ...
is defined: : L=\int_^\infty f(x)\ln(f(x))\,dx-\lambda_0\left(1-\int_^\infty f(x)\,dx\right)-\lambda\left(\sigma^2-\int_^\infty f(x)(x-\mu)^2\,dx\right) where f(x) is, for now, regarded as some density function with mean \mu and standard deviation \sigma. At maximum entropy, a small variation \delta f(x) about f(x) will produce a variation \delta L about L which is equal to 0: : 0=\delta L=\int_^\infty \delta f(x)\left (\ln(f(x))+1+\lambda_0+\lambda(x-\mu)^2\right )\,dx Since this must hold for any small \delta f(x), the term in brackets must be zero, and solving for f(x) yields: :f(x)=e^ Using the constraint equations to solve for \lambda_0 and \lambda yields the density of the normal distribution: : f(x, \mu, \sigma)=\frace^ The entropy of a normal distribution is equal to : H(X)=\tfrac(1+\log(2\sigma^2\pi))


Other properties


Related distributions


Central limit theorem

The central limit theorem states that under certain (fairly common) conditions, the sum of many random variables will have an approximately normal distribution. More specifically, where X_1,\ldots ,X_n are
independent and identically distributed In probability theory and statistics, a collection of random variables is independent and identically distributed if each random variable has the same probability distribution as the others and all are mutually independent. This property is usua ...
random variables with the same arbitrary distribution, zero mean, and variance \sigma^2 and Z is their mean scaled by \sqrt : Z = \sqrt\left(\frac\sum_^n X_i\right) Then, as n increases, the probability distribution of Z will tend to the normal distribution with zero mean and variance \sigma^2. The theorem can be extended to variables (X_i) that are not independent and/or not identically distributed if certain constraints are placed on the degree of dependence and the moments of the distributions. Many
test statistic A test statistic is a statistic (a quantity derived from the sample) used in statistical hypothesis testing.Berger, R. L.; Casella, G. (2001). ''Statistical Inference'', Duxbury Press, Second Edition (p.374) A hypothesis test is typically specif ...
s, scores, and
estimator In statistics, an estimator is a rule for calculating an estimate of a given quantity based on observed data: thus the rule (the estimator), the quantity of interest (the estimand) and its result (the estimate) are distinguished. For example, the ...
s encountered in practice contain sums of certain random variables in 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 distributions. The central limit theorem also implies that certain distributions can be approximated by the normal distribution, for example: * The
binomial distribution In probability theory and statistics, the binomial distribution with parameters ''n'' and ''p'' is the discrete probability distribution of the number of successes in a sequence of ''n'' independent experiments, each asking a yes–no quest ...
B(n,p) is approximately normal with mean np and variance np(1-p) for large n and for p not too close to 0 or 1. * The
Poisson distribution In probability theory and statistics, the Poisson distribution is a discrete probability distribution that expresses the probability of a given number of events occurring in a fixed interval of time or space if these events occur with a known co ...
with parameter \lambda is approximately normal with mean \lambda and variance \lambda, for large values of \lambda. * The
chi-squared distribution In probability theory and statistics, the chi-squared distribution (also chi-square or \chi^2-distribution) with k degrees of freedom is the distribution of a sum of the squares of k independent standard normal random variables. The chi-squa ...
\chi^2(k) is approximately normal with mean k and variance 2k, for large k. * The
Student's t-distribution In probability and statistics, Student's ''t''-distribution (or simply the ''t''-distribution) is any member of a family of continuous probability distributions that arise when estimating the mean of a normally distributed population in sit ...
t(\nu) is approximately normal with mean 0 and variance 1 when \nu is large. Whether these approximations are sufficiently accurate depends on the purpose for which they are needed, and the rate of convergence to the normal distribution. It is typically the case that such approximations are less accurate in the tails of the distribution. A general upper bound for the approximation error in the central limit theorem is given by the
Berry–Esseen theorem In probability theory, the central limit theorem states that, under certain circumstances, the probability distribution of the scaled mean of a random sample converges to a normal distribution as the sample size increases to infinity. Under strong ...
, improvements of the approximation are given by the
Edgeworth expansion The Gram–Charlier A series (named in honor of Jørgen Pedersen Gram and Carl Charlier), and the Edgeworth series (named in honor of Francis Ysidro Edgeworth) are series that approximate a probability distribution in terms of its cumulants. The se ...
s. This theorem can also be used to justify modeling the sum of many uniform noise sources as
Gaussian noise Gaussian noise, named after Carl Friedrich Gauss, is a term from signal processing theory denoting a kind of signal noise that has a probability density function (pdf) equal to that of the normal distribution (which is also known as the Gaussia ...
. See
AWGN Additive white Gaussian noise (AWGN) is a basic noise model used in information theory to mimic the effect of many random processes that occur in nature. The modifiers denote specific characteristics: * ''Additive'' because it is added to any nois ...
.


Operations and functions of normal variables

The
probability density In probability theory, a probability density function (PDF), or density of a continuous random variable, is a function whose value at any given sample (or point) in the sample space (the set of possible values taken by the random variable) can ...
,
cumulative distribution In statistics, the frequency (or absolute frequency) of an event i is the number n_i of times the observation has occurred/recorded in an experiment or study. These frequencies are often depicted graphically or in tabular form. Types The cumul ...
, and inverse cumulative distribution of any function of one or more independent or correlated normal variables can be computed with the numerical method of ray-tracing
Matlab code
. In the following sections we look at some special cases.


Operations on a single normal variable

If X is distributed normally with mean \mu and variance \sigma^2, then * aX+b, for any real numbers a and b, is also normally distributed, with mean a\mu+b and standard deviation , a, \sigma. That is, the family of normal distributions is closed under linear transformations. * The exponential of X is distributed log-normally: . * The absolute value of X has
folded normal distribution The folded normal distribution is a probability distribution related to the normal distribution. Given a normally distributed random variable ''X'' with mean ''μ'' and variance ''σ''2, the random variable ''Y'' = , ''X'', has a folded normal d ...
: . If \mu = 0 this is known as the
half-normal distribution In probability theory and statistics, the half-normal distribution is a special case of the folded normal distribution. Let X follow an ordinary normal distribution, N(0,\sigma^2). Then, Y=, X, follows a half-normal distribution. Thus, the hal ...
. * The absolute value of normalized residuals, , ''X'' − ''μ'', /''σ'', has
chi distribution In probability theory and statistics, the chi distribution is a continuous probability distribution. It is the distribution of the positive square root of the sum of squares of a set of independent random variables each following a standard norm ...
with one degree of freedom: , X - \mu, / \sigma \sim \chi_1. * The square of ''X''/''σ'' has the
noncentral chi-squared distribution In probability theory and statistics, the noncentral chi-squared distribution (or noncentral chi-square distribution, noncentral \chi^2 distribution) is a noncentral generalization of the chi-squared distribution. It often arises in the power a ...
with one degree of freedom: X^2 / \sigma^2 \sim \chi_1^2(\mu^2 / \sigma^2). If \mu = 0, the distribution is called simply chi-squared. * The log likelihood of a normal variable x is simply the log of its
probability density function In probability theory, a probability density function (PDF), or density of a continuous random variable, is a function whose value at any given sample (or point) in the sample space (the set of possible values taken by the random variable) can ...
: \ln p(x)= -\frac \left(\frac \right)^2 -\ln \left(\sigma \sqrt \right) = -\frac z^2 -\ln \left(\sigma \sqrt \right). Since this is a scaled and shifted square of a standard normal variable, it is distributed as a scaled and shifted chi-squared variable. * The distribution of the variable ''X'' restricted to an interval 'a'', ''b''is called the
truncated normal distribution In probability and statistics, the truncated normal distribution is the probability distribution derived from that of a normally distributed random variable by bounding the random variable from either below or above (or both). The truncated no ...
. * (''X'' − ''μ'')−2 has a
Lévy distribution In probability theory and statistics, the Lévy distribution, named after Paul Lévy, is a continuous probability distribution for a non-negative random variable. In spectroscopy, this distribution, with frequency as the dependent variable, is kn ...
with location 0 and scale ''σ''−2.


= Operations on two independent normal variables

= * If X_1 and X_2 are two
independent Independent or Independents may refer to: Arts, entertainment, and media Artist groups * Independents (artist group), a group of modernist painters based in the New Hope, Pennsylvania, area of the United States during the early 1930s * Independ ...
normal random variables, with means \mu_1, \mu_2 and standard deviations \sigma_1, \sigma_2, then their sum X_1 + X_2 will also be normally distributed, roof/sup> with mean \mu_1 + \mu_2 and variance \sigma_1^2 + \sigma_2^2. * In particular, if X and Y are independent normal deviates with zero mean and variance \sigma^2, then X + Y and X - Y are also independent and normally distributed, with zero mean and variance 2\sigma^2. This is a special case of the
polarization identity In linear algebra, a branch of mathematics, the polarization identity is any one of a family of formulas that express the inner product of two vectors in terms of the norm of a normed vector space. If a norm arises from an inner product then t ...
. * If X_1, X_2 are two independent normal deviates with mean \mu and deviation \sigma, and a, b are arbitrary real numbers, then the variable X_3 = \frac + \mu is also normally distributed with mean \mu and deviation \sigma. It follows that the normal distribution is
stable A stable is a building in which livestock, especially horses, are kept. It most commonly means a building that is divided into separate stalls for individual animals and livestock. There are many different types of stables in use today; the ...
(with exponent \alpha=2).


= Operations on two independent standard normal variables

= If X_1 and X_2 are two independent standard normal random variables with mean 0 and variance 1, then * Their sum and difference is distributed normally with mean zero and variance two: X_1 \pm X_2 \sim N(0, 2). * Their product Z = X_1 X_2 follows the
product distribution A product distribution is a probability distribution constructed as the distribution of the product of random variables having two other known distributions. Given two statistically independent random variables ''X'' and ''Y'', the distribution of ...
with density function f_Z(z) = \pi^ K_0(, z, ) where K_0 is the
modified Bessel function of the second kind Bessel functions, first defined by the mathematician Daniel Bernoulli and then generalized by Friedrich Bessel, are canonical solutions of Bessel's differential equation x^2 \frac + x \frac + \left(x^2 - \alpha^2 \right)y = 0 for an arbitrary ...
. This distribution is symmetric around zero, unbounded at z = 0, and has the
characteristic function In mathematics, the term "characteristic function" can refer to any of several distinct concepts: * The indicator function of a subset, that is the function ::\mathbf_A\colon X \to \, :which for a given subset ''A'' of ''X'', has value 1 at points ...
\phi_Z(t) = (1 + t^2)^. * Their ratio follows the standard
Cauchy distribution The Cauchy distribution, named after Augustin Cauchy, is a continuous probability distribution. It is also known, especially among physicists, as the Lorentz distribution (after Hendrik Lorentz), Cauchy–Lorentz distribution, Lorentz(ian) fun ...
: X_1/ X_2 \sim \operatorname(0, 1). * Their Euclidean norm \sqrt has the
Rayleigh distribution In probability theory and statistics, the Rayleigh distribution is a continuous probability distribution for nonnegative-valued random variables. Up to rescaling, it coincides with the chi distribution with two degrees of freedom. The distribut ...
.


Operations on multiple independent normal variables

* Any linear combination of independent normal deviates is a normal deviate. * If X_1, X_2, \ldots, X_n are independent standard normal random variables, then the sum of their squares has the
chi-squared distribution In probability theory and statistics, the chi-squared distribution (also chi-square or \chi^2-distribution) with k degrees of freedom is the distribution of a sum of the squares of k independent standard normal random variables. The chi-squa ...
with n degrees of freedom X_1^2 + \cdots + X_n^2 \sim \chi_n^2. * If X_1, X_2, \ldots, X_n are independent normally distributed random variables with means \mu and variances \sigma^2, then their
sample mean The sample mean (or "empirical mean") and the sample covariance are statistics computed from a Sample (statistics), sample of data on one or more random variables. The sample mean is the average value (or mean, mean value) of a sample (statistic ...
is independent from the sample
standard deviation In statistics, the standard deviation is a measure of the amount of variation or dispersion of a set of values. A low standard deviation indicates that the values tend to be close to the mean (also called the expected value) of the set, while ...
, which can be demonstrated using Basu's theorem or
Cochran's theorem In statistics, Cochran's theorem, devised by William G. Cochran, is a theorem used to justify results relating to the probability distributions of statistics that are used in the analysis of variance. Statement Let ''U''1, ..., ''U'N'' be i.i. ...
. The ratio of these two quantities will have the
Student's t-distribution In probability and statistics, Student's ''t''-distribution (or simply the ''t''-distribution) is any member of a family of continuous probability distributions that arise when estimating the mean of a normally distributed population in sit ...
with n-1 degrees of freedom: t = \frac = \frac \sim t_. * If X_1, X_2, \ldots, X_n, Y_1, Y_2, \ldots, Y_m are independent standard normal random variables, then the ratio of their normalized sums of squares will have the with degrees of freedom: F = \frac \sim F_.


Operations on multiple correlated normal variables

* A
quadratic form In mathematics, a quadratic form is a polynomial with terms all of degree two ("form" is another name for a homogeneous polynomial). For example, :4x^2 + 2xy - 3y^2 is a quadratic form in the variables and . The coefficients usually belong to a ...
of a normal vector, i.e. a quadratic function q = \sum x_i^2 + \sum x_j + c of multiple independent or correlated normal variables, is a generalized chi-square variable.


Operations on the density function

The split normal distribution is most directly defined in terms of joining scaled sections of the density functions of different normal distributions and rescaling the density to integrate to one. The
truncated normal distribution In probability and statistics, the truncated normal distribution is the probability distribution derived from that of a normally distributed random variable by bounding the random variable from either below or above (or both). The truncated no ...
results from rescaling a section of a single density function.


Infinite divisibility and Cramér's theorem

For any positive integer \text, any normal distribution with mean \mu and variance \sigma^2 is the distribution of the sum of \text independent normal deviates, each with mean \frac and variance \frac. This property is called
infinite divisibility Infinite divisibility arises in different ways in philosophy, physics, economics, order theory (a branch of mathematics), and probability theory (also a branch of mathematics). One may speak of infinite divisibility, or the lack thereof, of matter ...
. Conversely, if X_1 and X_2 are independent random variables and their sum X_1+X_2 has a normal distribution, then both X_1 and X_2 must be normal deviates. This result is known as Cramér's decomposition theorem, and is equivalent to saying that the convolution of two distributions is normal if and only if both are normal. Cramér's theorem implies that a linear combination of independent non-Gaussian variables will never have an exactly normal distribution, although it may approach it arbitrarily closely.


Bernstein's theorem

Bernstein's theorem states that if X and Y are independent and X + Y and X - Y are also independent, then both ''X'' and ''Y'' must necessarily have normal distributions. More generally, if X_1, \ldots, X_n are independent random variables, then two distinct linear combinations \sum and \sumwill be independent if and only if all X_k are normal and \sum, where \sigma_k^2 denotes the variance of X_k.


Extensions

The notion of normal distribution, being one of the most important distributions in probability theory, has been extended far beyond the standard framework of the univariate (that is one-dimensional) case (Case 1). All these extensions are also called ''normal'' or ''Gaussian'' laws, so a certain ambiguity in names exists. * The
multivariate normal distribution In probability theory and statistics, the multivariate normal distribution, multivariate Gaussian distribution, or joint normal distribution is a generalization of the one-dimensional (univariate) normal distribution to higher dimensions. One d ...
describes the Gaussian law in the ''k''-dimensional Euclidean space. A vector is multivariate-normally distributed if any linear combination of its components has a (univariate) normal distribution. The variance of ''X'' is a ''k×k'' symmetric positive-definite matrix ''V''. The multivariate normal distribution is a special case of the
elliptical distribution In probability and statistics, an elliptical distribution is any member of a broad family of probability distributions that generalize the multivariate normal distribution. Intuitively, in the simplified two and three dimensional case, the joint di ...
s. As such, its iso-density loci in the ''k'' = 2 case are ellipses and in the case of arbitrary ''k'' are ellipsoids. * Rectified Gaussian distribution a rectified version of normal distribution with all the negative elements reset to 0 * Complex normal distribution deals with the complex normal vectors. A complex vector is said to be normal if both its real and imaginary components jointly possess a 2''k''-dimensional multivariate normal distribution. The variance-covariance structure of ''X'' is described by two matrices: the ''variance'' matrix Γ, and the ''relation'' matrix ''C''. * Matrix normal distribution describes the case of normally distributed matrices. * Gaussian processes are the normally distributed stochastic processes. These can be viewed as elements of some infinite-dimensional Hilbert space ''H'', and thus are the analogues of multivariate normal vectors for the case . A random element is said to be normal if for any constant the scalar product has a (univariate) normal distribution. The variance structure of such Gaussian random element can be described in terms of the linear ''covariance ''. Several Gaussian processes became popular enough to have their own names: ** Wiener process, Brownian motion, ** Brownian bridge, ** Ornstein–Uhlenbeck process. * Gaussian q-distribution is an abstract mathematical construction that represents a "q-analogue" of the normal distribution. * the q-Gaussian is an analogue of the Gaussian distribution, in the sense that it maximises the Tsallis entropy, and is one type of Tsallis distribution. Note that this distribution is different from the Gaussian q-distribution above. * The Kaniadakis Gaussian distribution, Kaniadakis ''κ''-Gaussian distribution is a generalization of the Gaussian distribution which arises from the Kaniadakis statistics, being one of the Kaniadakis distribution, Kaniadakis distributions. A random variable ''X'' has a two-piece normal distribution if it has a distribution : f_X( x ) = N( \mu, \sigma_1^2 ) \text x \le \mu : f_X( x ) = N( \mu, \sigma_2^2 ) \text x \ge \mu where ''μ'' is the mean and ''σ''1 and ''σ''2 are the standard deviations of the distribution to the left and right of the mean respectively. The mean, variance and third central moment of this distribution have been determined : \operatorname( X ) = \mu + \sqrt ( \sigma_2 - \sigma_1 ) : \operatorname( X ) = \left( 1 - \frac 2 \pi\right)( \sigma_2 - \sigma_1 )^2 + \sigma_1 \sigma_2 : \operatorname( X ) = \sqrt( \sigma_2 - \sigma_1 ) \left[ \left( \frac 4 \pi - 1 \right) ( \sigma_2 - \sigma_1)^2 + \sigma_1 \sigma_2 \right] where E(''X''), V(''X'') and T(''X'') are the mean, variance, and third central moment respectively. One of the main practical uses of the Gaussian law is to model the empirical distributions of many different random variables encountered in practice. In such case a possible extension would be a richer family of distributions, having more than two parameters and therefore being able to fit the empirical distribution more accurately. The examples of such extensions are: * Pearson distribution — a four-parameter family of probability distributions that extend the normal law to include different skewness and kurtosis values. * The generalized normal distribution, also known as the exponential power distribution, allows for distribution tails with thicker or thinner asymptotic behaviors.


Statistical inference


Estimation of parameters

It is often the case that we do not know the parameters of the normal distribution, but instead want to Estimation theory, estimate them. That is, having a sample (x_1, \ldots, x_n) from a normal N(\mu, \sigma^2) population we would like to learn the approximate values of parameters \mu and \sigma^2. The standard approach to this problem is the maximum likelihood method, which requires maximization of the ''log-likelihood function'': : \ln\mathcal(\mu,\sigma^2) = \sum_^n \ln f(x_i\mid\mu,\sigma^2) = -\frac\ln(2\pi) - \frac\ln\sigma^2 - \frac\sum_^n (x_i-\mu)^2. Taking derivatives with respect to \mu and \sigma^2 and solving the resulting system of first order conditions yields the ''maximum likelihood estimates'': : \hat = \overline \equiv \frac\sum_^n x_i, \qquad \hat^2 = \frac \sum_^n (x_i - \overline)^2.


Sample mean

Estimator \textstyle\hat\mu is called the ''
sample mean The sample mean (or "empirical mean") and the sample covariance are statistics computed from a Sample (statistics), sample of data on one or more random variables. The sample mean is the average value (or mean, mean value) of a sample (statistic ...
'', since it is the arithmetic mean of all observations. The statistic \textstyle\overline is complete statistic, complete and sufficient statistic, sufficient for \mu, and therefore by the Lehmann–Scheffé theorem, \textstyle\hat\mu is the uniformly minimum variance unbiased (UMVU) estimator. In finite samples it is distributed normally: : \hat\mu \sim \mathcal(\mu,\sigma^2/n). The variance of this estimator is equal to the ''μμ''-element of the inverse Fisher information matrix \textstyle\mathcal^. This implies that the estimator is efficient estimator, finite-sample efficient. Of practical importance is the fact that the standard error (statistics), standard error of \textstyle\hat\mu is proportional to \textstyle1/\sqrt, that is, if one wishes to decrease the standard error by a factor of 10, one must increase the number of points in the sample by a factor of 100. This fact is widely used in determining sample sizes for opinion polls and the number of trials in Monte Carlo simulations. From the standpoint of the asymptotic theory (statistics), asymptotic theory, \textstyle\hat\mu is consistent estimator, consistent, that is, it convergence in probability, converges in probability to \mu as n\rightarrow\infty. The estimator is also asymptotic normality, asymptotically normal, which is a simple corollary of the fact that it is normal in finite samples: : \sqrt(\hat\mu-\mu) \,\xrightarrow\, \mathcal(0,\sigma^2).


Sample variance

The estimator \textstyle\hat\sigma^2 is called the ''sample variance'', since it is the variance of the sample ((x_1, \ldots, x_n)). In practice, another estimator is often used instead of the \textstyle\hat\sigma^2. This other estimator is denoted s^2, and is also called the ''sample variance'', which represents a certain ambiguity in terminology; its square root s is called the ''sample standard deviation''. The estimator s^2 differs from \textstyle\hat\sigma^2 by having instead of ''n'' in the denominator (the so-called Bessel's correction): : s^2 = \frac \hat\sigma^2 = \frac \sum_^n (x_i - \overline)^2. The difference between s^2 and \textstyle\hat\sigma^2 becomes negligibly small for large ''n''s. In finite samples however, the motivation behind the use of s^2 is that it is an unbiased estimator of the underlying parameter \sigma^2, whereas \textstyle\hat\sigma^2 is biased. Also, by the Lehmann–Scheffé theorem the estimator s^2 is uniformly minimum variance unbiased (Minimum-variance unbiased estimator, UMVU), which makes it the "best" estimator among all unbiased ones. However it can be shown that the biased estimator \textstyle\hat\sigma^2 is "better" than the s^2 in terms of the mean squared error (MSE) criterion. In finite samples both s^2 and \textstyle\hat\sigma^2 have scaled
chi-squared distribution In probability theory and statistics, the chi-squared distribution (also chi-square or \chi^2-distribution) with k degrees of freedom is the distribution of a sum of the squares of k independent standard normal random variables. The chi-squa ...
with degrees of freedom: : s^2 \sim \frac \cdot \chi^2_, \qquad \hat\sigma^2 \sim \frac \cdot \chi^2_. The first of these expressions shows that the variance of s^2 is equal to 2\sigma^4/(n-1), which is slightly greater than the ''σσ''-element of the inverse Fisher information matrix \textstyle\mathcal^. Thus, s^2 is not an efficient estimator for \sigma^2, and moreover, since s^2 is UMVU, we can conclude that the finite-sample efficient estimator for \sigma^2 does not exist. Applying the asymptotic theory, both estimators s^2 and \textstyle\hat\sigma^2 are consistent, that is they converge in probability to \sigma^2 as the sample size n\rightarrow\infty. The two estimators are also both asymptotically normal: : \sqrt(\hat\sigma^2 - \sigma^2) \simeq \sqrt(s^2-\sigma^2) \,\xrightarrow\, \mathcal(0,2\sigma^4). In particular, both estimators are asymptotically efficient for \sigma^2.


Confidence intervals

By
Cochran's theorem In statistics, Cochran's theorem, devised by William G. Cochran, is a theorem used to justify results relating to the probability distributions of statistics that are used in the analysis of variance. Statement Let ''U''1, ..., ''U'N'' be i.i. ...
, for normal distributions the sample mean \textstyle\hat\mu and the sample variance ''s''2 are
independent Independent or Independents may refer to: Arts, entertainment, and media Artist groups * Independents (artist group), a group of modernist painters based in the New Hope, Pennsylvania, area of the United States during the early 1930s * Independ ...
, which means there can be no gain in considering their joint distribution. There is also a converse theorem: if in a sample the sample mean and sample variance are independent, then the sample must have come from the normal distribution. The independence between \textstyle\hat\mu and ''s'' can be employed to construct the so-called ''t-statistic'': : t = \frac = \frac \sim t_ This quantity ''t'' has the
Student's t-distribution In probability and statistics, Student's ''t''-distribution (or simply the ''t''-distribution) is any member of a family of continuous probability distributions that arise when estimating the mean of a normally distributed population in sit ...
with degrees of freedom, and it is an ancillary statistic (independent of the value of the parameters). Inverting the distribution of this ''t''-statistics will allow us to construct the
confidence interval In frequentist statistics, a confidence interval (CI) is a range of estimates for an unknown parameter. A confidence interval is computed at a designated ''confidence level''; the 95% confidence level is most common, but other levels, such as 9 ...
for ''μ''; similarly, inverting the ''χ''2 distribution of the statistic ''s''2 will give us the confidence interval for ''σ''2: :\mu \in \left[ \hat\mu - t_ \fracs, \hat\mu + t_ \fracs \right], :\sigma^2 \in \left[ \frac, \frac \right], where ''tk,p'' and are the ''p''th
quantile In statistics and probability, quantiles are cut points dividing the range of a probability distribution into continuous intervals with equal probabilities, or dividing the observations in a sample in the same way. There is one fewer quantile tha ...
s of the ''t''- and ''χ''2-distributions respectively. These confidence intervals are of the ''confidence level'' , meaning that the true values ''μ'' and ''σ''2 fall outside of these intervals with probability (or significance level) ''α''. In practice people usually take , resulting in the 95% confidence intervals. Approximate formulas can be derived from the asymptotic distributions of \textstyle\hat\mu and ''s''2: :\mu \in \left[ \hat\mu - , z_, \fracs, \hat\mu + , z_, \fracs \right], :\sigma^2 \in \left[ s^2 - , z_, \fracs^2, s^2 + , z_, \fracs^2 \right], The approximate formulas become valid for large values of ''n'', and are more convenient for the manual calculation since the standard normal quantiles ''z''''α''/2 do not depend on ''n''. In particular, the most popular value of , results in .


Normality tests

Normality tests assess the likelihood that the given data set comes from a normal distribution. Typically the null hypothesis ''H''0 is that the observations are distributed normally with unspecified mean ''μ'' and variance ''σ''2, versus the alternative ''Ha'' that the distribution is arbitrary. Many tests (over 40) have been devised for this problem. The more prominent of them are outlined below: Diagnostic plots are more intuitively appealing but subjective at the same time, as they rely on informal human judgement to accept or reject the null hypothesis. *
Q–Q plot In statistics, a Q–Q plot (quantile-quantile plot) is a probability plot, a List of graphical methods, graphical method for comparing two probability distributions by plotting their ''quantiles'' against each other. A point on the plot co ...
, also known as normal probability plot or rankit plot—is a plot of the sorted values from the data set against the expected values of the corresponding quantiles from the standard normal distribution. That is, it's a plot of point of the form (Φ−1(''pk''), ''x''(''k'')), where plotting points ''pk'' are equal to ''pk'' = (''k'' − ''α'')/(''n'' + 1 − 2''α'') and ''α'' is an adjustment constant, which can be anything between 0 and 1. If the null hypothesis is true, the plotted points should approximately lie on a straight line. * P–P plot – similar to the Q–Q plot, but used much less frequently. This method consists of plotting the points (Φ(''z''(''k'')), ''pk''), where \textstyle z_ = (x_-\hat\mu)/\hat\sigma. For normally distributed data this plot should lie on a 45° line between (0, 0) and (1, 1). Goodness-of-fit tests: ''Moment-based tests'': * D'Agostino's K-squared test * Jarque–Bera test * Shapiro–Wilk test: This is based on the fact that the line in the Q–Q plot has the slope of ''σ''. The test compares the least squares estimate of that slope with the value of the sample variance, and rejects the null hypothesis if these two quantities differ significantly. ''Tests based on the empirical distribution function'': * Anderson–Darling test * Lilliefors test (an adaptation of the Kolmogorov–Smirnov test)


Bayesian analysis of the normal distribution

Bayesian analysis of normally distributed data is complicated by the many different possibilities that may be considered: * Either the mean, or the variance, or neither, may be considered a fixed quantity. * When the variance is unknown, analysis may be done directly in terms of the variance, or in terms of the
precision Precision, precise or precisely may refer to: Science, and technology, and mathematics Mathematics and computing (general) * Accuracy and precision, measurement deviation from true value and its scatter * Significant figures, the number of digit ...
, the reciprocal of the variance. The reason for expressing the formulas in terms of precision is that the analysis of most cases is simplified. * Both univariate and multivariate normal distribution, multivariate cases need to be considered. * Either conjugate prior, conjugate or improper prior, improper prior distributions may be placed on the unknown variables. * An additional set of cases occurs in Bayesian linear regression, where in the basic model the data is assumed to be normally distributed, and normal priors are placed on the regression coefficients. The resulting analysis is similar to the basic cases of independent identically distributed data. The formulas for the non-linear-regression cases are summarized in the conjugate prior article.


Sum of two quadratics


= Scalar form

= The following auxiliary formula is useful for simplifying the posterior distribution, posterior update equations, which otherwise become fairly tedious. :a(x-y)^2 + b(x-z)^2 = (a + b)\left(x - \frac\right)^2 + \frac(y-z)^2 This equation rewrites the sum of two quadratics in ''x'' by expanding the squares, grouping the terms in ''x'', and completing the square. Note the following about the complex constant factors attached to some of the terms: # The factor \frac has the form of a weighted average of ''y'' and ''z''. # \frac = \frac = (a^ + b^)^. This shows that this factor can be thought of as resulting from a situation where the Multiplicative inverse, reciprocals of quantities ''a'' and ''b'' add directly, so to combine ''a'' and ''b'' themselves, it's necessary to reciprocate, add, and reciprocate the result again to get back into the original units. This is exactly the sort of operation performed by the harmonic mean, so it is not surprising that \frac is one-half the harmonic mean of ''a'' and ''b''.


= Vector form

= A similar formula can be written for the sum of two vector quadratics: If x, y, z are vectors of length ''k'', and A and B are symmetric matrix, symmetric, invertible matrices of size k\times k, then : \begin & (\mathbf-\mathbf)'\mathbf(\mathbf-\mathbf) + (\mathbf-\mathbf)' \mathbf(\mathbf-\mathbf) \\ = & (\mathbf - \mathbf)'(\mathbf+\mathbf)(\mathbf - \mathbf) + (\mathbf - \mathbf)'(\mathbf^ + \mathbf^)^(\mathbf - \mathbf) \end where :\mathbf = (\mathbf + \mathbf)^(\mathbf\mathbf + \mathbf \mathbf) Note that the form x′ A x is called a
quadratic form In mathematics, a quadratic form is a polynomial with terms all of degree two ("form" is another name for a homogeneous polynomial). For example, :4x^2 + 2xy - 3y^2 is a quadratic form in the variables and . The coefficients usually belong to a ...
and is a scalar (mathematics), scalar: :\mathbf'\mathbf\mathbf = \sum_a_ x_i x_j In other words, it sums up all possible combinations of products of pairs of elements from x, with a separate coefficient for each. In addition, since x_i x_j = x_j x_i, only the sum a_ + a_ matters for any off-diagonal elements of A, and there is no loss of generality in assuming that A is symmetric matrix, symmetric. Furthermore, if A is symmetric, then the form \mathbf'\mathbf\mathbf = \mathbf'\mathbf\mathbf.


Sum of differences from the mean

Another useful formula is as follows: \sum_^n (x_i-\mu)^2 = \sum_^n (x_i-\bar)^2 + n(\bar -\mu)^2 where \bar = \frac \sum_^n x_i.


With known variance

For a set of i.i.d. normally distributed data points X of size ''n'' where each individual point ''x'' follows x \sim \mathcal(\mu, \sigma^2) with known
variance In probability theory and statistics, variance is the expectation of the squared deviation of a random variable from its population mean or sample mean. Variance is a measure of dispersion, meaning it is a measure of how far a set of numbers ...
σ2, the conjugate prior distribution is also normally distributed. This can be shown more easily by rewriting the variance as the
precision Precision, precise or precisely may refer to: Science, and technology, and mathematics Mathematics and computing (general) * Accuracy and precision, measurement deviation from true value and its scatter * Significant figures, the number of digit ...
, i.e. using τ = 1/σ2. Then if x \sim \mathcal(\mu, 1/\tau) and \mu \sim \mathcal(\mu_0, 1/\tau_0), we proceed as follows. First, the likelihood function is (using the formula above for the sum of differences from the mean): :\begin p(\mathbf\mid\mu,\tau) &= \prod_^n \sqrt \exp\left(-\frac\tau(x_i-\mu)^2\right) \\ &= \left(\frac\right)^ \exp\left(-\frac\tau \sum_^n (x_i-\mu)^2\right) \\ &= \left(\frac\right)^ \exp\left[-\frac\tau \left(\sum_^n(x_i-\bar)^2 + n(\bar -\mu)^2\right)\right]. \end Then, we proceed as follows: :\begin p(\mu\mid\mathbf) &\propto p(\mathbf\mid\mu) p(\mu) \\ & = \left(\frac\right)^ \exp\left[-\frac\tau \left(\sum_^n(x_i-\bar)^2 + n(\bar -\mu)^2\right)\right] \sqrt \exp\left(-\frac\tau_0(\mu-\mu_0)^2\right) \\ &\propto \exp\left(-\frac\left(\tau\left(\sum_^n(x_i-\bar)^2 + n(\bar -\mu)^2\right) + \tau_0(\mu-\mu_0)^2\right)\right) \\ &\propto \exp\left(-\frac \left(n\tau(\bar-\mu)^2 + \tau_0(\mu-\mu_0)^2 \right)\right) \\ &= \exp\left(-\frac(n\tau + \tau_0)\left(\mu - \dfrac\right)^2 + \frac(\bar - \mu_0)^2\right) \\ &\propto \exp\left(-\frac(n\tau + \tau_0)\left(\mu - \dfrac\right)^2\right) \end In the above derivation, we used the formula above for the sum of two quadratics and eliminated all constant factors not involving ''μ''. The result is the kernel (statistics), kernel of a normal distribution, with mean \frac and precision n\tau + \tau_0, i.e. :p(\mu\mid\mathbf) \sim \mathcal\left(\frac, \frac\right) This can be written as a set of Bayesian update equations for the posterior parameters in terms of the prior parameters: :\begin \tau_0' &= \tau_0 + n\tau \\[5pt] \mu_0' &= \frac \\[5pt] \bar &= \frac\sum_^n x_i \end That is, to combine ''n'' data points with total precision of ''nτ'' (or equivalently, total variance of ''n''/''σ''2) and mean of values \bar, derive a new total precision simply by adding the total precision of the data to the prior total precision, and form a new mean through a ''precision-weighted average'', i.e. a weighted average of the data mean and the prior mean, each weighted by the associated total precision. This makes logical sense if the precision is thought of as indicating the certainty of the observations: In the distribution of the posterior mean, each of the input components is weighted by its certainty, and the certainty of this distribution is the sum of the individual certainties. (For the intuition of this, compare the expression "the whole is (or is not) greater than the sum of its parts". In addition, consider that the knowledge of the posterior comes from a combination of the knowledge of the prior and likelihood, so it makes sense that we are more certain of it than of either of its components.) The above formula reveals why it is more convenient to do Bayesian analysis of conjugate priors for the normal distribution in terms of the precision. The posterior precision is simply the sum of the prior and likelihood precisions, and the posterior mean is computed through a precision-weighted average, as described above. The same formulas can be written in terms of variance by reciprocating all the precisions, yielding the more ugly formulas :\begin ' &= \frac \\[5pt] \mu_0' &= \frac \\[5pt] \bar &= \frac\sum_^n x_i \end


With known mean

For a set of i.i.d. normally distributed data points X of size ''n'' where each individual point ''x'' follows x \sim \mathcal(\mu, \sigma^2) with known mean μ, the conjugate prior of the
variance In probability theory and statistics, variance is the expectation of the squared deviation of a random variable from its population mean or sample mean. Variance is a measure of dispersion, meaning it is a measure of how far a set of numbers ...
has an inverse gamma distribution or a scaled inverse chi-squared distribution. The two are equivalent 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. The prior for σ2 is as follows: :p(\sigma^2\mid\nu_0,\sigma_0^2) = \frac~\frac \propto \frac The likelihood function from above, written in terms of the variance, is: :\begin p(\mathbf\mid\mu,\sigma^2) &= \left(\frac\right)^ \exp\left[-\frac \sum_^n (x_i-\mu)^2\right] \\ &= \left(\frac\right)^ \exp\left[-\frac\right] \end where :S = \sum_^n (x_i-\mu)^2. Then: :\begin p(\sigma^2\mid\mathbf) &\propto p(\mathbf\mid\sigma^2) p(\sigma^2) \\ &= \left(\frac\right)^ \exp\left[-\frac\right] \frac~\frac \\ &\propto \left(\frac\right)^ \frac \exp\left[-\frac + \frac\right] \\ &= \frac \exp\left[-\frac\right] \end The above is also a scaled inverse chi-squared distribution where :\begin \nu_0' &= \nu_0 + n \\ \nu_0'' &= \nu_0 \sigma_0^2 + \sum_^n (x_i-\mu)^2 \end or equivalently :\begin \nu_0' &= \nu_0 + n \\ ' &= \frac \end Reparameterizing in terms of an inverse gamma distribution, the result is: :\begin \alpha' &= \alpha + \frac \\ \beta' &= \beta + \frac \end


With unknown mean and unknown variance

For a set of i.i.d. normally distributed data points X of size ''n'' where each individual point ''x'' follows x \sim \mathcal(\mu, \sigma^2) with unknown mean μ and unknown
variance In probability theory and statistics, variance is the expectation of the squared deviation of a random variable from its population mean or sample mean. Variance is a measure of dispersion, meaning it is a measure of how far a set of numbers ...
σ2, a combined (multivariate) conjugate prior is placed over the mean and variance, consisting of a normal-inverse-gamma distribution. Logically, this originates as follows: # From the analysis of the case with unknown mean but known variance, we see that the update equations involve sufficient statistics computed from the data consisting of the mean of the data points and the total variance of the data points, computed in turn from the known variance divided by the number of data points. # From the analysis of the case with unknown variance but known mean, we see that the update equations involve sufficient statistics over the data consisting of the number of data points and sum of squared deviations. # Keep in mind that the posterior update values serve as the prior distribution when further data is handled. Thus, we should logically think of our priors in terms of the sufficient statistics just described, with the same semantics kept in mind as much as possible. # To handle the case where both mean and variance are unknown, we could place independent priors over the mean and variance, with fixed estimates of the average mean, total variance, number of data points used to compute the variance prior, and sum of squared deviations. Note however that in reality, the total variance of the mean depends on the unknown variance, and the sum of squared deviations that goes into the variance prior (appears to) depend on the unknown mean. In practice, the latter dependence is relatively unimportant: Shifting the actual mean shifts the generated points by an equal amount, and on average the squared deviations will remain the same. This is not the case, however, with the total variance of the mean: As the unknown variance increases, the total variance of the mean will increase proportionately, and we would like to capture this dependence. # This suggests that we create a ''conditional prior'' of the mean on the unknown variance, with a hyperparameter specifying the mean of the pseudo-observations associated with the prior, and another parameter specifying the number of pseudo-observations. This number serves as a scaling parameter on the variance, making it possible to control the overall variance of the mean relative to the actual variance parameter. The prior for the variance also has two hyperparameters, one specifying the sum of squared deviations of the pseudo-observations associated with the prior, and another specifying once again the number of pseudo-observations. Note that each of the priors has a hyperparameter specifying the number of pseudo-observations, and in each case this controls the relative variance of that prior. These are given as two separate hyperparameters so that the variance (aka the confidence) of the two priors can be controlled separately. # This leads immediately to the normal-inverse-gamma distribution, which is the product of the two distributions just defined, with conjugate priors used (an inverse gamma distribution over the variance, and a normal distribution over the mean, ''conditional'' on the variance) and with the same four parameters just defined. The priors are normally defined as follows: :\begin p(\mu\mid\sigma^2; \mu_0, n_0) &\sim \mathcal(\mu_0,\sigma^2/n_0) \\ p(\sigma^2; \nu_0,\sigma_0^2) &\sim I\chi^2(\nu_0,\sigma_0^2) = IG(\nu_0/2, \nu_0\sigma_0^2/2) \end The update equations can be derived, and look as follows: :\begin \bar &= \frac 1 n \sum_^n x_i \\ \mu_0' &= \frac \\ n_0' &= n_0 + n \\ \nu_0' &= \nu_0 + n \\ \nu_0'' &= \nu_0 \sigma_0^2 + \sum_^n (x_i-\bar)^2 + \frac(\mu_0 - \bar)^2 \end The respective numbers of pseudo-observations add the number of actual observations to them. The new mean hyperparameter is once again a weighted average, this time weighted by the relative numbers of observations. Finally, the update for \nu_0'' is similar to the case with known mean, but in this case the sum of squared deviations is taken with respect to the observed data mean rather than the true mean, and as a result a new "interaction term" needs to be added to take care of the additional error source stemming from the deviation between prior and data mean.


Occurrence and applications

The occurrence of normal distribution in practical problems can be loosely classified into four categories: # Exactly normal distributions; # Approximately normal laws, for example when such approximation is justified by the
central limit theorem In probability theory, the central limit theorem (CLT) establishes that, in many situations, when independent random variables are summed up, their properly normalized sum tends toward a normal distribution even if the original variables themselv ...
; and # Distributions modeled as normal – the normal distribution being the distribution with Principle of maximum entropy, maximum entropy for a given mean and variance. # Regression problems – the normal distribution being found after systematic effects have been modeled sufficiently well.


Exact normality

Certain quantities in physics are distributed normally, as was first demonstrated by James Clerk Maxwell. Examples of such quantities are: * Probability density function of a ground state in a quantum harmonic oscillator. * The position of a particle that experiences diffusion. If initially the particle is located at a specific point (that is its probability distribution is the Dirac delta function), then after time ''t'' its location is described by a normal distribution with variance ''t'', which satisfies the diffusion equation \frac f(x,t) = \frac \frac f(x,t). If the initial location is given by a certain density function g(x), then the density at time ''t'' is the convolution of ''g'' and the normal PDF.


Approximate normality

''Approximately'' normal distributions occur in many situations, as explained by the
central limit theorem In probability theory, the central limit theorem (CLT) establishes that, in many situations, when independent random variables are summed up, their properly normalized sum tends toward a normal distribution even if the original variables themselv ...
. When the outcome is produced by many small effects acting ''additively and independently'', its distribution will be close to normal. The normal approximation will not be valid if the effects act multiplicatively (instead of additively), or if there is a single external influence that has a considerably larger magnitude than the rest of the effects. * In counting problems, where the central limit theorem includes a discrete-to-continuum approximation and where Infinite divisibility, infinitely divisible and Indecomposable distribution, decomposable distributions are involved, such as ** binomial distribution, Binomial random variables, associated with binary response variables; ** Poisson distribution, Poisson random variables, associated with rare events; * Thermal radiation has a Bose–Einstein statistics, Bose–Einstein distribution on very short time scales, and a normal distribution on longer timescales due to the central limit theorem.


Assumed normality

There are statistical methods to empirically test that assumption; see the above #Normality tests, Normality tests section. * In biology, the ''logarithm'' of various variables tend to have a normal distribution, that is, they tend to have a
log-normal distribution In probability theory, a log-normal (or lognormal) distribution is a continuous probability distribution of a random variable whose logarithm is normally distributed. Thus, if the random variable is log-normally distributed, then has a normal ...
(after separation on male/female subpopulations), with examples including: ** Measures of size of living tissue (length, height, skin area, weight); ** The ''length'' of ''inert'' appendages (hair, claws, nails, teeth) of biological specimens, ''in the direction of growth''; presumably the thickness of tree bark also falls under this category; ** Certain physiological measurements, such as blood pressure of adult humans. * In finance, in particular the Black–Scholes model, changes in the ''logarithm'' of exchange rates, price indices, and stock market indices are assumed normal (these variables behave like compound interest, not like simple interest, and so are multiplicative). Some mathematicians such as Benoit Mandelbrot have argued that Levy skew alpha-stable distribution, log-Levy distributions, which possesses heavy tails would be a more appropriate model, in particular for the analysis for stock market crashes. The use of the assumption of normal distribution occurring in financial models has also been criticized by Nassim Nicholas Taleb in his works. * Propagation of uncertainty, Measurement errors in physical experiments are often modeled by a normal distribution. This use of a normal distribution does not imply that one is assuming the measurement errors are normally distributed, rather using the normal distribution produces the most conservative predictions possible given only knowledge about the mean and variance of the errors. * In Standardized testing (statistics), standardized testing, results can be made to have a normal distribution by either selecting the number and difficulty of questions (as in the Intelligence quotient, IQ test) or transforming the raw test scores into "output" scores by fitting them to the normal distribution. For example, the SAT's traditional range of 200–800 is based on a normal distribution with a mean of 500 and a standard deviation of 100. * Many scores are derived from the normal distribution, including percentile ranks ("percentiles" or "quantiles"), normal curve equivalents, stanines, Standard score, z-scores, and T-scores. Additionally, some behavioral statistical procedures assume that scores are normally distributed; for example, Student's t-test, t-tests and Analysis of variance, ANOVAs. Bell curve grading assigns relative grades based on a normal distribution of scores. * In hydrology the distribution of long duration river discharge or rainfall, e.g. monthly and yearly totals, is often thought to be practically normal according to the
central limit theorem In probability theory, the central limit theorem (CLT) establishes that, in many situations, when independent random variables are summed up, their properly normalized sum tends toward a normal distribution even if the original variables themselv ...
. The blue picture, made with CumFreq, illustrates an example of fitting the normal distribution to ranked October rainfalls showing the 90% confidence belt based on the
binomial distribution In probability theory and statistics, the binomial distribution with parameters ''n'' and ''p'' is the discrete probability distribution of the number of successes in a sequence of ''n'' independent experiments, each asking a yes–no quest ...
. The rainfall data are represented by plotting positions as part of the cumulative frequency analysis.


Methodological problems and peer review

John Ioannidis argues that using normally distributed standard deviations as standards for validating research findings leave falsifiability, falsifiable predictions about phenomena that are not normally distributed untested. This includes, for example, phenomena that only appear when all necessary conditions are present and one cannot be a substitute for another in an addition-like way and phenomena that are not randomly distributed. Ioannidis argues that standard deviation-centered validation gives a false appearance of validity to hypotheses and theories where some but not all falsifiable predictions are normally distributed since the portion of falsifiable predictions that there is evidence against may and in some cases are in the non-normally distributed parts of the range of falsifiable predictions, as well as baselessly dismissing hypotheses for which none of the falsifiable predictions are normally distributed as if were they unfalsifiable when in fact they do make falsifiable predictions. It is argued by Ioannidis that many cases of mutually exclusive theories being accepted as "validated" by research journals are caused by failure of the journals to take in empirical falsifications of non-normally distributed predictions, and not because mutually exclusive theories are true, which they cannot be, although two mutually exclusive theories can both be wrong and a third one correct.


Computational methods


Generating values from normal distribution

In computer simulations, especially in applications of the Monte-Carlo method, it is often desirable to generate values that are normally distributed. The algorithms listed below all generate the standard normal deviates, since a can be generated as , where ''Z'' is standard normal. All these algorithms rely on the availability of a random number generator ''U'' capable of producing Uniform distribution (continuous), uniform random variates. * The most straightforward method is based on the probability integral transform property: if ''U'' is distributed uniformly on (0,1), then Φ−1(''U'') will have the standard normal distribution. The drawback of this method is that it relies on calculation of the
probit function In probability theory and statistics, the probit function is the quantile function associated with the standard normal distribution. It has applications in data analysis and machine learning, in particular exploratory statistical graphics and ...
Φ−1, which cannot be done analytically. Some approximate methods are described in and in the error function, erf article. Wichura gives a fast algorithm for computing this function to 16 decimal places, which is used by R programming language, R to compute random variates of the normal distribution. * Irwin–Hall distribution#Approximating a Normal distribution, An easy-to-program approximate approach that relies on the
central limit theorem In probability theory, the central limit theorem (CLT) establishes that, in many situations, when independent random variables are summed up, their properly normalized sum tends toward a normal distribution even if the original variables themselv ...
is as follows: generate 12 uniform ''U''(0,1) deviates, add them all up, and subtract 6 – the resulting random variable will have approximately standard normal distribution. In truth, the distribution will be Irwin–Hall distribution, Irwin–Hall, which is a 12-section eleventh-order polynomial approximation to the normal distribution. This random deviate will have a limited range of (−6, 6). Note that in a true normal distribution, only 0.00034% of all samples will fall outside ±6σ. * The Box–Muller transform, Box–Muller method uses two independent random numbers ''U'' and ''V'' distributed uniform distribution (continuous), uniformly on (0,1). Then the two random variables ''X'' and ''Y'' X = \sqrt \, \cos(2 \pi V) , \qquad Y = \sqrt \, \sin(2 \pi V) . will both have the standard normal distribution, and will be
independent Independent or Independents may refer to: Arts, entertainment, and media Artist groups * Independents (artist group), a group of modernist painters based in the New Hope, Pennsylvania, area of the United States during the early 1930s * Independ ...
. This formulation arises because for a bivariate normal random vector (''X'', ''Y'') the squared norm will have the
chi-squared distribution In probability theory and statistics, the chi-squared distribution (also chi-square or \chi^2-distribution) with k degrees of freedom is the distribution of a sum of the squares of k independent standard normal random variables. The chi-squa ...
with two degrees of freedom, which is an easily generated exponential distribution, exponential random variable corresponding to the quantity −2ln(''U'') in these equations; and the angle is distributed uniformly around the circle, chosen by the random variable ''V''. * The Marsaglia polar method is a modification of the Box–Muller method which does not require computation of the sine and cosine functions. In this method, ''U'' and ''V'' are drawn from the uniform (−1,1) distribution, and then is computed. If ''S'' is greater or equal to 1, then the method starts over, otherwise the two quantities X = U\sqrt, \qquad Y = V\sqrt are returned. Again, ''X'' and ''Y'' are independent, standard normal random variables. * The Ratio method is a rejection method. The algorithm proceeds as follows: ** Generate two independent uniform deviates ''U'' and ''V''; ** Compute ''X'' = (''V'' − 0.5)/''U''; ** Optional: if ''X''2 ≤ 5 − 4''e''1/4''U'' then accept ''X'' and terminate algorithm; ** Optional: if ''X''2 ≥ 4''e''−1.35/''U'' + 1.4 then reject ''X'' and start over from step 1; ** If ''X''2 ≤ −4 ln''U'' then accept ''X'', otherwise start over the algorithm. *:The two optional steps allow the evaluation of the logarithm in the last step to be avoided in most cases. These steps can be greatly improved so that the logarithm is rarely evaluated. * The ziggurat algorithm is faster than the Box–Muller transform and still exact. In about 97% of all cases it uses only two random numbers, one random integer and one random uniform, one multiplication and an if-test. Only in 3% of the cases, where the combination of those two falls outside the "core of the ziggurat" (a kind of rejection sampling using logarithms), do exponentials and more uniform random numbers have to be employed. * Integer arithmetic can be used to sample from the standard normal distribution. This method is exact in the sense that it satisfies the conditions of ''ideal approximation''; i.e., it is equivalent to sampling a real number from the standard normal distribution and rounding this to the nearest representable floating point number. * There is also some investigation into the connection between the fast Hadamard transform and the normal distribution, since the transform employs just addition and subtraction and by the central limit theorem random numbers from almost any distribution will be transformed into the normal distribution. In this regard a series of Hadamard transforms can be combined with random permutations to turn arbitrary data sets into a normally distributed data.


Numerical approximations for the normal CDF and normal quantile function

The standard normal cumulative distribution function, CDF is widely used in scientific and statistical computing. The values Φ(''x'') may be approximated very accurately by a variety of methods, such as numerical integration, Taylor series, asymptotic series and Gauss's continued fraction#Of Kummer's confluent hypergeometric function, continued fractions. Different approximations are used depending on the desired level of accuracy. * give the approximation for Φ(''x'') for ''x > 0'' with the absolute error (algorith
26.2.17
: \Phi(x) = 1 - \varphi(x)\left(b_1 t + b_2 t^2 + b_3t^3 + b_4 t^4 + b_5 t^5\right) + \varepsilon(x), \qquad t = \frac, where ''ϕ''(''x'') is the standard normal PDF, and ''b''0 = 0.2316419, ''b''1 = 0.319381530, ''b''2 = −0.356563782, ''b''3 = 1.781477937, ''b''4 = −1.821255978, ''b''5 = 1.330274429. * lists some dozens of approximations – by means of rational functions, with or without exponentials – for the function. His algorithms vary in the degree of complexity and the resulting precision, with maximum absolute precision of 24 digits. An algorithm by combines Hart's algorithm 5666 with a continued fraction approximation in the tail to provide a fast computation algorithm with a 16-digit precision. * after recalling Hart68 solution is not suited for erf, gives a solution for both erf and erfc, with maximal relative error bound, via rational function, Rational Chebyshev Approximation. * suggested a simple algorithm based on the Taylor series expansion \Phi(x) = \frac12 + \varphi(x)\left( x + \frac 3 + \frac + \frac + \frac + \cdots \right) for calculating with arbitrary precision. The drawback of this algorithm is comparatively slow calculation time (for example it takes over 300 iterations to calculate the function with 16 digits of precision when ). * The GNU Scientific Library calculates values of the standard normal CDF using Hart's algorithms and approximations with Chebyshev polynomials. Shore (1982) introduced simple approximations that may be incorporated in stochastic optimization models of engineering and operations research, like reliability engineering and inventory analysis. Denoting , the simplest approximation for the quantile function is: z = \Phi^(p)=5.5556\left[1- \left( \frac p \right)^\right],\qquad p\ge 1/2 This approximation delivers for ''z'' a maximum absolute error of 0.026 (for , corresponding to ). For replace ''p'' by and change sign. Another approximation, somewhat less accurate, is the single-parameter approximation: z=-0.4115\left\, \qquad p\ge 1/2 The latter had served to derive a simple approximation for the loss integral of the normal distribution, defined by \begin L(z) & =\int_z^\infty (u-z)\varphi(u) \, du=\int_z^\infty [1-\Phi (u)] \, du \\[5pt] L(z) & \approx \begin 0.4115\left(\dfrac p \right) - z, & p<1/2, \\ \\ 0.4115\left( \dfrac p \right), & p\ge 1/2. \end \\[5pt] \text \\ L(z) & \approx \begin 0.4115\left\, & p < 1/2, \\ \\ 0.4115 \dfrac p, & p\ge 1/2. \end \end This approximation is particularly accurate for the right far-tail (maximum error of 10−3 for z≥1.4). Highly accurate approximations for the CDF, based on Response modeling methodology, Response Modeling Methodology (RMM, Shore, 2011, 2012), are shown in Shore (2005). Some more approximations can be found at: Error function#Approximation with elementary functions. In particular, small ''relative'' error on the whole domain for the CDF \Phi and the quantile function \Phi^ as well, is achieved via an explicitly invertible formula by Sergei Winitzki in 2008.


History


Development

Some authors attribute the credit for the discovery of the normal distribution to Abraham de Moivre, de Moivre, who in 1738 published in the second edition of his "''The Doctrine of Chances''" the study of the coefficients in the binomial expansion of . De Moivre proved that the middle term in this expansion has the approximate magnitude of 2^n/\sqrt, and that "If ''m'' or ''n'' be a Quantity infinitely great, then the Logarithm of the Ratio, which a Term distant from the middle by the Interval ''ℓ'', has to the middle Term, is -\frac." Although this theorem can be interpreted as the first obscure expression for the normal probability law, Stephen Stigler, Stigler points out that de Moivre himself did not interpret his results as anything more than the approximate rule for the binomial coefficients, and in particular de Moivre lacked the concept of the probability density function. In 1823 Carl Friedrich Gauss, Gauss published his monograph "''Theoria combinationis observationum erroribus minimis obnoxiae''" where among other things he introduces several important statistical concepts, such as the method of least squares, the method of maximum likelihood, and the ''normal distribution''. Gauss used ''M'', , to denote the measurements of some unknown quantity ''V'', and sought the "most probable" estimator of that quantity: the one that maximizes the probability of obtaining the observed experimental results. In his notation φΔ is the probability density function of the measurement errors of magnitude Δ. Not knowing what the function ''φ'' is, Gauss requires that his method should reduce to the well-known answer: the arithmetic mean of the measured values. Starting from these principles, Gauss demonstrates that the only law that rationalizes the choice of arithmetic mean as an estimator of the location parameter, is the normal law of errors: \varphi\mathit = \frac h \, e^, where ''h'' is "the measure of the precision of the observations". Using this normal law as a generic model for errors in the experiments, Gauss formulates what is now known as the non-linear least squares, non-linear weighted least squares method. Although Gauss was the first to suggest the normal distribution law, Pierre Simon de Laplace, Laplace made significant contributions. It was Laplace who first posed the problem of aggregating several observations in 1774, although his own solution led to the Laplacian distribution. It was Laplace who first calculated the value of the Gaussian integral, integral in 1782, providing the normalization constant for the normal distribution. Finally, it was Laplace who in 1810 proved and presented to the Academy the fundamental
central limit theorem In probability theory, the central limit theorem (CLT) establishes that, in many situations, when independent random variables are summed up, their properly normalized sum tends toward a normal distribution even if the original variables themselv ...
, which emphasized the theoretical importance of the normal distribution. It is of interest to note that in 1809 an Irish-American mathematician Robert Adrain published two insightful but flawed derivations of the normal probability law, simultaneously and independently from Gauss. His works remained largely unnoticed by the scientific community, until in 1871 they were exhumed by Cleveland Abbe, Abbe. In the middle of the 19th century James Clerk Maxwell, Maxwell demonstrated that the normal distribution is not just a convenient mathematical tool, but may also occur in natural phenomena: "The number of particles whose velocity, resolved in a certain direction, lies between ''x'' and ''x'' + ''dx'' is \operatorname \frac\; e^ \, dx


Naming

Today, the concept is usually known in English as the normal distribution or Gaussian distribution. Other less common names include Gauss distribution, Laplace-Gauss distribution, the law of error, the law of facility of errors, Laplace's second law, Gaussian law. Gauss himself apparently coined the term with reference to the "normal equations" involved in its applications, with normal having its technical meaning of orthogonal rather than "usual". However, by the end of the 19th century some authors had started using the name ''normal distribution'', where the word "normal" was used as an adjective – the term now being seen as a reflection of the fact that this distribution was seen as typical, common – and thus "normal". Charles Sanders Peirce, Peirce (one of those authors) once defined "normal" thus: "...the 'normal' is not the average (or any other kind of mean) of what actually occurs, but of what ''would'', in the long run, occur under certain circumstances." Around the turn of the 20th century Karl Pearson, Pearson popularized the term ''normal'' as a designation for this distribution. Also, it was Pearson who first wrote the distribution in terms of the standard deviation ''σ'' as in modern notation. Soon after this, in year 1915, Ronald Fisher, Fisher added the location parameter to the formula for normal distribution, expressing it in the way it is written nowadays: df = \frac e^ \, dx. The term "standard normal", which denotes the normal distribution with zero mean and unit variance came into general use around the 1950s, appearing in the popular textbooks by P. G. Hoel (1947) "''Introduction to mathematical statistics''" and A. M. Mood (1950) "''Introduction to the theory of statistics''".


See also

* Bates distribution – similar to the Irwin–Hall distribution, but rescaled back into the 0 to 1 range * Behrens–Fisher problem – the long-standing problem of testing whether two normal samples with different variances have same means; * Bhattacharyya distance – method used to separate mixtures of normal distributions * Erdős–Kac theorem – on the occurrence of the normal distribution in number theory * Full width at half maximum * Gaussian blur – convolution, which uses the normal distribution as a kernel * Modified half-normal distribution with the pdf on (0, \infty) is given as f(x)= \frac, where \Psi(\alpha,z)=_1\Psi_1\left(\begin\left(\alpha,\frac\right)\\(1,0)\end;z \right) denotes the Fox-Wright Psi function. * Normally distributed and uncorrelated does not imply independent * Ratio normal distribution * Reciprocal normal distribution * Standard normal table * Stein's lemma * Sub-Gaussian distribution * Sum of normally distributed random variables * Tweedie distribution – The normal distribution is a member of the family of Tweedie exponential dispersion models. * Wrapped normal distribution – the Normal distribution applied to a circular domain * Z-test – using the normal distribution


Notes


References


Citations


Sources

* * In particular, the entries fo
"bell-shaped and bell curve"
an

* * * * * * * * * * * * * * * * * * * * * * * * Translated by Stephen M. Stigler in ''Statistical Science'' 1 (3), 1986: . * * * * * * * * * * * * * * * * * * * * * * * * * * * *


External links

*
Normal distribution calculator
{{Authority control Normal distribution, Continuous distributions Conjugate prior distributions Exponential family distributions Stable distributions Location-scale family probability distributions]">X - \mu, ^p\right&= \sigma^p (p-1)!! \cdot \begin \sqrt & \textp\text \\ 1 & \textp\text \end \\ &= \sigma^p \cdot \frac. \end The last formula is valid also for any non-integer p>-1. When the mean \mu \ne 0, the plain and absolute moments can be expressed in terms of
confluent hypergeometric function In mathematics, a confluent hypergeometric function is a solution of a confluent hypergeometric equation, which is a degenerate form of a hypergeometric differential equation where two of the three regular singularities merge into an irregular ...
s _1F_1 and U. :\begin \operatorname\left ^p\right&= \sigma^p\cdot (-i\sqrt 2)^p U\left(-\frac, \frac, -\frac \left( \frac \mu \sigma \right)^2 \right), \\ \operatorname\left[, X, ^p \right] &= \sigma^p \cdot 2^ \frac _1F_1\left( -\frac, \frac, -\frac \left( \frac \mu \sigma \right)^2 \right). \end These expressions remain valid even if p is not an integer. See also Hermite polynomials#"Negative variance", generalized Hermite polynomials. The expectation of X conditioned on the event that X lies in an interval ,b/math> is given by :\operatorname\left \mid a= \mu - \sigma^2\frac where f and F respectively are the density and the cumulative distribution function of X. For b=\infty this is known as the
inverse Mills ratio In probability theory, the Mills ratio (or Mills's ratio) of a continuous random variable X is the function : m(x) := \frac , where f(x) is the probability density function, and :\bar(x) := \Pr x.html" ;"title=">x">>x= \int_x^ f(u)\, du is the ...
. Note that above, density f of X is used instead of standard normal density as in inverse Mills ratio, so here we have \sigma^2 instead of \sigma.


Fourier transform and characteristic function

The
Fourier transform A Fourier transform (FT) is a mathematical transform that decomposes functions into frequency components, which are represented by the output of the transform as a function of frequency. Most commonly functions of time or space are transformed, ...
of a normal density f with mean \mu and standard deviation \sigma is : \hat f(t) = \int_^\infty f(x)e^ \, dx = e^ e^ where i is the
imaginary unit The imaginary unit or unit imaginary number () is a solution to the quadratic equation x^2+1=0. Although there is no real number with this property, can be used to extend the real numbers to what are called complex numbers, using addition an ...
. If the mean \mu=0, the first factor is 1, and the Fourier transform is, apart from a constant factor, a normal density on the
frequency domain In physics, electronics, control systems engineering, and statistics, the frequency domain refers to the analysis of mathematical functions or signals with respect to frequency, rather than time. Put simply, a time-domain graph shows how a signa ...
, with mean 0 and standard deviation 1/\sigma. In particular, the standard normal distribution \varphi is an
eigenfunction In mathematics, an eigenfunction of a linear operator ''D'' defined on some function space is any non-zero function f in that space that, when acted upon by ''D'', is only multiplied by some scaling factor called an eigenvalue. As an equation, th ...
of the Fourier transform. In probability theory, the Fourier transform of the probability distribution of a real-valued random variable X is closely connected to the
characteristic function In mathematics, the term "characteristic function" can refer to any of several distinct concepts: * The indicator function of a subset, that is the function ::\mathbf_A\colon X \to \, :which for a given subset ''A'' of ''X'', has value 1 at points ...
\varphi_X(t) of that variable, which is defined as the
expected value In probability theory, the expected value (also called expectation, expectancy, mathematical expectation, mean, average, or first moment) is a generalization of the weighted average. Informally, the expected value is the arithmetic mean of a l ...
of e^, as a function of the real variable t (the
frequency Frequency is the number of occurrences of a repeating event per unit of time. It is also occasionally referred to as ''temporal frequency'' for clarity, and is distinct from ''angular frequency''. Frequency is measured in hertz (Hz) which is eq ...
parameter of the Fourier transform). This definition can be analytically extended to a complex-value variable t. The relation between both is: :\varphi_X(t) = \hat f(-t)


Moment and cumulant generating functions

The
moment generating function In probability theory and statistics, the moment-generating function of a real-valued random variable is an alternative specification of its probability distribution. Thus, it provides the basis of an alternative route to analytical results compare ...
of a real random variable X is the expected value of e^, as a function of the real parameter t. For a normal distribution with density f, mean \mu and deviation \sigma, the moment generating function exists and is equal to :M(t) = \operatorname ^= \hat f(it) = e^ e^ The
cumulant generating function In probability theory and statistics, the cumulants of a probability distribution are a set of quantities that provide an alternative to the '' moments'' of the distribution. Any two probability distributions whose moments are identical will have ...
is the logarithm of the moment generating function, namely :g(t) = \ln M(t) = \mu t + \tfrac 12 \sigma^2 t^2 Since this is a quadratic polynomial in t, only the first two
cumulant In probability theory and statistics, the cumulants of a probability distribution are a set of quantities that provide an alternative to the '' moments'' of the distribution. Any two probability distributions whose moments are identical will ha ...
s are nonzero, namely the mean \mu and the variance \sigma^2.


Stein operator and class

Within
Stein's method Stein's method is a general method in probability theory to obtain bounds on the distance between two probability distributions with respect to a probability metric. It was introduced by Charles Stein, who first published it in 1972, to obtain ...
the Stein operator and class of a random variable X \sim \mathcal(\mu, \sigma^2) are \mathcalf(x) = \sigma^2 f'(x) - (x-\mu)f(x) and \mathcal the class of all absolutely continuous functions f : \R \to \R \mbox\mathbb[, f'(X), ]< \infty.


Zero-variance limit

In the limit (mathematics), limit when \sigma tends to zero, the probability density f(x) eventually tends to zero at any x\ne \mu, but grows without limit if x = \mu, while its integral remains equal to 1. Therefore, the normal distribution cannot be defined as an ordinary
function Function or functionality may refer to: Computing * Function key, a type of key on computer keyboards * Function model, a structured representation of processes in a system * Function object or functor or functionoid, a concept of object-oriente ...
when \sigma = 0. However, one can define the normal distribution with zero variance as a
generalized function In mathematics, generalized functions are objects extending the notion of functions. There is more than one recognized theory, for example the theory of distributions. Generalized functions are especially useful in making discontinuous functions ...
; specifically, as Dirac's "delta function" \delta translated by the mean \mu, that is f(x)=\delta(x-\mu). Its CDF is then the
Heaviside step function The Heaviside step function, or the unit step function, usually denoted by or (but sometimes , or ), is a step function, named after Oliver Heaviside (1850–1925), the value of which is zero for negative arguments and one for positive argume ...
translated by the mean \mu, namely :F(x) = \begin 0 & \textx < \mu \\ 1 & \textx \geq \mu \end


Maximum entropy

Of all probability distributions over the reals with a specified mean \mu and variance \sigma^2, the normal distribution N(\mu,\sigma^2) is the one with maximum entropy. If X is a
continuous random variable In probability theory and statistics, a probability distribution is the mathematical function that gives the probabilities of occurrence of different possible outcomes for an experiment. It is a mathematical description of a random phenomenon i ...
with
probability density In probability theory, a probability density function (PDF), or density of a continuous random variable, is a function whose value at any given sample (or point) in the sample space (the set of possible values taken by the random variable) can ...
f(x), then the entropy of X is defined as : H(X) = - \int_^\infty f(x)\log f(x)\, dx where f(x)\log f(x) is understood to be zero whenever f(x)=0. This functional can be maximized, subject to the constraints that the distribution is properly normalized and has a specified variance, by using
variational calculus The calculus of variations (or Variational Calculus) is a field of mathematical analysis that uses variations, which are small changes in functions and functionals, to find maxima and minima of functionals: mappings from a set of functions t ...
. A function with two
Lagrange multipliers In mathematical optimization, the method of Lagrange multipliers is a strategy for finding the local maxima and minima of a function subject to equality constraints (i.e., subject to the condition that one or more equations have to be satisfied ex ...
is defined: : L=\int_^\infty f(x)\ln(f(x))\,dx-\lambda_0\left(1-\int_^\infty f(x)\,dx\right)-\lambda\left(\sigma^2-\int_^\infty f(x)(x-\mu)^2\,dx\right) where f(x) is, for now, regarded as some density function with mean \mu and standard deviation \sigma. At maximum entropy, a small variation \delta f(x) about f(x) will produce a variation \delta L about L which is equal to 0: : 0=\delta L=\int_^\infty \delta f(x)\left (\ln(f(x))+1+\lambda_0+\lambda(x-\mu)^2\right )\,dx Since this must hold for any small \delta f(x), the term in brackets must be zero, and solving for f(x) yields: :f(x)=e^ Using the constraint equations to solve for \lambda_0 and \lambda yields the density of the normal distribution: : f(x, \mu, \sigma)=\frace^ The entropy of a normal distribution is equal to : H(X)=\tfrac(1+\log(2\sigma^2\pi))


Other properties


Related distributions


Central limit theorem

The central limit theorem states that under certain (fairly common) conditions, the sum of many random variables will have an approximately normal distribution. More specifically, where X_1,\ldots ,X_n are
independent and identically distributed In probability theory and statistics, a collection of random variables is independent and identically distributed if each random variable has the same probability distribution as the others and all are mutually independent. This property is usua ...
random variables with the same arbitrary distribution, zero mean, and variance \sigma^2 and Z is their mean scaled by \sqrt : Z = \sqrt\left(\frac\sum_^n X_i\right) Then, as n increases, the probability distribution of Z will tend to the normal distribution with zero mean and variance \sigma^2. The theorem can be extended to variables (X_i) that are not independent and/or not identically distributed if certain constraints are placed on the degree of dependence and the moments of the distributions. Many
test statistic A test statistic is a statistic (a quantity derived from the sample) used in statistical hypothesis testing.Berger, R. L.; Casella, G. (2001). ''Statistical Inference'', Duxbury Press, Second Edition (p.374) A hypothesis test is typically specif ...
s, scores, and
estimator In statistics, an estimator is a rule for calculating an estimate of a given quantity based on observed data: thus the rule (the estimator), the quantity of interest (the estimand) and its result (the estimate) are distinguished. For example, the ...
s encountered in practice contain sums of certain random variables in 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 distributions. The central limit theorem also implies that certain distributions can be approximated by the normal distribution, for example: * The
binomial distribution In probability theory and statistics, the binomial distribution with parameters ''n'' and ''p'' is the discrete probability distribution of the number of successes in a sequence of ''n'' independent experiments, each asking a yes–no quest ...
B(n,p) is approximately normal with mean np and variance np(1-p) for large n and for p not too close to 0 or 1. * The
Poisson distribution In probability theory and statistics, the Poisson distribution is a discrete probability distribution that expresses the probability of a given number of events occurring in a fixed interval of time or space if these events occur with a known co ...
with parameter \lambda is approximately normal with mean \lambda and variance \lambda, for large values of \lambda. * The
chi-squared distribution In probability theory and statistics, the chi-squared distribution (also chi-square or \chi^2-distribution) with k degrees of freedom is the distribution of a sum of the squares of k independent standard normal random variables. The chi-squa ...
\chi^2(k) is approximately normal with mean k and variance 2k, for large k. * The
Student's t-distribution In probability and statistics, Student's ''t''-distribution (or simply the ''t''-distribution) is any member of a family of continuous probability distributions that arise when estimating the mean of a normally distributed population in sit ...
t(\nu) is approximately normal with mean 0 and variance 1 when \nu is large. Whether these approximations are sufficiently accurate depends on the purpose for which they are needed, and the rate of convergence to the normal distribution. It is typically the case that such approximations are less accurate in the tails of the distribution. A general upper bound for the approximation error in the central limit theorem is given by the
Berry–Esseen theorem In probability theory, the central limit theorem states that, under certain circumstances, the probability distribution of the scaled mean of a random sample converges to a normal distribution as the sample size increases to infinity. Under strong ...
, improvements of the approximation are given by the
Edgeworth expansion The Gram–Charlier A series (named in honor of Jørgen Pedersen Gram and Carl Charlier), and the Edgeworth series (named in honor of Francis Ysidro Edgeworth) are series that approximate a probability distribution in terms of its cumulants. The se ...
s. This theorem can also be used to justify modeling the sum of many uniform noise sources as
Gaussian noise Gaussian noise, named after Carl Friedrich Gauss, is a term from signal processing theory denoting a kind of signal noise that has a probability density function (pdf) equal to that of the normal distribution (which is also known as the Gaussia ...
. See
AWGN Additive white Gaussian noise (AWGN) is a basic noise model used in information theory to mimic the effect of many random processes that occur in nature. The modifiers denote specific characteristics: * ''Additive'' because it is added to any nois ...
.


Operations and functions of normal variables

The
probability density In probability theory, a probability density function (PDF), or density of a continuous random variable, is a function whose value at any given sample (or point) in the sample space (the set of possible values taken by the random variable) can ...
,
cumulative distribution In statistics, the frequency (or absolute frequency) of an event i is the number n_i of times the observation has occurred/recorded in an experiment or study. These frequencies are often depicted graphically or in tabular form. Types The cumul ...
, and inverse cumulative distribution of any function of one or more independent or correlated normal variables can be computed with the numerical method of ray-tracing
Matlab code
. In the following sections we look at some special cases.


Operations on a single normal variable

If X is distributed normally with mean \mu and variance \sigma^2, then * aX+b, for any real numbers a and b, is also normally distributed, with mean a\mu+b and standard deviation , a, \sigma. That is, the family of normal distributions is closed under linear transformations. * The exponential of X is distributed log-normally: . * The absolute value of X has
folded normal distribution The folded normal distribution is a probability distribution related to the normal distribution. Given a normally distributed random variable ''X'' with mean ''μ'' and variance ''σ''2, the random variable ''Y'' = , ''X'', has a folded normal d ...
: . If \mu = 0 this is known as the
half-normal distribution In probability theory and statistics, the half-normal distribution is a special case of the folded normal distribution. Let X follow an ordinary normal distribution, N(0,\sigma^2). Then, Y=, X, follows a half-normal distribution. Thus, the hal ...
. * The absolute value of normalized residuals, , ''X'' − ''μ'', /''σ'', has
chi distribution In probability theory and statistics, the chi distribution is a continuous probability distribution. It is the distribution of the positive square root of the sum of squares of a set of independent random variables each following a standard norm ...
with one degree of freedom: , X - \mu, / \sigma \sim \chi_1. * The square of ''X''/''σ'' has the
noncentral chi-squared distribution In probability theory and statistics, the noncentral chi-squared distribution (or noncentral chi-square distribution, noncentral \chi^2 distribution) is a noncentral generalization of the chi-squared distribution. It often arises in the power a ...
with one degree of freedom: X^2 / \sigma^2 \sim \chi_1^2(\mu^2 / \sigma^2). If \mu = 0, the distribution is called simply chi-squared. * The log likelihood of a normal variable x is simply the log of its
probability density function In probability theory, a probability density function (PDF), or density of a continuous random variable, is a function whose value at any given sample (or point) in the sample space (the set of possible values taken by the random variable) can ...
: \ln p(x)= -\frac \left(\frac \right)^2 -\ln \left(\sigma \sqrt \right) = -\frac z^2 -\ln \left(\sigma \sqrt \right). Since this is a scaled and shifted square of a standard normal variable, it is distributed as a scaled and shifted chi-squared variable. * The distribution of the variable ''X'' restricted to an interval 'a'', ''b''is called the
truncated normal distribution In probability and statistics, the truncated normal distribution is the probability distribution derived from that of a normally distributed random variable by bounding the random variable from either below or above (or both). The truncated no ...
. * (''X'' − ''μ'')−2 has a
Lévy distribution In probability theory and statistics, the Lévy distribution, named after Paul Lévy, is a continuous probability distribution for a non-negative random variable. In spectroscopy, this distribution, with frequency as the dependent variable, is kn ...
with location 0 and scale ''σ''−2.


= Operations on two independent normal variables

= * If X_1 and X_2 are two
independent Independent or Independents may refer to: Arts, entertainment, and media Artist groups * Independents (artist group), a group of modernist painters based in the New Hope, Pennsylvania, area of the United States during the early 1930s * Independ ...
normal random variables, with means \mu_1, \mu_2 and standard deviations \sigma_1, \sigma_2, then their sum X_1 + X_2 will also be normally distributed, roof/sup> with mean \mu_1 + \mu_2 and variance \sigma_1^2 + \sigma_2^2. * In particular, if X and Y are independent normal deviates with zero mean and variance \sigma^2, then X + Y and X - Y are also independent and normally distributed, with zero mean and variance 2\sigma^2. This is a special case of the
polarization identity In linear algebra, a branch of mathematics, the polarization identity is any one of a family of formulas that express the inner product of two vectors in terms of the norm of a normed vector space. If a norm arises from an inner product then t ...
. * If X_1, X_2 are two independent normal deviates with mean \mu and deviation \sigma, and a, b are arbitrary real numbers, then the variable X_3 = \frac + \mu is also normally distributed with mean \mu and deviation \sigma. It follows that the normal distribution is
stable A stable is a building in which livestock, especially horses, are kept. It most commonly means a building that is divided into separate stalls for individual animals and livestock. There are many different types of stables in use today; the ...
(with exponent \alpha=2).


= Operations on two independent standard normal variables

= If X_1 and X_2 are two independent standard normal random variables with mean 0 and variance 1, then * Their sum and difference is distributed normally with mean zero and variance two: X_1 \pm X_2 \sim N(0, 2). * Their product Z = X_1 X_2 follows the
product distribution A product distribution is a probability distribution constructed as the distribution of the product of random variables having two other known distributions. Given two statistically independent random variables ''X'' and ''Y'', the distribution of ...
with density function f_Z(z) = \pi^ K_0(, z, ) where K_0 is the
modified Bessel function of the second kind Bessel functions, first defined by the mathematician Daniel Bernoulli and then generalized by Friedrich Bessel, are canonical solutions of Bessel's differential equation x^2 \frac + x \frac + \left(x^2 - \alpha^2 \right)y = 0 for an arbitrary ...
. This distribution is symmetric around zero, unbounded at z = 0, and has the
characteristic function In mathematics, the term "characteristic function" can refer to any of several distinct concepts: * The indicator function of a subset, that is the function ::\mathbf_A\colon X \to \, :which for a given subset ''A'' of ''X'', has value 1 at points ...
\phi_Z(t) = (1 + t^2)^. * Their ratio follows the standard
Cauchy distribution The Cauchy distribution, named after Augustin Cauchy, is a continuous probability distribution. It is also known, especially among physicists, as the Lorentz distribution (after Hendrik Lorentz), Cauchy–Lorentz distribution, Lorentz(ian) fun ...
: X_1/ X_2 \sim \operatorname(0, 1). * Their Euclidean norm \sqrt has the
Rayleigh distribution In probability theory and statistics, the Rayleigh distribution is a continuous probability distribution for nonnegative-valued random variables. Up to rescaling, it coincides with the chi distribution with two degrees of freedom. The distribut ...
.


Operations on multiple independent normal variables

* Any linear combination of independent normal deviates is a normal deviate. * If X_1, X_2, \ldots, X_n are independent standard normal random variables, then the sum of their squares has the
chi-squared distribution In probability theory and statistics, the chi-squared distribution (also chi-square or \chi^2-distribution) with k degrees of freedom is the distribution of a sum of the squares of k independent standard normal random variables. The chi-squa ...
with n degrees of freedom X_1^2 + \cdots + X_n^2 \sim \chi_n^2. * If X_1, X_2, \ldots, X_n are independent normally distributed random variables with means \mu and variances \sigma^2, then their
sample mean The sample mean (or "empirical mean") and the sample covariance are statistics computed from a Sample (statistics), sample of data on one or more random variables. The sample mean is the average value (or mean, mean value) of a sample (statistic ...
is independent from the sample
standard deviation In statistics, the standard deviation is a measure of the amount of variation or dispersion of a set of values. A low standard deviation indicates that the values tend to be close to the mean (also called the expected value) of the set, while ...
, which can be demonstrated using Basu's theorem or
Cochran's theorem In statistics, Cochran's theorem, devised by William G. Cochran, is a theorem used to justify results relating to the probability distributions of statistics that are used in the analysis of variance. Statement Let ''U''1, ..., ''U'N'' be i.i. ...
. The ratio of these two quantities will have the
Student's t-distribution In probability and statistics, Student's ''t''-distribution (or simply the ''t''-distribution) is any member of a family of continuous probability distributions that arise when estimating the mean of a normally distributed population in sit ...
with n-1 degrees of freedom: t = \frac = \frac \sim t_. * If X_1, X_2, \ldots, X_n, Y_1, Y_2, \ldots, Y_m are independent standard normal random variables, then the ratio of their normalized sums of squares will have the with degrees of freedom: F = \frac \sim F_.


Operations on multiple correlated normal variables

* A
quadratic form In mathematics, a quadratic form is a polynomial with terms all of degree two ("form" is another name for a homogeneous polynomial). For example, :4x^2 + 2xy - 3y^2 is a quadratic form in the variables and . The coefficients usually belong to a ...
of a normal vector, i.e. a quadratic function q = \sum x_i^2 + \sum x_j + c of multiple independent or correlated normal variables, is a generalized chi-square variable.


Operations on the density function

The split normal distribution is most directly defined in terms of joining scaled sections of the density functions of different normal distributions and rescaling the density to integrate to one. The
truncated normal distribution In probability and statistics, the truncated normal distribution is the probability distribution derived from that of a normally distributed random variable by bounding the random variable from either below or above (or both). The truncated no ...
results from rescaling a section of a single density function.


Infinite divisibility and Cramér's theorem

For any positive integer \text, any normal distribution with mean \mu and variance \sigma^2 is the distribution of the sum of \text independent normal deviates, each with mean \frac and variance \frac. This property is called
infinite divisibility Infinite divisibility arises in different ways in philosophy, physics, economics, order theory (a branch of mathematics), and probability theory (also a branch of mathematics). One may speak of infinite divisibility, or the lack thereof, of matter ...
. Conversely, if X_1 and X_2 are independent random variables and their sum X_1+X_2 has a normal distribution, then both X_1 and X_2 must be normal deviates. This result is known as Cramér's decomposition theorem, and is equivalent to saying that the convolution of two distributions is normal if and only if both are normal. Cramér's theorem implies that a linear combination of independent non-Gaussian variables will never have an exactly normal distribution, although it may approach it arbitrarily closely.


Bernstein's theorem

Bernstein's theorem states that if X and Y are independent and X + Y and X - Y are also independent, then both ''X'' and ''Y'' must necessarily have normal distributions. More generally, if X_1, \ldots, X_n are independent random variables, then two distinct linear combinations \sum and \sumwill be independent if and only if all X_k are normal and \sum, where \sigma_k^2 denotes the variance of X_k.


Extensions

The notion of normal distribution, being one of the most important distributions in probability theory, has been extended far beyond the standard framework of the univariate (that is one-dimensional) case (Case 1). All these extensions are also called ''normal'' or ''Gaussian'' laws, so a certain ambiguity in names exists. * The
multivariate normal distribution In probability theory and statistics, the multivariate normal distribution, multivariate Gaussian distribution, or joint normal distribution is a generalization of the one-dimensional (univariate) normal distribution to higher dimensions. One d ...
describes the Gaussian law in the ''k''-dimensional Euclidean space. A vector is multivariate-normally distributed if any linear combination of its components has a (univariate) normal distribution. The variance of ''X'' is a ''k×k'' symmetric positive-definite matrix ''V''. The multivariate normal distribution is a special case of the
elliptical distribution In probability and statistics, an elliptical distribution is any member of a broad family of probability distributions that generalize the multivariate normal distribution. Intuitively, in the simplified two and three dimensional case, the joint di ...
s. As such, its iso-density loci in the ''k'' = 2 case are ellipses and in the case of arbitrary ''k'' are ellipsoids. * Rectified Gaussian distribution a rectified version of normal distribution with all the negative elements reset to 0 * Complex normal distribution deals with the complex normal vectors. A complex vector is said to be normal if both its real and imaginary components jointly possess a 2''k''-dimensional multivariate normal distribution. The variance-covariance structure of ''X'' is described by two matrices: the ''variance'' matrix Γ, and the ''relation'' matrix ''C''. * Matrix normal distribution describes the case of normally distributed matrices. * Gaussian processes are the normally distributed stochastic processes. These can be viewed as elements of some infinite-dimensional Hilbert space ''H'', and thus are the analogues of multivariate normal vectors for the case . A random element is said to be normal if for any constant the scalar product has a (univariate) normal distribution. The variance structure of such Gaussian random element can be described in terms of the linear ''covariance ''. Several Gaussian processes became popular enough to have their own names: ** Wiener process, Brownian motion, ** Brownian bridge, ** Ornstein–Uhlenbeck process. * Gaussian q-distribution is an abstract mathematical construction that represents a "q-analogue" of the normal distribution. * the q-Gaussian is an analogue of the Gaussian distribution, in the sense that it maximises the Tsallis entropy, and is one type of Tsallis distribution. Note that this distribution is different from the Gaussian q-distribution above. * The Kaniadakis Gaussian distribution, Kaniadakis ''κ''-Gaussian distribution is a generalization of the Gaussian distribution which arises from the Kaniadakis statistics, being one of the Kaniadakis distribution, Kaniadakis distributions. A random variable ''X'' has a two-piece normal distribution if it has a distribution : f_X( x ) = N( \mu, \sigma_1^2 ) \text x \le \mu : f_X( x ) = N( \mu, \sigma_2^2 ) \text x \ge \mu where ''μ'' is the mean and ''σ''1 and ''σ''2 are the standard deviations of the distribution to the left and right of the mean respectively. The mean, variance and third central moment of this distribution have been determined : \operatorname( X ) = \mu + \sqrt ( \sigma_2 - \sigma_1 ) : \operatorname( X ) = \left( 1 - \frac 2 \pi\right)( \sigma_2 - \sigma_1 )^2 + \sigma_1 \sigma_2 : \operatorname( X ) = \sqrt( \sigma_2 - \sigma_1 ) \left[ \left( \frac 4 \pi - 1 \right) ( \sigma_2 - \sigma_1)^2 + \sigma_1 \sigma_2 \right] where E(''X''), V(''X'') and T(''X'') are the mean, variance, and third central moment respectively. One of the main practical uses of the Gaussian law is to model the empirical distributions of many different random variables encountered in practice. In such case a possible extension would be a richer family of distributions, having more than two parameters and therefore being able to fit the empirical distribution more accurately. The examples of such extensions are: * Pearson distribution — a four-parameter family of probability distributions that extend the normal law to include different skewness and kurtosis values. * The generalized normal distribution, also known as the exponential power distribution, allows for distribution tails with thicker or thinner asymptotic behaviors.


Statistical inference


Estimation of parameters

It is often the case that we do not know the parameters of the normal distribution, but instead want to Estimation theory, estimate them. That is, having a sample (x_1, \ldots, x_n) from a normal N(\mu, \sigma^2) population we would like to learn the approximate values of parameters \mu and \sigma^2. The standard approach to this problem is the maximum likelihood method, which requires maximization of the ''log-likelihood function'': : \ln\mathcal(\mu,\sigma^2) = \sum_^n \ln f(x_i\mid\mu,\sigma^2) = -\frac\ln(2\pi) - \frac\ln\sigma^2 - \frac\sum_^n (x_i-\mu)^2. Taking derivatives with respect to \mu and \sigma^2 and solving the resulting system of first order conditions yields the ''maximum likelihood estimates'': : \hat = \overline \equiv \frac\sum_^n x_i, \qquad \hat^2 = \frac \sum_^n (x_i - \overline)^2.


Sample mean

Estimator \textstyle\hat\mu is called the ''
sample mean The sample mean (or "empirical mean") and the sample covariance are statistics computed from a Sample (statistics), sample of data on one or more random variables. The sample mean is the average value (or mean, mean value) of a sample (statistic ...
'', since it is the arithmetic mean of all observations. The statistic \textstyle\overline is complete statistic, complete and sufficient statistic, sufficient for \mu, and therefore by the Lehmann–Scheffé theorem, \textstyle\hat\mu is the uniformly minimum variance unbiased (UMVU) estimator. In finite samples it is distributed normally: : \hat\mu \sim \mathcal(\mu,\sigma^2/n). The variance of this estimator is equal to the ''μμ''-element of the inverse Fisher information matrix \textstyle\mathcal^. This implies that the estimator is efficient estimator, finite-sample efficient. Of practical importance is the fact that the standard error (statistics), standard error of \textstyle\hat\mu is proportional to \textstyle1/\sqrt, that is, if one wishes to decrease the standard error by a factor of 10, one must increase the number of points in the sample by a factor of 100. This fact is widely used in determining sample sizes for opinion polls and the number of trials in Monte Carlo simulations. From the standpoint of the asymptotic theory (statistics), asymptotic theory, \textstyle\hat\mu is consistent estimator, consistent, that is, it convergence in probability, converges in probability to \mu as n\rightarrow\infty. The estimator is also asymptotic normality, asymptotically normal, which is a simple corollary of the fact that it is normal in finite samples: : \sqrt(\hat\mu-\mu) \,\xrightarrow\, \mathcal(0,\sigma^2).


Sample variance

The estimator \textstyle\hat\sigma^2 is called the ''sample variance'', since it is the variance of the sample ((x_1, \ldots, x_n)). In practice, another estimator is often used instead of the \textstyle\hat\sigma^2. This other estimator is denoted s^2, and is also called the ''sample variance'', which represents a certain ambiguity in terminology; its square root s is called the ''sample standard deviation''. The estimator s^2 differs from \textstyle\hat\sigma^2 by having instead of ''n'' in the denominator (the so-called Bessel's correction): : s^2 = \frac \hat\sigma^2 = \frac \sum_^n (x_i - \overline)^2. The difference between s^2 and \textstyle\hat\sigma^2 becomes negligibly small for large ''n''s. In finite samples however, the motivation behind the use of s^2 is that it is an unbiased estimator of the underlying parameter \sigma^2, whereas \textstyle\hat\sigma^2 is biased. Also, by the Lehmann–Scheffé theorem the estimator s^2 is uniformly minimum variance unbiased (Minimum-variance unbiased estimator, UMVU), which makes it the "best" estimator among all unbiased ones. However it can be shown that the biased estimator \textstyle\hat\sigma^2 is "better" than the s^2 in terms of the mean squared error (MSE) criterion. In finite samples both s^2 and \textstyle\hat\sigma^2 have scaled
chi-squared distribution In probability theory and statistics, the chi-squared distribution (also chi-square or \chi^2-distribution) with k degrees of freedom is the distribution of a sum of the squares of k independent standard normal random variables. The chi-squa ...
with degrees of freedom: : s^2 \sim \frac \cdot \chi^2_, \qquad \hat\sigma^2 \sim \frac \cdot \chi^2_. The first of these expressions shows that the variance of s^2 is equal to 2\sigma^4/(n-1), which is slightly greater than the ''σσ''-element of the inverse Fisher information matrix \textstyle\mathcal^. Thus, s^2 is not an efficient estimator for \sigma^2, and moreover, since s^2 is UMVU, we can conclude that the finite-sample efficient estimator for \sigma^2 does not exist. Applying the asymptotic theory, both estimators s^2 and \textstyle\hat\sigma^2 are consistent, that is they converge in probability to \sigma^2 as the sample size n\rightarrow\infty. The two estimators are also both asymptotically normal: : \sqrt(\hat\sigma^2 - \sigma^2) \simeq \sqrt(s^2-\sigma^2) \,\xrightarrow\, \mathcal(0,2\sigma^4). In particular, both estimators are asymptotically efficient for \sigma^2.


Confidence intervals

By
Cochran's theorem In statistics, Cochran's theorem, devised by William G. Cochran, is a theorem used to justify results relating to the probability distributions of statistics that are used in the analysis of variance. Statement Let ''U''1, ..., ''U'N'' be i.i. ...
, for normal distributions the sample mean \textstyle\hat\mu and the sample variance ''s''2 are
independent Independent or Independents may refer to: Arts, entertainment, and media Artist groups * Independents (artist group), a group of modernist painters based in the New Hope, Pennsylvania, area of the United States during the early 1930s * Independ ...
, which means there can be no gain in considering their joint distribution. There is also a converse theorem: if in a sample the sample mean and sample variance are independent, then the sample must have come from the normal distribution. The independence between \textstyle\hat\mu and ''s'' can be employed to construct the so-called ''t-statistic'': : t = \frac = \frac \sim t_ This quantity ''t'' has the
Student's t-distribution In probability and statistics, Student's ''t''-distribution (or simply the ''t''-distribution) is any member of a family of continuous probability distributions that arise when estimating the mean of a normally distributed population in sit ...
with degrees of freedom, and it is an ancillary statistic (independent of the value of the parameters). Inverting the distribution of this ''t''-statistics will allow us to construct the
confidence interval In frequentist statistics, a confidence interval (CI) is a range of estimates for an unknown parameter. A confidence interval is computed at a designated ''confidence level''; the 95% confidence level is most common, but other levels, such as 9 ...
for ''μ''; similarly, inverting the ''χ''2 distribution of the statistic ''s''2 will give us the confidence interval for ''σ''2: :\mu \in \left[ \hat\mu - t_ \fracs, \hat\mu + t_ \fracs \right], :\sigma^2 \in \left[ \frac, \frac \right], where ''tk,p'' and are the ''p''th
quantile In statistics and probability, quantiles are cut points dividing the range of a probability distribution into continuous intervals with equal probabilities, or dividing the observations in a sample in the same way. There is one fewer quantile tha ...
s of the ''t''- and ''χ''2-distributions respectively. These confidence intervals are of the ''confidence level'' , meaning that the true values ''μ'' and ''σ''2 fall outside of these intervals with probability (or significance level) ''α''. In practice people usually take , resulting in the 95% confidence intervals. Approximate formulas can be derived from the asymptotic distributions of \textstyle\hat\mu and ''s''2: :\mu \in \left[ \hat\mu - , z_, \fracs, \hat\mu + , z_, \fracs \right], :\sigma^2 \in \left[ s^2 - , z_, \fracs^2, s^2 + , z_, \fracs^2 \right], The approximate formulas become valid for large values of ''n'', and are more convenient for the manual calculation since the standard normal quantiles ''z''''α''/2 do not depend on ''n''. In particular, the most popular value of , results in .


Normality tests

Normality tests assess the likelihood that the given data set comes from a normal distribution. Typically the null hypothesis ''H''0 is that the observations are distributed normally with unspecified mean ''μ'' and variance ''σ''2, versus the alternative ''Ha'' that the distribution is arbitrary. Many tests (over 40) have been devised for this problem. The more prominent of them are outlined below: Diagnostic plots are more intuitively appealing but subjective at the same time, as they rely on informal human judgement to accept or reject the null hypothesis. *
Q–Q plot In statistics, a Q–Q plot (quantile-quantile plot) is a probability plot, a List of graphical methods, graphical method for comparing two probability distributions by plotting their ''quantiles'' against each other. A point on the plot co ...
, also known as normal probability plot or rankit plot—is a plot of the sorted values from the data set against the expected values of the corresponding quantiles from the standard normal distribution. That is, it's a plot of point of the form (Φ−1(''pk''), ''x''(''k'')), where plotting points ''pk'' are equal to ''pk'' = (''k'' − ''α'')/(''n'' + 1 − 2''α'') and ''α'' is an adjustment constant, which can be anything between 0 and 1. If the null hypothesis is true, the plotted points should approximately lie on a straight line. * P–P plot – similar to the Q–Q plot, but used much less frequently. This method consists of plotting the points (Φ(''z''(''k'')), ''pk''), where \textstyle z_ = (x_-\hat\mu)/\hat\sigma. For normally distributed data this plot should lie on a 45° line between (0, 0) and (1, 1). Goodness-of-fit tests: ''Moment-based tests'': * D'Agostino's K-squared test * Jarque–Bera test * Shapiro–Wilk test: This is based on the fact that the line in the Q–Q plot has the slope of ''σ''. The test compares the least squares estimate of that slope with the value of the sample variance, and rejects the null hypothesis if these two quantities differ significantly. ''Tests based on the empirical distribution function'': * Anderson–Darling test * Lilliefors test (an adaptation of the Kolmogorov–Smirnov test)


Bayesian analysis of the normal distribution

Bayesian analysis of normally distributed data is complicated by the many different possibilities that may be considered: * Either the mean, or the variance, or neither, may be considered a fixed quantity. * When the variance is unknown, analysis may be done directly in terms of the variance, or in terms of the
precision Precision, precise or precisely may refer to: Science, and technology, and mathematics Mathematics and computing (general) * Accuracy and precision, measurement deviation from true value and its scatter * Significant figures, the number of digit ...
, the reciprocal of the variance. The reason for expressing the formulas in terms of precision is that the analysis of most cases is simplified. * Both univariate and multivariate normal distribution, multivariate cases need to be considered. * Either conjugate prior, conjugate or improper prior, improper prior distributions may be placed on the unknown variables. * An additional set of cases occurs in Bayesian linear regression, where in the basic model the data is assumed to be normally distributed, and normal priors are placed on the regression coefficients. The resulting analysis is similar to the basic cases of independent identically distributed data. The formulas for the non-linear-regression cases are summarized in the conjugate prior article.


Sum of two quadratics


= Scalar form

= The following auxiliary formula is useful for simplifying the posterior distribution, posterior update equations, which otherwise become fairly tedious. :a(x-y)^2 + b(x-z)^2 = (a + b)\left(x - \frac\right)^2 + \frac(y-z)^2 This equation rewrites the sum of two quadratics in ''x'' by expanding the squares, grouping the terms in ''x'', and completing the square. Note the following about the complex constant factors attached to some of the terms: # The factor \frac has the form of a weighted average of ''y'' and ''z''. # \frac = \frac = (a^ + b^)^. This shows that this factor can be thought of as resulting from a situation where the Multiplicative inverse, reciprocals of quantities ''a'' and ''b'' add directly, so to combine ''a'' and ''b'' themselves, it's necessary to reciprocate, add, and reciprocate the result again to get back into the original units. This is exactly the sort of operation performed by the harmonic mean, so it is not surprising that \frac is one-half the harmonic mean of ''a'' and ''b''.


= Vector form

= A similar formula can be written for the sum of two vector quadratics: If x, y, z are vectors of length ''k'', and A and B are symmetric matrix, symmetric, invertible matrices of size k\times k, then : \begin & (\mathbf-\mathbf)'\mathbf(\mathbf-\mathbf) + (\mathbf-\mathbf)' \mathbf(\mathbf-\mathbf) \\ = & (\mathbf - \mathbf)'(\mathbf+\mathbf)(\mathbf - \mathbf) + (\mathbf - \mathbf)'(\mathbf^ + \mathbf^)^(\mathbf - \mathbf) \end where :\mathbf = (\mathbf + \mathbf)^(\mathbf\mathbf + \mathbf \mathbf) Note that the form x′ A x is called a
quadratic form In mathematics, a quadratic form is a polynomial with terms all of degree two ("form" is another name for a homogeneous polynomial). For example, :4x^2 + 2xy - 3y^2 is a quadratic form in the variables and . The coefficients usually belong to a ...
and is a scalar (mathematics), scalar: :\mathbf'\mathbf\mathbf = \sum_a_ x_i x_j In other words, it sums up all possible combinations of products of pairs of elements from x, with a separate coefficient for each. In addition, since x_i x_j = x_j x_i, only the sum a_ + a_ matters for any off-diagonal elements of A, and there is no loss of generality in assuming that A is symmetric matrix, symmetric. Furthermore, if A is symmetric, then the form \mathbf'\mathbf\mathbf = \mathbf'\mathbf\mathbf.


Sum of differences from the mean

Another useful formula is as follows: \sum_^n (x_i-\mu)^2 = \sum_^n (x_i-\bar)^2 + n(\bar -\mu)^2 where \bar = \frac \sum_^n x_i.


With known variance

For a set of i.i.d. normally distributed data points X of size ''n'' where each individual point ''x'' follows x \sim \mathcal(\mu, \sigma^2) with known
variance In probability theory and statistics, variance is the expectation of the squared deviation of a random variable from its population mean or sample mean. Variance is a measure of dispersion, meaning it is a measure of how far a set of numbers ...
σ2, the conjugate prior distribution is also normally distributed. This can be shown more easily by rewriting the variance as the
precision Precision, precise or precisely may refer to: Science, and technology, and mathematics Mathematics and computing (general) * Accuracy and precision, measurement deviation from true value and its scatter * Significant figures, the number of digit ...
, i.e. using τ = 1/σ2. Then if x \sim \mathcal(\mu, 1/\tau) and \mu \sim \mathcal(\mu_0, 1/\tau_0), we proceed as follows. First, the likelihood function is (using the formula above for the sum of differences from the mean): :\begin p(\mathbf\mid\mu,\tau) &= \prod_^n \sqrt \exp\left(-\frac\tau(x_i-\mu)^2\right) \\ &= \left(\frac\right)^ \exp\left(-\frac\tau \sum_^n (x_i-\mu)^2\right) \\ &= \left(\frac\right)^ \exp\left[-\frac\tau \left(\sum_^n(x_i-\bar)^2 + n(\bar -\mu)^2\right)\right]. \end Then, we proceed as follows: :\begin p(\mu\mid\mathbf) &\propto p(\mathbf\mid\mu) p(\mu) \\ & = \left(\frac\right)^ \exp\left[-\frac\tau \left(\sum_^n(x_i-\bar)^2 + n(\bar -\mu)^2\right)\right] \sqrt \exp\left(-\frac\tau_0(\mu-\mu_0)^2\right) \\ &\propto \exp\left(-\frac\left(\tau\left(\sum_^n(x_i-\bar)^2 + n(\bar -\mu)^2\right) + \tau_0(\mu-\mu_0)^2\right)\right) \\ &\propto \exp\left(-\frac \left(n\tau(\bar-\mu)^2 + \tau_0(\mu-\mu_0)^2 \right)\right) \\ &= \exp\left(-\frac(n\tau + \tau_0)\left(\mu - \dfrac\right)^2 + \frac(\bar - \mu_0)^2\right) \\ &\propto \exp\left(-\frac(n\tau + \tau_0)\left(\mu - \dfrac\right)^2\right) \end In the above derivation, we used the formula above for the sum of two quadratics and eliminated all constant factors not involving ''μ''. The result is the kernel (statistics), kernel of a normal distribution, with mean \frac and precision n\tau + \tau_0, i.e. :p(\mu\mid\mathbf) \sim \mathcal\left(\frac, \frac\right) This can be written as a set of Bayesian update equations for the posterior parameters in terms of the prior parameters: :\begin \tau_0' &= \tau_0 + n\tau \\[5pt] \mu_0' &= \frac \\[5pt] \bar &= \frac\sum_^n x_i \end That is, to combine ''n'' data points with total precision of ''nτ'' (or equivalently, total variance of ''n''/''σ''2) and mean of values \bar, derive a new total precision simply by adding the total precision of the data to the prior total precision, and form a new mean through a ''precision-weighted average'', i.e. a weighted average of the data mean and the prior mean, each weighted by the associated total precision. This makes logical sense if the precision is thought of as indicating the certainty of the observations: In the distribution of the posterior mean, each of the input components is weighted by its certainty, and the certainty of this distribution is the sum of the individual certainties. (For the intuition of this, compare the expression "the whole is (or is not) greater than the sum of its parts". In addition, consider that the knowledge of the posterior comes from a combination of the knowledge of the prior and likelihood, so it makes sense that we are more certain of it than of either of its components.) The above formula reveals why it is more convenient to do Bayesian analysis of conjugate priors for the normal distribution in terms of the precision. The posterior precision is simply the sum of the prior and likelihood precisions, and the posterior mean is computed through a precision-weighted average, as described above. The same formulas can be written in terms of variance by reciprocating all the precisions, yielding the more ugly formulas :\begin ' &= \frac \\[5pt] \mu_0' &= \frac \\[5pt] \bar &= \frac\sum_^n x_i \end


With known mean

For a set of i.i.d. normally distributed data points X of size ''n'' where each individual point ''x'' follows x \sim \mathcal(\mu, \sigma^2) with known mean μ, the conjugate prior of the
variance In probability theory and statistics, variance is the expectation of the squared deviation of a random variable from its population mean or sample mean. Variance is a measure of dispersion, meaning it is a measure of how far a set of numbers ...
has an inverse gamma distribution or a scaled inverse chi-squared distribution. The two are equivalent 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. The prior for σ2 is as follows: :p(\sigma^2\mid\nu_0,\sigma_0^2) = \frac~\frac \propto \frac The likelihood function from above, written in terms of the variance, is: :\begin p(\mathbf\mid\mu,\sigma^2) &= \left(\frac\right)^ \exp\left[-\frac \sum_^n (x_i-\mu)^2\right] \\ &= \left(\frac\right)^ \exp\left[-\frac\right] \end where :S = \sum_^n (x_i-\mu)^2. Then: :\begin p(\sigma^2\mid\mathbf) &\propto p(\mathbf\mid\sigma^2) p(\sigma^2) \\ &= \left(\frac\right)^ \exp\left[-\frac\right] \frac~\frac \\ &\propto \left(\frac\right)^ \frac \exp\left[-\frac + \frac\right] \\ &= \frac \exp\left[-\frac\right] \end The above is also a scaled inverse chi-squared distribution where :\begin \nu_0' &= \nu_0 + n \\ \nu_0'' &= \nu_0 \sigma_0^2 + \sum_^n (x_i-\mu)^2 \end or equivalently :\begin \nu_0' &= \nu_0 + n \\ ' &= \frac \end Reparameterizing in terms of an inverse gamma distribution, the result is: :\begin \alpha' &= \alpha + \frac \\ \beta' &= \beta + \frac \end


With unknown mean and unknown variance

For a set of i.i.d. normally distributed data points X of size ''n'' where each individual point ''x'' follows x \sim \mathcal(\mu, \sigma^2) with unknown mean μ and unknown
variance In probability theory and statistics, variance is the expectation of the squared deviation of a random variable from its population mean or sample mean. Variance is a measure of dispersion, meaning it is a measure of how far a set of numbers ...
σ2, a combined (multivariate) conjugate prior is placed over the mean and variance, consisting of a normal-inverse-gamma distribution. Logically, this originates as follows: # From the analysis of the case with unknown mean but known variance, we see that the update equations involve sufficient statistics computed from the data consisting of the mean of the data points and the total variance of the data points, computed in turn from the known variance divided by the number of data points. # From the analysis of the case with unknown variance but known mean, we see that the update equations involve sufficient statistics over the data consisting of the number of data points and sum of squared deviations. # Keep in mind that the posterior update values serve as the prior distribution when further data is handled. Thus, we should logically think of our priors in terms of the sufficient statistics just described, with the same semantics kept in mind as much as possible. # To handle the case where both mean and variance are unknown, we could place independent priors over the mean and variance, with fixed estimates of the average mean, total variance, number of data points used to compute the variance prior, and sum of squared deviations. Note however that in reality, the total variance of the mean depends on the unknown variance, and the sum of squared deviations that goes into the variance prior (appears to) depend on the unknown mean. In practice, the latter dependence is relatively unimportant: Shifting the actual mean shifts the generated points by an equal amount, and on average the squared deviations will remain the same. This is not the case, however, with the total variance of the mean: As the unknown variance increases, the total variance of the mean will increase proportionately, and we would like to capture this dependence. # This suggests that we create a ''conditional prior'' of the mean on the unknown variance, with a hyperparameter specifying the mean of the pseudo-observations associated with the prior, and another parameter specifying the number of pseudo-observations. This number serves as a scaling parameter on the variance, making it possible to control the overall variance of the mean relative to the actual variance parameter. The prior for the variance also has two hyperparameters, one specifying the sum of squared deviations of the pseudo-observations associated with the prior, and another specifying once again the number of pseudo-observations. Note that each of the priors has a hyperparameter specifying the number of pseudo-observations, and in each case this controls the relative variance of that prior. These are given as two separate hyperparameters so that the variance (aka the confidence) of the two priors can be controlled separately. # This leads immediately to the normal-inverse-gamma distribution, which is the product of the two distributions just defined, with conjugate priors used (an inverse gamma distribution over the variance, and a normal distribution over the mean, ''conditional'' on the variance) and with the same four parameters just defined. The priors are normally defined as follows: :\begin p(\mu\mid\sigma^2; \mu_0, n_0) &\sim \mathcal(\mu_0,\sigma^2/n_0) \\ p(\sigma^2; \nu_0,\sigma_0^2) &\sim I\chi^2(\nu_0,\sigma_0^2) = IG(\nu_0/2, \nu_0\sigma_0^2/2) \end The update equations can be derived, and look as follows: :\begin \bar &= \frac 1 n \sum_^n x_i \\ \mu_0' &= \frac \\ n_0' &= n_0 + n \\ \nu_0' &= \nu_0 + n \\ \nu_0'' &= \nu_0 \sigma_0^2 + \sum_^n (x_i-\bar)^2 + \frac(\mu_0 - \bar)^2 \end The respective numbers of pseudo-observations add the number of actual observations to them. The new mean hyperparameter is once again a weighted average, this time weighted by the relative numbers of observations. Finally, the update for \nu_0'' is similar to the case with known mean, but in this case the sum of squared deviations is taken with respect to the observed data mean rather than the true mean, and as a result a new "interaction term" needs to be added to take care of the additional error source stemming from the deviation between prior and data mean.


Occurrence and applications

The occurrence of normal distribution in practical problems can be loosely classified into four categories: # Exactly normal distributions; # Approximately normal laws, for example when such approximation is justified by the
central limit theorem In probability theory, the central limit theorem (CLT) establishes that, in many situations, when independent random variables are summed up, their properly normalized sum tends toward a normal distribution even if the original variables themselv ...
; and # Distributions modeled as normal – the normal distribution being the distribution with Principle of maximum entropy, maximum entropy for a given mean and variance. # Regression problems – the normal distribution being found after systematic effects have been modeled sufficiently well.


Exact normality

Certain quantities in physics are distributed normally, as was first demonstrated by James Clerk Maxwell. Examples of such quantities are: * Probability density function of a ground state in a quantum harmonic oscillator. * The position of a particle that experiences diffusion. If initially the particle is located at a specific point (that is its probability distribution is the Dirac delta function), then after time ''t'' its location is described by a normal distribution with variance ''t'', which satisfies the diffusion equation \frac f(x,t) = \frac \frac f(x,t). If the initial location is given by a certain density function g(x), then the density at time ''t'' is the convolution of ''g'' and the normal PDF.


Approximate normality

''Approximately'' normal distributions occur in many situations, as explained by the
central limit theorem In probability theory, the central limit theorem (CLT) establishes that, in many situations, when independent random variables are summed up, their properly normalized sum tends toward a normal distribution even if the original variables themselv ...
. When the outcome is produced by many small effects acting ''additively and independently'', its distribution will be close to normal. The normal approximation will not be valid if the effects act multiplicatively (instead of additively), or if there is a single external influence that has a considerably larger magnitude than the rest of the effects. * In counting problems, where the central limit theorem includes a discrete-to-continuum approximation and where Infinite divisibility, infinitely divisible and Indecomposable distribution, decomposable distributions are involved, such as ** binomial distribution, Binomial random variables, associated with binary response variables; ** Poisson distribution, Poisson random variables, associated with rare events; * Thermal radiation has a Bose–Einstein statistics, Bose–Einstein distribution on very short time scales, and a normal distribution on longer timescales due to the central limit theorem.


Assumed normality

There are statistical methods to empirically test that assumption; see the above #Normality tests, Normality tests section. * In biology, the ''logarithm'' of various variables tend to have a normal distribution, that is, they tend to have a
log-normal distribution In probability theory, a log-normal (or lognormal) distribution is a continuous probability distribution of a random variable whose logarithm is normally distributed. Thus, if the random variable is log-normally distributed, then has a normal ...
(after separation on male/female subpopulations), with examples including: ** Measures of size of living tissue (length, height, skin area, weight); ** The ''length'' of ''inert'' appendages (hair, claws, nails, teeth) of biological specimens, ''in the direction of growth''; presumably the thickness of tree bark also falls under this category; ** Certain physiological measurements, such as blood pressure of adult humans. * In finance, in particular the Black–Scholes model, changes in the ''logarithm'' of exchange rates, price indices, and stock market indices are assumed normal (these variables behave like compound interest, not like simple interest, and so are multiplicative). Some mathematicians such as Benoit Mandelbrot have argued that Levy skew alpha-stable distribution, log-Levy distributions, which possesses heavy tails would be a more appropriate model, in particular for the analysis for stock market crashes. The use of the assumption of normal distribution occurring in financial models has also been criticized by Nassim Nicholas Taleb in his works. * Propagation of uncertainty, Measurement errors in physical experiments are often modeled by a normal distribution. This use of a normal distribution does not imply that one is assuming the measurement errors are normally distributed, rather using the normal distribution produces the most conservative predictions possible given only knowledge about the mean and variance of the errors. * In Standardized testing (statistics), standardized testing, results can be made to have a normal distribution by either selecting the number and difficulty of questions (as in the Intelligence quotient, IQ test) or transforming the raw test scores into "output" scores by fitting them to the normal distribution. For example, the SAT's traditional range of 200–800 is based on a normal distribution with a mean of 500 and a standard deviation of 100. * Many scores are derived from the normal distribution, including percentile ranks ("percentiles" or "quantiles"), normal curve equivalents, stanines, Standard score, z-scores, and T-scores. Additionally, some behavioral statistical procedures assume that scores are normally distributed; for example, Student's t-test, t-tests and Analysis of variance, ANOVAs. Bell curve grading assigns relative grades based on a normal distribution of scores. * In hydrology the distribution of long duration river discharge or rainfall, e.g. monthly and yearly totals, is often thought to be practically normal according to the
central limit theorem In probability theory, the central limit theorem (CLT) establishes that, in many situations, when independent random variables are summed up, their properly normalized sum tends toward a normal distribution even if the original variables themselv ...
. The blue picture, made with CumFreq, illustrates an example of fitting the normal distribution to ranked October rainfalls showing the 90% confidence belt based on the
binomial distribution In probability theory and statistics, the binomial distribution with parameters ''n'' and ''p'' is the discrete probability distribution of the number of successes in a sequence of ''n'' independent experiments, each asking a yes–no quest ...
. The rainfall data are represented by plotting positions as part of the cumulative frequency analysis.


Methodological problems and peer review

John Ioannidis argues that using normally distributed standard deviations as standards for validating research findings leave falsifiability, falsifiable predictions about phenomena that are not normally distributed untested. This includes, for example, phenomena that only appear when all necessary conditions are present and one cannot be a substitute for another in an addition-like way and phenomena that are not randomly distributed. Ioannidis argues that standard deviation-centered validation gives a false appearance of validity to hypotheses and theories where some but not all falsifiable predictions are normally distributed since the portion of falsifiable predictions that there is evidence against may and in some cases are in the non-normally distributed parts of the range of falsifiable predictions, as well as baselessly dismissing hypotheses for which none of the falsifiable predictions are normally distributed as if were they unfalsifiable when in fact they do make falsifiable predictions. It is argued by Ioannidis that many cases of mutually exclusive theories being accepted as "validated" by research journals are caused by failure of the journals to take in empirical falsifications of non-normally distributed predictions, and not because mutually exclusive theories are true, which they cannot be, although two mutually exclusive theories can both be wrong and a third one correct.


Computational methods


Generating values from normal distribution

In computer simulations, especially in applications of the Monte-Carlo method, it is often desirable to generate values that are normally distributed. The algorithms listed below all generate the standard normal deviates, since a can be generated as , where ''Z'' is standard normal. All these algorithms rely on the availability of a random number generator ''U'' capable of producing Uniform distribution (continuous), uniform random variates. * The most straightforward method is based on the probability integral transform property: if ''U'' is distributed uniformly on (0,1), then Φ−1(''U'') will have the standard normal distribution. The drawback of this method is that it relies on calculation of the
probit function In probability theory and statistics, the probit function is the quantile function associated with the standard normal distribution. It has applications in data analysis and machine learning, in particular exploratory statistical graphics and ...
Φ−1, which cannot be done analytically. Some approximate methods are described in and in the error function, erf article. Wichura gives a fast algorithm for computing this function to 16 decimal places, which is used by R programming language, R to compute random variates of the normal distribution. * Irwin–Hall distribution#Approximating a Normal distribution, An easy-to-program approximate approach that relies on the
central limit theorem In probability theory, the central limit theorem (CLT) establishes that, in many situations, when independent random variables are summed up, their properly normalized sum tends toward a normal distribution even if the original variables themselv ...
is as follows: generate 12 uniform ''U''(0,1) deviates, add them all up, and subtract 6 – the resulting random variable will have approximately standard normal distribution. In truth, the distribution will be Irwin–Hall distribution, Irwin–Hall, which is a 12-section eleventh-order polynomial approximation to the normal distribution. This random deviate will have a limited range of (−6, 6). Note that in a true normal distribution, only 0.00034% of all samples will fall outside ±6σ. * The Box–Muller transform, Box–Muller method uses two independent random numbers ''U'' and ''V'' distributed uniform distribution (continuous), uniformly on (0,1). Then the two random variables ''X'' and ''Y'' X = \sqrt \, \cos(2 \pi V) , \qquad Y = \sqrt \, \sin(2 \pi V) . will both have the standard normal distribution, and will be
independent Independent or Independents may refer to: Arts, entertainment, and media Artist groups * Independents (artist group), a group of modernist painters based in the New Hope, Pennsylvania, area of the United States during the early 1930s * Independ ...
. This formulation arises because for a bivariate normal random vector (''X'', ''Y'') the squared norm will have the
chi-squared distribution In probability theory and statistics, the chi-squared distribution (also chi-square or \chi^2-distribution) with k degrees of freedom is the distribution of a sum of the squares of k independent standard normal random variables. The chi-squa ...
with two degrees of freedom, which is an easily generated exponential distribution, exponential random variable corresponding to the quantity −2ln(''U'') in these equations; and the angle is distributed uniformly around the circle, chosen by the random variable ''V''. * The Marsaglia polar method is a modification of the Box–Muller method which does not require computation of the sine and cosine functions. In this method, ''U'' and ''V'' are drawn from the uniform (−1,1) distribution, and then is computed. If ''S'' is greater or equal to 1, then the method starts over, otherwise the two quantities X = U\sqrt, \qquad Y = V\sqrt are returned. Again, ''X'' and ''Y'' are independent, standard normal random variables. * The Ratio method is a rejection method. The algorithm proceeds as follows: ** Generate two independent uniform deviates ''U'' and ''V''; ** Compute ''X'' = (''V'' − 0.5)/''U''; ** Optional: if ''X''2 ≤ 5 − 4''e''1/4''U'' then accept ''X'' and terminate algorithm; ** Optional: if ''X''2 ≥ 4''e''−1.35/''U'' + 1.4 then reject ''X'' and start over from step 1; ** If ''X''2 ≤ −4 ln''U'' then accept ''X'', otherwise start over the algorithm. *:The two optional steps allow the evaluation of the logarithm in the last step to be avoided in most cases. These steps can be greatly improved so that the logarithm is rarely evaluated. * The ziggurat algorithm is faster than the Box–Muller transform and still exact. In about 97% of all cases it uses only two random numbers, one random integer and one random uniform, one multiplication and an if-test. Only in 3% of the cases, where the combination of those two falls outside the "core of the ziggurat" (a kind of rejection sampling using logarithms), do exponentials and more uniform random numbers have to be employed. * Integer arithmetic can be used to sample from the standard normal distribution. This method is exact in the sense that it satisfies the conditions of ''ideal approximation''; i.e., it is equivalent to sampling a real number from the standard normal distribution and rounding this to the nearest representable floating point number. * There is also some investigation into the connection between the fast Hadamard transform and the normal distribution, since the transform employs just addition and subtraction and by the central limit theorem random numbers from almost any distribution will be transformed into the normal distribution. In this regard a series of Hadamard transforms can be combined with random permutations to turn arbitrary data sets into a normally distributed data.


Numerical approximations for the normal CDF and normal quantile function

The standard normal cumulative distribution function, CDF is widely used in scientific and statistical computing. The values Φ(''x'') may be approximated very accurately by a variety of methods, such as numerical integration, Taylor series, asymptotic series and Gauss's continued fraction#Of Kummer's confluent hypergeometric function, continued fractions. Different approximations are used depending on the desired level of accuracy. * give the approximation for Φ(''x'') for ''x > 0'' with the absolute error (algorith
26.2.17
: \Phi(x) = 1 - \varphi(x)\left(b_1 t + b_2 t^2 + b_3t^3 + b_4 t^4 + b_5 t^5\right) + \varepsilon(x), \qquad t = \frac, where ''ϕ''(''x'') is the standard normal PDF, and ''b''0 = 0.2316419, ''b''1 = 0.319381530, ''b''2 = −0.356563782, ''b''3 = 1.781477937, ''b''4 = −1.821255978, ''b''5 = 1.330274429. * lists some dozens of approximations – by means of rational functions, with or without exponentials – for the function. His algorithms vary in the degree of complexity and the resulting precision, with maximum absolute precision of 24 digits. An algorithm by combines Hart's algorithm 5666 with a continued fraction approximation in the tail to provide a fast computation algorithm with a 16-digit precision. * after recalling Hart68 solution is not suited for erf, gives a solution for both erf and erfc, with maximal relative error bound, via rational function, Rational Chebyshev Approximation. * suggested a simple algorithm based on the Taylor series expansion \Phi(x) = \frac12 + \varphi(x)\left( x + \frac 3 + \frac + \frac + \frac + \cdots \right) for calculating with arbitrary precision. The drawback of this algorithm is comparatively slow calculation time (for example it takes over 300 iterations to calculate the function with 16 digits of precision when ). * The GNU Scientific Library calculates values of the standard normal CDF using Hart's algorithms and approximations with Chebyshev polynomials. Shore (1982) introduced simple approximations that may be incorporated in stochastic optimization models of engineering and operations research, like reliability engineering and inventory analysis. Denoting , the simplest approximation for the quantile function is: z = \Phi^(p)=5.5556\left[1- \left( \frac p \right)^\right],\qquad p\ge 1/2 This approximation delivers for ''z'' a maximum absolute error of 0.026 (for , corresponding to ). For replace ''p'' by and change sign. Another approximation, somewhat less accurate, is the single-parameter approximation: z=-0.4115\left\, \qquad p\ge 1/2 The latter had served to derive a simple approximation for the loss integral of the normal distribution, defined by \begin L(z) & =\int_z^\infty (u-z)\varphi(u) \, du=\int_z^\infty [1-\Phi (u)] \, du \\[5pt] L(z) & \approx \begin 0.4115\left(\dfrac p \right) - z, & p<1/2, \\ \\ 0.4115\left( \dfrac p \right), & p\ge 1/2. \end \\[5pt] \text \\ L(z) & \approx \begin 0.4115\left\, & p < 1/2, \\ \\ 0.4115 \dfrac p, & p\ge 1/2. \end \end This approximation is particularly accurate for the right far-tail (maximum error of 10−3 for z≥1.4). Highly accurate approximations for the CDF, based on Response modeling methodology, Response Modeling Methodology (RMM, Shore, 2011, 2012), are shown in Shore (2005). Some more approximations can be found at: Error function#Approximation with elementary functions. In particular, small ''relative'' error on the whole domain for the CDF \Phi and the quantile function \Phi^ as well, is achieved via an explicitly invertible formula by Sergei Winitzki in 2008.


History


Development

Some authors attribute the credit for the discovery of the normal distribution to Abraham de Moivre, de Moivre, who in 1738 published in the second edition of his "''The Doctrine of Chances''" the study of the coefficients in the binomial expansion of . De Moivre proved that the middle term in this expansion has the approximate magnitude of 2^n/\sqrt, and that "If ''m'' or ''n'' be a Quantity infinitely great, then the Logarithm of the Ratio, which a Term distant from the middle by the Interval ''ℓ'', has to the middle Term, is -\frac." Although this theorem can be interpreted as the first obscure expression for the normal probability law, Stephen Stigler, Stigler points out that de Moivre himself did not interpret his results as anything more than the approximate rule for the binomial coefficients, and in particular de Moivre lacked the concept of the probability density function. In 1823 Carl Friedrich Gauss, Gauss published his monograph "''Theoria combinationis observationum erroribus minimis obnoxiae''" where among other things he introduces several important statistical concepts, such as the method of least squares, the method of maximum likelihood, and the ''normal distribution''. Gauss used ''M'', , to denote the measurements of some unknown quantity ''V'', and sought the "most probable" estimator of that quantity: the one that maximizes the probability of obtaining the observed experimental results. In his notation φΔ is the probability density function of the measurement errors of magnitude Δ. Not knowing what the function ''φ'' is, Gauss requires that his method should reduce to the well-known answer: the arithmetic mean of the measured values. Starting from these principles, Gauss demonstrates that the only law that rationalizes the choice of arithmetic mean as an estimator of the location parameter, is the normal law of errors: \varphi\mathit = \frac h \, e^, where ''h'' is "the measure of the precision of the observations". Using this normal law as a generic model for errors in the experiments, Gauss formulates what is now known as the non-linear least squares, non-linear weighted least squares method. Although Gauss was the first to suggest the normal distribution law, Pierre Simon de Laplace, Laplace made significant contributions. It was Laplace who first posed the problem of aggregating several observations in 1774, although his own solution led to the Laplacian distribution. It was Laplace who first calculated the value of the Gaussian integral, integral in 1782, providing the normalization constant for the normal distribution. Finally, it was Laplace who in 1810 proved and presented to the Academy the fundamental
central limit theorem In probability theory, the central limit theorem (CLT) establishes that, in many situations, when independent random variables are summed up, their properly normalized sum tends toward a normal distribution even if the original variables themselv ...
, which emphasized the theoretical importance of the normal distribution. It is of interest to note that in 1809 an Irish-American mathematician Robert Adrain published two insightful but flawed derivations of the normal probability law, simultaneously and independently from Gauss. His works remained largely unnoticed by the scientific community, until in 1871 they were exhumed by Cleveland Abbe, Abbe. In the middle of the 19th century James Clerk Maxwell, Maxwell demonstrated that the normal distribution is not just a convenient mathematical tool, but may also occur in natural phenomena: "The number of particles whose velocity, resolved in a certain direction, lies between ''x'' and ''x'' + ''dx'' is \operatorname \frac\; e^ \, dx


Naming

Today, the concept is usually known in English as the normal distribution or Gaussian distribution. Other less common names include Gauss distribution, Laplace-Gauss distribution, the law of error, the law of facility of errors, Laplace's second law, Gaussian law. Gauss himself apparently coined the term with reference to the "normal equations" involved in its applications, with normal having its technical meaning of orthogonal rather than "usual". However, by the end of the 19th century some authors had started using the name ''normal distribution'', where the word "normal" was used as an adjective – the term now being seen as a reflection of the fact that this distribution was seen as typical, common – and thus "normal". Charles Sanders Peirce, Peirce (one of those authors) once defined "normal" thus: "...the 'normal' is not the average (or any other kind of mean) of what actually occurs, but of what ''would'', in the long run, occur under certain circumstances." Around the turn of the 20th century Karl Pearson, Pearson popularized the term ''normal'' as a designation for this distribution. Also, it was Pearson who first wrote the distribution in terms of the standard deviation ''σ'' as in modern notation. Soon after this, in year 1915, Ronald Fisher, Fisher added the location parameter to the formula for normal distribution, expressing it in the way it is written nowadays: df = \frac e^ \, dx. The term "standard normal", which denotes the normal distribution with zero mean and unit variance came into general use around the 1950s, appearing in the popular textbooks by P. G. Hoel (1947) "''Introduction to mathematical statistics''" and A. M. Mood (1950) "''Introduction to the theory of statistics''".


See also

* Bates distribution – similar to the Irwin–Hall distribution, but rescaled back into the 0 to 1 range * Behrens–Fisher problem – the long-standing problem of testing whether two normal samples with different variances have same means; * Bhattacharyya distance – method used to separate mixtures of normal distributions * Erdős–Kac theorem – on the occurrence of the normal distribution in number theory * Full width at half maximum * Gaussian blur – convolution, which uses the normal distribution as a kernel * Modified half-normal distribution with the pdf on (0, \infty) is given as f(x)= \frac, where \Psi(\alpha,z)=_1\Psi_1\left(\begin\left(\alpha,\frac\right)\\(1,0)\end;z \right) denotes the Fox-Wright Psi function. * Normally distributed and uncorrelated does not imply independent * Ratio normal distribution * Reciprocal normal distribution * Standard normal table * Stein's lemma * Sub-Gaussian distribution * Sum of normally distributed random variables * Tweedie distribution – The normal distribution is a member of the family of Tweedie exponential dispersion models. * Wrapped normal distribution – the Normal distribution applied to a circular domain * Z-test – using the normal distribution


Notes


References


Citations


Sources

* * In particular, the entries fo
"bell-shaped and bell curve"
an

* * * * * * * * * * * * * * * * * * * * * * * * Translated by Stephen M. Stigler in ''Statistical Science'' 1 (3), 1986: . * * * * * * * * * * * * * * * * * * * * * * * * * * * *


External links

*
Normal distribution calculator
{{Authority control Normal distribution, Continuous distributions Conjugate prior distributions Exponential family distributions Stable distributions Location-scale family probability distributions]">X, ^p \right&= \sigma^p \cdot 2^ \frac _1F_1\left( -\frac, \frac, -\frac \left( \frac \mu \sigma \right)^2 \right). \end These expressions remain valid even if p is not an integer. See also Hermite polynomials#"Negative variance", generalized Hermite polynomials. The expectation of X conditioned on the event that X lies in an interval ,b/math> is given by :\operatorname\left \mid a= \mu - \sigma^2\frac where f and F respectively are the density and the cumulative distribution function of X. For b=\infty this is known as the
inverse Mills ratio In probability theory, the Mills ratio (or Mills's ratio) of a continuous random variable X is the function : m(x) := \frac , where f(x) is the probability density function, and :\bar(x) := \Pr x.html" ;"title=">x">>x= \int_x^ f(u)\, du is the ...
. Note that above, density f of X is used instead of standard normal density as in inverse Mills ratio, so here we have \sigma^2 instead of \sigma.


Fourier transform and characteristic function

The
Fourier transform A Fourier transform (FT) is a mathematical transform that decomposes functions into frequency components, which are represented by the output of the transform as a function of frequency. Most commonly functions of time or space are transformed, ...
of a normal density f with mean \mu and standard deviation \sigma is : \hat f(t) = \int_^\infty f(x)e^ \, dx = e^ e^ where i is the
imaginary unit The imaginary unit or unit imaginary number () is a solution to the quadratic equation x^2+1=0. Although there is no real number with this property, can be used to extend the real numbers to what are called complex numbers, using addition an ...
. If the mean \mu=0, the first factor is 1, and the Fourier transform is, apart from a constant factor, a normal density on the
frequency domain In physics, electronics, control systems engineering, and statistics, the frequency domain refers to the analysis of mathematical functions or signals with respect to frequency, rather than time. Put simply, a time-domain graph shows how a signa ...
, with mean 0 and standard deviation 1/\sigma. In particular, the standard normal distribution \varphi is an
eigenfunction In mathematics, an eigenfunction of a linear operator ''D'' defined on some function space is any non-zero function f in that space that, when acted upon by ''D'', is only multiplied by some scaling factor called an eigenvalue. As an equation, th ...
of the Fourier transform. In probability theory, the Fourier transform of the probability distribution of a real-valued random variable X is closely connected to the
characteristic function In mathematics, the term "characteristic function" can refer to any of several distinct concepts: * The indicator function of a subset, that is the function ::\mathbf_A\colon X \to \, :which for a given subset ''A'' of ''X'', has value 1 at points ...
\varphi_X(t) of that variable, which is defined as the
expected value In probability theory, the expected value (also called expectation, expectancy, mathematical expectation, mean, average, or first moment) is a generalization of the weighted average. Informally, the expected value is the arithmetic mean of a l ...
of e^, as a function of the real variable t (the
frequency Frequency is the number of occurrences of a repeating event per unit of time. It is also occasionally referred to as ''temporal frequency'' for clarity, and is distinct from ''angular frequency''. Frequency is measured in hertz (Hz) which is eq ...
parameter of the Fourier transform). This definition can be analytically extended to a complex-value variable t. The relation between both is: :\varphi_X(t) = \hat f(-t)


Moment and cumulant generating functions

The
moment generating function In probability theory and statistics, the moment-generating function of a real-valued random variable is an alternative specification of its probability distribution. Thus, it provides the basis of an alternative route to analytical results compare ...
of a real random variable X is the expected value of e^, as a function of the real parameter t. For a normal distribution with density f, mean \mu and deviation \sigma, the moment generating function exists and is equal to :M(t) = \operatorname ^= \hat f(it) = e^ e^ The
cumulant generating function In probability theory and statistics, the cumulants of a probability distribution are a set of quantities that provide an alternative to the '' moments'' of the distribution. Any two probability distributions whose moments are identical will have ...
is the logarithm of the moment generating function, namely :g(t) = \ln M(t) = \mu t + \tfrac 12 \sigma^2 t^2 Since this is a quadratic polynomial in t, only the first two
cumulant In probability theory and statistics, the cumulants of a probability distribution are a set of quantities that provide an alternative to the '' moments'' of the distribution. Any two probability distributions whose moments are identical will ha ...
s are nonzero, namely the mean \mu and the variance \sigma^2.


Stein operator and class

Within
Stein's method Stein's method is a general method in probability theory to obtain bounds on the distance between two probability distributions with respect to a probability metric. It was introduced by Charles Stein, who first published it in 1972, to obtain ...
the Stein operator and class of a random variable X \sim \mathcal(\mu, \sigma^2) are \mathcalf(x) = \sigma^2 f'(x) - (x-\mu)f(x) and \mathcal the class of all absolutely continuous functions f : \R \to \R \mbox\mathbb[, f'(X), ]< \infty.


Zero-variance limit

In the limit (mathematics), limit when \sigma tends to zero, the probability density f(x) eventually tends to zero at any x\ne \mu, but grows without limit if x = \mu, while its integral remains equal to 1. Therefore, the normal distribution cannot be defined as an ordinary
function Function or functionality may refer to: Computing * Function key, a type of key on computer keyboards * Function model, a structured representation of processes in a system * Function object or functor or functionoid, a concept of object-oriente ...
when \sigma = 0. However, one can define the normal distribution with zero variance as a
generalized function In mathematics, generalized functions are objects extending the notion of functions. There is more than one recognized theory, for example the theory of distributions. Generalized functions are especially useful in making discontinuous functions ...
; specifically, as Dirac's "delta function" \delta translated by the mean \mu, that is f(x)=\delta(x-\mu). Its CDF is then the
Heaviside step function The Heaviside step function, or the unit step function, usually denoted by or (but sometimes , or ), is a step function, named after Oliver Heaviside (1850–1925), the value of which is zero for negative arguments and one for positive argume ...
translated by the mean \mu, namely :F(x) = \begin 0 & \textx < \mu \\ 1 & \textx \geq \mu \end


Maximum entropy

Of all probability distributions over the reals with a specified mean \mu and variance \sigma^2, the normal distribution N(\mu,\sigma^2) is the one with maximum entropy. If X is a
continuous random variable In probability theory and statistics, a probability distribution is the mathematical function that gives the probabilities of occurrence of different possible outcomes for an experiment. It is a mathematical description of a random phenomenon i ...
with
probability density In probability theory, a probability density function (PDF), or density of a continuous random variable, is a function whose value at any given sample (or point) in the sample space (the set of possible values taken by the random variable) can ...
f(x), then the entropy of X is defined as : H(X) = - \int_^\infty f(x)\log f(x)\, dx where f(x)\log f(x) is understood to be zero whenever f(x)=0. This functional can be maximized, subject to the constraints that the distribution is properly normalized and has a specified variance, by using
variational calculus The calculus of variations (or Variational Calculus) is a field of mathematical analysis that uses variations, which are small changes in functions and functionals, to find maxima and minima of functionals: mappings from a set of functions t ...
. A function with two
Lagrange multipliers In mathematical optimization, the method of Lagrange multipliers is a strategy for finding the local maxima and minima of a function subject to equality constraints (i.e., subject to the condition that one or more equations have to be satisfied ex ...
is defined: : L=\int_^\infty f(x)\ln(f(x))\,dx-\lambda_0\left(1-\int_^\infty f(x)\,dx\right)-\lambda\left(\sigma^2-\int_^\infty f(x)(x-\mu)^2\,dx\right) where f(x) is, for now, regarded as some density function with mean \mu and standard deviation \sigma. At maximum entropy, a small variation \delta f(x) about f(x) will produce a variation \delta L about L which is equal to 0: : 0=\delta L=\int_^\infty \delta f(x)\left (\ln(f(x))+1+\lambda_0+\lambda(x-\mu)^2\right )\,dx Since this must hold for any small \delta f(x), the term in brackets must be zero, and solving for f(x) yields: :f(x)=e^ Using the constraint equations to solve for \lambda_0 and \lambda yields the density of the normal distribution: : f(x, \mu, \sigma)=\frace^ The entropy of a normal distribution is equal to : H(X)=\tfrac(1+\log(2\sigma^2\pi))


Other properties


Related distributions


Central limit theorem

The central limit theorem states that under certain (fairly common) conditions, the sum of many random variables will have an approximately normal distribution. More specifically, where X_1,\ldots ,X_n are
independent and identically distributed In probability theory and statistics, a collection of random variables is independent and identically distributed if each random variable has the same probability distribution as the others and all are mutually independent. This property is usua ...
random variables with the same arbitrary distribution, zero mean, and variance \sigma^2 and Z is their mean scaled by \sqrt : Z = \sqrt\left(\frac\sum_^n X_i\right) Then, as n increases, the probability distribution of Z will tend to the normal distribution with zero mean and variance \sigma^2. The theorem can be extended to variables (X_i) that are not independent and/or not identically distributed if certain constraints are placed on the degree of dependence and the moments of the distributions. Many
test statistic A test statistic is a statistic (a quantity derived from the sample) used in statistical hypothesis testing.Berger, R. L.; Casella, G. (2001). ''Statistical Inference'', Duxbury Press, Second Edition (p.374) A hypothesis test is typically specif ...
s, scores, and
estimator In statistics, an estimator is a rule for calculating an estimate of a given quantity based on observed data: thus the rule (the estimator), the quantity of interest (the estimand) and its result (the estimate) are distinguished. For example, the ...
s encountered in practice contain sums of certain random variables in 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 distributions. The central limit theorem also implies that certain distributions can be approximated by the normal distribution, for example: * The
binomial distribution In probability theory and statistics, the binomial distribution with parameters ''n'' and ''p'' is the discrete probability distribution of the number of successes in a sequence of ''n'' independent experiments, each asking a yes–no quest ...
B(n,p) is approximately normal with mean np and variance np(1-p) for large n and for p not too close to 0 or 1. * The
Poisson distribution In probability theory and statistics, the Poisson distribution is a discrete probability distribution that expresses the probability of a given number of events occurring in a fixed interval of time or space if these events occur with a known co ...
with parameter \lambda is approximately normal with mean \lambda and variance \lambda, for large values of \lambda. * The
chi-squared distribution In probability theory and statistics, the chi-squared distribution (also chi-square or \chi^2-distribution) with k degrees of freedom is the distribution of a sum of the squares of k independent standard normal random variables. The chi-squa ...
\chi^2(k) is approximately normal with mean k and variance 2k, for large k. * The
Student's t-distribution In probability and statistics, Student's ''t''-distribution (or simply the ''t''-distribution) is any member of a family of continuous probability distributions that arise when estimating the mean of a normally distributed population in sit ...
t(\nu) is approximately normal with mean 0 and variance 1 when \nu is large. Whether these approximations are sufficiently accurate depends on the purpose for which they are needed, and the rate of convergence to the normal distribution. It is typically the case that such approximations are less accurate in the tails of the distribution. A general upper bound for the approximation error in the central limit theorem is given by the
Berry–Esseen theorem In probability theory, the central limit theorem states that, under certain circumstances, the probability distribution of the scaled mean of a random sample converges to a normal distribution as the sample size increases to infinity. Under strong ...
, improvements of the approximation are given by the
Edgeworth expansion The Gram–Charlier A series (named in honor of Jørgen Pedersen Gram and Carl Charlier), and the Edgeworth series (named in honor of Francis Ysidro Edgeworth) are series that approximate a probability distribution in terms of its cumulants. The se ...
s. This theorem can also be used to justify modeling the sum of many uniform noise sources as
Gaussian noise Gaussian noise, named after Carl Friedrich Gauss, is a term from signal processing theory denoting a kind of signal noise that has a probability density function (pdf) equal to that of the normal distribution (which is also known as the Gaussia ...
. See
AWGN Additive white Gaussian noise (AWGN) is a basic noise model used in information theory to mimic the effect of many random processes that occur in nature. The modifiers denote specific characteristics: * ''Additive'' because it is added to any nois ...
.


Operations and functions of normal variables

The
probability density In probability theory, a probability density function (PDF), or density of a continuous random variable, is a function whose value at any given sample (or point) in the sample space (the set of possible values taken by the random variable) can ...
,
cumulative distribution In statistics, the frequency (or absolute frequency) of an event i is the number n_i of times the observation has occurred/recorded in an experiment or study. These frequencies are often depicted graphically or in tabular form. Types The cumul ...
, and inverse cumulative distribution of any function of one or more independent or correlated normal variables can be computed with the numerical method of ray-tracing
Matlab code
. In the following sections we look at some special cases.


Operations on a single normal variable

If X is distributed normally with mean \mu and variance \sigma^2, then * aX+b, for any real numbers a and b, is also normally distributed, with mean a\mu+b and standard deviation , a, \sigma. That is, the family of normal distributions is closed under linear transformations. * The exponential of X is distributed log-normally: . * The absolute value of X has
folded normal distribution The folded normal distribution is a probability distribution related to the normal distribution. Given a normally distributed random variable ''X'' with mean ''μ'' and variance ''σ''2, the random variable ''Y'' = , ''X'', has a folded normal d ...
: . If \mu = 0 this is known as the
half-normal distribution In probability theory and statistics, the half-normal distribution is a special case of the folded normal distribution. Let X follow an ordinary normal distribution, N(0,\sigma^2). Then, Y=, X, follows a half-normal distribution. Thus, the hal ...
. * The absolute value of normalized residuals, , ''X'' − ''μ'', /''σ'', has
chi distribution In probability theory and statistics, the chi distribution is a continuous probability distribution. It is the distribution of the positive square root of the sum of squares of a set of independent random variables each following a standard norm ...
with one degree of freedom: , X - \mu, / \sigma \sim \chi_1. * The square of ''X''/''σ'' has the
noncentral chi-squared distribution In probability theory and statistics, the noncentral chi-squared distribution (or noncentral chi-square distribution, noncentral \chi^2 distribution) is a noncentral generalization of the chi-squared distribution. It often arises in the power a ...
with one degree of freedom: X^2 / \sigma^2 \sim \chi_1^2(\mu^2 / \sigma^2). If \mu = 0, the distribution is called simply chi-squared. * The log likelihood of a normal variable x is simply the log of its
probability density function In probability theory, a probability density function (PDF), or density of a continuous random variable, is a function whose value at any given sample (or point) in the sample space (the set of possible values taken by the random variable) can ...
: \ln p(x)= -\frac \left(\frac \right)^2 -\ln \left(\sigma \sqrt \right) = -\frac z^2 -\ln \left(\sigma \sqrt \right). Since this is a scaled and shifted square of a standard normal variable, it is distributed as a scaled and shifted chi-squared variable. * The distribution of the variable ''X'' restricted to an interval 'a'', ''b''is called the
truncated normal distribution In probability and statistics, the truncated normal distribution is the probability distribution derived from that of a normally distributed random variable by bounding the random variable from either below or above (or both). The truncated no ...
. * (''X'' − ''μ'')−2 has a
Lévy distribution In probability theory and statistics, the Lévy distribution, named after Paul Lévy, is a continuous probability distribution for a non-negative random variable. In spectroscopy, this distribution, with frequency as the dependent variable, is kn ...
with location 0 and scale ''σ''−2.


= Operations on two independent normal variables

= * If X_1 and X_2 are two
independent Independent or Independents may refer to: Arts, entertainment, and media Artist groups * Independents (artist group), a group of modernist painters based in the New Hope, Pennsylvania, area of the United States during the early 1930s * Independ ...
normal random variables, with means \mu_1, \mu_2 and standard deviations \sigma_1, \sigma_2, then their sum X_1 + X_2 will also be normally distributed, roof/sup> with mean \mu_1 + \mu_2 and variance \sigma_1^2 + \sigma_2^2. * In particular, if X and Y are independent normal deviates with zero mean and variance \sigma^2, then X + Y and X - Y are also independent and normally distributed, with zero mean and variance 2\sigma^2. This is a special case of the
polarization identity In linear algebra, a branch of mathematics, the polarization identity is any one of a family of formulas that express the inner product of two vectors in terms of the norm of a normed vector space. If a norm arises from an inner product then t ...
. * If X_1, X_2 are two independent normal deviates with mean \mu and deviation \sigma, and a, b are arbitrary real numbers, then the variable X_3 = \frac + \mu is also normally distributed with mean \mu and deviation \sigma. It follows that the normal distribution is
stable A stable is a building in which livestock, especially horses, are kept. It most commonly means a building that is divided into separate stalls for individual animals and livestock. There are many different types of stables in use today; the ...
(with exponent \alpha=2).


= Operations on two independent standard normal variables

= If X_1 and X_2 are two independent standard normal random variables with mean 0 and variance 1, then * Their sum and difference is distributed normally with mean zero and variance two: X_1 \pm X_2 \sim N(0, 2). * Their product Z = X_1 X_2 follows the
product distribution A product distribution is a probability distribution constructed as the distribution of the product of random variables having two other known distributions. Given two statistically independent random variables ''X'' and ''Y'', the distribution of ...
with density function f_Z(z) = \pi^ K_0(, z, ) where K_0 is the
modified Bessel function of the second kind Bessel functions, first defined by the mathematician Daniel Bernoulli and then generalized by Friedrich Bessel, are canonical solutions of Bessel's differential equation x^2 \frac + x \frac + \left(x^2 - \alpha^2 \right)y = 0 for an arbitrary ...
. This distribution is symmetric around zero, unbounded at z = 0, and has the
characteristic function In mathematics, the term "characteristic function" can refer to any of several distinct concepts: * The indicator function of a subset, that is the function ::\mathbf_A\colon X \to \, :which for a given subset ''A'' of ''X'', has value 1 at points ...
\phi_Z(t) = (1 + t^2)^. * Their ratio follows the standard
Cauchy distribution The Cauchy distribution, named after Augustin Cauchy, is a continuous probability distribution. It is also known, especially among physicists, as the Lorentz distribution (after Hendrik Lorentz), Cauchy–Lorentz distribution, Lorentz(ian) fun ...
: X_1/ X_2 \sim \operatorname(0, 1). * Their Euclidean norm \sqrt has the
Rayleigh distribution In probability theory and statistics, the Rayleigh distribution is a continuous probability distribution for nonnegative-valued random variables. Up to rescaling, it coincides with the chi distribution with two degrees of freedom. The distribut ...
.


Operations on multiple independent normal variables

* Any linear combination of independent normal deviates is a normal deviate. * If X_1, X_2, \ldots, X_n are independent standard normal random variables, then the sum of their squares has the
chi-squared distribution In probability theory and statistics, the chi-squared distribution (also chi-square or \chi^2-distribution) with k degrees of freedom is the distribution of a sum of the squares of k independent standard normal random variables. The chi-squa ...
with n degrees of freedom X_1^2 + \cdots + X_n^2 \sim \chi_n^2. * If X_1, X_2, \ldots, X_n are independent normally distributed random variables with means \mu and variances \sigma^2, then their
sample mean The sample mean (or "empirical mean") and the sample covariance are statistics computed from a Sample (statistics), sample of data on one or more random variables. The sample mean is the average value (or mean, mean value) of a sample (statistic ...
is independent from the sample
standard deviation In statistics, the standard deviation is a measure of the amount of variation or dispersion of a set of values. A low standard deviation indicates that the values tend to be close to the mean (also called the expected value) of the set, while ...
, which can be demonstrated using Basu's theorem or
Cochran's theorem In statistics, Cochran's theorem, devised by William G. Cochran, is a theorem used to justify results relating to the probability distributions of statistics that are used in the analysis of variance. Statement Let ''U''1, ..., ''U'N'' be i.i. ...
. The ratio of these two quantities will have the
Student's t-distribution In probability and statistics, Student's ''t''-distribution (or simply the ''t''-distribution) is any member of a family of continuous probability distributions that arise when estimating the mean of a normally distributed population in sit ...
with n-1 degrees of freedom: t = \frac = \frac \sim t_. * If X_1, X_2, \ldots, X_n, Y_1, Y_2, \ldots, Y_m are independent standard normal random variables, then the ratio of their normalized sums of squares will have the with degrees of freedom: F = \frac \sim F_.


Operations on multiple correlated normal variables

* A
quadratic form In mathematics, a quadratic form is a polynomial with terms all of degree two ("form" is another name for a homogeneous polynomial). For example, :4x^2 + 2xy - 3y^2 is a quadratic form in the variables and . The coefficients usually belong to a ...
of a normal vector, i.e. a quadratic function q = \sum x_i^2 + \sum x_j + c of multiple independent or correlated normal variables, is a generalized chi-square variable.


Operations on the density function

The split normal distribution is most directly defined in terms of joining scaled sections of the density functions of different normal distributions and rescaling the density to integrate to one. The
truncated normal distribution In probability and statistics, the truncated normal distribution is the probability distribution derived from that of a normally distributed random variable by bounding the random variable from either below or above (or both). The truncated no ...
results from rescaling a section of a single density function.


Infinite divisibility and Cramér's theorem

For any positive integer \text, any normal distribution with mean \mu and variance \sigma^2 is the distribution of the sum of \text independent normal deviates, each with mean \frac and variance \frac. This property is called
infinite divisibility Infinite divisibility arises in different ways in philosophy, physics, economics, order theory (a branch of mathematics), and probability theory (also a branch of mathematics). One may speak of infinite divisibility, or the lack thereof, of matter ...
. Conversely, if X_1 and X_2 are independent random variables and their sum X_1+X_2 has a normal distribution, then both X_1 and X_2 must be normal deviates. This result is known as Cramér's decomposition theorem, and is equivalent to saying that the convolution of two distributions is normal if and only if both are normal. Cramér's theorem implies that a linear combination of independent non-Gaussian variables will never have an exactly normal distribution, although it may approach it arbitrarily closely.


Bernstein's theorem

Bernstein's theorem states that if X and Y are independent and X + Y and X - Y are also independent, then both ''X'' and ''Y'' must necessarily have normal distributions. More generally, if X_1, \ldots, X_n are independent random variables, then two distinct linear combinations \sum and \sumwill be independent if and only if all X_k are normal and \sum, where \sigma_k^2 denotes the variance of X_k.


Extensions

The notion of normal distribution, being one of the most important distributions in probability theory, has been extended far beyond the standard framework of the univariate (that is one-dimensional) case (Case 1). All these extensions are also called ''normal'' or ''Gaussian'' laws, so a certain ambiguity in names exists. * The
multivariate normal distribution In probability theory and statistics, the multivariate normal distribution, multivariate Gaussian distribution, or joint normal distribution is a generalization of the one-dimensional (univariate) normal distribution to higher dimensions. One d ...
describes the Gaussian law in the ''k''-dimensional Euclidean space. A vector is multivariate-normally distributed if any linear combination of its components has a (univariate) normal distribution. The variance of ''X'' is a ''k×k'' symmetric positive-definite matrix ''V''. The multivariate normal distribution is a special case of the
elliptical distribution In probability and statistics, an elliptical distribution is any member of a broad family of probability distributions that generalize the multivariate normal distribution. Intuitively, in the simplified two and three dimensional case, the joint di ...
s. As such, its iso-density loci in the ''k'' = 2 case are ellipses and in the case of arbitrary ''k'' are ellipsoids. * Rectified Gaussian distribution a rectified version of normal distribution with all the negative elements reset to 0 * Complex normal distribution deals with the complex normal vectors. A complex vector is said to be normal if both its real and imaginary components jointly possess a 2''k''-dimensional multivariate normal distribution. The variance-covariance structure of ''X'' is described by two matrices: the ''variance'' matrix Γ, and the ''relation'' matrix ''C''. * Matrix normal distribution describes the case of normally distributed matrices. * Gaussian processes are the normally distributed stochastic processes. These can be viewed as elements of some infinite-dimensional Hilbert space ''H'', and thus are the analogues of multivariate normal vectors for the case . A random element is said to be normal if for any constant the scalar product has a (univariate) normal distribution. The variance structure of such Gaussian random element can be described in terms of the linear ''covariance ''. Several Gaussian processes became popular enough to have their own names: ** Wiener process, Brownian motion, ** Brownian bridge, ** Ornstein–Uhlenbeck process. * Gaussian q-distribution is an abstract mathematical construction that represents a "q-analogue" of the normal distribution. * the q-Gaussian is an analogue of the Gaussian distribution, in the sense that it maximises the Tsallis entropy, and is one type of Tsallis distribution. Note that this distribution is different from the Gaussian q-distribution above. * The Kaniadakis Gaussian distribution, Kaniadakis ''κ''-Gaussian distribution is a generalization of the Gaussian distribution which arises from the Kaniadakis statistics, being one of the Kaniadakis distribution, Kaniadakis distributions. A random variable ''X'' has a two-piece normal distribution if it has a distribution : f_X( x ) = N( \mu, \sigma_1^2 ) \text x \le \mu : f_X( x ) = N( \mu, \sigma_2^2 ) \text x \ge \mu where ''μ'' is the mean and ''σ''1 and ''σ''2 are the standard deviations of the distribution to the left and right of the mean respectively. The mean, variance and third central moment of this distribution have been determined : \operatorname( X ) = \mu + \sqrt ( \sigma_2 - \sigma_1 ) : \operatorname( X ) = \left( 1 - \frac 2 \pi\right)( \sigma_2 - \sigma_1 )^2 + \sigma_1 \sigma_2 : \operatorname( X ) = \sqrt( \sigma_2 - \sigma_1 ) \left[ \left( \frac 4 \pi - 1 \right) ( \sigma_2 - \sigma_1)^2 + \sigma_1 \sigma_2 \right] where E(''X''), V(''X'') and T(''X'') are the mean, variance, and third central moment respectively. One of the main practical uses of the Gaussian law is to model the empirical distributions of many different random variables encountered in practice. In such case a possible extension would be a richer family of distributions, having more than two parameters and therefore being able to fit the empirical distribution more accurately. The examples of such extensions are: * Pearson distribution — a four-parameter family of probability distributions that extend the normal law to include different skewness and kurtosis values. * The generalized normal distribution, also known as the exponential power distribution, allows for distribution tails with thicker or thinner asymptotic behaviors.


Statistical inference


Estimation of parameters

It is often the case that we do not know the parameters of the normal distribution, but instead want to Estimation theory, estimate them. That is, having a sample (x_1, \ldots, x_n) from a normal N(\mu, \sigma^2) population we would like to learn the approximate values of parameters \mu and \sigma^2. The standard approach to this problem is the maximum likelihood method, which requires maximization of the ''log-likelihood function'': : \ln\mathcal(\mu,\sigma^2) = \sum_^n \ln f(x_i\mid\mu,\sigma^2) = -\frac\ln(2\pi) - \frac\ln\sigma^2 - \frac\sum_^n (x_i-\mu)^2. Taking derivatives with respect to \mu and \sigma^2 and solving the resulting system of first order conditions yields the ''maximum likelihood estimates'': : \hat = \overline \equiv \frac\sum_^n x_i, \qquad \hat^2 = \frac \sum_^n (x_i - \overline)^2.


Sample mean

Estimator \textstyle\hat\mu is called the ''
sample mean The sample mean (or "empirical mean") and the sample covariance are statistics computed from a Sample (statistics), sample of data on one or more random variables. The sample mean is the average value (or mean, mean value) of a sample (statistic ...
'', since it is the arithmetic mean of all observations. The statistic \textstyle\overline is complete statistic, complete and sufficient statistic, sufficient for \mu, and therefore by the Lehmann–Scheffé theorem, \textstyle\hat\mu is the uniformly minimum variance unbiased (UMVU) estimator. In finite samples it is distributed normally: : \hat\mu \sim \mathcal(\mu,\sigma^2/n). The variance of this estimator is equal to the ''μμ''-element of the inverse Fisher information matrix \textstyle\mathcal^. This implies that the estimator is efficient estimator, finite-sample efficient. Of practical importance is the fact that the standard error (statistics), standard error of \textstyle\hat\mu is proportional to \textstyle1/\sqrt, that is, if one wishes to decrease the standard error by a factor of 10, one must increase the number of points in the sample by a factor of 100. This fact is widely used in determining sample sizes for opinion polls and the number of trials in Monte Carlo simulations. From the standpoint of the asymptotic theory (statistics), asymptotic theory, \textstyle\hat\mu is consistent estimator, consistent, that is, it convergence in probability, converges in probability to \mu as n\rightarrow\infty. The estimator is also asymptotic normality, asymptotically normal, which is a simple corollary of the fact that it is normal in finite samples: : \sqrt(\hat\mu-\mu) \,\xrightarrow\, \mathcal(0,\sigma^2).


Sample variance

The estimator \textstyle\hat\sigma^2 is called the ''sample variance'', since it is the variance of the sample ((x_1, \ldots, x_n)). In practice, another estimator is often used instead of the \textstyle\hat\sigma^2. This other estimator is denoted s^2, and is also called the ''sample variance'', which represents a certain ambiguity in terminology; its square root s is called the ''sample standard deviation''. The estimator s^2 differs from \textstyle\hat\sigma^2 by having instead of ''n'' in the denominator (the so-called Bessel's correction): : s^2 = \frac \hat\sigma^2 = \frac \sum_^n (x_i - \overline)^2. The difference between s^2 and \textstyle\hat\sigma^2 becomes negligibly small for large ''n''s. In finite samples however, the motivation behind the use of s^2 is that it is an unbiased estimator of the underlying parameter \sigma^2, whereas \textstyle\hat\sigma^2 is biased. Also, by the Lehmann–Scheffé theorem the estimator s^2 is uniformly minimum variance unbiased (Minimum-variance unbiased estimator, UMVU), which makes it the "best" estimator among all unbiased ones. However it can be shown that the biased estimator \textstyle\hat\sigma^2 is "better" than the s^2 in terms of the mean squared error (MSE) criterion. In finite samples both s^2 and \textstyle\hat\sigma^2 have scaled
chi-squared distribution In probability theory and statistics, the chi-squared distribution (also chi-square or \chi^2-distribution) with k degrees of freedom is the distribution of a sum of the squares of k independent standard normal random variables. The chi-squa ...
with degrees of freedom: : s^2 \sim \frac \cdot \chi^2_, \qquad \hat\sigma^2 \sim \frac \cdot \chi^2_. The first of these expressions shows that the variance of s^2 is equal to 2\sigma^4/(n-1), which is slightly greater than the ''σσ''-element of the inverse Fisher information matrix \textstyle\mathcal^. Thus, s^2 is not an efficient estimator for \sigma^2, and moreover, since s^2 is UMVU, we can conclude that the finite-sample efficient estimator for \sigma^2 does not exist. Applying the asymptotic theory, both estimators s^2 and \textstyle\hat\sigma^2 are consistent, that is they converge in probability to \sigma^2 as the sample size n\rightarrow\infty. The two estimators are also both asymptotically normal: : \sqrt(\hat\sigma^2 - \sigma^2) \simeq \sqrt(s^2-\sigma^2) \,\xrightarrow\, \mathcal(0,2\sigma^4). In particular, both estimators are asymptotically efficient for \sigma^2.


Confidence intervals

By
Cochran's theorem In statistics, Cochran's theorem, devised by William G. Cochran, is a theorem used to justify results relating to the probability distributions of statistics that are used in the analysis of variance. Statement Let ''U''1, ..., ''U'N'' be i.i. ...
, for normal distributions the sample mean \textstyle\hat\mu and the sample variance ''s''2 are
independent Independent or Independents may refer to: Arts, entertainment, and media Artist groups * Independents (artist group), a group of modernist painters based in the New Hope, Pennsylvania, area of the United States during the early 1930s * Independ ...
, which means there can be no gain in considering their joint distribution. There is also a converse theorem: if in a sample the sample mean and sample variance are independent, then the sample must have come from the normal distribution. The independence between \textstyle\hat\mu and ''s'' can be employed to construct the so-called ''t-statistic'': : t = \frac = \frac \sim t_ This quantity ''t'' has the
Student's t-distribution In probability and statistics, Student's ''t''-distribution (or simply the ''t''-distribution) is any member of a family of continuous probability distributions that arise when estimating the mean of a normally distributed population in sit ...
with degrees of freedom, and it is an ancillary statistic (independent of the value of the parameters). Inverting the distribution of this ''t''-statistics will allow us to construct the
confidence interval In frequentist statistics, a confidence interval (CI) is a range of estimates for an unknown parameter. A confidence interval is computed at a designated ''confidence level''; the 95% confidence level is most common, but other levels, such as 9 ...
for ''μ''; similarly, inverting the ''χ''2 distribution of the statistic ''s''2 will give us the confidence interval for ''σ''2: :\mu \in \left[ \hat\mu - t_ \fracs, \hat\mu + t_ \fracs \right], :\sigma^2 \in \left[ \frac, \frac \right], where ''tk,p'' and are the ''p''th
quantile In statistics and probability, quantiles are cut points dividing the range of a probability distribution into continuous intervals with equal probabilities, or dividing the observations in a sample in the same way. There is one fewer quantile tha ...
s of the ''t''- and ''χ''2-distributions respectively. These confidence intervals are of the ''confidence level'' , meaning that the true values ''μ'' and ''σ''2 fall outside of these intervals with probability (or significance level) ''α''. In practice people usually take , resulting in the 95% confidence intervals. Approximate formulas can be derived from the asymptotic distributions of \textstyle\hat\mu and ''s''2: :\mu \in \left[ \hat\mu - , z_, \fracs, \hat\mu + , z_, \fracs \right], :\sigma^2 \in \left[ s^2 - , z_, \fracs^2, s^2 + , z_, \fracs^2 \right], The approximate formulas become valid for large values of ''n'', and are more convenient for the manual calculation since the standard normal quantiles ''z''''α''/2 do not depend on ''n''. In particular, the most popular value of , results in .


Normality tests

Normality tests assess the likelihood that the given data set comes from a normal distribution. Typically the null hypothesis ''H''0 is that the observations are distributed normally with unspecified mean ''μ'' and variance ''σ''2, versus the alternative ''Ha'' that the distribution is arbitrary. Many tests (over 40) have been devised for this problem. The more prominent of them are outlined below: Diagnostic plots are more intuitively appealing but subjective at the same time, as they rely on informal human judgement to accept or reject the null hypothesis. *
Q–Q plot In statistics, a Q–Q plot (quantile-quantile plot) is a probability plot, a List of graphical methods, graphical method for comparing two probability distributions by plotting their ''quantiles'' against each other. A point on the plot co ...
, also known as normal probability plot or rankit plot—is a plot of the sorted values from the data set against the expected values of the corresponding quantiles from the standard normal distribution. That is, it's a plot of point of the form (Φ−1(''pk''), ''x''(''k'')), where plotting points ''pk'' are equal to ''pk'' = (''k'' − ''α'')/(''n'' + 1 − 2''α'') and ''α'' is an adjustment constant, which can be anything between 0 and 1. If the null hypothesis is true, the plotted points should approximately lie on a straight line. * P–P plot – similar to the Q–Q plot, but used much less frequently. This method consists of plotting the points (Φ(''z''(''k'')), ''pk''), where \textstyle z_ = (x_-\hat\mu)/\hat\sigma. For normally distributed data this plot should lie on a 45° line between (0, 0) and (1, 1). Goodness-of-fit tests: ''Moment-based tests'': * D'Agostino's K-squared test * Jarque–Bera test * Shapiro–Wilk test: This is based on the fact that the line in the Q–Q plot has the slope of ''σ''. The test compares the least squares estimate of that slope with the value of the sample variance, and rejects the null hypothesis if these two quantities differ significantly. ''Tests based on the empirical distribution function'': * Anderson–Darling test * Lilliefors test (an adaptation of the Kolmogorov–Smirnov test)


Bayesian analysis of the normal distribution

Bayesian analysis of normally distributed data is complicated by the many different possibilities that may be considered: * Either the mean, or the variance, or neither, may be considered a fixed quantity. * When the variance is unknown, analysis may be done directly in terms of the variance, or in terms of the
precision Precision, precise or precisely may refer to: Science, and technology, and mathematics Mathematics and computing (general) * Accuracy and precision, measurement deviation from true value and its scatter * Significant figures, the number of digit ...
, the reciprocal of the variance. The reason for expressing the formulas in terms of precision is that the analysis of most cases is simplified. * Both univariate and multivariate normal distribution, multivariate cases need to be considered. * Either conjugate prior, conjugate or improper prior, improper prior distributions may be placed on the unknown variables. * An additional set of cases occurs in Bayesian linear regression, where in the basic model the data is assumed to be normally distributed, and normal priors are placed on the regression coefficients. The resulting analysis is similar to the basic cases of independent identically distributed data. The formulas for the non-linear-regression cases are summarized in the conjugate prior article.


Sum of two quadratics


= Scalar form

= The following auxiliary formula is useful for simplifying the posterior distribution, posterior update equations, which otherwise become fairly tedious. :a(x-y)^2 + b(x-z)^2 = (a + b)\left(x - \frac\right)^2 + \frac(y-z)^2 This equation rewrites the sum of two quadratics in ''x'' by expanding the squares, grouping the terms in ''x'', and completing the square. Note the following about the complex constant factors attached to some of the terms: # The factor \frac has the form of a weighted average of ''y'' and ''z''. # \frac = \frac = (a^ + b^)^. This shows that this factor can be thought of as resulting from a situation where the Multiplicative inverse, reciprocals of quantities ''a'' and ''b'' add directly, so to combine ''a'' and ''b'' themselves, it's necessary to reciprocate, add, and reciprocate the result again to get back into the original units. This is exactly the sort of operation performed by the harmonic mean, so it is not surprising that \frac is one-half the harmonic mean of ''a'' and ''b''.


= Vector form

= A similar formula can be written for the sum of two vector quadratics: If x, y, z are vectors of length ''k'', and A and B are symmetric matrix, symmetric, invertible matrices of size k\times k, then : \begin & (\mathbf-\mathbf)'\mathbf(\mathbf-\mathbf) + (\mathbf-\mathbf)' \mathbf(\mathbf-\mathbf) \\ = & (\mathbf - \mathbf)'(\mathbf+\mathbf)(\mathbf - \mathbf) + (\mathbf - \mathbf)'(\mathbf^ + \mathbf^)^(\mathbf - \mathbf) \end where :\mathbf = (\mathbf + \mathbf)^(\mathbf\mathbf + \mathbf \mathbf) Note that the form x′ A x is called a
quadratic form In mathematics, a quadratic form is a polynomial with terms all of degree two ("form" is another name for a homogeneous polynomial). For example, :4x^2 + 2xy - 3y^2 is a quadratic form in the variables and . The coefficients usually belong to a ...
and is a scalar (mathematics), scalar: :\mathbf'\mathbf\mathbf = \sum_a_ x_i x_j In other words, it sums up all possible combinations of products of pairs of elements from x, with a separate coefficient for each. In addition, since x_i x_j = x_j x_i, only the sum a_ + a_ matters for any off-diagonal elements of A, and there is no loss of generality in assuming that A is symmetric matrix, symmetric. Furthermore, if A is symmetric, then the form \mathbf'\mathbf\mathbf = \mathbf'\mathbf\mathbf.


Sum of differences from the mean

Another useful formula is as follows: \sum_^n (x_i-\mu)^2 = \sum_^n (x_i-\bar)^2 + n(\bar -\mu)^2 where \bar = \frac \sum_^n x_i.


With known variance

For a set of i.i.d. normally distributed data points X of size ''n'' where each individual point ''x'' follows x \sim \mathcal(\mu, \sigma^2) with known
variance In probability theory and statistics, variance is the expectation of the squared deviation of a random variable from its population mean or sample mean. Variance is a measure of dispersion, meaning it is a measure of how far a set of numbers ...
σ2, the conjugate prior distribution is also normally distributed. This can be shown more easily by rewriting the variance as the
precision Precision, precise or precisely may refer to: Science, and technology, and mathematics Mathematics and computing (general) * Accuracy and precision, measurement deviation from true value and its scatter * Significant figures, the number of digit ...
, i.e. using τ = 1/σ2. Then if x \sim \mathcal(\mu, 1/\tau) and \mu \sim \mathcal(\mu_0, 1/\tau_0), we proceed as follows. First, the likelihood function is (using the formula above for the sum of differences from the mean): :\begin p(\mathbf\mid\mu,\tau) &= \prod_^n \sqrt \exp\left(-\frac\tau(x_i-\mu)^2\right) \\ &= \left(\frac\right)^ \exp\left(-\frac\tau \sum_^n (x_i-\mu)^2\right) \\ &= \left(\frac\right)^ \exp\left[-\frac\tau \left(\sum_^n(x_i-\bar)^2 + n(\bar -\mu)^2\right)\right]. \end Then, we proceed as follows: :\begin p(\mu\mid\mathbf) &\propto p(\mathbf\mid\mu) p(\mu) \\ & = \left(\frac\right)^ \exp\left[-\frac\tau \left(\sum_^n(x_i-\bar)^2 + n(\bar -\mu)^2\right)\right] \sqrt \exp\left(-\frac\tau_0(\mu-\mu_0)^2\right) \\ &\propto \exp\left(-\frac\left(\tau\left(\sum_^n(x_i-\bar)^2 + n(\bar -\mu)^2\right) + \tau_0(\mu-\mu_0)^2\right)\right) \\ &\propto \exp\left(-\frac \left(n\tau(\bar-\mu)^2 + \tau_0(\mu-\mu_0)^2 \right)\right) \\ &= \exp\left(-\frac(n\tau + \tau_0)\left(\mu - \dfrac\right)^2 + \frac(\bar - \mu_0)^2\right) \\ &\propto \exp\left(-\frac(n\tau + \tau_0)\left(\mu - \dfrac\right)^2\right) \end In the above derivation, we used the formula above for the sum of two quadratics and eliminated all constant factors not involving ''μ''. The result is the kernel (statistics), kernel of a normal distribution, with mean \frac and precision n\tau + \tau_0, i.e. :p(\mu\mid\mathbf) \sim \mathcal\left(\frac, \frac\right) This can be written as a set of Bayesian update equations for the posterior parameters in terms of the prior parameters: :\begin \tau_0' &= \tau_0 + n\tau \\[5pt] \mu_0' &= \frac \\[5pt] \bar &= \frac\sum_^n x_i \end That is, to combine ''n'' data points with total precision of ''nτ'' (or equivalently, total variance of ''n''/''σ''2) and mean of values \bar, derive a new total precision simply by adding the total precision of the data to the prior total precision, and form a new mean through a ''precision-weighted average'', i.e. a weighted average of the data mean and the prior mean, each weighted by the associated total precision. This makes logical sense if the precision is thought of as indicating the certainty of the observations: In the distribution of the posterior mean, each of the input components is weighted by its certainty, and the certainty of this distribution is the sum of the individual certainties. (For the intuition of this, compare the expression "the whole is (or is not) greater than the sum of its parts". In addition, consider that the knowledge of the posterior comes from a combination of the knowledge of the prior and likelihood, so it makes sense that we are more certain of it than of either of its components.) The above formula reveals why it is more convenient to do Bayesian analysis of conjugate priors for the normal distribution in terms of the precision. The posterior precision is simply the sum of the prior and likelihood precisions, and the posterior mean is computed through a precision-weighted average, as described above. The same formulas can be written in terms of variance by reciprocating all the precisions, yielding the more ugly formulas :\begin ' &= \frac \\[5pt] \mu_0' &= \frac \\[5pt] \bar &= \frac\sum_^n x_i \end


With known mean

For a set of i.i.d. normally distributed data points X of size ''n'' where each individual point ''x'' follows x \sim \mathcal(\mu, \sigma^2) with known mean μ, the conjugate prior of the
variance In probability theory and statistics, variance is the expectation of the squared deviation of a random variable from its population mean or sample mean. Variance is a measure of dispersion, meaning it is a measure of how far a set of numbers ...
has an inverse gamma distribution or a scaled inverse chi-squared distribution. The two are equivalent 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. The prior for σ2 is as follows: :p(\sigma^2\mid\nu_0,\sigma_0^2) = \frac~\frac \propto \frac The likelihood function from above, written in terms of the variance, is: :\begin p(\mathbf\mid\mu,\sigma^2) &= \left(\frac\right)^ \exp\left[-\frac \sum_^n (x_i-\mu)^2\right] \\ &= \left(\frac\right)^ \exp\left[-\frac\right] \end where :S = \sum_^n (x_i-\mu)^2. Then: :\begin p(\sigma^2\mid\mathbf) &\propto p(\mathbf\mid\sigma^2) p(\sigma^2) \\ &= \left(\frac\right)^ \exp\left[-\frac\right] \frac~\frac \\ &\propto \left(\frac\right)^ \frac \exp\left[-\frac + \frac\right] \\ &= \frac \exp\left[-\frac\right] \end The above is also a scaled inverse chi-squared distribution where :\begin \nu_0' &= \nu_0 + n \\ \nu_0'' &= \nu_0 \sigma_0^2 + \sum_^n (x_i-\mu)^2 \end or equivalently :\begin \nu_0' &= \nu_0 + n \\ ' &= \frac \end Reparameterizing in terms of an inverse gamma distribution, the result is: :\begin \alpha' &= \alpha + \frac \\ \beta' &= \beta + \frac \end


With unknown mean and unknown variance

For a set of i.i.d. normally distributed data points X of size ''n'' where each individual point ''x'' follows x \sim \mathcal(\mu, \sigma^2) with unknown mean μ and unknown
variance In probability theory and statistics, variance is the expectation of the squared deviation of a random variable from its population mean or sample mean. Variance is a measure of dispersion, meaning it is a measure of how far a set of numbers ...
σ2, a combined (multivariate) conjugate prior is placed over the mean and variance, consisting of a normal-inverse-gamma distribution. Logically, this originates as follows: # From the analysis of the case with unknown mean but known variance, we see that the update equations involve sufficient statistics computed from the data consisting of the mean of the data points and the total variance of the data points, computed in turn from the known variance divided by the number of data points. # From the analysis of the case with unknown variance but known mean, we see that the update equations involve sufficient statistics over the data consisting of the number of data points and sum of squared deviations. # Keep in mind that the posterior update values serve as the prior distribution when further data is handled. Thus, we should logically think of our priors in terms of the sufficient statistics just described, with the same semantics kept in mind as much as possible. # To handle the case where both mean and variance are unknown, we could place independent priors over the mean and variance, with fixed estimates of the average mean, total variance, number of data points used to compute the variance prior, and sum of squared deviations. Note however that in reality, the total variance of the mean depends on the unknown variance, and the sum of squared deviations that goes into the variance prior (appears to) depend on the unknown mean. In practice, the latter dependence is relatively unimportant: Shifting the actual mean shifts the generated points by an equal amount, and on average the squared deviations will remain the same. This is not the case, however, with the total variance of the mean: As the unknown variance increases, the total variance of the mean will increase proportionately, and we would like to capture this dependence. # This suggests that we create a ''conditional prior'' of the mean on the unknown variance, with a hyperparameter specifying the mean of the pseudo-observations associated with the prior, and another parameter specifying the number of pseudo-observations. This number serves as a scaling parameter on the variance, making it possible to control the overall variance of the mean relative to the actual variance parameter. The prior for the variance also has two hyperparameters, one specifying the sum of squared deviations of the pseudo-observations associated with the prior, and another specifying once again the number of pseudo-observations. Note that each of the priors has a hyperparameter specifying the number of pseudo-observations, and in each case this controls the relative variance of that prior. These are given as two separate hyperparameters so that the variance (aka the confidence) of the two priors can be controlled separately. # This leads immediately to the normal-inverse-gamma distribution, which is the product of the two distributions just defined, with conjugate priors used (an inverse gamma distribution over the variance, and a normal distribution over the mean, ''conditional'' on the variance) and with the same four parameters just defined. The priors are normally defined as follows: :\begin p(\mu\mid\sigma^2; \mu_0, n_0) &\sim \mathcal(\mu_0,\sigma^2/n_0) \\ p(\sigma^2; \nu_0,\sigma_0^2) &\sim I\chi^2(\nu_0,\sigma_0^2) = IG(\nu_0/2, \nu_0\sigma_0^2/2) \end The update equations can be derived, and look as follows: :\begin \bar &= \frac 1 n \sum_^n x_i \\ \mu_0' &= \frac \\ n_0' &= n_0 + n \\ \nu_0' &= \nu_0 + n \\ \nu_0'' &= \nu_0 \sigma_0^2 + \sum_^n (x_i-\bar)^2 + \frac(\mu_0 - \bar)^2 \end The respective numbers of pseudo-observations add the number of actual observations to them. The new mean hyperparameter is once again a weighted average, this time weighted by the relative numbers of observations. Finally, the update for \nu_0'' is similar to the case with known mean, but in this case the sum of squared deviations is taken with respect to the observed data mean rather than the true mean, and as a result a new "interaction term" needs to be added to take care of the additional error source stemming from the deviation between prior and data mean.


Occurrence and applications

The occurrence of normal distribution in practical problems can be loosely classified into four categories: # Exactly normal distributions; # Approximately normal laws, for example when such approximation is justified by the
central limit theorem In probability theory, the central limit theorem (CLT) establishes that, in many situations, when independent random variables are summed up, their properly normalized sum tends toward a normal distribution even if the original variables themselv ...
; and # Distributions modeled as normal – the normal distribution being the distribution with Principle of maximum entropy, maximum entropy for a given mean and variance. # Regression problems – the normal distribution being found after systematic effects have been modeled sufficiently well.


Exact normality

Certain quantities in physics are distributed normally, as was first demonstrated by James Clerk Maxwell. Examples of such quantities are: * Probability density function of a ground state in a quantum harmonic oscillator. * The position of a particle that experiences diffusion. If initially the particle is located at a specific point (that is its probability distribution is the Dirac delta function), then after time ''t'' its location is described by a normal distribution with variance ''t'', which satisfies the diffusion equation \frac f(x,t) = \frac \frac f(x,t). If the initial location is given by a certain density function g(x), then the density at time ''t'' is the convolution of ''g'' and the normal PDF.


Approximate normality

''Approximately'' normal distributions occur in many situations, as explained by the
central limit theorem In probability theory, the central limit theorem (CLT) establishes that, in many situations, when independent random variables are summed up, their properly normalized sum tends toward a normal distribution even if the original variables themselv ...
. When the outcome is produced by many small effects acting ''additively and independently'', its distribution will be close to normal. The normal approximation will not be valid if the effects act multiplicatively (instead of additively), or if there is a single external influence that has a considerably larger magnitude than the rest of the effects. * In counting problems, where the central limit theorem includes a discrete-to-continuum approximation and where Infinite divisibility, infinitely divisible and Indecomposable distribution, decomposable distributions are involved, such as ** binomial distribution, Binomial random variables, associated with binary response variables; ** Poisson distribution, Poisson random variables, associated with rare events; * Thermal radiation has a Bose–Einstein statistics, Bose–Einstein distribution on very short time scales, and a normal distribution on longer timescales due to the central limit theorem.


Assumed normality

There are statistical methods to empirically test that assumption; see the above #Normality tests, Normality tests section. * In biology, the ''logarithm'' of various variables tend to have a normal distribution, that is, they tend to have a
log-normal distribution In probability theory, a log-normal (or lognormal) distribution is a continuous probability distribution of a random variable whose logarithm is normally distributed. Thus, if the random variable is log-normally distributed, then has a normal ...
(after separation on male/female subpopulations), with examples including: ** Measures of size of living tissue (length, height, skin area, weight); ** The ''length'' of ''inert'' appendages (hair, claws, nails, teeth) of biological specimens, ''in the direction of growth''; presumably the thickness of tree bark also falls under this category; ** Certain physiological measurements, such as blood pressure of adult humans. * In finance, in particular the Black–Scholes model, changes in the ''logarithm'' of exchange rates, price indices, and stock market indices are assumed normal (these variables behave like compound interest, not like simple interest, and so are multiplicative). Some mathematicians such as Benoit Mandelbrot have argued that Levy skew alpha-stable distribution, log-Levy distributions, which possesses heavy tails would be a more appropriate model, in particular for the analysis for stock market crashes. The use of the assumption of normal distribution occurring in financial models has also been criticized by Nassim Nicholas Taleb in his works. * Propagation of uncertainty, Measurement errors in physical experiments are often modeled by a normal distribution. This use of a normal distribution does not imply that one is assuming the measurement errors are normally distributed, rather using the normal distribution produces the most conservative predictions possible given only knowledge about the mean and variance of the errors. * In Standardized testing (statistics), standardized testing, results can be made to have a normal distribution by either selecting the number and difficulty of questions (as in the Intelligence quotient, IQ test) or transforming the raw test scores into "output" scores by fitting them to the normal distribution. For example, the SAT's traditional range of 200–800 is based on a normal distribution with a mean of 500 and a standard deviation of 100. * Many scores are derived from the normal distribution, including percentile ranks ("percentiles" or "quantiles"), normal curve equivalents, stanines, Standard score, z-scores, and T-scores. Additionally, some behavioral statistical procedures assume that scores are normally distributed; for example, Student's t-test, t-tests and Analysis of variance, ANOVAs. Bell curve grading assigns relative grades based on a normal distribution of scores. * In hydrology the distribution of long duration river discharge or rainfall, e.g. monthly and yearly totals, is often thought to be practically normal according to the
central limit theorem In probability theory, the central limit theorem (CLT) establishes that, in many situations, when independent random variables are summed up, their properly normalized sum tends toward a normal distribution even if the original variables themselv ...
. The blue picture, made with CumFreq, illustrates an example of fitting the normal distribution to ranked October rainfalls showing the 90% confidence belt based on the
binomial distribution In probability theory and statistics, the binomial distribution with parameters ''n'' and ''p'' is the discrete probability distribution of the number of successes in a sequence of ''n'' independent experiments, each asking a yes–no quest ...
. The rainfall data are represented by plotting positions as part of the cumulative frequency analysis.


Methodological problems and peer review

John Ioannidis argues that using normally distributed standard deviations as standards for validating research findings leave falsifiability, falsifiable predictions about phenomena that are not normally distributed untested. This includes, for example, phenomena that only appear when all necessary conditions are present and one cannot be a substitute for another in an addition-like way and phenomena that are not randomly distributed. Ioannidis argues that standard deviation-centered validation gives a false appearance of validity to hypotheses and theories where some but not all falsifiable predictions are normally distributed since the portion of falsifiable predictions that there is evidence against may and in some cases are in the non-normally distributed parts of the range of falsifiable predictions, as well as baselessly dismissing hypotheses for which none of the falsifiable predictions are normally distributed as if were they unfalsifiable when in fact they do make falsifiable predictions. It is argued by Ioannidis that many cases of mutually exclusive theories being accepted as "validated" by research journals are caused by failure of the journals to take in empirical falsifications of non-normally distributed predictions, and not because mutually exclusive theories are true, which they cannot be, although two mutually exclusive theories can both be wrong and a third one correct.


Computational methods


Generating values from normal distribution

In computer simulations, especially in applications of the Monte-Carlo method, it is often desirable to generate values that are normally distributed. The algorithms listed below all generate the standard normal deviates, since a can be generated as , where ''Z'' is standard normal. All these algorithms rely on the availability of a random number generator ''U'' capable of producing Uniform distribution (continuous), uniform random variates. * The most straightforward method is based on the probability integral transform property: if ''U'' is distributed uniformly on (0,1), then Φ−1(''U'') will have the standard normal distribution. The drawback of this method is that it relies on calculation of the
probit function In probability theory and statistics, the probit function is the quantile function associated with the standard normal distribution. It has applications in data analysis and machine learning, in particular exploratory statistical graphics and ...
Φ−1, which cannot be done analytically. Some approximate methods are described in and in the error function, erf article. Wichura gives a fast algorithm for computing this function to 16 decimal places, which is used by R programming language, R to compute random variates of the normal distribution. * Irwin–Hall distribution#Approximating a Normal distribution, An easy-to-program approximate approach that relies on the
central limit theorem In probability theory, the central limit theorem (CLT) establishes that, in many situations, when independent random variables are summed up, their properly normalized sum tends toward a normal distribution even if the original variables themselv ...
is as follows: generate 12 uniform ''U''(0,1) deviates, add them all up, and subtract 6 – the resulting random variable will have approximately standard normal distribution. In truth, the distribution will be Irwin–Hall distribution, Irwin–Hall, which is a 12-section eleventh-order polynomial approximation to the normal distribution. This random deviate will have a limited range of (−6, 6). Note that in a true normal distribution, only 0.00034% of all samples will fall outside ±6σ. * The Box–Muller transform, Box–Muller method uses two independent random numbers ''U'' and ''V'' distributed uniform distribution (continuous), uniformly on (0,1). Then the two random variables ''X'' and ''Y'' X = \sqrt \, \cos(2 \pi V) , \qquad Y = \sqrt \, \sin(2 \pi V) . will both have the standard normal distribution, and will be
independent Independent or Independents may refer to: Arts, entertainment, and media Artist groups * Independents (artist group), a group of modernist painters based in the New Hope, Pennsylvania, area of the United States during the early 1930s * Independ ...
. This formulation arises because for a bivariate normal random vector (''X'', ''Y'') the squared norm will have the
chi-squared distribution In probability theory and statistics, the chi-squared distribution (also chi-square or \chi^2-distribution) with k degrees of freedom is the distribution of a sum of the squares of k independent standard normal random variables. The chi-squa ...
with two degrees of freedom, which is an easily generated exponential distribution, exponential random variable corresponding to the quantity −2ln(''U'') in these equations; and the angle is distributed uniformly around the circle, chosen by the random variable ''V''. * The Marsaglia polar method is a modification of the Box–Muller method which does not require computation of the sine and cosine functions. In this method, ''U'' and ''V'' are drawn from the uniform (−1,1) distribution, and then is computed. If ''S'' is greater or equal to 1, then the method starts over, otherwise the two quantities X = U\sqrt, \qquad Y = V\sqrt are returned. Again, ''X'' and ''Y'' are independent, standard normal random variables. * The Ratio method is a rejection method. The algorithm proceeds as follows: ** Generate two independent uniform deviates ''U'' and ''V''; ** Compute ''X'' = (''V'' − 0.5)/''U''; ** Optional: if ''X''2 ≤ 5 − 4''e''1/4''U'' then accept ''X'' and terminate algorithm; ** Optional: if ''X''2 ≥ 4''e''−1.35/''U'' + 1.4 then reject ''X'' and start over from step 1; ** If ''X''2 ≤ −4 ln''U'' then accept ''X'', otherwise start over the algorithm. *:The two optional steps allow the evaluation of the logarithm in the last step to be avoided in most cases. These steps can be greatly improved so that the logarithm is rarely evaluated. * The ziggurat algorithm is faster than the Box–Muller transform and still exact. In about 97% of all cases it uses only two random numbers, one random integer and one random uniform, one multiplication and an if-test. Only in 3% of the cases, where the combination of those two falls outside the "core of the ziggurat" (a kind of rejection sampling using logarithms), do exponentials and more uniform random numbers have to be employed. * Integer arithmetic can be used to sample from the standard normal distribution. This method is exact in the sense that it satisfies the conditions of ''ideal approximation''; i.e., it is equivalent to sampling a real number from the standard normal distribution and rounding this to the nearest representable floating point number. * There is also some investigation into the connection between the fast Hadamard transform and the normal distribution, since the transform employs just addition and subtraction and by the central limit theorem random numbers from almost any distribution will be transformed into the normal distribution. In this regard a series of Hadamard transforms can be combined with random permutations to turn arbitrary data sets into a normally distributed data.


Numerical approximations for the normal CDF and normal quantile function

The standard normal cumulative distribution function, CDF is widely used in scientific and statistical computing. The values Φ(''x'') may be approximated very accurately by a variety of methods, such as numerical integration, Taylor series, asymptotic series and Gauss's continued fraction#Of Kummer's confluent hypergeometric function, continued fractions. Different approximations are used depending on the desired level of accuracy. * give the approximation for Φ(''x'') for ''x > 0'' with the absolute error (algorith
26.2.17
: \Phi(x) = 1 - \varphi(x)\left(b_1 t + b_2 t^2 + b_3t^3 + b_4 t^4 + b_5 t^5\right) + \varepsilon(x), \qquad t = \frac, where ''ϕ''(''x'') is the standard normal PDF, and ''b''0 = 0.2316419, ''b''1 = 0.319381530, ''b''2 = −0.356563782, ''b''3 = 1.781477937, ''b''4 = −1.821255978, ''b''5 = 1.330274429. * lists some dozens of approximations – by means of rational functions, with or without exponentials – for the function. His algorithms vary in the degree of complexity and the resulting precision, with maximum absolute precision of 24 digits. An algorithm by combines Hart's algorithm 5666 with a continued fraction approximation in the tail to provide a fast computation algorithm with a 16-digit precision. * after recalling Hart68 solution is not suited for erf, gives a solution for both erf and erfc, with maximal relative error bound, via rational function, Rational Chebyshev Approximation. * suggested a simple algorithm based on the Taylor series expansion \Phi(x) = \frac12 + \varphi(x)\left( x + \frac 3 + \frac + \frac + \frac + \cdots \right) for calculating with arbitrary precision. The drawback of this algorithm is comparatively slow calculation time (for example it takes over 300 iterations to calculate the function with 16 digits of precision when ). * The GNU Scientific Library calculates values of the standard normal CDF using Hart's algorithms and approximations with Chebyshev polynomials. Shore (1982) introduced simple approximations that may be incorporated in stochastic optimization models of engineering and operations research, like reliability engineering and inventory analysis. Denoting , the simplest approximation for the quantile function is: z = \Phi^(p)=5.5556\left[1- \left( \frac p \right)^\right],\qquad p\ge 1/2 This approximation delivers for ''z'' a maximum absolute error of 0.026 (for , corresponding to ). For replace ''p'' by and change sign. Another approximation, somewhat less accurate, is the single-parameter approximation: z=-0.4115\left\, \qquad p\ge 1/2 The latter had served to derive a simple approximation for the loss integral of the normal distribution, defined by \begin L(z) & =\int_z^\infty (u-z)\varphi(u) \, du=\int_z^\infty [1-\Phi (u)] \, du \\[5pt] L(z) & \approx \begin 0.4115\left(\dfrac p \right) - z, & p<1/2, \\ \\ 0.4115\left( \dfrac p \right), & p\ge 1/2. \end \\[5pt] \text \\ L(z) & \approx \begin 0.4115\left\, & p < 1/2, \\ \\ 0.4115 \dfrac p, & p\ge 1/2. \end \end This approximation is particularly accurate for the right far-tail (maximum error of 10−3 for z≥1.4). Highly accurate approximations for the CDF, based on Response modeling methodology, Response Modeling Methodology (RMM, Shore, 2011, 2012), are shown in Shore (2005). Some more approximations can be found at: Error function#Approximation with elementary functions. In particular, small ''relative'' error on the whole domain for the CDF \Phi and the quantile function \Phi^ as well, is achieved via an explicitly invertible formula by Sergei Winitzki in 2008.


History


Development

Some authors attribute the credit for the discovery of the normal distribution to Abraham de Moivre, de Moivre, who in 1738 published in the second edition of his "''The Doctrine of Chances''" the study of the coefficients in the binomial expansion of . De Moivre proved that the middle term in this expansion has the approximate magnitude of 2^n/\sqrt, and that "If ''m'' or ''n'' be a Quantity infinitely great, then the Logarithm of the Ratio, which a Term distant from the middle by the Interval ''ℓ'', has to the middle Term, is -\frac." Although this theorem can be interpreted as the first obscure expression for the normal probability law, Stephen Stigler, Stigler points out that de Moivre himself did not interpret his results as anything more than the approximate rule for the binomial coefficients, and in particular de Moivre lacked the concept of the probability density function. In 1823 Carl Friedrich Gauss, Gauss published his monograph "''Theoria combinationis observationum erroribus minimis obnoxiae''" where among other things he introduces several important statistical concepts, such as the method of least squares, the method of maximum likelihood, and the ''normal distribution''. Gauss used ''M'', , to denote the measurements of some unknown quantity ''V'', and sought the "most probable" estimator of that quantity: the one that maximizes the probability of obtaining the observed experimental results. In his notation φΔ is the probability density function of the measurement errors of magnitude Δ. Not knowing what the function ''φ'' is, Gauss requires that his method should reduce to the well-known answer: the arithmetic mean of the measured values. Starting from these principles, Gauss demonstrates that the only law that rationalizes the choice of arithmetic mean as an estimator of the location parameter, is the normal law of errors: \varphi\mathit = \frac h \, e^, where ''h'' is "the measure of the precision of the observations". Using this normal law as a generic model for errors in the experiments, Gauss formulates what is now known as the non-linear least squares, non-linear weighted least squares method. Although Gauss was the first to suggest the normal distribution law, Pierre Simon de Laplace, Laplace made significant contributions. It was Laplace who first posed the problem of aggregating several observations in 1774, although his own solution led to the Laplacian distribution. It was Laplace who first calculated the value of the Gaussian integral, integral in 1782, providing the normalization constant for the normal distribution. Finally, it was Laplace who in 1810 proved and presented to the Academy the fundamental
central limit theorem In probability theory, the central limit theorem (CLT) establishes that, in many situations, when independent random variables are summed up, their properly normalized sum tends toward a normal distribution even if the original variables themselv ...
, which emphasized the theoretical importance of the normal distribution. It is of interest to note that in 1809 an Irish-American mathematician Robert Adrain published two insightful but flawed derivations of the normal probability law, simultaneously and independently from Gauss. His works remained largely unnoticed by the scientific community, until in 1871 they were exhumed by Cleveland Abbe, Abbe. In the middle of the 19th century James Clerk Maxwell, Maxwell demonstrated that the normal distribution is not just a convenient mathematical tool, but may also occur in natural phenomena: "The number of particles whose velocity, resolved in a certain direction, lies between ''x'' and ''x'' + ''dx'' is \operatorname \frac\; e^ \, dx


Naming

Today, the concept is usually known in English as the normal distribution or Gaussian distribution. Other less common names include Gauss distribution, Laplace-Gauss distribution, the law of error, the law of facility of errors, Laplace's second law, Gaussian law. Gauss himself apparently coined the term with reference to the "normal equations" involved in its applications, with normal having its technical meaning of orthogonal rather than "usual". However, by the end of the 19th century some authors had started using the name ''normal distribution'', where the word "normal" was used as an adjective – the term now being seen as a reflection of the fact that this distribution was seen as typical, common – and thus "normal". Charles Sanders Peirce, Peirce (one of those authors) once defined "normal" thus: "...the 'normal' is not the average (or any other kind of mean) of what actually occurs, but of what ''would'', in the long run, occur under certain circumstances." Around the turn of the 20th century Karl Pearson, Pearson popularized the term ''normal'' as a designation for this distribution. Also, it was Pearson who first wrote the distribution in terms of the standard deviation ''σ'' as in modern notation. Soon after this, in year 1915, Ronald Fisher, Fisher added the location parameter to the formula for normal distribution, expressing it in the way it is written nowadays: df = \frac e^ \, dx. The term "standard normal", which denotes the normal distribution with zero mean and unit variance came into general use around the 1950s, appearing in the popular textbooks by P. G. Hoel (1947) "''Introduction to mathematical statistics''" and A. M. Mood (1950) "''Introduction to the theory of statistics''".


See also

* Bates distribution – similar to the Irwin–Hall distribution, but rescaled back into the 0 to 1 range * Behrens–Fisher problem – the long-standing problem of testing whether two normal samples with different variances have same means; * Bhattacharyya distance – method used to separate mixtures of normal distributions * Erdős–Kac theorem – on the occurrence of the normal distribution in number theory * Full width at half maximum * Gaussian blur – convolution, which uses the normal distribution as a kernel * Modified half-normal distribution with the pdf on (0, \infty) is given as f(x)= \frac, where \Psi(\alpha,z)=_1\Psi_1\left(\begin\left(\alpha,\frac\right)\\(1,0)\end;z \right) denotes the Fox-Wright Psi function. * Normally distributed and uncorrelated does not imply independent * Ratio normal distribution * Reciprocal normal distribution * Standard normal table * Stein's lemma * Sub-Gaussian distribution * Sum of normally distributed random variables * Tweedie distribution – The normal distribution is a member of the family of Tweedie exponential dispersion models. * Wrapped normal distribution – the Normal distribution applied to a circular domain * Z-test – using the normal distribution


Notes


References


Citations


Sources

* * In particular, the entries fo
"bell-shaped and bell curve"
an

* * * * * * * * * * * * * * * * * * * * * * * * Translated by Stephen M. Stigler in ''Statistical Science'' 1 (3), 1986: . * * * * * * * * * * * * * * * * * * * * * * * * * * * *


External links

*
Normal distribution calculator
{{Authority control Normal distribution, Continuous distributions Conjugate prior distributions Exponential family distributions Stable distributions Location-scale family probability distributions]">X - \mu, ^p\right&= \sigma^p (p-1)!! \cdot \begin \sqrt & \textp\text \\ 1 & \textp\text \end \\ &= \sigma^p \cdot \frac. \end The last formula is valid also for any non-integer p>-1. When the mean \mu \ne 0, the plain and absolute moments can be expressed in terms of
confluent hypergeometric function In mathematics, a confluent hypergeometric function is a solution of a confluent hypergeometric equation, which is a degenerate form of a hypergeometric differential equation where two of the three regular singularities merge into an irregular ...
s _1F_1 and U. :\begin \operatorname\left ^p\right&= \sigma^p\cdot (-i\sqrt 2)^p U\left(-\frac, \frac, -\frac \left( \frac \mu \sigma \right)^2 \right), \\ \operatorname\left Hermite polynomials#"Negative variance", generalized Hermite polynomials. The expectation of X conditioned on the event that X lies in an interval ,b/math> is given by :\operatorname\left \mid a= \mu - \sigma^2\frac where f and F respectively are the density and the cumulative distribution function of X. For b=\infty this is known as the
inverse Mills ratio In probability theory, the Mills ratio (or Mills's ratio) of a continuous random variable X is the function : m(x) := \frac , where f(x) is the probability density function, and :\bar(x) := \Pr x.html" ;"title=">x">>x= \int_x^ f(u)\, du is the ...
. Note that above, density f of X is used instead of standard normal density as in inverse Mills ratio, so here we have \sigma^2 instead of \sigma.


Fourier transform and characteristic function

The
Fourier transform A Fourier transform (FT) is a mathematical transform that decomposes functions into frequency components, which are represented by the output of the transform as a function of frequency. Most commonly functions of time or space are transformed, ...
of a normal density f with mean \mu and standard deviation \sigma is : \hat f(t) = \int_^\infty f(x)e^ \, dx = e^ e^ where i is the
imaginary unit The imaginary unit or unit imaginary number () is a solution to the quadratic equation x^2+1=0. Although there is no real number with this property, can be used to extend the real numbers to what are called complex numbers, using addition an ...
. If the mean \mu=0, the first factor is 1, and the Fourier transform is, apart from a constant factor, a normal density on the
frequency domain In physics, electronics, control systems engineering, and statistics, the frequency domain refers to the analysis of mathematical functions or signals with respect to frequency, rather than time. Put simply, a time-domain graph shows how a signa ...
, with mean 0 and standard deviation 1/\sigma. In particular, the standard normal distribution \varphi is an
eigenfunction In mathematics, an eigenfunction of a linear operator ''D'' defined on some function space is any non-zero function f in that space that, when acted upon by ''D'', is only multiplied by some scaling factor called an eigenvalue. As an equation, th ...
of the Fourier transform. In probability theory, the Fourier transform of the probability distribution of a real-valued random variable X is closely connected to the
characteristic function In mathematics, the term "characteristic function" can refer to any of several distinct concepts: * The indicator function of a subset, that is the function ::\mathbf_A\colon X \to \, :which for a given subset ''A'' of ''X'', has value 1 at points ...
\varphi_X(t) of that variable, which is defined as the
expected value In probability theory, the expected value (also called expectation, expectancy, mathematical expectation, mean, average, or first moment) is a generalization of the weighted average. Informally, the expected value is the arithmetic mean of a l ...
of e^, as a function of the real variable t (the
frequency Frequency is the number of occurrences of a repeating event per unit of time. It is also occasionally referred to as ''temporal frequency'' for clarity, and is distinct from ''angular frequency''. Frequency is measured in hertz (Hz) which is eq ...
parameter of the Fourier transform). This definition can be analytically extended to a complex-value variable t. The relation between both is: :\varphi_X(t) = \hat f(-t)


Moment and cumulant generating functions

The
moment generating function In probability theory and statistics, the moment-generating function of a real-valued random variable is an alternative specification of its probability distribution. Thus, it provides the basis of an alternative route to analytical results compare ...
of a real random variable X is the expected value of e^, as a function of the real parameter t. For a normal distribution with density f, mean \mu and deviation \sigma, the moment generating function exists and is equal to :M(t) = \operatorname ^= \hat f(it) = e^ e^ The
cumulant generating function In probability theory and statistics, the cumulants of a probability distribution are a set of quantities that provide an alternative to the '' moments'' of the distribution. Any two probability distributions whose moments are identical will have ...
is the logarithm of the moment generating function, namely :g(t) = \ln M(t) = \mu t + \tfrac 12 \sigma^2 t^2 Since this is a quadratic polynomial in t, only the first two
cumulant In probability theory and statistics, the cumulants of a probability distribution are a set of quantities that provide an alternative to the '' moments'' of the distribution. Any two probability distributions whose moments are identical will ha ...
s are nonzero, namely the mean \mu and the variance \sigma^2.


Stein operator and class

Within
Stein's method Stein's method is a general method in probability theory to obtain bounds on the distance between two probability distributions with respect to a probability metric. It was introduced by Charles Stein, who first published it in 1972, to obtain ...
the Stein operator and class of a random variable X \sim \mathcal(\mu, \sigma^2) are \mathcalf(x) = \sigma^2 f'(x) - (x-\mu)f(x) and \mathcal the class of all absolutely continuous functions f : \R \to \R \mbox\mathbb[, f'(X), ]< \infty.


Zero-variance limit

In the limit (mathematics), limit when \sigma tends to zero, the probability density f(x) eventually tends to zero at any x\ne \mu, but grows without limit if x = \mu, while its integral remains equal to 1. Therefore, the normal distribution cannot be defined as an ordinary
function Function or functionality may refer to: Computing * Function key, a type of key on computer keyboards * Function model, a structured representation of processes in a system * Function object or functor or functionoid, a concept of object-oriente ...
when \sigma = 0. However, one can define the normal distribution with zero variance as a
generalized function In mathematics, generalized functions are objects extending the notion of functions. There is more than one recognized theory, for example the theory of distributions. Generalized functions are especially useful in making discontinuous functions ...
; specifically, as Dirac's "delta function" \delta translated by the mean \mu, that is f(x)=\delta(x-\mu). Its CDF is then the
Heaviside step function The Heaviside step function, or the unit step function, usually denoted by or (but sometimes , or ), is a step function, named after Oliver Heaviside (1850–1925), the value of which is zero for negative arguments and one for positive argume ...
translated by the mean \mu, namely :F(x) = \begin 0 & \textx < \mu \\ 1 & \textx \geq \mu \end


Maximum entropy

Of all probability distributions over the reals with a specified mean \mu and variance \sigma^2, the normal distribution N(\mu,\sigma^2) is the one with maximum entropy. If X is a
continuous random variable In probability theory and statistics, a probability distribution is the mathematical function that gives the probabilities of occurrence of different possible outcomes for an experiment. It is a mathematical description of a random phenomenon i ...
with
probability density In probability theory, a probability density function (PDF), or density of a continuous random variable, is a function whose value at any given sample (or point) in the sample space (the set of possible values taken by the random variable) can ...
f(x), then the entropy of X is defined as : H(X) = - \int_^\infty f(x)\log f(x)\, dx where f(x)\log f(x) is understood to be zero whenever f(x)=0. This functional can be maximized, subject to the constraints that the distribution is properly normalized and has a specified variance, by using
variational calculus The calculus of variations (or Variational Calculus) is a field of mathematical analysis that uses variations, which are small changes in functions and functionals, to find maxima and minima of functionals: mappings from a set of functions t ...
. A function with two
Lagrange multipliers In mathematical optimization, the method of Lagrange multipliers is a strategy for finding the local maxima and minima of a function subject to equality constraints (i.e., subject to the condition that one or more equations have to be satisfied ex ...
is defined: : L=\int_^\infty f(x)\ln(f(x))\,dx-\lambda_0\left(1-\int_^\infty f(x)\,dx\right)-\lambda\left(\sigma^2-\int_^\infty f(x)(x-\mu)^2\,dx\right) where f(x) is, for now, regarded as some density function with mean \mu and standard deviation \sigma. At maximum entropy, a small variation \delta f(x) about f(x) will produce a variation \delta L about L which is equal to 0: : 0=\delta L=\int_^\infty \delta f(x)\left (\ln(f(x))+1+\lambda_0+\lambda(x-\mu)^2\right )\,dx Since this must hold for any small \delta f(x), the term in brackets must be zero, and solving for f(x) yields: :f(x)=e^ Using the constraint equations to solve for \lambda_0 and \lambda yields the density of the normal distribution: : f(x, \mu, \sigma)=\frace^ The entropy of a normal distribution is equal to : H(X)=\tfrac(1+\log(2\sigma^2\pi))


Other properties


Related distributions


Central limit theorem

The central limit theorem states that under certain (fairly common) conditions, the sum of many random variables will have an approximately normal distribution. More specifically, where X_1,\ldots ,X_n are
independent and identically distributed In probability theory and statistics, a collection of random variables is independent and identically distributed if each random variable has the same probability distribution as the others and all are mutually independent. This property is usua ...
random variables with the same arbitrary distribution, zero mean, and variance \sigma^2 and Z is their mean scaled by \sqrt : Z = \sqrt\left(\frac\sum_^n X_i\right) Then, as n increases, the probability distribution of Z will tend to the normal distribution with zero mean and variance \sigma^2. The theorem can be extended to variables (X_i) that are not independent and/or not identically distributed if certain constraints are placed on the degree of dependence and the moments of the distributions. Many
test statistic A test statistic is a statistic (a quantity derived from the sample) used in statistical hypothesis testing.Berger, R. L.; Casella, G. (2001). ''Statistical Inference'', Duxbury Press, Second Edition (p.374) A hypothesis test is typically specif ...
s, scores, and
estimator In statistics, an estimator is a rule for calculating an estimate of a given quantity based on observed data: thus the rule (the estimator), the quantity of interest (the estimand) and its result (the estimate) are distinguished. For example, the ...
s encountered in practice contain sums of certain random variables in 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 distributions. The central limit theorem also implies that certain distributions can be approximated by the normal distribution, for example: * The
binomial distribution In probability theory and statistics, the binomial distribution with parameters ''n'' and ''p'' is the discrete probability distribution of the number of successes in a sequence of ''n'' independent experiments, each asking a yes–no quest ...
B(n,p) is approximately normal with mean np and variance np(1-p) for large n and for p not too close to 0 or 1. * The
Poisson distribution In probability theory and statistics, the Poisson distribution is a discrete probability distribution that expresses the probability of a given number of events occurring in a fixed interval of time or space if these events occur with a known co ...
with parameter \lambda is approximately normal with mean \lambda and variance \lambda, for large values of \lambda. * The
chi-squared distribution In probability theory and statistics, the chi-squared distribution (also chi-square or \chi^2-distribution) with k degrees of freedom is the distribution of a sum of the squares of k independent standard normal random variables. The chi-squa ...
\chi^2(k) is approximately normal with mean k and variance 2k, for large k. * The
Student's t-distribution In probability and statistics, Student's ''t''-distribution (or simply the ''t''-distribution) is any member of a family of continuous probability distributions that arise when estimating the mean of a normally distributed population in sit ...
t(\nu) is approximately normal with mean 0 and variance 1 when \nu is large. Whether these approximations are sufficiently accurate depends on the purpose for which they are needed, and the rate of convergence to the normal distribution. It is typically the case that such approximations are less accurate in the tails of the distribution. A general upper bound for the approximation error in the central limit theorem is given by the
Berry–Esseen theorem In probability theory, the central limit theorem states that, under certain circumstances, the probability distribution of the scaled mean of a random sample converges to a normal distribution as the sample size increases to infinity. Under strong ...
, improvements of the approximation are given by the
Edgeworth expansion The Gram–Charlier A series (named in honor of Jørgen Pedersen Gram and Carl Charlier), and the Edgeworth series (named in honor of Francis Ysidro Edgeworth) are series that approximate a probability distribution in terms of its cumulants. The se ...
s. This theorem can also be used to justify modeling the sum of many uniform noise sources as
Gaussian noise Gaussian noise, named after Carl Friedrich Gauss, is a term from signal processing theory denoting a kind of signal noise that has a probability density function (pdf) equal to that of the normal distribution (which is also known as the Gaussia ...
. See
AWGN Additive white Gaussian noise (AWGN) is a basic noise model used in information theory to mimic the effect of many random processes that occur in nature. The modifiers denote specific characteristics: * ''Additive'' because it is added to any nois ...
.


Operations and functions of normal variables

The
probability density In probability theory, a probability density function (PDF), or density of a continuous random variable, is a function whose value at any given sample (or point) in the sample space (the set of possible values taken by the random variable) can ...
,
cumulative distribution In statistics, the frequency (or absolute frequency) of an event i is the number n_i of times the observation has occurred/recorded in an experiment or study. These frequencies are often depicted graphically or in tabular form. Types The cumul ...
, and inverse cumulative distribution of any function of one or more independent or correlated normal variables can be computed with the numerical method of ray-tracing
Matlab code
. In the following sections we look at some special cases.


Operations on a single normal variable

If X is distributed normally with mean \mu and variance \sigma^2, then * aX+b, for any real numbers a and b, is also normally distributed, with mean a\mu+b and standard deviation , a, \sigma. That is, the family of normal distributions is closed under linear transformations. * The exponential of X is distributed log-normally: . * The absolute value of X has
folded normal distribution The folded normal distribution is a probability distribution related to the normal distribution. Given a normally distributed random variable ''X'' with mean ''μ'' and variance ''σ''2, the random variable ''Y'' = , ''X'', has a folded normal d ...
: . If \mu = 0 this is known as the
half-normal distribution In probability theory and statistics, the half-normal distribution is a special case of the folded normal distribution. Let X follow an ordinary normal distribution, N(0,\sigma^2). Then, Y=, X, follows a half-normal distribution. Thus, the hal ...
. * The absolute value of normalized residuals, , ''X'' − ''μ'', /''σ'', has
chi distribution In probability theory and statistics, the chi distribution is a continuous probability distribution. It is the distribution of the positive square root of the sum of squares of a set of independent random variables each following a standard norm ...
with one degree of freedom: , X - \mu, / \sigma \sim \chi_1. * The square of ''X''/''σ'' has the
noncentral chi-squared distribution In probability theory and statistics, the noncentral chi-squared distribution (or noncentral chi-square distribution, noncentral \chi^2 distribution) is a noncentral generalization of the chi-squared distribution. It often arises in the power a ...
with one degree of freedom: X^2 / \sigma^2 \sim \chi_1^2(\mu^2 / \sigma^2). If \mu = 0, the distribution is called simply chi-squared. * The log likelihood of a normal variable x is simply the log of its
probability density function In probability theory, a probability density function (PDF), or density of a continuous random variable, is a function whose value at any given sample (or point) in the sample space (the set of possible values taken by the random variable) can ...
: \ln p(x)= -\frac \left(\frac \right)^2 -\ln \left(\sigma \sqrt \right) = -\frac z^2 -\ln \left(\sigma \sqrt \right). Since this is a scaled and shifted square of a standard normal variable, it is distributed as a scaled and shifted chi-squared variable. * The distribution of the variable ''X'' restricted to an interval 'a'', ''b''is called the
truncated normal distribution In probability and statistics, the truncated normal distribution is the probability distribution derived from that of a normally distributed random variable by bounding the random variable from either below or above (or both). The truncated no ...
. * (''X'' − ''μ'')−2 has a
Lévy distribution In probability theory and statistics, the Lévy distribution, named after Paul Lévy, is a continuous probability distribution for a non-negative random variable. In spectroscopy, this distribution, with frequency as the dependent variable, is kn ...
with location 0 and scale ''σ''−2.


= Operations on two independent normal variables

= * If X_1 and X_2 are two
independent Independent or Independents may refer to: Arts, entertainment, and media Artist groups * Independents (artist group), a group of modernist painters based in the New Hope, Pennsylvania, area of the United States during the early 1930s * Independ ...
normal random variables, with means \mu_1, \mu_2 and standard deviations \sigma_1, \sigma_2, then their sum X_1 + X_2 will also be normally distributed, roof/sup> with mean \mu_1 + \mu_2 and variance \sigma_1^2 + \sigma_2^2. * In particular, if X and Y are independent normal deviates with zero mean and variance \sigma^2, then X + Y and X - Y are also independent and normally distributed, with zero mean and variance 2\sigma^2. This is a special case of the
polarization identity In linear algebra, a branch of mathematics, the polarization identity is any one of a family of formulas that express the inner product of two vectors in terms of the norm of a normed vector space. If a norm arises from an inner product then t ...
. * If X_1, X_2 are two independent normal deviates with mean \mu and deviation \sigma, and a, b are arbitrary real numbers, then the variable X_3 = \frac + \mu is also normally distributed with mean \mu and deviation \sigma. It follows that the normal distribution is
stable A stable is a building in which livestock, especially horses, are kept. It most commonly means a building that is divided into separate stalls for individual animals and livestock. There are many different types of stables in use today; the ...
(with exponent \alpha=2).


= Operations on two independent standard normal variables

= If X_1 and X_2 are two independent standard normal random variables with mean 0 and variance 1, then * Their sum and difference is distributed normally with mean zero and variance two: X_1 \pm X_2 \sim N(0, 2). * Their product Z = X_1 X_2 follows the
product distribution A product distribution is a probability distribution constructed as the distribution of the product of random variables having two other known distributions. Given two statistically independent random variables ''X'' and ''Y'', the distribution of ...
with density function f_Z(z) = \pi^ K_0(, z, ) where K_0 is the
modified Bessel function of the second kind Bessel functions, first defined by the mathematician Daniel Bernoulli and then generalized by Friedrich Bessel, are canonical solutions of Bessel's differential equation x^2 \frac + x \frac + \left(x^2 - \alpha^2 \right)y = 0 for an arbitrary ...
. This distribution is symmetric around zero, unbounded at z = 0, and has the
characteristic function In mathematics, the term "characteristic function" can refer to any of several distinct concepts: * The indicator function of a subset, that is the function ::\mathbf_A\colon X \to \, :which for a given subset ''A'' of ''X'', has value 1 at points ...
\phi_Z(t) = (1 + t^2)^. * Their ratio follows the standard
Cauchy distribution The Cauchy distribution, named after Augustin Cauchy, is a continuous probability distribution. It is also known, especially among physicists, as the Lorentz distribution (after Hendrik Lorentz), Cauchy–Lorentz distribution, Lorentz(ian) fun ...
: X_1/ X_2 \sim \operatorname(0, 1). * Their Euclidean norm \sqrt has the
Rayleigh distribution In probability theory and statistics, the Rayleigh distribution is a continuous probability distribution for nonnegative-valued random variables. Up to rescaling, it coincides with the chi distribution with two degrees of freedom. The distribut ...
.


Operations on multiple independent normal variables

* Any linear combination of independent normal deviates is a normal deviate. * If X_1, X_2, \ldots, X_n are independent standard normal random variables, then the sum of their squares has the
chi-squared distribution In probability theory and statistics, the chi-squared distribution (also chi-square or \chi^2-distribution) with k degrees of freedom is the distribution of a sum of the squares of k independent standard normal random variables. The chi-squa ...
with n degrees of freedom X_1^2 + \cdots + X_n^2 \sim \chi_n^2. * If X_1, X_2, \ldots, X_n are independent normally distributed random variables with means \mu and variances \sigma^2, then their
sample mean The sample mean (or "empirical mean") and the sample covariance are statistics computed from a Sample (statistics), sample of data on one or more random variables. The sample mean is the average value (or mean, mean value) of a sample (statistic ...
is independent from the sample
standard deviation In statistics, the standard deviation is a measure of the amount of variation or dispersion of a set of values. A low standard deviation indicates that the values tend to be close to the mean (also called the expected value) of the set, while ...
, which can be demonstrated using Basu's theorem or
Cochran's theorem In statistics, Cochran's theorem, devised by William G. Cochran, is a theorem used to justify results relating to the probability distributions of statistics that are used in the analysis of variance. Statement Let ''U''1, ..., ''U'N'' be i.i. ...
. The ratio of these two quantities will have the
Student's t-distribution In probability and statistics, Student's ''t''-distribution (or simply the ''t''-distribution) is any member of a family of continuous probability distributions that arise when estimating the mean of a normally distributed population in sit ...
with n-1 degrees of freedom: t = \frac = \frac \sim t_. * If X_1, X_2, \ldots, X_n, Y_1, Y_2, \ldots, Y_m are independent standard normal random variables, then the ratio of their normalized sums of squares will have the with degrees of freedom: F = \frac \sim F_.


Operations on multiple correlated normal variables

* A
quadratic form In mathematics, a quadratic form is a polynomial with terms all of degree two ("form" is another name for a homogeneous polynomial). For example, :4x^2 + 2xy - 3y^2 is a quadratic form in the variables and . The coefficients usually belong to a ...
of a normal vector, i.e. a quadratic function q = \sum x_i^2 + \sum x_j + c of multiple independent or correlated normal variables, is a generalized chi-square variable.


Operations on the density function

The split normal distribution is most directly defined in terms of joining scaled sections of the density functions of different normal distributions and rescaling the density to integrate to one. The
truncated normal distribution In probability and statistics, the truncated normal distribution is the probability distribution derived from that of a normally distributed random variable by bounding the random variable from either below or above (or both). The truncated no ...
results from rescaling a section of a single density function.


Infinite divisibility and Cramér's theorem

For any positive integer \text, any normal distribution with mean \mu and variance \sigma^2 is the distribution of the sum of \text independent normal deviates, each with mean \frac and variance \frac. This property is called
infinite divisibility Infinite divisibility arises in different ways in philosophy, physics, economics, order theory (a branch of mathematics), and probability theory (also a branch of mathematics). One may speak of infinite divisibility, or the lack thereof, of matter ...
. Conversely, if X_1 and X_2 are independent random variables and their sum X_1+X_2 has a normal distribution, then both X_1 and X_2 must be normal deviates. This result is known as Cramér's decomposition theorem, and is equivalent to saying that the convolution of two distributions is normal if and only if both are normal. Cramér's theorem implies that a linear combination of independent non-Gaussian variables will never have an exactly normal distribution, although it may approach it arbitrarily closely.


Bernstein's theorem

Bernstein's theorem states that if X and Y are independent and X + Y and X - Y are also independent, then both ''X'' and ''Y'' must necessarily have normal distributions. More generally, if X_1, \ldots, X_n are independent random variables, then two distinct linear combinations \sum and \sumwill be independent if and only if all X_k are normal and \sum, where \sigma_k^2 denotes the variance of X_k.


Extensions

The notion of normal distribution, being one of the most important distributions in probability theory, has been extended far beyond the standard framework of the univariate (that is one-dimensional) case (Case 1). All these extensions are also called ''normal'' or ''Gaussian'' laws, so a certain ambiguity in names exists. * The
multivariate normal distribution In probability theory and statistics, the multivariate normal distribution, multivariate Gaussian distribution, or joint normal distribution is a generalization of the one-dimensional (univariate) normal distribution to higher dimensions. One d ...
describes the Gaussian law in the ''k''-dimensional Euclidean space. A vector is multivariate-normally distributed if any linear combination of its components has a (univariate) normal distribution. The variance of ''X'' is a ''k×k'' symmetric positive-definite matrix ''V''. The multivariate normal distribution is a special case of the
elliptical distribution In probability and statistics, an elliptical distribution is any member of a broad family of probability distributions that generalize the multivariate normal distribution. Intuitively, in the simplified two and three dimensional case, the joint di ...
s. As such, its iso-density loci in the ''k'' = 2 case are ellipses and in the case of arbitrary ''k'' are ellipsoids. * Rectified Gaussian distribution a rectified version of normal distribution with all the negative elements reset to 0 * Complex normal distribution deals with the complex normal vectors. A complex vector is said to be normal if both its real and imaginary components jointly possess a 2''k''-dimensional multivariate normal distribution. The variance-covariance structure of ''X'' is described by two matrices: the ''variance'' matrix Γ, and the ''relation'' matrix ''C''. * Matrix normal distribution describes the case of normally distributed matrices. * Gaussian processes are the normally distributed stochastic processes. These can be viewed as elements of some infinite-dimensional Hilbert space ''H'', and thus are the analogues of multivariate normal vectors for the case . A random element is said to be normal if for any constant the scalar product has a (univariate) normal distribution. The variance structure of such Gaussian random element can be described in terms of the linear ''covariance ''. Several Gaussian processes became popular enough to have their own names: ** Wiener process, Brownian motion, ** Brownian bridge, ** Ornstein–Uhlenbeck process. * Gaussian q-distribution is an abstract mathematical construction that represents a "q-analogue" of the normal distribution. * the q-Gaussian is an analogue of the Gaussian distribution, in the sense that it maximises the Tsallis entropy, and is one type of Tsallis distribution. Note that this distribution is different from the Gaussian q-distribution above. * The Kaniadakis Gaussian distribution, Kaniadakis ''κ''-Gaussian distribution is a generalization of the Gaussian distribution which arises from the Kaniadakis statistics, being one of the Kaniadakis distribution, Kaniadakis distributions. A random variable ''X'' has a two-piece normal distribution if it has a distribution : f_X( x ) = N( \mu, \sigma_1^2 ) \text x \le \mu : f_X( x ) = N( \mu, \sigma_2^2 ) \text x \ge \mu where ''μ'' is the mean and ''σ''1 and ''σ''2 are the standard deviations of the distribution to the left and right of the mean respectively. The mean, variance and third central moment of this distribution have been determined : \operatorname( X ) = \mu + \sqrt ( \sigma_2 - \sigma_1 ) : \operatorname( X ) = \left( 1 - \frac 2 \pi\right)( \sigma_2 - \sigma_1 )^2 + \sigma_1 \sigma_2 : \operatorname( X ) = \sqrt( \sigma_2 - \sigma_1 ) \left[ \left( \frac 4 \pi - 1 \right) ( \sigma_2 - \sigma_1)^2 + \sigma_1 \sigma_2 \right] where E(''X''), V(''X'') and T(''X'') are the mean, variance, and third central moment respectively. One of the main practical uses of the Gaussian law is to model the empirical distributions of many different random variables encountered in practice. In such case a possible extension would be a richer family of distributions, having more than two parameters and therefore being able to fit the empirical distribution more accurately. The examples of such extensions are: * Pearson distribution — a four-parameter family of probability distributions that extend the normal law to include different skewness and kurtosis values. * The generalized normal distribution, also known as the exponential power distribution, allows for distribution tails with thicker or thinner asymptotic behaviors.


Statistical inference


Estimation of parameters

It is often the case that we do not know the parameters of the normal distribution, but instead want to Estimation theory, estimate them. That is, having a sample (x_1, \ldots, x_n) from a normal N(\mu, \sigma^2) population we would like to learn the approximate values of parameters \mu and \sigma^2. The standard approach to this problem is the maximum likelihood method, which requires maximization of the ''log-likelihood function'': : \ln\mathcal(\mu,\sigma^2) = \sum_^n \ln f(x_i\mid\mu,\sigma^2) = -\frac\ln(2\pi) - \frac\ln\sigma^2 - \frac\sum_^n (x_i-\mu)^2. Taking derivatives with respect to \mu and \sigma^2 and solving the resulting system of first order conditions yields the ''maximum likelihood estimates'': : \hat = \overline \equiv \frac\sum_^n x_i, \qquad \hat^2 = \frac \sum_^n (x_i - \overline)^2.


Sample mean

Estimator \textstyle\hat\mu is called the ''
sample mean The sample mean (or "empirical mean") and the sample covariance are statistics computed from a Sample (statistics), sample of data on one or more random variables. The sample mean is the average value (or mean, mean value) of a sample (statistic ...
'', since it is the arithmetic mean of all observations. The statistic \textstyle\overline is complete statistic, complete and sufficient statistic, sufficient for \mu, and therefore by the Lehmann–Scheffé theorem, \textstyle\hat\mu is the uniformly minimum variance unbiased (UMVU) estimator. In finite samples it is distributed normally: : \hat\mu \sim \mathcal(\mu,\sigma^2/n). The variance of this estimator is equal to the ''μμ''-element of the inverse Fisher information matrix \textstyle\mathcal^. This implies that the estimator is efficient estimator, finite-sample efficient. Of practical importance is the fact that the standard error (statistics), standard error of \textstyle\hat\mu is proportional to \textstyle1/\sqrt, that is, if one wishes to decrease the standard error by a factor of 10, one must increase the number of points in the sample by a factor of 100. This fact is widely used in determining sample sizes for opinion polls and the number of trials in Monte Carlo simulations. From the standpoint of the asymptotic theory (statistics), asymptotic theory, \textstyle\hat\mu is consistent estimator, consistent, that is, it convergence in probability, converges in probability to \mu as n\rightarrow\infty. The estimator is also asymptotic normality, asymptotically normal, which is a simple corollary of the fact that it is normal in finite samples: : \sqrt(\hat\mu-\mu) \,\xrightarrow\, \mathcal(0,\sigma^2).


Sample variance

The estimator \textstyle\hat\sigma^2 is called the ''sample variance'', since it is the variance of the sample ((x_1, \ldots, x_n)). In practice, another estimator is often used instead of the \textstyle\hat\sigma^2. This other estimator is denoted s^2, and is also called the ''sample variance'', which represents a certain ambiguity in terminology; its square root s is called the ''sample standard deviation''. The estimator s^2 differs from \textstyle\hat\sigma^2 by having instead of ''n'' in the denominator (the so-called Bessel's correction): : s^2 = \frac \hat\sigma^2 = \frac \sum_^n (x_i - \overline)^2. The difference between s^2 and \textstyle\hat\sigma^2 becomes negligibly small for large ''n''s. In finite samples however, the motivation behind the use of s^2 is that it is an unbiased estimator of the underlying parameter \sigma^2, whereas \textstyle\hat\sigma^2 is biased. Also, by the Lehmann–Scheffé theorem the estimator s^2 is uniformly minimum variance unbiased (Minimum-variance unbiased estimator, UMVU), which makes it the "best" estimator among all unbiased ones. However it can be shown that the biased estimator \textstyle\hat\sigma^2 is "better" than the s^2 in terms of the mean squared error (MSE) criterion. In finite samples both s^2 and \textstyle\hat\sigma^2 have scaled
chi-squared distribution In probability theory and statistics, the chi-squared distribution (also chi-square or \chi^2-distribution) with k degrees of freedom is the distribution of a sum of the squares of k independent standard normal random variables. The chi-squa ...
with degrees of freedom: : s^2 \sim \frac \cdot \chi^2_, \qquad \hat\sigma^2 \sim \frac \cdot \chi^2_. The first of these expressions shows that the variance of s^2 is equal to 2\sigma^4/(n-1), which is slightly greater than the ''σσ''-element of the inverse Fisher information matrix \textstyle\mathcal^. Thus, s^2 is not an efficient estimator for \sigma^2, and moreover, since s^2 is UMVU, we can conclude that the finite-sample efficient estimator for \sigma^2 does not exist. Applying the asymptotic theory, both estimators s^2 and \textstyle\hat\sigma^2 are consistent, that is they converge in probability to \sigma^2 as the sample size n\rightarrow\infty. The two estimators are also both asymptotically normal: : \sqrt(\hat\sigma^2 - \sigma^2) \simeq \sqrt(s^2-\sigma^2) \,\xrightarrow\, \mathcal(0,2\sigma^4). In particular, both estimators are asymptotically efficient for \sigma^2.


Confidence intervals

By
Cochran's theorem In statistics, Cochran's theorem, devised by William G. Cochran, is a theorem used to justify results relating to the probability distributions of statistics that are used in the analysis of variance. Statement Let ''U''1, ..., ''U'N'' be i.i. ...
, for normal distributions the sample mean \textstyle\hat\mu and the sample variance ''s''2 are
independent Independent or Independents may refer to: Arts, entertainment, and media Artist groups * Independents (artist group), a group of modernist painters based in the New Hope, Pennsylvania, area of the United States during the early 1930s * Independ ...
, which means there can be no gain in considering their joint distribution. There is also a converse theorem: if in a sample the sample mean and sample variance are independent, then the sample must have come from the normal distribution. The independence between \textstyle\hat\mu and ''s'' can be employed to construct the so-called ''t-statistic'': : t = \frac = \frac \sim t_ This quantity ''t'' has the
Student's t-distribution In probability and statistics, Student's ''t''-distribution (or simply the ''t''-distribution) is any member of a family of continuous probability distributions that arise when estimating the mean of a normally distributed population in sit ...
with degrees of freedom, and it is an ancillary statistic (independent of the value of the parameters). Inverting the distribution of this ''t''-statistics will allow us to construct the
confidence interval In frequentist statistics, a confidence interval (CI) is a range of estimates for an unknown parameter. A confidence interval is computed at a designated ''confidence level''; the 95% confidence level is most common, but other levels, such as 9 ...
for ''μ''; similarly, inverting the ''χ''2 distribution of the statistic ''s''2 will give us the confidence interval for ''σ''2: :\mu \in \left[ \hat\mu - t_ \fracs, \hat\mu + t_ \fracs \right], :\sigma^2 \in \left[ \frac, \frac \right], where ''tk,p'' and are the ''p''th
quantile In statistics and probability, quantiles are cut points dividing the range of a probability distribution into continuous intervals with equal probabilities, or dividing the observations in a sample in the same way. There is one fewer quantile tha ...
s of the ''t''- and ''χ''2-distributions respectively. These confidence intervals are of the ''confidence level'' , meaning that the true values ''μ'' and ''σ''2 fall outside of these intervals with probability (or significance level) ''α''. In practice people usually take , resulting in the 95% confidence intervals. Approximate formulas can be derived from the asymptotic distributions of \textstyle\hat\mu and ''s''2: :\mu \in \left[ \hat\mu - , z_, \fracs, \hat\mu + , z_, \fracs \right], :\sigma^2 \in \left[ s^2 - , z_, \fracs^2, s^2 + , z_, \fracs^2 \right], The approximate formulas become valid for large values of ''n'', and are more convenient for the manual calculation since the standard normal quantiles ''z''''α''/2 do not depend on ''n''. In particular, the most popular value of , results in .


Normality tests

Normality tests assess the likelihood that the given data set comes from a normal distribution. Typically the null hypothesis ''H''0 is that the observations are distributed normally with unspecified mean ''μ'' and variance ''σ''2, versus the alternative ''Ha'' that the distribution is arbitrary. Many tests (over 40) have been devised for this problem. The more prominent of them are outlined below: Diagnostic plots are more intuitively appealing but subjective at the same time, as they rely on informal human judgement to accept or reject the null hypothesis. *
Q–Q plot In statistics, a Q–Q plot (quantile-quantile plot) is a probability plot, a List of graphical methods, graphical method for comparing two probability distributions by plotting their ''quantiles'' against each other. A point on the plot co ...
, also known as normal probability plot or rankit plot—is a plot of the sorted values from the data set against the expected values of the corresponding quantiles from the standard normal distribution. That is, it's a plot of point of the form (Φ−1(''pk''), ''x''(''k'')), where plotting points ''pk'' are equal to ''pk'' = (''k'' − ''α'')/(''n'' + 1 − 2''α'') and ''α'' is an adjustment constant, which can be anything between 0 and 1. If the null hypothesis is true, the plotted points should approximately lie on a straight line. * P–P plot – similar to the Q–Q plot, but used much less frequently. This method consists of plotting the points (Φ(''z''(''k'')), ''pk''), where \textstyle z_ = (x_-\hat\mu)/\hat\sigma. For normally distributed data this plot should lie on a 45° line between (0, 0) and (1, 1). Goodness-of-fit tests: ''Moment-based tests'': * D'Agostino's K-squared test * Jarque–Bera test * Shapiro–Wilk test: This is based on the fact that the line in the Q–Q plot has the slope of ''σ''. The test compares the least squares estimate of that slope with the value of the sample variance, and rejects the null hypothesis if these two quantities differ significantly. ''Tests based on the empirical distribution function'': * Anderson–Darling test * Lilliefors test (an adaptation of the Kolmogorov–Smirnov test)


Bayesian analysis of the normal distribution

Bayesian analysis of normally distributed data is complicated by the many different possibilities that may be considered: * Either the mean, or the variance, or neither, may be considered a fixed quantity. * When the variance is unknown, analysis may be done directly in terms of the variance, or in terms of the
precision Precision, precise or precisely may refer to: Science, and technology, and mathematics Mathematics and computing (general) * Accuracy and precision, measurement deviation from true value and its scatter * Significant figures, the number of digit ...
, the reciprocal of the variance. The reason for expressing the formulas in terms of precision is that the analysis of most cases is simplified. * Both univariate and multivariate normal distribution, multivariate cases need to be considered. * Either conjugate prior, conjugate or improper prior, improper prior distributions may be placed on the unknown variables. * An additional set of cases occurs in Bayesian linear regression, where in the basic model the data is assumed to be normally distributed, and normal priors are placed on the regression coefficients. The resulting analysis is similar to the basic cases of independent identically distributed data. The formulas for the non-linear-regression cases are summarized in the conjugate prior article.


Sum of two quadratics


= Scalar form

= The following auxiliary formula is useful for simplifying the posterior distribution, posterior update equations, which otherwise become fairly tedious. :a(x-y)^2 + b(x-z)^2 = (a + b)\left(x - \frac\right)^2 + \frac(y-z)^2 This equation rewrites the sum of two quadratics in ''x'' by expanding the squares, grouping the terms in ''x'', and completing the square. Note the following about the complex constant factors attached to some of the terms: # The factor \frac has the form of a weighted average of ''y'' and ''z''. # \frac = \frac = (a^ + b^)^. This shows that this factor can be thought of as resulting from a situation where the Multiplicative inverse, reciprocals of quantities ''a'' and ''b'' add directly, so to combine ''a'' and ''b'' themselves, it's necessary to reciprocate, add, and reciprocate the result again to get back into the original units. This is exactly the sort of operation performed by the harmonic mean, so it is not surprising that \frac is one-half the harmonic mean of ''a'' and ''b''.


= Vector form

= A similar formula can be written for the sum of two vector quadratics: If x, y, z are vectors of length ''k'', and A and B are symmetric matrix, symmetric, invertible matrices of size k\times k, then : \begin & (\mathbf-\mathbf)'\mathbf(\mathbf-\mathbf) + (\mathbf-\mathbf)' \mathbf(\mathbf-\mathbf) \\ = & (\mathbf - \mathbf)'(\mathbf+\mathbf)(\mathbf - \mathbf) + (\mathbf - \mathbf)'(\mathbf^ + \mathbf^)^(\mathbf - \mathbf) \end where :\mathbf = (\mathbf + \mathbf)^(\mathbf\mathbf + \mathbf \mathbf) Note that the form x′ A x is called a
quadratic form In mathematics, a quadratic form is a polynomial with terms all of degree two ("form" is another name for a homogeneous polynomial). For example, :4x^2 + 2xy - 3y^2 is a quadratic form in the variables and . The coefficients usually belong to a ...
and is a scalar (mathematics), scalar: :\mathbf'\mathbf\mathbf = \sum_a_ x_i x_j In other words, it sums up all possible combinations of products of pairs of elements from x, with a separate coefficient for each. In addition, since x_i x_j = x_j x_i, only the sum a_ + a_ matters for any off-diagonal elements of A, and there is no loss of generality in assuming that A is symmetric matrix, symmetric. Furthermore, if A is symmetric, then the form \mathbf'\mathbf\mathbf = \mathbf'\mathbf\mathbf.


Sum of differences from the mean

Another useful formula is as follows: \sum_^n (x_i-\mu)^2 = \sum_^n (x_i-\bar)^2 + n(\bar -\mu)^2 where \bar = \frac \sum_^n x_i.


With known variance

For a set of i.i.d. normally distributed data points X of size ''n'' where each individual point ''x'' follows x \sim \mathcal(\mu, \sigma^2) with known
variance In probability theory and statistics, variance is the expectation of the squared deviation of a random variable from its population mean or sample mean. Variance is a measure of dispersion, meaning it is a measure of how far a set of numbers ...
σ2, the conjugate prior distribution is also normally distributed. This can be shown more easily by rewriting the variance as the
precision Precision, precise or precisely may refer to: Science, and technology, and mathematics Mathematics and computing (general) * Accuracy and precision, measurement deviation from true value and its scatter * Significant figures, the number of digit ...
, i.e. using τ = 1/σ2. Then if x \sim \mathcal(\mu, 1/\tau) and \mu \sim \mathcal(\mu_0, 1/\tau_0), we proceed as follows. First, the likelihood function is (using the formula above for the sum of differences from the mean): :\begin p(\mathbf\mid\mu,\tau) &= \prod_^n \sqrt \exp\left(-\frac\tau(x_i-\mu)^2\right) \\ &= \left(\frac\right)^ \exp\left(-\frac\tau \sum_^n (x_i-\mu)^2\right) \\ &= \left(\frac\right)^ \exp\left[-\frac\tau \left(\sum_^n(x_i-\bar)^2 + n(\bar -\mu)^2\right)\right]. \end Then, we proceed as follows: :\begin p(\mu\mid\mathbf) &\propto p(\mathbf\mid\mu) p(\mu) \\ & = \left(\frac\right)^ \exp\left[-\frac\tau \left(\sum_^n(x_i-\bar)^2 + n(\bar -\mu)^2\right)\right] \sqrt \exp\left(-\frac\tau_0(\mu-\mu_0)^2\right) \\ &\propto \exp\left(-\frac\left(\tau\left(\sum_^n(x_i-\bar)^2 + n(\bar -\mu)^2\right) + \tau_0(\mu-\mu_0)^2\right)\right) \\ &\propto \exp\left(-\frac \left(n\tau(\bar-\mu)^2 + \tau_0(\mu-\mu_0)^2 \right)\right) \\ &= \exp\left(-\frac(n\tau + \tau_0)\left(\mu - \dfrac\right)^2 + \frac(\bar - \mu_0)^2\right) \\ &\propto \exp\left(-\frac(n\tau + \tau_0)\left(\mu - \dfrac\right)^2\right) \end In the above derivation, we used the formula above for the sum of two quadratics and eliminated all constant factors not involving ''μ''. The result is the kernel (statistics), kernel of a normal distribution, with mean \frac and precision n\tau + \tau_0, i.e. :p(\mu\mid\mathbf) \sim \mathcal\left(\frac, \frac\right) This can be written as a set of Bayesian update equations for the posterior parameters in terms of the prior parameters: :\begin \tau_0' &= \tau_0 + n\tau \\[5pt] \mu_0' &= \frac \\[5pt] \bar &= \frac\sum_^n x_i \end That is, to combine ''n'' data points with total precision of ''nτ'' (or equivalently, total variance of ''n''/''σ''2) and mean of values \bar, derive a new total precision simply by adding the total precision of the data to the prior total precision, and form a new mean through a ''precision-weighted average'', i.e. a weighted average of the data mean and the prior mean, each weighted by the associated total precision. This makes logical sense if the precision is thought of as indicating the certainty of the observations: In the distribution of the posterior mean, each of the input components is weighted by its certainty, and the certainty of this distribution is the sum of the individual certainties. (For the intuition of this, compare the expression "the whole is (or is not) greater than the sum of its parts". In addition, consider that the knowledge of the posterior comes from a combination of the knowledge of the prior and likelihood, so it makes sense that we are more certain of it than of either of its components.) The above formula reveals why it is more convenient to do Bayesian analysis of conjugate priors for the normal distribution in terms of the precision. The posterior precision is simply the sum of the prior and likelihood precisions, and the posterior mean is computed through a precision-weighted average, as described above. The same formulas can be written in terms of variance by reciprocating all the precisions, yielding the more ugly formulas :\begin ' &= \frac \\[5pt] \mu_0' &= \frac \\[5pt] \bar &= \frac\sum_^n x_i \end


With known mean

For a set of i.i.d. normally distributed data points X of size ''n'' where each individual point ''x'' follows x \sim \mathcal(\mu, \sigma^2) with known mean μ, the conjugate prior of the
variance In probability theory and statistics, variance is the expectation of the squared deviation of a random variable from its population mean or sample mean. Variance is a measure of dispersion, meaning it is a measure of how far a set of numbers ...
has an inverse gamma distribution or a scaled inverse chi-squared distribution. The two are equivalent 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. The prior for σ2 is as follows: :p(\sigma^2\mid\nu_0,\sigma_0^2) = \frac~\frac \propto \frac The likelihood function from above, written in terms of the variance, is: :\begin p(\mathbf\mid\mu,\sigma^2) &= \left(\frac\right)^ \exp\left[-\frac \sum_^n (x_i-\mu)^2\right] \\ &= \left(\frac\right)^ \exp\left[-\frac\right] \end where :S = \sum_^n (x_i-\mu)^2. Then: :\begin p(\sigma^2\mid\mathbf) &\propto p(\mathbf\mid\sigma^2) p(\sigma^2) \\ &= \left(\frac\right)^ \exp\left[-\frac\right] \frac~\frac \\ &\propto \left(\frac\right)^ \frac \exp\left[-\frac + \frac\right] \\ &= \frac \exp\left[-\frac\right] \end The above is also a scaled inverse chi-squared distribution where :\begin \nu_0' &= \nu_0 + n \\ \nu_0'' &= \nu_0 \sigma_0^2 + \sum_^n (x_i-\mu)^2 \end or equivalently :\begin \nu_0' &= \nu_0 + n \\ ' &= \frac \end Reparameterizing in terms of an inverse gamma distribution, the result is: :\begin \alpha' &= \alpha + \frac \\ \beta' &= \beta + \frac \end


With unknown mean and unknown variance

For a set of i.i.d. normally distributed data points X of size ''n'' where each individual point ''x'' follows x \sim \mathcal(\mu, \sigma^2) with unknown mean μ and unknown
variance In probability theory and statistics, variance is the expectation of the squared deviation of a random variable from its population mean or sample mean. Variance is a measure of dispersion, meaning it is a measure of how far a set of numbers ...
σ2, a combined (multivariate) conjugate prior is placed over the mean and variance, consisting of a normal-inverse-gamma distribution. Logically, this originates as follows: # From the analysis of the case with unknown mean but known variance, we see that the update equations involve sufficient statistics computed from the data consisting of the mean of the data points and the total variance of the data points, computed in turn from the known variance divided by the number of data points. # From the analysis of the case with unknown variance but known mean, we see that the update equations involve sufficient statistics over the data consisting of the number of data points and sum of squared deviations. # Keep in mind that the posterior update values serve as the prior distribution when further data is handled. Thus, we should logically think of our priors in terms of the sufficient statistics just described, with the same semantics kept in mind as much as possible. # To handle the case where both mean and variance are unknown, we could place independent priors over the mean and variance, with fixed estimates of the average mean, total variance, number of data points used to compute the variance prior, and sum of squared deviations. Note however that in reality, the total variance of the mean depends on the unknown variance, and the sum of squared deviations that goes into the variance prior (appears to) depend on the unknown mean. In practice, the latter dependence is relatively unimportant: Shifting the actual mean shifts the generated points by an equal amount, and on average the squared deviations will remain the same. This is not the case, however, with the total variance of the mean: As the unknown variance increases, the total variance of the mean will increase proportionately, and we would like to capture this dependence. # This suggests that we create a ''conditional prior'' of the mean on the unknown variance, with a hyperparameter specifying the mean of the pseudo-observations associated with the prior, and another parameter specifying the number of pseudo-observations. This number serves as a scaling parameter on the variance, making it possible to control the overall variance of the mean relative to the actual variance parameter. The prior for the variance also has two hyperparameters, one specifying the sum of squared deviations of the pseudo-observations associated with the prior, and another specifying once again the number of pseudo-observations. Note that each of the priors has a hyperparameter specifying the number of pseudo-observations, and in each case this controls the relative variance of that prior. These are given as two separate hyperparameters so that the variance (aka the confidence) of the two priors can be controlled separately. # This leads immediately to the normal-inverse-gamma distribution, which is the product of the two distributions just defined, with conjugate priors used (an inverse gamma distribution over the variance, and a normal distribution over the mean, ''conditional'' on the variance) and with the same four parameters just defined. The priors are normally defined as follows: :\begin p(\mu\mid\sigma^2; \mu_0, n_0) &\sim \mathcal(\mu_0,\sigma^2/n_0) \\ p(\sigma^2; \nu_0,\sigma_0^2) &\sim I\chi^2(\nu_0,\sigma_0^2) = IG(\nu_0/2, \nu_0\sigma_0^2/2) \end The update equations can be derived, and look as follows: :\begin \bar &= \frac 1 n \sum_^n x_i \\ \mu_0' &= \frac \\ n_0' &= n_0 + n \\ \nu_0' &= \nu_0 + n \\ \nu_0'' &= \nu_0 \sigma_0^2 + \sum_^n (x_i-\bar)^2 + \frac(\mu_0 - \bar)^2 \end The respective numbers of pseudo-observations add the number of actual observations to them. The new mean hyperparameter is once again a weighted average, this time weighted by the relative numbers of observations. Finally, the update for \nu_0'' is similar to the case with known mean, but in this case the sum of squared deviations is taken with respect to the observed data mean rather than the true mean, and as a result a new "interaction term" needs to be added to take care of the additional error source stemming from the deviation between prior and data mean.


Occurrence and applications

The occurrence of normal distribution in practical problems can be loosely classified into four categories: # Exactly normal distributions; # Approximately normal laws, for example when such approximation is justified by the
central limit theorem In probability theory, the central limit theorem (CLT) establishes that, in many situations, when independent random variables are summed up, their properly normalized sum tends toward a normal distribution even if the original variables themselv ...
; and # Distributions modeled as normal – the normal distribution being the distribution with Principle of maximum entropy, maximum entropy for a given mean and variance. # Regression problems – the normal distribution being found after systematic effects have been modeled sufficiently well.


Exact normality

Certain quantities in physics are distributed normally, as was first demonstrated by James Clerk Maxwell. Examples of such quantities are: * Probability density function of a ground state in a quantum harmonic oscillator. * The position of a particle that experiences diffusion. If initially the particle is located at a specific point (that is its probability distribution is the Dirac delta function), then after time ''t'' its location is described by a normal distribution with variance ''t'', which satisfies the diffusion equation \frac f(x,t) = \frac \frac f(x,t). If the initial location is given by a certain density function g(x), then the density at time ''t'' is the convolution of ''g'' and the normal PDF.


Approximate normality

''Approximately'' normal distributions occur in many situations, as explained by the
central limit theorem In probability theory, the central limit theorem (CLT) establishes that, in many situations, when independent random variables are summed up, their properly normalized sum tends toward a normal distribution even if the original variables themselv ...
. When the outcome is produced by many small effects acting ''additively and independently'', its distribution will be close to normal. The normal approximation will not be valid if the effects act multiplicatively (instead of additively), or if there is a single external influence that has a considerably larger magnitude than the rest of the effects. * In counting problems, where the central limit theorem includes a discrete-to-continuum approximation and where Infinite divisibility, infinitely divisible and Indecomposable distribution, decomposable distributions are involved, such as ** binomial distribution, Binomial random variables, associated with binary response variables; ** Poisson distribution, Poisson random variables, associated with rare events; * Thermal radiation has a Bose–Einstein statistics, Bose–Einstein distribution on very short time scales, and a normal distribution on longer timescales due to the central limit theorem.


Assumed normality

There are statistical methods to empirically test that assumption; see the above #Normality tests, Normality tests section. * In biology, the ''logarithm'' of various variables tend to have a normal distribution, that is, they tend to have a
log-normal distribution In probability theory, a log-normal (or lognormal) distribution is a continuous probability distribution of a random variable whose logarithm is normally distributed. Thus, if the random variable is log-normally distributed, then has a normal ...
(after separation on male/female subpopulations), with examples including: ** Measures of size of living tissue (length, height, skin area, weight); ** The ''length'' of ''inert'' appendages (hair, claws, nails, teeth) of biological specimens, ''in the direction of growth''; presumably the thickness of tree bark also falls under this category; ** Certain physiological measurements, such as blood pressure of adult humans. * In finance, in particular the Black–Scholes model, changes in the ''logarithm'' of exchange rates, price indices, and stock market indices are assumed normal (these variables behave like compound interest, not like simple interest, and so are multiplicative). Some mathematicians such as Benoit Mandelbrot have argued that Levy skew alpha-stable distribution, log-Levy distributions, which possesses heavy tails would be a more appropriate model, in particular for the analysis for stock market crashes. The use of the assumption of normal distribution occurring in financial models has also been criticized by Nassim Nicholas Taleb in his works. * Propagation of uncertainty, Measurement errors in physical experiments are often modeled by a normal distribution. This use of a normal distribution does not imply that one is assuming the measurement errors are normally distributed, rather using the normal distribution produces the most conservative predictions possible given only knowledge about the mean and variance of the errors. * In Standardized testing (statistics), standardized testing, results can be made to have a normal distribution by either selecting the number and difficulty of questions (as in the Intelligence quotient, IQ test) or transforming the raw test scores into "output" scores by fitting them to the normal distribution. For example, the SAT's traditional range of 200–800 is based on a normal distribution with a mean of 500 and a standard deviation of 100. * Many scores are derived from the normal distribution, including percentile ranks ("percentiles" or "quantiles"), normal curve equivalents, stanines, Standard score, z-scores, and T-scores. Additionally, some behavioral statistical procedures assume that scores are normally distributed; for example, Student's t-test, t-tests and Analysis of variance, ANOVAs. Bell curve grading assigns relative grades based on a normal distribution of scores. * In hydrology the distribution of long duration river discharge or rainfall, e.g. monthly and yearly totals, is often thought to be practically normal according to the
central limit theorem In probability theory, the central limit theorem (CLT) establishes that, in many situations, when independent random variables are summed up, their properly normalized sum tends toward a normal distribution even if the original variables themselv ...
. The blue picture, made with CumFreq, illustrates an example of fitting the normal distribution to ranked October rainfalls showing the 90% confidence belt based on the
binomial distribution In probability theory and statistics, the binomial distribution with parameters ''n'' and ''p'' is the discrete probability distribution of the number of successes in a sequence of ''n'' independent experiments, each asking a yes–no quest ...
. The rainfall data are represented by plotting positions as part of the cumulative frequency analysis.


Methodological problems and peer review

John Ioannidis argues that using normally distributed standard deviations as standards for validating research findings leave falsifiability, falsifiable predictions about phenomena that are not normally distributed untested. This includes, for example, phenomena that only appear when all necessary conditions are present and one cannot be a substitute for another in an addition-like way and phenomena that are not randomly distributed. Ioannidis argues that standard deviation-centered validation gives a false appearance of validity to hypotheses and theories where some but not all falsifiable predictions are normally distributed since the portion of falsifiable predictions that there is evidence against may and in some cases are in the non-normally distributed parts of the range of falsifiable predictions, as well as baselessly dismissing hypotheses for which none of the falsifiable predictions are normally distributed as if were they unfalsifiable when in fact they do make falsifiable predictions. It is argued by Ioannidis that many cases of mutually exclusive theories being accepted as "validated" by research journals are caused by failure of the journals to take in empirical falsifications of non-normally distributed predictions, and not because mutually exclusive theories are true, which they cannot be, although two mutually exclusive theories can both be wrong and a third one correct.


Computational methods


Generating values from normal distribution

In computer simulations, especially in applications of the Monte-Carlo method, it is often desirable to generate values that are normally distributed. The algorithms listed below all generate the standard normal deviates, since a can be generated as , where ''Z'' is standard normal. All these algorithms rely on the availability of a random number generator ''U'' capable of producing Uniform distribution (continuous), uniform random variates. * The most straightforward method is based on the probability integral transform property: if ''U'' is distributed uniformly on (0,1), then Φ−1(''U'') will have the standard normal distribution. The drawback of this method is that it relies on calculation of the
probit function In probability theory and statistics, the probit function is the quantile function associated with the standard normal distribution. It has applications in data analysis and machine learning, in particular exploratory statistical graphics and ...
Φ−1, which cannot be done analytically. Some approximate methods are described in and in the error function, erf article. Wichura gives a fast algorithm for computing this function to 16 decimal places, which is used by R programming language, R to compute random variates of the normal distribution. * Irwin–Hall distribution#Approximating a Normal distribution, An easy-to-program approximate approach that relies on the
central limit theorem In probability theory, the central limit theorem (CLT) establishes that, in many situations, when independent random variables are summed up, their properly normalized sum tends toward a normal distribution even if the original variables themselv ...
is as follows: generate 12 uniform ''U''(0,1) deviates, add them all up, and subtract 6 – the resulting random variable will have approximately standard normal distribution. In truth, the distribution will be Irwin–Hall distribution, Irwin–Hall, which is a 12-section eleventh-order polynomial approximation to the normal distribution. This random deviate will have a limited range of (−6, 6). Note that in a true normal distribution, only 0.00034% of all samples will fall outside ±6σ. * The Box–Muller transform, Box–Muller method uses two independent random numbers ''U'' and ''V'' distributed uniform distribution (continuous), uniformly on (0,1). Then the two random variables ''X'' and ''Y'' X = \sqrt \, \cos(2 \pi V) , \qquad Y = \sqrt \, \sin(2 \pi V) . will both have the standard normal distribution, and will be
independent Independent or Independents may refer to: Arts, entertainment, and media Artist groups * Independents (artist group), a group of modernist painters based in the New Hope, Pennsylvania, area of the United States during the early 1930s * Independ ...
. This formulation arises because for a bivariate normal random vector (''X'', ''Y'') the squared norm will have the
chi-squared distribution In probability theory and statistics, the chi-squared distribution (also chi-square or \chi^2-distribution) with k degrees of freedom is the distribution of a sum of the squares of k independent standard normal random variables. The chi-squa ...
with two degrees of freedom, which is an easily generated exponential distribution, exponential random variable corresponding to the quantity −2ln(''U'') in these equations; and the angle is distributed uniformly around the circle, chosen by the random variable ''V''. * The Marsaglia polar method is a modification of the Box–Muller method which does not require computation of the sine and cosine functions. In this method, ''U'' and ''V'' are drawn from the uniform (−1,1) distribution, and then is computed. If ''S'' is greater or equal to 1, then the method starts over, otherwise the two quantities X = U\sqrt, \qquad Y = V\sqrt are returned. Again, ''X'' and ''Y'' are independent, standard normal random variables. * The Ratio method is a rejection method. The algorithm proceeds as follows: ** Generate two independent uniform deviates ''U'' and ''V''; ** Compute ''X'' = (''V'' − 0.5)/''U''; ** Optional: if ''X''2 ≤ 5 − 4''e''1/4''U'' then accept ''X'' and terminate algorithm; ** Optional: if ''X''2 ≥ 4''e''−1.35/''U'' + 1.4 then reject ''X'' and start over from step 1; ** If ''X''2 ≤ −4 ln''U'' then accept ''X'', otherwise start over the algorithm. *:The two optional steps allow the evaluation of the logarithm in the last step to be avoided in most cases. These steps can be greatly improved so that the logarithm is rarely evaluated. * The ziggurat algorithm is faster than the Box–Muller transform and still exact. In about 97% of all cases it uses only two random numbers, one random integer and one random uniform, one multiplication and an if-test. Only in 3% of the cases, where the combination of those two falls outside the "core of the ziggurat" (a kind of rejection sampling using logarithms), do exponentials and more uniform random numbers have to be employed. * Integer arithmetic can be used to sample from the standard normal distribution. This method is exact in the sense that it satisfies the conditions of ''ideal approximation''; i.e., it is equivalent to sampling a real number from the standard normal distribution and rounding this to the nearest representable floating point number. * There is also some investigation into the connection between the fast Hadamard transform and the normal distribution, since the transform employs just addition and subtraction and by the central limit theorem random numbers from almost any distribution will be transformed into the normal distribution. In this regard a series of Hadamard transforms can be combined with random permutations to turn arbitrary data sets into a normally distributed data.


Numerical approximations for the normal CDF and normal quantile function

The standard normal cumulative distribution function, CDF is widely used in scientific and statistical computing. The values Φ(''x'') may be approximated very accurately by a variety of methods, such as numerical integration, Taylor series, asymptotic series and Gauss's continued fraction#Of Kummer's confluent hypergeometric function, continued fractions. Different approximations are used depending on the desired level of accuracy. * give the approximation for Φ(''x'') for ''x > 0'' with the absolute error (algorith
26.2.17
: \Phi(x) = 1 - \varphi(x)\left(b_1 t + b_2 t^2 + b_3t^3 + b_4 t^4 + b_5 t^5\right) + \varepsilon(x), \qquad t = \frac, where ''ϕ''(''x'') is the standard normal PDF, and ''b''0 = 0.2316419, ''b''1 = 0.319381530, ''b''2 = −0.356563782, ''b''3 = 1.781477937, ''b''4 = −1.821255978, ''b''5 = 1.330274429. * lists some dozens of approximations – by means of rational functions, with or without exponentials – for the function. His algorithms vary in the degree of complexity and the resulting precision, with maximum absolute precision of 24 digits. An algorithm by combines Hart's algorithm 5666 with a continued fraction approximation in the tail to provide a fast computation algorithm with a 16-digit precision. * after recalling Hart68 solution is not suited for erf, gives a solution for both erf and erfc, with maximal relative error bound, via rational function, Rational Chebyshev Approximation. * suggested a simple algorithm based on the Taylor series expansion \Phi(x) = \frac12 + \varphi(x)\left( x + \frac 3 + \frac + \frac + \frac + \cdots \right) for calculating with arbitrary precision. The drawback of this algorithm is comparatively slow calculation time (for example it takes over 300 iterations to calculate the function with 16 digits of precision when ). * The GNU Scientific Library calculates values of the standard normal CDF using Hart's algorithms and approximations with Chebyshev polynomials. Shore (1982) introduced simple approximations that may be incorporated in stochastic optimization models of engineering and operations research, like reliability engineering and inventory analysis. Denoting , the simplest approximation for the quantile function is: z = \Phi^(p)=5.5556\left[1- \left( \frac p \right)^\right],\qquad p\ge 1/2 This approximation delivers for ''z'' a maximum absolute error of 0.026 (for , corresponding to ). For replace ''p'' by and change sign. Another approximation, somewhat less accurate, is the single-parameter approximation: z=-0.4115\left\, \qquad p\ge 1/2 The latter had served to derive a simple approximation for the loss integral of the normal distribution, defined by \begin L(z) & =\int_z^\infty (u-z)\varphi(u) \, du=\int_z^\infty [1-\Phi (u)] \, du \\[5pt] L(z) & \approx \begin 0.4115\left(\dfrac p \right) - z, & p<1/2, \\ \\ 0.4115\left( \dfrac p \right), & p\ge 1/2. \end \\[5pt] \text \\ L(z) & \approx \begin 0.4115\left\, & p < 1/2, \\ \\ 0.4115 \dfrac p, & p\ge 1/2. \end \end This approximation is particularly accurate for the right far-tail (maximum error of 10−3 for z≥1.4). Highly accurate approximations for the CDF, based on Response modeling methodology, Response Modeling Methodology (RMM, Shore, 2011, 2012), are shown in Shore (2005). Some more approximations can be found at: Error function#Approximation with elementary functions. In particular, small ''relative'' error on the whole domain for the CDF \Phi and the quantile function \Phi^ as well, is achieved via an explicitly invertible formula by Sergei Winitzki in 2008.


History


Development

Some authors attribute the credit for the discovery of the normal distribution to Abraham de Moivre, de Moivre, who in 1738 published in the second edition of his "''The Doctrine of Chances''" the study of the coefficients in the binomial expansion of . De Moivre proved that the middle term in this expansion has the approximate magnitude of 2^n/\sqrt, and that "If ''m'' or ''n'' be a Quantity infinitely great, then the Logarithm of the Ratio, which a Term distant from the middle by the Interval ''ℓ'', has to the middle Term, is -\frac." Although this theorem can be interpreted as the first obscure expression for the normal probability law, Stephen Stigler, Stigler points out that de Moivre himself did not interpret his results as anything more than the approximate rule for the binomial coefficients, and in particular de Moivre lacked the concept of the probability density function. In 1823 Carl Friedrich Gauss, Gauss published his monograph "''Theoria combinationis observationum erroribus minimis obnoxiae''" where among other things he introduces several important statistical concepts, such as the method of least squares, the method of maximum likelihood, and the ''normal distribution''. Gauss used ''M'', , to denote the measurements of some unknown quantity ''V'', and sought the "most probable" estimator of that quantity: the one that maximizes the probability of obtaining the observed experimental results. In his notation φΔ is the probability density function of the measurement errors of magnitude Δ. Not knowing what the function ''φ'' is, Gauss requires that his method should reduce to the well-known answer: the arithmetic mean of the measured values. Starting from these principles, Gauss demonstrates that the only law that rationalizes the choice of arithmetic mean as an estimator of the location parameter, is the normal law of errors: \varphi\mathit = \frac h \, e^, where ''h'' is "the measure of the precision of the observations". Using this normal law as a generic model for errors in the experiments, Gauss formulates what is now known as the non-linear least squares, non-linear weighted least squares method. Although Gauss was the first to suggest the normal distribution law, Pierre Simon de Laplace, Laplace made significant contributions. It was Laplace who first posed the problem of aggregating several observations in 1774, although his own solution led to the Laplacian distribution. It was Laplace who first calculated the value of the Gaussian integral, integral in 1782, providing the normalization constant for the normal distribution. Finally, it was Laplace who in 1810 proved and presented to the Academy the fundamental
central limit theorem In probability theory, the central limit theorem (CLT) establishes that, in many situations, when independent random variables are summed up, their properly normalized sum tends toward a normal distribution even if the original variables themselv ...
, which emphasized the theoretical importance of the normal distribution. It is of interest to note that in 1809 an Irish-American mathematician Robert Adrain published two insightful but flawed derivations of the normal probability law, simultaneously and independently from Gauss. His works remained largely unnoticed by the scientific community, until in 1871 they were exhumed by Cleveland Abbe, Abbe. In the middle of the 19th century James Clerk Maxwell, Maxwell demonstrated that the normal distribution is not just a convenient mathematical tool, but may also occur in natural phenomena: "The number of particles whose velocity, resolved in a certain direction, lies between ''x'' and ''x'' + ''dx'' is \operatorname \frac\; e^ \, dx


Naming

Today, the concept is usually known in English as the normal distribution or Gaussian distribution. Other less common names include Gauss distribution, Laplace-Gauss distribution, the law of error, the law of facility of errors, Laplace's second law, Gaussian law. Gauss himself apparently coined the term with reference to the "normal equations" involved in its applications, with normal having its technical meaning of orthogonal rather than "usual". However, by the end of the 19th century some authors had started using the name ''normal distribution'', where the word "normal" was used as an adjective – the term now being seen as a reflection of the fact that this distribution was seen as typical, common – and thus "normal". Charles Sanders Peirce, Peirce (one of those authors) once defined "normal" thus: "...the 'normal' is not the average (or any other kind of mean) of what actually occurs, but of what ''would'', in the long run, occur under certain circumstances." Around the turn of the 20th century Karl Pearson, Pearson popularized the term ''normal'' as a designation for this distribution. Also, it was Pearson who first wrote the distribution in terms of the standard deviation ''σ'' as in modern notation. Soon after this, in year 1915, Ronald Fisher, Fisher added the location parameter to the formula for normal distribution, expressing it in the way it is written nowadays: df = \frac e^ \, dx. The term "standard normal", which denotes the normal distribution with zero mean and unit variance came into general use around the 1950s, appearing in the popular textbooks by P. G. Hoel (1947) "''Introduction to mathematical statistics''" and A. M. Mood (1950) "''Introduction to the theory of statistics''".


See also

* Bates distribution – similar to the Irwin–Hall distribution, but rescaled back into the 0 to 1 range * Behrens–Fisher problem – the long-standing problem of testing whether two normal samples with different variances have same means; * Bhattacharyya distance – method used to separate mixtures of normal distributions * Erdős–Kac theorem – on the occurrence of the normal distribution in number theory * Full width at half maximum * Gaussian blur – convolution, which uses the normal distribution as a kernel * Modified half-normal distribution with the pdf on (0, \infty) is given as f(x)= \frac, where \Psi(\alpha,z)=_1\Psi_1\left(\begin\left(\alpha,\frac\right)\\(1,0)\end;z \right) denotes the Fox-Wright Psi function. * Normally distributed and uncorrelated does not imply independent * Ratio normal distribution * Reciprocal normal distribution * Standard normal table * Stein's lemma * Sub-Gaussian distribution * Sum of normally distributed random variables * Tweedie distribution – The normal distribution is a member of the family of Tweedie exponential dispersion models. * Wrapped normal distribution – the Normal distribution applied to a circular domain * Z-test – using the normal distribution


Notes


References


Citations


Sources

* * In particular, the entries fo
"bell-shaped and bell curve"
an

* * * * * * * * * * * * * * * * * * * * * * * * Translated by Stephen M. Stigler in ''Statistical Science'' 1 (3), 1986: . * * * * * * * * * * * * * * * * * * * * * * * * * * * *


External links

*
Normal distribution calculator
{{Authority control Normal distribution, Continuous distributions Conjugate prior distributions Exponential family distributions Stable distributions Location-scale family probability distributions]">X - \mu, ^p\right&= \sigma^p (p-1)!! \cdot \begin \sqrt & \textp\text \\ 1 & \textp\text \end \\ &= \sigma^p \cdot \frac. \end The last formula is valid also for any non-integer p>-1. When the mean \mu \ne 0, the plain and absolute moments can be expressed in terms of
confluent hypergeometric function In mathematics, a confluent hypergeometric function is a solution of a confluent hypergeometric equation, which is a degenerate form of a hypergeometric differential equation where two of the three regular singularities merge into an irregular ...
s _1F_1 and U. :\begin \operatorname\left ^p\right&= \sigma^p\cdot (-i\sqrt 2)^p U\left(-\frac, \frac, -\frac \left( \frac \mu \sigma \right)^2 \right), \\ \operatorname\left[, X, ^p \right] &= \sigma^p \cdot 2^ \frac _1F_1\left( -\frac, \frac, -\frac \left( \frac \mu \sigma \right)^2 \right). \end These expressions remain valid even if p is not an integer. See also Hermite polynomials#"Negative variance", generalized Hermite polynomials. The expectation of X conditioned on the event that X lies in an interval ,b/math> is given by :\operatorname\left \mid a= \mu - \sigma^2\frac where f and F respectively are the density and the cumulative distribution function of X. For b=\infty this is known as the
inverse Mills ratio In probability theory, the Mills ratio (or Mills's ratio) of a continuous random variable X is the function : m(x) := \frac , where f(x) is the probability density function, and :\bar(x) := \Pr x.html" ;"title=">x">>x= \int_x^ f(u)\, du is the ...
. Note that above, density f of X is used instead of standard normal density as in inverse Mills ratio, so here we have \sigma^2 instead of \sigma.


Fourier transform and characteristic function

The
Fourier transform A Fourier transform (FT) is a mathematical transform that decomposes functions into frequency components, which are represented by the output of the transform as a function of frequency. Most commonly functions of time or space are transformed, ...
of a normal density f with mean \mu and standard deviation \sigma is : \hat f(t) = \int_^\infty f(x)e^ \, dx = e^ e^ where i is the
imaginary unit The imaginary unit or unit imaginary number () is a solution to the quadratic equation x^2+1=0. Although there is no real number with this property, can be used to extend the real numbers to what are called complex numbers, using addition an ...
. If the mean \mu=0, the first factor is 1, and the Fourier transform is, apart from a constant factor, a normal density on the
frequency domain In physics, electronics, control systems engineering, and statistics, the frequency domain refers to the analysis of mathematical functions or signals with respect to frequency, rather than time. Put simply, a time-domain graph shows how a signa ...
, with mean 0 and standard deviation 1/\sigma. In particular, the standard normal distribution \varphi is an
eigenfunction In mathematics, an eigenfunction of a linear operator ''D'' defined on some function space is any non-zero function f in that space that, when acted upon by ''D'', is only multiplied by some scaling factor called an eigenvalue. As an equation, th ...
of the Fourier transform. In probability theory, the Fourier transform of the probability distribution of a real-valued random variable X is closely connected to the
characteristic function In mathematics, the term "characteristic function" can refer to any of several distinct concepts: * The indicator function of a subset, that is the function ::\mathbf_A\colon X \to \, :which for a given subset ''A'' of ''X'', has value 1 at points ...
\varphi_X(t) of that variable, which is defined as the
expected value In probability theory, the expected value (also called expectation, expectancy, mathematical expectation, mean, average, or first moment) is a generalization of the weighted average. Informally, the expected value is the arithmetic mean of a l ...
of e^, as a function of the real variable t (the
frequency Frequency is the number of occurrences of a repeating event per unit of time. It is also occasionally referred to as ''temporal frequency'' for clarity, and is distinct from ''angular frequency''. Frequency is measured in hertz (Hz) which is eq ...
parameter of the Fourier transform). This definition can be analytically extended to a complex-value variable t. The relation between both is: :\varphi_X(t) = \hat f(-t)


Moment and cumulant generating functions

The
moment generating function In probability theory and statistics, the moment-generating function of a real-valued random variable is an alternative specification of its probability distribution. Thus, it provides the basis of an alternative route to analytical results compare ...
of a real random variable X is the expected value of e^, as a function of the real parameter t. For a normal distribution with density f, mean \mu and deviation \sigma, the moment generating function exists and is equal to :M(t) = \operatorname ^= \hat f(it) = e^ e^ The
cumulant generating function In probability theory and statistics, the cumulants of a probability distribution are a set of quantities that provide an alternative to the '' moments'' of the distribution. Any two probability distributions whose moments are identical will have ...
is the logarithm of the moment generating function, namely :g(t) = \ln M(t) = \mu t + \tfrac 12 \sigma^2 t^2 Since this is a quadratic polynomial in t, only the first two
cumulant In probability theory and statistics, the cumulants of a probability distribution are a set of quantities that provide an alternative to the '' moments'' of the distribution. Any two probability distributions whose moments are identical will ha ...
s are nonzero, namely the mean \mu and the variance \sigma^2.


Stein operator and class

Within
Stein's method Stein's method is a general method in probability theory to obtain bounds on the distance between two probability distributions with respect to a probability metric. It was introduced by Charles Stein, who first published it in 1972, to obtain ...
the Stein operator and class of a random variable X \sim \mathcal(\mu, \sigma^2) are \mathcalf(x) = \sigma^2 f'(x) - (x-\mu)f(x) and \mathcal the class of all absolutely continuous functions f : \R \to \R \mbox\mathbb[, f'(X), ]< \infty.


Zero-variance limit

In the limit (mathematics), limit when \sigma tends to zero, the probability density f(x) eventually tends to zero at any x\ne \mu, but grows without limit if x = \mu, while its integral remains equal to 1. Therefore, the normal distribution cannot be defined as an ordinary
function Function or functionality may refer to: Computing * Function key, a type of key on computer keyboards * Function model, a structured representation of processes in a system * Function object or functor or functionoid, a concept of object-oriente ...
when \sigma = 0. However, one can define the normal distribution with zero variance as a
generalized function In mathematics, generalized functions are objects extending the notion of functions. There is more than one recognized theory, for example the theory of distributions. Generalized functions are especially useful in making discontinuous functions ...
; specifically, as Dirac's "delta function" \delta translated by the mean \mu, that is f(x)=\delta(x-\mu). Its CDF is then the
Heaviside step function The Heaviside step function, or the unit step function, usually denoted by or (but sometimes , or ), is a step function, named after Oliver Heaviside (1850–1925), the value of which is zero for negative arguments and one for positive argume ...
translated by the mean \mu, namely :F(x) = \begin 0 & \textx < \mu \\ 1 & \textx \geq \mu \end


Maximum entropy

Of all probability distributions over the reals with a specified mean \mu and variance \sigma^2, the normal distribution N(\mu,\sigma^2) is the one with maximum entropy. If X is a
continuous random variable In probability theory and statistics, a probability distribution is the mathematical function that gives the probabilities of occurrence of different possible outcomes for an experiment. It is a mathematical description of a random phenomenon i ...
with
probability density In probability theory, a probability density function (PDF), or density of a continuous random variable, is a function whose value at any given sample (or point) in the sample space (the set of possible values taken by the random variable) can ...
f(x), then the entropy of X is defined as : H(X) = - \int_^\infty f(x)\log f(x)\, dx where f(x)\log f(x) is understood to be zero whenever f(x)=0. This functional can be maximized, subject to the constraints that the distribution is properly normalized and has a specified variance, by using
variational calculus The calculus of variations (or Variational Calculus) is a field of mathematical analysis that uses variations, which are small changes in functions and functionals, to find maxima and minima of functionals: mappings from a set of functions t ...
. A function with two
Lagrange multipliers In mathematical optimization, the method of Lagrange multipliers is a strategy for finding the local maxima and minima of a function subject to equality constraints (i.e., subject to the condition that one or more equations have to be satisfied ex ...
is defined: : L=\int_^\infty f(x)\ln(f(x))\,dx-\lambda_0\left(1-\int_^\infty f(x)\,dx\right)-\lambda\left(\sigma^2-\int_^\infty f(x)(x-\mu)^2\,dx\right) where f(x) is, for now, regarded as some density function with mean \mu and standard deviation \sigma. At maximum entropy, a small variation \delta f(x) about f(x) will produce a variation \delta L about L which is equal to 0: : 0=\delta L=\int_^\infty \delta f(x)\left (\ln(f(x))+1+\lambda_0+\lambda(x-\mu)^2\right )\,dx Since this must hold for any small \delta f(x), the term in brackets must be zero, and solving for f(x) yields: :f(x)=e^ Using the constraint equations to solve for \lambda_0 and \lambda yields the density of the normal distribution: : f(x, \mu, \sigma)=\frace^ The entropy of a normal distribution is equal to : H(X)=\tfrac(1+\log(2\sigma^2\pi))


Other properties


Related distributions


Central limit theorem

The central limit theorem states that under certain (fairly common) conditions, the sum of many random variables will have an approximately normal distribution. More specifically, where X_1,\ldots ,X_n are
independent and identically distributed In probability theory and statistics, a collection of random variables is independent and identically distributed if each random variable has the same probability distribution as the others and all are mutually independent. This property is usua ...
random variables with the same arbitrary distribution, zero mean, and variance \sigma^2 and Z is their mean scaled by \sqrt : Z = \sqrt\left(\frac\sum_^n X_i\right) Then, as n increases, the probability distribution of Z will tend to the normal distribution with zero mean and variance \sigma^2. The theorem can be extended to variables (X_i) that are not independent and/or not identically distributed if certain constraints are placed on the degree of dependence and the moments of the distributions. Many
test statistic A test statistic is a statistic (a quantity derived from the sample) used in statistical hypothesis testing.Berger, R. L.; Casella, G. (2001). ''Statistical Inference'', Duxbury Press, Second Edition (p.374) A hypothesis test is typically specif ...
s, scores, and
estimator In statistics, an estimator is a rule for calculating an estimate of a given quantity based on observed data: thus the rule (the estimator), the quantity of interest (the estimand) and its result (the estimate) are distinguished. For example, the ...
s encountered in practice contain sums of certain random variables in 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 distributions. The central limit theorem also implies that certain distributions can be approximated by the normal distribution, for example: * The
binomial distribution In probability theory and statistics, the binomial distribution with parameters ''n'' and ''p'' is the discrete probability distribution of the number of successes in a sequence of ''n'' independent experiments, each asking a yes–no quest ...
B(n,p) is approximately normal with mean np and variance np(1-p) for large n and for p not too close to 0 or 1. * The
Poisson distribution In probability theory and statistics, the Poisson distribution is a discrete probability distribution that expresses the probability of a given number of events occurring in a fixed interval of time or space if these events occur with a known co ...
with parameter \lambda is approximately normal with mean \lambda and variance \lambda, for large values of \lambda. * The
chi-squared distribution In probability theory and statistics, the chi-squared distribution (also chi-square or \chi^2-distribution) with k degrees of freedom is the distribution of a sum of the squares of k independent standard normal random variables. The chi-squa ...
\chi^2(k) is approximately normal with mean k and variance 2k, for large k. * The
Student's t-distribution In probability and statistics, Student's ''t''-distribution (or simply the ''t''-distribution) is any member of a family of continuous probability distributions that arise when estimating the mean of a normally distributed population in sit ...
t(\nu) is approximately normal with mean 0 and variance 1 when \nu is large. Whether these approximations are sufficiently accurate depends on the purpose for which they are needed, and the rate of convergence to the normal distribution. It is typically the case that such approximations are less accurate in the tails of the distribution. A general upper bound for the approximation error in the central limit theorem is given by the
Berry–Esseen theorem In probability theory, the central limit theorem states that, under certain circumstances, the probability distribution of the scaled mean of a random sample converges to a normal distribution as the sample size increases to infinity. Under strong ...
, improvements of the approximation are given by the
Edgeworth expansion The Gram–Charlier A series (named in honor of Jørgen Pedersen Gram and Carl Charlier), and the Edgeworth series (named in honor of Francis Ysidro Edgeworth) are series that approximate a probability distribution in terms of its cumulants. The se ...
s. This theorem can also be used to justify modeling the sum of many uniform noise sources as
Gaussian noise Gaussian noise, named after Carl Friedrich Gauss, is a term from signal processing theory denoting a kind of signal noise that has a probability density function (pdf) equal to that of the normal distribution (which is also known as the Gaussia ...
. See
AWGN Additive white Gaussian noise (AWGN) is a basic noise model used in information theory to mimic the effect of many random processes that occur in nature. The modifiers denote specific characteristics: * ''Additive'' because it is added to any nois ...
.


Operations and functions of normal variables

The
probability density In probability theory, a probability density function (PDF), or density of a continuous random variable, is a function whose value at any given sample (or point) in the sample space (the set of possible values taken by the random variable) can ...
,
cumulative distribution In statistics, the frequency (or absolute frequency) of an event i is the number n_i of times the observation has occurred/recorded in an experiment or study. These frequencies are often depicted graphically or in tabular form. Types The cumul ...
, and inverse cumulative distribution of any function of one or more independent or correlated normal variables can be computed with the numerical method of ray-tracing
Matlab code
. In the following sections we look at some special cases.


Operations on a single normal variable

If X is distributed normally with mean \mu and variance \sigma^2, then * aX+b, for any real numbers a and b, is also normally distributed, with mean a\mu+b and standard deviation , a, \sigma. That is, the family of normal distributions is closed under linear transformations. * The exponential of X is distributed log-normally: . * The absolute value of X has
folded normal distribution The folded normal distribution is a probability distribution related to the normal distribution. Given a normally distributed random variable ''X'' with mean ''μ'' and variance ''σ''2, the random variable ''Y'' = , ''X'', has a folded normal d ...
: . If \mu = 0 this is known as the
half-normal distribution In probability theory and statistics, the half-normal distribution is a special case of the folded normal distribution. Let X follow an ordinary normal distribution, N(0,\sigma^2). Then, Y=, X, follows a half-normal distribution. Thus, the hal ...
. * The absolute value of normalized residuals, , ''X'' − ''μ'', /''σ'', has
chi distribution In probability theory and statistics, the chi distribution is a continuous probability distribution. It is the distribution of the positive square root of the sum of squares of a set of independent random variables each following a standard norm ...
with one degree of freedom: , X - \mu, / \sigma \sim \chi_1. * The square of ''X''/''σ'' has the
noncentral chi-squared distribution In probability theory and statistics, the noncentral chi-squared distribution (or noncentral chi-square distribution, noncentral \chi^2 distribution) is a noncentral generalization of the chi-squared distribution. It often arises in the power a ...
with one degree of freedom: X^2 / \sigma^2 \sim \chi_1^2(\mu^2 / \sigma^2). If \mu = 0, the distribution is called simply chi-squared. * The log likelihood of a normal variable x is simply the log of its
probability density function In probability theory, a probability density function (PDF), or density of a continuous random variable, is a function whose value at any given sample (or point) in the sample space (the set of possible values taken by the random variable) can ...
: \ln p(x)= -\frac \left(\frac \right)^2 -\ln \left(\sigma \sqrt \right) = -\frac z^2 -\ln \left(\sigma \sqrt \right). Since this is a scaled and shifted square of a standard normal variable, it is distributed as a scaled and shifted chi-squared variable. * The distribution of the variable ''X'' restricted to an interval 'a'', ''b''is called the
truncated normal distribution In probability and statistics, the truncated normal distribution is the probability distribution derived from that of a normally distributed random variable by bounding the random variable from either below or above (or both). The truncated no ...
. * (''X'' − ''μ'')−2 has a
Lévy distribution In probability theory and statistics, the Lévy distribution, named after Paul Lévy, is a continuous probability distribution for a non-negative random variable. In spectroscopy, this distribution, with frequency as the dependent variable, is kn ...
with location 0 and scale ''σ''−2.


= Operations on two independent normal variables

= * If X_1 and X_2 are two
independent Independent or Independents may refer to: Arts, entertainment, and media Artist groups * Independents (artist group), a group of modernist painters based in the New Hope, Pennsylvania, area of the United States during the early 1930s * Independ ...
normal random variables, with means \mu_1, \mu_2 and standard deviations \sigma_1, \sigma_2, then their sum X_1 + X_2 will also be normally distributed, roof/sup> with mean \mu_1 + \mu_2 and variance \sigma_1^2 + \sigma_2^2. * In particular, if X and Y are independent normal deviates with zero mean and variance \sigma^2, then X + Y and X - Y are also independent and normally distributed, with zero mean and variance 2\sigma^2. This is a special case of the
polarization identity In linear algebra, a branch of mathematics, the polarization identity is any one of a family of formulas that express the inner product of two vectors in terms of the norm of a normed vector space. If a norm arises from an inner product then t ...
. * If X_1, X_2 are two independent normal deviates with mean \mu and deviation \sigma, and a, b are arbitrary real numbers, then the variable X_3 = \frac + \mu is also normally distributed with mean \mu and deviation \sigma. It follows that the normal distribution is
stable A stable is a building in which livestock, especially horses, are kept. It most commonly means a building that is divided into separate stalls for individual animals and livestock. There are many different types of stables in use today; the ...
(with exponent \alpha=2).


= Operations on two independent standard normal variables

= If X_1 and X_2 are two independent standard normal random variables with mean 0 and variance 1, then * Their sum and difference is distributed normally with mean zero and variance two: X_1 \pm X_2 \sim N(0, 2). * Their product Z = X_1 X_2 follows the
product distribution A product distribution is a probability distribution constructed as the distribution of the product of random variables having two other known distributions. Given two statistically independent random variables ''X'' and ''Y'', the distribution of ...
with density function f_Z(z) = \pi^ K_0(, z, ) where K_0 is the
modified Bessel function of the second kind Bessel functions, first defined by the mathematician Daniel Bernoulli and then generalized by Friedrich Bessel, are canonical solutions of Bessel's differential equation x^2 \frac + x \frac + \left(x^2 - \alpha^2 \right)y = 0 for an arbitrary ...
. This distribution is symmetric around zero, unbounded at z = 0, and has the
characteristic function In mathematics, the term "characteristic function" can refer to any of several distinct concepts: * The indicator function of a subset, that is the function ::\mathbf_A\colon X \to \, :which for a given subset ''A'' of ''X'', has value 1 at points ...
\phi_Z(t) = (1 + t^2)^. * Their ratio follows the standard
Cauchy distribution The Cauchy distribution, named after Augustin Cauchy, is a continuous probability distribution. It is also known, especially among physicists, as the Lorentz distribution (after Hendrik Lorentz), Cauchy–Lorentz distribution, Lorentz(ian) fun ...
: X_1/ X_2 \sim \operatorname(0, 1). * Their Euclidean norm \sqrt has the
Rayleigh distribution In probability theory and statistics, the Rayleigh distribution is a continuous probability distribution for nonnegative-valued random variables. Up to rescaling, it coincides with the chi distribution with two degrees of freedom. The distribut ...
.


Operations on multiple independent normal variables

* Any linear combination of independent normal deviates is a normal deviate. * If X_1, X_2, \ldots, X_n are independent standard normal random variables, then the sum of their squares has the
chi-squared distribution In probability theory and statistics, the chi-squared distribution (also chi-square or \chi^2-distribution) with k degrees of freedom is the distribution of a sum of the squares of k independent standard normal random variables. The chi-squa ...
with n degrees of freedom X_1^2 + \cdots + X_n^2 \sim \chi_n^2. * If X_1, X_2, \ldots, X_n are independent normally distributed random variables with means \mu and variances \sigma^2, then their
sample mean The sample mean (or "empirical mean") and the sample covariance are statistics computed from a Sample (statistics), sample of data on one or more random variables. The sample mean is the average value (or mean, mean value) of a sample (statistic ...
is independent from the sample
standard deviation In statistics, the standard deviation is a measure of the amount of variation or dispersion of a set of values. A low standard deviation indicates that the values tend to be close to the mean (also called the expected value) of the set, while ...
, which can be demonstrated using Basu's theorem or
Cochran's theorem In statistics, Cochran's theorem, devised by William G. Cochran, is a theorem used to justify results relating to the probability distributions of statistics that are used in the analysis of variance. Statement Let ''U''1, ..., ''U'N'' be i.i. ...
. The ratio of these two quantities will have the
Student's t-distribution In probability and statistics, Student's ''t''-distribution (or simply the ''t''-distribution) is any member of a family of continuous probability distributions that arise when estimating the mean of a normally distributed population in sit ...
with n-1 degrees of freedom: t = \frac = \frac \sim t_. * If X_1, X_2, \ldots, X_n, Y_1, Y_2, \ldots, Y_m are independent standard normal random variables, then the ratio of their normalized sums of squares will have the with degrees of freedom: F = \frac \sim F_.


Operations on multiple correlated normal variables

* A
quadratic form In mathematics, a quadratic form is a polynomial with terms all of degree two ("form" is another name for a homogeneous polynomial). For example, :4x^2 + 2xy - 3y^2 is a quadratic form in the variables and . The coefficients usually belong to a ...
of a normal vector, i.e. a quadratic function q = \sum x_i^2 + \sum x_j + c of multiple independent or correlated normal variables, is a generalized chi-square variable.


Operations on the density function

The split normal distribution is most directly defined in terms of joining scaled sections of the density functions of different normal distributions and rescaling the density to integrate to one. The
truncated normal distribution In probability and statistics, the truncated normal distribution is the probability distribution derived from that of a normally distributed random variable by bounding the random variable from either below or above (or both). The truncated no ...
results from rescaling a section of a single density function.


Infinite divisibility and Cramér's theorem

For any positive integer \text, any normal distribution with mean \mu and variance \sigma^2 is the distribution of the sum of \text independent normal deviates, each with mean \frac and variance \frac. This property is called
infinite divisibility Infinite divisibility arises in different ways in philosophy, physics, economics, order theory (a branch of mathematics), and probability theory (also a branch of mathematics). One may speak of infinite divisibility, or the lack thereof, of matter ...
. Conversely, if X_1 and X_2 are independent random variables and their sum X_1+X_2 has a normal distribution, then both X_1 and X_2 must be normal deviates. This result is known as Cramér's decomposition theorem, and is equivalent to saying that the convolution of two distributions is normal if and only if both are normal. Cramér's theorem implies that a linear combination of independent non-Gaussian variables will never have an exactly normal distribution, although it may approach it arbitrarily closely.


Bernstein's theorem

Bernstein's theorem states that if X and Y are independent and X + Y and X - Y are also independent, then both ''X'' and ''Y'' must necessarily have normal distributions. More generally, if X_1, \ldots, X_n are independent random variables, then two distinct linear combinations \sum and \sumwill be independent if and only if all X_k are normal and \sum, where \sigma_k^2 denotes the variance of X_k.


Extensions

The notion of normal distribution, being one of the most important distributions in probability theory, has been extended far beyond the standard framework of the univariate (that is one-dimensional) case (Case 1). All these extensions are also called ''normal'' or ''Gaussian'' laws, so a certain ambiguity in names exists. * The
multivariate normal distribution In probability theory and statistics, the multivariate normal distribution, multivariate Gaussian distribution, or joint normal distribution is a generalization of the one-dimensional (univariate) normal distribution to higher dimensions. One d ...
describes the Gaussian law in the ''k''-dimensional Euclidean space. A vector is multivariate-normally distributed if any linear combination of its components has a (univariate) normal distribution. The variance of ''X'' is a ''k×k'' symmetric positive-definite matrix ''V''. The multivariate normal distribution is a special case of the
elliptical distribution In probability and statistics, an elliptical distribution is any member of a broad family of probability distributions that generalize the multivariate normal distribution. Intuitively, in the simplified two and three dimensional case, the joint di ...
s. As such, its iso-density loci in the ''k'' = 2 case are ellipses and in the case of arbitrary ''k'' are ellipsoids. * Rectified Gaussian distribution a rectified version of normal distribution with all the negative elements reset to 0 * Complex normal distribution deals with the complex normal vectors. A complex vector is said to be normal if both its real and imaginary components jointly possess a 2''k''-dimensional multivariate normal distribution. The variance-covariance structure of ''X'' is described by two matrices: the ''variance'' matrix Γ, and the ''relation'' matrix ''C''. * Matrix normal distribution describes the case of normally distributed matrices. * Gaussian processes are the normally distributed stochastic processes. These can be viewed as elements of some infinite-dimensional Hilbert space ''H'', and thus are the analogues of multivariate normal vectors for the case . A random element is said to be normal if for any constant the scalar product has a (univariate) normal distribution. The variance structure of such Gaussian random element can be described in terms of the linear ''covariance ''. Several Gaussian processes became popular enough to have their own names: ** Wiener process, Brownian motion, ** Brownian bridge, ** Ornstein–Uhlenbeck process. * Gaussian q-distribution is an abstract mathematical construction that represents a "q-analogue" of the normal distribution. * the q-Gaussian is an analogue of the Gaussian distribution, in the sense that it maximises the Tsallis entropy, and is one type of Tsallis distribution. Note that this distribution is different from the Gaussian q-distribution above. * The Kaniadakis Gaussian distribution, Kaniadakis ''κ''-Gaussian distribution is a generalization of the Gaussian distribution which arises from the Kaniadakis statistics, being one of the Kaniadakis distribution, Kaniadakis distributions. A random variable ''X'' has a two-piece normal distribution if it has a distribution : f_X( x ) = N( \mu, \sigma_1^2 ) \text x \le \mu : f_X( x ) = N( \mu, \sigma_2^2 ) \text x \ge \mu where ''μ'' is the mean and ''σ''1 and ''σ''2 are the standard deviations of the distribution to the left and right of the mean respectively. The mean, variance and third central moment of this distribution have been determined : \operatorname( X ) = \mu + \sqrt ( \sigma_2 - \sigma_1 ) : \operatorname( X ) = \left( 1 - \frac 2 \pi\right)( \sigma_2 - \sigma_1 )^2 + \sigma_1 \sigma_2 : \operatorname( X ) = \sqrt( \sigma_2 - \sigma_1 ) \left[ \left( \frac 4 \pi - 1 \right) ( \sigma_2 - \sigma_1)^2 + \sigma_1 \sigma_2 \right] where E(''X''), V(''X'') and T(''X'') are the mean, variance, and third central moment respectively. One of the main practical uses of the Gaussian law is to model the empirical distributions of many different random variables encountered in practice. In such case a possible extension would be a richer family of distributions, having more than two parameters and therefore being able to fit the empirical distribution more accurately. The examples of such extensions are: * Pearson distribution — a four-parameter family of probability distributions that extend the normal law to include different skewness and kurtosis values. * The generalized normal distribution, also known as the exponential power distribution, allows for distribution tails with thicker or thinner asymptotic behaviors.


Statistical inference


Estimation of parameters

It is often the case that we do not know the parameters of the normal distribution, but instead want to Estimation theory, estimate them. That is, having a sample (x_1, \ldots, x_n) from a normal N(\mu, \sigma^2) population we would like to learn the approximate values of parameters \mu and \sigma^2. The standard approach to this problem is the maximum likelihood method, which requires maximization of the ''log-likelihood function'': : \ln\mathcal(\mu,\sigma^2) = \sum_^n \ln f(x_i\mid\mu,\sigma^2) = -\frac\ln(2\pi) - \frac\ln\sigma^2 - \frac\sum_^n (x_i-\mu)^2. Taking derivatives with respect to \mu and \sigma^2 and solving the resulting system of first order conditions yields the ''maximum likelihood estimates'': : \hat = \overline \equiv \frac\sum_^n x_i, \qquad \hat^2 = \frac \sum_^n (x_i - \overline)^2.


Sample mean

Estimator \textstyle\hat\mu is called the ''
sample mean The sample mean (or "empirical mean") and the sample covariance are statistics computed from a Sample (statistics), sample of data on one or more random variables. The sample mean is the average value (or mean, mean value) of a sample (statistic ...
'', since it is the arithmetic mean of all observations. The statistic \textstyle\overline is complete statistic, complete and sufficient statistic, sufficient for \mu, and therefore by the Lehmann–Scheffé theorem, \textstyle\hat\mu is the uniformly minimum variance unbiased (UMVU) estimator. In finite samples it is distributed normally: : \hat\mu \sim \mathcal(\mu,\sigma^2/n). The variance of this estimator is equal to the ''μμ''-element of the inverse Fisher information matrix \textstyle\mathcal^. This implies that the estimator is efficient estimator, finite-sample efficient. Of practical importance is the fact that the standard error (statistics), standard error of \textstyle\hat\mu is proportional to \textstyle1/\sqrt, that is, if one wishes to decrease the standard error by a factor of 10, one must increase the number of points in the sample by a factor of 100. This fact is widely used in determining sample sizes for opinion polls and the number of trials in Monte Carlo simulations. From the standpoint of the asymptotic theory (statistics), asymptotic theory, \textstyle\hat\mu is consistent estimator, consistent, that is, it convergence in probability, converges in probability to \mu as n\rightarrow\infty. The estimator is also asymptotic normality, asymptotically normal, which is a simple corollary of the fact that it is normal in finite samples: : \sqrt(\hat\mu-\mu) \,\xrightarrow\, \mathcal(0,\sigma^2).


Sample variance

The estimator \textstyle\hat\sigma^2 is called the ''sample variance'', since it is the variance of the sample ((x_1, \ldots, x_n)). In practice, another estimator is often used instead of the \textstyle\hat\sigma^2. This other estimator is denoted s^2, and is also called the ''sample variance'', which represents a certain ambiguity in terminology; its square root s is called the ''sample standard deviation''. The estimator s^2 differs from \textstyle\hat\sigma^2 by having instead of ''n'' in the denominator (the so-called Bessel's correction): : s^2 = \frac \hat\sigma^2 = \frac \sum_^n (x_i - \overline)^2. The difference between s^2 and \textstyle\hat\sigma^2 becomes negligibly small for large ''n''s. In finite samples however, the motivation behind the use of s^2 is that it is an unbiased estimator of the underlying parameter \sigma^2, whereas \textstyle\hat\sigma^2 is biased. Also, by the Lehmann–Scheffé theorem the estimator s^2 is uniformly minimum variance unbiased (Minimum-variance unbiased estimator, UMVU), which makes it the "best" estimator among all unbiased ones. However it can be shown that the biased estimator \textstyle\hat\sigma^2 is "better" than the s^2 in terms of the mean squared error (MSE) criterion. In finite samples both s^2 and \textstyle\hat\sigma^2 have scaled
chi-squared distribution In probability theory and statistics, the chi-squared distribution (also chi-square or \chi^2-distribution) with k degrees of freedom is the distribution of a sum of the squares of k independent standard normal random variables. The chi-squa ...
with degrees of freedom: : s^2 \sim \frac \cdot \chi^2_, \qquad \hat\sigma^2 \sim \frac \cdot \chi^2_. The first of these expressions shows that the variance of s^2 is equal to 2\sigma^4/(n-1), which is slightly greater than the ''σσ''-element of the inverse Fisher information matrix \textstyle\mathcal^. Thus, s^2 is not an efficient estimator for \sigma^2, and moreover, since s^2 is UMVU, we can conclude that the finite-sample efficient estimator for \sigma^2 does not exist. Applying the asymptotic theory, both estimators s^2 and \textstyle\hat\sigma^2 are consistent, that is they converge in probability to \sigma^2 as the sample size n\rightarrow\infty. The two estimators are also both asymptotically normal: : \sqrt(\hat\sigma^2 - \sigma^2) \simeq \sqrt(s^2-\sigma^2) \,\xrightarrow\, \mathcal(0,2\sigma^4). In particular, both estimators are asymptotically efficient for \sigma^2.


Confidence intervals

By
Cochran's theorem In statistics, Cochran's theorem, devised by William G. Cochran, is a theorem used to justify results relating to the probability distributions of statistics that are used in the analysis of variance. Statement Let ''U''1, ..., ''U'N'' be i.i. ...
, for normal distributions the sample mean \textstyle\hat\mu and the sample variance ''s''2 are
independent Independent or Independents may refer to: Arts, entertainment, and media Artist groups * Independents (artist group), a group of modernist painters based in the New Hope, Pennsylvania, area of the United States during the early 1930s * Independ ...
, which means there can be no gain in considering their joint distribution. There is also a converse theorem: if in a sample the sample mean and sample variance are independent, then the sample must have come from the normal distribution. The independence between \textstyle\hat\mu and ''s'' can be employed to construct the so-called ''t-statistic'': : t = \frac = \frac \sim t_ This quantity ''t'' has the
Student's t-distribution In probability and statistics, Student's ''t''-distribution (or simply the ''t''-distribution) is any member of a family of continuous probability distributions that arise when estimating the mean of a normally distributed population in sit ...
with degrees of freedom, and it is an ancillary statistic (independent of the value of the parameters). Inverting the distribution of this ''t''-statistics will allow us to construct the
confidence interval In frequentist statistics, a confidence interval (CI) is a range of estimates for an unknown parameter. A confidence interval is computed at a designated ''confidence level''; the 95% confidence level is most common, but other levels, such as 9 ...
for ''μ''; similarly, inverting the ''χ''2 distribution of the statistic ''s''2 will give us the confidence interval for ''σ''2: :\mu \in \left[ \hat\mu - t_ \fracs, \hat\mu + t_ \fracs \right], :\sigma^2 \in \left[ \frac, \frac \right], where ''tk,p'' and are the ''p''th
quantile In statistics and probability, quantiles are cut points dividing the range of a probability distribution into continuous intervals with equal probabilities, or dividing the observations in a sample in the same way. There is one fewer quantile tha ...
s of the ''t''- and ''χ''2-distributions respectively. These confidence intervals are of the ''confidence level'' , meaning that the true values ''μ'' and ''σ''2 fall outside of these intervals with probability (or significance level) ''α''. In practice people usually take , resulting in the 95% confidence intervals. Approximate formulas can be derived from the asymptotic distributions of \textstyle\hat\mu and ''s''2: :\mu \in \left[ \hat\mu - , z_, \fracs, \hat\mu + , z_, \fracs \right], :\sigma^2 \in \left[ s^2 - , z_, \fracs^2, s^2 + , z_, \fracs^2 \right], The approximate formulas become valid for large values of ''n'', and are more convenient for the manual calculation since the standard normal quantiles ''z''''α''/2 do not depend on ''n''. In particular, the most popular value of , results in .


Normality tests

Normality tests assess the likelihood that the given data set comes from a normal distribution. Typically the null hypothesis ''H''0 is that the observations are distributed normally with unspecified mean ''μ'' and variance ''σ''2, versus the alternative ''Ha'' that the distribution is arbitrary. Many tests (over 40) have been devised for this problem. The more prominent of them are outlined below: Diagnostic plots are more intuitively appealing but subjective at the same time, as they rely on informal human judgement to accept or reject the null hypothesis. *
Q–Q plot In statistics, a Q–Q plot (quantile-quantile plot) is a probability plot, a List of graphical methods, graphical method for comparing two probability distributions by plotting their ''quantiles'' against each other. A point on the plot co ...
, also known as normal probability plot or rankit plot—is a plot of the sorted values from the data set against the expected values of the corresponding quantiles from the standard normal distribution. That is, it's a plot of point of the form (Φ−1(''pk''), ''x''(''k'')), where plotting points ''pk'' are equal to ''pk'' = (''k'' − ''α'')/(''n'' + 1 − 2''α'') and ''α'' is an adjustment constant, which can be anything between 0 and 1. If the null hypothesis is true, the plotted points should approximately lie on a straight line. * P–P plot – similar to the Q–Q plot, but used much less frequently. This method consists of plotting the points (Φ(''z''(''k'')), ''pk''), where \textstyle z_ = (x_-\hat\mu)/\hat\sigma. For normally distributed data this plot should lie on a 45° line between (0, 0) and (1, 1). Goodness-of-fit tests: ''Moment-based tests'': * D'Agostino's K-squared test * Jarque–Bera test * Shapiro–Wilk test: This is based on the fact that the line in the Q–Q plot has the slope of ''σ''. The test compares the least squares estimate of that slope with the value of the sample variance, and rejects the null hypothesis if these two quantities differ significantly. ''Tests based on the empirical distribution function'': * Anderson–Darling test * Lilliefors test (an adaptation of the Kolmogorov–Smirnov test)


Bayesian analysis of the normal distribution

Bayesian analysis of normally distributed data is complicated by the many different possibilities that may be considered: * Either the mean, or the variance, or neither, may be considered a fixed quantity. * When the variance is unknown, analysis may be done directly in terms of the variance, or in terms of the
precision Precision, precise or precisely may refer to: Science, and technology, and mathematics Mathematics and computing (general) * Accuracy and precision, measurement deviation from true value and its scatter * Significant figures, the number of digit ...
, the reciprocal of the variance. The reason for expressing the formulas in terms of precision is that the analysis of most cases is simplified. * Both univariate and multivariate normal distribution, multivariate cases need to be considered. * Either conjugate prior, conjugate or improper prior, improper prior distributions may be placed on the unknown variables. * An additional set of cases occurs in Bayesian linear regression, where in the basic model the data is assumed to be normally distributed, and normal priors are placed on the regression coefficients. The resulting analysis is similar to the basic cases of independent identically distributed data. The formulas for the non-linear-regression cases are summarized in the conjugate prior article.


Sum of two quadratics


= Scalar form

= The following auxiliary formula is useful for simplifying the posterior distribution, posterior update equations, which otherwise become fairly tedious. :a(x-y)^2 + b(x-z)^2 = (a + b)\left(x - \frac\right)^2 + \frac(y-z)^2 This equation rewrites the sum of two quadratics in ''x'' by expanding the squares, grouping the terms in ''x'', and completing the square. Note the following about the complex constant factors attached to some of the terms: # The factor \frac has the form of a weighted average of ''y'' and ''z''. # \frac = \frac = (a^ + b^)^. This shows that this factor can be thought of as resulting from a situation where the Multiplicative inverse, reciprocals of quantities ''a'' and ''b'' add directly, so to combine ''a'' and ''b'' themselves, it's necessary to reciprocate, add, and reciprocate the result again to get back into the original units. This is exactly the sort of operation performed by the harmonic mean, so it is not surprising that \frac is one-half the harmonic mean of ''a'' and ''b''.


= Vector form

= A similar formula can be written for the sum of two vector quadratics: If x, y, z are vectors of length ''k'', and A and B are symmetric matrix, symmetric, invertible matrices of size k\times k, then : \begin & (\mathbf-\mathbf)'\mathbf(\mathbf-\mathbf) + (\mathbf-\mathbf)' \mathbf(\mathbf-\mathbf) \\ = & (\mathbf - \mathbf)'(\mathbf+\mathbf)(\mathbf - \mathbf) + (\mathbf - \mathbf)'(\mathbf^ + \mathbf^)^(\mathbf - \mathbf) \end where :\mathbf = (\mathbf + \mathbf)^(\mathbf\mathbf + \mathbf \mathbf) Note that the form x′ A x is called a
quadratic form In mathematics, a quadratic form is a polynomial with terms all of degree two ("form" is another name for a homogeneous polynomial). For example, :4x^2 + 2xy - 3y^2 is a quadratic form in the variables and . The coefficients usually belong to a ...
and is a scalar (mathematics), scalar: :\mathbf'\mathbf\mathbf = \sum_a_ x_i x_j In other words, it sums up all possible combinations of products of pairs of elements from x, with a separate coefficient for each. In addition, since x_i x_j = x_j x_i, only the sum a_ + a_ matters for any off-diagonal elements of A, and there is no loss of generality in assuming that A is symmetric matrix, symmetric. Furthermore, if A is symmetric, then the form \mathbf'\mathbf\mathbf = \mathbf'\mathbf\mathbf.


Sum of differences from the mean

Another useful formula is as follows: \sum_^n (x_i-\mu)^2 = \sum_^n (x_i-\bar)^2 + n(\bar -\mu)^2 where \bar = \frac \sum_^n x_i.


With known variance

For a set of i.i.d. normally distributed data points X of size ''n'' where each individual point ''x'' follows x \sim \mathcal(\mu, \sigma^2) with known
variance In probability theory and statistics, variance is the expectation of the squared deviation of a random variable from its population mean or sample mean. Variance is a measure of dispersion, meaning it is a measure of how far a set of numbers ...
σ2, the conjugate prior distribution is also normally distributed. This can be shown more easily by rewriting the variance as the
precision Precision, precise or precisely may refer to: Science, and technology, and mathematics Mathematics and computing (general) * Accuracy and precision, measurement deviation from true value and its scatter * Significant figures, the number of digit ...
, i.e. using τ = 1/σ2. Then if x \sim \mathcal(\mu, 1/\tau) and \mu \sim \mathcal(\mu_0, 1/\tau_0), we proceed as follows. First, the likelihood function is (using the formula above for the sum of differences from the mean): :\begin p(\mathbf\mid\mu,\tau) &= \prod_^n \sqrt \exp\left(-\frac\tau(x_i-\mu)^2\right) \\ &= \left(\frac\right)^ \exp\left(-\frac\tau \sum_^n (x_i-\mu)^2\right) \\ &= \left(\frac\right)^ \exp\left[-\frac\tau \left(\sum_^n(x_i-\bar)^2 + n(\bar -\mu)^2\right)\right]. \end Then, we proceed as follows: :\begin p(\mu\mid\mathbf) &\propto p(\mathbf\mid\mu) p(\mu) \\ & = \left(\frac\right)^ \exp\left[-\frac\tau \left(\sum_^n(x_i-\bar)^2 + n(\bar -\mu)^2\right)\right] \sqrt \exp\left(-\frac\tau_0(\mu-\mu_0)^2\right) \\ &\propto \exp\left(-\frac\left(\tau\left(\sum_^n(x_i-\bar)^2 + n(\bar -\mu)^2\right) + \tau_0(\mu-\mu_0)^2\right)\right) \\ &\propto \exp\left(-\frac \left(n\tau(\bar-\mu)^2 + \tau_0(\mu-\mu_0)^2 \right)\right) \\ &= \exp\left(-\frac(n\tau + \tau_0)\left(\mu - \dfrac\right)^2 + \frac(\bar - \mu_0)^2\right) \\ &\propto \exp\left(-\frac(n\tau + \tau_0)\left(\mu - \dfrac\right)^2\right) \end In the above derivation, we used the formula above for the sum of two quadratics and eliminated all constant factors not involving ''μ''. The result is the kernel (statistics), kernel of a normal distribution, with mean \frac and precision n\tau + \tau_0, i.e. :p(\mu\mid\mathbf) \sim \mathcal\left(\frac, \frac\right) This can be written as a set of Bayesian update equations for the posterior parameters in terms of the prior parameters: :\begin \tau_0' &= \tau_0 + n\tau \\[5pt] \mu_0' &= \frac \\[5pt] \bar &= \frac\sum_^n x_i \end That is, to combine ''n'' data points with total precision of ''nτ'' (or equivalently, total variance of ''n''/''σ''2) and mean of values \bar, derive a new total precision simply by adding the total precision of the data to the prior total precision, and form a new mean through a ''precision-weighted average'', i.e. a weighted average of the data mean and the prior mean, each weighted by the associated total precision. This makes logical sense if the precision is thought of as indicating the certainty of the observations: In the distribution of the posterior mean, each of the input components is weighted by its certainty, and the certainty of this distribution is the sum of the individual certainties. (For the intuition of this, compare the expression "the whole is (or is not) greater than the sum of its parts". In addition, consider that the knowledge of the posterior comes from a combination of the knowledge of the prior and likelihood, so it makes sense that we are more certain of it than of either of its components.) The above formula reveals why it is more convenient to do Bayesian analysis of conjugate priors for the normal distribution in terms of the precision. The posterior precision is simply the sum of the prior and likelihood precisions, and the posterior mean is computed through a precision-weighted average, as described above. The same formulas can be written in terms of variance by reciprocating all the precisions, yielding the more ugly formulas :\begin ' &= \frac \\[5pt] \mu_0' &= \frac \\[5pt] \bar &= \frac\sum_^n x_i \end


With known mean

For a set of i.i.d. normally distributed data points X of size ''n'' where each individual point ''x'' follows x \sim \mathcal(\mu, \sigma^2) with known mean μ, the conjugate prior of the
variance In probability theory and statistics, variance is the expectation of the squared deviation of a random variable from its population mean or sample mean. Variance is a measure of dispersion, meaning it is a measure of how far a set of numbers ...
has an inverse gamma distribution or a scaled inverse chi-squared distribution. The two are equivalent 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. The prior for σ2 is as follows: :p(\sigma^2\mid\nu_0,\sigma_0^2) = \frac~\frac \propto \frac The likelihood function from above, written in terms of the variance, is: :\begin p(\mathbf\mid\mu,\sigma^2) &= \left(\frac\right)^ \exp\left[-\frac \sum_^n (x_i-\mu)^2\right] \\ &= \left(\frac\right)^ \exp\left[-\frac\right] \end where :S = \sum_^n (x_i-\mu)^2. Then: :\begin p(\sigma^2\mid\mathbf) &\propto p(\mathbf\mid\sigma^2) p(\sigma^2) \\ &= \left(\frac\right)^ \exp\left[-\frac\right] \frac~\frac \\ &\propto \left(\frac\right)^ \frac \exp\left[-\frac + \frac\right] \\ &= \frac \exp\left[-\frac\right] \end The above is also a scaled inverse chi-squared distribution where :\begin \nu_0' &= \nu_0 + n \\ \nu_0'' &= \nu_0 \sigma_0^2 + \sum_^n (x_i-\mu)^2 \end or equivalently :\begin \nu_0' &= \nu_0 + n \\ ' &= \frac \end Reparameterizing in terms of an inverse gamma distribution, the result is: :\begin \alpha' &= \alpha + \frac \\ \beta' &= \beta + \frac \end


With unknown mean and unknown variance

For a set of i.i.d. normally distributed data points X of size ''n'' where each individual point ''x'' follows x \sim \mathcal(\mu, \sigma^2) with unknown mean μ and unknown
variance In probability theory and statistics, variance is the expectation of the squared deviation of a random variable from its population mean or sample mean. Variance is a measure of dispersion, meaning it is a measure of how far a set of numbers ...
σ2, a combined (multivariate) conjugate prior is placed over the mean and variance, consisting of a normal-inverse-gamma distribution. Logically, this originates as follows: # From the analysis of the case with unknown mean but known variance, we see that the update equations involve sufficient statistics computed from the data consisting of the mean of the data points and the total variance of the data points, computed in turn from the known variance divided by the number of data points. # From the analysis of the case with unknown variance but known mean, we see that the update equations involve sufficient statistics over the data consisting of the number of data points and sum of squared deviations. # Keep in mind that the posterior update values serve as the prior distribution when further data is handled. Thus, we should logically think of our priors in terms of the sufficient statistics just described, with the same semantics kept in mind as much as possible. # To handle the case where both mean and variance are unknown, we could place independent priors over the mean and variance, with fixed estimates of the average mean, total variance, number of data points used to compute the variance prior, and sum of squared deviations. Note however that in reality, the total variance of the mean depends on the unknown variance, and the sum of squared deviations that goes into the variance prior (appears to) depend on the unknown mean. In practice, the latter dependence is relatively unimportant: Shifting the actual mean shifts the generated points by an equal amount, and on average the squared deviations will remain the same. This is not the case, however, with the total variance of the mean: As the unknown variance increases, the total variance of the mean will increase proportionately, and we would like to capture this dependence. # This suggests that we create a ''conditional prior'' of the mean on the unknown variance, with a hyperparameter specifying the mean of the pseudo-observations associated with the prior, and another parameter specifying the number of pseudo-observations. This number serves as a scaling parameter on the variance, making it possible to control the overall variance of the mean relative to the actual variance parameter. The prior for the variance also has two hyperparameters, one specifying the sum of squared deviations of the pseudo-observations associated with the prior, and another specifying once again the number of pseudo-observations. Note that each of the priors has a hyperparameter specifying the number of pseudo-observations, and in each case this controls the relative variance of that prior. These are given as two separate hyperparameters so that the variance (aka the confidence) of the two priors can be controlled separately. # This leads immediately to the normal-inverse-gamma distribution, which is the product of the two distributions just defined, with conjugate priors used (an inverse gamma distribution over the variance, and a normal distribution over the mean, ''conditional'' on the variance) and with the same four parameters just defined. The priors are normally defined as follows: :\begin p(\mu\mid\sigma^2; \mu_0, n_0) &\sim \mathcal(\mu_0,\sigma^2/n_0) \\ p(\sigma^2; \nu_0,\sigma_0^2) &\sim I\chi^2(\nu_0,\sigma_0^2) = IG(\nu_0/2, \nu_0\sigma_0^2/2) \end The update equations can be derived, and look as follows: :\begin \bar &= \frac 1 n \sum_^n x_i \\ \mu_0' &= \frac \\ n_0' &= n_0 + n \\ \nu_0' &= \nu_0 + n \\ \nu_0'' &= \nu_0 \sigma_0^2 + \sum_^n (x_i-\bar)^2 + \frac(\mu_0 - \bar)^2 \end The respective numbers of pseudo-observations add the number of actual observations to them. The new mean hyperparameter is once again a weighted average, this time weighted by the relative numbers of observations. Finally, the update for \nu_0'' is similar to the case with known mean, but in this case the sum of squared deviations is taken with respect to the observed data mean rather than the true mean, and as a result a new "interaction term" needs to be added to take care of the additional error source stemming from the deviation between prior and data mean.


Occurrence and applications

The occurrence of normal distribution in practical problems can be loosely classified into four categories: # Exactly normal distributions; # Approximately normal laws, for example when such approximation is justified by the
central limit theorem In probability theory, the central limit theorem (CLT) establishes that, in many situations, when independent random variables are summed up, their properly normalized sum tends toward a normal distribution even if the original variables themselv ...
; and # Distributions modeled as normal – the normal distribution being the distribution with Principle of maximum entropy, maximum entropy for a given mean and variance. # Regression problems – the normal distribution being found after systematic effects have been modeled sufficiently well.


Exact normality

Certain quantities in physics are distributed normally, as was first demonstrated by James Clerk Maxwell. Examples of such quantities are: * Probability density function of a ground state in a quantum harmonic oscillator. * The position of a particle that experiences diffusion. If initially the particle is located at a specific point (that is its probability distribution is the Dirac delta function), then after time ''t'' its location is described by a normal distribution with variance ''t'', which satisfies the diffusion equation \frac f(x,t) = \frac \frac f(x,t). If the initial location is given by a certain density function g(x), then the density at time ''t'' is the convolution of ''g'' and the normal PDF.


Approximate normality

''Approximately'' normal distributions occur in many situations, as explained by the
central limit theorem In probability theory, the central limit theorem (CLT) establishes that, in many situations, when independent random variables are summed up, their properly normalized sum tends toward a normal distribution even if the original variables themselv ...
. When the outcome is produced by many small effects acting ''additively and independently'', its distribution will be close to normal. The normal approximation will not be valid if the effects act multiplicatively (instead of additively), or if there is a single external influence that has a considerably larger magnitude than the rest of the effects. * In counting problems, where the central limit theorem includes a discrete-to-continuum approximation and where Infinite divisibility, infinitely divisible and Indecomposable distribution, decomposable distributions are involved, such as ** binomial distribution, Binomial random variables, associated with binary response variables; ** Poisson distribution, Poisson random variables, associated with rare events; * Thermal radiation has a Bose–Einstein statistics, Bose–Einstein distribution on very short time scales, and a normal distribution on longer timescales due to the central limit theorem.


Assumed normality

There are statistical methods to empirically test that assumption; see the above #Normality tests, Normality tests section. * In biology, the ''logarithm'' of various variables tend to have a normal distribution, that is, they tend to have a
log-normal distribution In probability theory, a log-normal (or lognormal) distribution is a continuous probability distribution of a random variable whose logarithm is normally distributed. Thus, if the random variable is log-normally distributed, then has a normal ...
(after separation on male/female subpopulations), with examples including: ** Measures of size of living tissue (length, height, skin area, weight); ** The ''length'' of ''inert'' appendages (hair, claws, nails, teeth) of biological specimens, ''in the direction of growth''; presumably the thickness of tree bark also falls under this category; ** Certain physiological measurements, such as blood pressure of adult humans. * In finance, in particular the Black–Scholes model, changes in the ''logarithm'' of exchange rates, price indices, and stock market indices are assumed normal (these variables behave like compound interest, not like simple interest, and so are multiplicative). Some mathematicians such as Benoit Mandelbrot have argued that Levy skew alpha-stable distribution, log-Levy distributions, which possesses heavy tails would be a more appropriate model, in particular for the analysis for stock market crashes. The use of the assumption of normal distribution occurring in financial models has also been criticized by Nassim Nicholas Taleb in his works. * Propagation of uncertainty, Measurement errors in physical experiments are often modeled by a normal distribution. This use of a normal distribution does not imply that one is assuming the measurement errors are normally distributed, rather using the normal distribution produces the most conservative predictions possible given only knowledge about the mean and variance of the errors. * In Standardized testing (statistics), standardized testing, results can be made to have a normal distribution by either selecting the number and difficulty of questions (as in the Intelligence quotient, IQ test) or transforming the raw test scores into "output" scores by fitting them to the normal distribution. For example, the SAT's traditional range of 200–800 is based on a normal distribution with a mean of 500 and a standard deviation of 100. * Many scores are derived from the normal distribution, including percentile ranks ("percentiles" or "quantiles"), normal curve equivalents, stanines, Standard score, z-scores, and T-scores. Additionally, some behavioral statistical procedures assume that scores are normally distributed; for example, Student's t-test, t-tests and Analysis of variance, ANOVAs. Bell curve grading assigns relative grades based on a normal distribution of scores. * In hydrology the distribution of long duration river discharge or rainfall, e.g. monthly and yearly totals, is often thought to be practically normal according to the
central limit theorem In probability theory, the central limit theorem (CLT) establishes that, in many situations, when independent random variables are summed up, their properly normalized sum tends toward a normal distribution even if the original variables themselv ...
. The blue picture, made with CumFreq, illustrates an example of fitting the normal distribution to ranked October rainfalls showing the 90% confidence belt based on the
binomial distribution In probability theory and statistics, the binomial distribution with parameters ''n'' and ''p'' is the discrete probability distribution of the number of successes in a sequence of ''n'' independent experiments, each asking a yes–no quest ...
. The rainfall data are represented by plotting positions as part of the cumulative frequency analysis.


Methodological problems and peer review

John Ioannidis argues that using normally distributed standard deviations as standards for validating research findings leave falsifiability, falsifiable predictions about phenomena that are not normally distributed untested. This includes, for example, phenomena that only appear when all necessary conditions are present and one cannot be a substitute for another in an addition-like way and phenomena that are not randomly distributed. Ioannidis argues that standard deviation-centered validation gives a false appearance of validity to hypotheses and theories where some but not all falsifiable predictions are normally distributed since the portion of falsifiable predictions that there is evidence against may and in some cases are in the non-normally distributed parts of the range of falsifiable predictions, as well as baselessly dismissing hypotheses for which none of the falsifiable predictions are normally distributed as if were they unfalsifiable when in fact they do make falsifiable predictions. It is argued by Ioannidis that many cases of mutually exclusive theories being accepted as "validated" by research journals are caused by failure of the journals to take in empirical falsifications of non-normally distributed predictions, and not because mutually exclusive theories are true, which they cannot be, although two mutually exclusive theories can both be wrong and a third one correct.


Computational methods


Generating values from normal distribution

In computer simulations, especially in applications of the Monte-Carlo method, it is often desirable to generate values that are normally distributed. The algorithms listed below all generate the standard normal deviates, since a can be generated as , where ''Z'' is standard normal. All these algorithms rely on the availability of a random number generator ''U'' capable of producing Uniform distribution (continuous), uniform random variates. * The most straightforward method is based on the probability integral transform property: if ''U'' is distributed uniformly on (0,1), then Φ−1(''U'') will have the standard normal distribution. The drawback of this method is that it relies on calculation of the
probit function In probability theory and statistics, the probit function is the quantile function associated with the standard normal distribution. It has applications in data analysis and machine learning, in particular exploratory statistical graphics and ...
Φ−1, which cannot be done analytically. Some approximate methods are described in and in the error function, erf article. Wichura gives a fast algorithm for computing this function to 16 decimal places, which is used by R programming language, R to compute random variates of the normal distribution. * Irwin–Hall distribution#Approximating a Normal distribution, An easy-to-program approximate approach that relies on the
central limit theorem In probability theory, the central limit theorem (CLT) establishes that, in many situations, when independent random variables are summed up, their properly normalized sum tends toward a normal distribution even if the original variables themselv ...
is as follows: generate 12 uniform ''U''(0,1) deviates, add them all up, and subtract 6 – the resulting random variable will have approximately standard normal distribution. In truth, the distribution will be Irwin–Hall distribution, Irwin–Hall, which is a 12-section eleventh-order polynomial approximation to the normal distribution. This random deviate will have a limited range of (−6, 6). Note that in a true normal distribution, only 0.00034% of all samples will fall outside ±6σ. * The Box–Muller transform, Box–Muller method uses two independent random numbers ''U'' and ''V'' distributed uniform distribution (continuous), uniformly on (0,1). Then the two random variables ''X'' and ''Y'' X = \sqrt \, \cos(2 \pi V) , \qquad Y = \sqrt \, \sin(2 \pi V) . will both have the standard normal distribution, and will be
independent Independent or Independents may refer to: Arts, entertainment, and media Artist groups * Independents (artist group), a group of modernist painters based in the New Hope, Pennsylvania, area of the United States during the early 1930s * Independ ...
. This formulation arises because for a bivariate normal random vector (''X'', ''Y'') the squared norm will have the
chi-squared distribution In probability theory and statistics, the chi-squared distribution (also chi-square or \chi^2-distribution) with k degrees of freedom is the distribution of a sum of the squares of k independent standard normal random variables. The chi-squa ...
with two degrees of freedom, which is an easily generated exponential distribution, exponential random variable corresponding to the quantity −2ln(''U'') in these equations; and the angle is distributed uniformly around the circle, chosen by the random variable ''V''. * The Marsaglia polar method is a modification of the Box–Muller method which does not require computation of the sine and cosine functions. In this method, ''U'' and ''V'' are drawn from the uniform (−1,1) distribution, and then is computed. If ''S'' is greater or equal to 1, then the method starts over, otherwise the two quantities X = U\sqrt, \qquad Y = V\sqrt are returned. Again, ''X'' and ''Y'' are independent, standard normal random variables. * The Ratio method is a rejection method. The algorithm proceeds as follows: ** Generate two independent uniform deviates ''U'' and ''V''; ** Compute ''X'' = (''V'' − 0.5)/''U''; ** Optional: if ''X''2 ≤ 5 − 4''e''1/4''U'' then accept ''X'' and terminate algorithm; ** Optional: if ''X''2 ≥ 4''e''−1.35/''U'' + 1.4 then reject ''X'' and start over from step 1; ** If ''X''2 ≤ −4 ln''U'' then accept ''X'', otherwise start over the algorithm. *:The two optional steps allow the evaluation of the logarithm in the last step to be avoided in most cases. These steps can be greatly improved so that the logarithm is rarely evaluated. * The ziggurat algorithm is faster than the Box–Muller transform and still exact. In about 97% of all cases it uses only two random numbers, one random integer and one random uniform, one multiplication and an if-test. Only in 3% of the cases, where the combination of those two falls outside the "core of the ziggurat" (a kind of rejection sampling using logarithms), do exponentials and more uniform random numbers have to be employed. * Integer arithmetic can be used to sample from the standard normal distribution. This method is exact in the sense that it satisfies the conditions of ''ideal approximation''; i.e., it is equivalent to sampling a real number from the standard normal distribution and rounding this to the nearest representable floating point number. * There is also some investigation into the connection between the fast Hadamard transform and the normal distribution, since the transform employs just addition and subtraction and by the central limit theorem random numbers from almost any distribution will be transformed into the normal distribution. In this regard a series of Hadamard transforms can be combined with random permutations to turn arbitrary data sets into a normally distributed data.


Numerical approximations for the normal CDF and normal quantile function

The standard normal cumulative distribution function, CDF is widely used in scientific and statistical computing. The values Φ(''x'') may be approximated very accurately by a variety of methods, such as numerical integration, Taylor series, asymptotic series and Gauss's continued fraction#Of Kummer's confluent hypergeometric function, continued fractions. Different approximations are used depending on the desired level of accuracy. * give the approximation for Φ(''x'') for ''x > 0'' with the absolute error (algorith
26.2.17
: \Phi(x) = 1 - \varphi(x)\left(b_1 t + b_2 t^2 + b_3t^3 + b_4 t^4 + b_5 t^5\right) + \varepsilon(x), \qquad t = \frac, where ''ϕ''(''x'') is the standard normal PDF, and ''b''0 = 0.2316419, ''b''1 = 0.319381530, ''b''2 = −0.356563782, ''b''3 = 1.781477937, ''b''4 = −1.821255978, ''b''5 = 1.330274429. * lists some dozens of approximations – by means of rational functions, with or without exponentials – for the function. His algorithms vary in the degree of complexity and the resulting precision, with maximum absolute precision of 24 digits. An algorithm by combines Hart's algorithm 5666 with a continued fraction approximation in the tail to provide a fast computation algorithm with a 16-digit precision. * after recalling Hart68 solution is not suited for erf, gives a solution for both erf and erfc, with maximal relative error bound, via rational function, Rational Chebyshev Approximation. * suggested a simple algorithm based on the Taylor series expansion \Phi(x) = \frac12 + \varphi(x)\left( x + \frac 3 + \frac + \frac + \frac + \cdots \right) for calculating with arbitrary precision. The drawback of this algorithm is comparatively slow calculation time (for example it takes over 300 iterations to calculate the function with 16 digits of precision when ). * The GNU Scientific Library calculates values of the standard normal CDF using Hart's algorithms and approximations with Chebyshev polynomials. Shore (1982) introduced simple approximations that may be incorporated in stochastic optimization models of engineering and operations research, like reliability engineering and inventory analysis. Denoting , the simplest approximation for the quantile function is: z = \Phi^(p)=5.5556\left[1- \left( \frac p \right)^\right],\qquad p\ge 1/2 This approximation delivers for ''z'' a maximum absolute error of 0.026 (for , corresponding to ). For replace ''p'' by and change sign. Another approximation, somewhat less accurate, is the single-parameter approximation: z=-0.4115\left\, \qquad p\ge 1/2 The latter had served to derive a simple approximation for the loss integral of the normal distribution, defined by \begin L(z) & =\int_z^\infty (u-z)\varphi(u) \, du=\int_z^\infty [1-\Phi (u)] \, du \\[5pt] L(z) & \approx \begin 0.4115\left(\dfrac p \right) - z, & p<1/2, \\ \\ 0.4115\left( \dfrac p \right), & p\ge 1/2. \end \\[5pt] \text \\ L(z) & \approx \begin 0.4115\left\, & p < 1/2, \\ \\ 0.4115 \dfrac p, & p\ge 1/2. \end \end This approximation is particularly accurate for the right far-tail (maximum error of 10−3 for z≥1.4). Highly accurate approximations for the CDF, based on Response modeling methodology, Response Modeling Methodology (RMM, Shore, 2011, 2012), are shown in Shore (2005). Some more approximations can be found at: Error function#Approximation with elementary functions. In particular, small ''relative'' error on the whole domain for the CDF \Phi and the quantile function \Phi^ as well, is achieved via an explicitly invertible formula by Sergei Winitzki in 2008.


History


Development

Some authors attribute the credit for the discovery of the normal distribution to Abraham de Moivre, de Moivre, who in 1738 published in the second edition of his "''The Doctrine of Chances''" the study of the coefficients in the binomial expansion of . De Moivre proved that the middle term in this expansion has the approximate magnitude of 2^n/\sqrt, and that "If ''m'' or ''n'' be a Quantity infinitely great, then the Logarithm of the Ratio, which a Term distant from the middle by the Interval ''ℓ'', has to the middle Term, is -\frac." Although this theorem can be interpreted as the first obscure expression for the normal probability law, Stephen Stigler, Stigler points out that de Moivre himself did not interpret his results as anything more than the approximate rule for the binomial coefficients, and in particular de Moivre lacked the concept of the probability density function. In 1823 Carl Friedrich Gauss, Gauss published his monograph "''Theoria combinationis observationum erroribus minimis obnoxiae''" where among other things he introduces several important statistical concepts, such as the method of least squares, the method of maximum likelihood, and the ''normal distribution''. Gauss used ''M'', , to denote the measurements of some unknown quantity ''V'', and sought the "most probable" estimator of that quantity: the one that maximizes the probability of obtaining the observed experimental results. In his notation φΔ is the probability density function of the measurement errors of magnitude Δ. Not knowing what the function ''φ'' is, Gauss requires that his method should reduce to the well-known answer: the arithmetic mean of the measured values. Starting from these principles, Gauss demonstrates that the only law that rationalizes the choice of arithmetic mean as an estimator of the location parameter, is the normal law of errors: \varphi\mathit = \frac h \, e^, where ''h'' is "the measure of the precision of the observations". Using this normal law as a generic model for errors in the experiments, Gauss formulates what is now known as the non-linear least squares, non-linear weighted least squares method. Although Gauss was the first to suggest the normal distribution law, Pierre Simon de Laplace, Laplace made significant contributions. It was Laplace who first posed the problem of aggregating several observations in 1774, although his own solution led to the Laplacian distribution. It was Laplace who first calculated the value of the Gaussian integral, integral in 1782, providing the normalization constant for the normal distribution. Finally, it was Laplace who in 1810 proved and presented to the Academy the fundamental
central limit theorem In probability theory, the central limit theorem (CLT) establishes that, in many situations, when independent random variables are summed up, their properly normalized sum tends toward a normal distribution even if the original variables themselv ...
, which emphasized the theoretical importance of the normal distribution. It is of interest to note that in 1809 an Irish-American mathematician Robert Adrain published two insightful but flawed derivations of the normal probability law, simultaneously and independently from Gauss. His works remained largely unnoticed by the scientific community, until in 1871 they were exhumed by Cleveland Abbe, Abbe. In the middle of the 19th century James Clerk Maxwell, Maxwell demonstrated that the normal distribution is not just a convenient mathematical tool, but may also occur in natural phenomena: "The number of particles whose velocity, resolved in a certain direction, lies between ''x'' and ''x'' + ''dx'' is \operatorname \frac\; e^ \, dx


Naming

Today, the concept is usually known in English as the normal distribution or Gaussian distribution. Other less common names include Gauss distribution, Laplace-Gauss distribution, the law of error, the law of facility of errors, Laplace's second law, Gaussian law. Gauss himself apparently coined the term with reference to the "normal equations" involved in its applications, with normal having its technical meaning of orthogonal rather than "usual". However, by the end of the 19th century some authors had started using the name ''normal distribution'', where the word "normal" was used as an adjective – the term now being seen as a reflection of the fact that this distribution was seen as typical, common – and thus "normal". Charles Sanders Peirce, Peirce (one of those authors) once defined "normal" thus: "...the 'normal' is not the average (or any other kind of mean) of what actually occurs, but of what ''would'', in the long run, occur under certain circumstances." Around the turn of the 20th century Karl Pearson, Pearson popularized the term ''normal'' as a designation for this distribution. Also, it was Pearson who first wrote the distribution in terms of the standard deviation ''σ'' as in modern notation. Soon after this, in year 1915, Ronald Fisher, Fisher added the location parameter to the formula for normal distribution, expressing it in the way it is written nowadays: df = \frac e^ \, dx. The term "standard normal", which denotes the normal distribution with zero mean and unit variance came into general use around the 1950s, appearing in the popular textbooks by P. G. Hoel (1947) "''Introduction to mathematical statistics''" and A. M. Mood (1950) "''Introduction to the theory of statistics''".


See also

* Bates distribution – similar to the Irwin–Hall distribution, but rescaled back into the 0 to 1 range * Behrens–Fisher problem – the long-standing problem of testing whether two normal samples with different variances have same means; * Bhattacharyya distance – method used to separate mixtures of normal distributions * Erdős–Kac theorem – on the occurrence of the normal distribution in number theory * Full width at half maximum * Gaussian blur – convolution, which uses the normal distribution as a kernel * Modified half-normal distribution with the pdf on (0, \infty) is given as f(x)= \frac, where \Psi(\alpha,z)=_1\Psi_1\left(\begin\left(\alpha,\frac\right)\\(1,0)\end;z \right) denotes the Fox-Wright Psi function. * Normally distributed and uncorrelated does not imply independent * Ratio normal distribution * Reciprocal normal distribution * Standard normal table * Stein's lemma * Sub-Gaussian distribution * Sum of normally distributed random variables * Tweedie distribution – The normal distribution is a member of the family of Tweedie exponential dispersion models. * Wrapped normal distribution – the Normal distribution applied to a circular domain * Z-test – using the normal distribution


Notes


References


Citations


Sources

* * In particular, the entries fo
"bell-shaped and bell curve"
an

* * * * * * * * * * * * * * * * * * * * * * * * Translated by Stephen M. Stigler in ''Statistical Science'' 1 (3), 1986: . * * * * * * * * * * * * * * * * * * * * * * * * * * * *


External links

*
Normal distribution calculator
{{Authority control Normal distribution, Continuous distributions Conjugate prior distributions Exponential family distributions Stable distributions Location-scale family probability distributions]">X, ^p \right&= \sigma^p \cdot 2^ \frac _1F_1\left( -\frac, \frac, -\frac \left( \frac \mu \sigma \right)^2 \right). \end These expressions remain valid even if p is not an integer. See also Hermite polynomials#"Negative variance", generalized Hermite polynomials. The expectation of X conditioned on the event that X lies in an interval ,b/math> is given by :\operatorname\left \mid a= \mu - \sigma^2\frac where f and F respectively are the density and the cumulative distribution function of X. For b=\infty this is known as the
inverse Mills ratio In probability theory, the Mills ratio (or Mills's ratio) of a continuous random variable X is the function : m(x) := \frac , where f(x) is the probability density function, and :\bar(x) := \Pr x.html" ;"title=">x">>x= \int_x^ f(u)\, du is the ...
. Note that above, density f of X is used instead of standard normal density as in inverse Mills ratio, so here we have \sigma^2 instead of \sigma.


Fourier transform and characteristic function

The
Fourier transform A Fourier transform (FT) is a mathematical transform that decomposes functions into frequency components, which are represented by the output of the transform as a function of frequency. Most commonly functions of time or space are transformed, ...
of a normal density f with mean \mu and standard deviation \sigma is : \hat f(t) = \int_^\infty f(x)e^ \, dx = e^ e^ where i is the
imaginary unit The imaginary unit or unit imaginary number () is a solution to the quadratic equation x^2+1=0. Although there is no real number with this property, can be used to extend the real numbers to what are called complex numbers, using addition an ...
. If the mean \mu=0, the first factor is 1, and the Fourier transform is, apart from a constant factor, a normal density on the
frequency domain In physics, electronics, control systems engineering, and statistics, the frequency domain refers to the analysis of mathematical functions or signals with respect to frequency, rather than time. Put simply, a time-domain graph shows how a signa ...
, with mean 0 and standard deviation 1/\sigma. In particular, the standard normal distribution \varphi is an
eigenfunction In mathematics, an eigenfunction of a linear operator ''D'' defined on some function space is any non-zero function f in that space that, when acted upon by ''D'', is only multiplied by some scaling factor called an eigenvalue. As an equation, th ...
of the Fourier transform. In probability theory, the Fourier transform of the probability distribution of a real-valued random variable X is closely connected to the
characteristic function In mathematics, the term "characteristic function" can refer to any of several distinct concepts: * The indicator function of a subset, that is the function ::\mathbf_A\colon X \to \, :which for a given subset ''A'' of ''X'', has value 1 at points ...
\varphi_X(t) of that variable, which is defined as the
expected value In probability theory, the expected value (also called expectation, expectancy, mathematical expectation, mean, average, or first moment) is a generalization of the weighted average. Informally, the expected value is the arithmetic mean of a l ...
of e^, as a function of the real variable t (the
frequency Frequency is the number of occurrences of a repeating event per unit of time. It is also occasionally referred to as ''temporal frequency'' for clarity, and is distinct from ''angular frequency''. Frequency is measured in hertz (Hz) which is eq ...
parameter of the Fourier transform). This definition can be analytically extended to a complex-value variable t. The relation between both is: :\varphi_X(t) = \hat f(-t)


Moment and cumulant generating functions

The
moment generating function In probability theory and statistics, the moment-generating function of a real-valued random variable is an alternative specification of its probability distribution. Thus, it provides the basis of an alternative route to analytical results compare ...
of a real random variable X is the expected value of e^, as a function of the real parameter t. For a normal distribution with density f, mean \mu and deviation \sigma, the moment generating function exists and is equal to :M(t) = \operatorname ^= \hat f(it) = e^ e^ The
cumulant generating function In probability theory and statistics, the cumulants of a probability distribution are a set of quantities that provide an alternative to the '' moments'' of the distribution. Any two probability distributions whose moments are identical will have ...
is the logarithm of the moment generating function, namely :g(t) = \ln M(t) = \mu t + \tfrac 12 \sigma^2 t^2 Since this is a quadratic polynomial in t, only the first two
cumulant In probability theory and statistics, the cumulants of a probability distribution are a set of quantities that provide an alternative to the '' moments'' of the distribution. Any two probability distributions whose moments are identical will ha ...
s are nonzero, namely the mean \mu and the variance \sigma^2.


Stein operator and class

Within
Stein's method Stein's method is a general method in probability theory to obtain bounds on the distance between two probability distributions with respect to a probability metric. It was introduced by Charles Stein, who first published it in 1972, to obtain ...
the Stein operator and class of a random variable X \sim \mathcal(\mu, \sigma^2) are \mathcalf(x) = \sigma^2 f'(x) - (x-\mu)f(x) and \mathcal the class of all absolutely continuous functions f : \R \to \R \mbox\mathbb[, f'(X), ]< \infty.


Zero-variance limit

In the limit (mathematics), limit when \sigma tends to zero, the probability density f(x) eventually tends to zero at any x\ne \mu, but grows without limit if x = \mu, while its integral remains equal to 1. Therefore, the normal distribution cannot be defined as an ordinary
function Function or functionality may refer to: Computing * Function key, a type of key on computer keyboards * Function model, a structured representation of processes in a system * Function object or functor or functionoid, a concept of object-oriente ...
when \sigma = 0. However, one can define the normal distribution with zero variance as a
generalized function In mathematics, generalized functions are objects extending the notion of functions. There is more than one recognized theory, for example the theory of distributions. Generalized functions are especially useful in making discontinuous functions ...
; specifically, as Dirac's "delta function" \delta translated by the mean \mu, that is f(x)=\delta(x-\mu). Its CDF is then the
Heaviside step function The Heaviside step function, or the unit step function, usually denoted by or (but sometimes , or ), is a step function, named after Oliver Heaviside (1850–1925), the value of which is zero for negative arguments and one for positive argume ...
translated by the mean \mu, namely :F(x) = \begin 0 & \textx < \mu \\ 1 & \textx \geq \mu \end


Maximum entropy

Of all probability distributions over the reals with a specified mean \mu and variance \sigma^2, the normal distribution N(\mu,\sigma^2) is the one with maximum entropy. If X is a
continuous random variable In probability theory and statistics, a probability distribution is the mathematical function that gives the probabilities of occurrence of different possible outcomes for an experiment. It is a mathematical description of a random phenomenon i ...
with
probability density In probability theory, a probability density function (PDF), or density of a continuous random variable, is a function whose value at any given sample (or point) in the sample space (the set of possible values taken by the random variable) can ...
f(x), then the entropy of X is defined as : H(X) = - \int_^\infty f(x)\log f(x)\, dx where f(x)\log f(x) is understood to be zero whenever f(x)=0. This functional can be maximized, subject to the constraints that the distribution is properly normalized and has a specified variance, by using
variational calculus The calculus of variations (or Variational Calculus) is a field of mathematical analysis that uses variations, which are small changes in functions and functionals, to find maxima and minima of functionals: mappings from a set of functions t ...
. A function with two
Lagrange multipliers In mathematical optimization, the method of Lagrange multipliers is a strategy for finding the local maxima and minima of a function subject to equality constraints (i.e., subject to the condition that one or more equations have to be satisfied ex ...
is defined: : L=\int_^\infty f(x)\ln(f(x))\,dx-\lambda_0\left(1-\int_^\infty f(x)\,dx\right)-\lambda\left(\sigma^2-\int_^\infty f(x)(x-\mu)^2\,dx\right) where f(x) is, for now, regarded as some density function with mean \mu and standard deviation \sigma. At maximum entropy, a small variation \delta f(x) about f(x) will produce a variation \delta L about L which is equal to 0: : 0=\delta L=\int_^\infty \delta f(x)\left (\ln(f(x))+1+\lambda_0+\lambda(x-\mu)^2\right )\,dx Since this must hold for any small \delta f(x), the term in brackets must be zero, and solving for f(x) yields: :f(x)=e^ Using the constraint equations to solve for \lambda_0 and \lambda yields the density of the normal distribution: : f(x, \mu, \sigma)=\frace^ The entropy of a normal distribution is equal to : H(X)=\tfrac(1+\log(2\sigma^2\pi))


Other properties


Related distributions


Central limit theorem

The central limit theorem states that under certain (fairly common) conditions, the sum of many random variables will have an approximately normal distribution. More specifically, where X_1,\ldots ,X_n are
independent and identically distributed In probability theory and statistics, a collection of random variables is independent and identically distributed if each random variable has the same probability distribution as the others and all are mutually independent. This property is usua ...
random variables with the same arbitrary distribution, zero mean, and variance \sigma^2 and Z is their mean scaled by \sqrt : Z = \sqrt\left(\frac\sum_^n X_i\right) Then, as n increases, the probability distribution of Z will tend to the normal distribution with zero mean and variance \sigma^2. The theorem can be extended to variables (X_i) that are not independent and/or not identically distributed if certain constraints are placed on the degree of dependence and the moments of the distributions. Many
test statistic A test statistic is a statistic (a quantity derived from the sample) used in statistical hypothesis testing.Berger, R. L.; Casella, G. (2001). ''Statistical Inference'', Duxbury Press, Second Edition (p.374) A hypothesis test is typically specif ...
s, scores, and
estimator In statistics, an estimator is a rule for calculating an estimate of a given quantity based on observed data: thus the rule (the estimator), the quantity of interest (the estimand) and its result (the estimate) are distinguished. For example, the ...
s encountered in practice contain sums of certain random variables in 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 distributions. The central limit theorem also implies that certain distributions can be approximated by the normal distribution, for example: * The
binomial distribution In probability theory and statistics, the binomial distribution with parameters ''n'' and ''p'' is the discrete probability distribution of the number of successes in a sequence of ''n'' independent experiments, each asking a yes–no quest ...
B(n,p) is approximately normal with mean np and variance np(1-p) for large n and for p not too close to 0 or 1. * The
Poisson distribution In probability theory and statistics, the Poisson distribution is a discrete probability distribution that expresses the probability of a given number of events occurring in a fixed interval of time or space if these events occur with a known co ...
with parameter \lambda is approximately normal with mean \lambda and variance \lambda, for large values of \lambda. * The
chi-squared distribution In probability theory and statistics, the chi-squared distribution (also chi-square or \chi^2-distribution) with k degrees of freedom is the distribution of a sum of the squares of k independent standard normal random variables. The chi-squa ...
\chi^2(k) is approximately normal with mean k and variance 2k, for large k. * The
Student's t-distribution In probability and statistics, Student's ''t''-distribution (or simply the ''t''-distribution) is any member of a family of continuous probability distributions that arise when estimating the mean of a normally distributed population in sit ...
t(\nu) is approximately normal with mean 0 and variance 1 when \nu is large. Whether these approximations are sufficiently accurate depends on the purpose for which they are needed, and the rate of convergence to the normal distribution. It is typically the case that such approximations are less accurate in the tails of the distribution. A general upper bound for the approximation error in the central limit theorem is given by the
Berry–Esseen theorem In probability theory, the central limit theorem states that, under certain circumstances, the probability distribution of the scaled mean of a random sample converges to a normal distribution as the sample size increases to infinity. Under strong ...
, improvements of the approximation are given by the
Edgeworth expansion The Gram–Charlier A series (named in honor of Jørgen Pedersen Gram and Carl Charlier), and the Edgeworth series (named in honor of Francis Ysidro Edgeworth) are series that approximate a probability distribution in terms of its cumulants. The se ...
s. This theorem can also be used to justify modeling the sum of many uniform noise sources as
Gaussian noise Gaussian noise, named after Carl Friedrich Gauss, is a term from signal processing theory denoting a kind of signal noise that has a probability density function (pdf) equal to that of the normal distribution (which is also known as the Gaussia ...
. See
AWGN Additive white Gaussian noise (AWGN) is a basic noise model used in information theory to mimic the effect of many random processes that occur in nature. The modifiers denote specific characteristics: * ''Additive'' because it is added to any nois ...
.


Operations and functions of normal variables

The
probability density In probability theory, a probability density function (PDF), or density of a continuous random variable, is a function whose value at any given sample (or point) in the sample space (the set of possible values taken by the random variable) can ...
,
cumulative distribution In statistics, the frequency (or absolute frequency) of an event i is the number n_i of times the observation has occurred/recorded in an experiment or study. These frequencies are often depicted graphically or in tabular form. Types The cumul ...
, and inverse cumulative distribution of any function of one or more independent or correlated normal variables can be computed with the numerical method of ray-tracing
Matlab code
. In the following sections we look at some special cases.


Operations on a single normal variable

If X is distributed normally with mean \mu and variance \sigma^2, then * aX+b, for any real numbers a and b, is also normally distributed, with mean a\mu+b and standard deviation , a, \sigma. That is, the family of normal distributions is closed under linear transformations. * The exponential of X is distributed log-normally: . * The absolute value of X has
folded normal distribution The folded normal distribution is a probability distribution related to the normal distribution. Given a normally distributed random variable ''X'' with mean ''μ'' and variance ''σ''2, the random variable ''Y'' = , ''X'', has a folded normal d ...
: . If \mu = 0 this is known as the
half-normal distribution In probability theory and statistics, the half-normal distribution is a special case of the folded normal distribution. Let X follow an ordinary normal distribution, N(0,\sigma^2). Then, Y=, X, follows a half-normal distribution. Thus, the hal ...
. * The absolute value of normalized residuals, , ''X'' − ''μ'', /''σ'', has
chi distribution In probability theory and statistics, the chi distribution is a continuous probability distribution. It is the distribution of the positive square root of the sum of squares of a set of independent random variables each following a standard norm ...
with one degree of freedom: , X - \mu, / \sigma \sim \chi_1. * The square of ''X''/''σ'' has the
noncentral chi-squared distribution In probability theory and statistics, the noncentral chi-squared distribution (or noncentral chi-square distribution, noncentral \chi^2 distribution) is a noncentral generalization of the chi-squared distribution. It often arises in the power a ...
with one degree of freedom: X^2 / \sigma^2 \sim \chi_1^2(\mu^2 / \sigma^2). If \mu = 0, the distribution is called simply chi-squared. * The log likelihood of a normal variable x is simply the log of its
probability density function In probability theory, a probability density function (PDF), or density of a continuous random variable, is a function whose value at any given sample (or point) in the sample space (the set of possible values taken by the random variable) can ...
: \ln p(x)= -\frac \left(\frac \right)^2 -\ln \left(\sigma \sqrt \right) = -\frac z^2 -\ln \left(\sigma \sqrt \right). Since this is a scaled and shifted square of a standard normal variable, it is distributed as a scaled and shifted chi-squared variable. * The distribution of the variable ''X'' restricted to an interval 'a'', ''b''is called the
truncated normal distribution In probability and statistics, the truncated normal distribution is the probability distribution derived from that of a normally distributed random variable by bounding the random variable from either below or above (or both). The truncated no ...
. * (''X'' − ''μ'')−2 has a
Lévy distribution In probability theory and statistics, the Lévy distribution, named after Paul Lévy, is a continuous probability distribution for a non-negative random variable. In spectroscopy, this distribution, with frequency as the dependent variable, is kn ...
with location 0 and scale ''σ''−2.


= Operations on two independent normal variables

= * If X_1 and X_2 are two
independent Independent or Independents may refer to: Arts, entertainment, and media Artist groups * Independents (artist group), a group of modernist painters based in the New Hope, Pennsylvania, area of the United States during the early 1930s * Independ ...
normal random variables, with means \mu_1, \mu_2 and standard deviations \sigma_1, \sigma_2, then their sum X_1 + X_2 will also be normally distributed, roof/sup> with mean \mu_1 + \mu_2 and variance \sigma_1^2 + \sigma_2^2. * In particular, if X and Y are independent normal deviates with zero mean and variance \sigma^2, then X + Y and X - Y are also independent and normally distributed, with zero mean and variance 2\sigma^2. This is a special case of the
polarization identity In linear algebra, a branch of mathematics, the polarization identity is any one of a family of formulas that express the inner product of two vectors in terms of the norm of a normed vector space. If a norm arises from an inner product then t ...
. * If X_1, X_2 are two independent normal deviates with mean \mu and deviation \sigma, and a, b are arbitrary real numbers, then the variable X_3 = \frac + \mu is also normally distributed with mean \mu and deviation \sigma. It follows that the normal distribution is
stable A stable is a building in which livestock, especially horses, are kept. It most commonly means a building that is divided into separate stalls for individual animals and livestock. There are many different types of stables in use today; the ...
(with exponent \alpha=2).


= Operations on two independent standard normal variables

= If X_1 and X_2 are two independent standard normal random variables with mean 0 and variance 1, then * Their sum and difference is distributed normally with mean zero and variance two: X_1 \pm X_2 \sim N(0, 2). * Their product Z = X_1 X_2 follows the
product distribution A product distribution is a probability distribution constructed as the distribution of the product of random variables having two other known distributions. Given two statistically independent random variables ''X'' and ''Y'', the distribution of ...
with density function f_Z(z) = \pi^ K_0(, z, ) where K_0 is the
modified Bessel function of the second kind Bessel functions, first defined by the mathematician Daniel Bernoulli and then generalized by Friedrich Bessel, are canonical solutions of Bessel's differential equation x^2 \frac + x \frac + \left(x^2 - \alpha^2 \right)y = 0 for an arbitrary ...
. This distribution is symmetric around zero, unbounded at z = 0, and has the
characteristic function In mathematics, the term "characteristic function" can refer to any of several distinct concepts: * The indicator function of a subset, that is the function ::\mathbf_A\colon X \to \, :which for a given subset ''A'' of ''X'', has value 1 at points ...
\phi_Z(t) = (1 + t^2)^. * Their ratio follows the standard
Cauchy distribution The Cauchy distribution, named after Augustin Cauchy, is a continuous probability distribution. It is also known, especially among physicists, as the Lorentz distribution (after Hendrik Lorentz), Cauchy–Lorentz distribution, Lorentz(ian) fun ...
: X_1/ X_2 \sim \operatorname(0, 1). * Their Euclidean norm \sqrt has the
Rayleigh distribution In probability theory and statistics, the Rayleigh distribution is a continuous probability distribution for nonnegative-valued random variables. Up to rescaling, it coincides with the chi distribution with two degrees of freedom. The distribut ...
.


Operations on multiple independent normal variables

* Any linear combination of independent normal deviates is a normal deviate. * If X_1, X_2, \ldots, X_n are independent standard normal random variables, then the sum of their squares has the
chi-squared distribution In probability theory and statistics, the chi-squared distribution (also chi-square or \chi^2-distribution) with k degrees of freedom is the distribution of a sum of the squares of k independent standard normal random variables. The chi-squa ...
with n degrees of freedom X_1^2 + \cdots + X_n^2 \sim \chi_n^2. * If X_1, X_2, \ldots, X_n are independent normally distributed random variables with means \mu and variances \sigma^2, then their
sample mean The sample mean (or "empirical mean") and the sample covariance are statistics computed from a Sample (statistics), sample of data on one or more random variables. The sample mean is the average value (or mean, mean value) of a sample (statistic ...
is independent from the sample
standard deviation In statistics, the standard deviation is a measure of the amount of variation or dispersion of a set of values. A low standard deviation indicates that the values tend to be close to the mean (also called the expected value) of the set, while ...
, which can be demonstrated using Basu's theorem or
Cochran's theorem In statistics, Cochran's theorem, devised by William G. Cochran, is a theorem used to justify results relating to the probability distributions of statistics that are used in the analysis of variance. Statement Let ''U''1, ..., ''U'N'' be i.i. ...
. The ratio of these two quantities will have the
Student's t-distribution In probability and statistics, Student's ''t''-distribution (or simply the ''t''-distribution) is any member of a family of continuous probability distributions that arise when estimating the mean of a normally distributed population in sit ...
with n-1 degrees of freedom: t = \frac = \frac \sim t_. * If X_1, X_2, \ldots, X_n, Y_1, Y_2, \ldots, Y_m are independent standard normal random variables, then the ratio of their normalized sums of squares will have the with degrees of freedom: F = \frac \sim F_.


Operations on multiple correlated normal variables

* A
quadratic form In mathematics, a quadratic form is a polynomial with terms all of degree two ("form" is another name for a homogeneous polynomial). For example, :4x^2 + 2xy - 3y^2 is a quadratic form in the variables and . The coefficients usually belong to a ...
of a normal vector, i.e. a quadratic function q = \sum x_i^2 + \sum x_j + c of multiple independent or correlated normal variables, is a generalized chi-square variable.


Operations on the density function

The split normal distribution is most directly defined in terms of joining scaled sections of the density functions of different normal distributions and rescaling the density to integrate to one. The
truncated normal distribution In probability and statistics, the truncated normal distribution is the probability distribution derived from that of a normally distributed random variable by bounding the random variable from either below or above (or both). The truncated no ...
results from rescaling a section of a single density function.


Infinite divisibility and Cramér's theorem

For any positive integer \text, any normal distribution with mean \mu and variance \sigma^2 is the distribution of the sum of \text independent normal deviates, each with mean \frac and variance \frac. This property is called
infinite divisibility Infinite divisibility arises in different ways in philosophy, physics, economics, order theory (a branch of mathematics), and probability theory (also a branch of mathematics). One may speak of infinite divisibility, or the lack thereof, of matter ...
. Conversely, if X_1 and X_2 are independent random variables and their sum X_1+X_2 has a normal distribution, then both X_1 and X_2 must be normal deviates. This result is known as Cramér's decomposition theorem, and is equivalent to saying that the convolution of two distributions is normal if and only if both are normal. Cramér's theorem implies that a linear combination of independent non-Gaussian variables will never have an exactly normal distribution, although it may approach it arbitrarily closely.


Bernstein's theorem

Bernstein's theorem states that if X and Y are independent and X + Y and X - Y are also independent, then both ''X'' and ''Y'' must necessarily have normal distributions. More generally, if X_1, \ldots, X_n are independent random variables, then two distinct linear combinations \sum and \sumwill be independent if and only if all X_k are normal and \sum, where \sigma_k^2 denotes the variance of X_k.


Extensions

The notion of normal distribution, being one of the most important distributions in probability theory, has been extended far beyond the standard framework of the univariate (that is one-dimensional) case (Case 1). All these extensions are also called ''normal'' or ''Gaussian'' laws, so a certain ambiguity in names exists. * The
multivariate normal distribution In probability theory and statistics, the multivariate normal distribution, multivariate Gaussian distribution, or joint normal distribution is a generalization of the one-dimensional (univariate) normal distribution to higher dimensions. One d ...
describes the Gaussian law in the ''k''-dimensional Euclidean space. A vector is multivariate-normally distributed if any linear combination of its components has a (univariate) normal distribution. The variance of ''X'' is a ''k×k'' symmetric positive-definite matrix ''V''. The multivariate normal distribution is a special case of the
elliptical distribution In probability and statistics, an elliptical distribution is any member of a broad family of probability distributions that generalize the multivariate normal distribution. Intuitively, in the simplified two and three dimensional case, the joint di ...
s. As such, its iso-density loci in the ''k'' = 2 case are ellipses and in the case of arbitrary ''k'' are ellipsoids. * Rectified Gaussian distribution a rectified version of normal distribution with all the negative elements reset to 0 * Complex normal distribution deals with the complex normal vectors. A complex vector is said to be normal if both its real and imaginary components jointly possess a 2''k''-dimensional multivariate normal distribution. The variance-covariance structure of ''X'' is described by two matrices: the ''variance'' matrix Γ, and the ''relation'' matrix ''C''. * Matrix normal distribution describes the case of normally distributed matrices. * Gaussian processes are the normally distributed stochastic processes. These can be viewed as elements of some infinite-dimensional Hilbert space ''H'', and thus are the analogues of multivariate normal vectors for the case . A random element is said to be normal if for any constant the scalar product has a (univariate) normal distribution. The variance structure of such Gaussian random element can be described in terms of the linear ''covariance ''. Several Gaussian processes became popular enough to have their own names: ** Wiener process, Brownian motion, ** Brownian bridge, ** Ornstein–Uhlenbeck process. * Gaussian q-distribution is an abstract mathematical construction that represents a "q-analogue" of the normal distribution. * the q-Gaussian is an analogue of the Gaussian distribution, in the sense that it maximises the Tsallis entropy, and is one type of Tsallis distribution. Note that this distribution is different from the Gaussian q-distribution above. * The Kaniadakis Gaussian distribution, Kaniadakis ''κ''-Gaussian distribution is a generalization of the Gaussian distribution which arises from the Kaniadakis statistics, being one of the Kaniadakis distribution, Kaniadakis distributions. A random variable ''X'' has a two-piece normal distribution if it has a distribution : f_X( x ) = N( \mu, \sigma_1^2 ) \text x \le \mu : f_X( x ) = N( \mu, \sigma_2^2 ) \text x \ge \mu where ''μ'' is the mean and ''σ''1 and ''σ''2 are the standard deviations of the distribution to the left and right of the mean respectively. The mean, variance and third central moment of this distribution have been determined : \operatorname( X ) = \mu + \sqrt ( \sigma_2 - \sigma_1 ) : \operatorname( X ) = \left( 1 - \frac 2 \pi\right)( \sigma_2 - \sigma_1 )^2 + \sigma_1 \sigma_2 : \operatorname( X ) = \sqrt( \sigma_2 - \sigma_1 ) \left[ \left( \frac 4 \pi - 1 \right) ( \sigma_2 - \sigma_1)^2 + \sigma_1 \sigma_2 \right] where E(''X''), V(''X'') and T(''X'') are the mean, variance, and third central moment respectively. One of the main practical uses of the Gaussian law is to model the empirical distributions of many different random variables encountered in practice. In such case a possible extension would be a richer family of distributions, having more than two parameters and therefore being able to fit the empirical distribution more accurately. The examples of such extensions are: * Pearson distribution — a four-parameter family of probability distributions that extend the normal law to include different skewness and kurtosis values. * The generalized normal distribution, also known as the exponential power distribution, allows for distribution tails with thicker or thinner asymptotic behaviors.


Statistical inference


Estimation of parameters

It is often the case that we do not know the parameters of the normal distribution, but instead want to Estimation theory, estimate them. That is, having a sample (x_1, \ldots, x_n) from a normal N(\mu, \sigma^2) population we would like to learn the approximate values of parameters \mu and \sigma^2. The standard approach to this problem is the maximum likelihood method, which requires maximization of the ''log-likelihood function'': : \ln\mathcal(\mu,\sigma^2) = \sum_^n \ln f(x_i\mid\mu,\sigma^2) = -\frac\ln(2\pi) - \frac\ln\sigma^2 - \frac\sum_^n (x_i-\mu)^2. Taking derivatives with respect to \mu and \sigma^2 and solving the resulting system of first order conditions yields the ''maximum likelihood estimates'': : \hat = \overline \equiv \frac\sum_^n x_i, \qquad \hat^2 = \frac \sum_^n (x_i - \overline)^2.


Sample mean

Estimator \textstyle\hat\mu is called the ''
sample mean The sample mean (or "empirical mean") and the sample covariance are statistics computed from a Sample (statistics), sample of data on one or more random variables. The sample mean is the average value (or mean, mean value) of a sample (statistic ...
'', since it is the arithmetic mean of all observations. The statistic \textstyle\overline is complete statistic, complete and sufficient statistic, sufficient for \mu, and therefore by the Lehmann–Scheffé theorem, \textstyle\hat\mu is the uniformly minimum variance unbiased (UMVU) estimator. In finite samples it is distributed normally: : \hat\mu \sim \mathcal(\mu,\sigma^2/n). The variance of this estimator is equal to the ''μμ''-element of the inverse Fisher information matrix \textstyle\mathcal^. This implies that the estimator is efficient estimator, finite-sample efficient. Of practical importance is the fact that the standard error (statistics), standard error of \textstyle\hat\mu is proportional to \textstyle1/\sqrt, that is, if one wishes to decrease the standard error by a factor of 10, one must increase the number of points in the sample by a factor of 100. This fact is widely used in determining sample sizes for opinion polls and the number of trials in Monte Carlo simulations. From the standpoint of the asymptotic theory (statistics), asymptotic theory, \textstyle\hat\mu is consistent estimator, consistent, that is, it convergence in probability, converges in probability to \mu as n\rightarrow\infty. The estimator is also asymptotic normality, asymptotically normal, which is a simple corollary of the fact that it is normal in finite samples: : \sqrt(\hat\mu-\mu) \,\xrightarrow\, \mathcal(0,\sigma^2).


Sample variance

The estimator \textstyle\hat\sigma^2 is called the ''sample variance'', since it is the variance of the sample ((x_1, \ldots, x_n)). In practice, another estimator is often used instead of the \textstyle\hat\sigma^2. This other estimator is denoted s^2, and is also called the ''sample variance'', which represents a certain ambiguity in terminology; its square root s is called the ''sample standard deviation''. The estimator s^2 differs from \textstyle\hat\sigma^2 by having instead of ''n'' in the denominator (the so-called Bessel's correction): : s^2 = \frac \hat\sigma^2 = \frac \sum_^n (x_i - \overline)^2. The difference between s^2 and \textstyle\hat\sigma^2 becomes negligibly small for large ''n''s. In finite samples however, the motivation behind the use of s^2 is that it is an unbiased estimator of the underlying parameter \sigma^2, whereas \textstyle\hat\sigma^2 is biased. Also, by the Lehmann–Scheffé theorem the estimator s^2 is uniformly minimum variance unbiased (Minimum-variance unbiased estimator, UMVU), which makes it the "best" estimator among all unbiased ones. However it can be shown that the biased estimator \textstyle\hat\sigma^2 is "better" than the s^2 in terms of the mean squared error (MSE) criterion. In finite samples both s^2 and \textstyle\hat\sigma^2 have scaled
chi-squared distribution In probability theory and statistics, the chi-squared distribution (also chi-square or \chi^2-distribution) with k degrees of freedom is the distribution of a sum of the squares of k independent standard normal random variables. The chi-squa ...
with degrees of freedom: : s^2 \sim \frac \cdot \chi^2_, \qquad \hat\sigma^2 \sim \frac \cdot \chi^2_. The first of these expressions shows that the variance of s^2 is equal to 2\sigma^4/(n-1), which is slightly greater than the ''σσ''-element of the inverse Fisher information matrix \textstyle\mathcal^. Thus, s^2 is not an efficient estimator for \sigma^2, and moreover, since s^2 is UMVU, we can conclude that the finite-sample efficient estimator for \sigma^2 does not exist. Applying the asymptotic theory, both estimators s^2 and \textstyle\hat\sigma^2 are consistent, that is they converge in probability to \sigma^2 as the sample size n\rightarrow\infty. The two estimators are also both asymptotically normal: : \sqrt(\hat\sigma^2 - \sigma^2) \simeq \sqrt(s^2-\sigma^2) \,\xrightarrow\, \mathcal(0,2\sigma^4). In particular, both estimators are asymptotically efficient for \sigma^2.


Confidence intervals

By
Cochran's theorem In statistics, Cochran's theorem, devised by William G. Cochran, is a theorem used to justify results relating to the probability distributions of statistics that are used in the analysis of variance. Statement Let ''U''1, ..., ''U'N'' be i.i. ...
, for normal distributions the sample mean \textstyle\hat\mu and the sample variance ''s''2 are
independent Independent or Independents may refer to: Arts, entertainment, and media Artist groups * Independents (artist group), a group of modernist painters based in the New Hope, Pennsylvania, area of the United States during the early 1930s * Independ ...
, which means there can be no gain in considering their joint distribution. There is also a converse theorem: if in a sample the sample mean and sample variance are independent, then the sample must have come from the normal distribution. The independence between \textstyle\hat\mu and ''s'' can be employed to construct the so-called ''t-statistic'': : t = \frac = \frac \sim t_ This quantity ''t'' has the
Student's t-distribution In probability and statistics, Student's ''t''-distribution (or simply the ''t''-distribution) is any member of a family of continuous probability distributions that arise when estimating the mean of a normally distributed population in sit ...
with degrees of freedom, and it is an ancillary statistic (independent of the value of the parameters). Inverting the distribution of this ''t''-statistics will allow us to construct the
confidence interval In frequentist statistics, a confidence interval (CI) is a range of estimates for an unknown parameter. A confidence interval is computed at a designated ''confidence level''; the 95% confidence level is most common, but other levels, such as 9 ...
for ''μ''; similarly, inverting the ''χ''2 distribution of the statistic ''s''2 will give us the confidence interval for ''σ''2: :\mu \in \left[ \hat\mu - t_ \fracs, \hat\mu + t_ \fracs \right], :\sigma^2 \in \left[ \frac, \frac \right], where ''tk,p'' and are the ''p''th
quantile In statistics and probability, quantiles are cut points dividing the range of a probability distribution into continuous intervals with equal probabilities, or dividing the observations in a sample in the same way. There is one fewer quantile tha ...
s of the ''t''- and ''χ''2-distributions respectively. These confidence intervals are of the ''confidence level'' , meaning that the true values ''μ'' and ''σ''2 fall outside of these intervals with probability (or significance level) ''α''. In practice people usually take , resulting in the 95% confidence intervals. Approximate formulas can be derived from the asymptotic distributions of \textstyle\hat\mu and ''s''2: :\mu \in \left[ \hat\mu - , z_, \fracs, \hat\mu + , z_, \fracs \right], :\sigma^2 \in \left[ s^2 - , z_, \fracs^2, s^2 + , z_, \fracs^2 \right], The approximate formulas become valid for large values of ''n'', and are more convenient for the manual calculation since the standard normal quantiles ''z''''α''/2 do not depend on ''n''. In particular, the most popular value of , results in .


Normality tests

Normality tests assess the likelihood that the given data set comes from a normal distribution. Typically the null hypothesis ''H''0 is that the observations are distributed normally with unspecified mean ''μ'' and variance ''σ''2, versus the alternative ''Ha'' that the distribution is arbitrary. Many tests (over 40) have been devised for this problem. The more prominent of them are outlined below: Diagnostic plots are more intuitively appealing but subjective at the same time, as they rely on informal human judgement to accept or reject the null hypothesis. *
Q–Q plot In statistics, a Q–Q plot (quantile-quantile plot) is a probability plot, a List of graphical methods, graphical method for comparing two probability distributions by plotting their ''quantiles'' against each other. A point on the plot co ...
, also known as normal probability plot or rankit plot—is a plot of the sorted values from the data set against the expected values of the corresponding quantiles from the standard normal distribution. That is, it's a plot of point of the form (Φ−1(''pk''), ''x''(''k'')), where plotting points ''pk'' are equal to ''pk'' = (''k'' − ''α'')/(''n'' + 1 − 2''α'') and ''α'' is an adjustment constant, which can be anything between 0 and 1. If the null hypothesis is true, the plotted points should approximately lie on a straight line. * P–P plot – similar to the Q–Q plot, but used much less frequently. This method consists of plotting the points (Φ(''z''(''k'')), ''pk''), where \textstyle z_ = (x_-\hat\mu)/\hat\sigma. For normally distributed data this plot should lie on a 45° line between (0, 0) and (1, 1). Goodness-of-fit tests: ''Moment-based tests'': * D'Agostino's K-squared test * Jarque–Bera test * Shapiro–Wilk test: This is based on the fact that the line in the Q–Q plot has the slope of ''σ''. The test compares the least squares estimate of that slope with the value of the sample variance, and rejects the null hypothesis if these two quantities differ significantly. ''Tests based on the empirical distribution function'': * Anderson–Darling test * Lilliefors test (an adaptation of the Kolmogorov–Smirnov test)


Bayesian analysis of the normal distribution

Bayesian analysis of normally distributed data is complicated by the many different possibilities that may be considered: * Either the mean, or the variance, or neither, may be considered a fixed quantity. * When the variance is unknown, analysis may be done directly in terms of the variance, or in terms of the
precision Precision, precise or precisely may refer to: Science, and technology, and mathematics Mathematics and computing (general) * Accuracy and precision, measurement deviation from true value and its scatter * Significant figures, the number of digit ...
, the reciprocal of the variance. The reason for expressing the formulas in terms of precision is that the analysis of most cases is simplified. * Both univariate and multivariate normal distribution, multivariate cases need to be considered. * Either conjugate prior, conjugate or improper prior, improper prior distributions may be placed on the unknown variables. * An additional set of cases occurs in Bayesian linear regression, where in the basic model the data is assumed to be normally distributed, and normal priors are placed on the regression coefficients. The resulting analysis is similar to the basic cases of independent identically distributed data. The formulas for the non-linear-regression cases are summarized in the conjugate prior article.


Sum of two quadratics


= Scalar form

= The following auxiliary formula is useful for simplifying the posterior distribution, posterior update equations, which otherwise become fairly tedious. :a(x-y)^2 + b(x-z)^2 = (a + b)\left(x - \frac\right)^2 + \frac(y-z)^2 This equation rewrites the sum of two quadratics in ''x'' by expanding the squares, grouping the terms in ''x'', and completing the square. Note the following about the complex constant factors attached to some of the terms: # The factor \frac has the form of a weighted average of ''y'' and ''z''. # \frac = \frac = (a^ + b^)^. This shows that this factor can be thought of as resulting from a situation where the Multiplicative inverse, reciprocals of quantities ''a'' and ''b'' add directly, so to combine ''a'' and ''b'' themselves, it's necessary to reciprocate, add, and reciprocate the result again to get back into the original units. This is exactly the sort of operation performed by the harmonic mean, so it is not surprising that \frac is one-half the harmonic mean of ''a'' and ''b''.


= Vector form

= A similar formula can be written for the sum of two vector quadratics: If x, y, z are vectors of length ''k'', and A and B are symmetric matrix, symmetric, invertible matrices of size k\times k, then : \begin & (\mathbf-\mathbf)'\mathbf(\mathbf-\mathbf) + (\mathbf-\mathbf)' \mathbf(\mathbf-\mathbf) \\ = & (\mathbf - \mathbf)'(\mathbf+\mathbf)(\mathbf - \mathbf) + (\mathbf - \mathbf)'(\mathbf^ + \mathbf^)^(\mathbf - \mathbf) \end where :\mathbf = (\mathbf + \mathbf)^(\mathbf\mathbf + \mathbf \mathbf) Note that the form x′ A x is called a
quadratic form In mathematics, a quadratic form is a polynomial with terms all of degree two ("form" is another name for a homogeneous polynomial). For example, :4x^2 + 2xy - 3y^2 is a quadratic form in the variables and . The coefficients usually belong to a ...
and is a scalar (mathematics), scalar: :\mathbf'\mathbf\mathbf = \sum_a_ x_i x_j In other words, it sums up all possible combinations of products of pairs of elements from x, with a separate coefficient for each. In addition, since x_i x_j = x_j x_i, only the sum a_ + a_ matters for any off-diagonal elements of A, and there is no loss of generality in assuming that A is symmetric matrix, symmetric. Furthermore, if A is symmetric, then the form \mathbf'\mathbf\mathbf = \mathbf'\mathbf\mathbf.


Sum of differences from the mean

Another useful formula is as follows: \sum_^n (x_i-\mu)^2 = \sum_^n (x_i-\bar)^2 + n(\bar -\mu)^2 where \bar = \frac \sum_^n x_i.


With known variance

For a set of i.i.d. normally distributed data points X of size ''n'' where each individual point ''x'' follows x \sim \mathcal(\mu, \sigma^2) with known
variance In probability theory and statistics, variance is the expectation of the squared deviation of a random variable from its population mean or sample mean. Variance is a measure of dispersion, meaning it is a measure of how far a set of numbers ...
σ2, the conjugate prior distribution is also normally distributed. This can be shown more easily by rewriting the variance as the
precision Precision, precise or precisely may refer to: Science, and technology, and mathematics Mathematics and computing (general) * Accuracy and precision, measurement deviation from true value and its scatter * Significant figures, the number of digit ...
, i.e. using τ = 1/σ2. Then if x \sim \mathcal(\mu, 1/\tau) and \mu \sim \mathcal(\mu_0, 1/\tau_0), we proceed as follows. First, the likelihood function is (using the formula above for the sum of differences from the mean): :\begin p(\mathbf\mid\mu,\tau) &= \prod_^n \sqrt \exp\left(-\frac\tau(x_i-\mu)^2\right) \\ &= \left(\frac\right)^ \exp\left(-\frac\tau \sum_^n (x_i-\mu)^2\right) \\ &= \left(\frac\right)^ \exp\left[-\frac\tau \left(\sum_^n(x_i-\bar)^2 + n(\bar -\mu)^2\right)\right]. \end Then, we proceed as follows: :\begin p(\mu\mid\mathbf) &\propto p(\mathbf\mid\mu) p(\mu) \\ & = \left(\frac\right)^ \exp\left[-\frac\tau \left(\sum_^n(x_i-\bar)^2 + n(\bar -\mu)^2\right)\right] \sqrt \exp\left(-\frac\tau_0(\mu-\mu_0)^2\right) \\ &\propto \exp\left(-\frac\left(\tau\left(\sum_^n(x_i-\bar)^2 + n(\bar -\mu)^2\right) + \tau_0(\mu-\mu_0)^2\right)\right) \\ &\propto \exp\left(-\frac \left(n\tau(\bar-\mu)^2 + \tau_0(\mu-\mu_0)^2 \right)\right) \\ &= \exp\left(-\frac(n\tau + \tau_0)\left(\mu - \dfrac\right)^2 + \frac(\bar - \mu_0)^2\right) \\ &\propto \exp\left(-\frac(n\tau + \tau_0)\left(\mu - \dfrac\right)^2\right) \end In the above derivation, we used the formula above for the sum of two quadratics and eliminated all constant factors not involving ''μ''. The result is the kernel (statistics), kernel of a normal distribution, with mean \frac and precision n\tau + \tau_0, i.e. :p(\mu\mid\mathbf) \sim \mathcal\left(\frac, \frac\right) This can be written as a set of Bayesian update equations for the posterior parameters in terms of the prior parameters: :\begin \tau_0' &= \tau_0 + n\tau \\[5pt] \mu_0' &= \frac \\[5pt] \bar &= \frac\sum_^n x_i \end That is, to combine ''n'' data points with total precision of ''nτ'' (or equivalently, total variance of ''n''/''σ''2) and mean of values \bar, derive a new total precision simply by adding the total precision of the data to the prior total precision, and form a new mean through a ''precision-weighted average'', i.e. a weighted average of the data mean and the prior mean, each weighted by the associated total precision. This makes logical sense if the precision is thought of as indicating the certainty of the observations: In the distribution of the posterior mean, each of the input components is weighted by its certainty, and the certainty of this distribution is the sum of the individual certainties. (For the intuition of this, compare the expression "the whole is (or is not) greater than the sum of its parts". In addition, consider that the knowledge of the posterior comes from a combination of the knowledge of the prior and likelihood, so it makes sense that we are more certain of it than of either of its components.) The above formula reveals why it is more convenient to do Bayesian analysis of conjugate priors for the normal distribution in terms of the precision. The posterior precision is simply the sum of the prior and likelihood precisions, and the posterior mean is computed through a precision-weighted average, as described above. The same formulas can be written in terms of variance by reciprocating all the precisions, yielding the more ugly formulas :\begin ' &= \frac \\[5pt] \mu_0' &= \frac \\[5pt] \bar &= \frac\sum_^n x_i \end


With known mean

For a set of i.i.d. normally distributed data points X of size ''n'' where each individual point ''x'' follows x \sim \mathcal(\mu, \sigma^2) with known mean μ, the conjugate prior of the
variance In probability theory and statistics, variance is the expectation of the squared deviation of a random variable from its population mean or sample mean. Variance is a measure of dispersion, meaning it is a measure of how far a set of numbers ...
has an inverse gamma distribution or a scaled inverse chi-squared distribution. The two are equivalent 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. The prior for σ2 is as follows: :p(\sigma^2\mid\nu_0,\sigma_0^2) = \frac~\frac \propto \frac The likelihood function from above, written in terms of the variance, is: :\begin p(\mathbf\mid\mu,\sigma^2) &= \left(\frac\right)^ \exp\left[-\frac \sum_^n (x_i-\mu)^2\right] \\ &= \left(\frac\right)^ \exp\left[-\frac\right] \end where :S = \sum_^n (x_i-\mu)^2. Then: :\begin p(\sigma^2\mid\mathbf) &\propto p(\mathbf\mid\sigma^2) p(\sigma^2) \\ &= \left(\frac\right)^ \exp\left[-\frac\right] \frac~\frac \\ &\propto \left(\frac\right)^ \frac \exp\left[-\frac + \frac\right] \\ &= \frac \exp\left[-\frac\right] \end The above is also a scaled inverse chi-squared distribution where :\begin \nu_0' &= \nu_0 + n \\ \nu_0'' &= \nu_0 \sigma_0^2 + \sum_^n (x_i-\mu)^2 \end or equivalently :\begin \nu_0' &= \nu_0 + n \\ ' &= \frac \end Reparameterizing in terms of an inverse gamma distribution, the result is: :\begin \alpha' &= \alpha + \frac \\ \beta' &= \beta + \frac \end


With unknown mean and unknown variance

For a set of i.i.d. normally distributed data points X of size ''n'' where each individual point ''x'' follows x \sim \mathcal(\mu, \sigma^2) with unknown mean μ and unknown
variance In probability theory and statistics, variance is the expectation of the squared deviation of a random variable from its population mean or sample mean. Variance is a measure of dispersion, meaning it is a measure of how far a set of numbers ...
σ2, a combined (multivariate) conjugate prior is placed over the mean and variance, consisting of a normal-inverse-gamma distribution. Logically, this originates as follows: # From the analysis of the case with unknown mean but known variance, we see that the update equations involve sufficient statistics computed from the data consisting of the mean of the data points and the total variance of the data points, computed in turn from the known variance divided by the number of data points. # From the analysis of the case with unknown variance but known mean, we see that the update equations involve sufficient statistics over the data consisting of the number of data points and sum of squared deviations. # Keep in mind that the posterior update values serve as the prior distribution when further data is handled. Thus, we should logically think of our priors in terms of the sufficient statistics just described, with the same semantics kept in mind as much as possible. # To handle the case where both mean and variance are unknown, we could place independent priors over the mean and variance, with fixed estimates of the average mean, total variance, number of data points used to compute the variance prior, and sum of squared deviations. Note however that in reality, the total variance of the mean depends on the unknown variance, and the sum of squared deviations that goes into the variance prior (appears to) depend on the unknown mean. In practice, the latter dependence is relatively unimportant: Shifting the actual mean shifts the generated points by an equal amount, and on average the squared deviations will remain the same. This is not the case, however, with the total variance of the mean: As the unknown variance increases, the total variance of the mean will increase proportionately, and we would like to capture this dependence. # This suggests that we create a ''conditional prior'' of the mean on the unknown variance, with a hyperparameter specifying the mean of the pseudo-observations associated with the prior, and another parameter specifying the number of pseudo-observations. This number serves as a scaling parameter on the variance, making it possible to control the overall variance of the mean relative to the actual variance parameter. The prior for the variance also has two hyperparameters, one specifying the sum of squared deviations of the pseudo-observations associated with the prior, and another specifying once again the number of pseudo-observations. Note that each of the priors has a hyperparameter specifying the number of pseudo-observations, and in each case this controls the relative variance of that prior. These are given as two separate hyperparameters so that the variance (aka the confidence) of the two priors can be controlled separately. # This leads immediately to the normal-inverse-gamma distribution, which is the product of the two distributions just defined, with conjugate priors used (an inverse gamma distribution over the variance, and a normal distribution over the mean, ''conditional'' on the variance) and with the same four parameters just defined. The priors are normally defined as follows: :\begin p(\mu\mid\sigma^2; \mu_0, n_0) &\sim \mathcal(\mu_0,\sigma^2/n_0) \\ p(\sigma^2; \nu_0,\sigma_0^2) &\sim I\chi^2(\nu_0,\sigma_0^2) = IG(\nu_0/2, \nu_0\sigma_0^2/2) \end The update equations can be derived, and look as follows: :\begin \bar &= \frac 1 n \sum_^n x_i \\ \mu_0' &= \frac \\ n_0' &= n_0 + n \\ \nu_0' &= \nu_0 + n \\ \nu_0'' &= \nu_0 \sigma_0^2 + \sum_^n (x_i-\bar)^2 + \frac(\mu_0 - \bar)^2 \end The respective numbers of pseudo-observations add the number of actual observations to them. The new mean hyperparameter is once again a weighted average, this time weighted by the relative numbers of observations. Finally, the update for \nu_0'' is similar to the case with known mean, but in this case the sum of squared deviations is taken with respect to the observed data mean rather than the true mean, and as a result a new "interaction term" needs to be added to take care of the additional error source stemming from the deviation between prior and data mean.


Occurrence and applications

The occurrence of normal distribution in practical problems can be loosely classified into four categories: # Exactly normal distributions; # Approximately normal laws, for example when such approximation is justified by the
central limit theorem In probability theory, the central limit theorem (CLT) establishes that, in many situations, when independent random variables are summed up, their properly normalized sum tends toward a normal distribution even if the original variables themselv ...
; and # Distributions modeled as normal – the normal distribution being the distribution with Principle of maximum entropy, maximum entropy for a given mean and variance. # Regression problems – the normal distribution being found after systematic effects have been modeled sufficiently well.


Exact normality

Certain quantities in physics are distributed normally, as was first demonstrated by James Clerk Maxwell. Examples of such quantities are: * Probability density function of a ground state in a quantum harmonic oscillator. * The position of a particle that experiences diffusion. If initially the particle is located at a specific point (that is its probability distribution is the Dirac delta function), then after time ''t'' its location is described by a normal distribution with variance ''t'', which satisfies the diffusion equation \frac f(x,t) = \frac \frac f(x,t). If the initial location is given by a certain density function g(x), then the density at time ''t'' is the convolution of ''g'' and the normal PDF.


Approximate normality

''Approximately'' normal distributions occur in many situations, as explained by the
central limit theorem In probability theory, the central limit theorem (CLT) establishes that, in many situations, when independent random variables are summed up, their properly normalized sum tends toward a normal distribution even if the original variables themselv ...
. When the outcome is produced by many small effects acting ''additively and independently'', its distribution will be close to normal. The normal approximation will not be valid if the effects act multiplicatively (instead of additively), or if there is a single external influence that has a considerably larger magnitude than the rest of the effects. * In counting problems, where the central limit theorem includes a discrete-to-continuum approximation and where Infinite divisibility, infinitely divisible and Indecomposable distribution, decomposable distributions are involved, such as ** binomial distribution, Binomial random variables, associated with binary response variables; ** Poisson distribution, Poisson random variables, associated with rare events; * Thermal radiation has a Bose–Einstein statistics, Bose–Einstein distribution on very short time scales, and a normal distribution on longer timescales due to the central limit theorem.


Assumed normality

There are statistical methods to empirically test that assumption; see the above #Normality tests, Normality tests section. * In biology, the ''logarithm'' of various variables tend to have a normal distribution, that is, they tend to have a
log-normal distribution In probability theory, a log-normal (or lognormal) distribution is a continuous probability distribution of a random variable whose logarithm is normally distributed. Thus, if the random variable is log-normally distributed, then has a normal ...
(after separation on male/female subpopulations), with examples including: ** Measures of size of living tissue (length, height, skin area, weight); ** The ''length'' of ''inert'' appendages (hair, claws, nails, teeth) of biological specimens, ''in the direction of growth''; presumably the thickness of tree bark also falls under this category; ** Certain physiological measurements, such as blood pressure of adult humans. * In finance, in particular the Black–Scholes model, changes in the ''logarithm'' of exchange rates, price indices, and stock market indices are assumed normal (these variables behave like compound interest, not like simple interest, and so are multiplicative). Some mathematicians such as Benoit Mandelbrot have argued that Levy skew alpha-stable distribution, log-Levy distributions, which possesses heavy tails would be a more appropriate model, in particular for the analysis for stock market crashes. The use of the assumption of normal distribution occurring in financial models has also been criticized by Nassim Nicholas Taleb in his works. * Propagation of uncertainty, Measurement errors in physical experiments are often modeled by a normal distribution. This use of a normal distribution does not imply that one is assuming the measurement errors are normally distributed, rather using the normal distribution produces the most conservative predictions possible given only knowledge about the mean and variance of the errors. * In Standardized testing (statistics), standardized testing, results can be made to have a normal distribution by either selecting the number and difficulty of questions (as in the Intelligence quotient, IQ test) or transforming the raw test scores into "output" scores by fitting them to the normal distribution. For example, the SAT's traditional range of 200–800 is based on a normal distribution with a mean of 500 and a standard deviation of 100. * Many scores are derived from the normal distribution, including percentile ranks ("percentiles" or "quantiles"), normal curve equivalents, stanines, Standard score, z-scores, and T-scores. Additionally, some behavioral statistical procedures assume that scores are normally distributed; for example, Student's t-test, t-tests and Analysis of variance, ANOVAs. Bell curve grading assigns relative grades based on a normal distribution of scores. * In hydrology the distribution of long duration river discharge or rainfall, e.g. monthly and yearly totals, is often thought to be practically normal according to the
central limit theorem In probability theory, the central limit theorem (CLT) establishes that, in many situations, when independent random variables are summed up, their properly normalized sum tends toward a normal distribution even if the original variables themselv ...
. The blue picture, made with CumFreq, illustrates an example of fitting the normal distribution to ranked October rainfalls showing the 90% confidence belt based on the
binomial distribution In probability theory and statistics, the binomial distribution with parameters ''n'' and ''p'' is the discrete probability distribution of the number of successes in a sequence of ''n'' independent experiments, each asking a yes–no quest ...
. The rainfall data are represented by plotting positions as part of the cumulative frequency analysis.


Methodological problems and peer review

John Ioannidis argues that using normally distributed standard deviations as standards for validating research findings leave falsifiability, falsifiable predictions about phenomena that are not normally distributed untested. This includes, for example, phenomena that only appear when all necessary conditions are present and one cannot be a substitute for another in an addition-like way and phenomena that are not randomly distributed. Ioannidis argues that standard deviation-centered validation gives a false appearance of validity to hypotheses and theories where some but not all falsifiable predictions are normally distributed since the portion of falsifiable predictions that there is evidence against may and in some cases are in the non-normally distributed parts of the range of falsifiable predictions, as well as baselessly dismissing hypotheses for which none of the falsifiable predictions are normally distributed as if were they unfalsifiable when in fact they do make falsifiable predictions. It is argued by Ioannidis that many cases of mutually exclusive theories being accepted as "validated" by research journals are caused by failure of the journals to take in empirical falsifications of non-normally distributed predictions, and not because mutually exclusive theories are true, which they cannot be, although two mutually exclusive theories can both be wrong and a third one correct.


Computational methods


Generating values from normal distribution

In computer simulations, especially in applications of the Monte-Carlo method, it is often desirable to generate values that are normally distributed. The algorithms listed below all generate the standard normal deviates, since a can be generated as , where ''Z'' is standard normal. All these algorithms rely on the availability of a random number generator ''U'' capable of producing Uniform distribution (continuous), uniform random variates. * The most straightforward method is based on the probability integral transform property: if ''U'' is distributed uniformly on (0,1), then Φ−1(''U'') will have the standard normal distribution. The drawback of this method is that it relies on calculation of the
probit function In probability theory and statistics, the probit function is the quantile function associated with the standard normal distribution. It has applications in data analysis and machine learning, in particular exploratory statistical graphics and ...
Φ−1, which cannot be done analytically. Some approximate methods are described in and in the error function, erf article. Wichura gives a fast algorithm for computing this function to 16 decimal places, which is used by R programming language, R to compute random variates of the normal distribution. * Irwin–Hall distribution#Approximating a Normal distribution, An easy-to-program approximate approach that relies on the
central limit theorem In probability theory, the central limit theorem (CLT) establishes that, in many situations, when independent random variables are summed up, their properly normalized sum tends toward a normal distribution even if the original variables themselv ...
is as follows: generate 12 uniform ''U''(0,1) deviates, add them all up, and subtract 6 – the resulting random variable will have approximately standard normal distribution. In truth, the distribution will be Irwin–Hall distribution, Irwin–Hall, which is a 12-section eleventh-order polynomial approximation to the normal distribution. This random deviate will have a limited range of (−6, 6). Note that in a true normal distribution, only 0.00034% of all samples will fall outside ±6σ. * The Box–Muller transform, Box–Muller method uses two independent random numbers ''U'' and ''V'' distributed uniform distribution (continuous), uniformly on (0,1). Then the two random variables ''X'' and ''Y'' X = \sqrt \, \cos(2 \pi V) , \qquad Y = \sqrt \, \sin(2 \pi V) . will both have the standard normal distribution, and will be
independent Independent or Independents may refer to: Arts, entertainment, and media Artist groups * Independents (artist group), a group of modernist painters based in the New Hope, Pennsylvania, area of the United States during the early 1930s * Independ ...
. This formulation arises because for a bivariate normal random vector (''X'', ''Y'') the squared norm will have the
chi-squared distribution In probability theory and statistics, the chi-squared distribution (also chi-square or \chi^2-distribution) with k degrees of freedom is the distribution of a sum of the squares of k independent standard normal random variables. The chi-squa ...
with two degrees of freedom, which is an easily generated exponential distribution, exponential random variable corresponding to the quantity −2ln(''U'') in these equations; and the angle is distributed uniformly around the circle, chosen by the random variable ''V''. * The Marsaglia polar method is a modification of the Box–Muller method which does not require computation of the sine and cosine functions. In this method, ''U'' and ''V'' are drawn from the uniform (−1,1) distribution, and then is computed. If ''S'' is greater or equal to 1, then the method starts over, otherwise the two quantities X = U\sqrt, \qquad Y = V\sqrt are returned. Again, ''X'' and ''Y'' are independent, standard normal random variables. * The Ratio method is a rejection method. The algorithm proceeds as follows: ** Generate two independent uniform deviates ''U'' and ''V''; ** Compute ''X'' = (''V'' − 0.5)/''U''; ** Optional: if ''X''2 ≤ 5 − 4''e''1/4''U'' then accept ''X'' and terminate algorithm; ** Optional: if ''X''2 ≥ 4''e''−1.35/''U'' + 1.4 then reject ''X'' and start over from step 1; ** If ''X''2 ≤ −4 ln''U'' then accept ''X'', otherwise start over the algorithm. *:The two optional steps allow the evaluation of the logarithm in the last step to be avoided in most cases. These steps can be greatly improved so that the logarithm is rarely evaluated. * The ziggurat algorithm is faster than the Box–Muller transform and still exact. In about 97% of all cases it uses only two random numbers, one random integer and one random uniform, one multiplication and an if-test. Only in 3% of the cases, where the combination of those two falls outside the "core of the ziggurat" (a kind of rejection sampling using logarithms), do exponentials and more uniform random numbers have to be employed. * Integer arithmetic can be used to sample from the standard normal distribution. This method is exact in the sense that it satisfies the conditions of ''ideal approximation''; i.e., it is equivalent to sampling a real number from the standard normal distribution and rounding this to the nearest representable floating point number. * There is also some investigation into the connection between the fast Hadamard transform and the normal distribution, since the transform employs just addition and subtraction and by the central limit theorem random numbers from almost any distribution will be transformed into the normal distribution. In this regard a series of Hadamard transforms can be combined with random permutations to turn arbitrary data sets into a normally distributed data.


Numerical approximations for the normal CDF and normal quantile function

The standard normal cumulative distribution function, CDF is widely used in scientific and statistical computing. The values Φ(''x'') may be approximated very accurately by a variety of methods, such as numerical integration, Taylor series, asymptotic series and Gauss's continued fraction#Of Kummer's confluent hypergeometric function, continued fractions. Different approximations are used depending on the desired level of accuracy. * give the approximation for Φ(''x'') for ''x > 0'' with the absolute error (algorith
26.2.17
: \Phi(x) = 1 - \varphi(x)\left(b_1 t + b_2 t^2 + b_3t^3 + b_4 t^4 + b_5 t^5\right) + \varepsilon(x), \qquad t = \frac, where ''ϕ''(''x'') is the standard normal PDF, and ''b''0 = 0.2316419, ''b''1 = 0.319381530, ''b''2 = −0.356563782, ''b''3 = 1.781477937, ''b''4 = −1.821255978, ''b''5 = 1.330274429. * lists some dozens of approximations – by means of rational functions, with or without exponentials – for the function. His algorithms vary in the degree of complexity and the resulting precision, with maximum absolute precision of 24 digits. An algorithm by combines Hart's algorithm 5666 with a continued fraction approximation in the tail to provide a fast computation algorithm with a 16-digit precision. * after recalling Hart68 solution is not suited for erf, gives a solution for both erf and erfc, with maximal relative error bound, via rational function, Rational Chebyshev Approximation. * suggested a simple algorithm based on the Taylor series expansion \Phi(x) = \frac12 + \varphi(x)\left( x + \frac 3 + \frac + \frac + \frac + \cdots \right) for calculating with arbitrary precision. The drawback of this algorithm is comparatively slow calculation time (for example it takes over 300 iterations to calculate the function with 16 digits of precision when ). * The GNU Scientific Library calculates values of the standard normal CDF using Hart's algorithms and approximations with Chebyshev polynomials. Shore (1982) introduced simple approximations that may be incorporated in stochastic optimization models of engineering and operations research, like reliability engineering and inventory analysis. Denoting , the simplest approximation for the quantile function is: z = \Phi^(p)=5.5556\left[1- \left( \frac p \right)^\right],\qquad p\ge 1/2 This approximation delivers for ''z'' a maximum absolute error of 0.026 (for , corresponding to ). For replace ''p'' by and change sign. Another approximation, somewhat less accurate, is the single-parameter approximation: z=-0.4115\left\, \qquad p\ge 1/2 The latter had served to derive a simple approximation for the loss integral of the normal distribution, defined by \begin L(z) & =\int_z^\infty (u-z)\varphi(u) \, du=\int_z^\infty [1-\Phi (u)] \, du \\[5pt] L(z) & \approx \begin 0.4115\left(\dfrac p \right) - z, & p<1/2, \\ \\ 0.4115\left( \dfrac p \right), & p\ge 1/2. \end \\[5pt] \text \\ L(z) & \approx \begin 0.4115\left\, & p < 1/2, \\ \\ 0.4115 \dfrac p, & p\ge 1/2. \end \end This approximation is particularly accurate for the right far-tail (maximum error of 10−3 for z≥1.4). Highly accurate approximations for the CDF, based on Response modeling methodology, Response Modeling Methodology (RMM, Shore, 2011, 2012), are shown in Shore (2005). Some more approximations can be found at: Error function#Approximation with elementary functions. In particular, small ''relative'' error on the whole domain for the CDF \Phi and the quantile function \Phi^ as well, is achieved via an explicitly invertible formula by Sergei Winitzki in 2008.


History


Development

Some authors attribute the credit for the discovery of the normal distribution to Abraham de Moivre, de Moivre, who in 1738 published in the second edition of his "''The Doctrine of Chances''" the study of the coefficients in the binomial expansion of . De Moivre proved that the middle term in this expansion has the approximate magnitude of 2^n/\sqrt, and that "If ''m'' or ''n'' be a Quantity infinitely great, then the Logarithm of the Ratio, which a Term distant from the middle by the Interval ''ℓ'', has to the middle Term, is -\frac." Although this theorem can be interpreted as the first obscure expression for the normal probability law, Stephen Stigler, Stigler points out that de Moivre himself did not interpret his results as anything more than the approximate rule for the binomial coefficients, and in particular de Moivre lacked the concept of the probability density function. In 1823 Carl Friedrich Gauss, Gauss published his monograph "''Theoria combinationis observationum erroribus minimis obnoxiae''" where among other things he introduces several important statistical concepts, such as the method of least squares, the method of maximum likelihood, and the ''normal distribution''. Gauss used ''M'', , to denote the measurements of some unknown quantity ''V'', and sought the "most probable" estimator of that quantity: the one that maximizes the probability of obtaining the observed experimental results. In his notation φΔ is the probability density function of the measurement errors of magnitude Δ. Not knowing what the function ''φ'' is, Gauss requires that his method should reduce to the well-known answer: the arithmetic mean of the measured values. Starting from these principles, Gauss demonstrates that the only law that rationalizes the choice of arithmetic mean as an estimator of the location parameter, is the normal law of errors: \varphi\mathit = \frac h \, e^, where ''h'' is "the measure of the precision of the observations". Using this normal law as a generic model for errors in the experiments, Gauss formulates what is now known as the non-linear least squares, non-linear weighted least squares method. Although Gauss was the first to suggest the normal distribution law, Pierre Simon de Laplace, Laplace made significant contributions. It was Laplace who first posed the problem of aggregating several observations in 1774, although his own solution led to the Laplacian distribution. It was Laplace who first calculated the value of the Gaussian integral, integral in 1782, providing the normalization constant for the normal distribution. Finally, it was Laplace who in 1810 proved and presented to the Academy the fundamental
central limit theorem In probability theory, the central limit theorem (CLT) establishes that, in many situations, when independent random variables are summed up, their properly normalized sum tends toward a normal distribution even if the original variables themselv ...
, which emphasized the theoretical importance of the normal distribution. It is of interest to note that in 1809 an Irish-American mathematician Robert Adrain published two insightful but flawed derivations of the normal probability law, simultaneously and independently from Gauss. His works remained largely unnoticed by the scientific community, until in 1871 they were exhumed by Cleveland Abbe, Abbe. In the middle of the 19th century James Clerk Maxwell, Maxwell demonstrated that the normal distribution is not just a convenient mathematical tool, but may also occur in natural phenomena: "The number of particles whose velocity, resolved in a certain direction, lies between ''x'' and ''x'' + ''dx'' is \operatorname \frac\; e^ \, dx


Naming

Today, the concept is usually known in English as the normal distribution or Gaussian distribution. Other less common names include Gauss distribution, Laplace-Gauss distribution, the law of error, the law of facility of errors, Laplace's second law, Gaussian law. Gauss himself apparently coined the term with reference to the "normal equations" involved in its applications, with normal having its technical meaning of orthogonal rather than "usual". However, by the end of the 19th century some authors had started using the name ''normal distribution'', where the word "normal" was used as an adjective – the term now being seen as a reflection of the fact that this distribution was seen as typical, common – and thus "normal". Charles Sanders Peirce, Peirce (one of those authors) once defined "normal" thus: "...the 'normal' is not the average (or any other kind of mean) of what actually occurs, but of what ''would'', in the long run, occur under certain circumstances." Around the turn of the 20th century Karl Pearson, Pearson popularized the term ''normal'' as a designation for this distribution. Also, it was Pearson who first wrote the distribution in terms of the standard deviation ''σ'' as in modern notation. Soon after this, in year 1915, Ronald Fisher, Fisher added the location parameter to the formula for normal distribution, expressing it in the way it is written nowadays: df = \frac e^ \, dx. The term "standard normal", which denotes the normal distribution with zero mean and unit variance came into general use around the 1950s, appearing in the popular textbooks by P. G. Hoel (1947) "''Introduction to mathematical statistics''" and A. M. Mood (1950) "''Introduction to the theory of statistics''".


See also

* Bates distribution – similar to the Irwin–Hall distribution, but rescaled back into the 0 to 1 range * Behrens–Fisher problem – the long-standing problem of testing whether two normal samples with different variances have same means; * Bhattacharyya distance – method used to separate mixtures of normal distributions * Erdős–Kac theorem – on the occurrence of the normal distribution in number theory * Full width at half maximum * Gaussian blur – convolution, which uses the normal distribution as a kernel * Modified half-normal distribution with the pdf on (0, \infty) is given as f(x)= \frac, where \Psi(\alpha,z)=_1\Psi_1\left(\begin\left(\alpha,\frac\right)\\(1,0)\end;z \right) denotes the Fox-Wright Psi function. * Normally distributed and uncorrelated does not imply independent * Ratio normal distribution * Reciprocal normal distribution * Standard normal table * Stein's lemma * Sub-Gaussian distribution * Sum of normally distributed random variables * Tweedie distribution – The normal distribution is a member of the family of Tweedie exponential dispersion models. * Wrapped normal distribution – the Normal distribution applied to a circular domain * Z-test – using the normal distribution


Notes


References


Citations


Sources

* * In particular, the entries fo
"bell-shaped and bell curve"
an

* * * * * * * * * * * * * * * * * * * * * * * * Translated by Stephen M. Stigler in ''Statistical Science'' 1 (3), 1986: . * * * * * * * * * * * * * * * * * * * * * * * * * * * *


External links

*
Normal distribution calculator
{{Authority control Normal distribution, Continuous distributions Conjugate prior distributions Exponential family distributions Stable distributions Location-scale family probability distributions]">f'(X), \infty.


Zero-variance limit

In the limit (mathematics), limit when \sigma tends to zero, the probability density f(x) eventually tends to zero at any x\ne \mu, but grows without limit if x = \mu, while its integral remains equal to 1. Therefore, the normal distribution cannot be defined as an ordinary
function Function or functionality may refer to: Computing * Function key, a type of key on computer keyboards * Function model, a structured representation of processes in a system * Function object or functor or functionoid, a concept of object-oriente ...
when \sigma = 0. However, one can define the normal distribution with zero variance as a
generalized function In mathematics, generalized functions are objects extending the notion of functions. There is more than one recognized theory, for example the theory of distributions. Generalized functions are especially useful in making discontinuous functions ...
; specifically, as Dirac's "delta function" \delta translated by the mean \mu, that is f(x)=\delta(x-\mu). Its CDF is then the
Heaviside step function The Heaviside step function, or the unit step function, usually denoted by or (but sometimes , or ), is a step function, named after Oliver Heaviside (1850–1925), the value of which is zero for negative arguments and one for positive argume ...
translated by the mean \mu, namely :F(x) = \begin 0 & \textx < \mu \\ 1 & \textx \geq \mu \end


Maximum entropy

Of all probability distributions over the reals with a specified mean \mu and variance \sigma^2, the normal distribution N(\mu,\sigma^2) is the one with maximum entropy. If X is a
continuous random variable In probability theory and statistics, a probability distribution is the mathematical function that gives the probabilities of occurrence of different possible outcomes for an experiment. It is a mathematical description of a random phenomenon i ...
with
probability density In probability theory, a probability density function (PDF), or density of a continuous random variable, is a function whose value at any given sample (or point) in the sample space (the set of possible values taken by the random variable) can ...
f(x), then the entropy of X is defined as : H(X) = - \int_^\infty f(x)\log f(x)\, dx where f(x)\log f(x) is understood to be zero whenever f(x)=0. This functional can be maximized, subject to the constraints that the distribution is properly normalized and has a specified variance, by using
variational calculus The calculus of variations (or Variational Calculus) is a field of mathematical analysis that uses variations, which are small changes in functions and functionals, to find maxima and minima of functionals: mappings from a set of functions t ...
. A function with two
Lagrange multipliers In mathematical optimization, the method of Lagrange multipliers is a strategy for finding the local maxima and minima of a function subject to equality constraints (i.e., subject to the condition that one or more equations have to be satisfied ex ...
is defined: : L=\int_^\infty f(x)\ln(f(x))\,dx-\lambda_0\left(1-\int_^\infty f(x)\,dx\right)-\lambda\left(\sigma^2-\int_^\infty f(x)(x-\mu)^2\,dx\right) where f(x) is, for now, regarded as some density function with mean \mu and standard deviation \sigma. At maximum entropy, a small variation \delta f(x) about f(x) will produce a variation \delta L about L which is equal to 0: : 0=\delta L=\int_^\infty \delta f(x)\left (\ln(f(x))+1+\lambda_0+\lambda(x-\mu)^2\right )\,dx Since this must hold for any small \delta f(x), the term in brackets must be zero, and solving for f(x) yields: :f(x)=e^ Using the constraint equations to solve for \lambda_0 and \lambda yields the density of the normal distribution: : f(x, \mu, \sigma)=\frace^ The entropy of a normal distribution is equal to : H(X)=\tfrac(1+\log(2\sigma^2\pi))


Other properties


Related distributions


Central limit theorem

The central limit theorem states that under certain (fairly common) conditions, the sum of many random variables will have an approximately normal distribution. More specifically, where X_1,\ldots ,X_n are
independent and identically distributed In probability theory and statistics, a collection of random variables is independent and identically distributed if each random variable has the same probability distribution as the others and all are mutually independent. This property is usua ...
random variables with the same arbitrary distribution, zero mean, and variance \sigma^2 and Z is their mean scaled by \sqrt : Z = \sqrt\left(\frac\sum_^n X_i\right) Then, as n increases, the probability distribution of Z will tend to the normal distribution with zero mean and variance \sigma^2. The theorem can be extended to variables (X_i) that are not independent and/or not identically distributed if certain constraints are placed on the degree of dependence and the moments of the distributions. Many
test statistic A test statistic is a statistic (a quantity derived from the sample) used in statistical hypothesis testing.Berger, R. L.; Casella, G. (2001). ''Statistical Inference'', Duxbury Press, Second Edition (p.374) A hypothesis test is typically specif ...
s, scores, and
estimator In statistics, an estimator is a rule for calculating an estimate of a given quantity based on observed data: thus the rule (the estimator), the quantity of interest (the estimand) and its result (the estimate) are distinguished. For example, the ...
s encountered in practice contain sums of certain random variables in 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 distributions. The central limit theorem also implies that certain distributions can be approximated by the normal distribution, for example: * The
binomial distribution In probability theory and statistics, the binomial distribution with parameters ''n'' and ''p'' is the discrete probability distribution of the number of successes in a sequence of ''n'' independent experiments, each asking a yes–no quest ...
B(n,p) is approximately normal with mean np and variance np(1-p) for large n and for p not too close to 0 or 1. * The
Poisson distribution In probability theory and statistics, the Poisson distribution is a discrete probability distribution that expresses the probability of a given number of events occurring in a fixed interval of time or space if these events occur with a known co ...
with parameter \lambda is approximately normal with mean \lambda and variance \lambda, for large values of \lambda. * The
chi-squared distribution In probability theory and statistics, the chi-squared distribution (also chi-square or \chi^2-distribution) with k degrees of freedom is the distribution of a sum of the squares of k independent standard normal random variables. The chi-squa ...
\chi^2(k) is approximately normal with mean k and variance 2k, for large k. * The
Student's t-distribution In probability and statistics, Student's ''t''-distribution (or simply the ''t''-distribution) is any member of a family of continuous probability distributions that arise when estimating the mean of a normally distributed population in sit ...
t(\nu) is approximately normal with mean 0 and variance 1 when \nu is large. Whether these approximations are sufficiently accurate depends on the purpose for which they are needed, and the rate of convergence to the normal distribution. It is typically the case that such approximations are less accurate in the tails of the distribution. A general upper bound for the approximation error in the central limit theorem is given by the
Berry–Esseen theorem In probability theory, the central limit theorem states that, under certain circumstances, the probability distribution of the scaled mean of a random sample converges to a normal distribution as the sample size increases to infinity. Under strong ...
, improvements of the approximation are given by the
Edgeworth expansion The Gram–Charlier A series (named in honor of Jørgen Pedersen Gram and Carl Charlier), and the Edgeworth series (named in honor of Francis Ysidro Edgeworth) are series that approximate a probability distribution in terms of its cumulants. The se ...
s. This theorem can also be used to justify modeling the sum of many uniform noise sources as
Gaussian noise Gaussian noise, named after Carl Friedrich Gauss, is a term from signal processing theory denoting a kind of signal noise that has a probability density function (pdf) equal to that of the normal distribution (which is also known as the Gaussia ...
. See
AWGN Additive white Gaussian noise (AWGN) is a basic noise model used in information theory to mimic the effect of many random processes that occur in nature. The modifiers denote specific characteristics: * ''Additive'' because it is added to any nois ...
.


Operations and functions of normal variables

The
probability density In probability theory, a probability density function (PDF), or density of a continuous random variable, is a function whose value at any given sample (or point) in the sample space (the set of possible values taken by the random variable) can ...
,
cumulative distribution In statistics, the frequency (or absolute frequency) of an event i is the number n_i of times the observation has occurred/recorded in an experiment or study. These frequencies are often depicted graphically or in tabular form. Types The cumul ...
, and inverse cumulative distribution of any function of one or more independent or correlated normal variables can be computed with the numerical method of ray-tracing
Matlab code
. In the following sections we look at some special cases.


Operations on a single normal variable

If X is distributed normally with mean \mu and variance \sigma^2, then * aX+b, for any real numbers a and b, is also normally distributed, with mean a\mu+b and standard deviation , a, \sigma. That is, the family of normal distributions is closed under linear transformations. * The exponential of X is distributed log-normally: . * The absolute value of X has
folded normal distribution The folded normal distribution is a probability distribution related to the normal distribution. Given a normally distributed random variable ''X'' with mean ''μ'' and variance ''σ''2, the random variable ''Y'' = , ''X'', has a folded normal d ...
: . If \mu = 0 this is known as the
half-normal distribution In probability theory and statistics, the half-normal distribution is a special case of the folded normal distribution. Let X follow an ordinary normal distribution, N(0,\sigma^2). Then, Y=, X, follows a half-normal distribution. Thus, the hal ...
. * The absolute value of normalized residuals, , ''X'' − ''μ'', /''σ'', has
chi distribution In probability theory and statistics, the chi distribution is a continuous probability distribution. It is the distribution of the positive square root of the sum of squares of a set of independent random variables each following a standard norm ...
with one degree of freedom: , X - \mu, / \sigma \sim \chi_1. * The square of ''X''/''σ'' has the
noncentral chi-squared distribution In probability theory and statistics, the noncentral chi-squared distribution (or noncentral chi-square distribution, noncentral \chi^2 distribution) is a noncentral generalization of the chi-squared distribution. It often arises in the power a ...
with one degree of freedom: X^2 / \sigma^2 \sim \chi_1^2(\mu^2 / \sigma^2). If \mu = 0, the distribution is called simply chi-squared. * The log likelihood of a normal variable x is simply the log of its
probability density function In probability theory, a probability density function (PDF), or density of a continuous random variable, is a function whose value at any given sample (or point) in the sample space (the set of possible values taken by the random variable) can ...
: \ln p(x)= -\frac \left(\frac \right)^2 -\ln \left(\sigma \sqrt \right) = -\frac z^2 -\ln \left(\sigma \sqrt \right). Since this is a scaled and shifted square of a standard normal variable, it is distributed as a scaled and shifted chi-squared variable. * The distribution of the variable ''X'' restricted to an interval 'a'', ''b''is called the
truncated normal distribution In probability and statistics, the truncated normal distribution is the probability distribution derived from that of a normally distributed random variable by bounding the random variable from either below or above (or both). The truncated no ...
. * (''X'' − ''μ'')−2 has a
Lévy distribution In probability theory and statistics, the Lévy distribution, named after Paul Lévy, is a continuous probability distribution for a non-negative random variable. In spectroscopy, this distribution, with frequency as the dependent variable, is kn ...
with location 0 and scale ''σ''−2.


= Operations on two independent normal variables

= * If X_1 and X_2 are two
independent Independent or Independents may refer to: Arts, entertainment, and media Artist groups * Independents (artist group), a group of modernist painters based in the New Hope, Pennsylvania, area of the United States during the early 1930s * Independ ...
normal random variables, with means \mu_1, \mu_2 and standard deviations \sigma_1, \sigma_2, then their sum X_1 + X_2 will also be normally distributed, roof/sup> with mean \mu_1 + \mu_2 and variance \sigma_1^2 + \sigma_2^2. * In particular, if X and Y are independent normal deviates with zero mean and variance \sigma^2, then X + Y and X - Y are also independent and normally distributed, with zero mean and variance 2\sigma^2. This is a special case of the
polarization identity In linear algebra, a branch of mathematics, the polarization identity is any one of a family of formulas that express the inner product of two vectors in terms of the norm of a normed vector space. If a norm arises from an inner product then t ...
. * If X_1, X_2 are two independent normal deviates with mean \mu and deviation \sigma, and a, b are arbitrary real numbers, then the variable X_3 = \frac + \mu is also normally distributed with mean \mu and deviation \sigma. It follows that the normal distribution is
stable A stable is a building in which livestock, especially horses, are kept. It most commonly means a building that is divided into separate stalls for individual animals and livestock. There are many different types of stables in use today; the ...
(with exponent \alpha=2).


= Operations on two independent standard normal variables

= If X_1 and X_2 are two independent standard normal random variables with mean 0 and variance 1, then * Their sum and difference is distributed normally with mean zero and variance two: X_1 \pm X_2 \sim N(0, 2). * Their product Z = X_1 X_2 follows the
product distribution A product distribution is a probability distribution constructed as the distribution of the product of random variables having two other known distributions. Given two statistically independent random variables ''X'' and ''Y'', the distribution of ...
with density function f_Z(z) = \pi^ K_0(, z, ) where K_0 is the
modified Bessel function of the second kind Bessel functions, first defined by the mathematician Daniel Bernoulli and then generalized by Friedrich Bessel, are canonical solutions of Bessel's differential equation x^2 \frac + x \frac + \left(x^2 - \alpha^2 \right)y = 0 for an arbitrary ...
. This distribution is symmetric around zero, unbounded at z = 0, and has the
characteristic function In mathematics, the term "characteristic function" can refer to any of several distinct concepts: * The indicator function of a subset, that is the function ::\mathbf_A\colon X \to \, :which for a given subset ''A'' of ''X'', has value 1 at points ...
\phi_Z(t) = (1 + t^2)^. * Their ratio follows the standard
Cauchy distribution The Cauchy distribution, named after Augustin Cauchy, is a continuous probability distribution. It is also known, especially among physicists, as the Lorentz distribution (after Hendrik Lorentz), Cauchy–Lorentz distribution, Lorentz(ian) fun ...
: X_1/ X_2 \sim \operatorname(0, 1). * Their Euclidean norm \sqrt has the
Rayleigh distribution In probability theory and statistics, the Rayleigh distribution is a continuous probability distribution for nonnegative-valued random variables. Up to rescaling, it coincides with the chi distribution with two degrees of freedom. The distribut ...
.


Operations on multiple independent normal variables

* Any linear combination of independent normal deviates is a normal deviate. * If X_1, X_2, \ldots, X_n are independent standard normal random variables, then the sum of their squares has the
chi-squared distribution In probability theory and statistics, the chi-squared distribution (also chi-square or \chi^2-distribution) with k degrees of freedom is the distribution of a sum of the squares of k independent standard normal random variables. The chi-squa ...
with n degrees of freedom X_1^2 + \cdots + X_n^2 \sim \chi_n^2. * If X_1, X_2, \ldots, X_n are independent normally distributed random variables with means \mu and variances \sigma^2, then their
sample mean The sample mean (or "empirical mean") and the sample covariance are statistics computed from a Sample (statistics), sample of data on one or more random variables. The sample mean is the average value (or mean, mean value) of a sample (statistic ...
is independent from the sample
standard deviation In statistics, the standard deviation is a measure of the amount of variation or dispersion of a set of values. A low standard deviation indicates that the values tend to be close to the mean (also called the expected value) of the set, while ...
, which can be demonstrated using Basu's theorem or
Cochran's theorem In statistics, Cochran's theorem, devised by William G. Cochran, is a theorem used to justify results relating to the probability distributions of statistics that are used in the analysis of variance. Statement Let ''U''1, ..., ''U'N'' be i.i. ...
. The ratio of these two quantities will have the
Student's t-distribution In probability and statistics, Student's ''t''-distribution (or simply the ''t''-distribution) is any member of a family of continuous probability distributions that arise when estimating the mean of a normally distributed population in sit ...
with n-1 degrees of freedom: t = \frac = \frac \sim t_. * If X_1, X_2, \ldots, X_n, Y_1, Y_2, \ldots, Y_m are independent standard normal random variables, then the ratio of their normalized sums of squares will have the with degrees of freedom: F = \frac \sim F_.


Operations on multiple correlated normal variables

* A
quadratic form In mathematics, a quadratic form is a polynomial with terms all of degree two ("form" is another name for a homogeneous polynomial). For example, :4x^2 + 2xy - 3y^2 is a quadratic form in the variables and . The coefficients usually belong to a ...
of a normal vector, i.e. a quadratic function q = \sum x_i^2 + \sum x_j + c of multiple independent or correlated normal variables, is a generalized chi-square variable.


Operations on the density function

The split normal distribution is most directly defined in terms of joining scaled sections of the density functions of different normal distributions and rescaling the density to integrate to one. The
truncated normal distribution In probability and statistics, the truncated normal distribution is the probability distribution derived from that of a normally distributed random variable by bounding the random variable from either below or above (or both). The truncated no ...
results from rescaling a section of a single density function.


Infinite divisibility and Cramér's theorem

For any positive integer \text, any normal distribution with mean \mu and variance \sigma^2 is the distribution of the sum of \text independent normal deviates, each with mean \frac and variance \frac. This property is called
infinite divisibility Infinite divisibility arises in different ways in philosophy, physics, economics, order theory (a branch of mathematics), and probability theory (also a branch of mathematics). One may speak of infinite divisibility, or the lack thereof, of matter ...
. Conversely, if X_1 and X_2 are independent random variables and their sum X_1+X_2 has a normal distribution, then both X_1 and X_2 must be normal deviates. This result is known as Cramér's decomposition theorem, and is equivalent to saying that the convolution of two distributions is normal if and only if both are normal. Cramér's theorem implies that a linear combination of independent non-Gaussian variables will never have an exactly normal distribution, although it may approach it arbitrarily closely.


Bernstein's theorem

Bernstein's theorem states that if X and Y are independent and X + Y and X - Y are also independent, then both ''X'' and ''Y'' must necessarily have normal distributions. More generally, if X_1, \ldots, X_n are independent random variables, then two distinct linear combinations \sum and \sumwill be independent if and only if all X_k are normal and \sum, where \sigma_k^2 denotes the variance of X_k.


Extensions

The notion of normal distribution, being one of the most important distributions in probability theory, has been extended far beyond the standard framework of the univariate (that is one-dimensional) case (Case 1). All these extensions are also called ''normal'' or ''Gaussian'' laws, so a certain ambiguity in names exists. * The
multivariate normal distribution In probability theory and statistics, the multivariate normal distribution, multivariate Gaussian distribution, or joint normal distribution is a generalization of the one-dimensional (univariate) normal distribution to higher dimensions. One d ...
describes the Gaussian law in the ''k''-dimensional Euclidean space. A vector is multivariate-normally distributed if any linear combination of its components has a (univariate) normal distribution. The variance of ''X'' is a ''k×k'' symmetric positive-definite matrix ''V''. The multivariate normal distribution is a special case of the
elliptical distribution In probability and statistics, an elliptical distribution is any member of a broad family of probability distributions that generalize the multivariate normal distribution. Intuitively, in the simplified two and three dimensional case, the joint di ...
s. As such, its iso-density loci in the ''k'' = 2 case are ellipses and in the case of arbitrary ''k'' are ellipsoids. * Rectified Gaussian distribution a rectified version of normal distribution with all the negative elements reset to 0 * Complex normal distribution deals with the complex normal vectors. A complex vector is said to be normal if both its real and imaginary components jointly possess a 2''k''-dimensional multivariate normal distribution. The variance-covariance structure of ''X'' is described by two matrices: the ''variance'' matrix Γ, and the ''relation'' matrix ''C''. * Matrix normal distribution describes the case of normally distributed matrices. * Gaussian processes are the normally distributed stochastic processes. These can be viewed as elements of some infinite-dimensional Hilbert space ''H'', and thus are the analogues of multivariate normal vectors for the case . A random element is said to be normal if for any constant the scalar product has a (univariate) normal distribution. The variance structure of such Gaussian random element can be described in terms of the linear ''covariance ''. Several Gaussian processes became popular enough to have their own names: ** Wiener process, Brownian motion, ** Brownian bridge, ** Ornstein–Uhlenbeck process. * Gaussian q-distribution is an abstract mathematical construction that represents a "q-analogue" of the normal distribution. * the q-Gaussian is an analogue of the Gaussian distribution, in the sense that it maximises the Tsallis entropy, and is one type of Tsallis distribution. Note that this distribution is different from the Gaussian q-distribution above. * The Kaniadakis Gaussian distribution, Kaniadakis ''κ''-Gaussian distribution is a generalization of the Gaussian distribution which arises from the Kaniadakis statistics, being one of the Kaniadakis distribution, Kaniadakis distributions. A random variable ''X'' has a two-piece normal distribution if it has a distribution : f_X( x ) = N( \mu, \sigma_1^2 ) \text x \le \mu : f_X( x ) = N( \mu, \sigma_2^2 ) \text x \ge \mu where ''μ'' is the mean and ''σ''1 and ''σ''2 are the standard deviations of the distribution to the left and right of the mean respectively. The mean, variance and third central moment of this distribution have been determined : \operatorname( X ) = \mu + \sqrt ( \sigma_2 - \sigma_1 ) : \operatorname( X ) = \left( 1 - \frac 2 \pi\right)( \sigma_2 - \sigma_1 )^2 + \sigma_1 \sigma_2 : \operatorname( X ) = \sqrt( \sigma_2 - \sigma_1 ) \left[ \left( \frac 4 \pi - 1 \right) ( \sigma_2 - \sigma_1)^2 + \sigma_1 \sigma_2 \right] where E(''X''), V(''X'') and T(''X'') are the mean, variance, and third central moment respectively. One of the main practical uses of the Gaussian law is to model the empirical distributions of many different random variables encountered in practice. In such case a possible extension would be a richer family of distributions, having more than two parameters and therefore being able to fit the empirical distribution more accurately. The examples of such extensions are: * Pearson distribution — a four-parameter family of probability distributions that extend the normal law to include different skewness and kurtosis values. * The generalized normal distribution, also known as the exponential power distribution, allows for distribution tails with thicker or thinner asymptotic behaviors.


Statistical inference


Estimation of parameters

It is often the case that we do not know the parameters of the normal distribution, but instead want to Estimation theory, estimate them. That is, having a sample (x_1, \ldots, x_n) from a normal N(\mu, \sigma^2) population we would like to learn the approximate values of parameters \mu and \sigma^2. The standard approach to this problem is the maximum likelihood method, which requires maximization of the ''log-likelihood function'': : \ln\mathcal(\mu,\sigma^2) = \sum_^n \ln f(x_i\mid\mu,\sigma^2) = -\frac\ln(2\pi) - \frac\ln\sigma^2 - \frac\sum_^n (x_i-\mu)^2. Taking derivatives with respect to \mu and \sigma^2 and solving the resulting system of first order conditions yields the ''maximum likelihood estimates'': : \hat = \overline \equiv \frac\sum_^n x_i, \qquad \hat^2 = \frac \sum_^n (x_i - \overline)^2.


Sample mean

Estimator \textstyle\hat\mu is called the ''
sample mean The sample mean (or "empirical mean") and the sample covariance are statistics computed from a Sample (statistics), sample of data on one or more random variables. The sample mean is the average value (or mean, mean value) of a sample (statistic ...
'', since it is the arithmetic mean of all observations. The statistic \textstyle\overline is complete statistic, complete and sufficient statistic, sufficient for \mu, and therefore by the Lehmann–Scheffé theorem, \textstyle\hat\mu is the uniformly minimum variance unbiased (UMVU) estimator. In finite samples it is distributed normally: : \hat\mu \sim \mathcal(\mu,\sigma^2/n). The variance of this estimator is equal to the ''μμ''-element of the inverse Fisher information matrix \textstyle\mathcal^. This implies that the estimator is efficient estimator, finite-sample efficient. Of practical importance is the fact that the standard error (statistics), standard error of \textstyle\hat\mu is proportional to \textstyle1/\sqrt, that is, if one wishes to decrease the standard error by a factor of 10, one must increase the number of points in the sample by a factor of 100. This fact is widely used in determining sample sizes for opinion polls and the number of trials in Monte Carlo simulations. From the standpoint of the asymptotic theory (statistics), asymptotic theory, \textstyle\hat\mu is consistent estimator, consistent, that is, it convergence in probability, converges in probability to \mu as n\rightarrow\infty. The estimator is also asymptotic normality, asymptotically normal, which is a simple corollary of the fact that it is normal in finite samples: : \sqrt(\hat\mu-\mu) \,\xrightarrow\, \mathcal(0,\sigma^2).


Sample variance

The estimator \textstyle\hat\sigma^2 is called the ''sample variance'', since it is the variance of the sample ((x_1, \ldots, x_n)). In practice, another estimator is often used instead of the \textstyle\hat\sigma^2. This other estimator is denoted s^2, and is also called the ''sample variance'', which represents a certain ambiguity in terminology; its square root s is called the ''sample standard deviation''. The estimator s^2 differs from \textstyle\hat\sigma^2 by having instead of ''n'' in the denominator (the so-called Bessel's correction): : s^2 = \frac \hat\sigma^2 = \frac \sum_^n (x_i - \overline)^2. The difference between s^2 and \textstyle\hat\sigma^2 becomes negligibly small for large ''n''s. In finite samples however, the motivation behind the use of s^2 is that it is an unbiased estimator of the underlying parameter \sigma^2, whereas \textstyle\hat\sigma^2 is biased. Also, by the Lehmann–Scheffé theorem the estimator s^2 is uniformly minimum variance unbiased (Minimum-variance unbiased estimator, UMVU), which makes it the "best" estimator among all unbiased ones. However it can be shown that the biased estimator \textstyle\hat\sigma^2 is "better" than the s^2 in terms of the mean squared error (MSE) criterion. In finite samples both s^2 and \textstyle\hat\sigma^2 have scaled
chi-squared distribution In probability theory and statistics, the chi-squared distribution (also chi-square or \chi^2-distribution) with k degrees of freedom is the distribution of a sum of the squares of k independent standard normal random variables. The chi-squa ...
with degrees of freedom: : s^2 \sim \frac \cdot \chi^2_, \qquad \hat\sigma^2 \sim \frac \cdot \chi^2_. The first of these expressions shows that the variance of s^2 is equal to 2\sigma^4/(n-1), which is slightly greater than the ''σσ''-element of the inverse Fisher information matrix \textstyle\mathcal^. Thus, s^2 is not an efficient estimator for \sigma^2, and moreover, since s^2 is UMVU, we can conclude that the finite-sample efficient estimator for \sigma^2 does not exist. Applying the asymptotic theory, both estimators s^2 and \textstyle\hat\sigma^2 are consistent, that is they converge in probability to \sigma^2 as the sample size n\rightarrow\infty. The two estimators are also both asymptotically normal: : \sqrt(\hat\sigma^2 - \sigma^2) \simeq \sqrt(s^2-\sigma^2) \,\xrightarrow\, \mathcal(0,2\sigma^4). In particular, both estimators are asymptotically efficient for \sigma^2.


Confidence intervals

By
Cochran's theorem In statistics, Cochran's theorem, devised by William G. Cochran, is a theorem used to justify results relating to the probability distributions of statistics that are used in the analysis of variance. Statement Let ''U''1, ..., ''U'N'' be i.i. ...
, for normal distributions the sample mean \textstyle\hat\mu and the sample variance ''s''2 are
independent Independent or Independents may refer to: Arts, entertainment, and media Artist groups * Independents (artist group), a group of modernist painters based in the New Hope, Pennsylvania, area of the United States during the early 1930s * Independ ...
, which means there can be no gain in considering their joint distribution. There is also a converse theorem: if in a sample the sample mean and sample variance are independent, then the sample must have come from the normal distribution. The independence between \textstyle\hat\mu and ''s'' can be employed to construct the so-called ''t-statistic'': : t = \frac = \frac \sim t_ This quantity ''t'' has the
Student's t-distribution In probability and statistics, Student's ''t''-distribution (or simply the ''t''-distribution) is any member of a family of continuous probability distributions that arise when estimating the mean of a normally distributed population in sit ...
with degrees of freedom, and it is an ancillary statistic (independent of the value of the parameters). Inverting the distribution of this ''t''-statistics will allow us to construct the
confidence interval In frequentist statistics, a confidence interval (CI) is a range of estimates for an unknown parameter. A confidence interval is computed at a designated ''confidence level''; the 95% confidence level is most common, but other levels, such as 9 ...
for ''μ''; similarly, inverting the ''χ''2 distribution of the statistic ''s''2 will give us the confidence interval for ''σ''2: :\mu \in \left[ \hat\mu - t_ \fracs, \hat\mu + t_ \fracs \right], :\sigma^2 \in \left[ \frac, \frac \right], where ''tk,p'' and are the ''p''th
quantile In statistics and probability, quantiles are cut points dividing the range of a probability distribution into continuous intervals with equal probabilities, or dividing the observations in a sample in the same way. There is one fewer quantile tha ...
s of the ''t''- and ''χ''2-distributions respectively. These confidence intervals are of the ''confidence level'' , meaning that the true values ''μ'' and ''σ''2 fall outside of these intervals with probability (or significance level) ''α''. In practice people usually take , resulting in the 95% confidence intervals. Approximate formulas can be derived from the asymptotic distributions of \textstyle\hat\mu and ''s''2: :\mu \in \left[ \hat\mu - , z_, \fracs, \hat\mu + , z_, \fracs \right], :\sigma^2 \in \left[ s^2 - , z_, \fracs^2, s^2 + , z_, \fracs^2 \right], The approximate formulas become valid for large values of ''n'', and are more convenient for the manual calculation since the standard normal quantiles ''z''''α''/2 do not depend on ''n''. In particular, the most popular value of , results in .


Normality tests

Normality tests assess the likelihood that the given data set comes from a normal distribution. Typically the null hypothesis ''H''0 is that the observations are distributed normally with unspecified mean ''μ'' and variance ''σ''2, versus the alternative ''Ha'' that the distribution is arbitrary. Many tests (over 40) have been devised for this problem. The more prominent of them are outlined below: Diagnostic plots are more intuitively appealing but subjective at the same time, as they rely on informal human judgement to accept or reject the null hypothesis. *
Q–Q plot In statistics, a Q–Q plot (quantile-quantile plot) is a probability plot, a List of graphical methods, graphical method for comparing two probability distributions by plotting their ''quantiles'' against each other. A point on the plot co ...
, also known as normal probability plot or rankit plot—is a plot of the sorted values from the data set against the expected values of the corresponding quantiles from the standard normal distribution. That is, it's a plot of point of the form (Φ−1(''pk''), ''x''(''k'')), where plotting points ''pk'' are equal to ''pk'' = (''k'' − ''α'')/(''n'' + 1 − 2''α'') and ''α'' is an adjustment constant, which can be anything between 0 and 1. If the null hypothesis is true, the plotted points should approximately lie on a straight line. * P–P plot – similar to the Q–Q plot, but used much less frequently. This method consists of plotting the points (Φ(''z''(''k'')), ''pk''), where \textstyle z_ = (x_-\hat\mu)/\hat\sigma. For normally distributed data this plot should lie on a 45° line between (0, 0) and (1, 1). Goodness-of-fit tests: ''Moment-based tests'': * D'Agostino's K-squared test * Jarque–Bera test * Shapiro–Wilk test: This is based on the fact that the line in the Q–Q plot has the slope of ''σ''. The test compares the least squares estimate of that slope with the value of the sample variance, and rejects the null hypothesis if these two quantities differ significantly. ''Tests based on the empirical distribution function'': * Anderson–Darling test * Lilliefors test (an adaptation of the Kolmogorov–Smirnov test)


Bayesian analysis of the normal distribution

Bayesian analysis of normally distributed data is complicated by the many different possibilities that may be considered: * Either the mean, or the variance, or neither, may be considered a fixed quantity. * When the variance is unknown, analysis may be done directly in terms of the variance, or in terms of the
precision Precision, precise or precisely may refer to: Science, and technology, and mathematics Mathematics and computing (general) * Accuracy and precision, measurement deviation from true value and its scatter * Significant figures, the number of digit ...
, the reciprocal of the variance. The reason for expressing the formulas in terms of precision is that the analysis of most cases is simplified. * Both univariate and multivariate normal distribution, multivariate cases need to be considered. * Either conjugate prior, conjugate or improper prior, improper prior distributions may be placed on the unknown variables. * An additional set of cases occurs in Bayesian linear regression, where in the basic model the data is assumed to be normally distributed, and normal priors are placed on the regression coefficients. The resulting analysis is similar to the basic cases of independent identically distributed data. The formulas for the non-linear-regression cases are summarized in the conjugate prior article.


Sum of two quadratics


= Scalar form

= The following auxiliary formula is useful for simplifying the posterior distribution, posterior update equations, which otherwise become fairly tedious. :a(x-y)^2 + b(x-z)^2 = (a + b)\left(x - \frac\right)^2 + \frac(y-z)^2 This equation rewrites the sum of two quadratics in ''x'' by expanding the squares, grouping the terms in ''x'', and completing the square. Note the following about the complex constant factors attached to some of the terms: # The factor \frac has the form of a weighted average of ''y'' and ''z''. # \frac = \frac = (a^ + b^)^. This shows that this factor can be thought of as resulting from a situation where the Multiplicative inverse, reciprocals of quantities ''a'' and ''b'' add directly, so to combine ''a'' and ''b'' themselves, it's necessary to reciprocate, add, and reciprocate the result again to get back into the original units. This is exactly the sort of operation performed by the harmonic mean, so it is not surprising that \frac is one-half the harmonic mean of ''a'' and ''b''.


= Vector form

= A similar formula can be written for the sum of two vector quadratics: If x, y, z are vectors of length ''k'', and A and B are symmetric matrix, symmetric, invertible matrices of size k\times k, then : \begin & (\mathbf-\mathbf)'\mathbf(\mathbf-\mathbf) + (\mathbf-\mathbf)' \mathbf(\mathbf-\mathbf) \\ = & (\mathbf - \mathbf)'(\mathbf+\mathbf)(\mathbf - \mathbf) + (\mathbf - \mathbf)'(\mathbf^ + \mathbf^)^(\mathbf - \mathbf) \end where :\mathbf = (\mathbf + \mathbf)^(\mathbf\mathbf + \mathbf \mathbf) Note that the form x′ A x is called a
quadratic form In mathematics, a quadratic form is a polynomial with terms all of degree two ("form" is another name for a homogeneous polynomial). For example, :4x^2 + 2xy - 3y^2 is a quadratic form in the variables and . The coefficients usually belong to a ...
and is a scalar (mathematics), scalar: :\mathbf'\mathbf\mathbf = \sum_a_ x_i x_j In other words, it sums up all possible combinations of products of pairs of elements from x, with a separate coefficient for each. In addition, since x_i x_j = x_j x_i, only the sum a_ + a_ matters for any off-diagonal elements of A, and there is no loss of generality in assuming that A is symmetric matrix, symmetric. Furthermore, if A is symmetric, then the form \mathbf'\mathbf\mathbf = \mathbf'\mathbf\mathbf.


Sum of differences from the mean

Another useful formula is as follows: \sum_^n (x_i-\mu)^2 = \sum_^n (x_i-\bar)^2 + n(\bar -\mu)^2 where \bar = \frac \sum_^n x_i.


With known variance

For a set of i.i.d. normally distributed data points X of size ''n'' where each individual point ''x'' follows x \sim \mathcal(\mu, \sigma^2) with known
variance In probability theory and statistics, variance is the expectation of the squared deviation of a random variable from its population mean or sample mean. Variance is a measure of dispersion, meaning it is a measure of how far a set of numbers ...
σ2, the conjugate prior distribution is also normally distributed. This can be shown more easily by rewriting the variance as the
precision Precision, precise or precisely may refer to: Science, and technology, and mathematics Mathematics and computing (general) * Accuracy and precision, measurement deviation from true value and its scatter * Significant figures, the number of digit ...
, i.e. using τ = 1/σ2. Then if x \sim \mathcal(\mu, 1/\tau) and \mu \sim \mathcal(\mu_0, 1/\tau_0), we proceed as follows. First, the likelihood function is (using the formula above for the sum of differences from the mean): :\begin p(\mathbf\mid\mu,\tau) &= \prod_^n \sqrt \exp\left(-\frac\tau(x_i-\mu)^2\right) \\ &= \left(\frac\right)^ \exp\left(-\frac\tau \sum_^n (x_i-\mu)^2\right) \\ &= \left(\frac\right)^ \exp\left[-\frac\tau \left(\sum_^n(x_i-\bar)^2 + n(\bar -\mu)^2\right)\right]. \end Then, we proceed as follows: :\begin p(\mu\mid\mathbf) &\propto p(\mathbf\mid\mu) p(\mu) \\ & = \left(\frac\right)^ \exp\left[-\frac\tau \left(\sum_^n(x_i-\bar)^2 + n(\bar -\mu)^2\right)\right] \sqrt \exp\left(-\frac\tau_0(\mu-\mu_0)^2\right) \\ &\propto \exp\left(-\frac\left(\tau\left(\sum_^n(x_i-\bar)^2 + n(\bar -\mu)^2\right) + \tau_0(\mu-\mu_0)^2\right)\right) \\ &\propto \exp\left(-\frac \left(n\tau(\bar-\mu)^2 + \tau_0(\mu-\mu_0)^2 \right)\right) \\ &= \exp\left(-\frac(n\tau + \tau_0)\left(\mu - \dfrac\right)^2 + \frac(\bar - \mu_0)^2\right) \\ &\propto \exp\left(-\frac(n\tau + \tau_0)\left(\mu - \dfrac\right)^2\right) \end In the above derivation, we used the formula above for the sum of two quadratics and eliminated all constant factors not involving ''μ''. The result is the kernel (statistics), kernel of a normal distribution, with mean \frac and precision n\tau + \tau_0, i.e. :p(\mu\mid\mathbf) \sim \mathcal\left(\frac, \frac\right) This can be written as a set of Bayesian update equations for the posterior parameters in terms of the prior parameters: :\begin \tau_0' &= \tau_0 + n\tau \\[5pt] \mu_0' &= \frac \\[5pt] \bar &= \frac\sum_^n x_i \end That is, to combine ''n'' data points with total precision of ''nτ'' (or equivalently, total variance of ''n''/''σ''2) and mean of values \bar, derive a new total precision simply by adding the total precision of the data to the prior total precision, and form a new mean through a ''precision-weighted average'', i.e. a weighted average of the data mean and the prior mean, each weighted by the associated total precision. This makes logical sense if the precision is thought of as indicating the certainty of the observations: In the distribution of the posterior mean, each of the input components is weighted by its certainty, and the certainty of this distribution is the sum of the individual certainties. (For the intuition of this, compare the expression "the whole is (or is not) greater than the sum of its parts". In addition, consider that the knowledge of the posterior comes from a combination of the knowledge of the prior and likelihood, so it makes sense that we are more certain of it than of either of its components.) The above formula reveals why it is more convenient to do Bayesian analysis of conjugate priors for the normal distribution in terms of the precision. The posterior precision is simply the sum of the prior and likelihood precisions, and the posterior mean is computed through a precision-weighted average, as described above. The same formulas can be written in terms of variance by reciprocating all the precisions, yielding the more ugly formulas :\begin ' &= \frac \\[5pt] \mu_0' &= \frac \\[5pt] \bar &= \frac\sum_^n x_i \end


With known mean

For a set of i.i.d. normally distributed data points X of size ''n'' where each individual point ''x'' follows x \sim \mathcal(\mu, \sigma^2) with known mean μ, the conjugate prior of the
variance In probability theory and statistics, variance is the expectation of the squared deviation of a random variable from its population mean or sample mean. Variance is a measure of dispersion, meaning it is a measure of how far a set of numbers ...
has an inverse gamma distribution or a scaled inverse chi-squared distribution. The two are equivalent 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. The prior for σ2 is as follows: :p(\sigma^2\mid\nu_0,\sigma_0^2) = \frac~\frac \propto \frac The likelihood function from above, written in terms of the variance, is: :\begin p(\mathbf\mid\mu,\sigma^2) &= \left(\frac\right)^ \exp\left[-\frac \sum_^n (x_i-\mu)^2\right] \\ &= \left(\frac\right)^ \exp\left[-\frac\right] \end where :S = \sum_^n (x_i-\mu)^2. Then: :\begin p(\sigma^2\mid\mathbf) &\propto p(\mathbf\mid\sigma^2) p(\sigma^2) \\ &= \left(\frac\right)^ \exp\left[-\frac\right] \frac~\frac \\ &\propto \left(\frac\right)^ \frac \exp\left[-\frac + \frac\right] \\ &= \frac \exp\left[-\frac\right] \end The above is also a scaled inverse chi-squared distribution where :\begin \nu_0' &= \nu_0 + n \\ \nu_0'' &= \nu_0 \sigma_0^2 + \sum_^n (x_i-\mu)^2 \end or equivalently :\begin \nu_0' &= \nu_0 + n \\ ' &= \frac \end Reparameterizing in terms of an inverse gamma distribution, the result is: :\begin \alpha' &= \alpha + \frac \\ \beta' &= \beta + \frac \end


With unknown mean and unknown variance

For a set of i.i.d. normally distributed data points X of size ''n'' where each individual point ''x'' follows x \sim \mathcal(\mu, \sigma^2) with unknown mean μ and unknown
variance In probability theory and statistics, variance is the expectation of the squared deviation of a random variable from its population mean or sample mean. Variance is a measure of dispersion, meaning it is a measure of how far a set of numbers ...
σ2, a combined (multivariate) conjugate prior is placed over the mean and variance, consisting of a normal-inverse-gamma distribution. Logically, this originates as follows: # From the analysis of the case with unknown mean but known variance, we see that the update equations involve sufficient statistics computed from the data consisting of the mean of the data points and the total variance of the data points, computed in turn from the known variance divided by the number of data points. # From the analysis of the case with unknown variance but known mean, we see that the update equations involve sufficient statistics over the data consisting of the number of data points and sum of squared deviations. # Keep in mind that the posterior update values serve as the prior distribution when further data is handled. Thus, we should logically think of our priors in terms of the sufficient statistics just described, with the same semantics kept in mind as much as possible. # To handle the case where both mean and variance are unknown, we could place independent priors over the mean and variance, with fixed estimates of the average mean, total variance, number of data points used to compute the variance prior, and sum of squared deviations. Note however that in reality, the total variance of the mean depends on the unknown variance, and the sum of squared deviations that goes into the variance prior (appears to) depend on the unknown mean. In practice, the latter dependence is relatively unimportant: Shifting the actual mean shifts the generated points by an equal amount, and on average the squared deviations will remain the same. This is not the case, however, with the total variance of the mean: As the unknown variance increases, the total variance of the mean will increase proportionately, and we would like to capture this dependence. # This suggests that we create a ''conditional prior'' of the mean on the unknown variance, with a hyperparameter specifying the mean of the pseudo-observations associated with the prior, and another parameter specifying the number of pseudo-observations. This number serves as a scaling parameter on the variance, making it possible to control the overall variance of the mean relative to the actual variance parameter. The prior for the variance also has two hyperparameters, one specifying the sum of squared deviations of the pseudo-observations associated with the prior, and another specifying once again the number of pseudo-observations. Note that each of the priors has a hyperparameter specifying the number of pseudo-observations, and in each case this controls the relative variance of that prior. These are given as two separate hyperparameters so that the variance (aka the confidence) of the two priors can be controlled separately. # This leads immediately to the normal-inverse-gamma distribution, which is the product of the two distributions just defined, with conjugate priors used (an inverse gamma distribution over the variance, and a normal distribution over the mean, ''conditional'' on the variance) and with the same four parameters just defined. The priors are normally defined as follows: :\begin p(\mu\mid\sigma^2; \mu_0, n_0) &\sim \mathcal(\mu_0,\sigma^2/n_0) \\ p(\sigma^2; \nu_0,\sigma_0^2) &\sim I\chi^2(\nu_0,\sigma_0^2) = IG(\nu_0/2, \nu_0\sigma_0^2/2) \end The update equations can be derived, and look as follows: :\begin \bar &= \frac 1 n \sum_^n x_i \\ \mu_0' &= \frac \\ n_0' &= n_0 + n \\ \nu_0' &= \nu_0 + n \\ \nu_0'' &= \nu_0 \sigma_0^2 + \sum_^n (x_i-\bar)^2 + \frac(\mu_0 - \bar)^2 \end The respective numbers of pseudo-observations add the number of actual observations to them. The new mean hyperparameter is once again a weighted average, this time weighted by the relative numbers of observations. Finally, the update for \nu_0'' is similar to the case with known mean, but in this case the sum of squared deviations is taken with respect to the observed data mean rather than the true mean, and as a result a new "interaction term" needs to be added to take care of the additional error source stemming from the deviation between prior and data mean.


Occurrence and applications

The occurrence of normal distribution in practical problems can be loosely classified into four categories: # Exactly normal distributions; # Approximately normal laws, for example when such approximation is justified by the
central limit theorem In probability theory, the central limit theorem (CLT) establishes that, in many situations, when independent random variables are summed up, their properly normalized sum tends toward a normal distribution even if the original variables themselv ...
; and # Distributions modeled as normal – the normal distribution being the distribution with Principle of maximum entropy, maximum entropy for a given mean and variance. # Regression problems – the normal distribution being found after systematic effects have been modeled sufficiently well.


Exact normality

Certain quantities in physics are distributed normally, as was first demonstrated by James Clerk Maxwell. Examples of such quantities are: * Probability density function of a ground state in a quantum harmonic oscillator. * The position of a particle that experiences diffusion. If initially the particle is located at a specific point (that is its probability distribution is the Dirac delta function), then after time ''t'' its location is described by a normal distribution with variance ''t'', which satisfies the diffusion equation \frac f(x,t) = \frac \frac f(x,t). If the initial location is given by a certain density function g(x), then the density at time ''t'' is the convolution of ''g'' and the normal PDF.


Approximate normality

''Approximately'' normal distributions occur in many situations, as explained by the
central limit theorem In probability theory, the central limit theorem (CLT) establishes that, in many situations, when independent random variables are summed up, their properly normalized sum tends toward a normal distribution even if the original variables themselv ...
. When the outcome is produced by many small effects acting ''additively and independently'', its distribution will be close to normal. The normal approximation will not be valid if the effects act multiplicatively (instead of additively), or if there is a single external influence that has a considerably larger magnitude than the rest of the effects. * In counting problems, where the central limit theorem includes a discrete-to-continuum approximation and where Infinite divisibility, infinitely divisible and Indecomposable distribution, decomposable distributions are involved, such as ** binomial distribution, Binomial random variables, associated with binary response variables; ** Poisson distribution, Poisson random variables, associated with rare events; * Thermal radiation has a Bose–Einstein statistics, Bose–Einstein distribution on very short time scales, and a normal distribution on longer timescales due to the central limit theorem.


Assumed normality

There are statistical methods to empirically test that assumption; see the above #Normality tests, Normality tests section. * In biology, the ''logarithm'' of various variables tend to have a normal distribution, that is, they tend to have a
log-normal distribution In probability theory, a log-normal (or lognormal) distribution is a continuous probability distribution of a random variable whose logarithm is normally distributed. Thus, if the random variable is log-normally distributed, then has a normal ...
(after separation on male/female subpopulations), with examples including: ** Measures of size of living tissue (length, height, skin area, weight); ** The ''length'' of ''inert'' appendages (hair, claws, nails, teeth) of biological specimens, ''in the direction of growth''; presumably the thickness of tree bark also falls under this category; ** Certain physiological measurements, such as blood pressure of adult humans. * In finance, in particular the Black–Scholes model, changes in the ''logarithm'' of exchange rates, price indices, and stock market indices are assumed normal (these variables behave like compound interest, not like simple interest, and so are multiplicative). Some mathematicians such as Benoit Mandelbrot have argued that Levy skew alpha-stable distribution, log-Levy distributions, which possesses heavy tails would be a more appropriate model, in particular for the analysis for stock market crashes. The use of the assumption of normal distribution occurring in financial models has also been criticized by Nassim Nicholas Taleb in his works. * Propagation of uncertainty, Measurement errors in physical experiments are often modeled by a normal distribution. This use of a normal distribution does not imply that one is assuming the measurement errors are normally distributed, rather using the normal distribution produces the most conservative predictions possible given only knowledge about the mean and variance of the errors. * In Standardized testing (statistics), standardized testing, results can be made to have a normal distribution by either selecting the number and difficulty of questions (as in the Intelligence quotient, IQ test) or transforming the raw test scores into "output" scores by fitting them to the normal distribution. For example, the SAT's traditional range of 200–800 is based on a normal distribution with a mean of 500 and a standard deviation of 100. * Many scores are derived from the normal distribution, including percentile ranks ("percentiles" or "quantiles"), normal curve equivalents, stanines, Standard score, z-scores, and T-scores. Additionally, some behavioral statistical procedures assume that scores are normally distributed; for example, Student's t-test, t-tests and Analysis of variance, ANOVAs. Bell curve grading assigns relative grades based on a normal distribution of scores. * In hydrology the distribution of long duration river discharge or rainfall, e.g. monthly and yearly totals, is often thought to be practically normal according to the
central limit theorem In probability theory, the central limit theorem (CLT) establishes that, in many situations, when independent random variables are summed up, their properly normalized sum tends toward a normal distribution even if the original variables themselv ...
. The blue picture, made with CumFreq, illustrates an example of fitting the normal distribution to ranked October rainfalls showing the 90% confidence belt based on the
binomial distribution In probability theory and statistics, the binomial distribution with parameters ''n'' and ''p'' is the discrete probability distribution of the number of successes in a sequence of ''n'' independent experiments, each asking a yes–no quest ...
. The rainfall data are represented by plotting positions as part of the cumulative frequency analysis.


Methodological problems and peer review

John Ioannidis argues that using normally distributed standard deviations as standards for validating research findings leave falsifiability, falsifiable predictions about phenomena that are not normally distributed untested. This includes, for example, phenomena that only appear when all necessary conditions are present and one cannot be a substitute for another in an addition-like way and phenomena that are not randomly distributed. Ioannidis argues that standard deviation-centered validation gives a false appearance of validity to hypotheses and theories where some but not all falsifiable predictions are normally distributed since the portion of falsifiable predictions that there is evidence against may and in some cases are in the non-normally distributed parts of the range of falsifiable predictions, as well as baselessly dismissing hypotheses for which none of the falsifiable predictions are normally distributed as if were they unfalsifiable when in fact they do make falsifiable predictions. It is argued by Ioannidis that many cases of mutually exclusive theories being accepted as "validated" by research journals are caused by failure of the journals to take in empirical falsifications of non-normally distributed predictions, and not because mutually exclusive theories are true, which they cannot be, although two mutually exclusive theories can both be wrong and a third one correct.


Computational methods


Generating values from normal distribution

In computer simulations, especially in applications of the Monte-Carlo method, it is often desirable to generate values that are normally distributed. The algorithms listed below all generate the standard normal deviates, since a can be generated as , where ''Z'' is standard normal. All these algorithms rely on the availability of a random number generator ''U'' capable of producing Uniform distribution (continuous), uniform random variates. * The most straightforward method is based on the probability integral transform property: if ''U'' is distributed uniformly on (0,1), then Φ−1(''U'') will have the standard normal distribution. The drawback of this method is that it relies on calculation of the
probit function In probability theory and statistics, the probit function is the quantile function associated with the standard normal distribution. It has applications in data analysis and machine learning, in particular exploratory statistical graphics and ...
Φ−1, which cannot be done analytically. Some approximate methods are described in and in the error function, erf article. Wichura gives a fast algorithm for computing this function to 16 decimal places, which is used by R programming language, R to compute random variates of the normal distribution. * Irwin–Hall distribution#Approximating a Normal distribution, An easy-to-program approximate approach that relies on the
central limit theorem In probability theory, the central limit theorem (CLT) establishes that, in many situations, when independent random variables are summed up, their properly normalized sum tends toward a normal distribution even if the original variables themselv ...
is as follows: generate 12 uniform ''U''(0,1) deviates, add them all up, and subtract 6 – the resulting random variable will have approximately standard normal distribution. In truth, the distribution will be Irwin–Hall distribution, Irwin–Hall, which is a 12-section eleventh-order polynomial approximation to the normal distribution. This random deviate will have a limited range of (−6, 6). Note that in a true normal distribution, only 0.00034% of all samples will fall outside ±6σ. * The Box–Muller transform, Box–Muller method uses two independent random numbers ''U'' and ''V'' distributed uniform distribution (continuous), uniformly on (0,1). Then the two random variables ''X'' and ''Y'' X = \sqrt \, \cos(2 \pi V) , \qquad Y = \sqrt \, \sin(2 \pi V) . will both have the standard normal distribution, and will be
independent Independent or Independents may refer to: Arts, entertainment, and media Artist groups * Independents (artist group), a group of modernist painters based in the New Hope, Pennsylvania, area of the United States during the early 1930s * Independ ...
. This formulation arises because for a bivariate normal random vector (''X'', ''Y'') the squared norm will have the
chi-squared distribution In probability theory and statistics, the chi-squared distribution (also chi-square or \chi^2-distribution) with k degrees of freedom is the distribution of a sum of the squares of k independent standard normal random variables. The chi-squa ...
with two degrees of freedom, which is an easily generated exponential distribution, exponential random variable corresponding to the quantity −2ln(''U'') in these equations; and the angle is distributed uniformly around the circle, chosen by the random variable ''V''. * The Marsaglia polar method is a modification of the Box–Muller method which does not require computation of the sine and cosine functions. In this method, ''U'' and ''V'' are drawn from the uniform (−1,1) distribution, and then is computed. If ''S'' is greater or equal to 1, then the method starts over, otherwise the two quantities X = U\sqrt, \qquad Y = V\sqrt are returned. Again, ''X'' and ''Y'' are independent, standard normal random variables. * The Ratio method is a rejection method. The algorithm proceeds as follows: ** Generate two independent uniform deviates ''U'' and ''V''; ** Compute ''X'' = (''V'' − 0.5)/''U''; ** Optional: if ''X''2 ≤ 5 − 4''e''1/4''U'' then accept ''X'' and terminate algorithm; ** Optional: if ''X''2 ≥ 4''e''−1.35/''U'' + 1.4 then reject ''X'' and start over from step 1; ** If ''X''2 ≤ −4 ln''U'' then accept ''X'', otherwise start over the algorithm. *:The two optional steps allow the evaluation of the logarithm in the last step to be avoided in most cases. These steps can be greatly improved so that the logarithm is rarely evaluated. * The ziggurat algorithm is faster than the Box–Muller transform and still exact. In about 97% of all cases it uses only two random numbers, one random integer and one random uniform, one multiplication and an if-test. Only in 3% of the cases, where the combination of those two falls outside the "core of the ziggurat" (a kind of rejection sampling using logarithms), do exponentials and more uniform random numbers have to be employed. * Integer arithmetic can be used to sample from the standard normal distribution. This method is exact in the sense that it satisfies the conditions of ''ideal approximation''; i.e., it is equivalent to sampling a real number from the standard normal distribution and rounding this to the nearest representable floating point number. * There is also some investigation into the connection between the fast Hadamard transform and the normal distribution, since the transform employs just addition and subtraction and by the central limit theorem random numbers from almost any distribution will be transformed into the normal distribution. In this regard a series of Hadamard transforms can be combined with random permutations to turn arbitrary data sets into a normally distributed data.


Numerical approximations for the normal CDF and normal quantile function

The standard normal cumulative distribution function, CDF is widely used in scientific and statistical computing. The values Φ(''x'') may be approximated very accurately by a variety of methods, such as numerical integration, Taylor series, asymptotic series and Gauss's continued fraction#Of Kummer's confluent hypergeometric function, continued fractions. Different approximations are used depending on the desired level of accuracy. * give the approximation for Φ(''x'') for ''x > 0'' with the absolute error (algorith
26.2.17
: \Phi(x) = 1 - \varphi(x)\left(b_1 t + b_2 t^2 + b_3t^3 + b_4 t^4 + b_5 t^5\right) + \varepsilon(x), \qquad t = \frac, where ''ϕ''(''x'') is the standard normal PDF, and ''b''0 = 0.2316419, ''b''1 = 0.319381530, ''b''2 = −0.356563782, ''b''3 = 1.781477937, ''b''4 = −1.821255978, ''b''5 = 1.330274429. * lists some dozens of approximations – by means of rational functions, with or without exponentials – for the function. His algorithms vary in the degree of complexity and the resulting precision, with maximum absolute precision of 24 digits. An algorithm by combines Hart's algorithm 5666 with a continued fraction approximation in the tail to provide a fast computation algorithm with a 16-digit precision. * after recalling Hart68 solution is not suited for erf, gives a solution for both erf and erfc, with maximal relative error bound, via rational function, Rational Chebyshev Approximation. * suggested a simple algorithm based on the Taylor series expansion \Phi(x) = \frac12 + \varphi(x)\left( x + \frac 3 + \frac + \frac + \frac + \cdots \right) for calculating with arbitrary precision. The drawback of this algorithm is comparatively slow calculation time (for example it takes over 300 iterations to calculate the function with 16 digits of precision when ). * The GNU Scientific Library calculates values of the standard normal CDF using Hart's algorithms and approximations with Chebyshev polynomials. Shore (1982) introduced simple approximations that may be incorporated in stochastic optimization models of engineering and operations research, like reliability engineering and inventory analysis. Denoting , the simplest approximation for the quantile function is: z = \Phi^(p)=5.5556\left[1- \left( \frac p \right)^\right],\qquad p\ge 1/2 This approximation delivers for ''z'' a maximum absolute error of 0.026 (for , corresponding to ). For replace ''p'' by and change sign. Another approximation, somewhat less accurate, is the single-parameter approximation: z=-0.4115\left\, \qquad p\ge 1/2 The latter had served to derive a simple approximation for the loss integral of the normal distribution, defined by \begin L(z) & =\int_z^\infty (u-z)\varphi(u) \, du=\int_z^\infty [1-\Phi (u)] \, du \\[5pt] L(z) & \approx \begin 0.4115\left(\dfrac p \right) - z, & p<1/2, \\ \\ 0.4115\left( \dfrac p \right), & p\ge 1/2. \end \\[5pt] \text \\ L(z) & \approx \begin 0.4115\left\, & p < 1/2, \\ \\ 0.4115 \dfrac p, & p\ge 1/2. \end \end This approximation is particularly accurate for the right far-tail (maximum error of 10−3 for z≥1.4). Highly accurate approximations for the CDF, based on Response modeling methodology, Response Modeling Methodology (RMM, Shore, 2011, 2012), are shown in Shore (2005). Some more approximations can be found at: Error function#Approximation with elementary functions. In particular, small ''relative'' error on the whole domain for the CDF \Phi and the quantile function \Phi^ as well, is achieved via an explicitly invertible formula by Sergei Winitzki in 2008.


History


Development

Some authors attribute the credit for the discovery of the normal distribution to Abraham de Moivre, de Moivre, who in 1738 published in the second edition of his "''The Doctrine of Chances''" the study of the coefficients in the binomial expansion of . De Moivre proved that the middle term in this expansion has the approximate magnitude of 2^n/\sqrt, and that "If ''m'' or ''n'' be a Quantity infinitely great, then the Logarithm of the Ratio, which a Term distant from the middle by the Interval ''ℓ'', has to the middle Term, is -\frac." Although this theorem can be interpreted as the first obscure expression for the normal probability law, Stephen Stigler, Stigler points out that de Moivre himself did not interpret his results as anything more than the approximate rule for the binomial coefficients, and in particular de Moivre lacked the concept of the probability density function. In 1823 Carl Friedrich Gauss, Gauss published his monograph "''Theoria combinationis observationum erroribus minimis obnoxiae''" where among other things he introduces several important statistical concepts, such as the method of least squares, the method of maximum likelihood, and the ''normal distribution''. Gauss used ''M'', , to denote the measurements of some unknown quantity ''V'', and sought the "most probable" estimator of that quantity: the one that maximizes the probability of obtaining the observed experimental results. In his notation φΔ is the probability density function of the measurement errors of magnitude Δ. Not knowing what the function ''φ'' is, Gauss requires that his method should reduce to the well-known answer: the arithmetic mean of the measured values. Starting from these principles, Gauss demonstrates that the only law that rationalizes the choice of arithmetic mean as an estimator of the location parameter, is the normal law of errors: \varphi\mathit = \frac h \, e^, where ''h'' is "the measure of the precision of the observations". Using this normal law as a generic model for errors in the experiments, Gauss formulates what is now known as the non-linear least squares, non-linear weighted least squares method. Although Gauss was the first to suggest the normal distribution law, Pierre Simon de Laplace, Laplace made significant contributions. It was Laplace who first posed the problem of aggregating several observations in 1774, although his own solution led to the Laplacian distribution. It was Laplace who first calculated the value of the Gaussian integral, integral in 1782, providing the normalization constant for the normal distribution. Finally, it was Laplace who in 1810 proved and presented to the Academy the fundamental
central limit theorem In probability theory, the central limit theorem (CLT) establishes that, in many situations, when independent random variables are summed up, their properly normalized sum tends toward a normal distribution even if the original variables themselv ...
, which emphasized the theoretical importance of the normal distribution. It is of interest to note that in 1809 an Irish-American mathematician Robert Adrain published two insightful but flawed derivations of the normal probability law, simultaneously and independently from Gauss. His works remained largely unnoticed by the scientific community, until in 1871 they were exhumed by Cleveland Abbe, Abbe. In the middle of the 19th century James Clerk Maxwell, Maxwell demonstrated that the normal distribution is not just a convenient mathematical tool, but may also occur in natural phenomena: "The number of particles whose velocity, resolved in a certain direction, lies between ''x'' and ''x'' + ''dx'' is \operatorname \frac\; e^ \, dx


Naming

Today, the concept is usually known in English as the normal distribution or Gaussian distribution. Other less common names include Gauss distribution, Laplace-Gauss distribution, the law of error, the law of facility of errors, Laplace's second law, Gaussian law. Gauss himself apparently coined the term with reference to the "normal equations" involved in its applications, with normal having its technical meaning of orthogonal rather than "usual". However, by the end of the 19th century some authors had started using the name ''normal distribution'', where the word "normal" was used as an adjective – the term now being seen as a reflection of the fact that this distribution was seen as typical, common – and thus "normal". Charles Sanders Peirce, Peirce (one of those authors) once defined "normal" thus: "...the 'normal' is not the average (or any other kind of mean) of what actually occurs, but of what ''would'', in the long run, occur under certain circumstances." Around the turn of the 20th century Karl Pearson, Pearson popularized the term ''normal'' as a designation for this distribution. Also, it was Pearson who first wrote the distribution in terms of the standard deviation ''σ'' as in modern notation. Soon after this, in year 1915, Ronald Fisher, Fisher added the location parameter to the formula for normal distribution, expressing it in the way it is written nowadays: df = \frac e^ \, dx. The term "standard normal", which denotes the normal distribution with zero mean and unit variance came into general use around the 1950s, appearing in the popular textbooks by P. G. Hoel (1947) "''Introduction to mathematical statistics''" and A. M. Mood (1950) "''Introduction to the theory of statistics''".


See also

* Bates distribution – similar to the Irwin–Hall distribution, but rescaled back into the 0 to 1 range * Behrens–Fisher problem – the long-standing problem of testing whether two normal samples with different variances have same means; * Bhattacharyya distance – method used to separate mixtures of normal distributions * Erdős–Kac theorem – on the occurrence of the normal distribution in number theory * Full width at half maximum * Gaussian blur – convolution, which uses the normal distribution as a kernel * Modified half-normal distribution with the pdf on (0, \infty) is given as f(x)= \frac, where \Psi(\alpha,z)=_1\Psi_1\left(\begin\left(\alpha,\frac\right)\\(1,0)\end;z \right) denotes the Fox-Wright Psi function. * Normally distributed and uncorrelated does not imply independent * Ratio normal distribution * Reciprocal normal distribution * Standard normal table * Stein's lemma * Sub-Gaussian distribution * Sum of normally distributed random variables * Tweedie distribution – The normal distribution is a member of the family of Tweedie exponential dispersion models. * Wrapped normal distribution – the Normal distribution applied to a circular domain * Z-test – using the normal distribution


Notes


References


Citations


Sources

* * In particular, the entries fo
"bell-shaped and bell curve"
an

* * * * * * * * * * * * * * * * * * * * * * * * Translated by Stephen M. Stigler in ''Statistical Science'' 1 (3), 1986: . * * * * * * * * * * * * * * * * * * * * * * * * * * * *


External links

*
Normal distribution calculator
{{Authority control Normal distribution, Continuous distributions Conjugate prior distributions Exponential family distributions Stable distributions Location-scale family probability distributions]">X - \mu, ^p\right&= \sigma^p (p-1)!! \cdot \begin \sqrt & \textp\text \\ 1 & \textp\text \end \\ &= \sigma^p \cdot \frac. \end The last formula is valid also for any non-integer p>-1. When the mean \mu \ne 0, the plain and absolute moments can be expressed in terms of
confluent hypergeometric function In mathematics, a confluent hypergeometric function is a solution of a confluent hypergeometric equation, which is a degenerate form of a hypergeometric differential equation where two of the three regular singularities merge into an irregular ...
s _1F_1 and U. :\begin \operatorname\left ^p\right&= \sigma^p\cdot (-i\sqrt 2)^p U\left(-\frac, \frac, -\frac \left( \frac \mu \sigma \right)^2 \right), \\ \operatorname\left[, X, ^p \right] &= \sigma^p \cdot 2^ \frac _1F_1\left( -\frac, \frac, -\frac \left( \frac \mu \sigma \right)^2 \right). \end These expressions remain valid even if p is not an integer. See also Hermite polynomials#"Negative variance", generalized Hermite polynomials. The expectation of X conditioned on the event that X lies in an interval ,b/math> is given by :\operatorname\left \mid a= \mu - \sigma^2\frac where f and F respectively are the density and the cumulative distribution function of X. For b=\infty this is known as the
inverse Mills ratio In probability theory, the Mills ratio (or Mills's ratio) of a continuous random variable X is the function : m(x) := \frac , where f(x) is the probability density function, and :\bar(x) := \Pr x.html" ;"title=">x">>x= \int_x^ f(u)\, du is the ...
. Note that above, density f of X is used instead of standard normal density as in inverse Mills ratio, so here we have \sigma^2 instead of \sigma.


Fourier transform and characteristic function

The
Fourier transform A Fourier transform (FT) is a mathematical transform that decomposes functions into frequency components, which are represented by the output of the transform as a function of frequency. Most commonly functions of time or space are transformed, ...
of a normal density f with mean \mu and standard deviation \sigma is : \hat f(t) = \int_^\infty f(x)e^ \, dx = e^ e^ where i is the
imaginary unit The imaginary unit or unit imaginary number () is a solution to the quadratic equation x^2+1=0. Although there is no real number with this property, can be used to extend the real numbers to what are called complex numbers, using addition an ...
. If the mean \mu=0, the first factor is 1, and the Fourier transform is, apart from a constant factor, a normal density on the
frequency domain In physics, electronics, control systems engineering, and statistics, the frequency domain refers to the analysis of mathematical functions or signals with respect to frequency, rather than time. Put simply, a time-domain graph shows how a signa ...
, with mean 0 and standard deviation 1/\sigma. In particular, the standard normal distribution \varphi is an
eigenfunction In mathematics, an eigenfunction of a linear operator ''D'' defined on some function space is any non-zero function f in that space that, when acted upon by ''D'', is only multiplied by some scaling factor called an eigenvalue. As an equation, th ...
of the Fourier transform. In probability theory, the Fourier transform of the probability distribution of a real-valued random variable X is closely connected to the
characteristic function In mathematics, the term "characteristic function" can refer to any of several distinct concepts: * The indicator function of a subset, that is the function ::\mathbf_A\colon X \to \, :which for a given subset ''A'' of ''X'', has value 1 at points ...
\varphi_X(t) of that variable, which is defined as the
expected value In probability theory, the expected value (also called expectation, expectancy, mathematical expectation, mean, average, or first moment) is a generalization of the weighted average. Informally, the expected value is the arithmetic mean of a l ...
of e^, as a function of the real variable t (the
frequency Frequency is the number of occurrences of a repeating event per unit of time. It is also occasionally referred to as ''temporal frequency'' for clarity, and is distinct from ''angular frequency''. Frequency is measured in hertz (Hz) which is eq ...
parameter of the Fourier transform). This definition can be analytically extended to a complex-value variable t. The relation between both is: :\varphi_X(t) = \hat f(-t)


Moment and cumulant generating functions

The
moment generating function In probability theory and statistics, the moment-generating function of a real-valued random variable is an alternative specification of its probability distribution. Thus, it provides the basis of an alternative route to analytical results compare ...
of a real random variable X is the expected value of e^, as a function of the real parameter t. For a normal distribution with density f, mean \mu and deviation \sigma, the moment generating function exists and is equal to :M(t) = \operatorname ^= \hat f(it) = e^ e^ The
cumulant generating function In probability theory and statistics, the cumulants of a probability distribution are a set of quantities that provide an alternative to the '' moments'' of the distribution. Any two probability distributions whose moments are identical will have ...
is the logarithm of the moment generating function, namely :g(t) = \ln M(t) = \mu t + \tfrac 12 \sigma^2 t^2 Since this is a quadratic polynomial in t, only the first two
cumulant In probability theory and statistics, the cumulants of a probability distribution are a set of quantities that provide an alternative to the '' moments'' of the distribution. Any two probability distributions whose moments are identical will ha ...
s are nonzero, namely the mean \mu and the variance \sigma^2.


Stein operator and class

Within
Stein's method Stein's method is a general method in probability theory to obtain bounds on the distance between two probability distributions with respect to a probability metric. It was introduced by Charles Stein, who first published it in 1972, to obtain ...
the Stein operator and class of a random variable X \sim \mathcal(\mu, \sigma^2) are \mathcalf(x) = \sigma^2 f'(x) - (x-\mu)f(x) and \mathcal the class of all absolutely continuous functions f : \R \to \R \mbox\mathbb limit (mathematics), limit when \sigma tends to zero, the probability density f(x) eventually tends to zero at any x\ne \mu, but grows without limit if x = \mu, while its integral remains equal to 1. Therefore, the normal distribution cannot be defined as an ordinary
function Function or functionality may refer to: Computing * Function key, a type of key on computer keyboards * Function model, a structured representation of processes in a system * Function object or functor or functionoid, a concept of object-oriente ...
when \sigma = 0. However, one can define the normal distribution with zero variance as a
generalized function In mathematics, generalized functions are objects extending the notion of functions. There is more than one recognized theory, for example the theory of distributions. Generalized functions are especially useful in making discontinuous functions ...
; specifically, as Dirac's "delta function" \delta translated by the mean \mu, that is f(x)=\delta(x-\mu). Its CDF is then the
Heaviside step function The Heaviside step function, or the unit step function, usually denoted by or (but sometimes , or ), is a step function, named after Oliver Heaviside (1850–1925), the value of which is zero for negative arguments and one for positive argume ...
translated by the mean \mu, namely :F(x) = \begin 0 & \textx < \mu \\ 1 & \textx \geq \mu \end


Maximum entropy

Of all probability distributions over the reals with a specified mean \mu and variance \sigma^2, the normal distribution N(\mu,\sigma^2) is the one with maximum entropy. If X is a
continuous random variable In probability theory and statistics, a probability distribution is the mathematical function that gives the probabilities of occurrence of different possible outcomes for an experiment. It is a mathematical description of a random phenomenon i ...
with
probability density In probability theory, a probability density function (PDF), or density of a continuous random variable, is a function whose value at any given sample (or point) in the sample space (the set of possible values taken by the random variable) can ...
f(x), then the entropy of X is defined as : H(X) = - \int_^\infty f(x)\log f(x)\, dx where f(x)\log f(x) is understood to be zero whenever f(x)=0. This functional can be maximized, subject to the constraints that the distribution is properly normalized and has a specified variance, by using
variational calculus The calculus of variations (or Variational Calculus) is a field of mathematical analysis that uses variations, which are small changes in functions and functionals, to find maxima and minima of functionals: mappings from a set of functions t ...
. A function with two
Lagrange multipliers In mathematical optimization, the method of Lagrange multipliers is a strategy for finding the local maxima and minima of a function subject to equality constraints (i.e., subject to the condition that one or more equations have to be satisfied ex ...
is defined: : L=\int_^\infty f(x)\ln(f(x))\,dx-\lambda_0\left(1-\int_^\infty f(x)\,dx\right)-\lambda\left(\sigma^2-\int_^\infty f(x)(x-\mu)^2\,dx\right) where f(x) is, for now, regarded as some density function with mean \mu and standard deviation \sigma. At maximum entropy, a small variation \delta f(x) about f(x) will produce a variation \delta L about L which is equal to 0: : 0=\delta L=\int_^\infty \delta f(x)\left (\ln(f(x))+1+\lambda_0+\lambda(x-\mu)^2\right )\,dx Since this must hold for any small \delta f(x), the term in brackets must be zero, and solving for f(x) yields: :f(x)=e^ Using the constraint equations to solve for \lambda_0 and \lambda yields the density of the normal distribution: : f(x, \mu, \sigma)=\frace^ The entropy of a normal distribution is equal to : H(X)=\tfrac(1+\log(2\sigma^2\pi))


Other properties


Related distributions


Central limit theorem

The central limit theorem states that under certain (fairly common) conditions, the sum of many random variables will have an approximately normal distribution. More specifically, where X_1,\ldots ,X_n are
independent and identically distributed In probability theory and statistics, a collection of random variables is independent and identically distributed if each random variable has the same probability distribution as the others and all are mutually independent. This property is usua ...
random variables with the same arbitrary distribution, zero mean, and variance \sigma^2 and Z is their mean scaled by \sqrt : Z = \sqrt\left(\frac\sum_^n X_i\right) Then, as n increases, the probability distribution of Z will tend to the normal distribution with zero mean and variance \sigma^2. The theorem can be extended to variables (X_i) that are not independent and/or not identically distributed if certain constraints are placed on the degree of dependence and the moments of the distributions. Many
test statistic A test statistic is a statistic (a quantity derived from the sample) used in statistical hypothesis testing.Berger, R. L.; Casella, G. (2001). ''Statistical Inference'', Duxbury Press, Second Edition (p.374) A hypothesis test is typically specif ...
s, scores, and
estimator In statistics, an estimator is a rule for calculating an estimate of a given quantity based on observed data: thus the rule (the estimator), the quantity of interest (the estimand) and its result (the estimate) are distinguished. For example, the ...
s encountered in practice contain sums of certain random variables in 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 distributions. The central limit theorem also implies that certain distributions can be approximated by the normal distribution, for example: * The
binomial distribution In probability theory and statistics, the binomial distribution with parameters ''n'' and ''p'' is the discrete probability distribution of the number of successes in a sequence of ''n'' independent experiments, each asking a yes–no quest ...
B(n,p) is approximately normal with mean np and variance np(1-p) for large n and for p not too close to 0 or 1. * The
Poisson distribution In probability theory and statistics, the Poisson distribution is a discrete probability distribution that expresses the probability of a given number of events occurring in a fixed interval of time or space if these events occur with a known co ...
with parameter \lambda is approximately normal with mean \lambda and variance \lambda, for large values of \lambda. * The
chi-squared distribution In probability theory and statistics, the chi-squared distribution (also chi-square or \chi^2-distribution) with k degrees of freedom is the distribution of a sum of the squares of k independent standard normal random variables. The chi-squa ...
\chi^2(k) is approximately normal with mean k and variance 2k, for large k. * The
Student's t-distribution In probability and statistics, Student's ''t''-distribution (or simply the ''t''-distribution) is any member of a family of continuous probability distributions that arise when estimating the mean of a normally distributed population in sit ...
t(\nu) is approximately normal with mean 0 and variance 1 when \nu is large. Whether these approximations are sufficiently accurate depends on the purpose for which they are needed, and the rate of convergence to the normal distribution. It is typically the case that such approximations are less accurate in the tails of the distribution. A general upper bound for the approximation error in the central limit theorem is given by the
Berry–Esseen theorem In probability theory, the central limit theorem states that, under certain circumstances, the probability distribution of the scaled mean of a random sample converges to a normal distribution as the sample size increases to infinity. Under strong ...
, improvements of the approximation are given by the
Edgeworth expansion The Gram–Charlier A series (named in honor of Jørgen Pedersen Gram and Carl Charlier), and the Edgeworth series (named in honor of Francis Ysidro Edgeworth) are series that approximate a probability distribution in terms of its cumulants. The se ...
s. This theorem can also be used to justify modeling the sum of many uniform noise sources as
Gaussian noise Gaussian noise, named after Carl Friedrich Gauss, is a term from signal processing theory denoting a kind of signal noise that has a probability density function (pdf) equal to that of the normal distribution (which is also known as the Gaussia ...
. See
AWGN Additive white Gaussian noise (AWGN) is a basic noise model used in information theory to mimic the effect of many random processes that occur in nature. The modifiers denote specific characteristics: * ''Additive'' because it is added to any nois ...
.


Operations and functions of normal variables

The
probability density In probability theory, a probability density function (PDF), or density of a continuous random variable, is a function whose value at any given sample (or point) in the sample space (the set of possible values taken by the random variable) can ...
,
cumulative distribution In statistics, the frequency (or absolute frequency) of an event i is the number n_i of times the observation has occurred/recorded in an experiment or study. These frequencies are often depicted graphically or in tabular form. Types The cumul ...
, and inverse cumulative distribution of any function of one or more independent or correlated normal variables can be computed with the numerical method of ray-tracing
Matlab code
. In the following sections we look at some special cases.


Operations on a single normal variable

If X is distributed normally with mean \mu and variance \sigma^2, then * aX+b, for any real numbers a and b, is also normally distributed, with mean a\mu+b and standard deviation , a, \sigma. That is, the family of normal distributions is closed under linear transformations. * The exponential of X is distributed log-normally: . * The absolute value of X has
folded normal distribution The folded normal distribution is a probability distribution related to the normal distribution. Given a normally distributed random variable ''X'' with mean ''μ'' and variance ''σ''2, the random variable ''Y'' = , ''X'', has a folded normal d ...
: . If \mu = 0 this is known as the
half-normal distribution In probability theory and statistics, the half-normal distribution is a special case of the folded normal distribution. Let X follow an ordinary normal distribution, N(0,\sigma^2). Then, Y=, X, follows a half-normal distribution. Thus, the hal ...
. * The absolute value of normalized residuals, , ''X'' − ''μ'', /''σ'', has
chi distribution In probability theory and statistics, the chi distribution is a continuous probability distribution. It is the distribution of the positive square root of the sum of squares of a set of independent random variables each following a standard norm ...
with one degree of freedom: , X - \mu, / \sigma \sim \chi_1. * The square of ''X''/''σ'' has the
noncentral chi-squared distribution In probability theory and statistics, the noncentral chi-squared distribution (or noncentral chi-square distribution, noncentral \chi^2 distribution) is a noncentral generalization of the chi-squared distribution. It often arises in the power a ...
with one degree of freedom: X^2 / \sigma^2 \sim \chi_1^2(\mu^2 / \sigma^2). If \mu = 0, the distribution is called simply chi-squared. * The log likelihood of a normal variable x is simply the log of its
probability density function In probability theory, a probability density function (PDF), or density of a continuous random variable, is a function whose value at any given sample (or point) in the sample space (the set of possible values taken by the random variable) can ...
: \ln p(x)= -\frac \left(\frac \right)^2 -\ln \left(\sigma \sqrt \right) = -\frac z^2 -\ln \left(\sigma \sqrt \right). Since this is a scaled and shifted square of a standard normal variable, it is distributed as a scaled and shifted chi-squared variable. * The distribution of the variable ''X'' restricted to an interval 'a'', ''b''is called the
truncated normal distribution In probability and statistics, the truncated normal distribution is the probability distribution derived from that of a normally distributed random variable by bounding the random variable from either below or above (or both). The truncated no ...
. * (''X'' − ''μ'')−2 has a
Lévy distribution In probability theory and statistics, the Lévy distribution, named after Paul Lévy, is a continuous probability distribution for a non-negative random variable. In spectroscopy, this distribution, with frequency as the dependent variable, is kn ...
with location 0 and scale ''σ''−2.


= Operations on two independent normal variables

= * If X_1 and X_2 are two
independent Independent or Independents may refer to: Arts, entertainment, and media Artist groups * Independents (artist group), a group of modernist painters based in the New Hope, Pennsylvania, area of the United States during the early 1930s * Independ ...
normal random variables, with means \mu_1, \mu_2 and standard deviations \sigma_1, \sigma_2, then their sum X_1 + X_2 will also be normally distributed, roof/sup> with mean \mu_1 + \mu_2 and variance \sigma_1^2 + \sigma_2^2. * In particular, if X and Y are independent normal deviates with zero mean and variance \sigma^2, then X + Y and X - Y are also independent and normally distributed, with zero mean and variance 2\sigma^2. This is a special case of the
polarization identity In linear algebra, a branch of mathematics, the polarization identity is any one of a family of formulas that express the inner product of two vectors in terms of the norm of a normed vector space. If a norm arises from an inner product then t ...
. * If X_1, X_2 are two independent normal deviates with mean \mu and deviation \sigma, and a, b are arbitrary real numbers, then the variable X_3 = \frac + \mu is also normally distributed with mean \mu and deviation \sigma. It follows that the normal distribution is
stable A stable is a building in which livestock, especially horses, are kept. It most commonly means a building that is divided into separate stalls for individual animals and livestock. There are many different types of stables in use today; the ...
(with exponent \alpha=2).


= Operations on two independent standard normal variables

= If X_1 and X_2 are two independent standard normal random variables with mean 0 and variance 1, then * Their sum and difference is distributed normally with mean zero and variance two: X_1 \pm X_2 \sim N(0, 2). * Their product Z = X_1 X_2 follows the
product distribution A product distribution is a probability distribution constructed as the distribution of the product of random variables having two other known distributions. Given two statistically independent random variables ''X'' and ''Y'', the distribution of ...
with density function f_Z(z) = \pi^ K_0(, z, ) where K_0 is the
modified Bessel function of the second kind Bessel functions, first defined by the mathematician Daniel Bernoulli and then generalized by Friedrich Bessel, are canonical solutions of Bessel's differential equation x^2 \frac + x \frac + \left(x^2 - \alpha^2 \right)y = 0 for an arbitrary ...
. This distribution is symmetric around zero, unbounded at z = 0, and has the
characteristic function In mathematics, the term "characteristic function" can refer to any of several distinct concepts: * The indicator function of a subset, that is the function ::\mathbf_A\colon X \to \, :which for a given subset ''A'' of ''X'', has value 1 at points ...
\phi_Z(t) = (1 + t^2)^. * Their ratio follows the standard
Cauchy distribution The Cauchy distribution, named after Augustin Cauchy, is a continuous probability distribution. It is also known, especially among physicists, as the Lorentz distribution (after Hendrik Lorentz), Cauchy–Lorentz distribution, Lorentz(ian) fun ...
: X_1/ X_2 \sim \operatorname(0, 1). * Their Euclidean norm \sqrt has the
Rayleigh distribution In probability theory and statistics, the Rayleigh distribution is a continuous probability distribution for nonnegative-valued random variables. Up to rescaling, it coincides with the chi distribution with two degrees of freedom. The distribut ...
.


Operations on multiple independent normal variables

* Any linear combination of independent normal deviates is a normal deviate. * If X_1, X_2, \ldots, X_n are independent standard normal random variables, then the sum of their squares has the
chi-squared distribution In probability theory and statistics, the chi-squared distribution (also chi-square or \chi^2-distribution) with k degrees of freedom is the distribution of a sum of the squares of k independent standard normal random variables. The chi-squa ...
with n degrees of freedom X_1^2 + \cdots + X_n^2 \sim \chi_n^2. * If X_1, X_2, \ldots, X_n are independent normally distributed random variables with means \mu and variances \sigma^2, then their
sample mean The sample mean (or "empirical mean") and the sample covariance are statistics computed from a Sample (statistics), sample of data on one or more random variables. The sample mean is the average value (or mean, mean value) of a sample (statistic ...
is independent from the sample
standard deviation In statistics, the standard deviation is a measure of the amount of variation or dispersion of a set of values. A low standard deviation indicates that the values tend to be close to the mean (also called the expected value) of the set, while ...
, which can be demonstrated using Basu's theorem or
Cochran's theorem In statistics, Cochran's theorem, devised by William G. Cochran, is a theorem used to justify results relating to the probability distributions of statistics that are used in the analysis of variance. Statement Let ''U''1, ..., ''U'N'' be i.i. ...
. The ratio of these two quantities will have the
Student's t-distribution In probability and statistics, Student's ''t''-distribution (or simply the ''t''-distribution) is any member of a family of continuous probability distributions that arise when estimating the mean of a normally distributed population in sit ...
with n-1 degrees of freedom: t = \frac = \frac \sim t_. * If X_1, X_2, \ldots, X_n, Y_1, Y_2, \ldots, Y_m are independent standard normal random variables, then the ratio of their normalized sums of squares will have the with degrees of freedom: F = \frac \sim F_.


Operations on multiple correlated normal variables

* A
quadratic form In mathematics, a quadratic form is a polynomial with terms all of degree two ("form" is another name for a homogeneous polynomial). For example, :4x^2 + 2xy - 3y^2 is a quadratic form in the variables and . The coefficients usually belong to a ...
of a normal vector, i.e. a quadratic function q = \sum x_i^2 + \sum x_j + c of multiple independent or correlated normal variables, is a generalized chi-square variable.


Operations on the density function

The split normal distribution is most directly defined in terms of joining scaled sections of the density functions of different normal distributions and rescaling the density to integrate to one. The
truncated normal distribution In probability and statistics, the truncated normal distribution is the probability distribution derived from that of a normally distributed random variable by bounding the random variable from either below or above (or both). The truncated no ...
results from rescaling a section of a single density function.


Infinite divisibility and Cramér's theorem

For any positive integer \text, any normal distribution with mean \mu and variance \sigma^2 is the distribution of the sum of \text independent normal deviates, each with mean \frac and variance \frac. This property is called
infinite divisibility Infinite divisibility arises in different ways in philosophy, physics, economics, order theory (a branch of mathematics), and probability theory (also a branch of mathematics). One may speak of infinite divisibility, or the lack thereof, of matter ...
. Conversely, if X_1 and X_2 are independent random variables and their sum X_1+X_2 has a normal distribution, then both X_1 and X_2 must be normal deviates. This result is known as Cramér's decomposition theorem, and is equivalent to saying that the convolution of two distributions is normal if and only if both are normal. Cramér's theorem implies that a linear combination of independent non-Gaussian variables will never have an exactly normal distribution, although it may approach it arbitrarily closely.


Bernstein's theorem

Bernstein's theorem states that if X and Y are independent and X + Y and X - Y are also independent, then both ''X'' and ''Y'' must necessarily have normal distributions. More generally, if X_1, \ldots, X_n are independent random variables, then two distinct linear combinations \sum and \sumwill be independent if and only if all X_k are normal and \sum, where \sigma_k^2 denotes the variance of X_k.


Extensions

The notion of normal distribution, being one of the most important distributions in probability theory, has been extended far beyond the standard framework of the univariate (that is one-dimensional) case (Case 1). All these extensions are also called ''normal'' or ''Gaussian'' laws, so a certain ambiguity in names exists. * The
multivariate normal distribution In probability theory and statistics, the multivariate normal distribution, multivariate Gaussian distribution, or joint normal distribution is a generalization of the one-dimensional (univariate) normal distribution to higher dimensions. One d ...
describes the Gaussian law in the ''k''-dimensional Euclidean space. A vector is multivariate-normally distributed if any linear combination of its components has a (univariate) normal distribution. The variance of ''X'' is a ''k×k'' symmetric positive-definite matrix ''V''. The multivariate normal distribution is a special case of the
elliptical distribution In probability and statistics, an elliptical distribution is any member of a broad family of probability distributions that generalize the multivariate normal distribution. Intuitively, in the simplified two and three dimensional case, the joint di ...
s. As such, its iso-density loci in the ''k'' = 2 case are ellipses and in the case of arbitrary ''k'' are ellipsoids. * Rectified Gaussian distribution a rectified version of normal distribution with all the negative elements reset to 0 * Complex normal distribution deals with the complex normal vectors. A complex vector is said to be normal if both its real and imaginary components jointly possess a 2''k''-dimensional multivariate normal distribution. The variance-covariance structure of ''X'' is described by two matrices: the ''variance'' matrix Γ, and the ''relation'' matrix ''C''. * Matrix normal distribution describes the case of normally distributed matrices. * Gaussian processes are the normally distributed stochastic processes. These can be viewed as elements of some infinite-dimensional Hilbert space ''H'', and thus are the analogues of multivariate normal vectors for the case . A random element is said to be normal if for any constant the scalar product has a (univariate) normal distribution. The variance structure of such Gaussian random element can be described in terms of the linear ''covariance ''. Several Gaussian processes became popular enough to have their own names: ** Wiener process, Brownian motion, ** Brownian bridge, ** Ornstein–Uhlenbeck process. * Gaussian q-distribution is an abstract mathematical construction that represents a "q-analogue" of the normal distribution. * the q-Gaussian is an analogue of the Gaussian distribution, in the sense that it maximises the Tsallis entropy, and is one type of Tsallis distribution. Note that this distribution is different from the Gaussian q-distribution above. * The Kaniadakis Gaussian distribution, Kaniadakis ''κ''-Gaussian distribution is a generalization of the Gaussian distribution which arises from the Kaniadakis statistics, being one of the Kaniadakis distribution, Kaniadakis distributions. A random variable ''X'' has a two-piece normal distribution if it has a distribution : f_X( x ) = N( \mu, \sigma_1^2 ) \text x \le \mu : f_X( x ) = N( \mu, \sigma_2^2 ) \text x \ge \mu where ''μ'' is the mean and ''σ''1 and ''σ''2 are the standard deviations of the distribution to the left and right of the mean respectively. The mean, variance and third central moment of this distribution have been determined : \operatorname( X ) = \mu + \sqrt ( \sigma_2 - \sigma_1 ) : \operatorname( X ) = \left( 1 - \frac 2 \pi\right)( \sigma_2 - \sigma_1 )^2 + \sigma_1 \sigma_2 : \operatorname( X ) = \sqrt( \sigma_2 - \sigma_1 ) \left[ \left( \frac 4 \pi - 1 \right) ( \sigma_2 - \sigma_1)^2 + \sigma_1 \sigma_2 \right] where E(''X''), V(''X'') and T(''X'') are the mean, variance, and third central moment respectively. One of the main practical uses of the Gaussian law is to model the empirical distributions of many different random variables encountered in practice. In such case a possible extension would be a richer family of distributions, having more than two parameters and therefore being able to fit the empirical distribution more accurately. The examples of such extensions are: * Pearson distribution — a four-parameter family of probability distributions that extend the normal law to include different skewness and kurtosis values. * The generalized normal distribution, also known as the exponential power distribution, allows for distribution tails with thicker or thinner asymptotic behaviors.


Statistical inference


Estimation of parameters

It is often the case that we do not know the parameters of the normal distribution, but instead want to Estimation theory, estimate them. That is, having a sample (x_1, \ldots, x_n) from a normal N(\mu, \sigma^2) population we would like to learn the approximate values of parameters \mu and \sigma^2. The standard approach to this problem is the maximum likelihood method, which requires maximization of the ''log-likelihood function'': : \ln\mathcal(\mu,\sigma^2) = \sum_^n \ln f(x_i\mid\mu,\sigma^2) = -\frac\ln(2\pi) - \frac\ln\sigma^2 - \frac\sum_^n (x_i-\mu)^2. Taking derivatives with respect to \mu and \sigma^2 and solving the resulting system of first order conditions yields the ''maximum likelihood estimates'': : \hat = \overline \equiv \frac\sum_^n x_i, \qquad \hat^2 = \frac \sum_^n (x_i - \overline)^2.


Sample mean

Estimator \textstyle\hat\mu is called the ''
sample mean The sample mean (or "empirical mean") and the sample covariance are statistics computed from a Sample (statistics), sample of data on one or more random variables. The sample mean is the average value (or mean, mean value) of a sample (statistic ...
'', since it is the arithmetic mean of all observations. The statistic \textstyle\overline is complete statistic, complete and sufficient statistic, sufficient for \mu, and therefore by the Lehmann–Scheffé theorem, \textstyle\hat\mu is the uniformly minimum variance unbiased (UMVU) estimator. In finite samples it is distributed normally: : \hat\mu \sim \mathcal(\mu,\sigma^2/n). The variance of this estimator is equal to the ''μμ''-element of the inverse Fisher information matrix \textstyle\mathcal^. This implies that the estimator is efficient estimator, finite-sample efficient. Of practical importance is the fact that the standard error (statistics), standard error of \textstyle\hat\mu is proportional to \textstyle1/\sqrt, that is, if one wishes to decrease the standard error by a factor of 10, one must increase the number of points in the sample by a factor of 100. This fact is widely used in determining sample sizes for opinion polls and the number of trials in Monte Carlo simulations. From the standpoint of the asymptotic theory (statistics), asymptotic theory, \textstyle\hat\mu is consistent estimator, consistent, that is, it convergence in probability, converges in probability to \mu as n\rightarrow\infty. The estimator is also asymptotic normality, asymptotically normal, which is a simple corollary of the fact that it is normal in finite samples: : \sqrt(\hat\mu-\mu) \,\xrightarrow\, \mathcal(0,\sigma^2).


Sample variance

The estimator \textstyle\hat\sigma^2 is called the ''sample variance'', since it is the variance of the sample ((x_1, \ldots, x_n)). In practice, another estimator is often used instead of the \textstyle\hat\sigma^2. This other estimator is denoted s^2, and is also called the ''sample variance'', which represents a certain ambiguity in terminology; its square root s is called the ''sample standard deviation''. The estimator s^2 differs from \textstyle\hat\sigma^2 by having instead of ''n'' in the denominator (the so-called Bessel's correction): : s^2 = \frac \hat\sigma^2 = \frac \sum_^n (x_i - \overline)^2. The difference between s^2 and \textstyle\hat\sigma^2 becomes negligibly small for large ''n''s. In finite samples however, the motivation behind the use of s^2 is that it is an unbiased estimator of the underlying parameter \sigma^2, whereas \textstyle\hat\sigma^2 is biased. Also, by the Lehmann–Scheffé theorem the estimator s^2 is uniformly minimum variance unbiased (Minimum-variance unbiased estimator, UMVU), which makes it the "best" estimator among all unbiased ones. However it can be shown that the biased estimator \textstyle\hat\sigma^2 is "better" than the s^2 in terms of the mean squared error (MSE) criterion. In finite samples both s^2 and \textstyle\hat\sigma^2 have scaled
chi-squared distribution In probability theory and statistics, the chi-squared distribution (also chi-square or \chi^2-distribution) with k degrees of freedom is the distribution of a sum of the squares of k independent standard normal random variables. The chi-squa ...
with degrees of freedom: : s^2 \sim \frac \cdot \chi^2_, \qquad \hat\sigma^2 \sim \frac \cdot \chi^2_. The first of these expressions shows that the variance of s^2 is equal to 2\sigma^4/(n-1), which is slightly greater than the ''σσ''-element of the inverse Fisher information matrix \textstyle\mathcal^. Thus, s^2 is not an efficient estimator for \sigma^2, and moreover, since s^2 is UMVU, we can conclude that the finite-sample efficient estimator for \sigma^2 does not exist. Applying the asymptotic theory, both estimators s^2 and \textstyle\hat\sigma^2 are consistent, that is they converge in probability to \sigma^2 as the sample size n\rightarrow\infty. The two estimators are also both asymptotically normal: : \sqrt(\hat\sigma^2 - \sigma^2) \simeq \sqrt(s^2-\sigma^2) \,\xrightarrow\, \mathcal(0,2\sigma^4). In particular, both estimators are asymptotically efficient for \sigma^2.


Confidence intervals

By
Cochran's theorem In statistics, Cochran's theorem, devised by William G. Cochran, is a theorem used to justify results relating to the probability distributions of statistics that are used in the analysis of variance. Statement Let ''U''1, ..., ''U'N'' be i.i. ...
, for normal distributions the sample mean \textstyle\hat\mu and the sample variance ''s''2 are
independent Independent or Independents may refer to: Arts, entertainment, and media Artist groups * Independents (artist group), a group of modernist painters based in the New Hope, Pennsylvania, area of the United States during the early 1930s * Independ ...
, which means there can be no gain in considering their joint distribution. There is also a converse theorem: if in a sample the sample mean and sample variance are independent, then the sample must have come from the normal distribution. The independence between \textstyle\hat\mu and ''s'' can be employed to construct the so-called ''t-statistic'': : t = \frac = \frac \sim t_ This quantity ''t'' has the
Student's t-distribution In probability and statistics, Student's ''t''-distribution (or simply the ''t''-distribution) is any member of a family of continuous probability distributions that arise when estimating the mean of a normally distributed population in sit ...
with degrees of freedom, and it is an ancillary statistic (independent of the value of the parameters). Inverting the distribution of this ''t''-statistics will allow us to construct the
confidence interval In frequentist statistics, a confidence interval (CI) is a range of estimates for an unknown parameter. A confidence interval is computed at a designated ''confidence level''; the 95% confidence level is most common, but other levels, such as 9 ...
for ''μ''; similarly, inverting the ''χ''2 distribution of the statistic ''s''2 will give us the confidence interval for ''σ''2: :\mu \in \left[ \hat\mu - t_ \fracs, \hat\mu + t_ \fracs \right], :\sigma^2 \in \left[ \frac, \frac \right], where ''tk,p'' and are the ''p''th
quantile In statistics and probability, quantiles are cut points dividing the range of a probability distribution into continuous intervals with equal probabilities, or dividing the observations in a sample in the same way. There is one fewer quantile tha ...
s of the ''t''- and ''χ''2-distributions respectively. These confidence intervals are of the ''confidence level'' , meaning that the true values ''μ'' and ''σ''2 fall outside of these intervals with probability (or significance level) ''α''. In practice people usually take , resulting in the 95% confidence intervals. Approximate formulas can be derived from the asymptotic distributions of \textstyle\hat\mu and ''s''2: :\mu \in \left[ \hat\mu - , z_, \fracs, \hat\mu + , z_, \fracs \right], :\sigma^2 \in \left[ s^2 - , z_, \fracs^2, s^2 + , z_, \fracs^2 \right], The approximate formulas become valid for large values of ''n'', and are more convenient for the manual calculation since the standard normal quantiles ''z''''α''/2 do not depend on ''n''. In particular, the most popular value of , results in .


Normality tests

Normality tests assess the likelihood that the given data set comes from a normal distribution. Typically the null hypothesis ''H''0 is that the observations are distributed normally with unspecified mean ''μ'' and variance ''σ''2, versus the alternative ''Ha'' that the distribution is arbitrary. Many tests (over 40) have been devised for this problem. The more prominent of them are outlined below: Diagnostic plots are more intuitively appealing but subjective at the same time, as they rely on informal human judgement to accept or reject the null hypothesis. *
Q–Q plot In statistics, a Q–Q plot (quantile-quantile plot) is a probability plot, a List of graphical methods, graphical method for comparing two probability distributions by plotting their ''quantiles'' against each other. A point on the plot co ...
, also known as normal probability plot or rankit plot—is a plot of the sorted values from the data set against the expected values of the corresponding quantiles from the standard normal distribution. That is, it's a plot of point of the form (Φ−1(''pk''), ''x''(''k'')), where plotting points ''pk'' are equal to ''pk'' = (''k'' − ''α'')/(''n'' + 1 − 2''α'') and ''α'' is an adjustment constant, which can be anything between 0 and 1. If the null hypothesis is true, the plotted points should approximately lie on a straight line. * P–P plot – similar to the Q–Q plot, but used much less frequently. This method consists of plotting the points (Φ(''z''(''k'')), ''pk''), where \textstyle z_ = (x_-\hat\mu)/\hat\sigma. For normally distributed data this plot should lie on a 45° line between (0, 0) and (1, 1). Goodness-of-fit tests: ''Moment-based tests'': * D'Agostino's K-squared test * Jarque–Bera test * Shapiro–Wilk test: This is based on the fact that the line in the Q–Q plot has the slope of ''σ''. The test compares the least squares estimate of that slope with the value of the sample variance, and rejects the null hypothesis if these two quantities differ significantly. ''Tests based on the empirical distribution function'': * Anderson–Darling test * Lilliefors test (an adaptation of the Kolmogorov–Smirnov test)


Bayesian analysis of the normal distribution

Bayesian analysis of normally distributed data is complicated by the many different possibilities that may be considered: * Either the mean, or the variance, or neither, may be considered a fixed quantity. * When the variance is unknown, analysis may be done directly in terms of the variance, or in terms of the
precision Precision, precise or precisely may refer to: Science, and technology, and mathematics Mathematics and computing (general) * Accuracy and precision, measurement deviation from true value and its scatter * Significant figures, the number of digit ...
, the reciprocal of the variance. The reason for expressing the formulas in terms of precision is that the analysis of most cases is simplified. * Both univariate and multivariate normal distribution, multivariate cases need to be considered. * Either conjugate prior, conjugate or improper prior, improper prior distributions may be placed on the unknown variables. * An additional set of cases occurs in Bayesian linear regression, where in the basic model the data is assumed to be normally distributed, and normal priors are placed on the regression coefficients. The resulting analysis is similar to the basic cases of independent identically distributed data. The formulas for the non-linear-regression cases are summarized in the conjugate prior article.


Sum of two quadratics


= Scalar form

= The following auxiliary formula is useful for simplifying the posterior distribution, posterior update equations, which otherwise become fairly tedious. :a(x-y)^2 + b(x-z)^2 = (a + b)\left(x - \frac\right)^2 + \frac(y-z)^2 This equation rewrites the sum of two quadratics in ''x'' by expanding the squares, grouping the terms in ''x'', and completing the square. Note the following about the complex constant factors attached to some of the terms: # The factor \frac has the form of a weighted average of ''y'' and ''z''. # \frac = \frac = (a^ + b^)^. This shows that this factor can be thought of as resulting from a situation where the Multiplicative inverse, reciprocals of quantities ''a'' and ''b'' add directly, so to combine ''a'' and ''b'' themselves, it's necessary to reciprocate, add, and reciprocate the result again to get back into the original units. This is exactly the sort of operation performed by the harmonic mean, so it is not surprising that \frac is one-half the harmonic mean of ''a'' and ''b''.


= Vector form

= A similar formula can be written for the sum of two vector quadratics: If x, y, z are vectors of length ''k'', and A and B are symmetric matrix, symmetric, invertible matrices of size k\times k, then : \begin & (\mathbf-\mathbf)'\mathbf(\mathbf-\mathbf) + (\mathbf-\mathbf)' \mathbf(\mathbf-\mathbf) \\ = & (\mathbf - \mathbf)'(\mathbf+\mathbf)(\mathbf - \mathbf) + (\mathbf - \mathbf)'(\mathbf^ + \mathbf^)^(\mathbf - \mathbf) \end where :\mathbf = (\mathbf + \mathbf)^(\mathbf\mathbf + \mathbf \mathbf) Note that the form x′ A x is called a
quadratic form In mathematics, a quadratic form is a polynomial with terms all of degree two ("form" is another name for a homogeneous polynomial). For example, :4x^2 + 2xy - 3y^2 is a quadratic form in the variables and . The coefficients usually belong to a ...
and is a scalar (mathematics), scalar: :\mathbf'\mathbf\mathbf = \sum_a_ x_i x_j In other words, it sums up all possible combinations of products of pairs of elements from x, with a separate coefficient for each. In addition, since x_i x_j = x_j x_i, only the sum a_ + a_ matters for any off-diagonal elements of A, and there is no loss of generality in assuming that A is symmetric matrix, symmetric. Furthermore, if A is symmetric, then the form \mathbf'\mathbf\mathbf = \mathbf'\mathbf\mathbf.


Sum of differences from the mean

Another useful formula is as follows: \sum_^n (x_i-\mu)^2 = \sum_^n (x_i-\bar)^2 + n(\bar -\mu)^2 where \bar = \frac \sum_^n x_i.


With known variance

For a set of i.i.d. normally distributed data points X of size ''n'' where each individual point ''x'' follows x \sim \mathcal(\mu, \sigma^2) with known
variance In probability theory and statistics, variance is the expectation of the squared deviation of a random variable from its population mean or sample mean. Variance is a measure of dispersion, meaning it is a measure of how far a set of numbers ...
σ2, the conjugate prior distribution is also normally distributed. This can be shown more easily by rewriting the variance as the
precision Precision, precise or precisely may refer to: Science, and technology, and mathematics Mathematics and computing (general) * Accuracy and precision, measurement deviation from true value and its scatter * Significant figures, the number of digit ...
, i.e. using τ = 1/σ2. Then if x \sim \mathcal(\mu, 1/\tau) and \mu \sim \mathcal(\mu_0, 1/\tau_0), we proceed as follows. First, the likelihood function is (using the formula above for the sum of differences from the mean): :\begin p(\mathbf\mid\mu,\tau) &= \prod_^n \sqrt \exp\left(-\frac\tau(x_i-\mu)^2\right) \\ &= \left(\frac\right)^ \exp\left(-\frac\tau \sum_^n (x_i-\mu)^2\right) \\ &= \left(\frac\right)^ \exp\left[-\frac\tau \left(\sum_^n(x_i-\bar)^2 + n(\bar -\mu)^2\right)\right]. \end Then, we proceed as follows: :\begin p(\mu\mid\mathbf) &\propto p(\mathbf\mid\mu) p(\mu) \\ & = \left(\frac\right)^ \exp\left[-\frac\tau \left(\sum_^n(x_i-\bar)^2 + n(\bar -\mu)^2\right)\right] \sqrt \exp\left(-\frac\tau_0(\mu-\mu_0)^2\right) \\ &\propto \exp\left(-\frac\left(\tau\left(\sum_^n(x_i-\bar)^2 + n(\bar -\mu)^2\right) + \tau_0(\mu-\mu_0)^2\right)\right) \\ &\propto \exp\left(-\frac \left(n\tau(\bar-\mu)^2 + \tau_0(\mu-\mu_0)^2 \right)\right) \\ &= \exp\left(-\frac(n\tau + \tau_0)\left(\mu - \dfrac\right)^2 + \frac(\bar - \mu_0)^2\right) \\ &\propto \exp\left(-\frac(n\tau + \tau_0)\left(\mu - \dfrac\right)^2\right) \end In the above derivation, we used the formula above for the sum of two quadratics and eliminated all constant factors not involving ''μ''. The result is the kernel (statistics), kernel of a normal distribution, with mean \frac and precision n\tau + \tau_0, i.e. :p(\mu\mid\mathbf) \sim \mathcal\left(\frac, \frac\right) This can be written as a set of Bayesian update equations for the posterior parameters in terms of the prior parameters: :\begin \tau_0' &= \tau_0 + n\tau \\[5pt] \mu_0' &= \frac \\[5pt] \bar &= \frac\sum_^n x_i \end That is, to combine ''n'' data points with total precision of ''nτ'' (or equivalently, total variance of ''n''/''σ''2) and mean of values \bar, derive a new total precision simply by adding the total precision of the data to the prior total precision, and form a new mean through a ''precision-weighted average'', i.e. a weighted average of the data mean and the prior mean, each weighted by the associated total precision. This makes logical sense if the precision is thought of as indicating the certainty of the observations: In the distribution of the posterior mean, each of the input components is weighted by its certainty, and the certainty of this distribution is the sum of the individual certainties. (For the intuition of this, compare the expression "the whole is (or is not) greater than the sum of its parts". In addition, consider that the knowledge of the posterior comes from a combination of the knowledge of the prior and likelihood, so it makes sense that we are more certain of it than of either of its components.) The above formula reveals why it is more convenient to do Bayesian analysis of conjugate priors for the normal distribution in terms of the precision. The posterior precision is simply the sum of the prior and likelihood precisions, and the posterior mean is computed through a precision-weighted average, as described above. The same formulas can be written in terms of variance by reciprocating all the precisions, yielding the more ugly formulas :\begin ' &= \frac \\[5pt] \mu_0' &= \frac \\[5pt] \bar &= \frac\sum_^n x_i \end


With known mean

For a set of i.i.d. normally distributed data points X of size ''n'' where each individual point ''x'' follows x \sim \mathcal(\mu, \sigma^2) with known mean μ, the conjugate prior of the
variance In probability theory and statistics, variance is the expectation of the squared deviation of a random variable from its population mean or sample mean. Variance is a measure of dispersion, meaning it is a measure of how far a set of numbers ...
has an inverse gamma distribution or a scaled inverse chi-squared distribution. The two are equivalent 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. The prior for σ2 is as follows: :p(\sigma^2\mid\nu_0,\sigma_0^2) = \frac~\frac \propto \frac The likelihood function from above, written in terms of the variance, is: :\begin p(\mathbf\mid\mu,\sigma^2) &= \left(\frac\right)^ \exp\left[-\frac \sum_^n (x_i-\mu)^2\right] \\ &= \left(\frac\right)^ \exp\left[-\frac\right] \end where :S = \sum_^n (x_i-\mu)^2. Then: :\begin p(\sigma^2\mid\mathbf) &\propto p(\mathbf\mid\sigma^2) p(\sigma^2) \\ &= \left(\frac\right)^ \exp\left[-\frac\right] \frac~\frac \\ &\propto \left(\frac\right)^ \frac \exp\left[-\frac + \frac\right] \\ &= \frac \exp\left[-\frac\right] \end The above is also a scaled inverse chi-squared distribution where :\begin \nu_0' &= \nu_0 + n \\ \nu_0'' &= \nu_0 \sigma_0^2 + \sum_^n (x_i-\mu)^2 \end or equivalently :\begin \nu_0' &= \nu_0 + n \\ ' &= \frac \end Reparameterizing in terms of an inverse gamma distribution, the result is: :\begin \alpha' &= \alpha + \frac \\ \beta' &= \beta + \frac \end


With unknown mean and unknown variance

For a set of i.i.d. normally distributed data points X of size ''n'' where each individual point ''x'' follows x \sim \mathcal(\mu, \sigma^2) with unknown mean μ and unknown
variance In probability theory and statistics, variance is the expectation of the squared deviation of a random variable from its population mean or sample mean. Variance is a measure of dispersion, meaning it is a measure of how far a set of numbers ...
σ2, a combined (multivariate) conjugate prior is placed over the mean and variance, consisting of a normal-inverse-gamma distribution. Logically, this originates as follows: # From the analysis of the case with unknown mean but known variance, we see that the update equations involve sufficient statistics computed from the data consisting of the mean of the data points and the total variance of the data points, computed in turn from the known variance divided by the number of data points. # From the analysis of the case with unknown variance but known mean, we see that the update equations involve sufficient statistics over the data consisting of the number of data points and sum of squared deviations. # Keep in mind that the posterior update values serve as the prior distribution when further data is handled. Thus, we should logically think of our priors in terms of the sufficient statistics just described, with the same semantics kept in mind as much as possible. # To handle the case where both mean and variance are unknown, we could place independent priors over the mean and variance, with fixed estimates of the average mean, total variance, number of data points used to compute the variance prior, and sum of squared deviations. Note however that in reality, the total variance of the mean depends on the unknown variance, and the sum of squared deviations that goes into the variance prior (appears to) depend on the unknown mean. In practice, the latter dependence is relatively unimportant: Shifting the actual mean shifts the generated points by an equal amount, and on average the squared deviations will remain the same. This is not the case, however, with the total variance of the mean: As the unknown variance increases, the total variance of the mean will increase proportionately, and we would like to capture this dependence. # This suggests that we create a ''conditional prior'' of the mean on the unknown variance, with a hyperparameter specifying the mean of the pseudo-observations associated with the prior, and another parameter specifying the number of pseudo-observations. This number serves as a scaling parameter on the variance, making it possible to control the overall variance of the mean relative to the actual variance parameter. The prior for the variance also has two hyperparameters, one specifying the sum of squared deviations of the pseudo-observations associated with the prior, and another specifying once again the number of pseudo-observations. Note that each of the priors has a hyperparameter specifying the number of pseudo-observations, and in each case this controls the relative variance of that prior. These are given as two separate hyperparameters so that the variance (aka the confidence) of the two priors can be controlled separately. # This leads immediately to the normal-inverse-gamma distribution, which is the product of the two distributions just defined, with conjugate priors used (an inverse gamma distribution over the variance, and a normal distribution over the mean, ''conditional'' on the variance) and with the same four parameters just defined. The priors are normally defined as follows: :\begin p(\mu\mid\sigma^2; \mu_0, n_0) &\sim \mathcal(\mu_0,\sigma^2/n_0) \\ p(\sigma^2; \nu_0,\sigma_0^2) &\sim I\chi^2(\nu_0,\sigma_0^2) = IG(\nu_0/2, \nu_0\sigma_0^2/2) \end The update equations can be derived, and look as follows: :\begin \bar &= \frac 1 n \sum_^n x_i \\ \mu_0' &= \frac \\ n_0' &= n_0 + n \\ \nu_0' &= \nu_0 + n \\ \nu_0'' &= \nu_0 \sigma_0^2 + \sum_^n (x_i-\bar)^2 + \frac(\mu_0 - \bar)^2 \end The respective numbers of pseudo-observations add the number of actual observations to them. The new mean hyperparameter is once again a weighted average, this time weighted by the relative numbers of observations. Finally, the update for \nu_0'' is similar to the case with known mean, but in this case the sum of squared deviations is taken with respect to the observed data mean rather than the true mean, and as a result a new "interaction term" needs to be added to take care of the additional error source stemming from the deviation between prior and data mean.


Occurrence and applications

The occurrence of normal distribution in practical problems can be loosely classified into four categories: # Exactly normal distributions; # Approximately normal laws, for example when such approximation is justified by the
central limit theorem In probability theory, the central limit theorem (CLT) establishes that, in many situations, when independent random variables are summed up, their properly normalized sum tends toward a normal distribution even if the original variables themselv ...
; and # Distributions modeled as normal – the normal distribution being the distribution with Principle of maximum entropy, maximum entropy for a given mean and variance. # Regression problems – the normal distribution being found after systematic effects have been modeled sufficiently well.


Exact normality

Certain quantities in physics are distributed normally, as was first demonstrated by James Clerk Maxwell. Examples of such quantities are: * Probability density function of a ground state in a quantum harmonic oscillator. * The position of a particle that experiences diffusion. If initially the particle is located at a specific point (that is its probability distribution is the Dirac delta function), then after time ''t'' its location is described by a normal distribution with variance ''t'', which satisfies the diffusion equation \frac f(x,t) = \frac \frac f(x,t). If the initial location is given by a certain density function g(x), then the density at time ''t'' is the convolution of ''g'' and the normal PDF.


Approximate normality

''Approximately'' normal distributions occur in many situations, as explained by the
central limit theorem In probability theory, the central limit theorem (CLT) establishes that, in many situations, when independent random variables are summed up, their properly normalized sum tends toward a normal distribution even if the original variables themselv ...
. When the outcome is produced by many small effects acting ''additively and independently'', its distribution will be close to normal. The normal approximation will not be valid if the effects act multiplicatively (instead of additively), or if there is a single external influence that has a considerably larger magnitude than the rest of the effects. * In counting problems, where the central limit theorem includes a discrete-to-continuum approximation and where Infinite divisibility, infinitely divisible and Indecomposable distribution, decomposable distributions are involved, such as ** binomial distribution, Binomial random variables, associated with binary response variables; ** Poisson distribution, Poisson random variables, associated with rare events; * Thermal radiation has a Bose–Einstein statistics, Bose–Einstein distribution on very short time scales, and a normal distribution on longer timescales due to the central limit theorem.


Assumed normality

There are statistical methods to empirically test that assumption; see the above #Normality tests, Normality tests section. * In biology, the ''logarithm'' of various variables tend to have a normal distribution, that is, they tend to have a
log-normal distribution In probability theory, a log-normal (or lognormal) distribution is a continuous probability distribution of a random variable whose logarithm is normally distributed. Thus, if the random variable is log-normally distributed, then has a normal ...
(after separation on male/female subpopulations), with examples including: ** Measures of size of living tissue (length, height, skin area, weight); ** The ''length'' of ''inert'' appendages (hair, claws, nails, teeth) of biological specimens, ''in the direction of growth''; presumably the thickness of tree bark also falls under this category; ** Certain physiological measurements, such as blood pressure of adult humans. * In finance, in particular the Black–Scholes model, changes in the ''logarithm'' of exchange rates, price indices, and stock market indices are assumed normal (these variables behave like compound interest, not like simple interest, and so are multiplicative). Some mathematicians such as Benoit Mandelbrot have argued that Levy skew alpha-stable distribution, log-Levy distributions, which possesses heavy tails would be a more appropriate model, in particular for the analysis for stock market crashes. The use of the assumption of normal distribution occurring in financial models has also been criticized by Nassim Nicholas Taleb in his works. * Propagation of uncertainty, Measurement errors in physical experiments are often modeled by a normal distribution. This use of a normal distribution does not imply that one is assuming the measurement errors are normally distributed, rather using the normal distribution produces the most conservative predictions possible given only knowledge about the mean and variance of the errors. * In Standardized testing (statistics), standardized testing, results can be made to have a normal distribution by either selecting the number and difficulty of questions (as in the Intelligence quotient, IQ test) or transforming the raw test scores into "output" scores by fitting them to the normal distribution. For example, the SAT's traditional range of 200–800 is based on a normal distribution with a mean of 500 and a standard deviation of 100. * Many scores are derived from the normal distribution, including percentile ranks ("percentiles" or "quantiles"), normal curve equivalents, stanines, Standard score, z-scores, and T-scores. Additionally, some behavioral statistical procedures assume that scores are normally distributed; for example, Student's t-test, t-tests and Analysis of variance, ANOVAs. Bell curve grading assigns relative grades based on a normal distribution of scores. * In hydrology the distribution of long duration river discharge or rainfall, e.g. monthly and yearly totals, is often thought to be practically normal according to the
central limit theorem In probability theory, the central limit theorem (CLT) establishes that, in many situations, when independent random variables are summed up, their properly normalized sum tends toward a normal distribution even if the original variables themselv ...
. The blue picture, made with CumFreq, illustrates an example of fitting the normal distribution to ranked October rainfalls showing the 90% confidence belt based on the
binomial distribution In probability theory and statistics, the binomial distribution with parameters ''n'' and ''p'' is the discrete probability distribution of the number of successes in a sequence of ''n'' independent experiments, each asking a yes–no quest ...
. The rainfall data are represented by plotting positions as part of the cumulative frequency analysis.


Methodological problems and peer review

John Ioannidis argues that using normally distributed standard deviations as standards for validating research findings leave falsifiability, falsifiable predictions about phenomena that are not normally distributed untested. This includes, for example, phenomena that only appear when all necessary conditions are present and one cannot be a substitute for another in an addition-like way and phenomena that are not randomly distributed. Ioannidis argues that standard deviation-centered validation gives a false appearance of validity to hypotheses and theories where some but not all falsifiable predictions are normally distributed since the portion of falsifiable predictions that there is evidence against may and in some cases are in the non-normally distributed parts of the range of falsifiable predictions, as well as baselessly dismissing hypotheses for which none of the falsifiable predictions are normally distributed as if were they unfalsifiable when in fact they do make falsifiable predictions. It is argued by Ioannidis that many cases of mutually exclusive theories being accepted as "validated" by research journals are caused by failure of the journals to take in empirical falsifications of non-normally distributed predictions, and not because mutually exclusive theories are true, which they cannot be, although two mutually exclusive theories can both be wrong and a third one correct.


Computational methods


Generating values from normal distribution

In computer simulations, especially in applications of the Monte-Carlo method, it is often desirable to generate values that are normally distributed. The algorithms listed below all generate the standard normal deviates, since a can be generated as , where ''Z'' is standard normal. All these algorithms rely on the availability of a random number generator ''U'' capable of producing Uniform distribution (continuous), uniform random variates. * The most straightforward method is based on the probability integral transform property: if ''U'' is distributed uniformly on (0,1), then Φ−1(''U'') will have the standard normal distribution. The drawback of this method is that it relies on calculation of the
probit function In probability theory and statistics, the probit function is the quantile function associated with the standard normal distribution. It has applications in data analysis and machine learning, in particular exploratory statistical graphics and ...
Φ−1, which cannot be done analytically. Some approximate methods are described in and in the error function, erf article. Wichura gives a fast algorithm for computing this function to 16 decimal places, which is used by R programming language, R to compute random variates of the normal distribution. * Irwin–Hall distribution#Approximating a Normal distribution, An easy-to-program approximate approach that relies on the
central limit theorem In probability theory, the central limit theorem (CLT) establishes that, in many situations, when independent random variables are summed up, their properly normalized sum tends toward a normal distribution even if the original variables themselv ...
is as follows: generate 12 uniform ''U''(0,1) deviates, add them all up, and subtract 6 – the resulting random variable will have approximately standard normal distribution. In truth, the distribution will be Irwin–Hall distribution, Irwin–Hall, which is a 12-section eleventh-order polynomial approximation to the normal distribution. This random deviate will have a limited range of (−6, 6). Note that in a true normal distribution, only 0.00034% of all samples will fall outside ±6σ. * The Box–Muller transform, Box–Muller method uses two independent random numbers ''U'' and ''V'' distributed uniform distribution (continuous), uniformly on (0,1). Then the two random variables ''X'' and ''Y'' X = \sqrt \, \cos(2 \pi V) , \qquad Y = \sqrt \, \sin(2 \pi V) . will both have the standard normal distribution, and will be
independent Independent or Independents may refer to: Arts, entertainment, and media Artist groups * Independents (artist group), a group of modernist painters based in the New Hope, Pennsylvania, area of the United States during the early 1930s * Independ ...
. This formulation arises because for a bivariate normal random vector (''X'', ''Y'') the squared norm will have the
chi-squared distribution In probability theory and statistics, the chi-squared distribution (also chi-square or \chi^2-distribution) with k degrees of freedom is the distribution of a sum of the squares of k independent standard normal random variables. The chi-squa ...
with two degrees of freedom, which is an easily generated exponential distribution, exponential random variable corresponding to the quantity −2ln(''U'') in these equations; and the angle is distributed uniformly around the circle, chosen by the random variable ''V''. * The Marsaglia polar method is a modification of the Box–Muller method which does not require computation of the sine and cosine functions. In this method, ''U'' and ''V'' are drawn from the uniform (−1,1) distribution, and then is computed. If ''S'' is greater or equal to 1, then the method starts over, otherwise the two quantities X = U\sqrt, \qquad Y = V\sqrt are returned. Again, ''X'' and ''Y'' are independent, standard normal random variables. * The Ratio method is a rejection method. The algorithm proceeds as follows: ** Generate two independent uniform deviates ''U'' and ''V''; ** Compute ''X'' = (''V'' − 0.5)/''U''; ** Optional: if ''X''2 ≤ 5 − 4''e''1/4''U'' then accept ''X'' and terminate algorithm; ** Optional: if ''X''2 ≥ 4''e''−1.35/''U'' + 1.4 then reject ''X'' and start over from step 1; ** If ''X''2 ≤ −4 ln''U'' then accept ''X'', otherwise start over the algorithm. *:The two optional steps allow the evaluation of the logarithm in the last step to be avoided in most cases. These steps can be greatly improved so that the logarithm is rarely evaluated. * The ziggurat algorithm is faster than the Box–Muller transform and still exact. In about 97% of all cases it uses only two random numbers, one random integer and one random uniform, one multiplication and an if-test. Only in 3% of the cases, where the combination of those two falls outside the "core of the ziggurat" (a kind of rejection sampling using logarithms), do exponentials and more uniform random numbers have to be employed. * Integer arithmetic can be used to sample from the standard normal distribution. This method is exact in the sense that it satisfies the conditions of ''ideal approximation''; i.e., it is equivalent to sampling a real number from the standard normal distribution and rounding this to the nearest representable floating point number. * There is also some investigation into the connection between the fast Hadamard transform and the normal distribution, since the transform employs just addition and subtraction and by the central limit theorem random numbers from almost any distribution will be transformed into the normal distribution. In this regard a series of Hadamard transforms can be combined with random permutations to turn arbitrary data sets into a normally distributed data.


Numerical approximations for the normal CDF and normal quantile function

The standard normal cumulative distribution function, CDF is widely used in scientific and statistical computing. The values Φ(''x'') may be approximated very accurately by a variety of methods, such as numerical integration, Taylor series, asymptotic series and Gauss's continued fraction#Of Kummer's confluent hypergeometric function, continued fractions. Different approximations are used depending on the desired level of accuracy. * give the approximation for Φ(''x'') for ''x > 0'' with the absolute error (algorith
26.2.17
: \Phi(x) = 1 - \varphi(x)\left(b_1 t + b_2 t^2 + b_3t^3 + b_4 t^4 + b_5 t^5\right) + \varepsilon(x), \qquad t = \frac, where ''ϕ''(''x'') is the standard normal PDF, and ''b''0 = 0.2316419, ''b''1 = 0.319381530, ''b''2 = −0.356563782, ''b''3 = 1.781477937, ''b''4 = −1.821255978, ''b''5 = 1.330274429. * lists some dozens of approximations – by means of rational functions, with or without exponentials – for the function. His algorithms vary in the degree of complexity and the resulting precision, with maximum absolute precision of 24 digits. An algorithm by combines Hart's algorithm 5666 with a continued fraction approximation in the tail to provide a fast computation algorithm with a 16-digit precision. * after recalling Hart68 solution is not suited for erf, gives a solution for both erf and erfc, with maximal relative error bound, via rational function, Rational Chebyshev Approximation. * suggested a simple algorithm based on the Taylor series expansion \Phi(x) = \frac12 + \varphi(x)\left( x + \frac 3 + \frac + \frac + \frac + \cdots \right) for calculating with arbitrary precision. The drawback of this algorithm is comparatively slow calculation time (for example it takes over 300 iterations to calculate the function with 16 digits of precision when ). * The GNU Scientific Library calculates values of the standard normal CDF using Hart's algorithms and approximations with Chebyshev polynomials. Shore (1982) introduced simple approximations that may be incorporated in stochastic optimization models of engineering and operations research, like reliability engineering and inventory analysis. Denoting , the simplest approximation for the quantile function is: z = \Phi^(p)=5.5556\left[1- \left( \frac p \right)^\right],\qquad p\ge 1/2 This approximation delivers for ''z'' a maximum absolute error of 0.026 (for , corresponding to ). For replace ''p'' by and change sign. Another approximation, somewhat less accurate, is the single-parameter approximation: z=-0.4115\left\, \qquad p\ge 1/2 The latter had served to derive a simple approximation for the loss integral of the normal distribution, defined by \begin L(z) & =\int_z^\infty (u-z)\varphi(u) \, du=\int_z^\infty [1-\Phi (u)] \, du \\[5pt] L(z) & \approx \begin 0.4115\left(\dfrac p \right) - z, & p<1/2, \\ \\ 0.4115\left( \dfrac p \right), & p\ge 1/2. \end \\[5pt] \text \\ L(z) & \approx \begin 0.4115\left\, & p < 1/2, \\ \\ 0.4115 \dfrac p, & p\ge 1/2. \end \end This approximation is particularly accurate for the right far-tail (maximum error of 10−3 for z≥1.4). Highly accurate approximations for the CDF, based on Response modeling methodology, Response Modeling Methodology (RMM, Shore, 2011, 2012), are shown in Shore (2005). Some more approximations can be found at: Error function#Approximation with elementary functions. In particular, small ''relative'' error on the whole domain for the CDF \Phi and the quantile function \Phi^ as well, is achieved via an explicitly invertible formula by Sergei Winitzki in 2008.


History


Development

Some authors attribute the credit for the discovery of the normal distribution to Abraham de Moivre, de Moivre, who in 1738 published in the second edition of his "''The Doctrine of Chances''" the study of the coefficients in the binomial expansion of . De Moivre proved that the middle term in this expansion has the approximate magnitude of 2^n/\sqrt, and that "If ''m'' or ''n'' be a Quantity infinitely great, then the Logarithm of the Ratio, which a Term distant from the middle by the Interval ''ℓ'', has to the middle Term, is -\frac." Although this theorem can be interpreted as the first obscure expression for the normal probability law, Stephen Stigler, Stigler points out that de Moivre himself did not interpret his results as anything more than the approximate rule for the binomial coefficients, and in particular de Moivre lacked the concept of the probability density function. In 1823 Carl Friedrich Gauss, Gauss published his monograph "''Theoria combinationis observationum erroribus minimis obnoxiae''" where among other things he introduces several important statistical concepts, such as the method of least squares, the method of maximum likelihood, and the ''normal distribution''. Gauss used ''M'', , to denote the measurements of some unknown quantity ''V'', and sought the "most probable" estimator of that quantity: the one that maximizes the probability of obtaining the observed experimental results. In his notation φΔ is the probability density function of the measurement errors of magnitude Δ. Not knowing what the function ''φ'' is, Gauss requires that his method should reduce to the well-known answer: the arithmetic mean of the measured values. Starting from these principles, Gauss demonstrates that the only law that rationalizes the choice of arithmetic mean as an estimator of the location parameter, is the normal law of errors: \varphi\mathit = \frac h \, e^, where ''h'' is "the measure of the precision of the observations". Using this normal law as a generic model for errors in the experiments, Gauss formulates what is now known as the non-linear least squares, non-linear weighted least squares method. Although Gauss was the first to suggest the normal distribution law, Pierre Simon de Laplace, Laplace made significant contributions. It was Laplace who first posed the problem of aggregating several observations in 1774, although his own solution led to the Laplacian distribution. It was Laplace who first calculated the value of the Gaussian integral, integral in 1782, providing the normalization constant for the normal distribution. Finally, it was Laplace who in 1810 proved and presented to the Academy the fundamental
central limit theorem In probability theory, the central limit theorem (CLT) establishes that, in many situations, when independent random variables are summed up, their properly normalized sum tends toward a normal distribution even if the original variables themselv ...
, which emphasized the theoretical importance of the normal distribution. It is of interest to note that in 1809 an Irish-American mathematician Robert Adrain published two insightful but flawed derivations of the normal probability law, simultaneously and independently from Gauss. His works remained largely unnoticed by the scientific community, until in 1871 they were exhumed by Cleveland Abbe, Abbe. In the middle of the 19th century James Clerk Maxwell, Maxwell demonstrated that the normal distribution is not just a convenient mathematical tool, but may also occur in natural phenomena: "The number of particles whose velocity, resolved in a certain direction, lies between ''x'' and ''x'' + ''dx'' is \operatorname \frac\; e^ \, dx


Naming

Today, the concept is usually known in English as the normal distribution or Gaussian distribution. Other less common names include Gauss distribution, Laplace-Gauss distribution, the law of error, the law of facility of errors, Laplace's second law, Gaussian law. Gauss himself apparently coined the term with reference to the "normal equations" involved in its applications, with normal having its technical meaning of orthogonal rather than "usual". However, by the end of the 19th century some authors had started using the name ''normal distribution'', where the word "normal" was used as an adjective – the term now being seen as a reflection of the fact that this distribution was seen as typical, common – and thus "normal". Charles Sanders Peirce, Peirce (one of those authors) once defined "normal" thus: "...the 'normal' is not the average (or any other kind of mean) of what actually occurs, but of what ''would'', in the long run, occur under certain circumstances." Around the turn of the 20th century Karl Pearson, Pearson popularized the term ''normal'' as a designation for this distribution. Also, it was Pearson who first wrote the distribution in terms of the standard deviation ''σ'' as in modern notation. Soon after this, in year 1915, Ronald Fisher, Fisher added the location parameter to the formula for normal distribution, expressing it in the way it is written nowadays: df = \frac e^ \, dx. The term "standard normal", which denotes the normal distribution with zero mean and unit variance came into general use around the 1950s, appearing in the popular textbooks by P. G. Hoel (1947) "''Introduction to mathematical statistics''" and A. M. Mood (1950) "''Introduction to the theory of statistics''".


See also

* Bates distribution – similar to the Irwin–Hall distribution, but rescaled back into the 0 to 1 range * Behrens–Fisher problem – the long-standing problem of testing whether two normal samples with different variances have same means; * Bhattacharyya distance – method used to separate mixtures of normal distributions * Erdős–Kac theorem – on the occurrence of the normal distribution in number theory * Full width at half maximum * Gaussian blur – convolution, which uses the normal distribution as a kernel * Modified half-normal distribution with the pdf on (0, \infty) is given as f(x)= \frac, where \Psi(\alpha,z)=_1\Psi_1\left(\begin\left(\alpha,\frac\right)\\(1,0)\end;z \right) denotes the Fox-Wright Psi function. * Normally distributed and uncorrelated does not imply independent * Ratio normal distribution * Reciprocal normal distribution * Standard normal table * Stein's lemma * Sub-Gaussian distribution * Sum of normally distributed random variables * Tweedie distribution – The normal distribution is a member of the family of Tweedie exponential dispersion models. * Wrapped normal distribution – the Normal distribution applied to a circular domain * Z-test – using the normal distribution


Notes


References


Citations


Sources

* * In particular, the entries fo
"bell-shaped and bell curve"
an

* * * * * * * * * * * * * * * * * * * * * * * * Translated by Stephen M. Stigler in ''Statistical Science'' 1 (3), 1986: . * * * * * * * * * * * * * * * * * * * * * * * * * * * *


External links

*
Normal distribution calculator
{{Authority control Normal distribution, Continuous distributions Conjugate prior distributions Exponential family distributions Stable distributions Location-scale family probability distributions]">X - \mu, ^p\right&= \sigma^p (p-1)!! \cdot \begin \sqrt & \textp\text \\ 1 & \textp\text \end \\ &= \sigma^p \cdot \frac. \end The last formula is valid also for any non-integer p>-1. When the mean \mu \ne 0, the plain and absolute moments can be expressed in terms of
confluent hypergeometric function In mathematics, a confluent hypergeometric function is a solution of a confluent hypergeometric equation, which is a degenerate form of a hypergeometric differential equation where two of the three regular singularities merge into an irregular ...
s _1F_1 and U. :\begin \operatorname\left ^p\right&= \sigma^p\cdot (-i\sqrt 2)^p U\left(-\frac, \frac, -\frac \left( \frac \mu \sigma \right)^2 \right), \\ \operatorname\left[, X, ^p \right] &= \sigma^p \cdot 2^ \frac _1F_1\left( -\frac, \frac, -\frac \left( \frac \mu \sigma \right)^2 \right). \end These expressions remain valid even if p is not an integer. See also Hermite polynomials#"Negative variance", generalized Hermite polynomials. The expectation of X conditioned on the event that X lies in an interval ,b/math> is given by :\operatorname\left \mid a= \mu - \sigma^2\frac where f and F respectively are the density and the cumulative distribution function of X. For b=\infty this is known as the
inverse Mills ratio In probability theory, the Mills ratio (or Mills's ratio) of a continuous random variable X is the function : m(x) := \frac , where f(x) is the probability density function, and :\bar(x) := \Pr x.html" ;"title=">x">>x= \int_x^ f(u)\, du is the ...
. Note that above, density f of X is used instead of standard normal density as in inverse Mills ratio, so here we have \sigma^2 instead of \sigma.


Fourier transform and characteristic function

The
Fourier transform A Fourier transform (FT) is a mathematical transform that decomposes functions into frequency components, which are represented by the output of the transform as a function of frequency. Most commonly functions of time or space are transformed, ...
of a normal density f with mean \mu and standard deviation \sigma is : \hat f(t) = \int_^\infty f(x)e^ \, dx = e^ e^ where i is the
imaginary unit The imaginary unit or unit imaginary number () is a solution to the quadratic equation x^2+1=0. Although there is no real number with this property, can be used to extend the real numbers to what are called complex numbers, using addition an ...
. If the mean \mu=0, the first factor is 1, and the Fourier transform is, apart from a constant factor, a normal density on the
frequency domain In physics, electronics, control systems engineering, and statistics, the frequency domain refers to the analysis of mathematical functions or signals with respect to frequency, rather than time. Put simply, a time-domain graph shows how a signa ...
, with mean 0 and standard deviation 1/\sigma. In particular, the standard normal distribution \varphi is an
eigenfunction In mathematics, an eigenfunction of a linear operator ''D'' defined on some function space is any non-zero function f in that space that, when acted upon by ''D'', is only multiplied by some scaling factor called an eigenvalue. As an equation, th ...
of the Fourier transform. In probability theory, the Fourier transform of the probability distribution of a real-valued random variable X is closely connected to the
characteristic function In mathematics, the term "characteristic function" can refer to any of several distinct concepts: * The indicator function of a subset, that is the function ::\mathbf_A\colon X \to \, :which for a given subset ''A'' of ''X'', has value 1 at points ...
\varphi_X(t) of that variable, which is defined as the
expected value In probability theory, the expected value (also called expectation, expectancy, mathematical expectation, mean, average, or first moment) is a generalization of the weighted average. Informally, the expected value is the arithmetic mean of a l ...
of e^, as a function of the real variable t (the
frequency Frequency is the number of occurrences of a repeating event per unit of time. It is also occasionally referred to as ''temporal frequency'' for clarity, and is distinct from ''angular frequency''. Frequency is measured in hertz (Hz) which is eq ...
parameter of the Fourier transform). This definition can be analytically extended to a complex-value variable t. The relation between both is: :\varphi_X(t) = \hat f(-t)


Moment and cumulant generating functions

The
moment generating function In probability theory and statistics, the moment-generating function of a real-valued random variable is an alternative specification of its probability distribution. Thus, it provides the basis of an alternative route to analytical results compare ...
of a real random variable X is the expected value of e^, as a function of the real parameter t. For a normal distribution with density f, mean \mu and deviation \sigma, the moment generating function exists and is equal to :M(t) = \operatorname ^= \hat f(it) = e^ e^ The
cumulant generating function In probability theory and statistics, the cumulants of a probability distribution are a set of quantities that provide an alternative to the '' moments'' of the distribution. Any two probability distributions whose moments are identical will have ...
is the logarithm of the moment generating function, namely :g(t) = \ln M(t) = \mu t + \tfrac 12 \sigma^2 t^2 Since this is a quadratic polynomial in t, only the first two
cumulant In probability theory and statistics, the cumulants of a probability distribution are a set of quantities that provide an alternative to the '' moments'' of the distribution. Any two probability distributions whose moments are identical will ha ...
s are nonzero, namely the mean \mu and the variance \sigma^2.


Stein operator and class

Within
Stein's method Stein's method is a general method in probability theory to obtain bounds on the distance between two probability distributions with respect to a probability metric. It was introduced by Charles Stein, who first published it in 1972, to obtain ...
the Stein operator and class of a random variable X \sim \mathcal(\mu, \sigma^2) are \mathcalf(x) = \sigma^2 f'(x) - (x-\mu)f(x) and \mathcal the class of all absolutely continuous functions f : \R \to \R \mbox\mathbb[, f'(X), ]< \infty.


Zero-variance limit

In the limit (mathematics), limit when \sigma tends to zero, the probability density f(x) eventually tends to zero at any x\ne \mu, but grows without limit if x = \mu, while its integral remains equal to 1. Therefore, the normal distribution cannot be defined as an ordinary
function Function or functionality may refer to: Computing * Function key, a type of key on computer keyboards * Function model, a structured representation of processes in a system * Function object or functor or functionoid, a concept of object-oriente ...
when \sigma = 0. However, one can define the normal distribution with zero variance as a
generalized function In mathematics, generalized functions are objects extending the notion of functions. There is more than one recognized theory, for example the theory of distributions. Generalized functions are especially useful in making discontinuous functions ...
; specifically, as Dirac's "delta function" \delta translated by the mean \mu, that is f(x)=\delta(x-\mu). Its CDF is then the
Heaviside step function The Heaviside step function, or the unit step function, usually denoted by or (but sometimes , or ), is a step function, named after Oliver Heaviside (1850–1925), the value of which is zero for negative arguments and one for positive argume ...
translated by the mean \mu, namely :F(x) = \begin 0 & \textx < \mu \\ 1 & \textx \geq \mu \end


Maximum entropy

Of all probability distributions over the reals with a specified mean \mu and variance \sigma^2, the normal distribution N(\mu,\sigma^2) is the one with maximum entropy. If X is a
continuous random variable In probability theory and statistics, a probability distribution is the mathematical function that gives the probabilities of occurrence of different possible outcomes for an experiment. It is a mathematical description of a random phenomenon i ...
with
probability density In probability theory, a probability density function (PDF), or density of a continuous random variable, is a function whose value at any given sample (or point) in the sample space (the set of possible values taken by the random variable) can ...
f(x), then the entropy of X is defined as : H(X) = - \int_^\infty f(x)\log f(x)\, dx where f(x)\log f(x) is understood to be zero whenever f(x)=0. This functional can be maximized, subject to the constraints that the distribution is properly normalized and has a specified variance, by using
variational calculus The calculus of variations (or Variational Calculus) is a field of mathematical analysis that uses variations, which are small changes in functions and functionals, to find maxima and minima of functionals: mappings from a set of functions t ...
. A function with two
Lagrange multipliers In mathematical optimization, the method of Lagrange multipliers is a strategy for finding the local maxima and minima of a function subject to equality constraints (i.e., subject to the condition that one or more equations have to be satisfied ex ...
is defined: : L=\int_^\infty f(x)\ln(f(x))\,dx-\lambda_0\left(1-\int_^\infty f(x)\,dx\right)-\lambda\left(\sigma^2-\int_^\infty f(x)(x-\mu)^2\,dx\right) where f(x) is, for now, regarded as some density function with mean \mu and standard deviation \sigma. At maximum entropy, a small variation \delta f(x) about f(x) will produce a variation \delta L about L which is equal to 0: : 0=\delta L=\int_^\infty \delta f(x)\left (\ln(f(x))+1+\lambda_0+\lambda(x-\mu)^2\right )\,dx Since this must hold for any small \delta f(x), the term in brackets must be zero, and solving for f(x) yields: :f(x)=e^ Using the constraint equations to solve for \lambda_0 and \lambda yields the density of the normal distribution: : f(x, \mu, \sigma)=\frace^ The entropy of a normal distribution is equal to : H(X)=\tfrac(1+\log(2\sigma^2\pi))


Other properties


Related distributions


Central limit theorem

The central limit theorem states that under certain (fairly common) conditions, the sum of many random variables will have an approximately normal distribution. More specifically, where X_1,\ldots ,X_n are
independent and identically distributed In probability theory and statistics, a collection of random variables is independent and identically distributed if each random variable has the same probability distribution as the others and all are mutually independent. This property is usua ...
random variables with the same arbitrary distribution, zero mean, and variance \sigma^2 and Z is their mean scaled by \sqrt : Z = \sqrt\left(\frac\sum_^n X_i\right) Then, as n increases, the probability distribution of Z will tend to the normal distribution with zero mean and variance \sigma^2. The theorem can be extended to variables (X_i) that are not independent and/or not identically distributed if certain constraints are placed on the degree of dependence and the moments of the distributions. Many
test statistic A test statistic is a statistic (a quantity derived from the sample) used in statistical hypothesis testing.Berger, R. L.; Casella, G. (2001). ''Statistical Inference'', Duxbury Press, Second Edition (p.374) A hypothesis test is typically specif ...
s, scores, and
estimator In statistics, an estimator is a rule for calculating an estimate of a given quantity based on observed data: thus the rule (the estimator), the quantity of interest (the estimand) and its result (the estimate) are distinguished. For example, the ...
s encountered in practice contain sums of certain random variables in 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 distributions. The central limit theorem also implies that certain distributions can be approximated by the normal distribution, for example: * The
binomial distribution In probability theory and statistics, the binomial distribution with parameters ''n'' and ''p'' is the discrete probability distribution of the number of successes in a sequence of ''n'' independent experiments, each asking a yes–no quest ...
B(n,p) is approximately normal with mean np and variance np(1-p) for large n and for p not too close to 0 or 1. * The
Poisson distribution In probability theory and statistics, the Poisson distribution is a discrete probability distribution that expresses the probability of a given number of events occurring in a fixed interval of time or space if these events occur with a known co ...
with parameter \lambda is approximately normal with mean \lambda and variance \lambda, for large values of \lambda. * The
chi-squared distribution In probability theory and statistics, the chi-squared distribution (also chi-square or \chi^2-distribution) with k degrees of freedom is the distribution of a sum of the squares of k independent standard normal random variables. The chi-squa ...
\chi^2(k) is approximately normal with mean k and variance 2k, for large k. * The
Student's t-distribution In probability and statistics, Student's ''t''-distribution (or simply the ''t''-distribution) is any member of a family of continuous probability distributions that arise when estimating the mean of a normally distributed population in sit ...
t(\nu) is approximately normal with mean 0 and variance 1 when \nu is large. Whether these approximations are sufficiently accurate depends on the purpose for which they are needed, and the rate of convergence to the normal distribution. It is typically the case that such approximations are less accurate in the tails of the distribution. A general upper bound for the approximation error in the central limit theorem is given by the
Berry–Esseen theorem In probability theory, the central limit theorem states that, under certain circumstances, the probability distribution of the scaled mean of a random sample converges to a normal distribution as the sample size increases to infinity. Under strong ...
, improvements of the approximation are given by the
Edgeworth expansion The Gram–Charlier A series (named in honor of Jørgen Pedersen Gram and Carl Charlier), and the Edgeworth series (named in honor of Francis Ysidro Edgeworth) are series that approximate a probability distribution in terms of its cumulants. The se ...
s. This theorem can also be used to justify modeling the sum of many uniform noise sources as
Gaussian noise Gaussian noise, named after Carl Friedrich Gauss, is a term from signal processing theory denoting a kind of signal noise that has a probability density function (pdf) equal to that of the normal distribution (which is also known as the Gaussia ...
. See
AWGN Additive white Gaussian noise (AWGN) is a basic noise model used in information theory to mimic the effect of many random processes that occur in nature. The modifiers denote specific characteristics: * ''Additive'' because it is added to any nois ...
.


Operations and functions of normal variables

The
probability density In probability theory, a probability density function (PDF), or density of a continuous random variable, is a function whose value at any given sample (or point) in the sample space (the set of possible values taken by the random variable) can ...
,
cumulative distribution In statistics, the frequency (or absolute frequency) of an event i is the number n_i of times the observation has occurred/recorded in an experiment or study. These frequencies are often depicted graphically or in tabular form. Types The cumul ...
, and inverse cumulative distribution of any function of one or more independent or correlated normal variables can be computed with the numerical method of ray-tracing
Matlab code
. In the following sections we look at some special cases.


Operations on a single normal variable

If X is distributed normally with mean \mu and variance \sigma^2, then * aX+b, for any real numbers a and b, is also normally distributed, with mean a\mu+b and standard deviation , a, \sigma. That is, the family of normal distributions is closed under linear transformations. * The exponential of X is distributed log-normally: . * The absolute value of X has
folded normal distribution The folded normal distribution is a probability distribution related to the normal distribution. Given a normally distributed random variable ''X'' with mean ''μ'' and variance ''σ''2, the random variable ''Y'' = , ''X'', has a folded normal d ...
: . If \mu = 0 this is known as the
half-normal distribution In probability theory and statistics, the half-normal distribution is a special case of the folded normal distribution. Let X follow an ordinary normal distribution, N(0,\sigma^2). Then, Y=, X, follows a half-normal distribution. Thus, the hal ...
. * The absolute value of normalized residuals, , ''X'' − ''μ'', /''σ'', has
chi distribution In probability theory and statistics, the chi distribution is a continuous probability distribution. It is the distribution of the positive square root of the sum of squares of a set of independent random variables each following a standard norm ...
with one degree of freedom: , X - \mu, / \sigma \sim \chi_1. * The square of ''X''/''σ'' has the
noncentral chi-squared distribution In probability theory and statistics, the noncentral chi-squared distribution (or noncentral chi-square distribution, noncentral \chi^2 distribution) is a noncentral generalization of the chi-squared distribution. It often arises in the power a ...
with one degree of freedom: X^2 / \sigma^2 \sim \chi_1^2(\mu^2 / \sigma^2). If \mu = 0, the distribution is called simply chi-squared. * The log likelihood of a normal variable x is simply the log of its
probability density function In probability theory, a probability density function (PDF), or density of a continuous random variable, is a function whose value at any given sample (or point) in the sample space (the set of possible values taken by the random variable) can ...
: \ln p(x)= -\frac \left(\frac \right)^2 -\ln \left(\sigma \sqrt \right) = -\frac z^2 -\ln \left(\sigma \sqrt \right). Since this is a scaled and shifted square of a standard normal variable, it is distributed as a scaled and shifted chi-squared variable. * The distribution of the variable ''X'' restricted to an interval 'a'', ''b''is called the
truncated normal distribution In probability and statistics, the truncated normal distribution is the probability distribution derived from that of a normally distributed random variable by bounding the random variable from either below or above (or both). The truncated no ...
. * (''X'' − ''μ'')−2 has a
Lévy distribution In probability theory and statistics, the Lévy distribution, named after Paul Lévy, is a continuous probability distribution for a non-negative random variable. In spectroscopy, this distribution, with frequency as the dependent variable, is kn ...
with location 0 and scale ''σ''−2.


= Operations on two independent normal variables

= * If X_1 and X_2 are two
independent Independent or Independents may refer to: Arts, entertainment, and media Artist groups * Independents (artist group), a group of modernist painters based in the New Hope, Pennsylvania, area of the United States during the early 1930s * Independ ...
normal random variables, with means \mu_1, \mu_2 and standard deviations \sigma_1, \sigma_2, then their sum X_1 + X_2 will also be normally distributed, roof/sup> with mean \mu_1 + \mu_2 and variance \sigma_1^2 + \sigma_2^2. * In particular, if X and Y are independent normal deviates with zero mean and variance \sigma^2, then X + Y and X - Y are also independent and normally distributed, with zero mean and variance 2\sigma^2. This is a special case of the
polarization identity In linear algebra, a branch of mathematics, the polarization identity is any one of a family of formulas that express the inner product of two vectors in terms of the norm of a normed vector space. If a norm arises from an inner product then t ...
. * If X_1, X_2 are two independent normal deviates with mean \mu and deviation \sigma, and a, b are arbitrary real numbers, then the variable X_3 = \frac + \mu is also normally distributed with mean \mu and deviation \sigma. It follows that the normal distribution is
stable A stable is a building in which livestock, especially horses, are kept. It most commonly means a building that is divided into separate stalls for individual animals and livestock. There are many different types of stables in use today; the ...
(with exponent \alpha=2).


= Operations on two independent standard normal variables

= If X_1 and X_2 are two independent standard normal random variables with mean 0 and variance 1, then * Their sum and difference is distributed normally with mean zero and variance two: X_1 \pm X_2 \sim N(0, 2). * Their product Z = X_1 X_2 follows the
product distribution A product distribution is a probability distribution constructed as the distribution of the product of random variables having two other known distributions. Given two statistically independent random variables ''X'' and ''Y'', the distribution of ...
with density function f_Z(z) = \pi^ K_0(, z, ) where K_0 is the
modified Bessel function of the second kind Bessel functions, first defined by the mathematician Daniel Bernoulli and then generalized by Friedrich Bessel, are canonical solutions of Bessel's differential equation x^2 \frac + x \frac + \left(x^2 - \alpha^2 \right)y = 0 for an arbitrary ...
. This distribution is symmetric around zero, unbounded at z = 0, and has the
characteristic function In mathematics, the term "characteristic function" can refer to any of several distinct concepts: * The indicator function of a subset, that is the function ::\mathbf_A\colon X \to \, :which for a given subset ''A'' of ''X'', has value 1 at points ...
\phi_Z(t) = (1 + t^2)^. * Their ratio follows the standard
Cauchy distribution The Cauchy distribution, named after Augustin Cauchy, is a continuous probability distribution. It is also known, especially among physicists, as the Lorentz distribution (after Hendrik Lorentz), Cauchy–Lorentz distribution, Lorentz(ian) fun ...
: X_1/ X_2 \sim \operatorname(0, 1). * Their Euclidean norm \sqrt has the
Rayleigh distribution In probability theory and statistics, the Rayleigh distribution is a continuous probability distribution for nonnegative-valued random variables. Up to rescaling, it coincides with the chi distribution with two degrees of freedom. The distribut ...
.


Operations on multiple independent normal variables

* Any linear combination of independent normal deviates is a normal deviate. * If X_1, X_2, \ldots, X_n are independent standard normal random variables, then the sum of their squares has the
chi-squared distribution In probability theory and statistics, the chi-squared distribution (also chi-square or \chi^2-distribution) with k degrees of freedom is the distribution of a sum of the squares of k independent standard normal random variables. The chi-squa ...
with n degrees of freedom X_1^2 + \cdots + X_n^2 \sim \chi_n^2. * If X_1, X_2, \ldots, X_n are independent normally distributed random variables with means \mu and variances \sigma^2, then their
sample mean The sample mean (or "empirical mean") and the sample covariance are statistics computed from a Sample (statistics), sample of data on one or more random variables. The sample mean is the average value (or mean, mean value) of a sample (statistic ...
is independent from the sample
standard deviation In statistics, the standard deviation is a measure of the amount of variation or dispersion of a set of values. A low standard deviation indicates that the values tend to be close to the mean (also called the expected value) of the set, while ...
, which can be demonstrated using Basu's theorem or
Cochran's theorem In statistics, Cochran's theorem, devised by William G. Cochran, is a theorem used to justify results relating to the probability distributions of statistics that are used in the analysis of variance. Statement Let ''U''1, ..., ''U'N'' be i.i. ...
. The ratio of these two quantities will have the
Student's t-distribution In probability and statistics, Student's ''t''-distribution (or simply the ''t''-distribution) is any member of a family of continuous probability distributions that arise when estimating the mean of a normally distributed population in sit ...
with n-1 degrees of freedom: t = \frac = \frac \sim t_. * If X_1, X_2, \ldots, X_n, Y_1, Y_2, \ldots, Y_m are independent standard normal random variables, then the ratio of their normalized sums of squares will have the with degrees of freedom: F = \frac \sim F_.


Operations on multiple correlated normal variables

* A
quadratic form In mathematics, a quadratic form is a polynomial with terms all of degree two ("form" is another name for a homogeneous polynomial). For example, :4x^2 + 2xy - 3y^2 is a quadratic form in the variables and . The coefficients usually belong to a ...
of a normal vector, i.e. a quadratic function q = \sum x_i^2 + \sum x_j + c of multiple independent or correlated normal variables, is a generalized chi-square variable.


Operations on the density function

The split normal distribution is most directly defined in terms of joining scaled sections of the density functions of different normal distributions and rescaling the density to integrate to one. The
truncated normal distribution In probability and statistics, the truncated normal distribution is the probability distribution derived from that of a normally distributed random variable by bounding the random variable from either below or above (or both). The truncated no ...
results from rescaling a section of a single density function.


Infinite divisibility and Cramér's theorem

For any positive integer \text, any normal distribution with mean \mu and variance \sigma^2 is the distribution of the sum of \text independent normal deviates, each with mean \frac and variance \frac. This property is called
infinite divisibility Infinite divisibility arises in different ways in philosophy, physics, economics, order theory (a branch of mathematics), and probability theory (also a branch of mathematics). One may speak of infinite divisibility, or the lack thereof, of matter ...
. Conversely, if X_1 and X_2 are independent random variables and their sum X_1+X_2 has a normal distribution, then both X_1 and X_2 must be normal deviates. This result is known as Cramér's decomposition theorem, and is equivalent to saying that the convolution of two distributions is normal if and only if both are normal. Cramér's theorem implies that a linear combination of independent non-Gaussian variables will never have an exactly normal distribution, although it may approach it arbitrarily closely.


Bernstein's theorem

Bernstein's theorem states that if X and Y are independent and X + Y and X - Y are also independent, then both ''X'' and ''Y'' must necessarily have normal distributions. More generally, if X_1, \ldots, X_n are independent random variables, then two distinct linear combinations \sum and \sumwill be independent if and only if all X_k are normal and \sum, where \sigma_k^2 denotes the variance of X_k.


Extensions

The notion of normal distribution, being one of the most important distributions in probability theory, has been extended far beyond the standard framework of the univariate (that is one-dimensional) case (Case 1). All these extensions are also called ''normal'' or ''Gaussian'' laws, so a certain ambiguity in names exists. * The
multivariate normal distribution In probability theory and statistics, the multivariate normal distribution, multivariate Gaussian distribution, or joint normal distribution is a generalization of the one-dimensional (univariate) normal distribution to higher dimensions. One d ...
describes the Gaussian law in the ''k''-dimensional Euclidean space. A vector is multivariate-normally distributed if any linear combination of its components has a (univariate) normal distribution. The variance of ''X'' is a ''k×k'' symmetric positive-definite matrix ''V''. The multivariate normal distribution is a special case of the
elliptical distribution In probability and statistics, an elliptical distribution is any member of a broad family of probability distributions that generalize the multivariate normal distribution. Intuitively, in the simplified two and three dimensional case, the joint di ...
s. As such, its iso-density loci in the ''k'' = 2 case are ellipses and in the case of arbitrary ''k'' are ellipsoids. * Rectified Gaussian distribution a rectified version of normal distribution with all the negative elements reset to 0 * Complex normal distribution deals with the complex normal vectors. A complex vector is said to be normal if both its real and imaginary components jointly possess a 2''k''-dimensional multivariate normal distribution. The variance-covariance structure of ''X'' is described by two matrices: the ''variance'' matrix Γ, and the ''relation'' matrix ''C''. * Matrix normal distribution describes the case of normally distributed matrices. * Gaussian processes are the normally distributed stochastic processes. These can be viewed as elements of some infinite-dimensional Hilbert space ''H'', and thus are the analogues of multivariate normal vectors for the case . A random element is said to be normal if for any constant the scalar product has a (univariate) normal distribution. The variance structure of such Gaussian random element can be described in terms of the linear ''covariance ''. Several Gaussian processes became popular enough to have their own names: ** Wiener process, Brownian motion, ** Brownian bridge, ** Ornstein–Uhlenbeck process. * Gaussian q-distribution is an abstract mathematical construction that represents a "q-analogue" of the normal distribution. * the q-Gaussian is an analogue of the Gaussian distribution, in the sense that it maximises the Tsallis entropy, and is one type of Tsallis distribution. Note that this distribution is different from the Gaussian q-distribution above. * The Kaniadakis Gaussian distribution, Kaniadakis ''κ''-Gaussian distribution is a generalization of the Gaussian distribution which arises from the Kaniadakis statistics, being one of the Kaniadakis distribution, Kaniadakis distributions. A random variable ''X'' has a two-piece normal distribution if it has a distribution : f_X( x ) = N( \mu, \sigma_1^2 ) \text x \le \mu : f_X( x ) = N( \mu, \sigma_2^2 ) \text x \ge \mu where ''μ'' is the mean and ''σ''1 and ''σ''2 are the standard deviations of the distribution to the left and right of the mean respectively. The mean, variance and third central moment of this distribution have been determined : \operatorname( X ) = \mu + \sqrt ( \sigma_2 - \sigma_1 ) : \operatorname( X ) = \left( 1 - \frac 2 \pi\right)( \sigma_2 - \sigma_1 )^2 + \sigma_1 \sigma_2 : \operatorname( X ) = \sqrt( \sigma_2 - \sigma_1 ) \left[ \left( \frac 4 \pi - 1 \right) ( \sigma_2 - \sigma_1)^2 + \sigma_1 \sigma_2 \right] where E(''X''), V(''X'') and T(''X'') are the mean, variance, and third central moment respectively. One of the main practical uses of the Gaussian law is to model the empirical distributions of many different random variables encountered in practice. In such case a possible extension would be a richer family of distributions, having more than two parameters and therefore being able to fit the empirical distribution more accurately. The examples of such extensions are: * Pearson distribution — a four-parameter family of probability distributions that extend the normal law to include different skewness and kurtosis values. * The generalized normal distribution, also known as the exponential power distribution, allows for distribution tails with thicker or thinner asymptotic behaviors.


Statistical inference


Estimation of parameters

It is often the case that we do not know the parameters of the normal distribution, but instead want to Estimation theory, estimate them. That is, having a sample (x_1, \ldots, x_n) from a normal N(\mu, \sigma^2) population we would like to learn the approximate values of parameters \mu and \sigma^2. The standard approach to this problem is the maximum likelihood method, which requires maximization of the ''log-likelihood function'': : \ln\mathcal(\mu,\sigma^2) = \sum_^n \ln f(x_i\mid\mu,\sigma^2) = -\frac\ln(2\pi) - \frac\ln\sigma^2 - \frac\sum_^n (x_i-\mu)^2. Taking derivatives with respect to \mu and \sigma^2 and solving the resulting system of first order conditions yields the ''maximum likelihood estimates'': : \hat = \overline \equiv \frac\sum_^n x_i, \qquad \hat^2 = \frac \sum_^n (x_i - \overline)^2.


Sample mean

Estimator \textstyle\hat\mu is called the ''
sample mean The sample mean (or "empirical mean") and the sample covariance are statistics computed from a Sample (statistics), sample of data on one or more random variables. The sample mean is the average value (or mean, mean value) of a sample (statistic ...
'', since it is the arithmetic mean of all observations. The statistic \textstyle\overline is complete statistic, complete and sufficient statistic, sufficient for \mu, and therefore by the Lehmann–Scheffé theorem, \textstyle\hat\mu is the uniformly minimum variance unbiased (UMVU) estimator. In finite samples it is distributed normally: : \hat\mu \sim \mathcal(\mu,\sigma^2/n). The variance of this estimator is equal to the ''μμ''-element of the inverse Fisher information matrix \textstyle\mathcal^. This implies that the estimator is efficient estimator, finite-sample efficient. Of practical importance is the fact that the standard error (statistics), standard error of \textstyle\hat\mu is proportional to \textstyle1/\sqrt, that is, if one wishes to decrease the standard error by a factor of 10, one must increase the number of points in the sample by a factor of 100. This fact is widely used in determining sample sizes for opinion polls and the number of trials in Monte Carlo simulations. From the standpoint of the asymptotic theory (statistics), asymptotic theory, \textstyle\hat\mu is consistent estimator, consistent, that is, it convergence in probability, converges in probability to \mu as n\rightarrow\infty. The estimator is also asymptotic normality, asymptotically normal, which is a simple corollary of the fact that it is normal in finite samples: : \sqrt(\hat\mu-\mu) \,\xrightarrow\, \mathcal(0,\sigma^2).


Sample variance

The estimator \textstyle\hat\sigma^2 is called the ''sample variance'', since it is the variance of the sample ((x_1, \ldots, x_n)). In practice, another estimator is often used instead of the \textstyle\hat\sigma^2. This other estimator is denoted s^2, and is also called the ''sample variance'', which represents a certain ambiguity in terminology; its square root s is called the ''sample standard deviation''. The estimator s^2 differs from \textstyle\hat\sigma^2 by having instead of ''n'' in the denominator (the so-called Bessel's correction): : s^2 = \frac \hat\sigma^2 = \frac \sum_^n (x_i - \overline)^2. The difference between s^2 and \textstyle\hat\sigma^2 becomes negligibly small for large ''n''s. In finite samples however, the motivation behind the use of s^2 is that it is an unbiased estimator of the underlying parameter \sigma^2, whereas \textstyle\hat\sigma^2 is biased. Also, by the Lehmann–Scheffé theorem the estimator s^2 is uniformly minimum variance unbiased (Minimum-variance unbiased estimator, UMVU), which makes it the "best" estimator among all unbiased ones. However it can be shown that the biased estimator \textstyle\hat\sigma^2 is "better" than the s^2 in terms of the mean squared error (MSE) criterion. In finite samples both s^2 and \textstyle\hat\sigma^2 have scaled
chi-squared distribution In probability theory and statistics, the chi-squared distribution (also chi-square or \chi^2-distribution) with k degrees of freedom is the distribution of a sum of the squares of k independent standard normal random variables. The chi-squa ...
with degrees of freedom: : s^2 \sim \frac \cdot \chi^2_, \qquad \hat\sigma^2 \sim \frac \cdot \chi^2_. The first of these expressions shows that the variance of s^2 is equal to 2\sigma^4/(n-1), which is slightly greater than the ''σσ''-element of the inverse Fisher information matrix \textstyle\mathcal^. Thus, s^2 is not an efficient estimator for \sigma^2, and moreover, since s^2 is UMVU, we can conclude that the finite-sample efficient estimator for \sigma^2 does not exist. Applying the asymptotic theory, both estimators s^2 and \textstyle\hat\sigma^2 are consistent, that is they converge in probability to \sigma^2 as the sample size n\rightarrow\infty. The two estimators are also both asymptotically normal: : \sqrt(\hat\sigma^2 - \sigma^2) \simeq \sqrt(s^2-\sigma^2) \,\xrightarrow\, \mathcal(0,2\sigma^4). In particular, both estimators are asymptotically efficient for \sigma^2.


Confidence intervals

By
Cochran's theorem In statistics, Cochran's theorem, devised by William G. Cochran, is a theorem used to justify results relating to the probability distributions of statistics that are used in the analysis of variance. Statement Let ''U''1, ..., ''U'N'' be i.i. ...
, for normal distributions the sample mean \textstyle\hat\mu and the sample variance ''s''2 are
independent Independent or Independents may refer to: Arts, entertainment, and media Artist groups * Independents (artist group), a group of modernist painters based in the New Hope, Pennsylvania, area of the United States during the early 1930s * Independ ...
, which means there can be no gain in considering their joint distribution. There is also a converse theorem: if in a sample the sample mean and sample variance are independent, then the sample must have come from the normal distribution. The independence between \textstyle\hat\mu and ''s'' can be employed to construct the so-called ''t-statistic'': : t = \frac = \frac \sim t_ This quantity ''t'' has the
Student's t-distribution In probability and statistics, Student's ''t''-distribution (or simply the ''t''-distribution) is any member of a family of continuous probability distributions that arise when estimating the mean of a normally distributed population in sit ...
with degrees of freedom, and it is an ancillary statistic (independent of the value of the parameters). Inverting the distribution of this ''t''-statistics will allow us to construct the
confidence interval In frequentist statistics, a confidence interval (CI) is a range of estimates for an unknown parameter. A confidence interval is computed at a designated ''confidence level''; the 95% confidence level is most common, but other levels, such as 9 ...
for ''μ''; similarly, inverting the ''χ''2 distribution of the statistic ''s''2 will give us the confidence interval for ''σ''2: :\mu \in \left[ \hat\mu - t_ \fracs, \hat\mu + t_ \fracs \right], :\sigma^2 \in \left[ \frac, \frac \right], where ''tk,p'' and are the ''p''th
quantile In statistics and probability, quantiles are cut points dividing the range of a probability distribution into continuous intervals with equal probabilities, or dividing the observations in a sample in the same way. There is one fewer quantile tha ...
s of the ''t''- and ''χ''2-distributions respectively. These confidence intervals are of the ''confidence level'' , meaning that the true values ''μ'' and ''σ''2 fall outside of these intervals with probability (or significance level) ''α''. In practice people usually take , resulting in the 95% confidence intervals. Approximate formulas can be derived from the asymptotic distributions of \textstyle\hat\mu and ''s''2: :\mu \in \left[ \hat\mu - , z_, \fracs, \hat\mu + , z_, \fracs \right], :\sigma^2 \in \left[ s^2 - , z_, \fracs^2, s^2 + , z_, \fracs^2 \right], The approximate formulas become valid for large values of ''n'', and are more convenient for the manual calculation since the standard normal quantiles ''z''''α''/2 do not depend on ''n''. In particular, the most popular value of , results in .


Normality tests

Normality tests assess the likelihood that the given data set comes from a normal distribution. Typically the null hypothesis ''H''0 is that the observations are distributed normally with unspecified mean ''μ'' and variance ''σ''2, versus the alternative ''Ha'' that the distribution is arbitrary. Many tests (over 40) have been devised for this problem. The more prominent of them are outlined below: Diagnostic plots are more intuitively appealing but subjective at the same time, as they rely on informal human judgement to accept or reject the null hypothesis. *
Q–Q plot In statistics, a Q–Q plot (quantile-quantile plot) is a probability plot, a List of graphical methods, graphical method for comparing two probability distributions by plotting their ''quantiles'' against each other. A point on the plot co ...
, also known as normal probability plot or rankit plot—is a plot of the sorted values from the data set against the expected values of the corresponding quantiles from the standard normal distribution. That is, it's a plot of point of the form (Φ−1(''pk''), ''x''(''k'')), where plotting points ''pk'' are equal to ''pk'' = (''k'' − ''α'')/(''n'' + 1 − 2''α'') and ''α'' is an adjustment constant, which can be anything between 0 and 1. If the null hypothesis is true, the plotted points should approximately lie on a straight line. * P–P plot – similar to the Q–Q plot, but used much less frequently. This method consists of plotting the points (Φ(''z''(''k'')), ''pk''), where \textstyle z_ = (x_-\hat\mu)/\hat\sigma. For normally distributed data this plot should lie on a 45° line between (0, 0) and (1, 1). Goodness-of-fit tests: ''Moment-based tests'': * D'Agostino's K-squared test * Jarque–Bera test * Shapiro–Wilk test: This is based on the fact that the line in the Q–Q plot has the slope of ''σ''. The test compares the least squares estimate of that slope with the value of the sample variance, and rejects the null hypothesis if these two quantities differ significantly. ''Tests based on the empirical distribution function'': * Anderson–Darling test * Lilliefors test (an adaptation of the Kolmogorov–Smirnov test)


Bayesian analysis of the normal distribution

Bayesian analysis of normally distributed data is complicated by the many different possibilities that may be considered: * Either the mean, or the variance, or neither, may be considered a fixed quantity. * When the variance is unknown, analysis may be done directly in terms of the variance, or in terms of the
precision Precision, precise or precisely may refer to: Science, and technology, and mathematics Mathematics and computing (general) * Accuracy and precision, measurement deviation from true value and its scatter * Significant figures, the number of digit ...
, the reciprocal of the variance. The reason for expressing the formulas in terms of precision is that the analysis of most cases is simplified. * Both univariate and multivariate normal distribution, multivariate cases need to be considered. * Either conjugate prior, conjugate or improper prior, improper prior distributions may be placed on the unknown variables. * An additional set of cases occurs in Bayesian linear regression, where in the basic model the data is assumed to be normally distributed, and normal priors are placed on the regression coefficients. The resulting analysis is similar to the basic cases of independent identically distributed data. The formulas for the non-linear-regression cases are summarized in the conjugate prior article.


Sum of two quadratics


= Scalar form

= The following auxiliary formula is useful for simplifying the posterior distribution, posterior update equations, which otherwise become fairly tedious. :a(x-y)^2 + b(x-z)^2 = (a + b)\left(x - \frac\right)^2 + \frac(y-z)^2 This equation rewrites the sum of two quadratics in ''x'' by expanding the squares, grouping the terms in ''x'', and completing the square. Note the following about the complex constant factors attached to some of the terms: # The factor \frac has the form of a weighted average of ''y'' and ''z''. # \frac = \frac = (a^ + b^)^. This shows that this factor can be thought of as resulting from a situation where the Multiplicative inverse, reciprocals of quantities ''a'' and ''b'' add directly, so to combine ''a'' and ''b'' themselves, it's necessary to reciprocate, add, and reciprocate the result again to get back into the original units. This is exactly the sort of operation performed by the harmonic mean, so it is not surprising that \frac is one-half the harmonic mean of ''a'' and ''b''.


= Vector form

= A similar formula can be written for the sum of two vector quadratics: If x, y, z are vectors of length ''k'', and A and B are symmetric matrix, symmetric, invertible matrices of size k\times k, then : \begin & (\mathbf-\mathbf)'\mathbf(\mathbf-\mathbf) + (\mathbf-\mathbf)' \mathbf(\mathbf-\mathbf) \\ = & (\mathbf - \mathbf)'(\mathbf+\mathbf)(\mathbf - \mathbf) + (\mathbf - \mathbf)'(\mathbf^ + \mathbf^)^(\mathbf - \mathbf) \end where :\mathbf = (\mathbf + \mathbf)^(\mathbf\mathbf + \mathbf \mathbf) Note that the form x′ A x is called a
quadratic form In mathematics, a quadratic form is a polynomial with terms all of degree two ("form" is another name for a homogeneous polynomial). For example, :4x^2 + 2xy - 3y^2 is a quadratic form in the variables and . The coefficients usually belong to a ...
and is a scalar (mathematics), scalar: :\mathbf'\mathbf\mathbf = \sum_a_ x_i x_j In other words, it sums up all possible combinations of products of pairs of elements from x, with a separate coefficient for each. In addition, since x_i x_j = x_j x_i, only the sum a_ + a_ matters for any off-diagonal elements of A, and there is no loss of generality in assuming that A is symmetric matrix, symmetric. Furthermore, if A is symmetric, then the form \mathbf'\mathbf\mathbf = \mathbf'\mathbf\mathbf.


Sum of differences from the mean

Another useful formula is as follows: \sum_^n (x_i-\mu)^2 = \sum_^n (x_i-\bar)^2 + n(\bar -\mu)^2 where \bar = \frac \sum_^n x_i.


With known variance

For a set of i.i.d. normally distributed data points X of size ''n'' where each individual point ''x'' follows x \sim \mathcal(\mu, \sigma^2) with known
variance In probability theory and statistics, variance is the expectation of the squared deviation of a random variable from its population mean or sample mean. Variance is a measure of dispersion, meaning it is a measure of how far a set of numbers ...
σ2, the conjugate prior distribution is also normally distributed. This can be shown more easily by rewriting the variance as the
precision Precision, precise or precisely may refer to: Science, and technology, and mathematics Mathematics and computing (general) * Accuracy and precision, measurement deviation from true value and its scatter * Significant figures, the number of digit ...
, i.e. using τ = 1/σ2. Then if x \sim \mathcal(\mu, 1/\tau) and \mu \sim \mathcal(\mu_0, 1/\tau_0), we proceed as follows. First, the likelihood function is (using the formula above for the sum of differences from the mean): :\begin p(\mathbf\mid\mu,\tau) &= \prod_^n \sqrt \exp\left(-\frac\tau(x_i-\mu)^2\right) \\ &= \left(\frac\right)^ \exp\left(-\frac\tau \sum_^n (x_i-\mu)^2\right) \\ &= \left(\frac\right)^ \exp\left[-\frac\tau \left(\sum_^n(x_i-\bar)^2 + n(\bar -\mu)^2\right)\right]. \end Then, we proceed as follows: :\begin p(\mu\mid\mathbf) &\propto p(\mathbf\mid\mu) p(\mu) \\ & = \left(\frac\right)^ \exp\left[-\frac\tau \left(\sum_^n(x_i-\bar)^2 + n(\bar -\mu)^2\right)\right] \sqrt \exp\left(-\frac\tau_0(\mu-\mu_0)^2\right) \\ &\propto \exp\left(-\frac\left(\tau\left(\sum_^n(x_i-\bar)^2 + n(\bar -\mu)^2\right) + \tau_0(\mu-\mu_0)^2\right)\right) \\ &\propto \exp\left(-\frac \left(n\tau(\bar-\mu)^2 + \tau_0(\mu-\mu_0)^2 \right)\right) \\ &= \exp\left(-\frac(n\tau + \tau_0)\left(\mu - \dfrac\right)^2 + \frac(\bar - \mu_0)^2\right) \\ &\propto \exp\left(-\frac(n\tau + \tau_0)\left(\mu - \dfrac\right)^2\right) \end In the above derivation, we used the formula above for the sum of two quadratics and eliminated all constant factors not involving ''μ''. The result is the kernel (statistics), kernel of a normal distribution, with mean \frac and precision n\tau + \tau_0, i.e. :p(\mu\mid\mathbf) \sim \mathcal\left(\frac, \frac\right) This can be written as a set of Bayesian update equations for the posterior parameters in terms of the prior parameters: :\begin \tau_0' &= \tau_0 + n\tau \\[5pt] \mu_0' &= \frac \\[5pt] \bar &= \frac\sum_^n x_i \end That is, to combine ''n'' data points with total precision of ''nτ'' (or equivalently, total variance of ''n''/''σ''2) and mean of values \bar, derive a new total precision simply by adding the total precision of the data to the prior total precision, and form a new mean through a ''precision-weighted average'', i.e. a weighted average of the data mean and the prior mean, each weighted by the associated total precision. This makes logical sense if the precision is thought of as indicating the certainty of the observations: In the distribution of the posterior mean, each of the input components is weighted by its certainty, and the certainty of this distribution is the sum of the individual certainties. (For the intuition of this, compare the expression "the whole is (or is not) greater than the sum of its parts". In addition, consider that the knowledge of the posterior comes from a combination of the knowledge of the prior and likelihood, so it makes sense that we are more certain of it than of either of its components.) The above formula reveals why it is more convenient to do Bayesian analysis of conjugate priors for the normal distribution in terms of the precision. The posterior precision is simply the sum of the prior and likelihood precisions, and the posterior mean is computed through a precision-weighted average, as described above. The same formulas can be written in terms of variance by reciprocating all the precisions, yielding the more ugly formulas :\begin ' &= \frac \\[5pt] \mu_0' &= \frac \\[5pt] \bar &= \frac\sum_^n x_i \end


With known mean

For a set of i.i.d. normally distributed data points X of size ''n'' where each individual point ''x'' follows x \sim \mathcal(\mu, \sigma^2) with known mean μ, the conjugate prior of the
variance In probability theory and statistics, variance is the expectation of the squared deviation of a random variable from its population mean or sample mean. Variance is a measure of dispersion, meaning it is a measure of how far a set of numbers ...
has an inverse gamma distribution or a scaled inverse chi-squared distribution. The two are equivalent 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. The prior for σ2 is as follows: :p(\sigma^2\mid\nu_0,\sigma_0^2) = \frac~\frac \propto \frac The likelihood function from above, written in terms of the variance, is: :\begin p(\mathbf\mid\mu,\sigma^2) &= \left(\frac\right)^ \exp\left[-\frac \sum_^n (x_i-\mu)^2\right] \\ &= \left(\frac\right)^ \exp\left[-\frac\right] \end where :S = \sum_^n (x_i-\mu)^2. Then: :\begin p(\sigma^2\mid\mathbf) &\propto p(\mathbf\mid\sigma^2) p(\sigma^2) \\ &= \left(\frac\right)^ \exp\left[-\frac\right] \frac~\frac \\ &\propto \left(\frac\right)^ \frac \exp\left[-\frac + \frac\right] \\ &= \frac \exp\left[-\frac\right] \end The above is also a scaled inverse chi-squared distribution where :\begin \nu_0' &= \nu_0 + n \\ \nu_0'' &= \nu_0 \sigma_0^2 + \sum_^n (x_i-\mu)^2 \end or equivalently :\begin \nu_0' &= \nu_0 + n \\ ' &= \frac \end Reparameterizing in terms of an inverse gamma distribution, the result is: :\begin \alpha' &= \alpha + \frac \\ \beta' &= \beta + \frac \end


With unknown mean and unknown variance

For a set of i.i.d. normally distributed data points X of size ''n'' where each individual point ''x'' follows x \sim \mathcal(\mu, \sigma^2) with unknown mean μ and unknown
variance In probability theory and statistics, variance is the expectation of the squared deviation of a random variable from its population mean or sample mean. Variance is a measure of dispersion, meaning it is a measure of how far a set of numbers ...
σ2, a combined (multivariate) conjugate prior is placed over the mean and variance, consisting of a normal-inverse-gamma distribution. Logically, this originates as follows: # From the analysis of the case with unknown mean but known variance, we see that the update equations involve sufficient statistics computed from the data consisting of the mean of the data points and the total variance of the data points, computed in turn from the known variance divided by the number of data points. # From the analysis of the case with unknown variance but known mean, we see that the update equations involve sufficient statistics over the data consisting of the number of data points and sum of squared deviations. # Keep in mind that the posterior update values serve as the prior distribution when further data is handled. Thus, we should logically think of our priors in terms of the sufficient statistics just described, with the same semantics kept in mind as much as possible. # To handle the case where both mean and variance are unknown, we could place independent priors over the mean and variance, with fixed estimates of the average mean, total variance, number of data points used to compute the variance prior, and sum of squared deviations. Note however that in reality, the total variance of the mean depends on the unknown variance, and the sum of squared deviations that goes into the variance prior (appears to) depend on the unknown mean. In practice, the latter dependence is relatively unimportant: Shifting the actual mean shifts the generated points by an equal amount, and on average the squared deviations will remain the same. This is not the case, however, with the total variance of the mean: As the unknown variance increases, the total variance of the mean will increase proportionately, and we would like to capture this dependence. # This suggests that we create a ''conditional prior'' of the mean on the unknown variance, with a hyperparameter specifying the mean of the pseudo-observations associated with the prior, and another parameter specifying the number of pseudo-observations. This number serves as a scaling parameter on the variance, making it possible to control the overall variance of the mean relative to the actual variance parameter. The prior for the variance also has two hyperparameters, one specifying the sum of squared deviations of the pseudo-observations associated with the prior, and another specifying once again the number of pseudo-observations. Note that each of the priors has a hyperparameter specifying the number of pseudo-observations, and in each case this controls the relative variance of that prior. These are given as two separate hyperparameters so that the variance (aka the confidence) of the two priors can be controlled separately. # This leads immediately to the normal-inverse-gamma distribution, which is the product of the two distributions just defined, with conjugate priors used (an inverse gamma distribution over the variance, and a normal distribution over the mean, ''conditional'' on the variance) and with the same four parameters just defined. The priors are normally defined as follows: :\begin p(\mu\mid\sigma^2; \mu_0, n_0) &\sim \mathcal(\mu_0,\sigma^2/n_0) \\ p(\sigma^2; \nu_0,\sigma_0^2) &\sim I\chi^2(\nu_0,\sigma_0^2) = IG(\nu_0/2, \nu_0\sigma_0^2/2) \end The update equations can be derived, and look as follows: :\begin \bar &= \frac 1 n \sum_^n x_i \\ \mu_0' &= \frac \\ n_0' &= n_0 + n \\ \nu_0' &= \nu_0 + n \\ \nu_0'' &= \nu_0 \sigma_0^2 + \sum_^n (x_i-\bar)^2 + \frac(\mu_0 - \bar)^2 \end The respective numbers of pseudo-observations add the number of actual observations to them. The new mean hyperparameter is once again a weighted average, this time weighted by the relative numbers of observations. Finally, the update for \nu_0'' is similar to the case with known mean, but in this case the sum of squared deviations is taken with respect to the observed data mean rather than the true mean, and as a result a new "interaction term" needs to be added to take care of the additional error source stemming from the deviation between prior and data mean.


Occurrence and applications

The occurrence of normal distribution in practical problems can be loosely classified into four categories: # Exactly normal distributions; # Approximately normal laws, for example when such approximation is justified by the
central limit theorem In probability theory, the central limit theorem (CLT) establishes that, in many situations, when independent random variables are summed up, their properly normalized sum tends toward a normal distribution even if the original variables themselv ...
; and # Distributions modeled as normal – the normal distribution being the distribution with Principle of maximum entropy, maximum entropy for a given mean and variance. # Regression problems – the normal distribution being found after systematic effects have been modeled sufficiently well.


Exact normality

Certain quantities in physics are distributed normally, as was first demonstrated by James Clerk Maxwell. Examples of such quantities are: * Probability density function of a ground state in a quantum harmonic oscillator. * The position of a particle that experiences diffusion. If initially the particle is located at a specific point (that is its probability distribution is the Dirac delta function), then after time ''t'' its location is described by a normal distribution with variance ''t'', which satisfies the diffusion equation \frac f(x,t) = \frac \frac f(x,t). If the initial location is given by a certain density function g(x), then the density at time ''t'' is the convolution of ''g'' and the normal PDF.


Approximate normality

''Approximately'' normal distributions occur in many situations, as explained by the
central limit theorem In probability theory, the central limit theorem (CLT) establishes that, in many situations, when independent random variables are summed up, their properly normalized sum tends toward a normal distribution even if the original variables themselv ...
. When the outcome is produced by many small effects acting ''additively and independently'', its distribution will be close to normal. The normal approximation will not be valid if the effects act multiplicatively (instead of additively), or if there is a single external influence that has a considerably larger magnitude than the rest of the effects. * In counting problems, where the central limit theorem includes a discrete-to-continuum approximation and where Infinite divisibility, infinitely divisible and Indecomposable distribution, decomposable distributions are involved, such as ** binomial distribution, Binomial random variables, associated with binary response variables; ** Poisson distribution, Poisson random variables, associated with rare events; * Thermal radiation has a Bose–Einstein statistics, Bose–Einstein distribution on very short time scales, and a normal distribution on longer timescales due to the central limit theorem.


Assumed normality

There are statistical methods to empirically test that assumption; see the above #Normality tests, Normality tests section. * In biology, the ''logarithm'' of various variables tend to have a normal distribution, that is, they tend to have a
log-normal distribution In probability theory, a log-normal (or lognormal) distribution is a continuous probability distribution of a random variable whose logarithm is normally distributed. Thus, if the random variable is log-normally distributed, then has a normal ...
(after separation on male/female subpopulations), with examples including: ** Measures of size of living tissue (length, height, skin area, weight); ** The ''length'' of ''inert'' appendages (hair, claws, nails, teeth) of biological specimens, ''in the direction of growth''; presumably the thickness of tree bark also falls under this category; ** Certain physiological measurements, such as blood pressure of adult humans. * In finance, in particular the Black–Scholes model, changes in the ''logarithm'' of exchange rates, price indices, and stock market indices are assumed normal (these variables behave like compound interest, not like simple interest, and so are multiplicative). Some mathematicians such as Benoit Mandelbrot have argued that Levy skew alpha-stable distribution, log-Levy distributions, which possesses heavy tails would be a more appropriate model, in particular for the analysis for stock market crashes. The use of the assumption of normal distribution occurring in financial models has also been criticized by Nassim Nicholas Taleb in his works. * Propagation of uncertainty, Measurement errors in physical experiments are often modeled by a normal distribution. This use of a normal distribution does not imply that one is assuming the measurement errors are normally distributed, rather using the normal distribution produces the most conservative predictions possible given only knowledge about the mean and variance of the errors. * In Standardized testing (statistics), standardized testing, results can be made to have a normal distribution by either selecting the number and difficulty of questions (as in the Intelligence quotient, IQ test) or transforming the raw test scores into "output" scores by fitting them to the normal distribution. For example, the SAT's traditional range of 200–800 is based on a normal distribution with a mean of 500 and a standard deviation of 100. * Many scores are derived from the normal distribution, including percentile ranks ("percentiles" or "quantiles"), normal curve equivalents, stanines, Standard score, z-scores, and T-scores. Additionally, some behavioral statistical procedures assume that scores are normally distributed; for example, Student's t-test, t-tests and Analysis of variance, ANOVAs. Bell curve grading assigns relative grades based on a normal distribution of scores. * In hydrology the distribution of long duration river discharge or rainfall, e.g. monthly and yearly totals, is often thought to be practically normal according to the
central limit theorem In probability theory, the central limit theorem (CLT) establishes that, in many situations, when independent random variables are summed up, their properly normalized sum tends toward a normal distribution even if the original variables themselv ...
. The blue picture, made with CumFreq, illustrates an example of fitting the normal distribution to ranked October rainfalls showing the 90% confidence belt based on the
binomial distribution In probability theory and statistics, the binomial distribution with parameters ''n'' and ''p'' is the discrete probability distribution of the number of successes in a sequence of ''n'' independent experiments, each asking a yes–no quest ...
. The rainfall data are represented by plotting positions as part of the cumulative frequency analysis.


Methodological problems and peer review

John Ioannidis argues that using normally distributed standard deviations as standards for validating research findings leave falsifiability, falsifiable predictions about phenomena that are not normally distributed untested. This includes, for example, phenomena that only appear when all necessary conditions are present and one cannot be a substitute for another in an addition-like way and phenomena that are not randomly distributed. Ioannidis argues that standard deviation-centered validation gives a false appearance of validity to hypotheses and theories where some but not all falsifiable predictions are normally distributed since the portion of falsifiable predictions that there is evidence against may and in some cases are in the non-normally distributed parts of the range of falsifiable predictions, as well as baselessly dismissing hypotheses for which none of the falsifiable predictions are normally distributed as if were they unfalsifiable when in fact they do make falsifiable predictions. It is argued by Ioannidis that many cases of mutually exclusive theories being accepted as "validated" by research journals are caused by failure of the journals to take in empirical falsifications of non-normally distributed predictions, and not because mutually exclusive theories are true, which they cannot be, although two mutually exclusive theories can both be wrong and a third one correct.


Computational methods


Generating values from normal distribution

In computer simulations, especially in applications of the Monte-Carlo method, it is often desirable to generate values that are normally distributed. The algorithms listed below all generate the standard normal deviates, since a can be generated as , where ''Z'' is standard normal. All these algorithms rely on the availability of a random number generator ''U'' capable of producing Uniform distribution (continuous), uniform random variates. * The most straightforward method is based on the probability integral transform property: if ''U'' is distributed uniformly on (0,1), then Φ−1(''U'') will have the standard normal distribution. The drawback of this method is that it relies on calculation of the
probit function In probability theory and statistics, the probit function is the quantile function associated with the standard normal distribution. It has applications in data analysis and machine learning, in particular exploratory statistical graphics and ...
Φ−1, which cannot be done analytically. Some approximate methods are described in and in the error function, erf article. Wichura gives a fast algorithm for computing this function to 16 decimal places, which is used by R programming language, R to compute random variates of the normal distribution. * Irwin–Hall distribution#Approximating a Normal distribution, An easy-to-program approximate approach that relies on the
central limit theorem In probability theory, the central limit theorem (CLT) establishes that, in many situations, when independent random variables are summed up, their properly normalized sum tends toward a normal distribution even if the original variables themselv ...
is as follows: generate 12 uniform ''U''(0,1) deviates, add them all up, and subtract 6 – the resulting random variable will have approximately standard normal distribution. In truth, the distribution will be Irwin–Hall distribution, Irwin–Hall, which is a 12-section eleventh-order polynomial approximation to the normal distribution. This random deviate will have a limited range of (−6, 6). Note that in a true normal distribution, only 0.00034% of all samples will fall outside ±6σ. * The Box–Muller transform, Box–Muller method uses two independent random numbers ''U'' and ''V'' distributed uniform distribution (continuous), uniformly on (0,1). Then the two random variables ''X'' and ''Y'' X = \sqrt \, \cos(2 \pi V) , \qquad Y = \sqrt \, \sin(2 \pi V) . will both have the standard normal distribution, and will be
independent Independent or Independents may refer to: Arts, entertainment, and media Artist groups * Independents (artist group), a group of modernist painters based in the New Hope, Pennsylvania, area of the United States during the early 1930s * Independ ...
. This formulation arises because for a bivariate normal random vector (''X'', ''Y'') the squared norm will have the
chi-squared distribution In probability theory and statistics, the chi-squared distribution (also chi-square or \chi^2-distribution) with k degrees of freedom is the distribution of a sum of the squares of k independent standard normal random variables. The chi-squa ...
with two degrees of freedom, which is an easily generated exponential distribution, exponential random variable corresponding to the quantity −2ln(''U'') in these equations; and the angle is distributed uniformly around the circle, chosen by the random variable ''V''. * The Marsaglia polar method is a modification of the Box–Muller method which does not require computation of the sine and cosine functions. In this method, ''U'' and ''V'' are drawn from the uniform (−1,1) distribution, and then is computed. If ''S'' is greater or equal to 1, then the method starts over, otherwise the two quantities X = U\sqrt, \qquad Y = V\sqrt are returned. Again, ''X'' and ''Y'' are independent, standard normal random variables. * The Ratio method is a rejection method. The algorithm proceeds as follows: ** Generate two independent uniform deviates ''U'' and ''V''; ** Compute ''X'' = (''V'' − 0.5)/''U''; ** Optional: if ''X''2 ≤ 5 − 4''e''1/4''U'' then accept ''X'' and terminate algorithm; ** Optional: if ''X''2 ≥ 4''e''−1.35/''U'' + 1.4 then reject ''X'' and start over from step 1; ** If ''X''2 ≤ −4 ln''U'' then accept ''X'', otherwise start over the algorithm. *:The two optional steps allow the evaluation of the logarithm in the last step to be avoided in most cases. These steps can be greatly improved so that the logarithm is rarely evaluated. * The ziggurat algorithm is faster than the Box–Muller transform and still exact. In about 97% of all cases it uses only two random numbers, one random integer and one random uniform, one multiplication and an if-test. Only in 3% of the cases, where the combination of those two falls outside the "core of the ziggurat" (a kind of rejection sampling using logarithms), do exponentials and more uniform random numbers have to be employed. * Integer arithmetic can be used to sample from the standard normal distribution. This method is exact in the sense that it satisfies the conditions of ''ideal approximation''; i.e., it is equivalent to sampling a real number from the standard normal distribution and rounding this to the nearest representable floating point number. * There is also some investigation into the connection between the fast Hadamard transform and the normal distribution, since the transform employs just addition and subtraction and by the central limit theorem random numbers from almost any distribution will be transformed into the normal distribution. In this regard a series of Hadamard transforms can be combined with random permutations to turn arbitrary data sets into a normally distributed data.


Numerical approximations for the normal CDF and normal quantile function

The standard normal cumulative distribution function, CDF is widely used in scientific and statistical computing. The values Φ(''x'') may be approximated very accurately by a variety of methods, such as numerical integration, Taylor series, asymptotic series and Gauss's continued fraction#Of Kummer's confluent hypergeometric function, continued fractions. Different approximations are used depending on the desired level of accuracy. * give the approximation for Φ(''x'') for ''x > 0'' with the absolute error (algorith
26.2.17
: \Phi(x) = 1 - \varphi(x)\left(b_1 t + b_2 t^2 + b_3t^3 + b_4 t^4 + b_5 t^5\right) + \varepsilon(x), \qquad t = \frac, where ''ϕ''(''x'') is the standard normal PDF, and ''b''0 = 0.2316419, ''b''1 = 0.319381530, ''b''2 = −0.356563782, ''b''3 = 1.781477937, ''b''4 = −1.821255978, ''b''5 = 1.330274429. * lists some dozens of approximations – by means of rational functions, with or without exponentials – for the function. His algorithms vary in the degree of complexity and the resulting precision, with maximum absolute precision of 24 digits. An algorithm by combines Hart's algorithm 5666 with a continued fraction approximation in the tail to provide a fast computation algorithm with a 16-digit precision. * after recalling Hart68 solution is not suited for erf, gives a solution for both erf and erfc, with maximal relative error bound, via rational function, Rational Chebyshev Approximation. * suggested a simple algorithm based on the Taylor series expansion \Phi(x) = \frac12 + \varphi(x)\left( x + \frac 3 + \frac + \frac + \frac + \cdots \right) for calculating with arbitrary precision. The drawback of this algorithm is comparatively slow calculation time (for example it takes over 300 iterations to calculate the function with 16 digits of precision when ). * The GNU Scientific Library calculates values of the standard normal CDF using Hart's algorithms and approximations with Chebyshev polynomials. Shore (1982) introduced simple approximations that may be incorporated in stochastic optimization models of engineering and operations research, like reliability engineering and inventory analysis. Denoting , the simplest approximation for the quantile function is: z = \Phi^(p)=5.5556\left[1- \left( \frac p \right)^\right],\qquad p\ge 1/2 This approximation delivers for ''z'' a maximum absolute error of 0.026 (for , corresponding to ). For replace ''p'' by and change sign. Another approximation, somewhat less accurate, is the single-parameter approximation: z=-0.4115\left\, \qquad p\ge 1/2 The latter had served to derive a simple approximation for the loss integral of the normal distribution, defined by \begin L(z) & =\int_z^\infty (u-z)\varphi(u) \, du=\int_z^\infty [1-\Phi (u)] \, du \\[5pt] L(z) & \approx \begin 0.4115\left(\dfrac p \right) - z, & p<1/2, \\ \\ 0.4115\left( \dfrac p \right), & p\ge 1/2. \end \\[5pt] \text \\ L(z) & \approx \begin 0.4115\left\, & p < 1/2, \\ \\ 0.4115 \dfrac p, & p\ge 1/2. \end \end This approximation is particularly accurate for the right far-tail (maximum error of 10−3 for z≥1.4). Highly accurate approximations for the CDF, based on Response modeling methodology, Response Modeling Methodology (RMM, Shore, 2011, 2012), are shown in Shore (2005). Some more approximations can be found at: Error function#Approximation with elementary functions. In particular, small ''relative'' error on the whole domain for the CDF \Phi and the quantile function \Phi^ as well, is achieved via an explicitly invertible formula by Sergei Winitzki in 2008.


History


Development

Some authors attribute the credit for the discovery of the normal distribution to Abraham de Moivre, de Moivre, who in 1738 published in the second edition of his "''The Doctrine of Chances''" the study of the coefficients in the binomial expansion of . De Moivre proved that the middle term in this expansion has the approximate magnitude of 2^n/\sqrt, and that "If ''m'' or ''n'' be a Quantity infinitely great, then the Logarithm of the Ratio, which a Term distant from the middle by the Interval ''ℓ'', has to the middle Term, is -\frac." Although this theorem can be interpreted as the first obscure expression for the normal probability law, Stephen Stigler, Stigler points out that de Moivre himself did not interpret his results as anything more than the approximate rule for the binomial coefficients, and in particular de Moivre lacked the concept of the probability density function. In 1823 Carl Friedrich Gauss, Gauss published his monograph "''Theoria combinationis observationum erroribus minimis obnoxiae''" where among other things he introduces several important statistical concepts, such as the method of least squares, the method of maximum likelihood, and the ''normal distribution''. Gauss used ''M'', , to denote the measurements of some unknown quantity ''V'', and sought the "most probable" estimator of that quantity: the one that maximizes the probability of obtaining the observed experimental results. In his notation φΔ is the probability density function of the measurement errors of magnitude Δ. Not knowing what the function ''φ'' is, Gauss requires that his method should reduce to the well-known answer: the arithmetic mean of the measured values. Starting from these principles, Gauss demonstrates that the only law that rationalizes the choice of arithmetic mean as an estimator of the location parameter, is the normal law of errors: \varphi\mathit = \frac h \, e^, where ''h'' is "the measure of the precision of the observations". Using this normal law as a generic model for errors in the experiments, Gauss formulates what is now known as the non-linear least squares, non-linear weighted least squares method. Although Gauss was the first to suggest the normal distribution law, Pierre Simon de Laplace, Laplace made significant contributions. It was Laplace who first posed the problem of aggregating several observations in 1774, although his own solution led to the Laplacian distribution. It was Laplace who first calculated the value of the Gaussian integral, integral in 1782, providing the normalization constant for the normal distribution. Finally, it was Laplace who in 1810 proved and presented to the Academy the fundamental
central limit theorem In probability theory, the central limit theorem (CLT) establishes that, in many situations, when independent random variables are summed up, their properly normalized sum tends toward a normal distribution even if the original variables themselv ...
, which emphasized the theoretical importance of the normal distribution. It is of interest to note that in 1809 an Irish-American mathematician Robert Adrain published two insightful but flawed derivations of the normal probability law, simultaneously and independently from Gauss. His works remained largely unnoticed by the scientific community, until in 1871 they were exhumed by Cleveland Abbe, Abbe. In the middle of the 19th century James Clerk Maxwell, Maxwell demonstrated that the normal distribution is not just a convenient mathematical tool, but may also occur in natural phenomena: "The number of particles whose velocity, resolved in a certain direction, lies between ''x'' and ''x'' + ''dx'' is \operatorname \frac\; e^ \, dx


Naming

Today, the concept is usually known in English as the normal distribution or Gaussian distribution. Other less common names include Gauss distribution, Laplace-Gauss distribution, the law of error, the law of facility of errors, Laplace's second law, Gaussian law. Gauss himself apparently coined the term with reference to the "normal equations" involved in its applications, with normal having its technical meaning of orthogonal rather than "usual". However, by the end of the 19th century some authors had started using the name ''normal distribution'', where the word "normal" was used as an adjective – the term now being seen as a reflection of the fact that this distribution was seen as typical, common – and thus "normal". Charles Sanders Peirce, Peirce (one of those authors) once defined "normal" thus: "...the 'normal' is not the average (or any other kind of mean) of what actually occurs, but of what ''would'', in the long run, occur under certain circumstances." Around the turn of the 20th century Karl Pearson, Pearson popularized the term ''normal'' as a designation for this distribution. Also, it was Pearson who first wrote the distribution in terms of the standard deviation ''σ'' as in modern notation. Soon after this, in year 1915, Ronald Fisher, Fisher added the location parameter to the formula for normal distribution, expressing it in the way it is written nowadays: df = \frac e^ \, dx. The term "standard normal", which denotes the normal distribution with zero mean and unit variance came into general use around the 1950s, appearing in the popular textbooks by P. G. Hoel (1947) "''Introduction to mathematical statistics''" and A. M. Mood (1950) "''Introduction to the theory of statistics''".


See also

* Bates distribution – similar to the Irwin–Hall distribution, but rescaled back into the 0 to 1 range * Behrens–Fisher problem – the long-standing problem of testing whether two normal samples with different variances have same means; * Bhattacharyya distance – method used to separate mixtures of normal distributions * Erdős–Kac theorem – on the occurrence of the normal distribution in number theory * Full width at half maximum * Gaussian blur – convolution, which uses the normal distribution as a kernel * Modified half-normal distribution with the pdf on (0, \infty) is given as f(x)= \frac, where \Psi(\alpha,z)=_1\Psi_1\left(\begin\left(\alpha,\frac\right)\\(1,0)\end;z \right) denotes the Fox-Wright Psi function. * Normally distributed and uncorrelated does not imply independent * Ratio normal distribution * Reciprocal normal distribution * Standard normal table * Stein's lemma * Sub-Gaussian distribution * Sum of normally distributed random variables * Tweedie distribution – The normal distribution is a member of the family of Tweedie exponential dispersion models. * Wrapped normal distribution – the Normal distribution applied to a circular domain * Z-test – using the normal distribution


Notes


References


Citations


Sources

* * In particular, the entries fo
"bell-shaped and bell curve"
an

* * * * * * * * * * * * * * * * * * * * * * * * Translated by Stephen M. Stigler in ''Statistical Science'' 1 (3), 1986: . * * * * * * * * * * * * * * * * * * * * * * * * * * * *


External links

*
Normal distribution calculator
{{Authority control Normal distribution, Continuous distributions Conjugate prior distributions Exponential family distributions Stable distributions Location-scale family probability distributions]">X, ^p \right&= \sigma^p \cdot 2^ \frac _1F_1\left( -\frac, \frac, -\frac \left( \frac \mu \sigma \right)^2 \right). \end These expressions remain valid even if p is not an integer. See also Hermite polynomials#"Negative variance", generalized Hermite polynomials. The expectation of X conditioned on the event that X lies in an interval ,b/math> is given by :\operatorname\left \mid a= \mu - \sigma^2\frac where f and F respectively are the density and the cumulative distribution function of X. For b=\infty this is known as the
inverse Mills ratio In probability theory, the Mills ratio (or Mills's ratio) of a continuous random variable X is the function : m(x) := \frac , where f(x) is the probability density function, and :\bar(x) := \Pr x.html" ;"title=">x">>x= \int_x^ f(u)\, du is the ...
. Note that above, density f of X is used instead of standard normal density as in inverse Mills ratio, so here we have \sigma^2 instead of \sigma.


Fourier transform and characteristic function

The
Fourier transform A Fourier transform (FT) is a mathematical transform that decomposes functions into frequency components, which are represented by the output of the transform as a function of frequency. Most commonly functions of time or space are transformed, ...
of a normal density f with mean \mu and standard deviation \sigma is : \hat f(t) = \int_^\infty f(x)e^ \, dx = e^ e^ where i is the
imaginary unit The imaginary unit or unit imaginary number () is a solution to the quadratic equation x^2+1=0. Although there is no real number with this property, can be used to extend the real numbers to what are called complex numbers, using addition an ...
. If the mean \mu=0, the first factor is 1, and the Fourier transform is, apart from a constant factor, a normal density on the
frequency domain In physics, electronics, control systems engineering, and statistics, the frequency domain refers to the analysis of mathematical functions or signals with respect to frequency, rather than time. Put simply, a time-domain graph shows how a signa ...
, with mean 0 and standard deviation 1/\sigma. In particular, the standard normal distribution \varphi is an
eigenfunction In mathematics, an eigenfunction of a linear operator ''D'' defined on some function space is any non-zero function f in that space that, when acted upon by ''D'', is only multiplied by some scaling factor called an eigenvalue. As an equation, th ...
of the Fourier transform. In probability theory, the Fourier transform of the probability distribution of a real-valued random variable X is closely connected to the
characteristic function In mathematics, the term "characteristic function" can refer to any of several distinct concepts: * The indicator function of a subset, that is the function ::\mathbf_A\colon X \to \, :which for a given subset ''A'' of ''X'', has value 1 at points ...
\varphi_X(t) of that variable, which is defined as the
expected value In probability theory, the expected value (also called expectation, expectancy, mathematical expectation, mean, average, or first moment) is a generalization of the weighted average. Informally, the expected value is the arithmetic mean of a l ...
of e^, as a function of the real variable t (the
frequency Frequency is the number of occurrences of a repeating event per unit of time. It is also occasionally referred to as ''temporal frequency'' for clarity, and is distinct from ''angular frequency''. Frequency is measured in hertz (Hz) which is eq ...
parameter of the Fourier transform). This definition can be analytically extended to a complex-value variable t. The relation between both is: :\varphi_X(t) = \hat f(-t)


Moment and cumulant generating functions

The
moment generating function In probability theory and statistics, the moment-generating function of a real-valued random variable is an alternative specification of its probability distribution. Thus, it provides the basis of an alternative route to analytical results compare ...
of a real random variable X is the expected value of e^, as a function of the real parameter t. For a normal distribution with density f, mean \mu and deviation \sigma, the moment generating function exists and is equal to :M(t) = \operatorname ^= \hat f(it) = e^ e^ The
cumulant generating function In probability theory and statistics, the cumulants of a probability distribution are a set of quantities that provide an alternative to the '' moments'' of the distribution. Any two probability distributions whose moments are identical will have ...
is the logarithm of the moment generating function, namely :g(t) = \ln M(t) = \mu t + \tfrac 12 \sigma^2 t^2 Since this is a quadratic polynomial in t, only the first two
cumulant In probability theory and statistics, the cumulants of a probability distribution are a set of quantities that provide an alternative to the '' moments'' of the distribution. Any two probability distributions whose moments are identical will ha ...
s are nonzero, namely the mean \mu and the variance \sigma^2.


Stein operator and class

Within
Stein's method Stein's method is a general method in probability theory to obtain bounds on the distance between two probability distributions with respect to a probability metric. It was introduced by Charles Stein, who first published it in 1972, to obtain ...
the Stein operator and class of a random variable X \sim \mathcal(\mu, \sigma^2) are \mathcalf(x) = \sigma^2 f'(x) - (x-\mu)f(x) and \mathcal the class of all absolutely continuous functions f : \R \to \R \mbox\mathbb[, f'(X), ]< \infty.


Zero-variance limit

In the limit (mathematics), limit when \sigma tends to zero, the probability density f(x) eventually tends to zero at any x\ne \mu, but grows without limit if x = \mu, while its integral remains equal to 1. Therefore, the normal distribution cannot be defined as an ordinary
function Function or functionality may refer to: Computing * Function key, a type of key on computer keyboards * Function model, a structured representation of processes in a system * Function object or functor or functionoid, a concept of object-oriente ...
when \sigma = 0. However, one can define the normal distribution with zero variance as a
generalized function In mathematics, generalized functions are objects extending the notion of functions. There is more than one recognized theory, for example the theory of distributions. Generalized functions are especially useful in making discontinuous functions ...
; specifically, as Dirac's "delta function" \delta translated by the mean \mu, that is f(x)=\delta(x-\mu). Its CDF is then the
Heaviside step function The Heaviside step function, or the unit step function, usually denoted by or (but sometimes , or ), is a step function, named after Oliver Heaviside (1850–1925), the value of which is zero for negative arguments and one for positive argume ...
translated by the mean \mu, namely :F(x) = \begin 0 & \textx < \mu \\ 1 & \textx \geq \mu \end


Maximum entropy

Of all probability distributions over the reals with a specified mean \mu and variance \sigma^2, the normal distribution N(\mu,\sigma^2) is the one with maximum entropy. If X is a
continuous random variable In probability theory and statistics, a probability distribution is the mathematical function that gives the probabilities of occurrence of different possible outcomes for an experiment. It is a mathematical description of a random phenomenon i ...
with
probability density In probability theory, a probability density function (PDF), or density of a continuous random variable, is a function whose value at any given sample (or point) in the sample space (the set of possible values taken by the random variable) can ...
f(x), then the entropy of X is defined as : H(X) = - \int_^\infty f(x)\log f(x)\, dx where f(x)\log f(x) is understood to be zero whenever f(x)=0. This functional can be maximized, subject to the constraints that the distribution is properly normalized and has a specified variance, by using
variational calculus The calculus of variations (or Variational Calculus) is a field of mathematical analysis that uses variations, which are small changes in functions and functionals, to find maxima and minima of functionals: mappings from a set of functions t ...
. A function with two
Lagrange multipliers In mathematical optimization, the method of Lagrange multipliers is a strategy for finding the local maxima and minima of a function subject to equality constraints (i.e., subject to the condition that one or more equations have to be satisfied ex ...
is defined: : L=\int_^\infty f(x)\ln(f(x))\,dx-\lambda_0\left(1-\int_^\infty f(x)\,dx\right)-\lambda\left(\sigma^2-\int_^\infty f(x)(x-\mu)^2\,dx\right) where f(x) is, for now, regarded as some density function with mean \mu and standard deviation \sigma. At maximum entropy, a small variation \delta f(x) about f(x) will produce a variation \delta L about L which is equal to 0: : 0=\delta L=\int_^\infty \delta f(x)\left (\ln(f(x))+1+\lambda_0+\lambda(x-\mu)^2\right )\,dx Since this must hold for any small \delta f(x), the term in brackets must be zero, and solving for f(x) yields: :f(x)=e^ Using the constraint equations to solve for \lambda_0 and \lambda yields the density of the normal distribution: : f(x, \mu, \sigma)=\frace^ The entropy of a normal distribution is equal to : H(X)=\tfrac(1+\log(2\sigma^2\pi))


Other properties


Related distributions


Central limit theorem

The central limit theorem states that under certain (fairly common) conditions, the sum of many random variables will have an approximately normal distribution. More specifically, where X_1,\ldots ,X_n are
independent and identically distributed In probability theory and statistics, a collection of random variables is independent and identically distributed if each random variable has the same probability distribution as the others and all are mutually independent. This property is usua ...
random variables with the same arbitrary distribution, zero mean, and variance \sigma^2 and Z is their mean scaled by \sqrt : Z = \sqrt\left(\frac\sum_^n X_i\right) Then, as n increases, the probability distribution of Z will tend to the normal distribution with zero mean and variance \sigma^2. The theorem can be extended to variables (X_i) that are not independent and/or not identically distributed if certain constraints are placed on the degree of dependence and the moments of the distributions. Many
test statistic A test statistic is a statistic (a quantity derived from the sample) used in statistical hypothesis testing.Berger, R. L.; Casella, G. (2001). ''Statistical Inference'', Duxbury Press, Second Edition (p.374) A hypothesis test is typically specif ...
s, scores, and
estimator In statistics, an estimator is a rule for calculating an estimate of a given quantity based on observed data: thus the rule (the estimator), the quantity of interest (the estimand) and its result (the estimate) are distinguished. For example, the ...
s encountered in practice contain sums of certain random variables in 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 distributions. The central limit theorem also implies that certain distributions can be approximated by the normal distribution, for example: * The
binomial distribution In probability theory and statistics, the binomial distribution with parameters ''n'' and ''p'' is the discrete probability distribution of the number of successes in a sequence of ''n'' independent experiments, each asking a yes–no quest ...
B(n,p) is approximately normal with mean np and variance np(1-p) for large n and for p not too close to 0 or 1. * The
Poisson distribution In probability theory and statistics, the Poisson distribution is a discrete probability distribution that expresses the probability of a given number of events occurring in a fixed interval of time or space if these events occur with a known co ...
with parameter \lambda is approximately normal with mean \lambda and variance \lambda, for large values of \lambda. * The
chi-squared distribution In probability theory and statistics, the chi-squared distribution (also chi-square or \chi^2-distribution) with k degrees of freedom is the distribution of a sum of the squares of k independent standard normal random variables. The chi-squa ...
\chi^2(k) is approximately normal with mean k and variance 2k, for large k. * The
Student's t-distribution In probability and statistics, Student's ''t''-distribution (or simply the ''t''-distribution) is any member of a family of continuous probability distributions that arise when estimating the mean of a normally distributed population in sit ...
t(\nu) is approximately normal with mean 0 and variance 1 when \nu is large. Whether these approximations are sufficiently accurate depends on the purpose for which they are needed, and the rate of convergence to the normal distribution. It is typically the case that such approximations are less accurate in the tails of the distribution. A general upper bound for the approximation error in the central limit theorem is given by the
Berry–Esseen theorem In probability theory, the central limit theorem states that, under certain circumstances, the probability distribution of the scaled mean of a random sample converges to a normal distribution as the sample size increases to infinity. Under strong ...
, improvements of the approximation are given by the
Edgeworth expansion The Gram–Charlier A series (named in honor of Jørgen Pedersen Gram and Carl Charlier), and the Edgeworth series (named in honor of Francis Ysidro Edgeworth) are series that approximate a probability distribution in terms of its cumulants. The se ...
s. This theorem can also be used to justify modeling the sum of many uniform noise sources as
Gaussian noise Gaussian noise, named after Carl Friedrich Gauss, is a term from signal processing theory denoting a kind of signal noise that has a probability density function (pdf) equal to that of the normal distribution (which is also known as the Gaussia ...
. See
AWGN Additive white Gaussian noise (AWGN) is a basic noise model used in information theory to mimic the effect of many random processes that occur in nature. The modifiers denote specific characteristics: * ''Additive'' because it is added to any nois ...
.


Operations and functions of normal variables

The
probability density In probability theory, a probability density function (PDF), or density of a continuous random variable, is a function whose value at any given sample (or point) in the sample space (the set of possible values taken by the random variable) can ...
,
cumulative distribution In statistics, the frequency (or absolute frequency) of an event i is the number n_i of times the observation has occurred/recorded in an experiment or study. These frequencies are often depicted graphically or in tabular form. Types The cumul ...
, and inverse cumulative distribution of any function of one or more independent or correlated normal variables can be computed with the numerical method of ray-tracing
Matlab code
. In the following sections we look at some special cases.


Operations on a single normal variable

If X is distributed normally with mean \mu and variance \sigma^2, then * aX+b, for any real numbers a and b, is also normally distributed, with mean a\mu+b and standard deviation , a, \sigma. That is, the family of normal distributions is closed under linear transformations. * The exponential of X is distributed log-normally: . * The absolute value of X has
folded normal distribution The folded normal distribution is a probability distribution related to the normal distribution. Given a normally distributed random variable ''X'' with mean ''μ'' and variance ''σ''2, the random variable ''Y'' = , ''X'', has a folded normal d ...
: . If \mu = 0 this is known as the
half-normal distribution In probability theory and statistics, the half-normal distribution is a special case of the folded normal distribution. Let X follow an ordinary normal distribution, N(0,\sigma^2). Then, Y=, X, follows a half-normal distribution. Thus, the hal ...
. * The absolute value of normalized residuals, , ''X'' − ''μ'', /''σ'', has
chi distribution In probability theory and statistics, the chi distribution is a continuous probability distribution. It is the distribution of the positive square root of the sum of squares of a set of independent random variables each following a standard norm ...
with one degree of freedom: , X - \mu, / \sigma \sim \chi_1. * The square of ''X''/''σ'' has the
noncentral chi-squared distribution In probability theory and statistics, the noncentral chi-squared distribution (or noncentral chi-square distribution, noncentral \chi^2 distribution) is a noncentral generalization of the chi-squared distribution. It often arises in the power a ...
with one degree of freedom: X^2 / \sigma^2 \sim \chi_1^2(\mu^2 / \sigma^2). If \mu = 0, the distribution is called simply chi-squared. * The log likelihood of a normal variable x is simply the log of its
probability density function In probability theory, a probability density function (PDF), or density of a continuous random variable, is a function whose value at any given sample (or point) in the sample space (the set of possible values taken by the random variable) can ...
: \ln p(x)= -\frac \left(\frac \right)^2 -\ln \left(\sigma \sqrt \right) = -\frac z^2 -\ln \left(\sigma \sqrt \right). Since this is a scaled and shifted square of a standard normal variable, it is distributed as a scaled and shifted chi-squared variable. * The distribution of the variable ''X'' restricted to an interval 'a'', ''b''is called the
truncated normal distribution In probability and statistics, the truncated normal distribution is the probability distribution derived from that of a normally distributed random variable by bounding the random variable from either below or above (or both). The truncated no ...
. * (''X'' − ''μ'')−2 has a
Lévy distribution In probability theory and statistics, the Lévy distribution, named after Paul Lévy, is a continuous probability distribution for a non-negative random variable. In spectroscopy, this distribution, with frequency as the dependent variable, is kn ...
with location 0 and scale ''σ''−2.


= Operations on two independent normal variables

= * If X_1 and X_2 are two
independent Independent or Independents may refer to: Arts, entertainment, and media Artist groups * Independents (artist group), a group of modernist painters based in the New Hope, Pennsylvania, area of the United States during the early 1930s * Independ ...
normal random variables, with means \mu_1, \mu_2 and standard deviations \sigma_1, \sigma_2, then their sum X_1 + X_2 will also be normally distributed, roof/sup> with mean \mu_1 + \mu_2 and variance \sigma_1^2 + \sigma_2^2. * In particular, if X and Y are independent normal deviates with zero mean and variance \sigma^2, then X + Y and X - Y are also independent and normally distributed, with zero mean and variance 2\sigma^2. This is a special case of the
polarization identity In linear algebra, a branch of mathematics, the polarization identity is any one of a family of formulas that express the inner product of two vectors in terms of the norm of a normed vector space. If a norm arises from an inner product then t ...
. * If X_1, X_2 are two independent normal deviates with mean \mu and deviation \sigma, and a, b are arbitrary real numbers, then the variable X_3 = \frac + \mu is also normally distributed with mean \mu and deviation \sigma. It follows that the normal distribution is
stable A stable is a building in which livestock, especially horses, are kept. It most commonly means a building that is divided into separate stalls for individual animals and livestock. There are many different types of stables in use today; the ...
(with exponent \alpha=2).


= Operations on two independent standard normal variables

= If X_1 and X_2 are two independent standard normal random variables with mean 0 and variance 1, then * Their sum and difference is distributed normally with mean zero and variance two: X_1 \pm X_2 \sim N(0, 2). * Their product Z = X_1 X_2 follows the
product distribution A product distribution is a probability distribution constructed as the distribution of the product of random variables having two other known distributions. Given two statistically independent random variables ''X'' and ''Y'', the distribution of ...
with density function f_Z(z) = \pi^ K_0(, z, ) where K_0 is the
modified Bessel function of the second kind Bessel functions, first defined by the mathematician Daniel Bernoulli and then generalized by Friedrich Bessel, are canonical solutions of Bessel's differential equation x^2 \frac + x \frac + \left(x^2 - \alpha^2 \right)y = 0 for an arbitrary ...
. This distribution is symmetric around zero, unbounded at z = 0, and has the
characteristic function In mathematics, the term "characteristic function" can refer to any of several distinct concepts: * The indicator function of a subset, that is the function ::\mathbf_A\colon X \to \, :which for a given subset ''A'' of ''X'', has value 1 at points ...
\phi_Z(t) = (1 + t^2)^. * Their ratio follows the standard
Cauchy distribution The Cauchy distribution, named after Augustin Cauchy, is a continuous probability distribution. It is also known, especially among physicists, as the Lorentz distribution (after Hendrik Lorentz), Cauchy–Lorentz distribution, Lorentz(ian) fun ...
: X_1/ X_2 \sim \operatorname(0, 1). * Their Euclidean norm \sqrt has the
Rayleigh distribution In probability theory and statistics, the Rayleigh distribution is a continuous probability distribution for nonnegative-valued random variables. Up to rescaling, it coincides with the chi distribution with two degrees of freedom. The distribut ...
.


Operations on multiple independent normal variables

* Any linear combination of independent normal deviates is a normal deviate. * If X_1, X_2, \ldots, X_n are independent standard normal random variables, then the sum of their squares has the
chi-squared distribution In probability theory and statistics, the chi-squared distribution (also chi-square or \chi^2-distribution) with k degrees of freedom is the distribution of a sum of the squares of k independent standard normal random variables. The chi-squa ...
with n degrees of freedom X_1^2 + \cdots + X_n^2 \sim \chi_n^2. * If X_1, X_2, \ldots, X_n are independent normally distributed random variables with means \mu and variances \sigma^2, then their
sample mean The sample mean (or "empirical mean") and the sample covariance are statistics computed from a Sample (statistics), sample of data on one or more random variables. The sample mean is the average value (or mean, mean value) of a sample (statistic ...
is independent from the sample
standard deviation In statistics, the standard deviation is a measure of the amount of variation or dispersion of a set of values. A low standard deviation indicates that the values tend to be close to the mean (also called the expected value) of the set, while ...
, which can be demonstrated using Basu's theorem or
Cochran's theorem In statistics, Cochran's theorem, devised by William G. Cochran, is a theorem used to justify results relating to the probability distributions of statistics that are used in the analysis of variance. Statement Let ''U''1, ..., ''U'N'' be i.i. ...
. The ratio of these two quantities will have the
Student's t-distribution In probability and statistics, Student's ''t''-distribution (or simply the ''t''-distribution) is any member of a family of continuous probability distributions that arise when estimating the mean of a normally distributed population in sit ...
with n-1 degrees of freedom: t = \frac = \frac \sim t_. * If X_1, X_2, \ldots, X_n, Y_1, Y_2, \ldots, Y_m are independent standard normal random variables, then the ratio of their normalized sums of squares will have the with degrees of freedom: F = \frac \sim F_.


Operations on multiple correlated normal variables

* A
quadratic form In mathematics, a quadratic form is a polynomial with terms all of degree two ("form" is another name for a homogeneous polynomial). For example, :4x^2 + 2xy - 3y^2 is a quadratic form in the variables and . The coefficients usually belong to a ...
of a normal vector, i.e. a quadratic function q = \sum x_i^2 + \sum x_j + c of multiple independent or correlated normal variables, is a generalized chi-square variable.


Operations on the density function

The split normal distribution is most directly defined in terms of joining scaled sections of the density functions of different normal distributions and rescaling the density to integrate to one. The
truncated normal distribution In probability and statistics, the truncated normal distribution is the probability distribution derived from that of a normally distributed random variable by bounding the random variable from either below or above (or both). The truncated no ...
results from rescaling a section of a single density function.


Infinite divisibility and Cramér's theorem

For any positive integer \text, any normal distribution with mean \mu and variance \sigma^2 is the distribution of the sum of \text independent normal deviates, each with mean \frac and variance \frac. This property is called
infinite divisibility Infinite divisibility arises in different ways in philosophy, physics, economics, order theory (a branch of mathematics), and probability theory (also a branch of mathematics). One may speak of infinite divisibility, or the lack thereof, of matter ...
. Conversely, if X_1 and X_2 are independent random variables and their sum X_1+X_2 has a normal distribution, then both X_1 and X_2 must be normal deviates. This result is known as Cramér's decomposition theorem, and is equivalent to saying that the convolution of two distributions is normal if and only if both are normal. Cramér's theorem implies that a linear combination of independent non-Gaussian variables will never have an exactly normal distribution, although it may approach it arbitrarily closely.


Bernstein's theorem

Bernstein's theorem states that if X and Y are independent and X + Y and X - Y are also independent, then both ''X'' and ''Y'' must necessarily have normal distributions. More generally, if X_1, \ldots, X_n are independent random variables, then two distinct linear combinations \sum and \sumwill be independent if and only if all X_k are normal and \sum, where \sigma_k^2 denotes the variance of X_k.


Extensions

The notion of normal distribution, being one of the most important distributions in probability theory, has been extended far beyond the standard framework of the univariate (that is one-dimensional) case (Case 1). All these extensions are also called ''normal'' or ''Gaussian'' laws, so a certain ambiguity in names exists. * The
multivariate normal distribution In probability theory and statistics, the multivariate normal distribution, multivariate Gaussian distribution, or joint normal distribution is a generalization of the one-dimensional (univariate) normal distribution to higher dimensions. One d ...
describes the Gaussian law in the ''k''-dimensional Euclidean space. A vector is multivariate-normally distributed if any linear combination of its components has a (univariate) normal distribution. The variance of ''X'' is a ''k×k'' symmetric positive-definite matrix ''V''. The multivariate normal distribution is a special case of the
elliptical distribution In probability and statistics, an elliptical distribution is any member of a broad family of probability distributions that generalize the multivariate normal distribution. Intuitively, in the simplified two and three dimensional case, the joint di ...
s. As such, its iso-density loci in the ''k'' = 2 case are ellipses and in the case of arbitrary ''k'' are ellipsoids. * Rectified Gaussian distribution a rectified version of normal distribution with all the negative elements reset to 0 * Complex normal distribution deals with the complex normal vectors. A complex vector is said to be normal if both its real and imaginary components jointly possess a 2''k''-dimensional multivariate normal distribution. The variance-covariance structure of ''X'' is described by two matrices: the ''variance'' matrix Γ, and the ''relation'' matrix ''C''. * Matrix normal distribution describes the case of normally distributed matrices. * Gaussian processes are the normally distributed stochastic processes. These can be viewed as elements of some infinite-dimensional Hilbert space ''H'', and thus are the analogues of multivariate normal vectors for the case . A random element is said to be normal if for any constant the scalar product has a (univariate) normal distribution. The variance structure of such Gaussian random element can be described in terms of the linear ''covariance ''. Several Gaussian processes became popular enough to have their own names: ** Wiener process, Brownian motion, ** Brownian bridge, ** Ornstein–Uhlenbeck process. * Gaussian q-distribution is an abstract mathematical construction that represents a "q-analogue" of the normal distribution. * the q-Gaussian is an analogue of the Gaussian distribution, in the sense that it maximises the Tsallis entropy, and is one type of Tsallis distribution. Note that this distribution is different from the Gaussian q-distribution above. * The Kaniadakis Gaussian distribution, Kaniadakis ''κ''-Gaussian distribution is a generalization of the Gaussian distribution which arises from the Kaniadakis statistics, being one of the Kaniadakis distribution, Kaniadakis distributions. A random variable ''X'' has a two-piece normal distribution if it has a distribution : f_X( x ) = N( \mu, \sigma_1^2 ) \text x \le \mu : f_X( x ) = N( \mu, \sigma_2^2 ) \text x \ge \mu where ''μ'' is the mean and ''σ''1 and ''σ''2 are the standard deviations of the distribution to the left and right of the mean respectively. The mean, variance and third central moment of this distribution have been determined : \operatorname( X ) = \mu + \sqrt ( \sigma_2 - \sigma_1 ) : \operatorname( X ) = \left( 1 - \frac 2 \pi\right)( \sigma_2 - \sigma_1 )^2 + \sigma_1 \sigma_2 : \operatorname( X ) = \sqrt( \sigma_2 - \sigma_1 ) \left[ \left( \frac 4 \pi - 1 \right) ( \sigma_2 - \sigma_1)^2 + \sigma_1 \sigma_2 \right] where E(''X''), V(''X'') and T(''X'') are the mean, variance, and third central moment respectively. One of the main practical uses of the Gaussian law is to model the empirical distributions of many different random variables encountered in practice. In such case a possible extension would be a richer family of distributions, having more than two parameters and therefore being able to fit the empirical distribution more accurately. The examples of such extensions are: * Pearson distribution — a four-parameter family of probability distributions that extend the normal law to include different skewness and kurtosis values. * The generalized normal distribution, also known as the exponential power distribution, allows for distribution tails with thicker or thinner asymptotic behaviors.


Statistical inference


Estimation of parameters

It is often the case that we do not know the parameters of the normal distribution, but instead want to Estimation theory, estimate them. That is, having a sample (x_1, \ldots, x_n) from a normal N(\mu, \sigma^2) population we would like to learn the approximate values of parameters \mu and \sigma^2. The standard approach to this problem is the maximum likelihood method, which requires maximization of the ''log-likelihood function'': : \ln\mathcal(\mu,\sigma^2) = \sum_^n \ln f(x_i\mid\mu,\sigma^2) = -\frac\ln(2\pi) - \frac\ln\sigma^2 - \frac\sum_^n (x_i-\mu)^2. Taking derivatives with respect to \mu and \sigma^2 and solving the resulting system of first order conditions yields the ''maximum likelihood estimates'': : \hat = \overline \equiv \frac\sum_^n x_i, \qquad \hat^2 = \frac \sum_^n (x_i - \overline)^2.


Sample mean

Estimator \textstyle\hat\mu is called the ''
sample mean The sample mean (or "empirical mean") and the sample covariance are statistics computed from a Sample (statistics), sample of data on one or more random variables. The sample mean is the average value (or mean, mean value) of a sample (statistic ...
'', since it is the arithmetic mean of all observations. The statistic \textstyle\overline is complete statistic, complete and sufficient statistic, sufficient for \mu, and therefore by the Lehmann–Scheffé theorem, \textstyle\hat\mu is the uniformly minimum variance unbiased (UMVU) estimator. In finite samples it is distributed normally: : \hat\mu \sim \mathcal(\mu,\sigma^2/n). The variance of this estimator is equal to the ''μμ''-element of the inverse Fisher information matrix \textstyle\mathcal^. This implies that the estimator is efficient estimator, finite-sample efficient. Of practical importance is the fact that the standard error (statistics), standard error of \textstyle\hat\mu is proportional to \textstyle1/\sqrt, that is, if one wishes to decrease the standard error by a factor of 10, one must increase the number of points in the sample by a factor of 100. This fact is widely used in determining sample sizes for opinion polls and the number of trials in Monte Carlo simulations. From the standpoint of the asymptotic theory (statistics), asymptotic theory, \textstyle\hat\mu is consistent estimator, consistent, that is, it convergence in probability, converges in probability to \mu as n\rightarrow\infty. The estimator is also asymptotic normality, asymptotically normal, which is a simple corollary of the fact that it is normal in finite samples: : \sqrt(\hat\mu-\mu) \,\xrightarrow\, \mathcal(0,\sigma^2).


Sample variance

The estimator \textstyle\hat\sigma^2 is called the ''sample variance'', since it is the variance of the sample ((x_1, \ldots, x_n)). In practice, another estimator is often used instead of the \textstyle\hat\sigma^2. This other estimator is denoted s^2, and is also called the ''sample variance'', which represents a certain ambiguity in terminology; its square root s is called the ''sample standard deviation''. The estimator s^2 differs from \textstyle\hat\sigma^2 by having instead of ''n'' in the denominator (the so-called Bessel's correction): : s^2 = \frac \hat\sigma^2 = \frac \sum_^n (x_i - \overline)^2. The difference between s^2 and \textstyle\hat\sigma^2 becomes negligibly small for large ''n''s. In finite samples however, the motivation behind the use of s^2 is that it is an unbiased estimator of the underlying parameter \sigma^2, whereas \textstyle\hat\sigma^2 is biased. Also, by the Lehmann–Scheffé theorem the estimator s^2 is uniformly minimum variance unbiased (Minimum-variance unbiased estimator, UMVU), which makes it the "best" estimator among all unbiased ones. However it can be shown that the biased estimator \textstyle\hat\sigma^2 is "better" than the s^2 in terms of the mean squared error (MSE) criterion. In finite samples both s^2 and \textstyle\hat\sigma^2 have scaled
chi-squared distribution In probability theory and statistics, the chi-squared distribution (also chi-square or \chi^2-distribution) with k degrees of freedom is the distribution of a sum of the squares of k independent standard normal random variables. The chi-squa ...
with degrees of freedom: : s^2 \sim \frac \cdot \chi^2_, \qquad \hat\sigma^2 \sim \frac \cdot \chi^2_. The first of these expressions shows that the variance of s^2 is equal to 2\sigma^4/(n-1), which is slightly greater than the ''σσ''-element of the inverse Fisher information matrix \textstyle\mathcal^. Thus, s^2 is not an efficient estimator for \sigma^2, and moreover, since s^2 is UMVU, we can conclude that the finite-sample efficient estimator for \sigma^2 does not exist. Applying the asymptotic theory, both estimators s^2 and \textstyle\hat\sigma^2 are consistent, that is they converge in probability to \sigma^2 as the sample size n\rightarrow\infty. The two estimators are also both asymptotically normal: : \sqrt(\hat\sigma^2 - \sigma^2) \simeq \sqrt(s^2-\sigma^2) \,\xrightarrow\, \mathcal(0,2\sigma^4). In particular, both estimators are asymptotically efficient for \sigma^2.


Confidence intervals

By
Cochran's theorem In statistics, Cochran's theorem, devised by William G. Cochran, is a theorem used to justify results relating to the probability distributions of statistics that are used in the analysis of variance. Statement Let ''U''1, ..., ''U'N'' be i.i. ...
, for normal distributions the sample mean \textstyle\hat\mu and the sample variance ''s''2 are
independent Independent or Independents may refer to: Arts, entertainment, and media Artist groups * Independents (artist group), a group of modernist painters based in the New Hope, Pennsylvania, area of the United States during the early 1930s * Independ ...
, which means there can be no gain in considering their joint distribution. There is also a converse theorem: if in a sample the sample mean and sample variance are independent, then the sample must have come from the normal distribution. The independence between \textstyle\hat\mu and ''s'' can be employed to construct the so-called ''t-statistic'': : t = \frac = \frac \sim t_ This quantity ''t'' has the
Student's t-distribution In probability and statistics, Student's ''t''-distribution (or simply the ''t''-distribution) is any member of a family of continuous probability distributions that arise when estimating the mean of a normally distributed population in sit ...
with degrees of freedom, and it is an ancillary statistic (independent of the value of the parameters). Inverting the distribution of this ''t''-statistics will allow us to construct the
confidence interval In frequentist statistics, a confidence interval (CI) is a range of estimates for an unknown parameter. A confidence interval is computed at a designated ''confidence level''; the 95% confidence level is most common, but other levels, such as 9 ...
for ''μ''; similarly, inverting the ''χ''2 distribution of the statistic ''s''2 will give us the confidence interval for ''σ''2: :\mu \in \left[ \hat\mu - t_ \fracs, \hat\mu + t_ \fracs \right], :\sigma^2 \in \left[ \frac, \frac \right], where ''tk,p'' and are the ''p''th
quantile In statistics and probability, quantiles are cut points dividing the range of a probability distribution into continuous intervals with equal probabilities, or dividing the observations in a sample in the same way. There is one fewer quantile tha ...
s of the ''t''- and ''χ''2-distributions respectively. These confidence intervals are of the ''confidence level'' , meaning that the true values ''μ'' and ''σ''2 fall outside of these intervals with probability (or significance level) ''α''. In practice people usually take , resulting in the 95% confidence intervals. Approximate formulas can be derived from the asymptotic distributions of \textstyle\hat\mu and ''s''2: :\mu \in \left[ \hat\mu - , z_, \fracs, \hat\mu + , z_, \fracs \right], :\sigma^2 \in \left[ s^2 - , z_, \fracs^2, s^2 + , z_, \fracs^2 \right], The approximate formulas become valid for large values of ''n'', and are more convenient for the manual calculation since the standard normal quantiles ''z''''α''/2 do not depend on ''n''. In particular, the most popular value of , results in .


Normality tests

Normality tests assess the likelihood that the given data set comes from a normal distribution. Typically the null hypothesis ''H''0 is that the observations are distributed normally with unspecified mean ''μ'' and variance ''σ''2, versus the alternative ''Ha'' that the distribution is arbitrary. Many tests (over 40) have been devised for this problem. The more prominent of them are outlined below: Diagnostic plots are more intuitively appealing but subjective at the same time, as they rely on informal human judgement to accept or reject the null hypothesis. *
Q–Q plot In statistics, a Q–Q plot (quantile-quantile plot) is a probability plot, a List of graphical methods, graphical method for comparing two probability distributions by plotting their ''quantiles'' against each other. A point on the plot co ...
, also known as normal probability plot or rankit plot—is a plot of the sorted values from the data set against the expected values of the corresponding quantiles from the standard normal distribution. That is, it's a plot of point of the form (Φ−1(''pk''), ''x''(''k'')), where plotting points ''pk'' are equal to ''pk'' = (''k'' − ''α'')/(''n'' + 1 − 2''α'') and ''α'' is an adjustment constant, which can be anything between 0 and 1. If the null hypothesis is true, the plotted points should approximately lie on a straight line. * P–P plot – similar to the Q–Q plot, but used much less frequently. This method consists of plotting the points (Φ(''z''(''k'')), ''pk''), where \textstyle z_ = (x_-\hat\mu)/\hat\sigma. For normally distributed data this plot should lie on a 45° line between (0, 0) and (1, 1). Goodness-of-fit tests: ''Moment-based tests'': * D'Agostino's K-squared test * Jarque–Bera test * Shapiro–Wilk test: This is based on the fact that the line in the Q–Q plot has the slope of ''σ''. The test compares the least squares estimate of that slope with the value of the sample variance, and rejects the null hypothesis if these two quantities differ significantly. ''Tests based on the empirical distribution function'': * Anderson–Darling test * Lilliefors test (an adaptation of the Kolmogorov–Smirnov test)


Bayesian analysis of the normal distribution

Bayesian analysis of normally distributed data is complicated by the many different possibilities that may be considered: * Either the mean, or the variance, or neither, may be considered a fixed quantity. * When the variance is unknown, analysis may be done directly in terms of the variance, or in terms of the
precision Precision, precise or precisely may refer to: Science, and technology, and mathematics Mathematics and computing (general) * Accuracy and precision, measurement deviation from true value and its scatter * Significant figures, the number of digit ...
, the reciprocal of the variance. The reason for expressing the formulas in terms of precision is that the analysis of most cases is simplified. * Both univariate and multivariate normal distribution, multivariate cases need to be considered. * Either conjugate prior, conjugate or improper prior, improper prior distributions may be placed on the unknown variables. * An additional set of cases occurs in Bayesian linear regression, where in the basic model the data is assumed to be normally distributed, and normal priors are placed on the regression coefficients. The resulting analysis is similar to the basic cases of independent identically distributed data. The formulas for the non-linear-regression cases are summarized in the conjugate prior article.


Sum of two quadratics


= Scalar form

= The following auxiliary formula is useful for simplifying the posterior distribution, posterior update equations, which otherwise become fairly tedious. :a(x-y)^2 + b(x-z)^2 = (a + b)\left(x - \frac\right)^2 + \frac(y-z)^2 This equation rewrites the sum of two quadratics in ''x'' by expanding the squares, grouping the terms in ''x'', and completing the square. Note the following about the complex constant factors attached to some of the terms: # The factor \frac has the form of a weighted average of ''y'' and ''z''. # \frac = \frac = (a^ + b^)^. This shows that this factor can be thought of as resulting from a situation where the Multiplicative inverse, reciprocals of quantities ''a'' and ''b'' add directly, so to combine ''a'' and ''b'' themselves, it's necessary to reciprocate, add, and reciprocate the result again to get back into the original units. This is exactly the sort of operation performed by the harmonic mean, so it is not surprising that \frac is one-half the harmonic mean of ''a'' and ''b''.


= Vector form

= A similar formula can be written for the sum of two vector quadratics: If x, y, z are vectors of length ''k'', and A and B are symmetric matrix, symmetric, invertible matrices of size k\times k, then : \begin & (\mathbf-\mathbf)'\mathbf(\mathbf-\mathbf) + (\mathbf-\mathbf)' \mathbf(\mathbf-\mathbf) \\ = & (\mathbf - \mathbf)'(\mathbf+\mathbf)(\mathbf - \mathbf) + (\mathbf - \mathbf)'(\mathbf^ + \mathbf^)^(\mathbf - \mathbf) \end where :\mathbf = (\mathbf + \mathbf)^(\mathbf\mathbf + \mathbf \mathbf) Note that the form x′ A x is called a
quadratic form In mathematics, a quadratic form is a polynomial with terms all of degree two ("form" is another name for a homogeneous polynomial). For example, :4x^2 + 2xy - 3y^2 is a quadratic form in the variables and . The coefficients usually belong to a ...
and is a scalar (mathematics), scalar: :\mathbf'\mathbf\mathbf = \sum_a_ x_i x_j In other words, it sums up all possible combinations of products of pairs of elements from x, with a separate coefficient for each. In addition, since x_i x_j = x_j x_i, only the sum a_ + a_ matters for any off-diagonal elements of A, and there is no loss of generality in assuming that A is symmetric matrix, symmetric. Furthermore, if A is symmetric, then the form \mathbf'\mathbf\mathbf = \mathbf'\mathbf\mathbf.


Sum of differences from the mean

Another useful formula is as follows: \sum_^n (x_i-\mu)^2 = \sum_^n (x_i-\bar)^2 + n(\bar -\mu)^2 where \bar = \frac \sum_^n x_i.


With known variance

For a set of i.i.d. normally distributed data points X of size ''n'' where each individual point ''x'' follows x \sim \mathcal(\mu, \sigma^2) with known
variance In probability theory and statistics, variance is the expectation of the squared deviation of a random variable from its population mean or sample mean. Variance is a measure of dispersion, meaning it is a measure of how far a set of numbers ...
σ2, the conjugate prior distribution is also normally distributed. This can be shown more easily by rewriting the variance as the
precision Precision, precise or precisely may refer to: Science, and technology, and mathematics Mathematics and computing (general) * Accuracy and precision, measurement deviation from true value and its scatter * Significant figures, the number of digit ...
, i.e. using τ = 1/σ2. Then if x \sim \mathcal(\mu, 1/\tau) and \mu \sim \mathcal(\mu_0, 1/\tau_0), we proceed as follows. First, the likelihood function is (using the formula above for the sum of differences from the mean): :\begin p(\mathbf\mid\mu,\tau) &= \prod_^n \sqrt \exp\left(-\frac\tau(x_i-\mu)^2\right) \\ &= \left(\frac\right)^ \exp\left(-\frac\tau \sum_^n (x_i-\mu)^2\right) \\ &= \left(\frac\right)^ \exp\left[-\frac\tau \left(\sum_^n(x_i-\bar)^2 + n(\bar -\mu)^2\right)\right]. \end Then, we proceed as follows: :\begin p(\mu\mid\mathbf) &\propto p(\mathbf\mid\mu) p(\mu) \\ & = \left(\frac\right)^ \exp\left[-\frac\tau \left(\sum_^n(x_i-\bar)^2 + n(\bar -\mu)^2\right)\right] \sqrt \exp\left(-\frac\tau_0(\mu-\mu_0)^2\right) \\ &\propto \exp\left(-\frac\left(\tau\left(\sum_^n(x_i-\bar)^2 + n(\bar -\mu)^2\right) + \tau_0(\mu-\mu_0)^2\right)\right) \\ &\propto \exp\left(-\frac \left(n\tau(\bar-\mu)^2 + \tau_0(\mu-\mu_0)^2 \right)\right) \\ &= \exp\left(-\frac(n\tau + \tau_0)\left(\mu - \dfrac\right)^2 + \frac(\bar - \mu_0)^2\right) \\ &\propto \exp\left(-\frac(n\tau + \tau_0)\left(\mu - \dfrac\right)^2\right) \end In the above derivation, we used the formula above for the sum of two quadratics and eliminated all constant factors not involving ''μ''. The result is the kernel (statistics), kernel of a normal distribution, with mean \frac and precision n\tau + \tau_0, i.e. :p(\mu\mid\mathbf) \sim \mathcal\left(\frac, \frac\right) This can be written as a set of Bayesian update equations for the posterior parameters in terms of the prior parameters: :\begin \tau_0' &= \tau_0 + n\tau \\[5pt] \mu_0' &= \frac \\[5pt] \bar &= \frac\sum_^n x_i \end That is, to combine ''n'' data points with total precision of ''nτ'' (or equivalently, total variance of ''n''/''σ''2) and mean of values \bar, derive a new total precision simply by adding the total precision of the data to the prior total precision, and form a new mean through a ''precision-weighted average'', i.e. a weighted average of the data mean and the prior mean, each weighted by the associated total precision. This makes logical sense if the precision is thought of as indicating the certainty of the observations: In the distribution of the posterior mean, each of the input components is weighted by its certainty, and the certainty of this distribution is the sum of the individual certainties. (For the intuition of this, compare the expression "the whole is (or is not) greater than the sum of its parts". In addition, consider that the knowledge of the posterior comes from a combination of the knowledge of the prior and likelihood, so it makes sense that we are more certain of it than of either of its components.) The above formula reveals why it is more convenient to do Bayesian analysis of conjugate priors for the normal distribution in terms of the precision. The posterior precision is simply the sum of the prior and likelihood precisions, and the posterior mean is computed through a precision-weighted average, as described above. The same formulas can be written in terms of variance by reciprocating all the precisions, yielding the more ugly formulas :\begin ' &= \frac \\[5pt] \mu_0' &= \frac \\[5pt] \bar &= \frac\sum_^n x_i \end


With known mean

For a set of i.i.d. normally distributed data points X of size ''n'' where each individual point ''x'' follows x \sim \mathcal(\mu, \sigma^2) with known mean μ, the conjugate prior of the
variance In probability theory and statistics, variance is the expectation of the squared deviation of a random variable from its population mean or sample mean. Variance is a measure of dispersion, meaning it is a measure of how far a set of numbers ...
has an inverse gamma distribution or a scaled inverse chi-squared distribution. The two are equivalent 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. The prior for σ2 is as follows: :p(\sigma^2\mid\nu_0,\sigma_0^2) = \frac~\frac \propto \frac The likelihood function from above, written in terms of the variance, is: :\begin p(\mathbf\mid\mu,\sigma^2) &= \left(\frac\right)^ \exp\left[-\frac \sum_^n (x_i-\mu)^2\right] \\ &= \left(\frac\right)^ \exp\left[-\frac\right] \end where :S = \sum_^n (x_i-\mu)^2. Then: :\begin p(\sigma^2\mid\mathbf) &\propto p(\mathbf\mid\sigma^2) p(\sigma^2) \\ &= \left(\frac\right)^ \exp\left[-\frac\right] \frac~\frac \\ &\propto \left(\frac\right)^ \frac \exp\left[-\frac + \frac\right] \\ &= \frac \exp\left[-\frac\right] \end The above is also a scaled inverse chi-squared distribution where :\begin \nu_0' &= \nu_0 + n \\ \nu_0'' &= \nu_0 \sigma_0^2 + \sum_^n (x_i-\mu)^2 \end or equivalently :\begin \nu_0' &= \nu_0 + n \\ ' &= \frac \end Reparameterizing in terms of an inverse gamma distribution, the result is: :\begin \alpha' &= \alpha + \frac \\ \beta' &= \beta + \frac \end


With unknown mean and unknown variance

For a set of i.i.d. normally distributed data points X of size ''n'' where each individual point ''x'' follows x \sim \mathcal(\mu, \sigma^2) with unknown mean μ and unknown
variance In probability theory and statistics, variance is the expectation of the squared deviation of a random variable from its population mean or sample mean. Variance is a measure of dispersion, meaning it is a measure of how far a set of numbers ...
σ2, a combined (multivariate) conjugate prior is placed over the mean and variance, consisting of a normal-inverse-gamma distribution. Logically, this originates as follows: # From the analysis of the case with unknown mean but known variance, we see that the update equations involve sufficient statistics computed from the data consisting of the mean of the data points and the total variance of the data points, computed in turn from the known variance divided by the number of data points. # From the analysis of the case with unknown variance but known mean, we see that the update equations involve sufficient statistics over the data consisting of the number of data points and sum of squared deviations. # Keep in mind that the posterior update values serve as the prior distribution when further data is handled. Thus, we should logically think of our priors in terms of the sufficient statistics just described, with the same semantics kept in mind as much as possible. # To handle the case where both mean and variance are unknown, we could place independent priors over the mean and variance, with fixed estimates of the average mean, total variance, number of data points used to compute the variance prior, and sum of squared deviations. Note however that in reality, the total variance of the mean depends on the unknown variance, and the sum of squared deviations that goes into the variance prior (appears to) depend on the unknown mean. In practice, the latter dependence is relatively unimportant: Shifting the actual mean shifts the generated points by an equal amount, and on average the squared deviations will remain the same. This is not the case, however, with the total variance of the mean: As the unknown variance increases, the total variance of the mean will increase proportionately, and we would like to capture this dependence. # This suggests that we create a ''conditional prior'' of the mean on the unknown variance, with a hyperparameter specifying the mean of the pseudo-observations associated with the prior, and another parameter specifying the number of pseudo-observations. This number serves as a scaling parameter on the variance, making it possible to control the overall variance of the mean relative to the actual variance parameter. The prior for the variance also has two hyperparameters, one specifying the sum of squared deviations of the pseudo-observations associated with the prior, and another specifying once again the number of pseudo-observations. Note that each of the priors has a hyperparameter specifying the number of pseudo-observations, and in each case this controls the relative variance of that prior. These are given as two separate hyperparameters so that the variance (aka the confidence) of the two priors can be controlled separately. # This leads immediately to the normal-inverse-gamma distribution, which is the product of the two distributions just defined, with conjugate priors used (an inverse gamma distribution over the variance, and a normal distribution over the mean, ''conditional'' on the variance) and with the same four parameters just defined. The priors are normally defined as follows: :\begin p(\mu\mid\sigma^2; \mu_0, n_0) &\sim \mathcal(\mu_0,\sigma^2/n_0) \\ p(\sigma^2; \nu_0,\sigma_0^2) &\sim I\chi^2(\nu_0,\sigma_0^2) = IG(\nu_0/2, \nu_0\sigma_0^2/2) \end The update equations can be derived, and look as follows: :\begin \bar &= \frac 1 n \sum_^n x_i \\ \mu_0' &= \frac \\ n_0' &= n_0 + n \\ \nu_0' &= \nu_0 + n \\ \nu_0'' &= \nu_0 \sigma_0^2 + \sum_^n (x_i-\bar)^2 + \frac(\mu_0 - \bar)^2 \end The respective numbers of pseudo-observations add the number of actual observations to them. The new mean hyperparameter is once again a weighted average, this time weighted by the relative numbers of observations. Finally, the update for \nu_0'' is similar to the case with known mean, but in this case the sum of squared deviations is taken with respect to the observed data mean rather than the true mean, and as a result a new "interaction term" needs to be added to take care of the additional error source stemming from the deviation between prior and data mean.


Occurrence and applications

The occurrence of normal distribution in practical problems can be loosely classified into four categories: # Exactly normal distributions; # Approximately normal laws, for example when such approximation is justified by the
central limit theorem In probability theory, the central limit theorem (CLT) establishes that, in many situations, when independent random variables are summed up, their properly normalized sum tends toward a normal distribution even if the original variables themselv ...
; and # Distributions modeled as normal – the normal distribution being the distribution with Principle of maximum entropy, maximum entropy for a given mean and variance. # Regression problems – the normal distribution being found after systematic effects have been modeled sufficiently well.


Exact normality

Certain quantities in physics are distributed normally, as was first demonstrated by James Clerk Maxwell. Examples of such quantities are: * Probability density function of a ground state in a quantum harmonic oscillator. * The position of a particle that experiences diffusion. If initially the particle is located at a specific point (that is its probability distribution is the Dirac delta function), then after time ''t'' its location is described by a normal distribution with variance ''t'', which satisfies the diffusion equation \frac f(x,t) = \frac \frac f(x,t). If the initial location is given by a certain density function g(x), then the density at time ''t'' is the convolution of ''g'' and the normal PDF.


Approximate normality

''Approximately'' normal distributions occur in many situations, as explained by the
central limit theorem In probability theory, the central limit theorem (CLT) establishes that, in many situations, when independent random variables are summed up, their properly normalized sum tends toward a normal distribution even if the original variables themselv ...
. When the outcome is produced by many small effects acting ''additively and independently'', its distribution will be close to normal. The normal approximation will not be valid if the effects act multiplicatively (instead of additively), or if there is a single external influence that has a considerably larger magnitude than the rest of the effects. * In counting problems, where the central limit theorem includes a discrete-to-continuum approximation and where Infinite divisibility, infinitely divisible and Indecomposable distribution, decomposable distributions are involved, such as ** binomial distribution, Binomial random variables, associated with binary response variables; ** Poisson distribution, Poisson random variables, associated with rare events; * Thermal radiation has a Bose–Einstein statistics, Bose–Einstein distribution on very short time scales, and a normal distribution on longer timescales due to the central limit theorem.


Assumed normality

There are statistical methods to empirically test that assumption; see the above #Normality tests, Normality tests section. * In biology, the ''logarithm'' of various variables tend to have a normal distribution, that is, they tend to have a
log-normal distribution In probability theory, a log-normal (or lognormal) distribution is a continuous probability distribution of a random variable whose logarithm is normally distributed. Thus, if the random variable is log-normally distributed, then has a normal ...
(after separation on male/female subpopulations), with examples including: ** Measures of size of living tissue (length, height, skin area, weight); ** The ''length'' of ''inert'' appendages (hair, claws, nails, teeth) of biological specimens, ''in the direction of growth''; presumably the thickness of tree bark also falls under this category; ** Certain physiological measurements, such as blood pressure of adult humans. * In finance, in particular the Black–Scholes model, changes in the ''logarithm'' of exchange rates, price indices, and stock market indices are assumed normal (these variables behave like compound interest, not like simple interest, and so are multiplicative). Some mathematicians such as Benoit Mandelbrot have argued that Levy skew alpha-stable distribution, log-Levy distributions, which possesses heavy tails would be a more appropriate model, in particular for the analysis for stock market crashes. The use of the assumption of normal distribution occurring in financial models has also been criticized by Nassim Nicholas Taleb in his works. * Propagation of uncertainty, Measurement errors in physical experiments are often modeled by a normal distribution. This use of a normal distribution does not imply that one is assuming the measurement errors are normally distributed, rather using the normal distribution produces the most conservative predictions possible given only knowledge about the mean and variance of the errors. * In Standardized testing (statistics), standardized testing, results can be made to have a normal distribution by either selecting the number and difficulty of questions (as in the Intelligence quotient, IQ test) or transforming the raw test scores into "output" scores by fitting them to the normal distribution. For example, the SAT's traditional range of 200–800 is based on a normal distribution with a mean of 500 and a standard deviation of 100. * Many scores are derived from the normal distribution, including percentile ranks ("percentiles" or "quantiles"), normal curve equivalents, stanines, Standard score, z-scores, and T-scores. Additionally, some behavioral statistical procedures assume that scores are normally distributed; for example, Student's t-test, t-tests and Analysis of variance, ANOVAs. Bell curve grading assigns relative grades based on a normal distribution of scores. * In hydrology the distribution of long duration river discharge or rainfall, e.g. monthly and yearly totals, is often thought to be practically normal according to the
central limit theorem In probability theory, the central limit theorem (CLT) establishes that, in many situations, when independent random variables are summed up, their properly normalized sum tends toward a normal distribution even if the original variables themselv ...
. The blue picture, made with CumFreq, illustrates an example of fitting the normal distribution to ranked October rainfalls showing the 90% confidence belt based on the
binomial distribution In probability theory and statistics, the binomial distribution with parameters ''n'' and ''p'' is the discrete probability distribution of the number of successes in a sequence of ''n'' independent experiments, each asking a yes–no quest ...
. The rainfall data are represented by plotting positions as part of the cumulative frequency analysis.


Methodological problems and peer review

John Ioannidis argues that using normally distributed standard deviations as standards for validating research findings leave falsifiability, falsifiable predictions about phenomena that are not normally distributed untested. This includes, for example, phenomena that only appear when all necessary conditions are present and one cannot be a substitute for another in an addition-like way and phenomena that are not randomly distributed. Ioannidis argues that standard deviation-centered validation gives a false appearance of validity to hypotheses and theories where some but not all falsifiable predictions are normally distributed since the portion of falsifiable predictions that there is evidence against may and in some cases are in the non-normally distributed parts of the range of falsifiable predictions, as well as baselessly dismissing hypotheses for which none of the falsifiable predictions are normally distributed as if were they unfalsifiable when in fact they do make falsifiable predictions. It is argued by Ioannidis that many cases of mutually exclusive theories being accepted as "validated" by research journals are caused by failure of the journals to take in empirical falsifications of non-normally distributed predictions, and not because mutually exclusive theories are true, which they cannot be, although two mutually exclusive theories can both be wrong and a third one correct.


Computational methods


Generating values from normal distribution

In computer simulations, especially in applications of the Monte-Carlo method, it is often desirable to generate values that are normally distributed. The algorithms listed below all generate the standard normal deviates, since a can be generated as , where ''Z'' is standard normal. All these algorithms rely on the availability of a random number generator ''U'' capable of producing Uniform distribution (continuous), uniform random variates. * The most straightforward method is based on the probability integral transform property: if ''U'' is distributed uniformly on (0,1), then Φ−1(''U'') will have the standard normal distribution. The drawback of this method is that it relies on calculation of the
probit function In probability theory and statistics, the probit function is the quantile function associated with the standard normal distribution. It has applications in data analysis and machine learning, in particular exploratory statistical graphics and ...
Φ−1, which cannot be done analytically. Some approximate methods are described in and in the error function, erf article. Wichura gives a fast algorithm for computing this function to 16 decimal places, which is used by R programming language, R to compute random variates of the normal distribution. * Irwin–Hall distribution#Approximating a Normal distribution, An easy-to-program approximate approach that relies on the
central limit theorem In probability theory, the central limit theorem (CLT) establishes that, in many situations, when independent random variables are summed up, their properly normalized sum tends toward a normal distribution even if the original variables themselv ...
is as follows: generate 12 uniform ''U''(0,1) deviates, add them all up, and subtract 6 – the resulting random variable will have approximately standard normal distribution. In truth, the distribution will be Irwin–Hall distribution, Irwin–Hall, which is a 12-section eleventh-order polynomial approximation to the normal distribution. This random deviate will have a limited range of (−6, 6). Note that in a true normal distribution, only 0.00034% of all samples will fall outside ±6σ. * The Box–Muller transform, Box–Muller method uses two independent random numbers ''U'' and ''V'' distributed uniform distribution (continuous), uniformly on (0,1). Then the two random variables ''X'' and ''Y'' X = \sqrt \, \cos(2 \pi V) , \qquad Y = \sqrt \, \sin(2 \pi V) . will both have the standard normal distribution, and will be
independent Independent or Independents may refer to: Arts, entertainment, and media Artist groups * Independents (artist group), a group of modernist painters based in the New Hope, Pennsylvania, area of the United States during the early 1930s * Independ ...
. This formulation arises because for a bivariate normal random vector (''X'', ''Y'') the squared norm will have the
chi-squared distribution In probability theory and statistics, the chi-squared distribution (also chi-square or \chi^2-distribution) with k degrees of freedom is the distribution of a sum of the squares of k independent standard normal random variables. The chi-squa ...
with two degrees of freedom, which is an easily generated exponential distribution, exponential random variable corresponding to the quantity −2ln(''U'') in these equations; and the angle is distributed uniformly around the circle, chosen by the random variable ''V''. * The Marsaglia polar method is a modification of the Box–Muller method which does not require computation of the sine and cosine functions. In this method, ''U'' and ''V'' are drawn from the uniform (−1,1) distribution, and then is computed. If ''S'' is greater or equal to 1, then the method starts over, otherwise the two quantities X = U\sqrt, \qquad Y = V\sqrt are returned. Again, ''X'' and ''Y'' are independent, standard normal random variables. * The Ratio method is a rejection method. The algorithm proceeds as follows: ** Generate two independent uniform deviates ''U'' and ''V''; ** Compute ''X'' = (''V'' − 0.5)/''U''; ** Optional: if ''X''2 ≤ 5 − 4''e''1/4''U'' then accept ''X'' and terminate algorithm; ** Optional: if ''X''2 ≥ 4''e''−1.35/''U'' + 1.4 then reject ''X'' and start over from step 1; ** If ''X''2 ≤ −4 ln''U'' then accept ''X'', otherwise start over the algorithm. *:The two optional steps allow the evaluation of the logarithm in the last step to be avoided in most cases. These steps can be greatly improved so that the logarithm is rarely evaluated. * The ziggurat algorithm is faster than the Box–Muller transform and still exact. In about 97% of all cases it uses only two random numbers, one random integer and one random uniform, one multiplication and an if-test. Only in 3% of the cases, where the combination of those two falls outside the "core of the ziggurat" (a kind of rejection sampling using logarithms), do exponentials and more uniform random numbers have to be employed. * Integer arithmetic can be used to sample from the standard normal distribution. This method is exact in the sense that it satisfies the conditions of ''ideal approximation''; i.e., it is equivalent to sampling a real number from the standard normal distribution and rounding this to the nearest representable floating point number. * There is also some investigation into the connection between the fast Hadamard transform and the normal distribution, since the transform employs just addition and subtraction and by the central limit theorem random numbers from almost any distribution will be transformed into the normal distribution. In this regard a series of Hadamard transforms can be combined with random permutations to turn arbitrary data sets into a normally distributed data.


Numerical approximations for the normal CDF and normal quantile function

The standard normal cumulative distribution function, CDF is widely used in scientific and statistical computing. The values Φ(''x'') may be approximated very accurately by a variety of methods, such as numerical integration, Taylor series, asymptotic series and Gauss's continued fraction#Of Kummer's confluent hypergeometric function, continued fractions. Different approximations are used depending on the desired level of accuracy. * give the approximation for Φ(''x'') for ''x > 0'' with the absolute error (algorith
26.2.17
: \Phi(x) = 1 - \varphi(x)\left(b_1 t + b_2 t^2 + b_3t^3 + b_4 t^4 + b_5 t^5\right) + \varepsilon(x), \qquad t = \frac, where ''ϕ''(''x'') is the standard normal PDF, and ''b''0 = 0.2316419, ''b''1 = 0.319381530, ''b''2 = −0.356563782, ''b''3 = 1.781477937, ''b''4 = −1.821255978, ''b''5 = 1.330274429. * lists some dozens of approximations – by means of rational functions, with or without exponentials – for the function. His algorithms vary in the degree of complexity and the resulting precision, with maximum absolute precision of 24 digits. An algorithm by combines Hart's algorithm 5666 with a continued fraction approximation in the tail to provide a fast computation algorithm with a 16-digit precision. * after recalling Hart68 solution is not suited for erf, gives a solution for both erf and erfc, with maximal relative error bound, via rational function, Rational Chebyshev Approximation. * suggested a simple algorithm based on the Taylor series expansion \Phi(x) = \frac12 + \varphi(x)\left( x + \frac 3 + \frac + \frac + \frac + \cdots \right) for calculating with arbitrary precision. The drawback of this algorithm is comparatively slow calculation time (for example it takes over 300 iterations to calculate the function with 16 digits of precision when ). * The GNU Scientific Library calculates values of the standard normal CDF using Hart's algorithms and approximations with Chebyshev polynomials. Shore (1982) introduced simple approximations that may be incorporated in stochastic optimization models of engineering and operations research, like reliability engineering and inventory analysis. Denoting , the simplest approximation for the quantile function is: z = \Phi^(p)=5.5556\left[1- \left( \frac p \right)^\right],\qquad p\ge 1/2 This approximation delivers for ''z'' a maximum absolute error of 0.026 (for , corresponding to ). For replace ''p'' by and change sign. Another approximation, somewhat less accurate, is the single-parameter approximation: z=-0.4115\left\, \qquad p\ge 1/2 The latter had served to derive a simple approximation for the loss integral of the normal distribution, defined by \begin L(z) & =\int_z^\infty (u-z)\varphi(u) \, du=\int_z^\infty [1-\Phi (u)] \, du \\[5pt] L(z) & \approx \begin 0.4115\left(\dfrac p \right) - z, & p<1/2, \\ \\ 0.4115\left( \dfrac p \right), & p\ge 1/2. \end \\[5pt] \text \\ L(z) & \approx \begin 0.4115\left\, & p < 1/2, \\ \\ 0.4115 \dfrac p, & p\ge 1/2. \end \end This approximation is particularly accurate for the right far-tail (maximum error of 10−3 for z≥1.4). Highly accurate approximations for the CDF, based on Response modeling methodology, Response Modeling Methodology (RMM, Shore, 2011, 2012), are shown in Shore (2005). Some more approximations can be found at: Error function#Approximation with elementary functions. In particular, small ''relative'' error on the whole domain for the CDF \Phi and the quantile function \Phi^ as well, is achieved via an explicitly invertible formula by Sergei Winitzki in 2008.


History


Development

Some authors attribute the credit for the discovery of the normal distribution to Abraham de Moivre, de Moivre, who in 1738 published in the second edition of his "''The Doctrine of Chances''" the study of the coefficients in the binomial expansion of . De Moivre proved that the middle term in this expansion has the approximate magnitude of 2^n/\sqrt, and that "If ''m'' or ''n'' be a Quantity infinitely great, then the Logarithm of the Ratio, which a Term distant from the middle by the Interval ''ℓ'', has to the middle Term, is -\frac." Although this theorem can be interpreted as the first obscure expression for the normal probability law, Stephen Stigler, Stigler points out that de Moivre himself did not interpret his results as anything more than the approximate rule for the binomial coefficients, and in particular de Moivre lacked the concept of the probability density function. In 1823 Carl Friedrich Gauss, Gauss published his monograph "''Theoria combinationis observationum erroribus minimis obnoxiae''" where among other things he introduces several important statistical concepts, such as the method of least squares, the method of maximum likelihood, and the ''normal distribution''. Gauss used ''M'', , to denote the measurements of some unknown quantity ''V'', and sought the "most probable" estimator of that quantity: the one that maximizes the probability of obtaining the observed experimental results. In his notation φΔ is the probability density function of the measurement errors of magnitude Δ. Not knowing what the function ''φ'' is, Gauss requires that his method should reduce to the well-known answer: the arithmetic mean of the measured values. Starting from these principles, Gauss demonstrates that the only law that rationalizes the choice of arithmetic mean as an estimator of the location parameter, is the normal law of errors: \varphi\mathit = \frac h \, e^, where ''h'' is "the measure of the precision of the observations". Using this normal law as a generic model for errors in the experiments, Gauss formulates what is now known as the non-linear least squares, non-linear weighted least squares method. Although Gauss was the first to suggest the normal distribution law, Pierre Simon de Laplace, Laplace made significant contributions. It was Laplace who first posed the problem of aggregating several observations in 1774, although his own solution led to the Laplacian distribution. It was Laplace who first calculated the value of the Gaussian integral, integral in 1782, providing the normalization constant for the normal distribution. Finally, it was Laplace who in 1810 proved and presented to the Academy the fundamental
central limit theorem In probability theory, the central limit theorem (CLT) establishes that, in many situations, when independent random variables are summed up, their properly normalized sum tends toward a normal distribution even if the original variables themselv ...
, which emphasized the theoretical importance of the normal distribution. It is of interest to note that in 1809 an Irish-American mathematician Robert Adrain published two insightful but flawed derivations of the normal probability law, simultaneously and independently from Gauss. His works remained largely unnoticed by the scientific community, until in 1871 they were exhumed by Cleveland Abbe, Abbe. In the middle of the 19th century James Clerk Maxwell, Maxwell demonstrated that the normal distribution is not just a convenient mathematical tool, but may also occur in natural phenomena: "The number of particles whose velocity, resolved in a certain direction, lies between ''x'' and ''x'' + ''dx'' is \operatorname \frac\; e^ \, dx


Naming

Today, the concept is usually known in English as the normal distribution or Gaussian distribution. Other less common names include Gauss distribution, Laplace-Gauss distribution, the law of error, the law of facility of errors, Laplace's second law, Gaussian law. Gauss himself apparently coined the term with reference to the "normal equations" involved in its applications, with normal having its technical meaning of orthogonal rather than "usual". However, by the end of the 19th century some authors had started using the name ''normal distribution'', where the word "normal" was used as an adjective – the term now being seen as a reflection of the fact that this distribution was seen as typical, common – and thus "normal". Charles Sanders Peirce, Peirce (one of those authors) once defined "normal" thus: "...the 'normal' is not the average (or any other kind of mean) of what actually occurs, but of what ''would'', in the long run, occur under certain circumstances." Around the turn of the 20th century Karl Pearson, Pearson popularized the term ''normal'' as a designation for this distribution. Also, it was Pearson who first wrote the distribution in terms of the standard deviation ''σ'' as in modern notation. Soon after this, in year 1915, Ronald Fisher, Fisher added the location parameter to the formula for normal distribution, expressing it in the way it is written nowadays: df = \frac e^ \, dx. The term "standard normal", which denotes the normal distribution with zero mean and unit variance came into general use around the 1950s, appearing in the popular textbooks by P. G. Hoel (1947) "''Introduction to mathematical statistics''" and A. M. Mood (1950) "''Introduction to the theory of statistics''".


See also

* Bates distribution – similar to the Irwin–Hall distribution, but rescaled back into the 0 to 1 range * Behrens–Fisher problem – the long-standing problem of testing whether two normal samples with different variances have same means; * Bhattacharyya distance – method used to separate mixtures of normal distributions * Erdős–Kac theorem – on the occurrence of the normal distribution in number theory * Full width at half maximum * Gaussian blur – convolution, which uses the normal distribution as a kernel * Modified half-normal distribution with the pdf on (0, \infty) is given as f(x)= \frac, where \Psi(\alpha,z)=_1\Psi_1\left(\begin\left(\alpha,\frac\right)\\(1,0)\end;z \right) denotes the Fox-Wright Psi function. * Normally distributed and uncorrelated does not imply independent * Ratio normal distribution * Reciprocal normal distribution * Standard normal table * Stein's lemma * Sub-Gaussian distribution * Sum of normally distributed random variables * Tweedie distribution – The normal distribution is a member of the family of Tweedie exponential dispersion models. * Wrapped normal distribution – the Normal distribution applied to a circular domain * Z-test – using the normal distribution


Notes


References


Citations


Sources

* * In particular, the entries fo
"bell-shaped and bell curve"
an

* * * * * * * * * * * * * * * * * * * * * * * * Translated by Stephen M. Stigler in ''Statistical Science'' 1 (3), 1986: . * * * * * * * * * * * * * * * * * * * * * * * * * * * *


External links

*
Normal distribution calculator
{{Authority control Normal distribution, Continuous distributions Conjugate prior distributions Exponential family distributions Stable distributions Location-scale family probability distributions]">X - \mu, ^p\right&= \sigma^p (p-1)!! \cdot \begin \sqrt & \textp\text \\ 1 & \textp\text \end \\ &= \sigma^p \cdot \frac. \end The last formula is valid also for any non-integer p>-1. When the mean \mu \ne 0, the plain and absolute moments can be expressed in terms of
confluent hypergeometric function In mathematics, a confluent hypergeometric function is a solution of a confluent hypergeometric equation, which is a degenerate form of a hypergeometric differential equation where two of the three regular singularities merge into an irregular ...
s _1F_1 and U. :\begin \operatorname\left ^p\right&= \sigma^p\cdot (-i\sqrt 2)^p U\left(-\frac, \frac, -\frac \left( \frac \mu \sigma \right)^2 \right), \\ \operatorname\left Hermite polynomials#"Negative variance", generalized Hermite polynomials. The expectation of X conditioned on the event that X lies in an interval ,b/math> is given by :\operatorname\left \mid a= \mu - \sigma^2\frac where f and F respectively are the density and the cumulative distribution function of X. For b=\infty this is known as the
inverse Mills ratio In probability theory, the Mills ratio (or Mills's ratio) of a continuous random variable X is the function : m(x) := \frac , where f(x) is the probability density function, and :\bar(x) := \Pr x.html" ;"title=">x">>x= \int_x^ f(u)\, du is the ...
. Note that above, density f of X is used instead of standard normal density as in inverse Mills ratio, so here we have \sigma^2 instead of \sigma.


Fourier transform and characteristic function

The
Fourier transform A Fourier transform (FT) is a mathematical transform that decomposes functions into frequency components, which are represented by the output of the transform as a function of frequency. Most commonly functions of time or space are transformed, ...
of a normal density f with mean \mu and standard deviation \sigma is : \hat f(t) = \int_^\infty f(x)e^ \, dx = e^ e^ where i is the
imaginary unit The imaginary unit or unit imaginary number () is a solution to the quadratic equation x^2+1=0. Although there is no real number with this property, can be used to extend the real numbers to what are called complex numbers, using addition an ...
. If the mean \mu=0, the first factor is 1, and the Fourier transform is, apart from a constant factor, a normal density on the
frequency domain In physics, electronics, control systems engineering, and statistics, the frequency domain refers to the analysis of mathematical functions or signals with respect to frequency, rather than time. Put simply, a time-domain graph shows how a signa ...
, with mean 0 and standard deviation 1/\sigma. In particular, the standard normal distribution \varphi is an
eigenfunction In mathematics, an eigenfunction of a linear operator ''D'' defined on some function space is any non-zero function f in that space that, when acted upon by ''D'', is only multiplied by some scaling factor called an eigenvalue. As an equation, th ...
of the Fourier transform. In probability theory, the Fourier transform of the probability distribution of a real-valued random variable X is closely connected to the
characteristic function In mathematics, the term "characteristic function" can refer to any of several distinct concepts: * The indicator function of a subset, that is the function ::\mathbf_A\colon X \to \, :which for a given subset ''A'' of ''X'', has value 1 at points ...
\varphi_X(t) of that variable, which is defined as the
expected value In probability theory, the expected value (also called expectation, expectancy, mathematical expectation, mean, average, or first moment) is a generalization of the weighted average. Informally, the expected value is the arithmetic mean of a l ...
of e^, as a function of the real variable t (the
frequency Frequency is the number of occurrences of a repeating event per unit of time. It is also occasionally referred to as ''temporal frequency'' for clarity, and is distinct from ''angular frequency''. Frequency is measured in hertz (Hz) which is eq ...
parameter of the Fourier transform). This definition can be analytically extended to a complex-value variable t. The relation between both is: :\varphi_X(t) = \hat f(-t)


Moment and cumulant generating functions

The
moment generating function In probability theory and statistics, the moment-generating function of a real-valued random variable is an alternative specification of its probability distribution. Thus, it provides the basis of an alternative route to analytical results compare ...
of a real random variable X is the expected value of e^, as a function of the real parameter t. For a normal distribution with density f, mean \mu and deviation \sigma, the moment generating function exists and is equal to :M(t) = \operatorname ^= \hat f(it) = e^ e^ The
cumulant generating function In probability theory and statistics, the cumulants of a probability distribution are a set of quantities that provide an alternative to the '' moments'' of the distribution. Any two probability distributions whose moments are identical will have ...
is the logarithm of the moment generating function, namely :g(t) = \ln M(t) = \mu t + \tfrac 12 \sigma^2 t^2 Since this is a quadratic polynomial in t, only the first two
cumulant In probability theory and statistics, the cumulants of a probability distribution are a set of quantities that provide an alternative to the '' moments'' of the distribution. Any two probability distributions whose moments are identical will ha ...
s are nonzero, namely the mean \mu and the variance \sigma^2.


Stein operator and class

Within
Stein's method Stein's method is a general method in probability theory to obtain bounds on the distance between two probability distributions with respect to a probability metric. It was introduced by Charles Stein, who first published it in 1972, to obtain ...
the Stein operator and class of a random variable X \sim \mathcal(\mu, \sigma^2) are \mathcalf(x) = \sigma^2 f'(x) - (x-\mu)f(x) and \mathcal the class of all absolutely continuous functions f : \R \to \R \mbox\mathbb[, f'(X), ]< \infty.


Zero-variance limit

In the limit (mathematics), limit when \sigma tends to zero, the probability density f(x) eventually tends to zero at any x\ne \mu, but grows without limit if x = \mu, while its integral remains equal to 1. Therefore, the normal distribution cannot be defined as an ordinary
function Function or functionality may refer to: Computing * Function key, a type of key on computer keyboards * Function model, a structured representation of processes in a system * Function object or functor or functionoid, a concept of object-oriente ...
when \sigma = 0. However, one can define the normal distribution with zero variance as a
generalized function In mathematics, generalized functions are objects extending the notion of functions. There is more than one recognized theory, for example the theory of distributions. Generalized functions are especially useful in making discontinuous functions ...
; specifically, as Dirac's "delta function" \delta translated by the mean \mu, that is f(x)=\delta(x-\mu). Its CDF is then the
Heaviside step function The Heaviside step function, or the unit step function, usually denoted by or (but sometimes , or ), is a step function, named after Oliver Heaviside (1850–1925), the value of which is zero for negative arguments and one for positive argume ...
translated by the mean \mu, namely :F(x) = \begin 0 & \textx < \mu \\ 1 & \textx \geq \mu \end


Maximum entropy

Of all probability distributions over the reals with a specified mean \mu and variance \sigma^2, the normal distribution N(\mu,\sigma^2) is the one with maximum entropy. If X is a
continuous random variable In probability theory and statistics, a probability distribution is the mathematical function that gives the probabilities of occurrence of different possible outcomes for an experiment. It is a mathematical description of a random phenomenon i ...
with
probability density In probability theory, a probability density function (PDF), or density of a continuous random variable, is a function whose value at any given sample (or point) in the sample space (the set of possible values taken by the random variable) can ...
f(x), then the entropy of X is defined as : H(X) = - \int_^\infty f(x)\log f(x)\, dx where f(x)\log f(x) is understood to be zero whenever f(x)=0. This functional can be maximized, subject to the constraints that the distribution is properly normalized and has a specified variance, by using
variational calculus The calculus of variations (or Variational Calculus) is a field of mathematical analysis that uses variations, which are small changes in functions and functionals, to find maxima and minima of functionals: mappings from a set of functions t ...
. A function with two
Lagrange multipliers In mathematical optimization, the method of Lagrange multipliers is a strategy for finding the local maxima and minima of a function subject to equality constraints (i.e., subject to the condition that one or more equations have to be satisfied ex ...
is defined: : L=\int_^\infty f(x)\ln(f(x))\,dx-\lambda_0\left(1-\int_^\infty f(x)\,dx\right)-\lambda\left(\sigma^2-\int_^\infty f(x)(x-\mu)^2\,dx\right) where f(x) is, for now, regarded as some density function with mean \mu and standard deviation \sigma. At maximum entropy, a small variation \delta f(x) about f(x) will produce a variation \delta L about L which is equal to 0: : 0=\delta L=\int_^\infty \delta f(x)\left (\ln(f(x))+1+\lambda_0+\lambda(x-\mu)^2\right )\,dx Since this must hold for any small \delta f(x), the term in brackets must be zero, and solving for f(x) yields: :f(x)=e^ Using the constraint equations to solve for \lambda_0 and \lambda yields the density of the normal distribution: : f(x, \mu, \sigma)=\frace^ The entropy of a normal distribution is equal to : H(X)=\tfrac(1+\log(2\sigma^2\pi))


Other properties


Related distributions


Central limit theorem

The central limit theorem states that under certain (fairly common) conditions, the sum of many random variables will have an approximately normal distribution. More specifically, where X_1,\ldots ,X_n are
independent and identically distributed In probability theory and statistics, a collection of random variables is independent and identically distributed if each random variable has the same probability distribution as the others and all are mutually independent. This property is usua ...
random variables with the same arbitrary distribution, zero mean, and variance \sigma^2 and Z is their mean scaled by \sqrt : Z = \sqrt\left(\frac\sum_^n X_i\right) Then, as n increases, the probability distribution of Z will tend to the normal distribution with zero mean and variance \sigma^2. The theorem can be extended to variables (X_i) that are not independent and/or not identically distributed if certain constraints are placed on the degree of dependence and the moments of the distributions. Many
test statistic A test statistic is a statistic (a quantity derived from the sample) used in statistical hypothesis testing.Berger, R. L.; Casella, G. (2001). ''Statistical Inference'', Duxbury Press, Second Edition (p.374) A hypothesis test is typically specif ...
s, scores, and
estimator In statistics, an estimator is a rule for calculating an estimate of a given quantity based on observed data: thus the rule (the estimator), the quantity of interest (the estimand) and its result (the estimate) are distinguished. For example, the ...
s encountered in practice contain sums of certain random variables in 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 distributions. The central limit theorem also implies that certain distributions can be approximated by the normal distribution, for example: * The
binomial distribution In probability theory and statistics, the binomial distribution with parameters ''n'' and ''p'' is the discrete probability distribution of the number of successes in a sequence of ''n'' independent experiments, each asking a yes–no quest ...
B(n,p) is approximately normal with mean np and variance np(1-p) for large n and for p not too close to 0 or 1. * The
Poisson distribution In probability theory and statistics, the Poisson distribution is a discrete probability distribution that expresses the probability of a given number of events occurring in a fixed interval of time or space if these events occur with a known co ...
with parameter \lambda is approximately normal with mean \lambda and variance \lambda, for large values of \lambda. * The
chi-squared distribution In probability theory and statistics, the chi-squared distribution (also chi-square or \chi^2-distribution) with k degrees of freedom is the distribution of a sum of the squares of k independent standard normal random variables. The chi-squa ...
\chi^2(k) is approximately normal with mean k and variance 2k, for large k. * The
Student's t-distribution In probability and statistics, Student's ''t''-distribution (or simply the ''t''-distribution) is any member of a family of continuous probability distributions that arise when estimating the mean of a normally distributed population in sit ...
t(\nu) is approximately normal with mean 0 and variance 1 when \nu is large. Whether these approximations are sufficiently accurate depends on the purpose for which they are needed, and the rate of convergence to the normal distribution. It is typically the case that such approximations are less accurate in the tails of the distribution. A general upper bound for the approximation error in the central limit theorem is given by the
Berry–Esseen theorem In probability theory, the central limit theorem states that, under certain circumstances, the probability distribution of the scaled mean of a random sample converges to a normal distribution as the sample size increases to infinity. Under strong ...
, improvements of the approximation are given by the
Edgeworth expansion The Gram–Charlier A series (named in honor of Jørgen Pedersen Gram and Carl Charlier), and the Edgeworth series (named in honor of Francis Ysidro Edgeworth) are series that approximate a probability distribution in terms of its cumulants. The se ...
s. This theorem can also be used to justify modeling the sum of many uniform noise sources as
Gaussian noise Gaussian noise, named after Carl Friedrich Gauss, is a term from signal processing theory denoting a kind of signal noise that has a probability density function (pdf) equal to that of the normal distribution (which is also known as the Gaussia ...
. See
AWGN Additive white Gaussian noise (AWGN) is a basic noise model used in information theory to mimic the effect of many random processes that occur in nature. The modifiers denote specific characteristics: * ''Additive'' because it is added to any nois ...
.


Operations and functions of normal variables

The
probability density In probability theory, a probability density function (PDF), or density of a continuous random variable, is a function whose value at any given sample (or point) in the sample space (the set of possible values taken by the random variable) can ...
,
cumulative distribution In statistics, the frequency (or absolute frequency) of an event i is the number n_i of times the observation has occurred/recorded in an experiment or study. These frequencies are often depicted graphically or in tabular form. Types The cumul ...
, and inverse cumulative distribution of any function of one or more independent or correlated normal variables can be computed with the numerical method of ray-tracing
Matlab code
. In the following sections we look at some special cases.


Operations on a single normal variable

If X is distributed normally with mean \mu and variance \sigma^2, then * aX+b, for any real numbers a and b, is also normally distributed, with mean a\mu+b and standard deviation , a, \sigma. That is, the family of normal distributions is closed under linear transformations. * The exponential of X is distributed log-normally: . * The absolute value of X has
folded normal distribution The folded normal distribution is a probability distribution related to the normal distribution. Given a normally distributed random variable ''X'' with mean ''μ'' and variance ''σ''2, the random variable ''Y'' = , ''X'', has a folded normal d ...
: . If \mu = 0 this is known as the
half-normal distribution In probability theory and statistics, the half-normal distribution is a special case of the folded normal distribution. Let X follow an ordinary normal distribution, N(0,\sigma^2). Then, Y=, X, follows a half-normal distribution. Thus, the hal ...
. * The absolute value of normalized residuals, , ''X'' − ''μ'', /''σ'', has
chi distribution In probability theory and statistics, the chi distribution is a continuous probability distribution. It is the distribution of the positive square root of the sum of squares of a set of independent random variables each following a standard norm ...
with one degree of freedom: , X - \mu, / \sigma \sim \chi_1. * The square of ''X''/''σ'' has the
noncentral chi-squared distribution In probability theory and statistics, the noncentral chi-squared distribution (or noncentral chi-square distribution, noncentral \chi^2 distribution) is a noncentral generalization of the chi-squared distribution. It often arises in the power a ...
with one degree of freedom: X^2 / \sigma^2 \sim \chi_1^2(\mu^2 / \sigma^2). If \mu = 0, the distribution is called simply chi-squared. * The log likelihood of a normal variable x is simply the log of its
probability density function In probability theory, a probability density function (PDF), or density of a continuous random variable, is a function whose value at any given sample (or point) in the sample space (the set of possible values taken by the random variable) can ...
: \ln p(x)= -\frac \left(\frac \right)^2 -\ln \left(\sigma \sqrt \right) = -\frac z^2 -\ln \left(\sigma \sqrt \right). Since this is a scaled and shifted square of a standard normal variable, it is distributed as a scaled and shifted chi-squared variable. * The distribution of the variable ''X'' restricted to an interval 'a'', ''b''is called the
truncated normal distribution In probability and statistics, the truncated normal distribution is the probability distribution derived from that of a normally distributed random variable by bounding the random variable from either below or above (or both). The truncated no ...
. * (''X'' − ''μ'')−2 has a
Lévy distribution In probability theory and statistics, the Lévy distribution, named after Paul Lévy, is a continuous probability distribution for a non-negative random variable. In spectroscopy, this distribution, with frequency as the dependent variable, is kn ...
with location 0 and scale ''σ''−2.


= Operations on two independent normal variables

= * If X_1 and X_2 are two
independent Independent or Independents may refer to: Arts, entertainment, and media Artist groups * Independents (artist group), a group of modernist painters based in the New Hope, Pennsylvania, area of the United States during the early 1930s * Independ ...
normal random variables, with means \mu_1, \mu_2 and standard deviations \sigma_1, \sigma_2, then their sum X_1 + X_2 will also be normally distributed, roof/sup> with mean \mu_1 + \mu_2 and variance \sigma_1^2 + \sigma_2^2. * In particular, if X and Y are independent normal deviates with zero mean and variance \sigma^2, then X + Y and X - Y are also independent and normally distributed, with zero mean and variance 2\sigma^2. This is a special case of the
polarization identity In linear algebra, a branch of mathematics, the polarization identity is any one of a family of formulas that express the inner product of two vectors in terms of the norm of a normed vector space. If a norm arises from an inner product then t ...
. * If X_1, X_2 are two independent normal deviates with mean \mu and deviation \sigma, and a, b are arbitrary real numbers, then the variable X_3 = \frac + \mu is also normally distributed with mean \mu and deviation \sigma. It follows that the normal distribution is
stable A stable is a building in which livestock, especially horses, are kept. It most commonly means a building that is divided into separate stalls for individual animals and livestock. There are many different types of stables in use today; the ...
(with exponent \alpha=2).


= Operations on two independent standard normal variables

= If X_1 and X_2 are two independent standard normal random variables with mean 0 and variance 1, then * Their sum and difference is distributed normally with mean zero and variance two: X_1 \pm X_2 \sim N(0, 2). * Their product Z = X_1 X_2 follows the
product distribution A product distribution is a probability distribution constructed as the distribution of the product of random variables having two other known distributions. Given two statistically independent random variables ''X'' and ''Y'', the distribution of ...
with density function f_Z(z) = \pi^ K_0(, z, ) where K_0 is the
modified Bessel function of the second kind Bessel functions, first defined by the mathematician Daniel Bernoulli and then generalized by Friedrich Bessel, are canonical solutions of Bessel's differential equation x^2 \frac + x \frac + \left(x^2 - \alpha^2 \right)y = 0 for an arbitrary ...
. This distribution is symmetric around zero, unbounded at z = 0, and has the
characteristic function In mathematics, the term "characteristic function" can refer to any of several distinct concepts: * The indicator function of a subset, that is the function ::\mathbf_A\colon X \to \, :which for a given subset ''A'' of ''X'', has value 1 at points ...
\phi_Z(t) = (1 + t^2)^. * Their ratio follows the standard
Cauchy distribution The Cauchy distribution, named after Augustin Cauchy, is a continuous probability distribution. It is also known, especially among physicists, as the Lorentz distribution (after Hendrik Lorentz), Cauchy–Lorentz distribution, Lorentz(ian) fun ...
: X_1/ X_2 \sim \operatorname(0, 1). * Their Euclidean norm \sqrt has the
Rayleigh distribution In probability theory and statistics, the Rayleigh distribution is a continuous probability distribution for nonnegative-valued random variables. Up to rescaling, it coincides with the chi distribution with two degrees of freedom. The distribut ...
.


Operations on multiple independent normal variables

* Any linear combination of independent normal deviates is a normal deviate. * If X_1, X_2, \ldots, X_n are independent standard normal random variables, then the sum of their squares has the
chi-squared distribution In probability theory and statistics, the chi-squared distribution (also chi-square or \chi^2-distribution) with k degrees of freedom is the distribution of a sum of the squares of k independent standard normal random variables. The chi-squa ...
with n degrees of freedom X_1^2 + \cdots + X_n^2 \sim \chi_n^2. * If X_1, X_2, \ldots, X_n are independent normally distributed random variables with means \mu and variances \sigma^2, then their
sample mean The sample mean (or "empirical mean") and the sample covariance are statistics computed from a Sample (statistics), sample of data on one or more random variables. The sample mean is the average value (or mean, mean value) of a sample (statistic ...
is independent from the sample
standard deviation In statistics, the standard deviation is a measure of the amount of variation or dispersion of a set of values. A low standard deviation indicates that the values tend to be close to the mean (also called the expected value) of the set, while ...
, which can be demonstrated using Basu's theorem or
Cochran's theorem In statistics, Cochran's theorem, devised by William G. Cochran, is a theorem used to justify results relating to the probability distributions of statistics that are used in the analysis of variance. Statement Let ''U''1, ..., ''U'N'' be i.i. ...
. The ratio of these two quantities will have the
Student's t-distribution In probability and statistics, Student's ''t''-distribution (or simply the ''t''-distribution) is any member of a family of continuous probability distributions that arise when estimating the mean of a normally distributed population in sit ...
with n-1 degrees of freedom: t = \frac = \frac \sim t_. * If X_1, X_2, \ldots, X_n, Y_1, Y_2, \ldots, Y_m are independent standard normal random variables, then the ratio of their normalized sums of squares will have the with degrees of freedom: F = \frac \sim F_.


Operations on multiple correlated normal variables

* A
quadratic form In mathematics, a quadratic form is a polynomial with terms all of degree two ("form" is another name for a homogeneous polynomial). For example, :4x^2 + 2xy - 3y^2 is a quadratic form in the variables and . The coefficients usually belong to a ...
of a normal vector, i.e. a quadratic function q = \sum x_i^2 + \sum x_j + c of multiple independent or correlated normal variables, is a generalized chi-square variable.


Operations on the density function

The split normal distribution is most directly defined in terms of joining scaled sections of the density functions of different normal distributions and rescaling the density to integrate to one. The
truncated normal distribution In probability and statistics, the truncated normal distribution is the probability distribution derived from that of a normally distributed random variable by bounding the random variable from either below or above (or both). The truncated no ...
results from rescaling a section of a single density function.


Infinite divisibility and Cramér's theorem

For any positive integer \text, any normal distribution with mean \mu and variance \sigma^2 is the distribution of the sum of \text independent normal deviates, each with mean \frac and variance \frac. This property is called
infinite divisibility Infinite divisibility arises in different ways in philosophy, physics, economics, order theory (a branch of mathematics), and probability theory (also a branch of mathematics). One may speak of infinite divisibility, or the lack thereof, of matter ...
. Conversely, if X_1 and X_2 are independent random variables and their sum X_1+X_2 has a normal distribution, then both X_1 and X_2 must be normal deviates. This result is known as Cramér's decomposition theorem, and is equivalent to saying that the convolution of two distributions is normal if and only if both are normal. Cramér's theorem implies that a linear combination of independent non-Gaussian variables will never have an exactly normal distribution, although it may approach it arbitrarily closely.


Bernstein's theorem

Bernstein's theorem states that if X and Y are independent and X + Y and X - Y are also independent, then both ''X'' and ''Y'' must necessarily have normal distributions. More generally, if X_1, \ldots, X_n are independent random variables, then two distinct linear combinations \sum and \sumwill be independent if and only if all X_k are normal and \sum, where \sigma_k^2 denotes the variance of X_k.


Extensions

The notion of normal distribution, being one of the most important distributions in probability theory, has been extended far beyond the standard framework of the univariate (that is one-dimensional) case (Case 1). All these extensions are also called ''normal'' or ''Gaussian'' laws, so a certain ambiguity in names exists. * The
multivariate normal distribution In probability theory and statistics, the multivariate normal distribution, multivariate Gaussian distribution, or joint normal distribution is a generalization of the one-dimensional (univariate) normal distribution to higher dimensions. One d ...
describes the Gaussian law in the ''k''-dimensional Euclidean space. A vector is multivariate-normally distributed if any linear combination of its components has a (univariate) normal distribution. The variance of ''X'' is a ''k×k'' symmetric positive-definite matrix ''V''. The multivariate normal distribution is a special case of the
elliptical distribution In probability and statistics, an elliptical distribution is any member of a broad family of probability distributions that generalize the multivariate normal distribution. Intuitively, in the simplified two and three dimensional case, the joint di ...
s. As such, its iso-density loci in the ''k'' = 2 case are ellipses and in the case of arbitrary ''k'' are ellipsoids. * Rectified Gaussian distribution a rectified version of normal distribution with all the negative elements reset to 0 * Complex normal distribution deals with the complex normal vectors. A complex vector is said to be normal if both its real and imaginary components jointly possess a 2''k''-dimensional multivariate normal distribution. The variance-covariance structure of ''X'' is described by two matrices: the ''variance'' matrix Γ, and the ''relation'' matrix ''C''. * Matrix normal distribution describes the case of normally distributed matrices. * Gaussian processes are the normally distributed stochastic processes. These can be viewed as elements of some infinite-dimensional Hilbert space ''H'', and thus are the analogues of multivariate normal vectors for the case . A random element is said to be normal if for any constant the scalar product has a (univariate) normal distribution. The variance structure of such Gaussian random element can be described in terms of the linear ''covariance ''. Several Gaussian processes became popular enough to have their own names: ** Wiener process, Brownian motion, ** Brownian bridge, ** Ornstein–Uhlenbeck process. * Gaussian q-distribution is an abstract mathematical construction that represents a "q-analogue" of the normal distribution. * the q-Gaussian is an analogue of the Gaussian distribution, in the sense that it maximises the Tsallis entropy, and is one type of Tsallis distribution. Note that this distribution is different from the Gaussian q-distribution above. * The Kaniadakis Gaussian distribution, Kaniadakis ''κ''-Gaussian distribution is a generalization of the Gaussian distribution which arises from the Kaniadakis statistics, being one of the Kaniadakis distribution, Kaniadakis distributions. A random variable ''X'' has a two-piece normal distribution if it has a distribution : f_X( x ) = N( \mu, \sigma_1^2 ) \text x \le \mu : f_X( x ) = N( \mu, \sigma_2^2 ) \text x \ge \mu where ''μ'' is the mean and ''σ''1 and ''σ''2 are the standard deviations of the distribution to the left and right of the mean respectively. The mean, variance and third central moment of this distribution have been determined : \operatorname( X ) = \mu + \sqrt ( \sigma_2 - \sigma_1 ) : \operatorname( X ) = \left( 1 - \frac 2 \pi\right)( \sigma_2 - \sigma_1 )^2 + \sigma_1 \sigma_2 : \operatorname( X ) = \sqrt( \sigma_2 - \sigma_1 ) \left[ \left( \frac 4 \pi - 1 \right) ( \sigma_2 - \sigma_1)^2 + \sigma_1 \sigma_2 \right] where E(''X''), V(''X'') and T(''X'') are the mean, variance, and third central moment respectively. One of the main practical uses of the Gaussian law is to model the empirical distributions of many different random variables encountered in practice. In such case a possible extension would be a richer family of distributions, having more than two parameters and therefore being able to fit the empirical distribution more accurately. The examples of such extensions are: * Pearson distribution — a four-parameter family of probability distributions that extend the normal law to include different skewness and kurtosis values. * The generalized normal distribution, also known as the exponential power distribution, allows for distribution tails with thicker or thinner asymptotic behaviors.


Statistical inference


Estimation of parameters

It is often the case that we do not know the parameters of the normal distribution, but instead want to Estimation theory, estimate them. That is, having a sample (x_1, \ldots, x_n) from a normal N(\mu, \sigma^2) population we would like to learn the approximate values of parameters \mu and \sigma^2. The standard approach to this problem is the maximum likelihood method, which requires maximization of the ''log-likelihood function'': : \ln\mathcal(\mu,\sigma^2) = \sum_^n \ln f(x_i\mid\mu,\sigma^2) = -\frac\ln(2\pi) - \frac\ln\sigma^2 - \frac\sum_^n (x_i-\mu)^2. Taking derivatives with respect to \mu and \sigma^2 and solving the resulting system of first order conditions yields the ''maximum likelihood estimates'': : \hat = \overline \equiv \frac\sum_^n x_i, \qquad \hat^2 = \frac \sum_^n (x_i - \overline)^2.


Sample mean

Estimator \textstyle\hat\mu is called the ''
sample mean The sample mean (or "empirical mean") and the sample covariance are statistics computed from a Sample (statistics), sample of data on one or more random variables. The sample mean is the average value (or mean, mean value) of a sample (statistic ...
'', since it is the arithmetic mean of all observations. The statistic \textstyle\overline is complete statistic, complete and sufficient statistic, sufficient for \mu, and therefore by the Lehmann–Scheffé theorem, \textstyle\hat\mu is the uniformly minimum variance unbiased (UMVU) estimator. In finite samples it is distributed normally: : \hat\mu \sim \mathcal(\mu,\sigma^2/n). The variance of this estimator is equal to the ''μμ''-element of the inverse Fisher information matrix \textstyle\mathcal^. This implies that the estimator is efficient estimator, finite-sample efficient. Of practical importance is the fact that the standard error (statistics), standard error of \textstyle\hat\mu is proportional to \textstyle1/\sqrt, that is, if one wishes to decrease the standard error by a factor of 10, one must increase the number of points in the sample by a factor of 100. This fact is widely used in determining sample sizes for opinion polls and the number of trials in Monte Carlo simulations. From the standpoint of the asymptotic theory (statistics), asymptotic theory, \textstyle\hat\mu is consistent estimator, consistent, that is, it convergence in probability, converges in probability to \mu as n\rightarrow\infty. The estimator is also asymptotic normality, asymptotically normal, which is a simple corollary of the fact that it is normal in finite samples: : \sqrt(\hat\mu-\mu) \,\xrightarrow\, \mathcal(0,\sigma^2).


Sample variance

The estimator \textstyle\hat\sigma^2 is called the ''sample variance'', since it is the variance of the sample ((x_1, \ldots, x_n)). In practice, another estimator is often used instead of the \textstyle\hat\sigma^2. This other estimator is denoted s^2, and is also called the ''sample variance'', which represents a certain ambiguity in terminology; its square root s is called the ''sample standard deviation''. The estimator s^2 differs from \textstyle\hat\sigma^2 by having instead of ''n'' in the denominator (the so-called Bessel's correction): : s^2 = \frac \hat\sigma^2 = \frac \sum_^n (x_i - \overline)^2. The difference between s^2 and \textstyle\hat\sigma^2 becomes negligibly small for large ''n''s. In finite samples however, the motivation behind the use of s^2 is that it is an unbiased estimator of the underlying parameter \sigma^2, whereas \textstyle\hat\sigma^2 is biased. Also, by the Lehmann–Scheffé theorem the estimator s^2 is uniformly minimum variance unbiased (Minimum-variance unbiased estimator, UMVU), which makes it the "best" estimator among all unbiased ones. However it can be shown that the biased estimator \textstyle\hat\sigma^2 is "better" than the s^2 in terms of the mean squared error (MSE) criterion. In finite samples both s^2 and \textstyle\hat\sigma^2 have scaled
chi-squared distribution In probability theory and statistics, the chi-squared distribution (also chi-square or \chi^2-distribution) with k degrees of freedom is the distribution of a sum of the squares of k independent standard normal random variables. The chi-squa ...
with degrees of freedom: : s^2 \sim \frac \cdot \chi^2_, \qquad \hat\sigma^2 \sim \frac \cdot \chi^2_. The first of these expressions shows that the variance of s^2 is equal to 2\sigma^4/(n-1), which is slightly greater than the ''σσ''-element of the inverse Fisher information matrix \textstyle\mathcal^. Thus, s^2 is not an efficient estimator for \sigma^2, and moreover, since s^2 is UMVU, we can conclude that the finite-sample efficient estimator for \sigma^2 does not exist. Applying the asymptotic theory, both estimators s^2 and \textstyle\hat\sigma^2 are consistent, that is they converge in probability to \sigma^2 as the sample size n\rightarrow\infty. The two estimators are also both asymptotically normal: : \sqrt(\hat\sigma^2 - \sigma^2) \simeq \sqrt(s^2-\sigma^2) \,\xrightarrow\, \mathcal(0,2\sigma^4). In particular, both estimators are asymptotically efficient for \sigma^2.


Confidence intervals

By
Cochran's theorem In statistics, Cochran's theorem, devised by William G. Cochran, is a theorem used to justify results relating to the probability distributions of statistics that are used in the analysis of variance. Statement Let ''U''1, ..., ''U'N'' be i.i. ...
, for normal distributions the sample mean \textstyle\hat\mu and the sample variance ''s''2 are
independent Independent or Independents may refer to: Arts, entertainment, and media Artist groups * Independents (artist group), a group of modernist painters based in the New Hope, Pennsylvania, area of the United States during the early 1930s * Independ ...
, which means there can be no gain in considering their joint distribution. There is also a converse theorem: if in a sample the sample mean and sample variance are independent, then the sample must have come from the normal distribution. The independence between \textstyle\hat\mu and ''s'' can be employed to construct the so-called ''t-statistic'': : t = \frac = \frac \sim t_ This quantity ''t'' has the
Student's t-distribution In probability and statistics, Student's ''t''-distribution (or simply the ''t''-distribution) is any member of a family of continuous probability distributions that arise when estimating the mean of a normally distributed population in sit ...
with degrees of freedom, and it is an ancillary statistic (independent of the value of the parameters). Inverting the distribution of this ''t''-statistics will allow us to construct the
confidence interval In frequentist statistics, a confidence interval (CI) is a range of estimates for an unknown parameter. A confidence interval is computed at a designated ''confidence level''; the 95% confidence level is most common, but other levels, such as 9 ...
for ''μ''; similarly, inverting the ''χ''2 distribution of the statistic ''s''2 will give us the confidence interval for ''σ''2: :\mu \in \left[ \hat\mu - t_ \fracs, \hat\mu + t_ \fracs \right], :\sigma^2 \in \left[ \frac, \frac \right], where ''tk,p'' and are the ''p''th
quantile In statistics and probability, quantiles are cut points dividing the range of a probability distribution into continuous intervals with equal probabilities, or dividing the observations in a sample in the same way. There is one fewer quantile tha ...
s of the ''t''- and ''χ''2-distributions respectively. These confidence intervals are of the ''confidence level'' , meaning that the true values ''μ'' and ''σ''2 fall outside of these intervals with probability (or significance level) ''α''. In practice people usually take , resulting in the 95% confidence intervals. Approximate formulas can be derived from the asymptotic distributions of \textstyle\hat\mu and ''s''2: :\mu \in \left[ \hat\mu - , z_, \fracs, \hat\mu + , z_, \fracs \right], :\sigma^2 \in \left[ s^2 - , z_, \fracs^2, s^2 + , z_, \fracs^2 \right], The approximate formulas become valid for large values of ''n'', and are more convenient for the manual calculation since the standard normal quantiles ''z''''α''/2 do not depend on ''n''. In particular, the most popular value of , results in .


Normality tests

Normality tests assess the likelihood that the given data set comes from a normal distribution. Typically the null hypothesis ''H''0 is that the observations are distributed normally with unspecified mean ''μ'' and variance ''σ''2, versus the alternative ''Ha'' that the distribution is arbitrary. Many tests (over 40) have been devised for this problem. The more prominent of them are outlined below: Diagnostic plots are more intuitively appealing but subjective at the same time, as they rely on informal human judgement to accept or reject the null hypothesis. *
Q–Q plot In statistics, a Q–Q plot (quantile-quantile plot) is a probability plot, a List of graphical methods, graphical method for comparing two probability distributions by plotting their ''quantiles'' against each other. A point on the plot co ...
, also known as normal probability plot or rankit plot—is a plot of the sorted values from the data set against the expected values of the corresponding quantiles from the standard normal distribution. That is, it's a plot of point of the form (Φ−1(''pk''), ''x''(''k'')), where plotting points ''pk'' are equal to ''pk'' = (''k'' − ''α'')/(''n'' + 1 − 2''α'') and ''α'' is an adjustment constant, which can be anything between 0 and 1. If the null hypothesis is true, the plotted points should approximately lie on a straight line. * P–P plot – similar to the Q–Q plot, but used much less frequently. This method consists of plotting the points (Φ(''z''(''k'')), ''pk''), where \textstyle z_ = (x_-\hat\mu)/\hat\sigma. For normally distributed data this plot should lie on a 45° line between (0, 0) and (1, 1). Goodness-of-fit tests: ''Moment-based tests'': * D'Agostino's K-squared test * Jarque–Bera test * Shapiro–Wilk test: This is based on the fact that the line in the Q–Q plot has the slope of ''σ''. The test compares the least squares estimate of that slope with the value of the sample variance, and rejects the null hypothesis if these two quantities differ significantly. ''Tests based on the empirical distribution function'': * Anderson–Darling test * Lilliefors test (an adaptation of the Kolmogorov–Smirnov test)


Bayesian analysis of the normal distribution

Bayesian analysis of normally distributed data is complicated by the many different possibilities that may be considered: * Either the mean, or the variance, or neither, may be considered a fixed quantity. * When the variance is unknown, analysis may be done directly in terms of the variance, or in terms of the
precision Precision, precise or precisely may refer to: Science, and technology, and mathematics Mathematics and computing (general) * Accuracy and precision, measurement deviation from true value and its scatter * Significant figures, the number of digit ...
, the reciprocal of the variance. The reason for expressing the formulas in terms of precision is that the analysis of most cases is simplified. * Both univariate and multivariate normal distribution, multivariate cases need to be considered. * Either conjugate prior, conjugate or improper prior, improper prior distributions may be placed on the unknown variables. * An additional set of cases occurs in Bayesian linear regression, where in the basic model the data is assumed to be normally distributed, and normal priors are placed on the regression coefficients. The resulting analysis is similar to the basic cases of independent identically distributed data. The formulas for the non-linear-regression cases are summarized in the conjugate prior article.


Sum of two quadratics


= Scalar form

= The following auxiliary formula is useful for simplifying the posterior distribution, posterior update equations, which otherwise become fairly tedious. :a(x-y)^2 + b(x-z)^2 = (a + b)\left(x - \frac\right)^2 + \frac(y-z)^2 This equation rewrites the sum of two quadratics in ''x'' by expanding the squares, grouping the terms in ''x'', and completing the square. Note the following about the complex constant factors attached to some of the terms: # The factor \frac has the form of a weighted average of ''y'' and ''z''. # \frac = \frac = (a^ + b^)^. This shows that this factor can be thought of as resulting from a situation where the Multiplicative inverse, reciprocals of quantities ''a'' and ''b'' add directly, so to combine ''a'' and ''b'' themselves, it's necessary to reciprocate, add, and reciprocate the result again to get back into the original units. This is exactly the sort of operation performed by the harmonic mean, so it is not surprising that \frac is one-half the harmonic mean of ''a'' and ''b''.


= Vector form

= A similar formula can be written for the sum of two vector quadratics: If x, y, z are vectors of length ''k'', and A and B are symmetric matrix, symmetric, invertible matrices of size k\times k, then : \begin & (\mathbf-\mathbf)'\mathbf(\mathbf-\mathbf) + (\mathbf-\mathbf)' \mathbf(\mathbf-\mathbf) \\ = & (\mathbf - \mathbf)'(\mathbf+\mathbf)(\mathbf - \mathbf) + (\mathbf - \mathbf)'(\mathbf^ + \mathbf^)^(\mathbf - \mathbf) \end where :\mathbf = (\mathbf + \mathbf)^(\mathbf\mathbf + \mathbf \mathbf) Note that the form x′ A x is called a
quadratic form In mathematics, a quadratic form is a polynomial with terms all of degree two ("form" is another name for a homogeneous polynomial). For example, :4x^2 + 2xy - 3y^2 is a quadratic form in the variables and . The coefficients usually belong to a ...
and is a scalar (mathematics), scalar: :\mathbf'\mathbf\mathbf = \sum_a_ x_i x_j In other words, it sums up all possible combinations of products of pairs of elements from x, with a separate coefficient for each. In addition, since x_i x_j = x_j x_i, only the sum a_ + a_ matters for any off-diagonal elements of A, and there is no loss of generality in assuming that A is symmetric matrix, symmetric. Furthermore, if A is symmetric, then the form \mathbf'\mathbf\mathbf = \mathbf'\mathbf\mathbf.


Sum of differences from the mean

Another useful formula is as follows: \sum_^n (x_i-\mu)^2 = \sum_^n (x_i-\bar)^2 + n(\bar -\mu)^2 where \bar = \frac \sum_^n x_i.


With known variance

For a set of i.i.d. normally distributed data points X of size ''n'' where each individual point ''x'' follows x \sim \mathcal(\mu, \sigma^2) with known
variance In probability theory and statistics, variance is the expectation of the squared deviation of a random variable from its population mean or sample mean. Variance is a measure of dispersion, meaning it is a measure of how far a set of numbers ...
σ2, the conjugate prior distribution is also normally distributed. This can be shown more easily by rewriting the variance as the
precision Precision, precise or precisely may refer to: Science, and technology, and mathematics Mathematics and computing (general) * Accuracy and precision, measurement deviation from true value and its scatter * Significant figures, the number of digit ...
, i.e. using τ = 1/σ2. Then if x \sim \mathcal(\mu, 1/\tau) and \mu \sim \mathcal(\mu_0, 1/\tau_0), we proceed as follows. First, the likelihood function is (using the formula above for the sum of differences from the mean): :\begin p(\mathbf\mid\mu,\tau) &= \prod_^n \sqrt \exp\left(-\frac\tau(x_i-\mu)^2\right) \\ &= \left(\frac\right)^ \exp\left(-\frac\tau \sum_^n (x_i-\mu)^2\right) \\ &= \left(\frac\right)^ \exp\left[-\frac\tau \left(\sum_^n(x_i-\bar)^2 + n(\bar -\mu)^2\right)\right]. \end Then, we proceed as follows: :\begin p(\mu\mid\mathbf) &\propto p(\mathbf\mid\mu) p(\mu) \\ & = \left(\frac\right)^ \exp\left[-\frac\tau \left(\sum_^n(x_i-\bar)^2 + n(\bar -\mu)^2\right)\right] \sqrt \exp\left(-\frac\tau_0(\mu-\mu_0)^2\right) \\ &\propto \exp\left(-\frac\left(\tau\left(\sum_^n(x_i-\bar)^2 + n(\bar -\mu)^2\right) + \tau_0(\mu-\mu_0)^2\right)\right) \\ &\propto \exp\left(-\frac \left(n\tau(\bar-\mu)^2 + \tau_0(\mu-\mu_0)^2 \right)\right) \\ &= \exp\left(-\frac(n\tau + \tau_0)\left(\mu - \dfrac\right)^2 + \frac(\bar - \mu_0)^2\right) \\ &\propto \exp\left(-\frac(n\tau + \tau_0)\left(\mu - \dfrac\right)^2\right) \end In the above derivation, we used the formula above for the sum of two quadratics and eliminated all constant factors not involving ''μ''. The result is the kernel (statistics), kernel of a normal distribution, with mean \frac and precision n\tau + \tau_0, i.e. :p(\mu\mid\mathbf) \sim \mathcal\left(\frac, \frac\right) This can be written as a set of Bayesian update equations for the posterior parameters in terms of the prior parameters: :\begin \tau_0' &= \tau_0 + n\tau \\[5pt] \mu_0' &= \frac \\[5pt] \bar &= \frac\sum_^n x_i \end That is, to combine ''n'' data points with total precision of ''nτ'' (or equivalently, total variance of ''n''/''σ''2) and mean of values \bar, derive a new total precision simply by adding the total precision of the data to the prior total precision, and form a new mean through a ''precision-weighted average'', i.e. a weighted average of the data mean and the prior mean, each weighted by the associated total precision. This makes logical sense if the precision is thought of as indicating the certainty of the observations: In the distribution of the posterior mean, each of the input components is weighted by its certainty, and the certainty of this distribution is the sum of the individual certainties. (For the intuition of this, compare the expression "the whole is (or is not) greater than the sum of its parts". In addition, consider that the knowledge of the posterior comes from a combination of the knowledge of the prior and likelihood, so it makes sense that we are more certain of it than of either of its components.) The above formula reveals why it is more convenient to do Bayesian analysis of conjugate priors for the normal distribution in terms of the precision. The posterior precision is simply the sum of the prior and likelihood precisions, and the posterior mean is computed through a precision-weighted average, as described above. The same formulas can be written in terms of variance by reciprocating all the precisions, yielding the more ugly formulas :\begin ' &= \frac \\[5pt] \mu_0' &= \frac \\[5pt] \bar &= \frac\sum_^n x_i \end


With known mean

For a set of i.i.d. normally distributed data points X of size ''n'' where each individual point ''x'' follows x \sim \mathcal(\mu, \sigma^2) with known mean μ, the conjugate prior of the
variance In probability theory and statistics, variance is the expectation of the squared deviation of a random variable from its population mean or sample mean. Variance is a measure of dispersion, meaning it is a measure of how far a set of numbers ...
has an inverse gamma distribution or a scaled inverse chi-squared distribution. The two are equivalent 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. The prior for σ2 is as follows: :p(\sigma^2\mid\nu_0,\sigma_0^2) = \frac~\frac \propto \frac The likelihood function from above, written in terms of the variance, is: :\begin p(\mathbf\mid\mu,\sigma^2) &= \left(\frac\right)^ \exp\left[-\frac \sum_^n (x_i-\mu)^2\right] \\ &= \left(\frac\right)^ \exp\left[-\frac\right] \end where :S = \sum_^n (x_i-\mu)^2. Then: :\begin p(\sigma^2\mid\mathbf) &\propto p(\mathbf\mid\sigma^2) p(\sigma^2) \\ &= \left(\frac\right)^ \exp\left[-\frac\right] \frac~\frac \\ &\propto \left(\frac\right)^ \frac \exp\left[-\frac + \frac\right] \\ &= \frac \exp\left[-\frac\right] \end The above is also a scaled inverse chi-squared distribution where :\begin \nu_0' &= \nu_0 + n \\ \nu_0'' &= \nu_0 \sigma_0^2 + \sum_^n (x_i-\mu)^2 \end or equivalently :\begin \nu_0' &= \nu_0 + n \\ ' &= \frac \end Reparameterizing in terms of an inverse gamma distribution, the result is: :\begin \alpha' &= \alpha + \frac \\ \beta' &= \beta + \frac \end


With unknown mean and unknown variance

For a set of i.i.d. normally distributed data points X of size ''n'' where each individual point ''x'' follows x \sim \mathcal(\mu, \sigma^2) with unknown mean μ and unknown
variance In probability theory and statistics, variance is the expectation of the squared deviation of a random variable from its population mean or sample mean. Variance is a measure of dispersion, meaning it is a measure of how far a set of numbers ...
σ2, a combined (multivariate) conjugate prior is placed over the mean and variance, consisting of a normal-inverse-gamma distribution. Logically, this originates as follows: # From the analysis of the case with unknown mean but known variance, we see that the update equations involve sufficient statistics computed from the data consisting of the mean of the data points and the total variance of the data points, computed in turn from the known variance divided by the number of data points. # From the analysis of the case with unknown variance but known mean, we see that the update equations involve sufficient statistics over the data consisting of the number of data points and sum of squared deviations. # Keep in mind that the posterior update values serve as the prior distribution when further data is handled. Thus, we should logically think of our priors in terms of the sufficient statistics just described, with the same semantics kept in mind as much as possible. # To handle the case where both mean and variance are unknown, we could place independent priors over the mean and variance, with fixed estimates of the average mean, total variance, number of data points used to compute the variance prior, and sum of squared deviations. Note however that in reality, the total variance of the mean depends on the unknown variance, and the sum of squared deviations that goes into the variance prior (appears to) depend on the unknown mean. In practice, the latter dependence is relatively unimportant: Shifting the actual mean shifts the generated points by an equal amount, and on average the squared deviations will remain the same. This is not the case, however, with the total variance of the mean: As the unknown variance increases, the total variance of the mean will increase proportionately, and we would like to capture this dependence. # This suggests that we create a ''conditional prior'' of the mean on the unknown variance, with a hyperparameter specifying the mean of the pseudo-observations associated with the prior, and another parameter specifying the number of pseudo-observations. This number serves as a scaling parameter on the variance, making it possible to control the overall variance of the mean relative to the actual variance parameter. The prior for the variance also has two hyperparameters, one specifying the sum of squared deviations of the pseudo-observations associated with the prior, and another specifying once again the number of pseudo-observations. Note that each of the priors has a hyperparameter specifying the number of pseudo-observations, and in each case this controls the relative variance of that prior. These are given as two separate hyperparameters so that the variance (aka the confidence) of the two priors can be controlled separately. # This leads immediately to the normal-inverse-gamma distribution, which is the product of the two distributions just defined, with conjugate priors used (an inverse gamma distribution over the variance, and a normal distribution over the mean, ''conditional'' on the variance) and with the same four parameters just defined. The priors are normally defined as follows: :\begin p(\mu\mid\sigma^2; \mu_0, n_0) &\sim \mathcal(\mu_0,\sigma^2/n_0) \\ p(\sigma^2; \nu_0,\sigma_0^2) &\sim I\chi^2(\nu_0,\sigma_0^2) = IG(\nu_0/2, \nu_0\sigma_0^2/2) \end The update equations can be derived, and look as follows: :\begin \bar &= \frac 1 n \sum_^n x_i \\ \mu_0' &= \frac \\ n_0' &= n_0 + n \\ \nu_0' &= \nu_0 + n \\ \nu_0'' &= \nu_0 \sigma_0^2 + \sum_^n (x_i-\bar)^2 + \frac(\mu_0 - \bar)^2 \end The respective numbers of pseudo-observations add the number of actual observations to them. The new mean hyperparameter is once again a weighted average, this time weighted by the relative numbers of observations. Finally, the update for \nu_0'' is similar to the case with known mean, but in this case the sum of squared deviations is taken with respect to the observed data mean rather than the true mean, and as a result a new "interaction term" needs to be added to take care of the additional error source stemming from the deviation between prior and data mean.


Occurrence and applications

The occurrence of normal distribution in practical problems can be loosely classified into four categories: # Exactly normal distributions; # Approximately normal laws, for example when such approximation is justified by the
central limit theorem In probability theory, the central limit theorem (CLT) establishes that, in many situations, when independent random variables are summed up, their properly normalized sum tends toward a normal distribution even if the original variables themselv ...
; and # Distributions modeled as normal – the normal distribution being the distribution with Principle of maximum entropy, maximum entropy for a given mean and variance. # Regression problems – the normal distribution being found after systematic effects have been modeled sufficiently well.


Exact normality

Certain quantities in physics are distributed normally, as was first demonstrated by James Clerk Maxwell. Examples of such quantities are: * Probability density function of a ground state in a quantum harmonic oscillator. * The position of a particle that experiences diffusion. If initially the particle is located at a specific point (that is its probability distribution is the Dirac delta function), then after time ''t'' its location is described by a normal distribution with variance ''t'', which satisfies the diffusion equation \frac f(x,t) = \frac \frac f(x,t). If the initial location is given by a certain density function g(x), then the density at time ''t'' is the convolution of ''g'' and the normal PDF.


Approximate normality

''Approximately'' normal distributions occur in many situations, as explained by the
central limit theorem In probability theory, the central limit theorem (CLT) establishes that, in many situations, when independent random variables are summed up, their properly normalized sum tends toward a normal distribution even if the original variables themselv ...
. When the outcome is produced by many small effects acting ''additively and independently'', its distribution will be close to normal. The normal approximation will not be valid if the effects act multiplicatively (instead of additively), or if there is a single external influence that has a considerably larger magnitude than the rest of the effects. * In counting problems, where the central limit theorem includes a discrete-to-continuum approximation and where Infinite divisibility, infinitely divisible and Indecomposable distribution, decomposable distributions are involved, such as ** binomial distribution, Binomial random variables, associated with binary response variables; ** Poisson distribution, Poisson random variables, associated with rare events; * Thermal radiation has a Bose–Einstein statistics, Bose–Einstein distribution on very short time scales, and a normal distribution on longer timescales due to the central limit theorem.


Assumed normality

There are statistical methods to empirically test that assumption; see the above #Normality tests, Normality tests section. * In biology, the ''logarithm'' of various variables tend to have a normal distribution, that is, they tend to have a
log-normal distribution In probability theory, a log-normal (or lognormal) distribution is a continuous probability distribution of a random variable whose logarithm is normally distributed. Thus, if the random variable is log-normally distributed, then has a normal ...
(after separation on male/female subpopulations), with examples including: ** Measures of size of living tissue (length, height, skin area, weight); ** The ''length'' of ''inert'' appendages (hair, claws, nails, teeth) of biological specimens, ''in the direction of growth''; presumably the thickness of tree bark also falls under this category; ** Certain physiological measurements, such as blood pressure of adult humans. * In finance, in particular the Black–Scholes model, changes in the ''logarithm'' of exchange rates, price indices, and stock market indices are assumed normal (these variables behave like compound interest, not like simple interest, and so are multiplicative). Some mathematicians such as Benoit Mandelbrot have argued that Levy skew alpha-stable distribution, log-Levy distributions, which possesses heavy tails would be a more appropriate model, in particular for the analysis for stock market crashes. The use of the assumption of normal distribution occurring in financial models has also been criticized by Nassim Nicholas Taleb in his works. * Propagation of uncertainty, Measurement errors in physical experiments are often modeled by a normal distribution. This use of a normal distribution does not imply that one is assuming the measurement errors are normally distributed, rather using the normal distribution produces the most conservative predictions possible given only knowledge about the mean and variance of the errors. * In Standardized testing (statistics), standardized testing, results can be made to have a normal distribution by either selecting the number and difficulty of questions (as in the Intelligence quotient, IQ test) or transforming the raw test scores into "output" scores by fitting them to the normal distribution. For example, the SAT's traditional range of 200–800 is based on a normal distribution with a mean of 500 and a standard deviation of 100. * Many scores are derived from the normal distribution, including percentile ranks ("percentiles" or "quantiles"), normal curve equivalents, stanines, Standard score, z-scores, and T-scores. Additionally, some behavioral statistical procedures assume that scores are normally distributed; for example, Student's t-test, t-tests and Analysis of variance, ANOVAs. Bell curve grading assigns relative grades based on a normal distribution of scores. * In hydrology the distribution of long duration river discharge or rainfall, e.g. monthly and yearly totals, is often thought to be practically normal according to the
central limit theorem In probability theory, the central limit theorem (CLT) establishes that, in many situations, when independent random variables are summed up, their properly normalized sum tends toward a normal distribution even if the original variables themselv ...
. The blue picture, made with CumFreq, illustrates an example of fitting the normal distribution to ranked October rainfalls showing the 90% confidence belt based on the
binomial distribution In probability theory and statistics, the binomial distribution with parameters ''n'' and ''p'' is the discrete probability distribution of the number of successes in a sequence of ''n'' independent experiments, each asking a yes–no quest ...
. The rainfall data are represented by plotting positions as part of the cumulative frequency analysis.


Methodological problems and peer review

John Ioannidis argues that using normally distributed standard deviations as standards for validating research findings leave falsifiability, falsifiable predictions about phenomena that are not normally distributed untested. This includes, for example, phenomena that only appear when all necessary conditions are present and one cannot be a substitute for another in an addition-like way and phenomena that are not randomly distributed. Ioannidis argues that standard deviation-centered validation gives a false appearance of validity to hypotheses and theories where some but not all falsifiable predictions are normally distributed since the portion of falsifiable predictions that there is evidence against may and in some cases are in the non-normally distributed parts of the range of falsifiable predictions, as well as baselessly dismissing hypotheses for which none of the falsifiable predictions are normally distributed as if were they unfalsifiable when in fact they do make falsifiable predictions. It is argued by Ioannidis that many cases of mutually exclusive theories being accepted as "validated" by research journals are caused by failure of the journals to take in empirical falsifications of non-normally distributed predictions, and not because mutually exclusive theories are true, which they cannot be, although two mutually exclusive theories can both be wrong and a third one correct.


Computational methods


Generating values from normal distribution

In computer simulations, especially in applications of the Monte-Carlo method, it is often desirable to generate values that are normally distributed. The algorithms listed below all generate the standard normal deviates, since a can be generated as , where ''Z'' is standard normal. All these algorithms rely on the availability of a random number generator ''U'' capable of producing Uniform distribution (continuous), uniform random variates. * The most straightforward method is based on the probability integral transform property: if ''U'' is distributed uniformly on (0,1), then Φ−1(''U'') will have the standard normal distribution. The drawback of this method is that it relies on calculation of the
probit function In probability theory and statistics, the probit function is the quantile function associated with the standard normal distribution. It has applications in data analysis and machine learning, in particular exploratory statistical graphics and ...
Φ−1, which cannot be done analytically. Some approximate methods are described in and in the error function, erf article. Wichura gives a fast algorithm for computing this function to 16 decimal places, which is used by R programming language, R to compute random variates of the normal distribution. * Irwin–Hall distribution#Approximating a Normal distribution, An easy-to-program approximate approach that relies on the
central limit theorem In probability theory, the central limit theorem (CLT) establishes that, in many situations, when independent random variables are summed up, their properly normalized sum tends toward a normal distribution even if the original variables themselv ...
is as follows: generate 12 uniform ''U''(0,1) deviates, add them all up, and subtract 6 – the resulting random variable will have approximately standard normal distribution. In truth, the distribution will be Irwin–Hall distribution, Irwin–Hall, which is a 12-section eleventh-order polynomial approximation to the normal distribution. This random deviate will have a limited range of (−6, 6). Note that in a true normal distribution, only 0.00034% of all samples will fall outside ±6σ. * The Box–Muller transform, Box–Muller method uses two independent random numbers ''U'' and ''V'' distributed uniform distribution (continuous), uniformly on (0,1). Then the two random variables ''X'' and ''Y'' X = \sqrt \, \cos(2 \pi V) , \qquad Y = \sqrt \, \sin(2 \pi V) . will both have the standard normal distribution, and will be
independent Independent or Independents may refer to: Arts, entertainment, and media Artist groups * Independents (artist group), a group of modernist painters based in the New Hope, Pennsylvania, area of the United States during the early 1930s * Independ ...
. This formulation arises because for a bivariate normal random vector (''X'', ''Y'') the squared norm will have the
chi-squared distribution In probability theory and statistics, the chi-squared distribution (also chi-square or \chi^2-distribution) with k degrees of freedom is the distribution of a sum of the squares of k independent standard normal random variables. The chi-squa ...
with two degrees of freedom, which is an easily generated exponential distribution, exponential random variable corresponding to the quantity −2ln(''U'') in these equations; and the angle is distributed uniformly around the circle, chosen by the random variable ''V''. * The Marsaglia polar method is a modification of the Box–Muller method which does not require computation of the sine and cosine functions. In this method, ''U'' and ''V'' are drawn from the uniform (−1,1) distribution, and then is computed. If ''S'' is greater or equal to 1, then the method starts over, otherwise the two quantities X = U\sqrt, \qquad Y = V\sqrt are returned. Again, ''X'' and ''Y'' are independent, standard normal random variables. * The Ratio method is a rejection method. The algorithm proceeds as follows: ** Generate two independent uniform deviates ''U'' and ''V''; ** Compute ''X'' = (''V'' − 0.5)/''U''; ** Optional: if ''X''2 ≤ 5 − 4''e''1/4''U'' then accept ''X'' and terminate algorithm; ** Optional: if ''X''2 ≥ 4''e''−1.35/''U'' + 1.4 then reject ''X'' and start over from step 1; ** If ''X''2 ≤ −4 ln''U'' then accept ''X'', otherwise start over the algorithm. *:The two optional steps allow the evaluation of the logarithm in the last step to be avoided in most cases. These steps can be greatly improved so that the logarithm is rarely evaluated. * The ziggurat algorithm is faster than the Box–Muller transform and still exact. In about 97% of all cases it uses only two random numbers, one random integer and one random uniform, one multiplication and an if-test. Only in 3% of the cases, where the combination of those two falls outside the "core of the ziggurat" (a kind of rejection sampling using logarithms), do exponentials and more uniform random numbers have to be employed. * Integer arithmetic can be used to sample from the standard normal distribution. This method is exact in the sense that it satisfies the conditions of ''ideal approximation''; i.e., it is equivalent to sampling a real number from the standard normal distribution and rounding this to the nearest representable floating point number. * There is also some investigation into the connection between the fast Hadamard transform and the normal distribution, since the transform employs just addition and subtraction and by the central limit theorem random numbers from almost any distribution will be transformed into the normal distribution. In this regard a series of Hadamard transforms can be combined with random permutations to turn arbitrary data sets into a normally distributed data.


Numerical approximations for the normal CDF and normal quantile function

The standard normal cumulative distribution function, CDF is widely used in scientific and statistical computing. The values Φ(''x'') may be approximated very accurately by a variety of methods, such as numerical integration, Taylor series, asymptotic series and Gauss's continued fraction#Of Kummer's confluent hypergeometric function, continued fractions. Different approximations are used depending on the desired level of accuracy. * give the approximation for Φ(''x'') for ''x > 0'' with the absolute error (algorith
26.2.17
: \Phi(x) = 1 - \varphi(x)\left(b_1 t + b_2 t^2 + b_3t^3 + b_4 t^4 + b_5 t^5\right) + \varepsilon(x), \qquad t = \frac, where ''ϕ''(''x'') is the standard normal PDF, and ''b''0 = 0.2316419, ''b''1 = 0.319381530, ''b''2 = −0.356563782, ''b''3 = 1.781477937, ''b''4 = −1.821255978, ''b''5 = 1.330274429. * lists some dozens of approximations – by means of rational functions, with or without exponentials – for the function. His algorithms vary in the degree of complexity and the resulting precision, with maximum absolute precision of 24 digits. An algorithm by combines Hart's algorithm 5666 with a continued fraction approximation in the tail to provide a fast computation algorithm with a 16-digit precision. * after recalling Hart68 solution is not suited for erf, gives a solution for both erf and erfc, with maximal relative error bound, via rational function, Rational Chebyshev Approximation. * suggested a simple algorithm based on the Taylor series expansion \Phi(x) = \frac12 + \varphi(x)\left( x + \frac 3 + \frac + \frac + \frac + \cdots \right) for calculating with arbitrary precision. The drawback of this algorithm is comparatively slow calculation time (for example it takes over 300 iterations to calculate the function with 16 digits of precision when ). * The GNU Scientific Library calculates values of the standard normal CDF using Hart's algorithms and approximations with Chebyshev polynomials. Shore (1982) introduced simple approximations that may be incorporated in stochastic optimization models of engineering and operations research, like reliability engineering and inventory analysis. Denoting , the simplest approximation for the quantile function is: z = \Phi^(p)=5.5556\left[1- \left( \frac p \right)^\right],\qquad p\ge 1/2 This approximation delivers for ''z'' a maximum absolute error of 0.026 (for , corresponding to ). For replace ''p'' by and change sign. Another approximation, somewhat less accurate, is the single-parameter approximation: z=-0.4115\left\, \qquad p\ge 1/2 The latter had served to derive a simple approximation for the loss integral of the normal distribution, defined by \begin L(z) & =\int_z^\infty (u-z)\varphi(u) \, du=\int_z^\infty [1-\Phi (u)] \, du \\[5pt] L(z) & \approx \begin 0.4115\left(\dfrac p \right) - z, & p<1/2, \\ \\ 0.4115\left( \dfrac p \right), & p\ge 1/2. \end \\[5pt] \text \\ L(z) & \approx \begin 0.4115\left\, & p < 1/2, \\ \\ 0.4115 \dfrac p, & p\ge 1/2. \end \end This approximation is particularly accurate for the right far-tail (maximum error of 10−3 for z≥1.4). Highly accurate approximations for the CDF, based on Response modeling methodology, Response Modeling Methodology (RMM, Shore, 2011, 2012), are shown in Shore (2005). Some more approximations can be found at: Error function#Approximation with elementary functions. In particular, small ''relative'' error on the whole domain for the CDF \Phi and the quantile function \Phi^ as well, is achieved via an explicitly invertible formula by Sergei Winitzki in 2008.


History


Development

Some authors attribute the credit for the discovery of the normal distribution to Abraham de Moivre, de Moivre, who in 1738 published in the second edition of his "''The Doctrine of Chances''" the study of the coefficients in the binomial expansion of . De Moivre proved that the middle term in this expansion has the approximate magnitude of 2^n/\sqrt, and that "If ''m'' or ''n'' be a Quantity infinitely great, then the Logarithm of the Ratio, which a Term distant from the middle by the Interval ''ℓ'', has to the middle Term, is -\frac." Although this theorem can be interpreted as the first obscure expression for the normal probability law, Stephen Stigler, Stigler points out that de Moivre himself did not interpret his results as anything more than the approximate rule for the binomial coefficients, and in particular de Moivre lacked the concept of the probability density function. In 1823 Carl Friedrich Gauss, Gauss published his monograph "''Theoria combinationis observationum erroribus minimis obnoxiae''" where among other things he introduces several important statistical concepts, such as the method of least squares, the method of maximum likelihood, and the ''normal distribution''. Gauss used ''M'', , to denote the measurements of some unknown quantity ''V'', and sought the "most probable" estimator of that quantity: the one that maximizes the probability of obtaining the observed experimental results. In his notation φΔ is the probability density function of the measurement errors of magnitude Δ. Not knowing what the function ''φ'' is, Gauss requires that his method should reduce to the well-known answer: the arithmetic mean of the measured values. Starting from these principles, Gauss demonstrates that the only law that rationalizes the choice of arithmetic mean as an estimator of the location parameter, is the normal law of errors: \varphi\mathit = \frac h \, e^, where ''h'' is "the measure of the precision of the observations". Using this normal law as a generic model for errors in the experiments, Gauss formulates what is now known as the non-linear least squares, non-linear weighted least squares method. Although Gauss was the first to suggest the normal distribution law, Pierre Simon de Laplace, Laplace made significant contributions. It was Laplace who first posed the problem of aggregating several observations in 1774, although his own solution led to the Laplacian distribution. It was Laplace who first calculated the value of the Gaussian integral, integral in 1782, providing the normalization constant for the normal distribution. Finally, it was Laplace who in 1810 proved and presented to the Academy the fundamental
central limit theorem In probability theory, the central limit theorem (CLT) establishes that, in many situations, when independent random variables are summed up, their properly normalized sum tends toward a normal distribution even if the original variables themselv ...
, which emphasized the theoretical importance of the normal distribution. It is of interest to note that in 1809 an Irish-American mathematician Robert Adrain published two insightful but flawed derivations of the normal probability law, simultaneously and independently from Gauss. His works remained largely unnoticed by the scientific community, until in 1871 they were exhumed by Cleveland Abbe, Abbe. In the middle of the 19th century James Clerk Maxwell, Maxwell demonstrated that the normal distribution is not just a convenient mathematical tool, but may also occur in natural phenomena: "The number of particles whose velocity, resolved in a certain direction, lies between ''x'' and ''x'' + ''dx'' is \operatorname \frac\; e^ \, dx


Naming

Today, the concept is usually known in English as the normal distribution or Gaussian distribution. Other less common names include Gauss distribution, Laplace-Gauss distribution, the law of error, the law of facility of errors, Laplace's second law, Gaussian law. Gauss himself apparently coined the term with reference to the "normal equations" involved in its applications, with normal having its technical meaning of orthogonal rather than "usual". However, by the end of the 19th century some authors had started using the name ''normal distribution'', where the word "normal" was used as an adjective – the term now being seen as a reflection of the fact that this distribution was seen as typical, common – and thus "normal". Charles Sanders Peirce, Peirce (one of those authors) once defined "normal" thus: "...the 'normal' is not the average (or any other kind of mean) of what actually occurs, but of what ''would'', in the long run, occur under certain circumstances." Around the turn of the 20th century Karl Pearson, Pearson popularized the term ''normal'' as a designation for this distribution. Also, it was Pearson who first wrote the distribution in terms of the standard deviation ''σ'' as in modern notation. Soon after this, in year 1915, Ronald Fisher, Fisher added the location parameter to the formula for normal distribution, expressing it in the way it is written nowadays: df = \frac e^ \, dx. The term "standard normal", which denotes the normal distribution with zero mean and unit variance came into general use around the 1950s, appearing in the popular textbooks by P. G. Hoel (1947) "''Introduction to mathematical statistics''" and A. M. Mood (1950) "''Introduction to the theory of statistics''".


See also

* Bates distribution – similar to the Irwin–Hall distribution, but rescaled back into the 0 to 1 range * Behrens–Fisher problem – the long-standing problem of testing whether two normal samples with different variances have same means; * Bhattacharyya distance – method used to separate mixtures of normal distributions * Erdős–Kac theorem – on the occurrence of the normal distribution in number theory * Full width at half maximum * Gaussian blur – convolution, which uses the normal distribution as a kernel * Modified half-normal distribution with the pdf on (0, \infty) is given as f(x)= \frac, where \Psi(\alpha,z)=_1\Psi_1\left(\begin\left(\alpha,\frac\right)\\(1,0)\end;z \right) denotes the Fox-Wright Psi function. * Normally distributed and uncorrelated does not imply independent * Ratio normal distribution * Reciprocal normal distribution * Standard normal table * Stein's lemma * Sub-Gaussian distribution * Sum of normally distributed random variables * Tweedie distribution – The normal distribution is a member of the family of Tweedie exponential dispersion models. * Wrapped normal distribution – the Normal distribution applied to a circular domain * Z-test – using the normal distribution


Notes


References


Citations


Sources

* * In particular, the entries fo
"bell-shaped and bell curve"
an

* * * * * * * * * * * * * * * * * * * * * * * * Translated by Stephen M. Stigler in ''Statistical Science'' 1 (3), 1986: . * * * * * * * * * * * * * * * * * * * * * * * * * * * *


External links

*
Normal distribution calculator
{{Authority control Normal distribution, Continuous distributions Conjugate prior distributions Exponential family distributions Stable distributions Location-scale family probability distributions]">X - \mu, ^p\right&= \sigma^p (p-1)!! \cdot \begin \sqrt & \textp\text \\ 1 & \textp\text \end \\ &= \sigma^p \cdot \frac. \end The last formula is valid also for any non-integer p>-1. When the mean \mu \ne 0, the plain and absolute moments can be expressed in terms of
confluent hypergeometric function In mathematics, a confluent hypergeometric function is a solution of a confluent hypergeometric equation, which is a degenerate form of a hypergeometric differential equation where two of the three regular singularities merge into an irregular ...
s _1F_1 and U. :\begin \operatorname\left ^p\right&= \sigma^p\cdot (-i\sqrt 2)^p U\left(-\frac, \frac, -\frac \left( \frac \mu \sigma \right)^2 \right), \\ \operatorname\left[, X, ^p \right] &= \sigma^p \cdot 2^ \frac _1F_1\left( -\frac, \frac, -\frac \left( \frac \mu \sigma \right)^2 \right). \end These expressions remain valid even if p is not an integer. See also Hermite polynomials#"Negative variance", generalized Hermite polynomials. The expectation of X conditioned on the event that X lies in an interval ,b/math> is given by :\operatorname\left \mid a= \mu - \sigma^2\frac where f and F respectively are the density and the cumulative distribution function of X. For b=\infty this is known as the
inverse Mills ratio In probability theory, the Mills ratio (or Mills's ratio) of a continuous random variable X is the function : m(x) := \frac , where f(x) is the probability density function, and :\bar(x) := \Pr x.html" ;"title=">x">>x= \int_x^ f(u)\, du is the ...
. Note that above, density f of X is used instead of standard normal density as in inverse Mills ratio, so here we have \sigma^2 instead of \sigma.


Fourier transform and characteristic function

The
Fourier transform A Fourier transform (FT) is a mathematical transform that decomposes functions into frequency components, which are represented by the output of the transform as a function of frequency. Most commonly functions of time or space are transformed, ...
of a normal density f with mean \mu and standard deviation \sigma is : \hat f(t) = \int_^\infty f(x)e^ \, dx = e^ e^ where i is the
imaginary unit The imaginary unit or unit imaginary number () is a solution to the quadratic equation x^2+1=0. Although there is no real number with this property, can be used to extend the real numbers to what are called complex numbers, using addition an ...
. If the mean \mu=0, the first factor is 1, and the Fourier transform is, apart from a constant factor, a normal density on the
frequency domain In physics, electronics, control systems engineering, and statistics, the frequency domain refers to the analysis of mathematical functions or signals with respect to frequency, rather than time. Put simply, a time-domain graph shows how a signa ...
, with mean 0 and standard deviation 1/\sigma. In particular, the standard normal distribution \varphi is an
eigenfunction In mathematics, an eigenfunction of a linear operator ''D'' defined on some function space is any non-zero function f in that space that, when acted upon by ''D'', is only multiplied by some scaling factor called an eigenvalue. As an equation, th ...
of the Fourier transform. In probability theory, the Fourier transform of the probability distribution of a real-valued random variable X is closely connected to the
characteristic function In mathematics, the term "characteristic function" can refer to any of several distinct concepts: * The indicator function of a subset, that is the function ::\mathbf_A\colon X \to \, :which for a given subset ''A'' of ''X'', has value 1 at points ...
\varphi_X(t) of that variable, which is defined as the
expected value In probability theory, the expected value (also called expectation, expectancy, mathematical expectation, mean, average, or first moment) is a generalization of the weighted average. Informally, the expected value is the arithmetic mean of a l ...
of e^, as a function of the real variable t (the
frequency Frequency is the number of occurrences of a repeating event per unit of time. It is also occasionally referred to as ''temporal frequency'' for clarity, and is distinct from ''angular frequency''. Frequency is measured in hertz (Hz) which is eq ...
parameter of the Fourier transform). This definition can be analytically extended to a complex-value variable t. The relation between both is: :\varphi_X(t) = \hat f(-t)


Moment and cumulant generating functions

The
moment generating function In probability theory and statistics, the moment-generating function of a real-valued random variable is an alternative specification of its probability distribution. Thus, it provides the basis of an alternative route to analytical results compare ...
of a real random variable X is the expected value of e^, as a function of the real parameter t. For a normal distribution with density f, mean \mu and deviation \sigma, the moment generating function exists and is equal to :M(t) = \operatorname ^= \hat f(it) = e^ e^ The
cumulant generating function In probability theory and statistics, the cumulants of a probability distribution are a set of quantities that provide an alternative to the '' moments'' of the distribution. Any two probability distributions whose moments are identical will have ...
is the logarithm of the moment generating function, namely :g(t) = \ln M(t) = \mu t + \tfrac 12 \sigma^2 t^2 Since this is a quadratic polynomial in t, only the first two
cumulant In probability theory and statistics, the cumulants of a probability distribution are a set of quantities that provide an alternative to the '' moments'' of the distribution. Any two probability distributions whose moments are identical will ha ...
s are nonzero, namely the mean \mu and the variance \sigma^2.


Stein operator and class

Within
Stein's method Stein's method is a general method in probability theory to obtain bounds on the distance between two probability distributions with respect to a probability metric. It was introduced by Charles Stein, who first published it in 1972, to obtain ...
the Stein operator and class of a random variable X \sim \mathcal(\mu, \sigma^2) are \mathcalf(x) = \sigma^2 f'(x) - (x-\mu)f(x) and \mathcal the class of all absolutely continuous functions f : \R \to \R \mbox\mathbb[, f'(X), ]< \infty.


Zero-variance limit

In the limit (mathematics), limit when \sigma tends to zero, the probability density f(x) eventually tends to zero at any x\ne \mu, but grows without limit if x = \mu, while its integral remains equal to 1. Therefore, the normal distribution cannot be defined as an ordinary
function Function or functionality may refer to: Computing * Function key, a type of key on computer keyboards * Function model, a structured representation of processes in a system * Function object or functor or functionoid, a concept of object-oriente ...
when \sigma = 0. However, one can define the normal distribution with zero variance as a
generalized function In mathematics, generalized functions are objects extending the notion of functions. There is more than one recognized theory, for example the theory of distributions. Generalized functions are especially useful in making discontinuous functions ...
; specifically, as Dirac's "delta function" \delta translated by the mean \mu, that is f(x)=\delta(x-\mu). Its CDF is then the
Heaviside step function The Heaviside step function, or the unit step function, usually denoted by or (but sometimes , or ), is a step function, named after Oliver Heaviside (1850–1925), the value of which is zero for negative arguments and one for positive argume ...
translated by the mean \mu, namely :F(x) = \begin 0 & \textx < \mu \\ 1 & \textx \geq \mu \end


Maximum entropy

Of all probability distributions over the reals with a specified mean \mu and variance \sigma^2, the normal distribution N(\mu,\sigma^2) is the one with maximum entropy. If X is a
continuous random variable In probability theory and statistics, a probability distribution is the mathematical function that gives the probabilities of occurrence of different possible outcomes for an experiment. It is a mathematical description of a random phenomenon i ...
with
probability density In probability theory, a probability density function (PDF), or density of a continuous random variable, is a function whose value at any given sample (or point) in the sample space (the set of possible values taken by the random variable) can ...
f(x), then the entropy of X is defined as : H(X) = - \int_^\infty f(x)\log f(x)\, dx where f(x)\log f(x) is understood to be zero whenever f(x)=0. This functional can be maximized, subject to the constraints that the distribution is properly normalized and has a specified variance, by using
variational calculus The calculus of variations (or Variational Calculus) is a field of mathematical analysis that uses variations, which are small changes in functions and functionals, to find maxima and minima of functionals: mappings from a set of functions t ...
. A function with two
Lagrange multipliers In mathematical optimization, the method of Lagrange multipliers is a strategy for finding the local maxima and minima of a function subject to equality constraints (i.e., subject to the condition that one or more equations have to be satisfied ex ...
is defined: : L=\int_^\infty f(x)\ln(f(x))\,dx-\lambda_0\left(1-\int_^\infty f(x)\,dx\right)-\lambda\left(\sigma^2-\int_^\infty f(x)(x-\mu)^2\,dx\right) where f(x) is, for now, regarded as some density function with mean \mu and standard deviation \sigma. At maximum entropy, a small variation \delta f(x) about f(x) will produce a variation \delta L about L which is equal to 0: : 0=\delta L=\int_^\infty \delta f(x)\left (\ln(f(x))+1+\lambda_0+\lambda(x-\mu)^2\right )\,dx Since this must hold for any small \delta f(x), the term in brackets must be zero, and solving for f(x) yields: :f(x)=e^ Using the constraint equations to solve for \lambda_0 and \lambda yields the density of the normal distribution: : f(x, \mu, \sigma)=\frace^ The entropy of a normal distribution is equal to : H(X)=\tfrac(1+\log(2\sigma^2\pi))


Other properties


Related distributions


Central limit theorem

The central limit theorem states that under certain (fairly common) conditions, the sum of many random variables will have an approximately normal distribution. More specifically, where X_1,\ldots ,X_n are
independent and identically distributed In probability theory and statistics, a collection of random variables is independent and identically distributed if each random variable has the same probability distribution as the others and all are mutually independent. This property is usua ...
random variables with the same arbitrary distribution, zero mean, and variance \sigma^2 and Z is their mean scaled by \sqrt : Z = \sqrt\left(\frac\sum_^n X_i\right) Then, as n increases, the probability distribution of Z will tend to the normal distribution with zero mean and variance \sigma^2. The theorem can be extended to variables (X_i) that are not independent and/or not identically distributed if certain constraints are placed on the degree of dependence and the moments of the distributions. Many
test statistic A test statistic is a statistic (a quantity derived from the sample) used in statistical hypothesis testing.Berger, R. L.; Casella, G. (2001). ''Statistical Inference'', Duxbury Press, Second Edition (p.374) A hypothesis test is typically specif ...
s, scores, and
estimator In statistics, an estimator is a rule for calculating an estimate of a given quantity based on observed data: thus the rule (the estimator), the quantity of interest (the estimand) and its result (the estimate) are distinguished. For example, the ...
s encountered in practice contain sums of certain random variables in 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 distributions. The central limit theorem also implies that certain distributions can be approximated by the normal distribution, for example: * The
binomial distribution In probability theory and statistics, the binomial distribution with parameters ''n'' and ''p'' is the discrete probability distribution of the number of successes in a sequence of ''n'' independent experiments, each asking a yes–no quest ...
B(n,p) is approximately normal with mean np and variance np(1-p) for large n and for p not too close to 0 or 1. * The
Poisson distribution In probability theory and statistics, the Poisson distribution is a discrete probability distribution that expresses the probability of a given number of events occurring in a fixed interval of time or space if these events occur with a known co ...
with parameter \lambda is approximately normal with mean \lambda and variance \lambda, for large values of \lambda. * The
chi-squared distribution In probability theory and statistics, the chi-squared distribution (also chi-square or \chi^2-distribution) with k degrees of freedom is the distribution of a sum of the squares of k independent standard normal random variables. The chi-squa ...
\chi^2(k) is approximately normal with mean k and variance 2k, for large k. * The
Student's t-distribution In probability and statistics, Student's ''t''-distribution (or simply the ''t''-distribution) is any member of a family of continuous probability distributions that arise when estimating the mean of a normally distributed population in sit ...
t(\nu) is approximately normal with mean 0 and variance 1 when \nu is large. Whether these approximations are sufficiently accurate depends on the purpose for which they are needed, and the rate of convergence to the normal distribution. It is typically the case that such approximations are less accurate in the tails of the distribution. A general upper bound for the approximation error in the central limit theorem is given by the
Berry–Esseen theorem In probability theory, the central limit theorem states that, under certain circumstances, the probability distribution of the scaled mean of a random sample converges to a normal distribution as the sample size increases to infinity. Under strong ...
, improvements of the approximation are given by the
Edgeworth expansion The Gram–Charlier A series (named in honor of Jørgen Pedersen Gram and Carl Charlier), and the Edgeworth series (named in honor of Francis Ysidro Edgeworth) are series that approximate a probability distribution in terms of its cumulants. The se ...
s. This theorem can also be used to justify modeling the sum of many uniform noise sources as
Gaussian noise Gaussian noise, named after Carl Friedrich Gauss, is a term from signal processing theory denoting a kind of signal noise that has a probability density function (pdf) equal to that of the normal distribution (which is also known as the Gaussia ...
. See
AWGN Additive white Gaussian noise (AWGN) is a basic noise model used in information theory to mimic the effect of many random processes that occur in nature. The modifiers denote specific characteristics: * ''Additive'' because it is added to any nois ...
.


Operations and functions of normal variables

The
probability density In probability theory, a probability density function (PDF), or density of a continuous random variable, is a function whose value at any given sample (or point) in the sample space (the set of possible values taken by the random variable) can ...
,
cumulative distribution In statistics, the frequency (or absolute frequency) of an event i is the number n_i of times the observation has occurred/recorded in an experiment or study. These frequencies are often depicted graphically or in tabular form. Types The cumul ...
, and inverse cumulative distribution of any function of one or more independent or correlated normal variables can be computed with the numerical method of ray-tracing
Matlab code
. In the following sections we look at some special cases.


Operations on a single normal variable

If X is distributed normally with mean \mu and variance \sigma^2, then * aX+b, for any real numbers a and b, is also normally distributed, with mean a\mu+b and standard deviation , a, \sigma. That is, the family of normal distributions is closed under linear transformations. * The exponential of X is distributed log-normally: . * The absolute value of X has
folded normal distribution The folded normal distribution is a probability distribution related to the normal distribution. Given a normally distributed random variable ''X'' with mean ''μ'' and variance ''σ''2, the random variable ''Y'' = , ''X'', has a folded normal d ...
: . If \mu = 0 this is known as the
half-normal distribution In probability theory and statistics, the half-normal distribution is a special case of the folded normal distribution. Let X follow an ordinary normal distribution, N(0,\sigma^2). Then, Y=, X, follows a half-normal distribution. Thus, the hal ...
. * The absolute value of normalized residuals, , ''X'' − ''μ'', /''σ'', has
chi distribution In probability theory and statistics, the chi distribution is a continuous probability distribution. It is the distribution of the positive square root of the sum of squares of a set of independent random variables each following a standard norm ...
with one degree of freedom: , X - \mu, / \sigma \sim \chi_1. * The square of ''X''/''σ'' has the
noncentral chi-squared distribution In probability theory and statistics, the noncentral chi-squared distribution (or noncentral chi-square distribution, noncentral \chi^2 distribution) is a noncentral generalization of the chi-squared distribution. It often arises in the power a ...
with one degree of freedom: X^2 / \sigma^2 \sim \chi_1^2(\mu^2 / \sigma^2). If \mu = 0, the distribution is called simply chi-squared. * The log likelihood of a normal variable x is simply the log of its
probability density function In probability theory, a probability density function (PDF), or density of a continuous random variable, is a function whose value at any given sample (or point) in the sample space (the set of possible values taken by the random variable) can ...
: \ln p(x)= -\frac \left(\frac \right)^2 -\ln \left(\sigma \sqrt \right) = -\frac z^2 -\ln \left(\sigma \sqrt \right). Since this is a scaled and shifted square of a standard normal variable, it is distributed as a scaled and shifted chi-squared variable. * The distribution of the variable ''X'' restricted to an interval 'a'', ''b''is called the
truncated normal distribution In probability and statistics, the truncated normal distribution is the probability distribution derived from that of a normally distributed random variable by bounding the random variable from either below or above (or both). The truncated no ...
. * (''X'' − ''μ'')−2 has a
Lévy distribution In probability theory and statistics, the Lévy distribution, named after Paul Lévy, is a continuous probability distribution for a non-negative random variable. In spectroscopy, this distribution, with frequency as the dependent variable, is kn ...
with location 0 and scale ''σ''−2.


= Operations on two independent normal variables

= * If X_1 and X_2 are two
independent Independent or Independents may refer to: Arts, entertainment, and media Artist groups * Independents (artist group), a group of modernist painters based in the New Hope, Pennsylvania, area of the United States during the early 1930s * Independ ...
normal random variables, with means \mu_1, \mu_2 and standard deviations \sigma_1, \sigma_2, then their sum X_1 + X_2 will also be normally distributed, roof/sup> with mean \mu_1 + \mu_2 and variance \sigma_1^2 + \sigma_2^2. * In particular, if X and Y are independent normal deviates with zero mean and variance \sigma^2, then X + Y and X - Y are also independent and normally distributed, with zero mean and variance 2\sigma^2. This is a special case of the
polarization identity In linear algebra, a branch of mathematics, the polarization identity is any one of a family of formulas that express the inner product of two vectors in terms of the norm of a normed vector space. If a norm arises from an inner product then t ...
. * If X_1, X_2 are two independent normal deviates with mean \mu and deviation \sigma, and a, b are arbitrary real numbers, then the variable X_3 = \frac + \mu is also normally distributed with mean \mu and deviation \sigma. It follows that the normal distribution is
stable A stable is a building in which livestock, especially horses, are kept. It most commonly means a building that is divided into separate stalls for individual animals and livestock. There are many different types of stables in use today; the ...
(with exponent \alpha=2).


= Operations on two independent standard normal variables

= If X_1 and X_2 are two independent standard normal random variables with mean 0 and variance 1, then * Their sum and difference is distributed normally with mean zero and variance two: X_1 \pm X_2 \sim N(0, 2). * Their product Z = X_1 X_2 follows the
product distribution A product distribution is a probability distribution constructed as the distribution of the product of random variables having two other known distributions. Given two statistically independent random variables ''X'' and ''Y'', the distribution of ...
with density function f_Z(z) = \pi^ K_0(, z, ) where K_0 is the
modified Bessel function of the second kind Bessel functions, first defined by the mathematician Daniel Bernoulli and then generalized by Friedrich Bessel, are canonical solutions of Bessel's differential equation x^2 \frac + x \frac + \left(x^2 - \alpha^2 \right)y = 0 for an arbitrary ...
. This distribution is symmetric around zero, unbounded at z = 0, and has the
characteristic function In mathematics, the term "characteristic function" can refer to any of several distinct concepts: * The indicator function of a subset, that is the function ::\mathbf_A\colon X \to \, :which for a given subset ''A'' of ''X'', has value 1 at points ...
\phi_Z(t) = (1 + t^2)^. * Their ratio follows the standard
Cauchy distribution The Cauchy distribution, named after Augustin Cauchy, is a continuous probability distribution. It is also known, especially among physicists, as the Lorentz distribution (after Hendrik Lorentz), Cauchy–Lorentz distribution, Lorentz(ian) fun ...
: X_1/ X_2 \sim \operatorname(0, 1). * Their Euclidean norm \sqrt has the
Rayleigh distribution In probability theory and statistics, the Rayleigh distribution is a continuous probability distribution for nonnegative-valued random variables. Up to rescaling, it coincides with the chi distribution with two degrees of freedom. The distribut ...
.


Operations on multiple independent normal variables

* Any linear combination of independent normal deviates is a normal deviate. * If X_1, X_2, \ldots, X_n are independent standard normal random variables, then the sum of their squares has the
chi-squared distribution In probability theory and statistics, the chi-squared distribution (also chi-square or \chi^2-distribution) with k degrees of freedom is the distribution of a sum of the squares of k independent standard normal random variables. The chi-squa ...
with n degrees of freedom X_1^2 + \cdots + X_n^2 \sim \chi_n^2. * If X_1, X_2, \ldots, X_n are independent normally distributed random variables with means \mu and variances \sigma^2, then their
sample mean The sample mean (or "empirical mean") and the sample covariance are statistics computed from a Sample (statistics), sample of data on one or more random variables. The sample mean is the average value (or mean, mean value) of a sample (statistic ...
is independent from the sample
standard deviation In statistics, the standard deviation is a measure of the amount of variation or dispersion of a set of values. A low standard deviation indicates that the values tend to be close to the mean (also called the expected value) of the set, while ...
, which can be demonstrated using Basu's theorem or
Cochran's theorem In statistics, Cochran's theorem, devised by William G. Cochran, is a theorem used to justify results relating to the probability distributions of statistics that are used in the analysis of variance. Statement Let ''U''1, ..., ''U'N'' be i.i. ...
. The ratio of these two quantities will have the
Student's t-distribution In probability and statistics, Student's ''t''-distribution (or simply the ''t''-distribution) is any member of a family of continuous probability distributions that arise when estimating the mean of a normally distributed population in sit ...
with n-1 degrees of freedom: t = \frac = \frac \sim t_. * If X_1, X_2, \ldots, X_n, Y_1, Y_2, \ldots, Y_m are independent standard normal random variables, then the ratio of their normalized sums of squares will have the with degrees of freedom: F = \frac \sim F_.


Operations on multiple correlated normal variables

* A
quadratic form In mathematics, a quadratic form is a polynomial with terms all of degree two ("form" is another name for a homogeneous polynomial). For example, :4x^2 + 2xy - 3y^2 is a quadratic form in the variables and . The coefficients usually belong to a ...
of a normal vector, i.e. a quadratic function q = \sum x_i^2 + \sum x_j + c of multiple independent or correlated normal variables, is a generalized chi-square variable.


Operations on the density function

The split normal distribution is most directly defined in terms of joining scaled sections of the density functions of different normal distributions and rescaling the density to integrate to one. The
truncated normal distribution In probability and statistics, the truncated normal distribution is the probability distribution derived from that of a normally distributed random variable by bounding the random variable from either below or above (or both). The truncated no ...
results from rescaling a section of a single density function.


Infinite divisibility and Cramér's theorem

For any positive integer \text, any normal distribution with mean \mu and variance \sigma^2 is the distribution of the sum of \text independent normal deviates, each with mean \frac and variance \frac. This property is called
infinite divisibility Infinite divisibility arises in different ways in philosophy, physics, economics, order theory (a branch of mathematics), and probability theory (also a branch of mathematics). One may speak of infinite divisibility, or the lack thereof, of matter ...
. Conversely, if X_1 and X_2 are independent random variables and their sum X_1+X_2 has a normal distribution, then both X_1 and X_2 must be normal deviates. This result is known as Cramér's decomposition theorem, and is equivalent to saying that the convolution of two distributions is normal if and only if both are normal. Cramér's theorem implies that a linear combination of independent non-Gaussian variables will never have an exactly normal distribution, although it may approach it arbitrarily closely.


Bernstein's theorem

Bernstein's theorem states that if X and Y are independent and X + Y and X - Y are also independent, then both ''X'' and ''Y'' must necessarily have normal distributions. More generally, if X_1, \ldots, X_n are independent random variables, then two distinct linear combinations \sum and \sumwill be independent if and only if all X_k are normal and \sum, where \sigma_k^2 denotes the variance of X_k.


Extensions

The notion of normal distribution, being one of the most important distributions in probability theory, has been extended far beyond the standard framework of the univariate (that is one-dimensional) case (Case 1). All these extensions are also called ''normal'' or ''Gaussian'' laws, so a certain ambiguity in names exists. * The
multivariate normal distribution In probability theory and statistics, the multivariate normal distribution, multivariate Gaussian distribution, or joint normal distribution is a generalization of the one-dimensional (univariate) normal distribution to higher dimensions. One d ...
describes the Gaussian law in the ''k''-dimensional Euclidean space. A vector is multivariate-normally distributed if any linear combination of its components has a (univariate) normal distribution. The variance of ''X'' is a ''k×k'' symmetric positive-definite matrix ''V''. The multivariate normal distribution is a special case of the
elliptical distribution In probability and statistics, an elliptical distribution is any member of a broad family of probability distributions that generalize the multivariate normal distribution. Intuitively, in the simplified two and three dimensional case, the joint di ...
s. As such, its iso-density loci in the ''k'' = 2 case are ellipses and in the case of arbitrary ''k'' are ellipsoids. * Rectified Gaussian distribution a rectified version of normal distribution with all the negative elements reset to 0 * Complex normal distribution deals with the complex normal vectors. A complex vector is said to be normal if both its real and imaginary components jointly possess a 2''k''-dimensional multivariate normal distribution. The variance-covariance structure of ''X'' is described by two matrices: the ''variance'' matrix Γ, and the ''relation'' matrix ''C''. * Matrix normal distribution describes the case of normally distributed matrices. * Gaussian processes are the normally distributed stochastic processes. These can be viewed as elements of some infinite-dimensional Hilbert space ''H'', and thus are the analogues of multivariate normal vectors for the case . A random element is said to be normal if for any constant the scalar product has a (univariate) normal distribution. The variance structure of such Gaussian random element can be described in terms of the linear ''covariance ''. Several Gaussian processes became popular enough to have their own names: ** Wiener process, Brownian motion, ** Brownian bridge, ** Ornstein–Uhlenbeck process. * Gaussian q-distribution is an abstract mathematical construction that represents a "q-analogue" of the normal distribution. * the q-Gaussian is an analogue of the Gaussian distribution, in the sense that it maximises the Tsallis entropy, and is one type of Tsallis distribution. Note that this distribution is different from the Gaussian q-distribution above. * The Kaniadakis Gaussian distribution, Kaniadakis ''κ''-Gaussian distribution is a generalization of the Gaussian distribution which arises from the Kaniadakis statistics, being one of the Kaniadakis distribution, Kaniadakis distributions. A random variable ''X'' has a two-piece normal distribution if it has a distribution : f_X( x ) = N( \mu, \sigma_1^2 ) \text x \le \mu : f_X( x ) = N( \mu, \sigma_2^2 ) \text x \ge \mu where ''μ'' is the mean and ''σ''1 and ''σ''2 are the standard deviations of the distribution to the left and right of the mean respectively. The mean, variance and third central moment of this distribution have been determined : \operatorname( X ) = \mu + \sqrt ( \sigma_2 - \sigma_1 ) : \operatorname( X ) = \left( 1 - \frac 2 \pi\right)( \sigma_2 - \sigma_1 )^2 + \sigma_1 \sigma_2 : \operatorname( X ) = \sqrt( \sigma_2 - \sigma_1 ) \left[ \left( \frac 4 \pi - 1 \right) ( \sigma_2 - \sigma_1)^2 + \sigma_1 \sigma_2 \right] where E(''X''), V(''X'') and T(''X'') are the mean, variance, and third central moment respectively. One of the main practical uses of the Gaussian law is to model the empirical distributions of many different random variables encountered in practice. In such case a possible extension would be a richer family of distributions, having more than two parameters and therefore being able to fit the empirical distribution more accurately. The examples of such extensions are: * Pearson distribution — a four-parameter family of probability distributions that extend the normal law to include different skewness and kurtosis values. * The generalized normal distribution, also known as the exponential power distribution, allows for distribution tails with thicker or thinner asymptotic behaviors.


Statistical inference


Estimation of parameters

It is often the case that we do not know the parameters of the normal distribution, but instead want to Estimation theory, estimate them. That is, having a sample (x_1, \ldots, x_n) from a normal N(\mu, \sigma^2) population we would like to learn the approximate values of parameters \mu and \sigma^2. The standard approach to this problem is the maximum likelihood method, which requires maximization of the ''log-likelihood function'': : \ln\mathcal(\mu,\sigma^2) = \sum_^n \ln f(x_i\mid\mu,\sigma^2) = -\frac\ln(2\pi) - \frac\ln\sigma^2 - \frac\sum_^n (x_i-\mu)^2. Taking derivatives with respect to \mu and \sigma^2 and solving the resulting system of first order conditions yields the ''maximum likelihood estimates'': : \hat = \overline \equiv \frac\sum_^n x_i, \qquad \hat^2 = \frac \sum_^n (x_i - \overline)^2.


Sample mean

Estimator \textstyle\hat\mu is called the ''
sample mean The sample mean (or "empirical mean") and the sample covariance are statistics computed from a Sample (statistics), sample of data on one or more random variables. The sample mean is the average value (or mean, mean value) of a sample (statistic ...
'', since it is the arithmetic mean of all observations. The statistic \textstyle\overline is complete statistic, complete and sufficient statistic, sufficient for \mu, and therefore by the Lehmann–Scheffé theorem, \textstyle\hat\mu is the uniformly minimum variance unbiased (UMVU) estimator. In finite samples it is distributed normally: : \hat\mu \sim \mathcal(\mu,\sigma^2/n). The variance of this estimator is equal to the ''μμ''-element of the inverse Fisher information matrix \textstyle\mathcal^. This implies that the estimator is efficient estimator, finite-sample efficient. Of practical importance is the fact that the standard error (statistics), standard error of \textstyle\hat\mu is proportional to \textstyle1/\sqrt, that is, if one wishes to decrease the standard error by a factor of 10, one must increase the number of points in the sample by a factor of 100. This fact is widely used in determining sample sizes for opinion polls and the number of trials in Monte Carlo simulations. From the standpoint of the asymptotic theory (statistics), asymptotic theory, \textstyle\hat\mu is consistent estimator, consistent, that is, it convergence in probability, converges in probability to \mu as n\rightarrow\infty. The estimator is also asymptotic normality, asymptotically normal, which is a simple corollary of the fact that it is normal in finite samples: : \sqrt(\hat\mu-\mu) \,\xrightarrow\, \mathcal(0,\sigma^2).


Sample variance

The estimator \textstyle\hat\sigma^2 is called the ''sample variance'', since it is the variance of the sample ((x_1, \ldots, x_n)). In practice, another estimator is often used instead of the \textstyle\hat\sigma^2. This other estimator is denoted s^2, and is also called the ''sample variance'', which represents a certain ambiguity in terminology; its square root s is called the ''sample standard deviation''. The estimator s^2 differs from \textstyle\hat\sigma^2 by having instead of ''n'' in the denominator (the so-called Bessel's correction): : s^2 = \frac \hat\sigma^2 = \frac \sum_^n (x_i - \overline)^2. The difference between s^2 and \textstyle\hat\sigma^2 becomes negligibly small for large ''n''s. In finite samples however, the motivation behind the use of s^2 is that it is an unbiased estimator of the underlying parameter \sigma^2, whereas \textstyle\hat\sigma^2 is biased. Also, by the Lehmann–Scheffé theorem the estimator s^2 is uniformly minimum variance unbiased (Minimum-variance unbiased estimator, UMVU), which makes it the "best" estimator among all unbiased ones. However it can be shown that the biased estimator \textstyle\hat\sigma^2 is "better" than the s^2 in terms of the mean squared error (MSE) criterion. In finite samples both s^2 and \textstyle\hat\sigma^2 have scaled
chi-squared distribution In probability theory and statistics, the chi-squared distribution (also chi-square or \chi^2-distribution) with k degrees of freedom is the distribution of a sum of the squares of k independent standard normal random variables. The chi-squa ...
with degrees of freedom: : s^2 \sim \frac \cdot \chi^2_, \qquad \hat\sigma^2 \sim \frac \cdot \chi^2_. The first of these expressions shows that the variance of s^2 is equal to 2\sigma^4/(n-1), which is slightly greater than the ''σσ''-element of the inverse Fisher information matrix \textstyle\mathcal^. Thus, s^2 is not an efficient estimator for \sigma^2, and moreover, since s^2 is UMVU, we can conclude that the finite-sample efficient estimator for \sigma^2 does not exist. Applying the asymptotic theory, both estimators s^2 and \textstyle\hat\sigma^2 are consistent, that is they converge in probability to \sigma^2 as the sample size n\rightarrow\infty. The two estimators are also both asymptotically normal: : \sqrt(\hat\sigma^2 - \sigma^2) \simeq \sqrt(s^2-\sigma^2) \,\xrightarrow\, \mathcal(0,2\sigma^4). In particular, both estimators are asymptotically efficient for \sigma^2.


Confidence intervals

By
Cochran's theorem In statistics, Cochran's theorem, devised by William G. Cochran, is a theorem used to justify results relating to the probability distributions of statistics that are used in the analysis of variance. Statement Let ''U''1, ..., ''U'N'' be i.i. ...
, for normal distributions the sample mean \textstyle\hat\mu and the sample variance ''s''2 are
independent Independent or Independents may refer to: Arts, entertainment, and media Artist groups * Independents (artist group), a group of modernist painters based in the New Hope, Pennsylvania, area of the United States during the early 1930s * Independ ...
, which means there can be no gain in considering their joint distribution. There is also a converse theorem: if in a sample the sample mean and sample variance are independent, then the sample must have come from the normal distribution. The independence between \textstyle\hat\mu and ''s'' can be employed to construct the so-called ''t-statistic'': : t = \frac = \frac \sim t_ This quantity ''t'' has the
Student's t-distribution In probability and statistics, Student's ''t''-distribution (or simply the ''t''-distribution) is any member of a family of continuous probability distributions that arise when estimating the mean of a normally distributed population in sit ...
with degrees of freedom, and it is an ancillary statistic (independent of the value of the parameters). Inverting the distribution of this ''t''-statistics will allow us to construct the
confidence interval In frequentist statistics, a confidence interval (CI) is a range of estimates for an unknown parameter. A confidence interval is computed at a designated ''confidence level''; the 95% confidence level is most common, but other levels, such as 9 ...
for ''μ''; similarly, inverting the ''χ''2 distribution of the statistic ''s''2 will give us the confidence interval for ''σ''2: :\mu \in \left[ \hat\mu - t_ \fracs, \hat\mu + t_ \fracs \right], :\sigma^2 \in \left[ \frac, \frac \right], where ''tk,p'' and are the ''p''th
quantile In statistics and probability, quantiles are cut points dividing the range of a probability distribution into continuous intervals with equal probabilities, or dividing the observations in a sample in the same way. There is one fewer quantile tha ...
s of the ''t''- and ''χ''2-distributions respectively. These confidence intervals are of the ''confidence level'' , meaning that the true values ''μ'' and ''σ''2 fall outside of these intervals with probability (or significance level) ''α''. In practice people usually take , resulting in the 95% confidence intervals. Approximate formulas can be derived from the asymptotic distributions of \textstyle\hat\mu and ''s''2: :\mu \in \left[ \hat\mu - , z_, \fracs, \hat\mu + , z_, \fracs \right], :\sigma^2 \in \left[ s^2 - , z_, \fracs^2, s^2 + , z_, \fracs^2 \right], The approximate formulas become valid for large values of ''n'', and are more convenient for the manual calculation since the standard normal quantiles ''z''''α''/2 do not depend on ''n''. In particular, the most popular value of , results in .


Normality tests

Normality tests assess the likelihood that the given data set comes from a normal distribution. Typically the null hypothesis ''H''0 is that the observations are distributed normally with unspecified mean ''μ'' and variance ''σ''2, versus the alternative ''Ha'' that the distribution is arbitrary. Many tests (over 40) have been devised for this problem. The more prominent of them are outlined below: Diagnostic plots are more intuitively appealing but subjective at the same time, as they rely on informal human judgement to accept or reject the null hypothesis. *
Q–Q plot In statistics, a Q–Q plot (quantile-quantile plot) is a probability plot, a List of graphical methods, graphical method for comparing two probability distributions by plotting their ''quantiles'' against each other. A point on the plot co ...
, also known as normal probability plot or rankit plot—is a plot of the sorted values from the data set against the expected values of the corresponding quantiles from the standard normal distribution. That is, it's a plot of point of the form (Φ−1(''pk''), ''x''(''k'')), where plotting points ''pk'' are equal to ''pk'' = (''k'' − ''α'')/(''n'' + 1 − 2''α'') and ''α'' is an adjustment constant, which can be anything between 0 and 1. If the null hypothesis is true, the plotted points should approximately lie on a straight line. * P–P plot – similar to the Q–Q plot, but used much less frequently. This method consists of plotting the points (Φ(''z''(''k'')), ''pk''), where \textstyle z_ = (x_-\hat\mu)/\hat\sigma. For normally distributed data this plot should lie on a 45° line between (0, 0) and (1, 1). Goodness-of-fit tests: ''Moment-based tests'': * D'Agostino's K-squared test * Jarque–Bera test * Shapiro–Wilk test: This is based on the fact that the line in the Q–Q plot has the slope of ''σ''. The test compares the least squares estimate of that slope with the value of the sample variance, and rejects the null hypothesis if these two quantities differ significantly. ''Tests based on the empirical distribution function'': * Anderson–Darling test * Lilliefors test (an adaptation of the Kolmogorov–Smirnov test)


Bayesian analysis of the normal distribution

Bayesian analysis of normally distributed data is complicated by the many different possibilities that may be considered: * Either the mean, or the variance, or neither, may be considered a fixed quantity. * When the variance is unknown, analysis may be done directly in terms of the variance, or in terms of the
precision Precision, precise or precisely may refer to: Science, and technology, and mathematics Mathematics and computing (general) * Accuracy and precision, measurement deviation from true value and its scatter * Significant figures, the number of digit ...
, the reciprocal of the variance. The reason for expressing the formulas in terms of precision is that the analysis of most cases is simplified. * Both univariate and multivariate normal distribution, multivariate cases need to be considered. * Either conjugate prior, conjugate or improper prior, improper prior distributions may be placed on the unknown variables. * An additional set of cases occurs in Bayesian linear regression, where in the basic model the data is assumed to be normally distributed, and normal priors are placed on the regression coefficients. The resulting analysis is similar to the basic cases of independent identically distributed data. The formulas for the non-linear-regression cases are summarized in the conjugate prior article.


Sum of two quadratics


= Scalar form

= The following auxiliary formula is useful for simplifying the posterior distribution, posterior update equations, which otherwise become fairly tedious. :a(x-y)^2 + b(x-z)^2 = (a + b)\left(x - \frac\right)^2 + \frac(y-z)^2 This equation rewrites the sum of two quadratics in ''x'' by expanding the squares, grouping the terms in ''x'', and completing the square. Note the following about the complex constant factors attached to some of the terms: # The factor \frac has the form of a weighted average of ''y'' and ''z''. # \frac = \frac = (a^ + b^)^. This shows that this factor can be thought of as resulting from a situation where the Multiplicative inverse, reciprocals of quantities ''a'' and ''b'' add directly, so to combine ''a'' and ''b'' themselves, it's necessary to reciprocate, add, and reciprocate the result again to get back into the original units. This is exactly the sort of operation performed by the harmonic mean, so it is not surprising that \frac is one-half the harmonic mean of ''a'' and ''b''.


= Vector form

= A similar formula can be written for the sum of two vector quadratics: If x, y, z are vectors of length ''k'', and A and B are symmetric matrix, symmetric, invertible matrices of size k\times k, then : \begin & (\mathbf-\mathbf)'\mathbf(\mathbf-\mathbf) + (\mathbf-\mathbf)' \mathbf(\mathbf-\mathbf) \\ = & (\mathbf - \mathbf)'(\mathbf+\mathbf)(\mathbf - \mathbf) + (\mathbf - \mathbf)'(\mathbf^ + \mathbf^)^(\mathbf - \mathbf) \end where :\mathbf = (\mathbf + \mathbf)^(\mathbf\mathbf + \mathbf \mathbf) Note that the form x′ A x is called a
quadratic form In mathematics, a quadratic form is a polynomial with terms all of degree two ("form" is another name for a homogeneous polynomial). For example, :4x^2 + 2xy - 3y^2 is a quadratic form in the variables and . The coefficients usually belong to a ...
and is a scalar (mathematics), scalar: :\mathbf'\mathbf\mathbf = \sum_a_ x_i x_j In other words, it sums up all possible combinations of products of pairs of elements from x, with a separate coefficient for each. In addition, since x_i x_j = x_j x_i, only the sum a_ + a_ matters for any off-diagonal elements of A, and there is no loss of generality in assuming that A is symmetric matrix, symmetric. Furthermore, if A is symmetric, then the form \mathbf'\mathbf\mathbf = \mathbf'\mathbf\mathbf.


Sum of differences from the mean

Another useful formula is as follows: \sum_^n (x_i-\mu)^2 = \sum_^n (x_i-\bar)^2 + n(\bar -\mu)^2 where \bar = \frac \sum_^n x_i.


With known variance

For a set of i.i.d. normally distributed data points X of size ''n'' where each individual point ''x'' follows x \sim \mathcal(\mu, \sigma^2) with known
variance In probability theory and statistics, variance is the expectation of the squared deviation of a random variable from its population mean or sample mean. Variance is a measure of dispersion, meaning it is a measure of how far a set of numbers ...
σ2, the conjugate prior distribution is also normally distributed. This can be shown more easily by rewriting the variance as the
precision Precision, precise or precisely may refer to: Science, and technology, and mathematics Mathematics and computing (general) * Accuracy and precision, measurement deviation from true value and its scatter * Significant figures, the number of digit ...
, i.e. using τ = 1/σ2. Then if x \sim \mathcal(\mu, 1/\tau) and \mu \sim \mathcal(\mu_0, 1/\tau_0), we proceed as follows. First, the likelihood function is (using the formula above for the sum of differences from the mean): :\begin p(\mathbf\mid\mu,\tau) &= \prod_^n \sqrt \exp\left(-\frac\tau(x_i-\mu)^2\right) \\ &= \left(\frac\right)^ \exp\left(-\frac\tau \sum_^n (x_i-\mu)^2\right) \\ &= \left(\frac\right)^ \exp\left[-\frac\tau \left(\sum_^n(x_i-\bar)^2 + n(\bar -\mu)^2\right)\right]. \end Then, we proceed as follows: :\begin p(\mu\mid\mathbf) &\propto p(\mathbf\mid\mu) p(\mu) \\ & = \left(\frac\right)^ \exp\left[-\frac\tau \left(\sum_^n(x_i-\bar)^2 + n(\bar -\mu)^2\right)\right] \sqrt \exp\left(-\frac\tau_0(\mu-\mu_0)^2\right) \\ &\propto \exp\left(-\frac\left(\tau\left(\sum_^n(x_i-\bar)^2 + n(\bar -\mu)^2\right) + \tau_0(\mu-\mu_0)^2\right)\right) \\ &\propto \exp\left(-\frac \left(n\tau(\bar-\mu)^2 + \tau_0(\mu-\mu_0)^2 \right)\right) \\ &= \exp\left(-\frac(n\tau + \tau_0)\left(\mu - \dfrac\right)^2 + \frac(\bar - \mu_0)^2\right) \\ &\propto \exp\left(-\frac(n\tau + \tau_0)\left(\mu - \dfrac\right)^2\right) \end In the above derivation, we used the formula above for the sum of two quadratics and eliminated all constant factors not involving ''μ''. The result is the kernel (statistics), kernel of a normal distribution, with mean \frac and precision n\tau + \tau_0, i.e. :p(\mu\mid\mathbf) \sim \mathcal\left(\frac, \frac\right) This can be written as a set of Bayesian update equations for the posterior parameters in terms of the prior parameters: :\begin \tau_0' &= \tau_0 + n\tau \\[5pt] \mu_0' &= \frac \\[5pt] \bar &= \frac\sum_^n x_i \end That is, to combine ''n'' data points with total precision of ''nτ'' (or equivalently, total variance of ''n''/''σ''2) and mean of values \bar, derive a new total precision simply by adding the total precision of the data to the prior total precision, and form a new mean through a ''precision-weighted average'', i.e. a weighted average of the data mean and the prior mean, each weighted by the associated total precision. This makes logical sense if the precision is thought of as indicating the certainty of the observations: In the distribution of the posterior mean, each of the input components is weighted by its certainty, and the certainty of this distribution is the sum of the individual certainties. (For the intuition of this, compare the expression "the whole is (or is not) greater than the sum of its parts". In addition, consider that the knowledge of the posterior comes from a combination of the knowledge of the prior and likelihood, so it makes sense that we are more certain of it than of either of its components.) The above formula reveals why it is more convenient to do Bayesian analysis of conjugate priors for the normal distribution in terms of the precision. The posterior precision is simply the sum of the prior and likelihood precisions, and the posterior mean is computed through a precision-weighted average, as described above. The same formulas can be written in terms of variance by reciprocating all the precisions, yielding the more ugly formulas :\begin ' &= \frac \\[5pt] \mu_0' &= \frac \\[5pt] \bar &= \frac\sum_^n x_i \end


With known mean

For a set of i.i.d. normally distributed data points X of size ''n'' where each individual point ''x'' follows x \sim \mathcal(\mu, \sigma^2) with known mean μ, the conjugate prior of the
variance In probability theory and statistics, variance is the expectation of the squared deviation of a random variable from its population mean or sample mean. Variance is a measure of dispersion, meaning it is a measure of how far a set of numbers ...
has an inverse gamma distribution or a scaled inverse chi-squared distribution. The two are equivalent 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. The prior for σ2 is as follows: :p(\sigma^2\mid\nu_0,\sigma_0^2) = \frac~\frac \propto \frac The likelihood function from above, written in terms of the variance, is: :\begin p(\mathbf\mid\mu,\sigma^2) &= \left(\frac\right)^ \exp\left[-\frac \sum_^n (x_i-\mu)^2\right] \\ &= \left(\frac\right)^ \exp\left[-\frac\right] \end where :S = \sum_^n (x_i-\mu)^2. Then: :\begin p(\sigma^2\mid\mathbf) &\propto p(\mathbf\mid\sigma^2) p(\sigma^2) \\ &= \left(\frac\right)^ \exp\left[-\frac\right] \frac~\frac \\ &\propto \left(\frac\right)^ \frac \exp\left[-\frac + \frac\right] \\ &= \frac \exp\left[-\frac\right] \end The above is also a scaled inverse chi-squared distribution where :\begin \nu_0' &= \nu_0 + n \\ \nu_0'' &= \nu_0 \sigma_0^2 + \sum_^n (x_i-\mu)^2 \end or equivalently :\begin \nu_0' &= \nu_0 + n \\ ' &= \frac \end Reparameterizing in terms of an inverse gamma distribution, the result is: :\begin \alpha' &= \alpha + \frac \\ \beta' &= \beta + \frac \end


With unknown mean and unknown variance

For a set of i.i.d. normally distributed data points X of size ''n'' where each individual point ''x'' follows x \sim \mathcal(\mu, \sigma^2) with unknown mean μ and unknown
variance In probability theory and statistics, variance is the expectation of the squared deviation of a random variable from its population mean or sample mean. Variance is a measure of dispersion, meaning it is a measure of how far a set of numbers ...
σ2, a combined (multivariate) conjugate prior is placed over the mean and variance, consisting of a normal-inverse-gamma distribution. Logically, this originates as follows: # From the analysis of the case with unknown mean but known variance, we see that the update equations involve sufficient statistics computed from the data consisting of the mean of the data points and the total variance of the data points, computed in turn from the known variance divided by the number of data points. # From the analysis of the case with unknown variance but known mean, we see that the update equations involve sufficient statistics over the data consisting of the number of data points and sum of squared deviations. # Keep in mind that the posterior update values serve as the prior distribution when further data is handled. Thus, we should logically think of our priors in terms of the sufficient statistics just described, with the same semantics kept in mind as much as possible. # To handle the case where both mean and variance are unknown, we could place independent priors over the mean and variance, with fixed estimates of the average mean, total variance, number of data points used to compute the variance prior, and sum of squared deviations. Note however that in reality, the total variance of the mean depends on the unknown variance, and the sum of squared deviations that goes into the variance prior (appears to) depend on the unknown mean. In practice, the latter dependence is relatively unimportant: Shifting the actual mean shifts the generated points by an equal amount, and on average the squared deviations will remain the same. This is not the case, however, with the total variance of the mean: As the unknown variance increases, the total variance of the mean will increase proportionately, and we would like to capture this dependence. # This suggests that we create a ''conditional prior'' of the mean on the unknown variance, with a hyperparameter specifying the mean of the pseudo-observations associated with the prior, and another parameter specifying the number of pseudo-observations. This number serves as a scaling parameter on the variance, making it possible to control the overall variance of the mean relative to the actual variance parameter. The prior for the variance also has two hyperparameters, one specifying the sum of squared deviations of the pseudo-observations associated with the prior, and another specifying once again the number of pseudo-observations. Note that each of the priors has a hyperparameter specifying the number of pseudo-observations, and in each case this controls the relative variance of that prior. These are given as two separate hyperparameters so that the variance (aka the confidence) of the two priors can be controlled separately. # This leads immediately to the normal-inverse-gamma distribution, which is the product of the two distributions just defined, with conjugate priors used (an inverse gamma distribution over the variance, and a normal distribution over the mean, ''conditional'' on the variance) and with the same four parameters just defined. The priors are normally defined as follows: :\begin p(\mu\mid\sigma^2; \mu_0, n_0) &\sim \mathcal(\mu_0,\sigma^2/n_0) \\ p(\sigma^2; \nu_0,\sigma_0^2) &\sim I\chi^2(\nu_0,\sigma_0^2) = IG(\nu_0/2, \nu_0\sigma_0^2/2) \end The update equations can be derived, and look as follows: :\begin \bar &= \frac 1 n \sum_^n x_i \\ \mu_0' &= \frac \\ n_0' &= n_0 + n \\ \nu_0' &= \nu_0 + n \\ \nu_0'' &= \nu_0 \sigma_0^2 + \sum_^n (x_i-\bar)^2 + \frac(\mu_0 - \bar)^2 \end The respective numbers of pseudo-observations add the number of actual observations to them. The new mean hyperparameter is once again a weighted average, this time weighted by the relative numbers of observations. Finally, the update for \nu_0'' is similar to the case with known mean, but in this case the sum of squared deviations is taken with respect to the observed data mean rather than the true mean, and as a result a new "interaction term" needs to be added to take care of the additional error source stemming from the deviation between prior and data mean.


Occurrence and applications

The occurrence of normal distribution in practical problems can be loosely classified into four categories: # Exactly normal distributions; # Approximately normal laws, for example when such approximation is justified by the
central limit theorem In probability theory, the central limit theorem (CLT) establishes that, in many situations, when independent random variables are summed up, their properly normalized sum tends toward a normal distribution even if the original variables themselv ...
; and # Distributions modeled as normal – the normal distribution being the distribution with Principle of maximum entropy, maximum entropy for a given mean and variance. # Regression problems – the normal distribution being found after systematic effects have been modeled sufficiently well.


Exact normality

Certain quantities in physics are distributed normally, as was first demonstrated by James Clerk Maxwell. Examples of such quantities are: * Probability density function of a ground state in a quantum harmonic oscillator. * The position of a particle that experiences diffusion. If initially the particle is located at a specific point (that is its probability distribution is the Dirac delta function), then after time ''t'' its location is described by a normal distribution with variance ''t'', which satisfies the diffusion equation \frac f(x,t) = \frac \frac f(x,t). If the initial location is given by a certain density function g(x), then the density at time ''t'' is the convolution of ''g'' and the normal PDF.


Approximate normality

''Approximately'' normal distributions occur in many situations, as explained by the
central limit theorem In probability theory, the central limit theorem (CLT) establishes that, in many situations, when independent random variables are summed up, their properly normalized sum tends toward a normal distribution even if the original variables themselv ...
. When the outcome is produced by many small effects acting ''additively and independently'', its distribution will be close to normal. The normal approximation will not be valid if the effects act multiplicatively (instead of additively), or if there is a single external influence that has a considerably larger magnitude than the rest of the effects. * In counting problems, where the central limit theorem includes a discrete-to-continuum approximation and where Infinite divisibility, infinitely divisible and Indecomposable distribution, decomposable distributions are involved, such as ** binomial distribution, Binomial random variables, associated with binary response variables; ** Poisson distribution, Poisson random variables, associated with rare events; * Thermal radiation has a Bose–Einstein statistics, Bose–Einstein distribution on very short time scales, and a normal distribution on longer timescales due to the central limit theorem.


Assumed normality

There are statistical methods to empirically test that assumption; see the above #Normality tests, Normality tests section. * In biology, the ''logarithm'' of various variables tend to have a normal distribution, that is, they tend to have a
log-normal distribution In probability theory, a log-normal (or lognormal) distribution is a continuous probability distribution of a random variable whose logarithm is normally distributed. Thus, if the random variable is log-normally distributed, then has a normal ...
(after separation on male/female subpopulations), with examples including: ** Measures of size of living tissue (length, height, skin area, weight); ** The ''length'' of ''inert'' appendages (hair, claws, nails, teeth) of biological specimens, ''in the direction of growth''; presumably the thickness of tree bark also falls under this category; ** Certain physiological measurements, such as blood pressure of adult humans. * In finance, in particular the Black–Scholes model, changes in the ''logarithm'' of exchange rates, price indices, and stock market indices are assumed normal (these variables behave like compound interest, not like simple interest, and so are multiplicative). Some mathematicians such as Benoit Mandelbrot have argued that Levy skew alpha-stable distribution, log-Levy distributions, which possesses heavy tails would be a more appropriate model, in particular for the analysis for stock market crashes. The use of the assumption of normal distribution occurring in financial models has also been criticized by Nassim Nicholas Taleb in his works. * Propagation of uncertainty, Measurement errors in physical experiments are often modeled by a normal distribution. This use of a normal distribution does not imply that one is assuming the measurement errors are normally distributed, rather using the normal distribution produces the most conservative predictions possible given only knowledge about the mean and variance of the errors. * In Standardized testing (statistics), standardized testing, results can be made to have a normal distribution by either selecting the number and difficulty of questions (as in the Intelligence quotient, IQ test) or transforming the raw test scores into "output" scores by fitting them to the normal distribution. For example, the SAT's traditional range of 200–800 is based on a normal distribution with a mean of 500 and a standard deviation of 100. * Many scores are derived from the normal distribution, including percentile ranks ("percentiles" or "quantiles"), normal curve equivalents, stanines, Standard score, z-scores, and T-scores. Additionally, some behavioral statistical procedures assume that scores are normally distributed; for example, Student's t-test, t-tests and Analysis of variance, ANOVAs. Bell curve grading assigns relative grades based on a normal distribution of scores. * In hydrology the distribution of long duration river discharge or rainfall, e.g. monthly and yearly totals, is often thought to be practically normal according to the
central limit theorem In probability theory, the central limit theorem (CLT) establishes that, in many situations, when independent random variables are summed up, their properly normalized sum tends toward a normal distribution even if the original variables themselv ...
. The blue picture, made with CumFreq, illustrates an example of fitting the normal distribution to ranked October rainfalls showing the 90% confidence belt based on the
binomial distribution In probability theory and statistics, the binomial distribution with parameters ''n'' and ''p'' is the discrete probability distribution of the number of successes in a sequence of ''n'' independent experiments, each asking a yes–no quest ...
. The rainfall data are represented by plotting positions as part of the cumulative frequency analysis.


Methodological problems and peer review

John Ioannidis argues that using normally distributed standard deviations as standards for validating research findings leave falsifiability, falsifiable predictions about phenomena that are not normally distributed untested. This includes, for example, phenomena that only appear when all necessary conditions are present and one cannot be a substitute for another in an addition-like way and phenomena that are not randomly distributed. Ioannidis argues that standard deviation-centered validation gives a false appearance of validity to hypotheses and theories where some but not all falsifiable predictions are normally distributed since the portion of falsifiable predictions that there is evidence against may and in some cases are in the non-normally distributed parts of the range of falsifiable predictions, as well as baselessly dismissing hypotheses for which none of the falsifiable predictions are normally distributed as if were they unfalsifiable when in fact they do make falsifiable predictions. It is argued by Ioannidis that many cases of mutually exclusive theories being accepted as "validated" by research journals are caused by failure of the journals to take in empirical falsifications of non-normally distributed predictions, and not because mutually exclusive theories are true, which they cannot be, although two mutually exclusive theories can both be wrong and a third one correct.


Computational methods


Generating values from normal distribution

In computer simulations, especially in applications of the Monte-Carlo method, it is often desirable to generate values that are normally distributed. The algorithms listed below all generate the standard normal deviates, since a can be generated as , where ''Z'' is standard normal. All these algorithms rely on the availability of a random number generator ''U'' capable of producing Uniform distribution (continuous), uniform random variates. * The most straightforward method is based on the probability integral transform property: if ''U'' is distributed uniformly on (0,1), then Φ−1(''U'') will have the standard normal distribution. The drawback of this method is that it relies on calculation of the
probit function In probability theory and statistics, the probit function is the quantile function associated with the standard normal distribution. It has applications in data analysis and machine learning, in particular exploratory statistical graphics and ...
Φ−1, which cannot be done analytically. Some approximate methods are described in and in the error function, erf article. Wichura gives a fast algorithm for computing this function to 16 decimal places, which is used by R programming language, R to compute random variates of the normal distribution. * Irwin–Hall distribution#Approximating a Normal distribution, An easy-to-program approximate approach that relies on the
central limit theorem In probability theory, the central limit theorem (CLT) establishes that, in many situations, when independent random variables are summed up, their properly normalized sum tends toward a normal distribution even if the original variables themselv ...
is as follows: generate 12 uniform ''U''(0,1) deviates, add them all up, and subtract 6 – the resulting random variable will have approximately standard normal distribution. In truth, the distribution will be Irwin–Hall distribution, Irwin–Hall, which is a 12-section eleventh-order polynomial approximation to the normal distribution. This random deviate will have a limited range of (−6, 6). Note that in a true normal distribution, only 0.00034% of all samples will fall outside ±6σ. * The Box–Muller transform, Box–Muller method uses two independent random numbers ''U'' and ''V'' distributed uniform distribution (continuous), uniformly on (0,1). Then the two random variables ''X'' and ''Y'' X = \sqrt \, \cos(2 \pi V) , \qquad Y = \sqrt \, \sin(2 \pi V) . will both have the standard normal distribution, and will be
independent Independent or Independents may refer to: Arts, entertainment, and media Artist groups * Independents (artist group), a group of modernist painters based in the New Hope, Pennsylvania, area of the United States during the early 1930s * Independ ...
. This formulation arises because for a bivariate normal random vector (''X'', ''Y'') the squared norm will have the
chi-squared distribution In probability theory and statistics, the chi-squared distribution (also chi-square or \chi^2-distribution) with k degrees of freedom is the distribution of a sum of the squares of k independent standard normal random variables. The chi-squa ...
with two degrees of freedom, which is an easily generated exponential distribution, exponential random variable corresponding to the quantity −2ln(''U'') in these equations; and the angle is distributed uniformly around the circle, chosen by the random variable ''V''. * The Marsaglia polar method is a modification of the Box–Muller method which does not require computation of the sine and cosine functions. In this method, ''U'' and ''V'' are drawn from the uniform (−1,1) distribution, and then is computed. If ''S'' is greater or equal to 1, then the method starts over, otherwise the two quantities X = U\sqrt, \qquad Y = V\sqrt are returned. Again, ''X'' and ''Y'' are independent, standard normal random variables. * The Ratio method is a rejection method. The algorithm proceeds as follows: ** Generate two independent uniform deviates ''U'' and ''V''; ** Compute ''X'' = (''V'' − 0.5)/''U''; ** Optional: if ''X''2 ≤ 5 − 4''e''1/4''U'' then accept ''X'' and terminate algorithm; ** Optional: if ''X''2 ≥ 4''e''−1.35/''U'' + 1.4 then reject ''X'' and start over from step 1; ** If ''X''2 ≤ −4 ln''U'' then accept ''X'', otherwise start over the algorithm. *:The two optional steps allow the evaluation of the logarithm in the last step to be avoided in most cases. These steps can be greatly improved so that the logarithm is rarely evaluated. * The ziggurat algorithm is faster than the Box–Muller transform and still exact. In about 97% of all cases it uses only two random numbers, one random integer and one random uniform, one multiplication and an if-test. Only in 3% of the cases, where the combination of those two falls outside the "core of the ziggurat" (a kind of rejection sampling using logarithms), do exponentials and more uniform random numbers have to be employed. * Integer arithmetic can be used to sample from the standard normal distribution. This method is exact in the sense that it satisfies the conditions of ''ideal approximation''; i.e., it is equivalent to sampling a real number from the standard normal distribution and rounding this to the nearest representable floating point number. * There is also some investigation into the connection between the fast Hadamard transform and the normal distribution, since the transform employs just addition and subtraction and by the central limit theorem random numbers from almost any distribution will be transformed into the normal distribution. In this regard a series of Hadamard transforms can be combined with random permutations to turn arbitrary data sets into a normally distributed data.


Numerical approximations for the normal CDF and normal quantile function

The standard normal cumulative distribution function, CDF is widely used in scientific and statistical computing. The values Φ(''x'') may be approximated very accurately by a variety of methods, such as numerical integration, Taylor series, asymptotic series and Gauss's continued fraction#Of Kummer's confluent hypergeometric function, continued fractions. Different approximations are used depending on the desired level of accuracy. * give the approximation for Φ(''x'') for ''x > 0'' with the absolute error (algorith
26.2.17
: \Phi(x) = 1 - \varphi(x)\left(b_1 t + b_2 t^2 + b_3t^3 + b_4 t^4 + b_5 t^5\right) + \varepsilon(x), \qquad t = \frac, where ''ϕ''(''x'') is the standard normal PDF, and ''b''0 = 0.2316419, ''b''1 = 0.319381530, ''b''2 = −0.356563782, ''b''3 = 1.781477937, ''b''4 = −1.821255978, ''b''5 = 1.330274429. * lists some dozens of approximations – by means of rational functions, with or without exponentials – for the function. His algorithms vary in the degree of complexity and the resulting precision, with maximum absolute precision of 24 digits. An algorithm by combines Hart's algorithm 5666 with a continued fraction approximation in the tail to provide a fast computation algorithm with a 16-digit precision. * after recalling Hart68 solution is not suited for erf, gives a solution for both erf and erfc, with maximal relative error bound, via rational function, Rational Chebyshev Approximation. * suggested a simple algorithm based on the Taylor series expansion \Phi(x) = \frac12 + \varphi(x)\left( x + \frac 3 + \frac + \frac + \frac + \cdots \right) for calculating with arbitrary precision. The drawback of this algorithm is comparatively slow calculation time (for example it takes over 300 iterations to calculate the function with 16 digits of precision when ). * The GNU Scientific Library calculates values of the standard normal CDF using Hart's algorithms and approximations with Chebyshev polynomials. Shore (1982) introduced simple approximations that may be incorporated in stochastic optimization models of engineering and operations research, like reliability engineering and inventory analysis. Denoting , the simplest approximation for the quantile function is: z = \Phi^(p)=5.5556\left[1- \left( \frac p \right)^\right],\qquad p\ge 1/2 This approximation delivers for ''z'' a maximum absolute error of 0.026 (for , corresponding to ). For replace ''p'' by and change sign. Another approximation, somewhat less accurate, is the single-parameter approximation: z=-0.4115\left\, \qquad p\ge 1/2 The latter had served to derive a simple approximation for the loss integral of the normal distribution, defined by \begin L(z) & =\int_z^\infty (u-z)\varphi(u) \, du=\int_z^\infty [1-\Phi (u)] \, du \\[5pt] L(z) & \approx \begin 0.4115\left(\dfrac p \right) - z, & p<1/2, \\ \\ 0.4115\left( \dfrac p \right), & p\ge 1/2. \end \\[5pt] \text \\ L(z) & \approx \begin 0.4115\left\, & p < 1/2, \\ \\ 0.4115 \dfrac p, & p\ge 1/2. \end \end This approximation is particularly accurate for the right far-tail (maximum error of 10−3 for z≥1.4). Highly accurate approximations for the CDF, based on Response modeling methodology, Response Modeling Methodology (RMM, Shore, 2011, 2012), are shown in Shore (2005). Some more approximations can be found at: Error function#Approximation with elementary functions. In particular, small ''relative'' error on the whole domain for the CDF \Phi and the quantile function \Phi^ as well, is achieved via an explicitly invertible formula by Sergei Winitzki in 2008.


History


Development

Some authors attribute the credit for the discovery of the normal distribution to Abraham de Moivre, de Moivre, who in 1738 published in the second edition of his "''The Doctrine of Chances''" the study of the coefficients in the binomial expansion of . De Moivre proved that the middle term in this expansion has the approximate magnitude of 2^n/\sqrt, and that "If ''m'' or ''n'' be a Quantity infinitely great, then the Logarithm of the Ratio, which a Term distant from the middle by the Interval ''ℓ'', has to the middle Term, is -\frac." Although this theorem can be interpreted as the first obscure expression for the normal probability law, Stephen Stigler, Stigler points out that de Moivre himself did not interpret his results as anything more than the approximate rule for the binomial coefficients, and in particular de Moivre lacked the concept of the probability density function. In 1823 Carl Friedrich Gauss, Gauss published his monograph "''Theoria combinationis observationum erroribus minimis obnoxiae''" where among other things he introduces several important statistical concepts, such as the method of least squares, the method of maximum likelihood, and the ''normal distribution''. Gauss used ''M'', , to denote the measurements of some unknown quantity ''V'', and sought the "most probable" estimator of that quantity: the one that maximizes the probability of obtaining the observed experimental results. In his notation φΔ is the probability density function of the measurement errors of magnitude Δ. Not knowing what the function ''φ'' is, Gauss requires that his method should reduce to the well-known answer: the arithmetic mean of the measured values. Starting from these principles, Gauss demonstrates that the only law that rationalizes the choice of arithmetic mean as an estimator of the location parameter, is the normal law of errors: \varphi\mathit = \frac h \, e^, where ''h'' is "the measure of the precision of the observations". Using this normal law as a generic model for errors in the experiments, Gauss formulates what is now known as the non-linear least squares, non-linear weighted least squares method. Although Gauss was the first to suggest the normal distribution law, Pierre Simon de Laplace, Laplace made significant contributions. It was Laplace who first posed the problem of aggregating several observations in 1774, although his own solution led to the Laplacian distribution. It was Laplace who first calculated the value of the Gaussian integral, integral in 1782, providing the normalization constant for the normal distribution. Finally, it was Laplace who in 1810 proved and presented to the Academy the fundamental
central limit theorem In probability theory, the central limit theorem (CLT) establishes that, in many situations, when independent random variables are summed up, their properly normalized sum tends toward a normal distribution even if the original variables themselv ...
, which emphasized the theoretical importance of the normal distribution. It is of interest to note that in 1809 an Irish-American mathematician Robert Adrain published two insightful but flawed derivations of the normal probability law, simultaneously and independently from Gauss. His works remained largely unnoticed by the scientific community, until in 1871 they were exhumed by Cleveland Abbe, Abbe. In the middle of the 19th century James Clerk Maxwell, Maxwell demonstrated that the normal distribution is not just a convenient mathematical tool, but may also occur in natural phenomena: "The number of particles whose velocity, resolved in a certain direction, lies between ''x'' and ''x'' + ''dx'' is \operatorname \frac\; e^ \, dx


Naming

Today, the concept is usually known in English as the normal distribution or Gaussian distribution. Other less common names include Gauss distribution, Laplace-Gauss distribution, the law of error, the law of facility of errors, Laplace's second law, Gaussian law. Gauss himself apparently coined the term with reference to the "normal equations" involved in its applications, with normal having its technical meaning of orthogonal rather than "usual". However, by the end of the 19th century some authors had started using the name ''normal distribution'', where the word "normal" was used as an adjective – the term now being seen as a reflection of the fact that this distribution was seen as typical, common – and thus "normal". Charles Sanders Peirce, Peirce (one of those authors) once defined "normal" thus: "...the 'normal' is not the average (or any other kind of mean) of what actually occurs, but of what ''would'', in the long run, occur under certain circumstances." Around the turn of the 20th century Karl Pearson, Pearson popularized the term ''normal'' as a designation for this distribution. Also, it was Pearson who first wrote the distribution in terms of the standard deviation ''σ'' as in modern notation. Soon after this, in year 1915, Ronald Fisher, Fisher added the location parameter to the formula for normal distribution, expressing it in the way it is written nowadays: df = \frac e^ \, dx. The term "standard normal", which denotes the normal distribution with zero mean and unit variance came into general use around the 1950s, appearing in the popular textbooks by P. G. Hoel (1947) "''Introduction to mathematical statistics''" and A. M. Mood (1950) "''Introduction to the theory of statistics''".


See also

* Bates distribution – similar to the Irwin–Hall distribution, but rescaled back into the 0 to 1 range * Behrens–Fisher problem – the long-standing problem of testing whether two normal samples with different variances have same means; * Bhattacharyya distance – method used to separate mixtures of normal distributions * Erdős–Kac theorem – on the occurrence of the normal distribution in number theory * Full width at half maximum * Gaussian blur – convolution, which uses the normal distribution as a kernel * Modified half-normal distribution with the pdf on (0, \infty) is given as f(x)= \frac, where \Psi(\alpha,z)=_1\Psi_1\left(\begin\left(\alpha,\frac\right)\\(1,0)\end;z \right) denotes the Fox-Wright Psi function. * Normally distributed and uncorrelated does not imply independent * Ratio normal distribution * Reciprocal normal distribution * Standard normal table * Stein's lemma * Sub-Gaussian distribution * Sum of normally distributed random variables * Tweedie distribution – The normal distribution is a member of the family of Tweedie exponential dispersion models. * Wrapped normal distribution – the Normal distribution applied to a circular domain * Z-test – using the normal distribution


Notes


References


Citations


Sources

* * In particular, the entries fo
"bell-shaped and bell curve"
an

* * * * * * * * * * * * * * * * * * * * * * * * Translated by Stephen M. Stigler in ''Statistical Science'' 1 (3), 1986: . * * * * * * * * * * * * * * * * * * * * * * * * * * * *


External links

*
Normal distribution calculator
{{Authority control Normal distribution, Continuous distributions Conjugate prior distributions Exponential family distributions Stable distributions Location-scale family probability distributions]">X, ^p \right&= \sigma^p \cdot 2^ \frac _1F_1\left( -\frac, \frac, -\frac \left( \frac \mu \sigma \right)^2 \right). \end These expressions remain valid even if p is not an integer. See also Hermite polynomials#"Negative variance", generalized Hermite polynomials. The expectation of X conditioned on the event that X lies in an interval ,b/math> is given by :\operatorname\left \mid a= \mu - \sigma^2\frac where f and F respectively are the density and the cumulative distribution function of X. For b=\infty this is known as the
inverse Mills ratio In probability theory, the Mills ratio (or Mills's ratio) of a continuous random variable X is the function : m(x) := \frac , where f(x) is the probability density function, and :\bar(x) := \Pr x.html" ;"title=">x">>x= \int_x^ f(u)\, du is the ...
. Note that above, density f of X is used instead of standard normal density as in inverse Mills ratio, so here we have \sigma^2 instead of \sigma.


Fourier transform and characteristic function

The
Fourier transform A Fourier transform (FT) is a mathematical transform that decomposes functions into frequency components, which are represented by the output of the transform as a function of frequency. Most commonly functions of time or space are transformed, ...
of a normal density f with mean \mu and standard deviation \sigma is : \hat f(t) = \int_^\infty f(x)e^ \, dx = e^ e^ where i is the
imaginary unit The imaginary unit or unit imaginary number () is a solution to the quadratic equation x^2+1=0. Although there is no real number with this property, can be used to extend the real numbers to what are called complex numbers, using addition an ...
. If the mean \mu=0, the first factor is 1, and the Fourier transform is, apart from a constant factor, a normal density on the
frequency domain In physics, electronics, control systems engineering, and statistics, the frequency domain refers to the analysis of mathematical functions or signals with respect to frequency, rather than time. Put simply, a time-domain graph shows how a signa ...
, with mean 0 and standard deviation 1/\sigma. In particular, the standard normal distribution \varphi is an
eigenfunction In mathematics, an eigenfunction of a linear operator ''D'' defined on some function space is any non-zero function f in that space that, when acted upon by ''D'', is only multiplied by some scaling factor called an eigenvalue. As an equation, th ...
of the Fourier transform. In probability theory, the Fourier transform of the probability distribution of a real-valued random variable X is closely connected to the
characteristic function In mathematics, the term "characteristic function" can refer to any of several distinct concepts: * The indicator function of a subset, that is the function ::\mathbf_A\colon X \to \, :which for a given subset ''A'' of ''X'', has value 1 at points ...
\varphi_X(t) of that variable, which is defined as the
expected value In probability theory, the expected value (also called expectation, expectancy, mathematical expectation, mean, average, or first moment) is a generalization of the weighted average. Informally, the expected value is the arithmetic mean of a l ...
of e^, as a function of the real variable t (the
frequency Frequency is the number of occurrences of a repeating event per unit of time. It is also occasionally referred to as ''temporal frequency'' for clarity, and is distinct from ''angular frequency''. Frequency is measured in hertz (Hz) which is eq ...
parameter of the Fourier transform). This definition can be analytically extended to a complex-value variable t. The relation between both is: :\varphi_X(t) = \hat f(-t)


Moment and cumulant generating functions

The
moment generating function In probability theory and statistics, the moment-generating function of a real-valued random variable is an alternative specification of its probability distribution. Thus, it provides the basis of an alternative route to analytical results compare ...
of a real random variable X is the expected value of e^, as a function of the real parameter t. For a normal distribution with density f, mean \mu and deviation \sigma, the moment generating function exists and is equal to :M(t) = \operatorname ^= \hat f(it) = e^ e^ The
cumulant generating function In probability theory and statistics, the cumulants of a probability distribution are a set of quantities that provide an alternative to the '' moments'' of the distribution. Any two probability distributions whose moments are identical will have ...
is the logarithm of the moment generating function, namely :g(t) = \ln M(t) = \mu t + \tfrac 12 \sigma^2 t^2 Since this is a quadratic polynomial in t, only the first two
cumulant In probability theory and statistics, the cumulants of a probability distribution are a set of quantities that provide an alternative to the '' moments'' of the distribution. Any two probability distributions whose moments are identical will ha ...
s are nonzero, namely the mean \mu and the variance \sigma^2.


Stein operator and class

Within
Stein's method Stein's method is a general method in probability theory to obtain bounds on the distance between two probability distributions with respect to a probability metric. It was introduced by Charles Stein, who first published it in 1972, to obtain ...
the Stein operator and class of a random variable X \sim \mathcal(\mu, \sigma^2) are \mathcalf(x) = \sigma^2 f'(x) - (x-\mu)f(x) and \mathcal the class of all absolutely continuous functions f : \R \to \R \mbox\mathbb[, f'(X), ]< \infty.


Zero-variance limit

In the limit (mathematics), limit when \sigma tends to zero, the probability density f(x) eventually tends to zero at any x\ne \mu, but grows without limit if x = \mu, while its integral remains equal to 1. Therefore, the normal distribution cannot be defined as an ordinary
function Function or functionality may refer to: Computing * Function key, a type of key on computer keyboards * Function model, a structured representation of processes in a system * Function object or functor or functionoid, a concept of object-oriente ...
when \sigma = 0. However, one can define the normal distribution with zero variance as a
generalized function In mathematics, generalized functions are objects extending the notion of functions. There is more than one recognized theory, for example the theory of distributions. Generalized functions are especially useful in making discontinuous functions ...
; specifically, as Dirac's "delta function" \delta translated by the mean \mu, that is f(x)=\delta(x-\mu). Its CDF is then the
Heaviside step function The Heaviside step function, or the unit step function, usually denoted by or (but sometimes , or ), is a step function, named after Oliver Heaviside (1850–1925), the value of which is zero for negative arguments and one for positive argume ...
translated by the mean \mu, namely :F(x) = \begin 0 & \textx < \mu \\ 1 & \textx \geq \mu \end


Maximum entropy

Of all probability distributions over the reals with a specified mean \mu and variance \sigma^2, the normal distribution N(\mu,\sigma^2) is the one with maximum entropy. If X is a
continuous random variable In probability theory and statistics, a probability distribution is the mathematical function that gives the probabilities of occurrence of different possible outcomes for an experiment. It is a mathematical description of a random phenomenon i ...
with
probability density In probability theory, a probability density function (PDF), or density of a continuous random variable, is a function whose value at any given sample (or point) in the sample space (the set of possible values taken by the random variable) can ...
f(x), then the entropy of X is defined as : H(X) = - \int_^\infty f(x)\log f(x)\, dx where f(x)\log f(x) is understood to be zero whenever f(x)=0. This functional can be maximized, subject to the constraints that the distribution is properly normalized and has a specified variance, by using
variational calculus The calculus of variations (or Variational Calculus) is a field of mathematical analysis that uses variations, which are small changes in functions and functionals, to find maxima and minima of functionals: mappings from a set of functions t ...
. A function with two
Lagrange multipliers In mathematical optimization, the method of Lagrange multipliers is a strategy for finding the local maxima and minima of a function subject to equality constraints (i.e., subject to the condition that one or more equations have to be satisfied ex ...
is defined: : L=\int_^\infty f(x)\ln(f(x))\,dx-\lambda_0\left(1-\int_^\infty f(x)\,dx\right)-\lambda\left(\sigma^2-\int_^\infty f(x)(x-\mu)^2\,dx\right) where f(x) is, for now, regarded as some density function with mean \mu and standard deviation \sigma. At maximum entropy, a small variation \delta f(x) about f(x) will produce a variation \delta L about L which is equal to 0: : 0=\delta L=\int_^\infty \delta f(x)\left (\ln(f(x))+1+\lambda_0+\lambda(x-\mu)^2\right )\,dx Since this must hold for any small \delta f(x), the term in brackets must be zero, and solving for f(x) yields: :f(x)=e^ Using the constraint equations to solve for \lambda_0 and \lambda yields the density of the normal distribution: : f(x, \mu, \sigma)=\frace^ The entropy of a normal distribution is equal to : H(X)=\tfrac(1+\log(2\sigma^2\pi))


Other properties


Related distributions


Central limit theorem

The central limit theorem states that under certain (fairly common) conditions, the sum of many random variables will have an approximately normal distribution. More specifically, where X_1,\ldots ,X_n are
independent and identically distributed In probability theory and statistics, a collection of random variables is independent and identically distributed if each random variable has the same probability distribution as the others and all are mutually independent. This property is usua ...
random variables with the same arbitrary distribution, zero mean, and variance \sigma^2 and Z is their mean scaled by \sqrt : Z = \sqrt\left(\frac\sum_^n X_i\right) Then, as n increases, the probability distribution of Z will tend to the normal distribution with zero mean and variance \sigma^2. The theorem can be extended to variables (X_i) that are not independent and/or not identically distributed if certain constraints are placed on the degree of dependence and the moments of the distributions. Many
test statistic A test statistic is a statistic (a quantity derived from the sample) used in statistical hypothesis testing.Berger, R. L.; Casella, G. (2001). ''Statistical Inference'', Duxbury Press, Second Edition (p.374) A hypothesis test is typically specif ...
s, scores, and
estimator In statistics, an estimator is a rule for calculating an estimate of a given quantity based on observed data: thus the rule (the estimator), the quantity of interest (the estimand) and its result (the estimate) are distinguished. For example, the ...
s encountered in practice contain sums of certain random variables in 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 distributions. The central limit theorem also implies that certain distributions can be approximated by the normal distribution, for example: * The
binomial distribution In probability theory and statistics, the binomial distribution with parameters ''n'' and ''p'' is the discrete probability distribution of the number of successes in a sequence of ''n'' independent experiments, each asking a yes–no quest ...
B(n,p) is approximately normal with mean np and variance np(1-p) for large n and for p not too close to 0 or 1. * The
Poisson distribution In probability theory and statistics, the Poisson distribution is a discrete probability distribution that expresses the probability of a given number of events occurring in a fixed interval of time or space if these events occur with a known co ...
with parameter \lambda is approximately normal with mean \lambda and variance \lambda, for large values of \lambda. * The
chi-squared distribution In probability theory and statistics, the chi-squared distribution (also chi-square or \chi^2-distribution) with k degrees of freedom is the distribution of a sum of the squares of k independent standard normal random variables. The chi-squa ...
\chi^2(k) is approximately normal with mean k and variance 2k, for large k. * The
Student's t-distribution In probability and statistics, Student's ''t''-distribution (or simply the ''t''-distribution) is any member of a family of continuous probability distributions that arise when estimating the mean of a normally distributed population in sit ...
t(\nu) is approximately normal with mean 0 and variance 1 when \nu is large. Whether these approximations are sufficiently accurate depends on the purpose for which they are needed, and the rate of convergence to the normal distribution. It is typically the case that such approximations are less accurate in the tails of the distribution. A general upper bound for the approximation error in the central limit theorem is given by the
Berry–Esseen theorem In probability theory, the central limit theorem states that, under certain circumstances, the probability distribution of the scaled mean of a random sample converges to a normal distribution as the sample size increases to infinity. Under strong ...
, improvements of the approximation are given by the
Edgeworth expansion The Gram–Charlier A series (named in honor of Jørgen Pedersen Gram and Carl Charlier), and the Edgeworth series (named in honor of Francis Ysidro Edgeworth) are series that approximate a probability distribution in terms of its cumulants. The se ...
s. This theorem can also be used to justify modeling the sum of many uniform noise sources as
Gaussian noise Gaussian noise, named after Carl Friedrich Gauss, is a term from signal processing theory denoting a kind of signal noise that has a probability density function (pdf) equal to that of the normal distribution (which is also known as the Gaussia ...
. See
AWGN Additive white Gaussian noise (AWGN) is a basic noise model used in information theory to mimic the effect of many random processes that occur in nature. The modifiers denote specific characteristics: * ''Additive'' because it is added to any nois ...
.


Operations and functions of normal variables

The
probability density In probability theory, a probability density function (PDF), or density of a continuous random variable, is a function whose value at any given sample (or point) in the sample space (the set of possible values taken by the random variable) can ...
,
cumulative distribution In statistics, the frequency (or absolute frequency) of an event i is the number n_i of times the observation has occurred/recorded in an experiment or study. These frequencies are often depicted graphically or in tabular form. Types The cumul ...
, and inverse cumulative distribution of any function of one or more independent or correlated normal variables can be computed with the numerical method of ray-tracing
Matlab code
. In the following sections we look at some special cases.


Operations on a single normal variable

If X is distributed normally with mean \mu and variance \sigma^2, then * aX+b, for any real numbers a and b, is also normally distributed, with mean a\mu+b and standard deviation , a, \sigma. That is, the family of normal distributions is closed under linear transformations. * The exponential of X is distributed log-normally: . * The absolute value of X has
folded normal distribution The folded normal distribution is a probability distribution related to the normal distribution. Given a normally distributed random variable ''X'' with mean ''μ'' and variance ''σ''2, the random variable ''Y'' = , ''X'', has a folded normal d ...
: . If \mu = 0 this is known as the
half-normal distribution In probability theory and statistics, the half-normal distribution is a special case of the folded normal distribution. Let X follow an ordinary normal distribution, N(0,\sigma^2). Then, Y=, X, follows a half-normal distribution. Thus, the hal ...
. * The absolute value of normalized residuals, , ''X'' − ''μ'', /''σ'', has
chi distribution In probability theory and statistics, the chi distribution is a continuous probability distribution. It is the distribution of the positive square root of the sum of squares of a set of independent random variables each following a standard norm ...
with one degree of freedom: , X - \mu, / \sigma \sim \chi_1. * The square of ''X''/''σ'' has the
noncentral chi-squared distribution In probability theory and statistics, the noncentral chi-squared distribution (or noncentral chi-square distribution, noncentral \chi^2 distribution) is a noncentral generalization of the chi-squared distribution. It often arises in the power a ...
with one degree of freedom: X^2 / \sigma^2 \sim \chi_1^2(\mu^2 / \sigma^2). If \mu = 0, the distribution is called simply chi-squared. * The log likelihood of a normal variable x is simply the log of its
probability density function In probability theory, a probability density function (PDF), or density of a continuous random variable, is a function whose value at any given sample (or point) in the sample space (the set of possible values taken by the random variable) can ...
: \ln p(x)= -\frac \left(\frac \right)^2 -\ln \left(\sigma \sqrt \right) = -\frac z^2 -\ln \left(\sigma \sqrt \right). Since this is a scaled and shifted square of a standard normal variable, it is distributed as a scaled and shifted chi-squared variable. * The distribution of the variable ''X'' restricted to an interval 'a'', ''b''is called the
truncated normal distribution In probability and statistics, the truncated normal distribution is the probability distribution derived from that of a normally distributed random variable by bounding the random variable from either below or above (or both). The truncated no ...
. * (''X'' − ''μ'')−2 has a
Lévy distribution In probability theory and statistics, the Lévy distribution, named after Paul Lévy, is a continuous probability distribution for a non-negative random variable. In spectroscopy, this distribution, with frequency as the dependent variable, is kn ...
with location 0 and scale ''σ''−2.


= Operations on two independent normal variables

= * If X_1 and X_2 are two
independent Independent or Independents may refer to: Arts, entertainment, and media Artist groups * Independents (artist group), a group of modernist painters based in the New Hope, Pennsylvania, area of the United States during the early 1930s * Independ ...
normal random variables, with means \mu_1, \mu_2 and standard deviations \sigma_1, \sigma_2, then their sum X_1 + X_2 will also be normally distributed, roof/sup> with mean \mu_1 + \mu_2 and variance \sigma_1^2 + \sigma_2^2. * In particular, if X and Y are independent normal deviates with zero mean and variance \sigma^2, then X + Y and X - Y are also independent and normally distributed, with zero mean and variance 2\sigma^2. This is a special case of the
polarization identity In linear algebra, a branch of mathematics, the polarization identity is any one of a family of formulas that express the inner product of two vectors in terms of the norm of a normed vector space. If a norm arises from an inner product then t ...
. * If X_1, X_2 are two independent normal deviates with mean \mu and deviation \sigma, and a, b are arbitrary real numbers, then the variable X_3 = \frac + \mu is also normally distributed with mean \mu and deviation \sigma. It follows that the normal distribution is
stable A stable is a building in which livestock, especially horses, are kept. It most commonly means a building that is divided into separate stalls for individual animals and livestock. There are many different types of stables in use today; the ...
(with exponent \alpha=2).


= Operations on two independent standard normal variables

= If X_1 and X_2 are two independent standard normal random variables with mean 0 and variance 1, then * Their sum and difference is distributed normally with mean zero and variance two: X_1 \pm X_2 \sim N(0, 2). * Their product Z = X_1 X_2 follows the
product distribution A product distribution is a probability distribution constructed as the distribution of the product of random variables having two other known distributions. Given two statistically independent random variables ''X'' and ''Y'', the distribution of ...
with density function f_Z(z) = \pi^ K_0(, z, ) where K_0 is the
modified Bessel function of the second kind Bessel functions, first defined by the mathematician Daniel Bernoulli and then generalized by Friedrich Bessel, are canonical solutions of Bessel's differential equation x^2 \frac + x \frac + \left(x^2 - \alpha^2 \right)y = 0 for an arbitrary ...
. This distribution is symmetric around zero, unbounded at z = 0, and has the
characteristic function In mathematics, the term "characteristic function" can refer to any of several distinct concepts: * The indicator function of a subset, that is the function ::\mathbf_A\colon X \to \, :which for a given subset ''A'' of ''X'', has value 1 at points ...
\phi_Z(t) = (1 + t^2)^. * Their ratio follows the standard
Cauchy distribution The Cauchy distribution, named after Augustin Cauchy, is a continuous probability distribution. It is also known, especially among physicists, as the Lorentz distribution (after Hendrik Lorentz), Cauchy–Lorentz distribution, Lorentz(ian) fun ...
: X_1/ X_2 \sim \operatorname(0, 1). * Their Euclidean norm \sqrt has the
Rayleigh distribution In probability theory and statistics, the Rayleigh distribution is a continuous probability distribution for nonnegative-valued random variables. Up to rescaling, it coincides with the chi distribution with two degrees of freedom. The distribut ...
.


Operations on multiple independent normal variables

* Any linear combination of independent normal deviates is a normal deviate. * If X_1, X_2, \ldots, X_n are independent standard normal random variables, then the sum of their squares has the
chi-squared distribution In probability theory and statistics, the chi-squared distribution (also chi-square or \chi^2-distribution) with k degrees of freedom is the distribution of a sum of the squares of k independent standard normal random variables. The chi-squa ...
with n degrees of freedom X_1^2 + \cdots + X_n^2 \sim \chi_n^2. * If X_1, X_2, \ldots, X_n are independent normally distributed random variables with means \mu and variances \sigma^2, then their
sample mean The sample mean (or "empirical mean") and the sample covariance are statistics computed from a Sample (statistics), sample of data on one or more random variables. The sample mean is the average value (or mean, mean value) of a sample (statistic ...
is independent from the sample
standard deviation In statistics, the standard deviation is a measure of the amount of variation or dispersion of a set of values. A low standard deviation indicates that the values tend to be close to the mean (also called the expected value) of the set, while ...
, which can be demonstrated using Basu's theorem or
Cochran's theorem In statistics, Cochran's theorem, devised by William G. Cochran, is a theorem used to justify results relating to the probability distributions of statistics that are used in the analysis of variance. Statement Let ''U''1, ..., ''U'N'' be i.i. ...
. The ratio of these two quantities will have the
Student's t-distribution In probability and statistics, Student's ''t''-distribution (or simply the ''t''-distribution) is any member of a family of continuous probability distributions that arise when estimating the mean of a normally distributed population in sit ...
with n-1 degrees of freedom: t = \frac = \frac \sim t_. * If X_1, X_2, \ldots, X_n, Y_1, Y_2, \ldots, Y_m are independent standard normal random variables, then the ratio of their normalized sums of squares will have the with degrees of freedom: F = \frac \sim F_.


Operations on multiple correlated normal variables

* A
quadratic form In mathematics, a quadratic form is a polynomial with terms all of degree two ("form" is another name for a homogeneous polynomial). For example, :4x^2 + 2xy - 3y^2 is a quadratic form in the variables and . The coefficients usually belong to a ...
of a normal vector, i.e. a quadratic function q = \sum x_i^2 + \sum x_j + c of multiple independent or correlated normal variables, is a generalized chi-square variable.


Operations on the density function

The split normal distribution is most directly defined in terms of joining scaled sections of the density functions of different normal distributions and rescaling the density to integrate to one. The
truncated normal distribution In probability and statistics, the truncated normal distribution is the probability distribution derived from that of a normally distributed random variable by bounding the random variable from either below or above (or both). The truncated no ...
results from rescaling a section of a single density function.


Infinite divisibility and Cramér's theorem

For any positive integer \text, any normal distribution with mean \mu and variance \sigma^2 is the distribution of the sum of \text independent normal deviates, each with mean \frac and variance \frac. This property is called
infinite divisibility Infinite divisibility arises in different ways in philosophy, physics, economics, order theory (a branch of mathematics), and probability theory (also a branch of mathematics). One may speak of infinite divisibility, or the lack thereof, of matter ...
. Conversely, if X_1 and X_2 are independent random variables and their sum X_1+X_2 has a normal distribution, then both X_1 and X_2 must be normal deviates. This result is known as Cramér's decomposition theorem, and is equivalent to saying that the convolution of two distributions is normal if and only if both are normal. Cramér's theorem implies that a linear combination of independent non-Gaussian variables will never have an exactly normal distribution, although it may approach it arbitrarily closely.


Bernstein's theorem

Bernstein's theorem states that if X and Y are independent and X + Y and X - Y are also independent, then both ''X'' and ''Y'' must necessarily have normal distributions. More generally, if X_1, \ldots, X_n are independent random variables, then two distinct linear combinations \sum and \sumwill be independent if and only if all X_k are normal and \sum, where \sigma_k^2 denotes the variance of X_k.


Extensions

The notion of normal distribution, being one of the most important distributions in probability theory, has been extended far beyond the standard framework of the univariate (that is one-dimensional) case (Case 1). All these extensions are also called ''normal'' or ''Gaussian'' laws, so a certain ambiguity in names exists. * The
multivariate normal distribution In probability theory and statistics, the multivariate normal distribution, multivariate Gaussian distribution, or joint normal distribution is a generalization of the one-dimensional (univariate) normal distribution to higher dimensions. One d ...
describes the Gaussian law in the ''k''-dimensional Euclidean space. A vector is multivariate-normally distributed if any linear combination of its components has a (univariate) normal distribution. The variance of ''X'' is a ''k×k'' symmetric positive-definite matrix ''V''. The multivariate normal distribution is a special case of the
elliptical distribution In probability and statistics, an elliptical distribution is any member of a broad family of probability distributions that generalize the multivariate normal distribution. Intuitively, in the simplified two and three dimensional case, the joint di ...
s. As such, its iso-density loci in the ''k'' = 2 case are ellipses and in the case of arbitrary ''k'' are ellipsoids. * Rectified Gaussian distribution a rectified version of normal distribution with all the negative elements reset to 0 * Complex normal distribution deals with the complex normal vectors. A complex vector is said to be normal if both its real and imaginary components jointly possess a 2''k''-dimensional multivariate normal distribution. The variance-covariance structure of ''X'' is described by two matrices: the ''variance'' matrix Γ, and the ''relation'' matrix ''C''. * Matrix normal distribution describes the case of normally distributed matrices. * Gaussian processes are the normally distributed stochastic processes. These can be viewed as elements of some infinite-dimensional Hilbert space ''H'', and thus are the analogues of multivariate normal vectors for the case . A random element is said to be normal if for any constant the scalar product has a (univariate) normal distribution. The variance structure of such Gaussian random element can be described in terms of the linear ''covariance ''. Several Gaussian processes became popular enough to have their own names: ** Wiener process, Brownian motion, ** Brownian bridge, ** Ornstein–Uhlenbeck process. * Gaussian q-distribution is an abstract mathematical construction that represents a "q-analogue" of the normal distribution. * the q-Gaussian is an analogue of the Gaussian distribution, in the sense that it maximises the Tsallis entropy, and is one type of Tsallis distribution. Note that this distribution is different from the Gaussian q-distribution above. * The Kaniadakis Gaussian distribution, Kaniadakis ''κ''-Gaussian distribution is a generalization of the Gaussian distribution which arises from the Kaniadakis statistics, being one of the Kaniadakis distribution, Kaniadakis distributions. A random variable ''X'' has a two-piece normal distribution if it has a distribution : f_X( x ) = N( \mu, \sigma_1^2 ) \text x \le \mu : f_X( x ) = N( \mu, \sigma_2^2 ) \text x \ge \mu where ''μ'' is the mean and ''σ''1 and ''σ''2 are the standard deviations of the distribution to the left and right of the mean respectively. The mean, variance and third central moment of this distribution have been determined : \operatorname( X ) = \mu + \sqrt ( \sigma_2 - \sigma_1 ) : \operatorname( X ) = \left( 1 - \frac 2 \pi\right)( \sigma_2 - \sigma_1 )^2 + \sigma_1 \sigma_2 : \operatorname( X ) = \sqrt( \sigma_2 - \sigma_1 ) \left[ \left( \frac 4 \pi - 1 \right) ( \sigma_2 - \sigma_1)^2 + \sigma_1 \sigma_2 \right] where E(''X''), V(''X'') and T(''X'') are the mean, variance, and third central moment respectively. One of the main practical uses of the Gaussian law is to model the empirical distributions of many different random variables encountered in practice. In such case a possible extension would be a richer family of distributions, having more than two parameters and therefore being able to fit the empirical distribution more accurately. The examples of such extensions are: * Pearson distribution — a four-parameter family of probability distributions that extend the normal law to include different skewness and kurtosis values. * The generalized normal distribution, also known as the exponential power distribution, allows for distribution tails with thicker or thinner asymptotic behaviors.


Statistical inference


Estimation of parameters

It is often the case that we do not know the parameters of the normal distribution, but instead want to Estimation theory, estimate them. That is, having a sample (x_1, \ldots, x_n) from a normal N(\mu, \sigma^2) population we would like to learn the approximate values of parameters \mu and \sigma^2. The standard approach to this problem is the maximum likelihood method, which requires maximization of the ''log-likelihood function'': : \ln\mathcal(\mu,\sigma^2) = \sum_^n \ln f(x_i\mid\mu,\sigma^2) = -\frac\ln(2\pi) - \frac\ln\sigma^2 - \frac\sum_^n (x_i-\mu)^2. Taking derivatives with respect to \mu and \sigma^2 and solving the resulting system of first order conditions yields the ''maximum likelihood estimates'': : \hat = \overline \equiv \frac\sum_^n x_i, \qquad \hat^2 = \frac \sum_^n (x_i - \overline)^2.


Sample mean

Estimator \textstyle\hat\mu is called the ''
sample mean The sample mean (or "empirical mean") and the sample covariance are statistics computed from a Sample (statistics), sample of data on one or more random variables. The sample mean is the average value (or mean, mean value) of a sample (statistic ...
'', since it is the arithmetic mean of all observations. The statistic \textstyle\overline is complete statistic, complete and sufficient statistic, sufficient for \mu, and therefore by the Lehmann–Scheffé theorem, \textstyle\hat\mu is the uniformly minimum variance unbiased (UMVU) estimator. In finite samples it is distributed normally: : \hat\mu \sim \mathcal(\mu,\sigma^2/n). The variance of this estimator is equal to the ''μμ''-element of the inverse Fisher information matrix \textstyle\mathcal^. This implies that the estimator is efficient estimator, finite-sample efficient. Of practical importance is the fact that the standard error (statistics), standard error of \textstyle\hat\mu is proportional to \textstyle1/\sqrt, that is, if one wishes to decrease the standard error by a factor of 10, one must increase the number of points in the sample by a factor of 100. This fact is widely used in determining sample sizes for opinion polls and the number of trials in Monte Carlo simulations. From the standpoint of the asymptotic theory (statistics), asymptotic theory, \textstyle\hat\mu is consistent estimator, consistent, that is, it convergence in probability, converges in probability to \mu as n\rightarrow\infty. The estimator is also asymptotic normality, asymptotically normal, which is a simple corollary of the fact that it is normal in finite samples: : \sqrt(\hat\mu-\mu) \,\xrightarrow\, \mathcal(0,\sigma^2).


Sample variance

The estimator \textstyle\hat\sigma^2 is called the ''sample variance'', since it is the variance of the sample ((x_1, \ldots, x_n)). In practice, another estimator is often used instead of the \textstyle\hat\sigma^2. This other estimator is denoted s^2, and is also called the ''sample variance'', which represents a certain ambiguity in terminology; its square root s is called the ''sample standard deviation''. The estimator s^2 differs from \textstyle\hat\sigma^2 by having instead of ''n'' in the denominator (the so-called Bessel's correction): : s^2 = \frac \hat\sigma^2 = \frac \sum_^n (x_i - \overline)^2. The difference between s^2 and \textstyle\hat\sigma^2 becomes negligibly small for large ''n''s. In finite samples however, the motivation behind the use of s^2 is that it is an unbiased estimator of the underlying parameter \sigma^2, whereas \textstyle\hat\sigma^2 is biased. Also, by the Lehmann–Scheffé theorem the estimator s^2 is uniformly minimum variance unbiased (Minimum-variance unbiased estimator, UMVU), which makes it the "best" estimator among all unbiased ones. However it can be shown that the biased estimator \textstyle\hat\sigma^2 is "better" than the s^2 in terms of the mean squared error (MSE) criterion. In finite samples both s^2 and \textstyle\hat\sigma^2 have scaled
chi-squared distribution In probability theory and statistics, the chi-squared distribution (also chi-square or \chi^2-distribution) with k degrees of freedom is the distribution of a sum of the squares of k independent standard normal random variables. The chi-squa ...
with degrees of freedom: : s^2 \sim \frac \cdot \chi^2_, \qquad \hat\sigma^2 \sim \frac \cdot \chi^2_. The first of these expressions shows that the variance of s^2 is equal to 2\sigma^4/(n-1), which is slightly greater than the ''σσ''-element of the inverse Fisher information matrix \textstyle\mathcal^. Thus, s^2 is not an efficient estimator for \sigma^2, and moreover, since s^2 is UMVU, we can conclude that the finite-sample efficient estimator for \sigma^2 does not exist. Applying the asymptotic theory, both estimators s^2 and \textstyle\hat\sigma^2 are consistent, that is they converge in probability to \sigma^2 as the sample size n\rightarrow\infty. The two estimators are also both asymptotically normal: : \sqrt(\hat\sigma^2 - \sigma^2) \simeq \sqrt(s^2-\sigma^2) \,\xrightarrow\, \mathcal(0,2\sigma^4). In particular, both estimators are asymptotically efficient for \sigma^2.


Confidence intervals

By
Cochran's theorem In statistics, Cochran's theorem, devised by William G. Cochran, is a theorem used to justify results relating to the probability distributions of statistics that are used in the analysis of variance. Statement Let ''U''1, ..., ''U'N'' be i.i. ...
, for normal distributions the sample mean \textstyle\hat\mu and the sample variance ''s''2 are
independent Independent or Independents may refer to: Arts, entertainment, and media Artist groups * Independents (artist group), a group of modernist painters based in the New Hope, Pennsylvania, area of the United States during the early 1930s * Independ ...
, which means there can be no gain in considering their joint distribution. There is also a converse theorem: if in a sample the sample mean and sample variance are independent, then the sample must have come from the normal distribution. The independence between \textstyle\hat\mu and ''s'' can be employed to construct the so-called ''t-statistic'': : t = \frac = \frac \sim t_ This quantity ''t'' has the
Student's t-distribution In probability and statistics, Student's ''t''-distribution (or simply the ''t''-distribution) is any member of a family of continuous probability distributions that arise when estimating the mean of a normally distributed population in sit ...
with degrees of freedom, and it is an ancillary statistic (independent of the value of the parameters). Inverting the distribution of this ''t''-statistics will allow us to construct the
confidence interval In frequentist statistics, a confidence interval (CI) is a range of estimates for an unknown parameter. A confidence interval is computed at a designated ''confidence level''; the 95% confidence level is most common, but other levels, such as 9 ...
for ''μ''; similarly, inverting the ''χ''2 distribution of the statistic ''s''2 will give us the confidence interval for ''σ''2: :\mu \in \left[ \hat\mu - t_ \fracs, \hat\mu + t_ \fracs \right], :\sigma^2 \in \left[ \frac, \frac \right], where ''tk,p'' and are the ''p''th
quantile In statistics and probability, quantiles are cut points dividing the range of a probability distribution into continuous intervals with equal probabilities, or dividing the observations in a sample in the same way. There is one fewer quantile tha ...
s of the ''t''- and ''χ''2-distributions respectively. These confidence intervals are of the ''confidence level'' , meaning that the true values ''μ'' and ''σ''2 fall outside of these intervals with probability (or significance level) ''α''. In practice people usually take , resulting in the 95% confidence intervals. Approximate formulas can be derived from the asymptotic distributions of \textstyle\hat\mu and ''s''2: :\mu \in \left[ \hat\mu - , z_, \fracs, \hat\mu + , z_, \fracs \right], :\sigma^2 \in \left[ s^2 - , z_, \fracs^2, s^2 + , z_, \fracs^2 \right], The approximate formulas become valid for large values of ''n'', and are more convenient for the manual calculation since the standard normal quantiles ''z''''α''/2 do not depend on ''n''. In particular, the most popular value of , results in .


Normality tests

Normality tests assess the likelihood that the given data set comes from a normal distribution. Typically the null hypothesis ''H''0 is that the observations are distributed normally with unspecified mean ''μ'' and variance ''σ''2, versus the alternative ''Ha'' that the distribution is arbitrary. Many tests (over 40) have been devised for this problem. The more prominent of them are outlined below: Diagnostic plots are more intuitively appealing but subjective at the same time, as they rely on informal human judgement to accept or reject the null hypothesis. *
Q–Q plot In statistics, a Q–Q plot (quantile-quantile plot) is a probability plot, a List of graphical methods, graphical method for comparing two probability distributions by plotting their ''quantiles'' against each other. A point on the plot co ...
, also known as normal probability plot or rankit plot—is a plot of the sorted values from the data set against the expected values of the corresponding quantiles from the standard normal distribution. That is, it's a plot of point of the form (Φ−1(''pk''), ''x''(''k'')), where plotting points ''pk'' are equal to ''pk'' = (''k'' − ''α'')/(''n'' + 1 − 2''α'') and ''α'' is an adjustment constant, which can be anything between 0 and 1. If the null hypothesis is true, the plotted points should approximately lie on a straight line. * P–P plot – similar to the Q–Q plot, but used much less frequently. This method consists of plotting the points (Φ(''z''(''k'')), ''pk''), where \textstyle z_ = (x_-\hat\mu)/\hat\sigma. For normally distributed data this plot should lie on a 45° line between (0, 0) and (1, 1). Goodness-of-fit tests: ''Moment-based tests'': * D'Agostino's K-squared test * Jarque–Bera test * Shapiro–Wilk test: This is based on the fact that the line in the Q–Q plot has the slope of ''σ''. The test compares the least squares estimate of that slope with the value of the sample variance, and rejects the null hypothesis if these two quantities differ significantly. ''Tests based on the empirical distribution function'': * Anderson–Darling test * Lilliefors test (an adaptation of the Kolmogorov–Smirnov test)


Bayesian analysis of the normal distribution

Bayesian analysis of normally distributed data is complicated by the many different possibilities that may be considered: * Either the mean, or the variance, or neither, may be considered a fixed quantity. * When the variance is unknown, analysis may be done directly in terms of the variance, or in terms of the
precision Precision, precise or precisely may refer to: Science, and technology, and mathematics Mathematics and computing (general) * Accuracy and precision, measurement deviation from true value and its scatter * Significant figures, the number of digit ...
, the reciprocal of the variance. The reason for expressing the formulas in terms of precision is that the analysis of most cases is simplified. * Both univariate and multivariate normal distribution, multivariate cases need to be considered. * Either conjugate prior, conjugate or improper prior, improper prior distributions may be placed on the unknown variables. * An additional set of cases occurs in Bayesian linear regression, where in the basic model the data is assumed to be normally distributed, and normal priors are placed on the regression coefficients. The resulting analysis is similar to the basic cases of independent identically distributed data. The formulas for the non-linear-regression cases are summarized in the conjugate prior article.


Sum of two quadratics


= Scalar form

= The following auxiliary formula is useful for simplifying the posterior distribution, posterior update equations, which otherwise become fairly tedious. :a(x-y)^2 + b(x-z)^2 = (a + b)\left(x - \frac\right)^2 + \frac(y-z)^2 This equation rewrites the sum of two quadratics in ''x'' by expanding the squares, grouping the terms in ''x'', and completing the square. Note the following about the complex constant factors attached to some of the terms: # The factor \frac has the form of a weighted average of ''y'' and ''z''. # \frac = \frac = (a^ + b^)^. This shows that this factor can be thought of as resulting from a situation where the Multiplicative inverse, reciprocals of quantities ''a'' and ''b'' add directly, so to combine ''a'' and ''b'' themselves, it's necessary to reciprocate, add, and reciprocate the result again to get back into the original units. This is exactly the sort of operation performed by the harmonic mean, so it is not surprising that \frac is one-half the harmonic mean of ''a'' and ''b''.


= Vector form

= A similar formula can be written for the sum of two vector quadratics: If x, y, z are vectors of length ''k'', and A and B are symmetric matrix, symmetric, invertible matrices of size k\times k, then : \begin & (\mathbf-\mathbf)'\mathbf(\mathbf-\mathbf) + (\mathbf-\mathbf)' \mathbf(\mathbf-\mathbf) \\ = & (\mathbf - \mathbf)'(\mathbf+\mathbf)(\mathbf - \mathbf) + (\mathbf - \mathbf)'(\mathbf^ + \mathbf^)^(\mathbf - \mathbf) \end where :\mathbf = (\mathbf + \mathbf)^(\mathbf\mathbf + \mathbf \mathbf) Note that the form x′ A x is called a
quadratic form In mathematics, a quadratic form is a polynomial with terms all of degree two ("form" is another name for a homogeneous polynomial). For example, :4x^2 + 2xy - 3y^2 is a quadratic form in the variables and . The coefficients usually belong to a ...
and is a scalar (mathematics), scalar: :\mathbf'\mathbf\mathbf = \sum_a_ x_i x_j In other words, it sums up all possible combinations of products of pairs of elements from x, with a separate coefficient for each. In addition, since x_i x_j = x_j x_i, only the sum a_ + a_ matters for any off-diagonal elements of A, and there is no loss of generality in assuming that A is symmetric matrix, symmetric. Furthermore, if A is symmetric, then the form \mathbf'\mathbf\mathbf = \mathbf'\mathbf\mathbf.


Sum of differences from the mean

Another useful formula is as follows: \sum_^n (x_i-\mu)^2 = \sum_^n (x_i-\bar)^2 + n(\bar -\mu)^2 where \bar = \frac \sum_^n x_i.


With known variance

For a set of i.i.d. normally distributed data points X of size ''n'' where each individual point ''x'' follows x \sim \mathcal(\mu, \sigma^2) with known
variance In probability theory and statistics, variance is the expectation of the squared deviation of a random variable from its population mean or sample mean. Variance is a measure of dispersion, meaning it is a measure of how far a set of numbers ...
σ2, the conjugate prior distribution is also normally distributed. This can be shown more easily by rewriting the variance as the
precision Precision, precise or precisely may refer to: Science, and technology, and mathematics Mathematics and computing (general) * Accuracy and precision, measurement deviation from true value and its scatter * Significant figures, the number of digit ...
, i.e. using τ = 1/σ2. Then if x \sim \mathcal(\mu, 1/\tau) and \mu \sim \mathcal(\mu_0, 1/\tau_0), we proceed as follows. First, the likelihood function is (using the formula above for the sum of differences from the mean): :\begin p(\mathbf\mid\mu,\tau) &= \prod_^n \sqrt \exp\left(-\frac\tau(x_i-\mu)^2\right) \\ &= \left(\frac\right)^ \exp\left(-\frac\tau \sum_^n (x_i-\mu)^2\right) \\ &= \left(\frac\right)^ \exp\left[-\frac\tau \left(\sum_^n(x_i-\bar)^2 + n(\bar -\mu)^2\right)\right]. \end Then, we proceed as follows: :\begin p(\mu\mid\mathbf) &\propto p(\mathbf\mid\mu) p(\mu) \\ & = \left(\frac\right)^ \exp\left[-\frac\tau \left(\sum_^n(x_i-\bar)^2 + n(\bar -\mu)^2\right)\right] \sqrt \exp\left(-\frac\tau_0(\mu-\mu_0)^2\right) \\ &\propto \exp\left(-\frac\left(\tau\left(\sum_^n(x_i-\bar)^2 + n(\bar -\mu)^2\right) + \tau_0(\mu-\mu_0)^2\right)\right) \\ &\propto \exp\left(-\frac \left(n\tau(\bar-\mu)^2 + \tau_0(\mu-\mu_0)^2 \right)\right) \\ &= \exp\left(-\frac(n\tau + \tau_0)\left(\mu - \dfrac\right)^2 + \frac(\bar - \mu_0)^2\right) \\ &\propto \exp\left(-\frac(n\tau + \tau_0)\left(\mu - \dfrac\right)^2\right) \end In the above derivation, we used the formula above for the sum of two quadratics and eliminated all constant factors not involving ''μ''. The result is the kernel (statistics), kernel of a normal distribution, with mean \frac and precision n\tau + \tau_0, i.e. :p(\mu\mid\mathbf) \sim \mathcal\left(\frac, \frac\right) This can be written as a set of Bayesian update equations for the posterior parameters in terms of the prior parameters: :\begin \tau_0' &= \tau_0 + n\tau \\[5pt] \mu_0' &= \frac \\[5pt] \bar &= \frac\sum_^n x_i \end That is, to combine ''n'' data points with total precision of ''nτ'' (or equivalently, total variance of ''n''/''σ''2) and mean of values \bar, derive a new total precision simply by adding the total precision of the data to the prior total precision, and form a new mean through a ''precision-weighted average'', i.e. a weighted average of the data mean and the prior mean, each weighted by the associated total precision. This makes logical sense if the precision is thought of as indicating the certainty of the observations: In the distribution of the posterior mean, each of the input components is weighted by its certainty, and the certainty of this distribution is the sum of the individual certainties. (For the intuition of this, compare the expression "the whole is (or is not) greater than the sum of its parts". In addition, consider that the knowledge of the posterior comes from a combination of the knowledge of the prior and likelihood, so it makes sense that we are more certain of it than of either of its components.) The above formula reveals why it is more convenient to do Bayesian analysis of conjugate priors for the normal distribution in terms of the precision. The posterior precision is simply the sum of the prior and likelihood precisions, and the posterior mean is computed through a precision-weighted average, as described above. The same formulas can be written in terms of variance by reciprocating all the precisions, yielding the more ugly formulas :\begin ' &= \frac \\[5pt] \mu_0' &= \frac \\[5pt] \bar &= \frac\sum_^n x_i \end


With known mean

For a set of i.i.d. normally distributed data points X of size ''n'' where each individual point ''x'' follows x \sim \mathcal(\mu, \sigma^2) with known mean μ, the conjugate prior of the
variance In probability theory and statistics, variance is the expectation of the squared deviation of a random variable from its population mean or sample mean. Variance is a measure of dispersion, meaning it is a measure of how far a set of numbers ...
has an inverse gamma distribution or a scaled inverse chi-squared distribution. The two are equivalent 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. The prior for σ2 is as follows: :p(\sigma^2\mid\nu_0,\sigma_0^2) = \frac~\frac \propto \frac The likelihood function from above, written in terms of the variance, is: :\begin p(\mathbf\mid\mu,\sigma^2) &= \left(\frac\right)^ \exp\left[-\frac \sum_^n (x_i-\mu)^2\right] \\ &= \left(\frac\right)^ \exp\left[-\frac\right] \end where :S = \sum_^n (x_i-\mu)^2. Then: :\begin p(\sigma^2\mid\mathbf) &\propto p(\mathbf\mid\sigma^2) p(\sigma^2) \\ &= \left(\frac\right)^ \exp\left[-\frac\right] \frac~\frac \\ &\propto \left(\frac\right)^ \frac \exp\left[-\frac + \frac\right] \\ &= \frac \exp\left[-\frac\right] \end The above is also a scaled inverse chi-squared distribution where :\begin \nu_0' &= \nu_0 + n \\ \nu_0'' &= \nu_0 \sigma_0^2 + \sum_^n (x_i-\mu)^2 \end or equivalently :\begin \nu_0' &= \nu_0 + n \\ ' &= \frac \end Reparameterizing in terms of an inverse gamma distribution, the result is: :\begin \alpha' &= \alpha + \frac \\ \beta' &= \beta + \frac \end


With unknown mean and unknown variance

For a set of i.i.d. normally distributed data points X of size ''n'' where each individual point ''x'' follows x \sim \mathcal(\mu, \sigma^2) with unknown mean μ and unknown
variance In probability theory and statistics, variance is the expectation of the squared deviation of a random variable from its population mean or sample mean. Variance is a measure of dispersion, meaning it is a measure of how far a set of numbers ...
σ2, a combined (multivariate) conjugate prior is placed over the mean and variance, consisting of a normal-inverse-gamma distribution. Logically, this originates as follows: # From the analysis of the case with unknown mean but known variance, we see that the update equations involve sufficient statistics computed from the data consisting of the mean of the data points and the total variance of the data points, computed in turn from the known variance divided by the number of data points. # From the analysis of the case with unknown variance but known mean, we see that the update equations involve sufficient statistics over the data consisting of the number of data points and sum of squared deviations. # Keep in mind that the posterior update values serve as the prior distribution when further data is handled. Thus, we should logically think of our priors in terms of the sufficient statistics just described, with the same semantics kept in mind as much as possible. # To handle the case where both mean and variance are unknown, we could place independent priors over the mean and variance, with fixed estimates of the average mean, total variance, number of data points used to compute the variance prior, and sum of squared deviations. Note however that in reality, the total variance of the mean depends on the unknown variance, and the sum of squared deviations that goes into the variance prior (appears to) depend on the unknown mean. In practice, the latter dependence is relatively unimportant: Shifting the actual mean shifts the generated points by an equal amount, and on average the squared deviations will remain the same. This is not the case, however, with the total variance of the mean: As the unknown variance increases, the total variance of the mean will increase proportionately, and we would like to capture this dependence. # This suggests that we create a ''conditional prior'' of the mean on the unknown variance, with a hyperparameter specifying the mean of the pseudo-observations associated with the prior, and another parameter specifying the number of pseudo-observations. This number serves as a scaling parameter on the variance, making it possible to control the overall variance of the mean relative to the actual variance parameter. The prior for the variance also has two hyperparameters, one specifying the sum of squared deviations of the pseudo-observations associated with the prior, and another specifying once again the number of pseudo-observations. Note that each of the priors has a hyperparameter specifying the number of pseudo-observations, and in each case this controls the relative variance of that prior. These are given as two separate hyperparameters so that the variance (aka the confidence) of the two priors can be controlled separately. # This leads immediately to the normal-inverse-gamma distribution, which is the product of the two distributions just defined, with conjugate priors used (an inverse gamma distribution over the variance, and a normal distribution over the mean, ''conditional'' on the variance) and with the same four parameters just defined. The priors are normally defined as follows: :\begin p(\mu\mid\sigma^2; \mu_0, n_0) &\sim \mathcal(\mu_0,\sigma^2/n_0) \\ p(\sigma^2; \nu_0,\sigma_0^2) &\sim I\chi^2(\nu_0,\sigma_0^2) = IG(\nu_0/2, \nu_0\sigma_0^2/2) \end The update equations can be derived, and look as follows: :\begin \bar &= \frac 1 n \sum_^n x_i \\ \mu_0' &= \frac \\ n_0' &= n_0 + n \\ \nu_0' &= \nu_0 + n \\ \nu_0'' &= \nu_0 \sigma_0^2 + \sum_^n (x_i-\bar)^2 + \frac(\mu_0 - \bar)^2 \end The respective numbers of pseudo-observations add the number of actual observations to them. The new mean hyperparameter is once again a weighted average, this time weighted by the relative numbers of observations. Finally, the update for \nu_0'' is similar to the case with known mean, but in this case the sum of squared deviations is taken with respect to the observed data mean rather than the true mean, and as a result a new "interaction term" needs to be added to take care of the additional error source stemming from the deviation between prior and data mean.


Occurrence and applications

The occurrence of normal distribution in practical problems can be loosely classified into four categories: # Exactly normal distributions; # Approximately normal laws, for example when such approximation is justified by the
central limit theorem In probability theory, the central limit theorem (CLT) establishes that, in many situations, when independent random variables are summed up, their properly normalized sum tends toward a normal distribution even if the original variables themselv ...
; and # Distributions modeled as normal – the normal distribution being the distribution with Principle of maximum entropy, maximum entropy for a given mean and variance. # Regression problems – the normal distribution being found after systematic effects have been modeled sufficiently well.


Exact normality

Certain quantities in physics are distributed normally, as was first demonstrated by James Clerk Maxwell. Examples of such quantities are: * Probability density function of a ground state in a quantum harmonic oscillator. * The position of a particle that experiences diffusion. If initially the particle is located at a specific point (that is its probability distribution is the Dirac delta function), then after time ''t'' its location is described by a normal distribution with variance ''t'', which satisfies the diffusion equation \frac f(x,t) = \frac \frac f(x,t). If the initial location is given by a certain density function g(x), then the density at time ''t'' is the convolution of ''g'' and the normal PDF.


Approximate normality

''Approximately'' normal distributions occur in many situations, as explained by the
central limit theorem In probability theory, the central limit theorem (CLT) establishes that, in many situations, when independent random variables are summed up, their properly normalized sum tends toward a normal distribution even if the original variables themselv ...
. When the outcome is produced by many small effects acting ''additively and independently'', its distribution will be close to normal. The normal approximation will not be valid if the effects act multiplicatively (instead of additively), or if there is a single external influence that has a considerably larger magnitude than the rest of the effects. * In counting problems, where the central limit theorem includes a discrete-to-continuum approximation and where Infinite divisibility, infinitely divisible and Indecomposable distribution, decomposable distributions are involved, such as ** binomial distribution, Binomial random variables, associated with binary response variables; ** Poisson distribution, Poisson random variables, associated with rare events; * Thermal radiation has a Bose–Einstein statistics, Bose–Einstein distribution on very short time scales, and a normal distribution on longer timescales due to the central limit theorem.


Assumed normality

There are statistical methods to empirically test that assumption; see the above #Normality tests, Normality tests section. * In biology, the ''logarithm'' of various variables tend to have a normal distribution, that is, they tend to have a
log-normal distribution In probability theory, a log-normal (or lognormal) distribution is a continuous probability distribution of a random variable whose logarithm is normally distributed. Thus, if the random variable is log-normally distributed, then has a normal ...
(after separation on male/female subpopulations), with examples including: ** Measures of size of living tissue (length, height, skin area, weight); ** The ''length'' of ''inert'' appendages (hair, claws, nails, teeth) of biological specimens, ''in the direction of growth''; presumably the thickness of tree bark also falls under this category; ** Certain physiological measurements, such as blood pressure of adult humans. * In finance, in particular the Black–Scholes model, changes in the ''logarithm'' of exchange rates, price indices, and stock market indices are assumed normal (these variables behave like compound interest, not like simple interest, and so are multiplicative). Some mathematicians such as Benoit Mandelbrot have argued that Levy skew alpha-stable distribution, log-Levy distributions, which possesses heavy tails would be a more appropriate model, in particular for the analysis for stock market crashes. The use of the assumption of normal distribution occurring in financial models has also been criticized by Nassim Nicholas Taleb in his works. * Propagation of uncertainty, Measurement errors in physical experiments are often modeled by a normal distribution. This use of a normal distribution does not imply that one is assuming the measurement errors are normally distributed, rather using the normal distribution produces the most conservative predictions possible given only knowledge about the mean and variance of the errors. * In Standardized testing (statistics), standardized testing, results can be made to have a normal distribution by either selecting the number and difficulty of questions (as in the Intelligence quotient, IQ test) or transforming the raw test scores into "output" scores by fitting them to the normal distribution. For example, the SAT's traditional range of 200–800 is based on a normal distribution with a mean of 500 and a standard deviation of 100. * Many scores are derived from the normal distribution, including percentile ranks ("percentiles" or "quantiles"), normal curve equivalents, stanines, Standard score, z-scores, and T-scores. Additionally, some behavioral statistical procedures assume that scores are normally distributed; for example, Student's t-test, t-tests and Analysis of variance, ANOVAs. Bell curve grading assigns relative grades based on a normal distribution of scores. * In hydrology the distribution of long duration river discharge or rainfall, e.g. monthly and yearly totals, is often thought to be practically normal according to the
central limit theorem In probability theory, the central limit theorem (CLT) establishes that, in many situations, when independent random variables are summed up, their properly normalized sum tends toward a normal distribution even if the original variables themselv ...
. The blue picture, made with CumFreq, illustrates an example of fitting the normal distribution to ranked October rainfalls showing the 90% confidence belt based on the
binomial distribution In probability theory and statistics, the binomial distribution with parameters ''n'' and ''p'' is the discrete probability distribution of the number of successes in a sequence of ''n'' independent experiments, each asking a yes–no quest ...
. The rainfall data are represented by plotting positions as part of the cumulative frequency analysis.


Methodological problems and peer review

John Ioannidis argues that using normally distributed standard deviations as standards for validating research findings leave falsifiability, falsifiable predictions about phenomena that are not normally distributed untested. This includes, for example, phenomena that only appear when all necessary conditions are present and one cannot be a substitute for another in an addition-like way and phenomena that are not randomly distributed. Ioannidis argues that standard deviation-centered validation gives a false appearance of validity to hypotheses and theories where some but not all falsifiable predictions are normally distributed since the portion of falsifiable predictions that there is evidence against may and in some cases are in the non-normally distributed parts of the range of falsifiable predictions, as well as baselessly dismissing hypotheses for which none of the falsifiable predictions are normally distributed as if were they unfalsifiable when in fact they do make falsifiable predictions. It is argued by Ioannidis that many cases of mutually exclusive theories being accepted as "validated" by research journals are caused by failure of the journals to take in empirical falsifications of non-normally distributed predictions, and not because mutually exclusive theories are true, which they cannot be, although two mutually exclusive theories can both be wrong and a third one correct.


Computational methods


Generating values from normal distribution

In computer simulations, especially in applications of the Monte-Carlo method, it is often desirable to generate values that are normally distributed. The algorithms listed below all generate the standard normal deviates, since a can be generated as , where ''Z'' is standard normal. All these algorithms rely on the availability of a random number generator ''U'' capable of producing Uniform distribution (continuous), uniform random variates. * The most straightforward method is based on the probability integral transform property: if ''U'' is distributed uniformly on (0,1), then Φ−1(''U'') will have the standard normal distribution. The drawback of this method is that it relies on calculation of the
probit function In probability theory and statistics, the probit function is the quantile function associated with the standard normal distribution. It has applications in data analysis and machine learning, in particular exploratory statistical graphics and ...
Φ−1, which cannot be done analytically. Some approximate methods are described in and in the error function, erf article. Wichura gives a fast algorithm for computing this function to 16 decimal places, which is used by R programming language, R to compute random variates of the normal distribution. * Irwin–Hall distribution#Approximating a Normal distribution, An easy-to-program approximate approach that relies on the
central limit theorem In probability theory, the central limit theorem (CLT) establishes that, in many situations, when independent random variables are summed up, their properly normalized sum tends toward a normal distribution even if the original variables themselv ...
is as follows: generate 12 uniform ''U''(0,1) deviates, add them all up, and subtract 6 – the resulting random variable will have approximately standard normal distribution. In truth, the distribution will be Irwin–Hall distribution, Irwin–Hall, which is a 12-section eleventh-order polynomial approximation to the normal distribution. This random deviate will have a limited range of (−6, 6). Note that in a true normal distribution, only 0.00034% of all samples will fall outside ±6σ. * The Box–Muller transform, Box–Muller method uses two independent random numbers ''U'' and ''V'' distributed uniform distribution (continuous), uniformly on (0,1). Then the two random variables ''X'' and ''Y'' X = \sqrt \, \cos(2 \pi V) , \qquad Y = \sqrt \, \sin(2 \pi V) . will both have the standard normal distribution, and will be
independent Independent or Independents may refer to: Arts, entertainment, and media Artist groups * Independents (artist group), a group of modernist painters based in the New Hope, Pennsylvania, area of the United States during the early 1930s * Independ ...
. This formulation arises because for a bivariate normal random vector (''X'', ''Y'') the squared norm will have the
chi-squared distribution In probability theory and statistics, the chi-squared distribution (also chi-square or \chi^2-distribution) with k degrees of freedom is the distribution of a sum of the squares of k independent standard normal random variables. The chi-squa ...
with two degrees of freedom, which is an easily generated exponential distribution, exponential random variable corresponding to the quantity −2ln(''U'') in these equations; and the angle is distributed uniformly around the circle, chosen by the random variable ''V''. * The Marsaglia polar method is a modification of the Box–Muller method which does not require computation of the sine and cosine functions. In this method, ''U'' and ''V'' are drawn from the uniform (−1,1) distribution, and then is computed. If ''S'' is greater or equal to 1, then the method starts over, otherwise the two quantities X = U\sqrt, \qquad Y = V\sqrt are returned. Again, ''X'' and ''Y'' are independent, standard normal random variables. * The Ratio method is a rejection method. The algorithm proceeds as follows: ** Generate two independent uniform deviates ''U'' and ''V''; ** Compute ''X'' = (''V'' − 0.5)/''U''; ** Optional: if ''X''2 ≤ 5 − 4''e''1/4''U'' then accept ''X'' and terminate algorithm; ** Optional: if ''X''2 ≥ 4''e''−1.35/''U'' + 1.4 then reject ''X'' and start over from step 1; ** If ''X''2 ≤ −4 ln''U'' then accept ''X'', otherwise start over the algorithm. *:The two optional steps allow the evaluation of the logarithm in the last step to be avoided in most cases. These steps can be greatly improved so that the logarithm is rarely evaluated. * The ziggurat algorithm is faster than the Box–Muller transform and still exact. In about 97% of all cases it uses only two random numbers, one random integer and one random uniform, one multiplication and an if-test. Only in 3% of the cases, where the combination of those two falls outside the "core of the ziggurat" (a kind of rejection sampling using logarithms), do exponentials and more uniform random numbers have to be employed. * Integer arithmetic can be used to sample from the standard normal distribution. This method is exact in the sense that it satisfies the conditions of ''ideal approximation''; i.e., it is equivalent to sampling a real number from the standard normal distribution and rounding this to the nearest representable floating point number. * There is also some investigation into the connection between the fast Hadamard transform and the normal distribution, since the transform employs just addition and subtraction and by the central limit theorem random numbers from almost any distribution will be transformed into the normal distribution. In this regard a series of Hadamard transforms can be combined with random permutations to turn arbitrary data sets into a normally distributed data.


Numerical approximations for the normal CDF and normal quantile function

The standard normal cumulative distribution function, CDF is widely used in scientific and statistical computing. The values Φ(''x'') may be approximated very accurately by a variety of methods, such as numerical integration, Taylor series, asymptotic series and Gauss's continued fraction#Of Kummer's confluent hypergeometric function, continued fractions. Different approximations are used depending on the desired level of accuracy. * give the approximation for Φ(''x'') for ''x > 0'' with the absolute error (algorith
26.2.17
: \Phi(x) = 1 - \varphi(x)\left(b_1 t + b_2 t^2 + b_3t^3 + b_4 t^4 + b_5 t^5\right) + \varepsilon(x), \qquad t = \frac, where ''ϕ''(''x'') is the standard normal PDF, and ''b''0 = 0.2316419, ''b''1 = 0.319381530, ''b''2 = −0.356563782, ''b''3 = 1.781477937, ''b''4 = −1.821255978, ''b''5 = 1.330274429. * lists some dozens of approximations – by means of rational functions, with or without exponentials – for the function. His algorithms vary in the degree of complexity and the resulting precision, with maximum absolute precision of 24 digits. An algorithm by combines Hart's algorithm 5666 with a continued fraction approximation in the tail to provide a fast computation algorithm with a 16-digit precision. * after recalling Hart68 solution is not suited for erf, gives a solution for both erf and erfc, with maximal relative error bound, via rational function, Rational Chebyshev Approximation. * suggested a simple algorithm based on the Taylor series expansion \Phi(x) = \frac12 + \varphi(x)\left( x + \frac 3 + \frac + \frac + \frac + \cdots \right) for calculating with arbitrary precision. The drawback of this algorithm is comparatively slow calculation time (for example it takes over 300 iterations to calculate the function with 16 digits of precision when ). * The GNU Scientific Library calculates values of the standard normal CDF using Hart's algorithms and approximations with Chebyshev polynomials. Shore (1982) introduced simple approximations that may be incorporated in stochastic optimization models of engineering and operations research, like reliability engineering and inventory analysis. Denoting , the simplest approximation for the quantile function is: z = \Phi^(p)=5.5556\left[1- \left( \frac p \right)^\right],\qquad p\ge 1/2 This approximation delivers for ''z'' a maximum absolute error of 0.026 (for , corresponding to ). For replace ''p'' by and change sign. Another approximation, somewhat less accurate, is the single-parameter approximation: z=-0.4115\left\, \qquad p\ge 1/2 The latter had served to derive a simple approximation for the loss integral of the normal distribution, defined by \begin L(z) & =\int_z^\infty (u-z)\varphi(u) \, du=\int_z^\infty [1-\Phi (u)] \, du \\[5pt] L(z) & \approx \begin 0.4115\left(\dfrac p \right) - z, & p<1/2, \\ \\ 0.4115\left( \dfrac p \right), & p\ge 1/2. \end \\[5pt] \text \\ L(z) & \approx \begin 0.4115\left\, & p < 1/2, \\ \\ 0.4115 \dfrac p, & p\ge 1/2. \end \end This approximation is particularly accurate for the right far-tail (maximum error of 10−3 for z≥1.4). Highly accurate approximations for the CDF, based on Response modeling methodology, Response Modeling Methodology (RMM, Shore, 2011, 2012), are shown in Shore (2005). Some more approximations can be found at: Error function#Approximation with elementary functions. In particular, small ''relative'' error on the whole domain for the CDF \Phi and the quantile function \Phi^ as well, is achieved via an explicitly invertible formula by Sergei Winitzki in 2008.


History


Development

Some authors attribute the credit for the discovery of the normal distribution to Abraham de Moivre, de Moivre, who in 1738 published in the second edition of his "''The Doctrine of Chances''" the study of the coefficients in the binomial expansion of . De Moivre proved that the middle term in this expansion has the approximate magnitude of 2^n/\sqrt, and that "If ''m'' or ''n'' be a Quantity infinitely great, then the Logarithm of the Ratio, which a Term distant from the middle by the Interval ''ℓ'', has to the middle Term, is -\frac." Although this theorem can be interpreted as the first obscure expression for the normal probability law, Stephen Stigler, Stigler points out that de Moivre himself did not interpret his results as anything more than the approximate rule for the binomial coefficients, and in particular de Moivre lacked the concept of the probability density function. In 1823 Carl Friedrich Gauss, Gauss published his monograph "''Theoria combinationis observationum erroribus minimis obnoxiae''" where among other things he introduces several important statistical concepts, such as the method of least squares, the method of maximum likelihood, and the ''normal distribution''. Gauss used ''M'', , to denote the measurements of some unknown quantity ''V'', and sought the "most probable" estimator of that quantity: the one that maximizes the probability of obtaining the observed experimental results. In his notation φΔ is the probability density function of the measurement errors of magnitude Δ. Not knowing what the function ''φ'' is, Gauss requires that his method should reduce to the well-known answer: the arithmetic mean of the measured values. Starting from these principles, Gauss demonstrates that the only law that rationalizes the choice of arithmetic mean as an estimator of the location parameter, is the normal law of errors: \varphi\mathit = \frac h \, e^, where ''h'' is "the measure of the precision of the observations". Using this normal law as a generic model for errors in the experiments, Gauss formulates what is now known as the non-linear least squares, non-linear weighted least squares method. Although Gauss was the first to suggest the normal distribution law, Pierre Simon de Laplace, Laplace made significant contributions. It was Laplace who first posed the problem of aggregating several observations in 1774, although his own solution led to the Laplacian distribution. It was Laplace who first calculated the value of the Gaussian integral, integral in 1782, providing the normalization constant for the normal distribution. Finally, it was Laplace who in 1810 proved and presented to the Academy the fundamental
central limit theorem In probability theory, the central limit theorem (CLT) establishes that, in many situations, when independent random variables are summed up, their properly normalized sum tends toward a normal distribution even if the original variables themselv ...
, which emphasized the theoretical importance of the normal distribution. It is of interest to note that in 1809 an Irish-American mathematician Robert Adrain published two insightful but flawed derivations of the normal probability law, simultaneously and independently from Gauss. His works remained largely unnoticed by the scientific community, until in 1871 they were exhumed by Cleveland Abbe, Abbe. In the middle of the 19th century James Clerk Maxwell, Maxwell demonstrated that the normal distribution is not just a convenient mathematical tool, but may also occur in natural phenomena: "The number of particles whose velocity, resolved in a certain direction, lies between ''x'' and ''x'' + ''dx'' is \operatorname \frac\; e^ \, dx


Naming

Today, the concept is usually known in English as the normal distribution or Gaussian distribution. Other less common names include Gauss distribution, Laplace-Gauss distribution, the law of error, the law of facility of errors, Laplace's second law, Gaussian law. Gauss himself apparently coined the term with reference to the "normal equations" involved in its applications, with normal having its technical meaning of orthogonal rather than "usual". However, by the end of the 19th century some authors had started using the name ''normal distribution'', where the word "normal" was used as an adjective – the term now being seen as a reflection of the fact that this distribution was seen as typical, common – and thus "normal". Charles Sanders Peirce, Peirce (one of those authors) once defined "normal" thus: "...the 'normal' is not the average (or any other kind of mean) of what actually occurs, but of what ''would'', in the long run, occur under certain circumstances." Around the turn of the 20th century Karl Pearson, Pearson popularized the term ''normal'' as a designation for this distribution. Also, it was Pearson who first wrote the distribution in terms of the standard deviation ''σ'' as in modern notation. Soon after this, in year 1915, Ronald Fisher, Fisher added the location parameter to the formula for normal distribution, expressing it in the way it is written nowadays: df = \frac e^ \, dx. The term "standard normal", which denotes the normal distribution with zero mean and unit variance came into general use around the 1950s, appearing in the popular textbooks by P. G. Hoel (1947) "''Introduction to mathematical statistics''" and A. M. Mood (1950) "''Introduction to the theory of statistics''".


See also

* Bates distribution – similar to the Irwin–Hall distribution, but rescaled back into the 0 to 1 range * Behrens–Fisher problem – the long-standing problem of testing whether two normal samples with different variances have same means; * Bhattacharyya distance – method used to separate mixtures of normal distributions * Erdős–Kac theorem – on the occurrence of the normal distribution in number theory * Full width at half maximum * Gaussian blur – convolution, which uses the normal distribution as a kernel * Modified half-normal distribution with the pdf on (0, \infty) is given as f(x)= \frac, where \Psi(\alpha,z)=_1\Psi_1\left(\begin\left(\alpha,\frac\right)\\(1,0)\end;z \right) denotes the Fox-Wright Psi function. * Normally distributed and uncorrelated does not imply independent * Ratio normal distribution * Reciprocal normal distribution * Standard normal table * Stein's lemma * Sub-Gaussian distribution * Sum of normally distributed random variables * Tweedie distribution – The normal distribution is a member of the family of Tweedie exponential dispersion models. * Wrapped normal distribution – the Normal distribution applied to a circular domain * Z-test – using the normal distribution


Notes


References


Citations


Sources

* * In particular, the entries fo
"bell-shaped and bell curve"
an

* * * * * * * * * * * * * * * * * * * * * * * * Translated by Stephen M. Stigler in ''Statistical Science'' 1 (3), 1986: . * * * * * * * * * * * * * * * * * * * * * * * * * * * *


External links

*
Normal distribution calculator
{{Authority control Normal distribution, Continuous distributions Conjugate prior distributions Exponential family distributions Stable distributions Location-scale family probability distributions]">f'(X), \infty.


Zero-variance limit

In the limit (mathematics), limit when \sigma tends to zero, the probability density f(x) eventually tends to zero at any x\ne \mu, but grows without limit if x = \mu, while its integral remains equal to 1. Therefore, the normal distribution cannot be defined as an ordinary
function Function or functionality may refer to: Computing * Function key, a type of key on computer keyboards * Function model, a structured representation of processes in a system * Function object or functor or functionoid, a concept of object-oriente ...
when \sigma = 0. However, one can define the normal distribution with zero variance as a
generalized function In mathematics, generalized functions are objects extending the notion of functions. There is more than one recognized theory, for example the theory of distributions. Generalized functions are especially useful in making discontinuous functions ...
; specifically, as Dirac's "delta function" \delta translated by the mean \mu, that is f(x)=\delta(x-\mu). Its CDF is then the
Heaviside step function The Heaviside step function, or the unit step function, usually denoted by or (but sometimes , or ), is a step function, named after Oliver Heaviside (1850–1925), the value of which is zero for negative arguments and one for positive argume ...
translated by the mean \mu, namely :F(x) = \begin 0 & \textx < \mu \\ 1 & \textx \geq \mu \end


Maximum entropy

Of all probability distributions over the reals with a specified mean \mu and variance \sigma^2, the normal distribution N(\mu,\sigma^2) is the one with maximum entropy. If X is a
continuous random variable In probability theory and statistics, a probability distribution is the mathematical function that gives the probabilities of occurrence of different possible outcomes for an experiment. It is a mathematical description of a random phenomenon i ...
with
probability density In probability theory, a probability density function (PDF), or density of a continuous random variable, is a function whose value at any given sample (or point) in the sample space (the set of possible values taken by the random variable) can ...
f(x), then the entropy of X is defined as : H(X) = - \int_^\infty f(x)\log f(x)\, dx where f(x)\log f(x) is understood to be zero whenever f(x)=0. This functional can be maximized, subject to the constraints that the distribution is properly normalized and has a specified variance, by using
variational calculus The calculus of variations (or Variational Calculus) is a field of mathematical analysis that uses variations, which are small changes in functions and functionals, to find maxima and minima of functionals: mappings from a set of functions t ...
. A function with two
Lagrange multipliers In mathematical optimization, the method of Lagrange multipliers is a strategy for finding the local maxima and minima of a function subject to equality constraints (i.e., subject to the condition that one or more equations have to be satisfied ex ...
is defined: : L=\int_^\infty f(x)\ln(f(x))\,dx-\lambda_0\left(1-\int_^\infty f(x)\,dx\right)-\lambda\left(\sigma^2-\int_^\infty f(x)(x-\mu)^2\,dx\right) where f(x) is, for now, regarded as some density function with mean \mu and standard deviation \sigma. At maximum entropy, a small variation \delta f(x) about f(x) will produce a variation \delta L about L which is equal to 0: : 0=\delta L=\int_^\infty \delta f(x)\left (\ln(f(x))+1+\lambda_0+\lambda(x-\mu)^2\right )\,dx Since this must hold for any small \delta f(x), the term in brackets must be zero, and solving for f(x) yields: :f(x)=e^ Using the constraint equations to solve for \lambda_0 and \lambda yields the density of the normal distribution: : f(x, \mu, \sigma)=\frace^ The entropy of a normal distribution is equal to : H(X)=\tfrac(1+\log(2\sigma^2\pi))


Other properties


Related distributions


Central limit theorem

The central limit theorem states that under certain (fairly common) conditions, the sum of many random variables will have an approximately normal distribution. More specifically, where X_1,\ldots ,X_n are
independent and identically distributed In probability theory and statistics, a collection of random variables is independent and identically distributed if each random variable has the same probability distribution as the others and all are mutually independent. This property is usua ...
random variables with the same arbitrary distribution, zero mean, and variance \sigma^2 and Z is their mean scaled by \sqrt : Z = \sqrt\left(\frac\sum_^n X_i\right) Then, as n increases, the probability distribution of Z will tend to the normal distribution with zero mean and variance \sigma^2. The theorem can be extended to variables (X_i) that are not independent and/or not identically distributed if certain constraints are placed on the degree of dependence and the moments of the distributions. Many
test statistic A test statistic is a statistic (a quantity derived from the sample) used in statistical hypothesis testing.Berger, R. L.; Casella, G. (2001). ''Statistical Inference'', Duxbury Press, Second Edition (p.374) A hypothesis test is typically specif ...
s, scores, and
estimator In statistics, an estimator is a rule for calculating an estimate of a given quantity based on observed data: thus the rule (the estimator), the quantity of interest (the estimand) and its result (the estimate) are distinguished. For example, the ...
s encountered in practice contain sums of certain random variables in 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 distributions. The central limit theorem also implies that certain distributions can be approximated by the normal distribution, for example: * The
binomial distribution In probability theory and statistics, the binomial distribution with parameters ''n'' and ''p'' is the discrete probability distribution of the number of successes in a sequence of ''n'' independent experiments, each asking a yes–no quest ...
B(n,p) is approximately normal with mean np and variance np(1-p) for large n and for p not too close to 0 or 1. * The
Poisson distribution In probability theory and statistics, the Poisson distribution is a discrete probability distribution that expresses the probability of a given number of events occurring in a fixed interval of time or space if these events occur with a known co ...
with parameter \lambda is approximately normal with mean \lambda and variance \lambda, for large values of \lambda. * The
chi-squared distribution In probability theory and statistics, the chi-squared distribution (also chi-square or \chi^2-distribution) with k degrees of freedom is the distribution of a sum of the squares of k independent standard normal random variables. The chi-squa ...
\chi^2(k) is approximately normal with mean k and variance 2k, for large k. * The
Student's t-distribution In probability and statistics, Student's ''t''-distribution (or simply the ''t''-distribution) is any member of a family of continuous probability distributions that arise when estimating the mean of a normally distributed population in sit ...
t(\nu) is approximately normal with mean 0 and variance 1 when \nu is large. Whether these approximations are sufficiently accurate depends on the purpose for which they are needed, and the rate of convergence to the normal distribution. It is typically the case that such approximations are less accurate in the tails of the distribution. A general upper bound for the approximation error in the central limit theorem is given by the
Berry–Esseen theorem In probability theory, the central limit theorem states that, under certain circumstances, the probability distribution of the scaled mean of a random sample converges to a normal distribution as the sample size increases to infinity. Under strong ...
, improvements of the approximation are given by the
Edgeworth expansion The Gram–Charlier A series (named in honor of Jørgen Pedersen Gram and Carl Charlier), and the Edgeworth series (named in honor of Francis Ysidro Edgeworth) are series that approximate a probability distribution in terms of its cumulants. The se ...
s. This theorem can also be used to justify modeling the sum of many uniform noise sources as
Gaussian noise Gaussian noise, named after Carl Friedrich Gauss, is a term from signal processing theory denoting a kind of signal noise that has a probability density function (pdf) equal to that of the normal distribution (which is also known as the Gaussia ...
. See
AWGN Additive white Gaussian noise (AWGN) is a basic noise model used in information theory to mimic the effect of many random processes that occur in nature. The modifiers denote specific characteristics: * ''Additive'' because it is added to any nois ...
.


Operations and functions of normal variables

The
probability density In probability theory, a probability density function (PDF), or density of a continuous random variable, is a function whose value at any given sample (or point) in the sample space (the set of possible values taken by the random variable) can ...
,
cumulative distribution In statistics, the frequency (or absolute frequency) of an event i is the number n_i of times the observation has occurred/recorded in an experiment or study. These frequencies are often depicted graphically or in tabular form. Types The cumul ...
, and inverse cumulative distribution of any function of one or more independent or correlated normal variables can be computed with the numerical method of ray-tracing
Matlab code
. In the following sections we look at some special cases.


Operations on a single normal variable

If X is distributed normally with mean \mu and variance \sigma^2, then * aX+b, for any real numbers a and b, is also normally distributed, with mean a\mu+b and standard deviation , a, \sigma. That is, the family of normal distributions is closed under linear transformations. * The exponential of X is distributed log-normally: . * The absolute value of X has
folded normal distribution The folded normal distribution is a probability distribution related to the normal distribution. Given a normally distributed random variable ''X'' with mean ''μ'' and variance ''σ''2, the random variable ''Y'' = , ''X'', has a folded normal d ...
: . If \mu = 0 this is known as the
half-normal distribution In probability theory and statistics, the half-normal distribution is a special case of the folded normal distribution. Let X follow an ordinary normal distribution, N(0,\sigma^2). Then, Y=, X, follows a half-normal distribution. Thus, the hal ...
. * The absolute value of normalized residuals, , ''X'' − ''μ'', /''σ'', has
chi distribution In probability theory and statistics, the chi distribution is a continuous probability distribution. It is the distribution of the positive square root of the sum of squares of a set of independent random variables each following a standard norm ...
with one degree of freedom: , X - \mu, / \sigma \sim \chi_1. * The square of ''X''/''σ'' has the
noncentral chi-squared distribution In probability theory and statistics, the noncentral chi-squared distribution (or noncentral chi-square distribution, noncentral \chi^2 distribution) is a noncentral generalization of the chi-squared distribution. It often arises in the power a ...
with one degree of freedom: X^2 / \sigma^2 \sim \chi_1^2(\mu^2 / \sigma^2). If \mu = 0, the distribution is called simply chi-squared. * The log likelihood of a normal variable x is simply the log of its
probability density function In probability theory, a probability density function (PDF), or density of a continuous random variable, is a function whose value at any given sample (or point) in the sample space (the set of possible values taken by the random variable) can ...
: \ln p(x)= -\frac \left(\frac \right)^2 -\ln \left(\sigma \sqrt \right) = -\frac z^2 -\ln \left(\sigma \sqrt \right). Since this is a scaled and shifted square of a standard normal variable, it is distributed as a scaled and shifted chi-squared variable. * The distribution of the variable ''X'' restricted to an interval 'a'', ''b''is called the
truncated normal distribution In probability and statistics, the truncated normal distribution is the probability distribution derived from that of a normally distributed random variable by bounding the random variable from either below or above (or both). The truncated no ...
. * (''X'' − ''μ'')−2 has a
Lévy distribution In probability theory and statistics, the Lévy distribution, named after Paul Lévy, is a continuous probability distribution for a non-negative random variable. In spectroscopy, this distribution, with frequency as the dependent variable, is kn ...
with location 0 and scale ''σ''−2.


= Operations on two independent normal variables

= * If X_1 and X_2 are two
independent Independent or Independents may refer to: Arts, entertainment, and media Artist groups * Independents (artist group), a group of modernist painters based in the New Hope, Pennsylvania, area of the United States during the early 1930s * Independ ...
normal random variables, with means \mu_1, \mu_2 and standard deviations \sigma_1, \sigma_2, then their sum X_1 + X_2 will also be normally distributed, roof/sup> with mean \mu_1 + \mu_2 and variance \sigma_1^2 + \sigma_2^2. * In particular, if X and Y are independent normal deviates with zero mean and variance \sigma^2, then X + Y and X - Y are also independent and normally distributed, with zero mean and variance 2\sigma^2. This is a special case of the
polarization identity In linear algebra, a branch of mathematics, the polarization identity is any one of a family of formulas that express the inner product of two vectors in terms of the norm of a normed vector space. If a norm arises from an inner product then t ...
. * If X_1, X_2 are two independent normal deviates with mean \mu and deviation \sigma, and a, b are arbitrary real numbers, then the variable X_3 = \frac + \mu is also normally distributed with mean \mu and deviation \sigma. It follows that the normal distribution is
stable A stable is a building in which livestock, especially horses, are kept. It most commonly means a building that is divided into separate stalls for individual animals and livestock. There are many different types of stables in use today; the ...
(with exponent \alpha=2).


= Operations on two independent standard normal variables

= If X_1 and X_2 are two independent standard normal random variables with mean 0 and variance 1, then * Their sum and difference is distributed normally with mean zero and variance two: X_1 \pm X_2 \sim N(0, 2). * Their product Z = X_1 X_2 follows the
product distribution A product distribution is a probability distribution constructed as the distribution of the product of random variables having two other known distributions. Given two statistically independent random variables ''X'' and ''Y'', the distribution of ...
with density function f_Z(z) = \pi^ K_0(, z, ) where K_0 is the
modified Bessel function of the second kind Bessel functions, first defined by the mathematician Daniel Bernoulli and then generalized by Friedrich Bessel, are canonical solutions of Bessel's differential equation x^2 \frac + x \frac + \left(x^2 - \alpha^2 \right)y = 0 for an arbitrary ...
. This distribution is symmetric around zero, unbounded at z = 0, and has the
characteristic function In mathematics, the term "characteristic function" can refer to any of several distinct concepts: * The indicator function of a subset, that is the function ::\mathbf_A\colon X \to \, :which for a given subset ''A'' of ''X'', has value 1 at points ...
\phi_Z(t) = (1 + t^2)^. * Their ratio follows the standard
Cauchy distribution The Cauchy distribution, named after Augustin Cauchy, is a continuous probability distribution. It is also known, especially among physicists, as the Lorentz distribution (after Hendrik Lorentz), Cauchy–Lorentz distribution, Lorentz(ian) fun ...
: X_1/ X_2 \sim \operatorname(0, 1). * Their Euclidean norm \sqrt has the
Rayleigh distribution In probability theory and statistics, the Rayleigh distribution is a continuous probability distribution for nonnegative-valued random variables. Up to rescaling, it coincides with the chi distribution with two degrees of freedom. The distribut ...
.


Operations on multiple independent normal variables

* Any linear combination of independent normal deviates is a normal deviate. * If X_1, X_2, \ldots, X_n are independent standard normal random variables, then the sum of their squares has the
chi-squared distribution In probability theory and statistics, the chi-squared distribution (also chi-square or \chi^2-distribution) with k degrees of freedom is the distribution of a sum of the squares of k independent standard normal random variables. The chi-squa ...
with n degrees of freedom X_1^2 + \cdots + X_n^2 \sim \chi_n^2. * If X_1, X_2, \ldots, X_n are independent normally distributed random variables with means \mu and variances \sigma^2, then their
sample mean The sample mean (or "empirical mean") and the sample covariance are statistics computed from a Sample (statistics), sample of data on one or more random variables. The sample mean is the average value (or mean, mean value) of a sample (statistic ...
is independent from the sample
standard deviation In statistics, the standard deviation is a measure of the amount of variation or dispersion of a set of values. A low standard deviation indicates that the values tend to be close to the mean (also called the expected value) of the set, while ...
, which can be demonstrated using Basu's theorem or
Cochran's theorem In statistics, Cochran's theorem, devised by William G. Cochran, is a theorem used to justify results relating to the probability distributions of statistics that are used in the analysis of variance. Statement Let ''U''1, ..., ''U'N'' be i.i. ...
. The ratio of these two quantities will have the
Student's t-distribution In probability and statistics, Student's ''t''-distribution (or simply the ''t''-distribution) is any member of a family of continuous probability distributions that arise when estimating the mean of a normally distributed population in sit ...
with n-1 degrees of freedom: t = \frac = \frac \sim t_. * If X_1, X_2, \ldots, X_n, Y_1, Y_2, \ldots, Y_m are independent standard normal random variables, then the ratio of their normalized sums of squares will have the with degrees of freedom: F = \frac \sim F_.


Operations on multiple correlated normal variables

* A
quadratic form In mathematics, a quadratic form is a polynomial with terms all of degree two ("form" is another name for a homogeneous polynomial). For example, :4x^2 + 2xy - 3y^2 is a quadratic form in the variables and . The coefficients usually belong to a ...
of a normal vector, i.e. a quadratic function q = \sum x_i^2 + \sum x_j + c of multiple independent or correlated normal variables, is a generalized chi-square variable.


Operations on the density function

The split normal distribution is most directly defined in terms of joining scaled sections of the density functions of different normal distributions and rescaling the density to integrate to one. The
truncated normal distribution In probability and statistics, the truncated normal distribution is the probability distribution derived from that of a normally distributed random variable by bounding the random variable from either below or above (or both). The truncated no ...
results from rescaling a section of a single density function.


Infinite divisibility and Cramér's theorem

For any positive integer \text, any normal distribution with mean \mu and variance \sigma^2 is the distribution of the sum of \text independent normal deviates, each with mean \frac and variance \frac. This property is called
infinite divisibility Infinite divisibility arises in different ways in philosophy, physics, economics, order theory (a branch of mathematics), and probability theory (also a branch of mathematics). One may speak of infinite divisibility, or the lack thereof, of matter ...
. Conversely, if X_1 and X_2 are independent random variables and their sum X_1+X_2 has a normal distribution, then both X_1 and X_2 must be normal deviates. This result is known as Cramér's decomposition theorem, and is equivalent to saying that the convolution of two distributions is normal if and only if both are normal. Cramér's theorem implies that a linear combination of independent non-Gaussian variables will never have an exactly normal distribution, although it may approach it arbitrarily closely.


Bernstein's theorem

Bernstein's theorem states that if X and Y are independent and X + Y and X - Y are also independent, then both ''X'' and ''Y'' must necessarily have normal distributions. More generally, if X_1, \ldots, X_n are independent random variables, then two distinct linear combinations \sum and \sumwill be independent if and only if all X_k are normal and \sum, where \sigma_k^2 denotes the variance of X_k.


Extensions

The notion of normal distribution, being one of the most important distributions in probability theory, has been extended far beyond the standard framework of the univariate (that is one-dimensional) case (Case 1). All these extensions are also called ''normal'' or ''Gaussian'' laws, so a certain ambiguity in names exists. * The
multivariate normal distribution In probability theory and statistics, the multivariate normal distribution, multivariate Gaussian distribution, or joint normal distribution is a generalization of the one-dimensional (univariate) normal distribution to higher dimensions. One d ...
describes the Gaussian law in the ''k''-dimensional Euclidean space. A vector is multivariate-normally distributed if any linear combination of its components has a (univariate) normal distribution. The variance of ''X'' is a ''k×k'' symmetric positive-definite matrix ''V''. The multivariate normal distribution is a special case of the
elliptical distribution In probability and statistics, an elliptical distribution is any member of a broad family of probability distributions that generalize the multivariate normal distribution. Intuitively, in the simplified two and three dimensional case, the joint di ...
s. As such, its iso-density loci in the ''k'' = 2 case are ellipses and in the case of arbitrary ''k'' are ellipsoids. * Rectified Gaussian distribution a rectified version of normal distribution with all the negative elements reset to 0 * Complex normal distribution deals with the complex normal vectors. A complex vector is said to be normal if both its real and imaginary components jointly possess a 2''k''-dimensional multivariate normal distribution. The variance-covariance structure of ''X'' is described by two matrices: the ''variance'' matrix Γ, and the ''relation'' matrix ''C''. * Matrix normal distribution describes the case of normally distributed matrices. * Gaussian processes are the normally distributed stochastic processes. These can be viewed as elements of some infinite-dimensional Hilbert space ''H'', and thus are the analogues of multivariate normal vectors for the case . A random element is said to be normal if for any constant the scalar product has a (univariate) normal distribution. The variance structure of such Gaussian random element can be described in terms of the linear ''covariance ''. Several Gaussian processes became popular enough to have their own names: ** Wiener process, Brownian motion, ** Brownian bridge, ** Ornstein–Uhlenbeck process. * Gaussian q-distribution is an abstract mathematical construction that represents a "q-analogue" of the normal distribution. * the q-Gaussian is an analogue of the Gaussian distribution, in the sense that it maximises the Tsallis entropy, and is one type of Tsallis distribution. Note that this distribution is different from the Gaussian q-distribution above. * The Kaniadakis Gaussian distribution, Kaniadakis ''κ''-Gaussian distribution is a generalization of the Gaussian distribution which arises from the Kaniadakis statistics, being one of the Kaniadakis distribution, Kaniadakis distributions. A random variable ''X'' has a two-piece normal distribution if it has a distribution : f_X( x ) = N( \mu, \sigma_1^2 ) \text x \le \mu : f_X( x ) = N( \mu, \sigma_2^2 ) \text x \ge \mu where ''μ'' is the mean and ''σ''1 and ''σ''2 are the standard deviations of the distribution to the left and right of the mean respectively. The mean, variance and third central moment of this distribution have been determined : \operatorname( X ) = \mu + \sqrt ( \sigma_2 - \sigma_1 ) : \operatorname( X ) = \left( 1 - \frac 2 \pi\right)( \sigma_2 - \sigma_1 )^2 + \sigma_1 \sigma_2 : \operatorname( X ) = \sqrt( \sigma_2 - \sigma_1 ) \left[ \left( \frac 4 \pi - 1 \right) ( \sigma_2 - \sigma_1)^2 + \sigma_1 \sigma_2 \right] where E(''X''), V(''X'') and T(''X'') are the mean, variance, and third central moment respectively. One of the main practical uses of the Gaussian law is to model the empirical distributions of many different random variables encountered in practice. In such case a possible extension would be a richer family of distributions, having more than two parameters and therefore being able to fit the empirical distribution more accurately. The examples of such extensions are: * Pearson distribution — a four-parameter family of probability distributions that extend the normal law to include different skewness and kurtosis values. * The generalized normal distribution, also known as the exponential power distribution, allows for distribution tails with thicker or thinner asymptotic behaviors.


Statistical inference


Estimation of parameters

It is often the case that we do not know the parameters of the normal distribution, but instead want to Estimation theory, estimate them. That is, having a sample (x_1, \ldots, x_n) from a normal N(\mu, \sigma^2) population we would like to learn the approximate values of parameters \mu and \sigma^2. The standard approach to this problem is the maximum likelihood method, which requires maximization of the ''log-likelihood function'': : \ln\mathcal(\mu,\sigma^2) = \sum_^n \ln f(x_i\mid\mu,\sigma^2) = -\frac\ln(2\pi) - \frac\ln\sigma^2 - \frac\sum_^n (x_i-\mu)^2. Taking derivatives with respect to \mu and \sigma^2 and solving the resulting system of first order conditions yields the ''maximum likelihood estimates'': : \hat = \overline \equiv \frac\sum_^n x_i, \qquad \hat^2 = \frac \sum_^n (x_i - \overline)^2.


Sample mean

Estimator \textstyle\hat\mu is called the ''
sample mean The sample mean (or "empirical mean") and the sample covariance are statistics computed from a Sample (statistics), sample of data on one or more random variables. The sample mean is the average value (or mean, mean value) of a sample (statistic ...
'', since it is the arithmetic mean of all observations. The statistic \textstyle\overline is complete statistic, complete and sufficient statistic, sufficient for \mu, and therefore by the Lehmann–Scheffé theorem, \textstyle\hat\mu is the uniformly minimum variance unbiased (UMVU) estimator. In finite samples it is distributed normally: : \hat\mu \sim \mathcal(\mu,\sigma^2/n). The variance of this estimator is equal to the ''μμ''-element of the inverse Fisher information matrix \textstyle\mathcal^. This implies that the estimator is efficient estimator, finite-sample efficient. Of practical importance is the fact that the standard error (statistics), standard error of \textstyle\hat\mu is proportional to \textstyle1/\sqrt, that is, if one wishes to decrease the standard error by a factor of 10, one must increase the number of points in the sample by a factor of 100. This fact is widely used in determining sample sizes for opinion polls and the number of trials in Monte Carlo simulations. From the standpoint of the asymptotic theory (statistics), asymptotic theory, \textstyle\hat\mu is consistent estimator, consistent, that is, it convergence in probability, converges in probability to \mu as n\rightarrow\infty. The estimator is also asymptotic normality, asymptotically normal, which is a simple corollary of the fact that it is normal in finite samples: : \sqrt(\hat\mu-\mu) \,\xrightarrow\, \mathcal(0,\sigma^2).


Sample variance

The estimator \textstyle\hat\sigma^2 is called the ''sample variance'', since it is the variance of the sample ((x_1, \ldots, x_n)). In practice, another estimator is often used instead of the \textstyle\hat\sigma^2. This other estimator is denoted s^2, and is also called the ''sample variance'', which represents a certain ambiguity in terminology; its square root s is called the ''sample standard deviation''. The estimator s^2 differs from \textstyle\hat\sigma^2 by having instead of ''n'' in the denominator (the so-called Bessel's correction): : s^2 = \frac \hat\sigma^2 = \frac \sum_^n (x_i - \overline)^2. The difference between s^2 and \textstyle\hat\sigma^2 becomes negligibly small for large ''n''s. In finite samples however, the motivation behind the use of s^2 is that it is an unbiased estimator of the underlying parameter \sigma^2, whereas \textstyle\hat\sigma^2 is biased. Also, by the Lehmann–Scheffé theorem the estimator s^2 is uniformly minimum variance unbiased (Minimum-variance unbiased estimator, UMVU), which makes it the "best" estimator among all unbiased ones. However it can be shown that the biased estimator \textstyle\hat\sigma^2 is "better" than the s^2 in terms of the mean squared error (MSE) criterion. In finite samples both s^2 and \textstyle\hat\sigma^2 have scaled
chi-squared distribution In probability theory and statistics, the chi-squared distribution (also chi-square or \chi^2-distribution) with k degrees of freedom is the distribution of a sum of the squares of k independent standard normal random variables. The chi-squa ...
with degrees of freedom: : s^2 \sim \frac \cdot \chi^2_, \qquad \hat\sigma^2 \sim \frac \cdot \chi^2_. The first of these expressions shows that the variance of s^2 is equal to 2\sigma^4/(n-1), which is slightly greater than the ''σσ''-element of the inverse Fisher information matrix \textstyle\mathcal^. Thus, s^2 is not an efficient estimator for \sigma^2, and moreover, since s^2 is UMVU, we can conclude that the finite-sample efficient estimator for \sigma^2 does not exist. Applying the asymptotic theory, both estimators s^2 and \textstyle\hat\sigma^2 are consistent, that is they converge in probability to \sigma^2 as the sample size n\rightarrow\infty. The two estimators are also both asymptotically normal: : \sqrt(\hat\sigma^2 - \sigma^2) \simeq \sqrt(s^2-\sigma^2) \,\xrightarrow\, \mathcal(0,2\sigma^4). In particular, both estimators are asymptotically efficient for \sigma^2.


Confidence intervals

By
Cochran's theorem In statistics, Cochran's theorem, devised by William G. Cochran, is a theorem used to justify results relating to the probability distributions of statistics that are used in the analysis of variance. Statement Let ''U''1, ..., ''U'N'' be i.i. ...
, for normal distributions the sample mean \textstyle\hat\mu and the sample variance ''s''2 are
independent Independent or Independents may refer to: Arts, entertainment, and media Artist groups * Independents (artist group), a group of modernist painters based in the New Hope, Pennsylvania, area of the United States during the early 1930s * Independ ...
, which means there can be no gain in considering their joint distribution. There is also a converse theorem: if in a sample the sample mean and sample variance are independent, then the sample must have come from the normal distribution. The independence between \textstyle\hat\mu and ''s'' can be employed to construct the so-called ''t-statistic'': : t = \frac = \frac \sim t_ This quantity ''t'' has the
Student's t-distribution In probability and statistics, Student's ''t''-distribution (or simply the ''t''-distribution) is any member of a family of continuous probability distributions that arise when estimating the mean of a normally distributed population in sit ...
with degrees of freedom, and it is an ancillary statistic (independent of the value of the parameters). Inverting the distribution of this ''t''-statistics will allow us to construct the
confidence interval In frequentist statistics, a confidence interval (CI) is a range of estimates for an unknown parameter. A confidence interval is computed at a designated ''confidence level''; the 95% confidence level is most common, but other levels, such as 9 ...
for ''μ''; similarly, inverting the ''χ''2 distribution of the statistic ''s''2 will give us the confidence interval for ''σ''2: :\mu \in \left[ \hat\mu - t_ \fracs, \hat\mu + t_ \fracs \right], :\sigma^2 \in \left[ \frac, \frac \right], where ''tk,p'' and are the ''p''th
quantile In statistics and probability, quantiles are cut points dividing the range of a probability distribution into continuous intervals with equal probabilities, or dividing the observations in a sample in the same way. There is one fewer quantile tha ...
s of the ''t''- and ''χ''2-distributions respectively. These confidence intervals are of the ''confidence level'' , meaning that the true values ''μ'' and ''σ''2 fall outside of these intervals with probability (or significance level) ''α''. In practice people usually take , resulting in the 95% confidence intervals. Approximate formulas can be derived from the asymptotic distributions of \textstyle\hat\mu and ''s''2: :\mu \in \left[ \hat\mu - , z_, \fracs, \hat\mu + , z_, \fracs \right], :\sigma^2 \in \left[ s^2 - , z_, \fracs^2, s^2 + , z_, \fracs^2 \right], The approximate formulas become valid for large values of ''n'', and are more convenient for the manual calculation since the standard normal quantiles ''z''''α''/2 do not depend on ''n''. In particular, the most popular value of , results in .


Normality tests

Normality tests assess the likelihood that the given data set comes from a normal distribution. Typically the null hypothesis ''H''0 is that the observations are distributed normally with unspecified mean ''μ'' and variance ''σ''2, versus the alternative ''Ha'' that the distribution is arbitrary. Many tests (over 40) have been devised for this problem. The more prominent of them are outlined below: Diagnostic plots are more intuitively appealing but subjective at the same time, as they rely on informal human judgement to accept or reject the null hypothesis. *
Q–Q plot In statistics, a Q–Q plot (quantile-quantile plot) is a probability plot, a List of graphical methods, graphical method for comparing two probability distributions by plotting their ''quantiles'' against each other. A point on the plot co ...
, also known as normal probability plot or rankit plot—is a plot of the sorted values from the data set against the expected values of the corresponding quantiles from the standard normal distribution. That is, it's a plot of point of the form (Φ−1(''pk''), ''x''(''k'')), where plotting points ''pk'' are equal to ''pk'' = (''k'' − ''α'')/(''n'' + 1 − 2''α'') and ''α'' is an adjustment constant, which can be anything between 0 and 1. If the null hypothesis is true, the plotted points should approximately lie on a straight line. * P–P plot – similar to the Q–Q plot, but used much less frequently. This method consists of plotting the points (Φ(''z''(''k'')), ''pk''), where \textstyle z_ = (x_-\hat\mu)/\hat\sigma. For normally distributed data this plot should lie on a 45° line between (0, 0) and (1, 1). Goodness-of-fit tests: ''Moment-based tests'': * D'Agostino's K-squared test * Jarque–Bera test * Shapiro–Wilk test: This is based on the fact that the line in the Q–Q plot has the slope of ''σ''. The test compares the least squares estimate of that slope with the value of the sample variance, and rejects the null hypothesis if these two quantities differ significantly. ''Tests based on the empirical distribution function'': * Anderson–Darling test * Lilliefors test (an adaptation of the Kolmogorov–Smirnov test)


Bayesian analysis of the normal distribution

Bayesian analysis of normally distributed data is complicated by the many different possibilities that may be considered: * Either the mean, or the variance, or neither, may be considered a fixed quantity. * When the variance is unknown, analysis may be done directly in terms of the variance, or in terms of the
precision Precision, precise or precisely may refer to: Science, and technology, and mathematics Mathematics and computing (general) * Accuracy and precision, measurement deviation from true value and its scatter * Significant figures, the number of digit ...
, the reciprocal of the variance. The reason for expressing the formulas in terms of precision is that the analysis of most cases is simplified. * Both univariate and multivariate normal distribution, multivariate cases need to be considered. * Either conjugate prior, conjugate or improper prior, improper prior distributions may be placed on the unknown variables. * An additional set of cases occurs in Bayesian linear regression, where in the basic model the data is assumed to be normally distributed, and normal priors are placed on the regression coefficients. The resulting analysis is similar to the basic cases of independent identically distributed data. The formulas for the non-linear-regression cases are summarized in the conjugate prior article.


Sum of two quadratics


= Scalar form

= The following auxiliary formula is useful for simplifying the posterior distribution, posterior update equations, which otherwise become fairly tedious. :a(x-y)^2 + b(x-z)^2 = (a + b)\left(x - \frac\right)^2 + \frac(y-z)^2 This equation rewrites the sum of two quadratics in ''x'' by expanding the squares, grouping the terms in ''x'', and completing the square. Note the following about the complex constant factors attached to some of the terms: # The factor \frac has the form of a weighted average of ''y'' and ''z''. # \frac = \frac = (a^ + b^)^. This shows that this factor can be thought of as resulting from a situation where the Multiplicative inverse, reciprocals of quantities ''a'' and ''b'' add directly, so to combine ''a'' and ''b'' themselves, it's necessary to reciprocate, add, and reciprocate the result again to get back into the original units. This is exactly the sort of operation performed by the harmonic mean, so it is not surprising that \frac is one-half the harmonic mean of ''a'' and ''b''.


= Vector form

= A similar formula can be written for the sum of two vector quadratics: If x, y, z are vectors of length ''k'', and A and B are symmetric matrix, symmetric, invertible matrices of size k\times k, then : \begin & (\mathbf-\mathbf)'\mathbf(\mathbf-\mathbf) + (\mathbf-\mathbf)' \mathbf(\mathbf-\mathbf) \\ = & (\mathbf - \mathbf)'(\mathbf+\mathbf)(\mathbf - \mathbf) + (\mathbf - \mathbf)'(\mathbf^ + \mathbf^)^(\mathbf - \mathbf) \end where :\mathbf = (\mathbf + \mathbf)^(\mathbf\mathbf + \mathbf \mathbf) Note that the form x′ A x is called a
quadratic form In mathematics, a quadratic form is a polynomial with terms all of degree two ("form" is another name for a homogeneous polynomial). For example, :4x^2 + 2xy - 3y^2 is a quadratic form in the variables and . The coefficients usually belong to a ...
and is a scalar (mathematics), scalar: :\mathbf'\mathbf\mathbf = \sum_a_ x_i x_j In other words, it sums up all possible combinations of products of pairs of elements from x, with a separate coefficient for each. In addition, since x_i x_j = x_j x_i, only the sum a_ + a_ matters for any off-diagonal elements of A, and there is no loss of generality in assuming that A is symmetric matrix, symmetric. Furthermore, if A is symmetric, then the form \mathbf'\mathbf\mathbf = \mathbf'\mathbf\mathbf.


Sum of differences from the mean

Another useful formula is as follows: \sum_^n (x_i-\mu)^2 = \sum_^n (x_i-\bar)^2 + n(\bar -\mu)^2 where \bar = \frac \sum_^n x_i.


With known variance

For a set of i.i.d. normally distributed data points X of size ''n'' where each individual point ''x'' follows x \sim \mathcal(\mu, \sigma^2) with known
variance In probability theory and statistics, variance is the expectation of the squared deviation of a random variable from its population mean or sample mean. Variance is a measure of dispersion, meaning it is a measure of how far a set of numbers ...
σ2, the conjugate prior distribution is also normally distributed. This can be shown more easily by rewriting the variance as the
precision Precision, precise or precisely may refer to: Science, and technology, and mathematics Mathematics and computing (general) * Accuracy and precision, measurement deviation from true value and its scatter * Significant figures, the number of digit ...
, i.e. using τ = 1/σ2. Then if x \sim \mathcal(\mu, 1/\tau) and \mu \sim \mathcal(\mu_0, 1/\tau_0), we proceed as follows. First, the likelihood function is (using the formula above for the sum of differences from the mean): :\begin p(\mathbf\mid\mu,\tau) &= \prod_^n \sqrt \exp\left(-\frac\tau(x_i-\mu)^2\right) \\ &= \left(\frac\right)^ \exp\left(-\frac\tau \sum_^n (x_i-\mu)^2\right) \\ &= \left(\frac\right)^ \exp\left[-\frac\tau \left(\sum_^n(x_i-\bar)^2 + n(\bar -\mu)^2\right)\right]. \end Then, we proceed as follows: :\begin p(\mu\mid\mathbf) &\propto p(\mathbf\mid\mu) p(\mu) \\ & = \left(\frac\right)^ \exp\left[-\frac\tau \left(\sum_^n(x_i-\bar)^2 + n(\bar -\mu)^2\right)\right] \sqrt \exp\left(-\frac\tau_0(\mu-\mu_0)^2\right) \\ &\propto \exp\left(-\frac\left(\tau\left(\sum_^n(x_i-\bar)^2 + n(\bar -\mu)^2\right) + \tau_0(\mu-\mu_0)^2\right)\right) \\ &\propto \exp\left(-\frac \left(n\tau(\bar-\mu)^2 + \tau_0(\mu-\mu_0)^2 \right)\right) \\ &= \exp\left(-\frac(n\tau + \tau_0)\left(\mu - \dfrac\right)^2 + \frac(\bar - \mu_0)^2\right) \\ &\propto \exp\left(-\frac(n\tau + \tau_0)\left(\mu - \dfrac\right)^2\right) \end In the above derivation, we used the formula above for the sum of two quadratics and eliminated all constant factors not involving ''μ''. The result is the kernel (statistics), kernel of a normal distribution, with mean \frac and precision n\tau + \tau_0, i.e. :p(\mu\mid\mathbf) \sim \mathcal\left(\frac, \frac\right) This can be written as a set of Bayesian update equations for the posterior parameters in terms of the prior parameters: :\begin \tau_0' &= \tau_0 + n\tau \\[5pt] \mu_0' &= \frac \\[5pt] \bar &= \frac\sum_^n x_i \end That is, to combine ''n'' data points with total precision of ''nτ'' (or equivalently, total variance of ''n''/''σ''2) and mean of values \bar, derive a new total precision simply by adding the total precision of the data to the prior total precision, and form a new mean through a ''precision-weighted average'', i.e. a weighted average of the data mean and the prior mean, each weighted by the associated total precision. This makes logical sense if the precision is thought of as indicating the certainty of the observations: In the distribution of the posterior mean, each of the input components is weighted by its certainty, and the certainty of this distribution is the sum of the individual certainties. (For the intuition of this, compare the expression "the whole is (or is not) greater than the sum of its parts". In addition, consider that the knowledge of the posterior comes from a combination of the knowledge of the prior and likelihood, so it makes sense that we are more certain of it than of either of its components.) The above formula reveals why it is more convenient to do Bayesian analysis of conjugate priors for the normal distribution in terms of the precision. The posterior precision is simply the sum of the prior and likelihood precisions, and the posterior mean is computed through a precision-weighted average, as described above. The same formulas can be written in terms of variance by reciprocating all the precisions, yielding the more ugly formulas :\begin ' &= \frac \\[5pt] \mu_0' &= \frac \\[5pt] \bar &= \frac\sum_^n x_i \end


With known mean

For a set of i.i.d. normally distributed data points X of size ''n'' where each individual point ''x'' follows x \sim \mathcal(\mu, \sigma^2) with known mean μ, the conjugate prior of the
variance In probability theory and statistics, variance is the expectation of the squared deviation of a random variable from its population mean or sample mean. Variance is a measure of dispersion, meaning it is a measure of how far a set of numbers ...
has an inverse gamma distribution or a scaled inverse chi-squared distribution. The two are equivalent 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. The prior for σ2 is as follows: :p(\sigma^2\mid\nu_0,\sigma_0^2) = \frac~\frac \propto \frac The likelihood function from above, written in terms of the variance, is: :\begin p(\mathbf\mid\mu,\sigma^2) &= \left(\frac\right)^ \exp\left[-\frac \sum_^n (x_i-\mu)^2\right] \\ &= \left(\frac\right)^ \exp\left[-\frac\right] \end where :S = \sum_^n (x_i-\mu)^2. Then: :\begin p(\sigma^2\mid\mathbf) &\propto p(\mathbf\mid\sigma^2) p(\sigma^2) \\ &= \left(\frac\right)^ \exp\left[-\frac\right] \frac~\frac \\ &\propto \left(\frac\right)^ \frac \exp\left[-\frac + \frac\right] \\ &= \frac \exp\left[-\frac\right] \end The above is also a scaled inverse chi-squared distribution where :\begin \nu_0' &= \nu_0 + n \\ \nu_0'' &= \nu_0 \sigma_0^2 + \sum_^n (x_i-\mu)^2 \end or equivalently :\begin \nu_0' &= \nu_0 + n \\ ' &= \frac \end Reparameterizing in terms of an inverse gamma distribution, the result is: :\begin \alpha' &= \alpha + \frac \\ \beta' &= \beta + \frac \end


With unknown mean and unknown variance

For a set of i.i.d. normally distributed data points X of size ''n'' where each individual point ''x'' follows x \sim \mathcal(\mu, \sigma^2) with unknown mean μ and unknown
variance In probability theory and statistics, variance is the expectation of the squared deviation of a random variable from its population mean or sample mean. Variance is a measure of dispersion, meaning it is a measure of how far a set of numbers ...
σ2, a combined (multivariate) conjugate prior is placed over the mean and variance, consisting of a normal-inverse-gamma distribution. Logically, this originates as follows: # From the analysis of the case with unknown mean but known variance, we see that the update equations involve sufficient statistics computed from the data consisting of the mean of the data points and the total variance of the data points, computed in turn from the known variance divided by the number of data points. # From the analysis of the case with unknown variance but known mean, we see that the update equations involve sufficient statistics over the data consisting of the number of data points and sum of squared deviations. # Keep in mind that the posterior update values serve as the prior distribution when further data is handled. Thus, we should logically think of our priors in terms of the sufficient statistics just described, with the same semantics kept in mind as much as possible. # To handle the case where both mean and variance are unknown, we could place independent priors over the mean and variance, with fixed estimates of the average mean, total variance, number of data points used to compute the variance prior, and sum of squared deviations. Note however that in reality, the total variance of the mean depends on the unknown variance, and the sum of squared deviations that goes into the variance prior (appears to) depend on the unknown mean. In practice, the latter dependence is relatively unimportant: Shifting the actual mean shifts the generated points by an equal amount, and on average the squared deviations will remain the same. This is not the case, however, with the total variance of the mean: As the unknown variance increases, the total variance of the mean will increase proportionately, and we would like to capture this dependence. # This suggests that we create a ''conditional prior'' of the mean on the unknown variance, with a hyperparameter specifying the mean of the pseudo-observations associated with the prior, and another parameter specifying the number of pseudo-observations. This number serves as a scaling parameter on the variance, making it possible to control the overall variance of the mean relative to the actual variance parameter. The prior for the variance also has two hyperparameters, one specifying the sum of squared deviations of the pseudo-observations associated with the prior, and another specifying once again the number of pseudo-observations. Note that each of the priors has a hyperparameter specifying the number of pseudo-observations, and in each case this controls the relative variance of that prior. These are given as two separate hyperparameters so that the variance (aka the confidence) of the two priors can be controlled separately. # This leads immediately to the normal-inverse-gamma distribution, which is the product of the two distributions just defined, with conjugate priors used (an inverse gamma distribution over the variance, and a normal distribution over the mean, ''conditional'' on the variance) and with the same four parameters just defined. The priors are normally defined as follows: :\begin p(\mu\mid\sigma^2; \mu_0, n_0) &\sim \mathcal(\mu_0,\sigma^2/n_0) \\ p(\sigma^2; \nu_0,\sigma_0^2) &\sim I\chi^2(\nu_0,\sigma_0^2) = IG(\nu_0/2, \nu_0\sigma_0^2/2) \end The update equations can be derived, and look as follows: :\begin \bar &= \frac 1 n \sum_^n x_i \\ \mu_0' &= \frac \\ n_0' &= n_0 + n \\ \nu_0' &= \nu_0 + n \\ \nu_0'' &= \nu_0 \sigma_0^2 + \sum_^n (x_i-\bar)^2 + \frac(\mu_0 - \bar)^2 \end The respective numbers of pseudo-observations add the number of actual observations to them. The new mean hyperparameter is once again a weighted average, this time weighted by the relative numbers of observations. Finally, the update for \nu_0'' is similar to the case with known mean, but in this case the sum of squared deviations is taken with respect to the observed data mean rather than the true mean, and as a result a new "interaction term" needs to be added to take care of the additional error source stemming from the deviation between prior and data mean.


Occurrence and applications

The occurrence of normal distribution in practical problems can be loosely classified into four categories: # Exactly normal distributions; # Approximately normal laws, for example when such approximation is justified by the
central limit theorem In probability theory, the central limit theorem (CLT) establishes that, in many situations, when independent random variables are summed up, their properly normalized sum tends toward a normal distribution even if the original variables themselv ...
; and # Distributions modeled as normal – the normal distribution being the distribution with Principle of maximum entropy, maximum entropy for a given mean and variance. # Regression problems – the normal distribution being found after systematic effects have been modeled sufficiently well.


Exact normality

Certain quantities in physics are distributed normally, as was first demonstrated by James Clerk Maxwell. Examples of such quantities are: * Probability density function of a ground state in a quantum harmonic oscillator. * The position of a particle that experiences diffusion. If initially the particle is located at a specific point (that is its probability distribution is the Dirac delta function), then after time ''t'' its location is described by a normal distribution with variance ''t'', which satisfies the diffusion equation \frac f(x,t) = \frac \frac f(x,t). If the initial location is given by a certain density function g(x), then the density at time ''t'' is the convolution of ''g'' and the normal PDF.


Approximate normality

''Approximately'' normal distributions occur in many situations, as explained by the
central limit theorem In probability theory, the central limit theorem (CLT) establishes that, in many situations, when independent random variables are summed up, their properly normalized sum tends toward a normal distribution even if the original variables themselv ...
. When the outcome is produced by many small effects acting ''additively and independently'', its distribution will be close to normal. The normal approximation will not be valid if the effects act multiplicatively (instead of additively), or if there is a single external influence that has a considerably larger magnitude than the rest of the effects. * In counting problems, where the central limit theorem includes a discrete-to-continuum approximation and where Infinite divisibility, infinitely divisible and Indecomposable distribution, decomposable distributions are involved, such as ** binomial distribution, Binomial random variables, associated with binary response variables; ** Poisson distribution, Poisson random variables, associated with rare events; * Thermal radiation has a Bose–Einstein statistics, Bose–Einstein distribution on very short time scales, and a normal distribution on longer timescales due to the central limit theorem.


Assumed normality

There are statistical methods to empirically test that assumption; see the above #Normality tests, Normality tests section. * In biology, the ''logarithm'' of various variables tend to have a normal distribution, that is, they tend to have a
log-normal distribution In probability theory, a log-normal (or lognormal) distribution is a continuous probability distribution of a random variable whose logarithm is normally distributed. Thus, if the random variable is log-normally distributed, then has a normal ...
(after separation on male/female subpopulations), with examples including: ** Measures of size of living tissue (length, height, skin area, weight); ** The ''length'' of ''inert'' appendages (hair, claws, nails, teeth) of biological specimens, ''in the direction of growth''; presumably the thickness of tree bark also falls under this category; ** Certain physiological measurements, such as blood pressure of adult humans. * In finance, in particular the Black–Scholes model, changes in the ''logarithm'' of exchange rates, price indices, and stock market indices are assumed normal (these variables behave like compound interest, not like simple interest, and so are multiplicative). Some mathematicians such as Benoit Mandelbrot have argued that Levy skew alpha-stable distribution, log-Levy distributions, which possesses heavy tails would be a more appropriate model, in particular for the analysis for stock market crashes. The use of the assumption of normal distribution occurring in financial models has also been criticized by Nassim Nicholas Taleb in his works. * Propagation of uncertainty, Measurement errors in physical experiments are often modeled by a normal distribution. This use of a normal distribution does not imply that one is assuming the measurement errors are normally distributed, rather using the normal distribution produces the most conservative predictions possible given only knowledge about the mean and variance of the errors. * In Standardized testing (statistics), standardized testing, results can be made to have a normal distribution by either selecting the number and difficulty of questions (as in the Intelligence quotient, IQ test) or transforming the raw test scores into "output" scores by fitting them to the normal distribution. For example, the SAT's traditional range of 200–800 is based on a normal distribution with a mean of 500 and a standard deviation of 100. * Many scores are derived from the normal distribution, including percentile ranks ("percentiles" or "quantiles"), normal curve equivalents, stanines, Standard score, z-scores, and T-scores. Additionally, some behavioral statistical procedures assume that scores are normally distributed; for example, Student's t-test, t-tests and Analysis of variance, ANOVAs. Bell curve grading assigns relative grades based on a normal distribution of scores. * In hydrology the distribution of long duration river discharge or rainfall, e.g. monthly and yearly totals, is often thought to be practically normal according to the
central limit theorem In probability theory, the central limit theorem (CLT) establishes that, in many situations, when independent random variables are summed up, their properly normalized sum tends toward a normal distribution even if the original variables themselv ...
. The blue picture, made with CumFreq, illustrates an example of fitting the normal distribution to ranked October rainfalls showing the 90% confidence belt based on the
binomial distribution In probability theory and statistics, the binomial distribution with parameters ''n'' and ''p'' is the discrete probability distribution of the number of successes in a sequence of ''n'' independent experiments, each asking a yes–no quest ...
. The rainfall data are represented by plotting positions as part of the cumulative frequency analysis.


Methodological problems and peer review

John Ioannidis argues that using normally distributed standard deviations as standards for validating research findings leave falsifiability, falsifiable predictions about phenomena that are not normally distributed untested. This includes, for example, phenomena that only appear when all necessary conditions are present and one cannot be a substitute for another in an addition-like way and phenomena that are not randomly distributed. Ioannidis argues that standard deviation-centered validation gives a false appearance of validity to hypotheses and theories where some but not all falsifiable predictions are normally distributed since the portion of falsifiable predictions that there is evidence against may and in some cases are in the non-normally distributed parts of the range of falsifiable predictions, as well as baselessly dismissing hypotheses for which none of the falsifiable predictions are normally distributed as if were they unfalsifiable when in fact they do make falsifiable predictions. It is argued by Ioannidis that many cases of mutually exclusive theories being accepted as "validated" by research journals are caused by failure of the journals to take in empirical falsifications of non-normally distributed predictions, and not because mutually exclusive theories are true, which they cannot be, although two mutually exclusive theories can both be wrong and a third one correct.


Computational methods


Generating values from normal distribution

In computer simulations, especially in applications of the Monte-Carlo method, it is often desirable to generate values that are normally distributed. The algorithms listed below all generate the standard normal deviates, since a can be generated as , where ''Z'' is standard normal. All these algorithms rely on the availability of a random number generator ''U'' capable of producing Uniform distribution (continuous), uniform random variates. * The most straightforward method is based on the probability integral transform property: if ''U'' is distributed uniformly on (0,1), then Φ−1(''U'') will have the standard normal distribution. The drawback of this method is that it relies on calculation of the
probit function In probability theory and statistics, the probit function is the quantile function associated with the standard normal distribution. It has applications in data analysis and machine learning, in particular exploratory statistical graphics and ...
Φ−1, which cannot be done analytically. Some approximate methods are described in and in the error function, erf article. Wichura gives a fast algorithm for computing this function to 16 decimal places, which is used by R programming language, R to compute random variates of the normal distribution. * Irwin–Hall distribution#Approximating a Normal distribution, An easy-to-program approximate approach that relies on the
central limit theorem In probability theory, the central limit theorem (CLT) establishes that, in many situations, when independent random variables are summed up, their properly normalized sum tends toward a normal distribution even if the original variables themselv ...
is as follows: generate 12 uniform ''U''(0,1) deviates, add them all up, and subtract 6 – the resulting random variable will have approximately standard normal distribution. In truth, the distribution will be Irwin–Hall distribution, Irwin–Hall, which is a 12-section eleventh-order polynomial approximation to the normal distribution. This random deviate will have a limited range of (−6, 6). Note that in a true normal distribution, only 0.00034% of all samples will fall outside ±6σ. * The Box–Muller transform, Box–Muller method uses two independent random numbers ''U'' and ''V'' distributed uniform distribution (continuous), uniformly on (0,1). Then the two random variables ''X'' and ''Y'' X = \sqrt \, \cos(2 \pi V) , \qquad Y = \sqrt \, \sin(2 \pi V) . will both have the standard normal distribution, and will be
independent Independent or Independents may refer to: Arts, entertainment, and media Artist groups * Independents (artist group), a group of modernist painters based in the New Hope, Pennsylvania, area of the United States during the early 1930s * Independ ...
. This formulation arises because for a bivariate normal random vector (''X'', ''Y'') the squared norm will have the
chi-squared distribution In probability theory and statistics, the chi-squared distribution (also chi-square or \chi^2-distribution) with k degrees of freedom is the distribution of a sum of the squares of k independent standard normal random variables. The chi-squa ...
with two degrees of freedom, which is an easily generated exponential distribution, exponential random variable corresponding to the quantity −2ln(''U'') in these equations; and the angle is distributed uniformly around the circle, chosen by the random variable ''V''. * The Marsaglia polar method is a modification of the Box–Muller method which does not require computation of the sine and cosine functions. In this method, ''U'' and ''V'' are drawn from the uniform (−1,1) distribution, and then is computed. If ''S'' is greater or equal to 1, then the method starts over, otherwise the two quantities X = U\sqrt, \qquad Y = V\sqrt are returned. Again, ''X'' and ''Y'' are independent, standard normal random variables. * The Ratio method is a rejection method. The algorithm proceeds as follows: ** Generate two independent uniform deviates ''U'' and ''V''; ** Compute ''X'' = (''V'' − 0.5)/''U''; ** Optional: if ''X''2 ≤ 5 − 4''e''1/4''U'' then accept ''X'' and terminate algorithm; ** Optional: if ''X''2 ≥ 4''e''−1.35/''U'' + 1.4 then reject ''X'' and start over from step 1; ** If ''X''2 ≤ −4 ln''U'' then accept ''X'', otherwise start over the algorithm. *:The two optional steps allow the evaluation of the logarithm in the last step to be avoided in most cases. These steps can be greatly improved so that the logarithm is rarely evaluated. * The ziggurat algorithm is faster than the Box–Muller transform and still exact. In about 97% of all cases it uses only two random numbers, one random integer and one random uniform, one multiplication and an if-test. Only in 3% of the cases, where the combination of those two falls outside the "core of the ziggurat" (a kind of rejection sampling using logarithms), do exponentials and more uniform random numbers have to be employed. * Integer arithmetic can be used to sample from the standard normal distribution. This method is exact in the sense that it satisfies the conditions of ''ideal approximation''; i.e., it is equivalent to sampling a real number from the standard normal distribution and rounding this to the nearest representable floating point number. * There is also some investigation into the connection between the fast Hadamard transform and the normal distribution, since the transform employs just addition and subtraction and by the central limit theorem random numbers from almost any distribution will be transformed into the normal distribution. In this regard a series of Hadamard transforms can be combined with random permutations to turn arbitrary data sets into a normally distributed data.


Numerical approximations for the normal CDF and normal quantile function

The standard normal cumulative distribution function, CDF is widely used in scientific and statistical computing. The values Φ(''x'') may be approximated very accurately by a variety of methods, such as numerical integration, Taylor series, asymptotic series and Gauss's continued fraction#Of Kummer's confluent hypergeometric function, continued fractions. Different approximations are used depending on the desired level of accuracy. * give the approximation for Φ(''x'') for ''x > 0'' with the absolute error (algorith
26.2.17
: \Phi(x) = 1 - \varphi(x)\left(b_1 t + b_2 t^2 + b_3t^3 + b_4 t^4 + b_5 t^5\right) + \varepsilon(x), \qquad t = \frac, where ''ϕ''(''x'') is the standard normal PDF, and ''b''0 = 0.2316419, ''b''1 = 0.319381530, ''b''2 = −0.356563782, ''b''3 = 1.781477937, ''b''4 = −1.821255978, ''b''5 = 1.330274429. * lists some dozens of approximations – by means of rational functions, with or without exponentials – for the function. His algorithms vary in the degree of complexity and the resulting precision, with maximum absolute precision of 24 digits. An algorithm by combines Hart's algorithm 5666 with a continued fraction approximation in the tail to provide a fast computation algorithm with a 16-digit precision. * after recalling Hart68 solution is not suited for erf, gives a solution for both erf and erfc, with maximal relative error bound, via rational function, Rational Chebyshev Approximation. * suggested a simple algorithm based on the Taylor series expansion \Phi(x) = \frac12 + \varphi(x)\left( x + \frac 3 + \frac + \frac + \frac + \cdots \right) for calculating with arbitrary precision. The drawback of this algorithm is comparatively slow calculation time (for example it takes over 300 iterations to calculate the function with 16 digits of precision when ). * The GNU Scientific Library calculates values of the standard normal CDF using Hart's algorithms and approximations with Chebyshev polynomials. Shore (1982) introduced simple approximations that may be incorporated in stochastic optimization models of engineering and operations research, like reliability engineering and inventory analysis. Denoting , the simplest approximation for the quantile function is: z = \Phi^(p)=5.5556\left[1- \left( \frac p \right)^\right],\qquad p\ge 1/2 This approximation delivers for ''z'' a maximum absolute error of 0.026 (for , corresponding to ). For replace ''p'' by and change sign. Another approximation, somewhat less accurate, is the single-parameter approximation: z=-0.4115\left\, \qquad p\ge 1/2 The latter had served to derive a simple approximation for the loss integral of the normal distribution, defined by \begin L(z) & =\int_z^\infty (u-z)\varphi(u) \, du=\int_z^\infty [1-\Phi (u)] \, du \\[5pt] L(z) & \approx \begin 0.4115\left(\dfrac p \right) - z, & p<1/2, \\ \\ 0.4115\left( \dfrac p \right), & p\ge 1/2. \end \\[5pt] \text \\ L(z) & \approx \begin 0.4115\left\, & p < 1/2, \\ \\ 0.4115 \dfrac p, & p\ge 1/2. \end \end This approximation is particularly accurate for the right far-tail (maximum error of 10−3 for z≥1.4). Highly accurate approximations for the CDF, based on Response modeling methodology, Response Modeling Methodology (RMM, Shore, 2011, 2012), are shown in Shore (2005). Some more approximations can be found at: Error function#Approximation with elementary functions. In particular, small ''relative'' error on the whole domain for the CDF \Phi and the quantile function \Phi^ as well, is achieved via an explicitly invertible formula by Sergei Winitzki in 2008.


History


Development

Some authors attribute the credit for the discovery of the normal distribution to Abraham de Moivre, de Moivre, who in 1738 published in the second edition of his "''The Doctrine of Chances''" the study of the coefficients in the binomial expansion of . De Moivre proved that the middle term in this expansion has the approximate magnitude of 2^n/\sqrt, and that "If ''m'' or ''n'' be a Quantity infinitely great, then the Logarithm of the Ratio, which a Term distant from the middle by the Interval ''ℓ'', has to the middle Term, is -\frac." Although this theorem can be interpreted as the first obscure expression for the normal probability law, Stephen Stigler, Stigler points out that de Moivre himself did not interpret his results as anything more than the approximate rule for the binomial coefficients, and in particular de Moivre lacked the concept of the probability density function. In 1823 Carl Friedrich Gauss, Gauss published his monograph "''Theoria combinationis observationum erroribus minimis obnoxiae''" where among other things he introduces several important statistical concepts, such as the method of least squares, the method of maximum likelihood, and the ''normal distribution''. Gauss used ''M'', , to denote the measurements of some unknown quantity ''V'', and sought the "most probable" estimator of that quantity: the one that maximizes the probability of obtaining the observed experimental results. In his notation φΔ is the probability density function of the measurement errors of magnitude Δ. Not knowing what the function ''φ'' is, Gauss requires that his method should reduce to the well-known answer: the arithmetic mean of the measured values. Starting from these principles, Gauss demonstrates that the only law that rationalizes the choice of arithmetic mean as an estimator of the location parameter, is the normal law of errors: \varphi\mathit = \frac h \, e^, where ''h'' is "the measure of the precision of the observations". Using this normal law as a generic model for errors in the experiments, Gauss formulates what is now known as the non-linear least squares, non-linear weighted least squares method. Although Gauss was the first to suggest the normal distribution law, Pierre Simon de Laplace, Laplace made significant contributions. It was Laplace who first posed the problem of aggregating several observations in 1774, although his own solution led to the Laplacian distribution. It was Laplace who first calculated the value of the Gaussian integral, integral in 1782, providing the normalization constant for the normal distribution. Finally, it was Laplace who in 1810 proved and presented to the Academy the fundamental
central limit theorem In probability theory, the central limit theorem (CLT) establishes that, in many situations, when independent random variables are summed up, their properly normalized sum tends toward a normal distribution even if the original variables themselv ...
, which emphasized the theoretical importance of the normal distribution. It is of interest to note that in 1809 an Irish-American mathematician Robert Adrain published two insightful but flawed derivations of the normal probability law, simultaneously and independently from Gauss. His works remained largely unnoticed by the scientific community, until in 1871 they were exhumed by Cleveland Abbe, Abbe. In the middle of the 19th century James Clerk Maxwell, Maxwell demonstrated that the normal distribution is not just a convenient mathematical tool, but may also occur in natural phenomena: "The number of particles whose velocity, resolved in a certain direction, lies between ''x'' and ''x'' + ''dx'' is \operatorname \frac\; e^ \, dx


Naming

Today, the concept is usually known in English as the normal distribution or Gaussian distribution. Other less common names include Gauss distribution, Laplace-Gauss distribution, the law of error, the law of facility of errors, Laplace's second law, Gaussian law. Gauss himself apparently coined the term with reference to the "normal equations" involved in its applications, with normal having its technical meaning of orthogonal rather than "usual". However, by the end of the 19th century some authors had started using the name ''normal distribution'', where the word "normal" was used as an adjective – the term now being seen as a reflection of the fact that this distribution was seen as typical, common – and thus "normal". Charles Sanders Peirce, Peirce (one of those authors) once defined "normal" thus: "...the 'normal' is not the average (or any other kind of mean) of what actually occurs, but of what ''would'', in the long run, occur under certain circumstances." Around the turn of the 20th century Karl Pearson, Pearson popularized the term ''normal'' as a designation for this distribution. Also, it was Pearson who first wrote the distribution in terms of the standard deviation ''σ'' as in modern notation. Soon after this, in year 1915, Ronald Fisher, Fisher added the location parameter to the formula for normal distribution, expressing it in the way it is written nowadays: df = \frac e^ \, dx. The term "standard normal", which denotes the normal distribution with zero mean and unit variance came into general use around the 1950s, appearing in the popular textbooks by P. G. Hoel (1947) "''Introduction to mathematical statistics''" and A. M. Mood (1950) "''Introduction to the theory of statistics''".


See also

* Bates distribution – similar to the Irwin–Hall distribution, but rescaled back into the 0 to 1 range * Behrens–Fisher problem – the long-standing problem of testing whether two normal samples with different variances have same means; * Bhattacharyya distance – method used to separate mixtures of normal distributions * Erdős–Kac theorem – on the occurrence of the normal distribution in number theory * Full width at half maximum * Gaussian blur – convolution, which uses the normal distribution as a kernel * Modified half-normal distribution with the pdf on (0, \infty) is given as f(x)= \frac, where \Psi(\alpha,z)=_1\Psi_1\left(\begin\left(\alpha,\frac\right)\\(1,0)\end;z \right) denotes the Fox-Wright Psi function. * Normally distributed and uncorrelated does not imply independent * Ratio normal distribution * Reciprocal normal distribution * Standard normal table * Stein's lemma * Sub-Gaussian distribution * Sum of normally distributed random variables * Tweedie distribution – The normal distribution is a member of the family of Tweedie exponential dispersion models. * Wrapped normal distribution – the Normal distribution applied to a circular domain * Z-test – using the normal distribution


Notes


References


Citations


Sources

* * In particular, the entries fo
"bell-shaped and bell curve"
an

* * * * * * * * * * * * * * * * * * * * * * * * Translated by Stephen M. Stigler in ''Statistical Science'' 1 (3), 1986: . * * * * * * * * * * * * * * * * * * * * * * * * * * * *


External links

*
Normal distribution calculator
{{Authority control Normal distribution, Continuous distributions Conjugate prior distributions Exponential family distributions Stable distributions Location-scale family probability distributions]">X, ^p \right&= \sigma^p \cdot 2^ \frac _1F_1\left( -\frac, \frac, -\frac \left( \frac \mu \sigma \right)^2 \right). \end These expressions remain valid even if p is not an integer. See also Hermite polynomials#"Negative variance", generalized Hermite polynomials. The expectation of X conditioned on the event that X lies in an interval ,b/math> is given by :\operatorname\left \mid a= \mu - \sigma^2\frac where f and F respectively are the density and the cumulative distribution function of X. For b=\infty this is known as the
inverse Mills ratio In probability theory, the Mills ratio (or Mills's ratio) of a continuous random variable X is the function : m(x) := \frac , where f(x) is the probability density function, and :\bar(x) := \Pr x.html" ;"title=">x">>x= \int_x^ f(u)\, du is the ...
. Note that above, density f of X is used instead of standard normal density as in inverse Mills ratio, so here we have \sigma^2 instead of \sigma.


Fourier transform and characteristic function

The
Fourier transform A Fourier transform (FT) is a mathematical transform that decomposes functions into frequency components, which are represented by the output of the transform as a function of frequency. Most commonly functions of time or space are transformed, ...
of a normal density f with mean \mu and standard deviation \sigma is : \hat f(t) = \int_^\infty f(x)e^ \, dx = e^ e^ where i is the
imaginary unit The imaginary unit or unit imaginary number () is a solution to the quadratic equation x^2+1=0. Although there is no real number with this property, can be used to extend the real numbers to what are called complex numbers, using addition an ...
. If the mean \mu=0, the first factor is 1, and the Fourier transform is, apart from a constant factor, a normal density on the
frequency domain In physics, electronics, control systems engineering, and statistics, the frequency domain refers to the analysis of mathematical functions or signals with respect to frequency, rather than time. Put simply, a time-domain graph shows how a signa ...
, with mean 0 and standard deviation 1/\sigma. In particular, the standard normal distribution \varphi is an
eigenfunction In mathematics, an eigenfunction of a linear operator ''D'' defined on some function space is any non-zero function f in that space that, when acted upon by ''D'', is only multiplied by some scaling factor called an eigenvalue. As an equation, th ...
of the Fourier transform. In probability theory, the Fourier transform of the probability distribution of a real-valued random variable X is closely connected to the
characteristic function In mathematics, the term "characteristic function" can refer to any of several distinct concepts: * The indicator function of a subset, that is the function ::\mathbf_A\colon X \to \, :which for a given subset ''A'' of ''X'', has value 1 at points ...
\varphi_X(t) of that variable, which is defined as the
expected value In probability theory, the expected value (also called expectation, expectancy, mathematical expectation, mean, average, or first moment) is a generalization of the weighted average. Informally, the expected value is the arithmetic mean of a l ...
of e^, as a function of the real variable t (the
frequency Frequency is the number of occurrences of a repeating event per unit of time. It is also occasionally referred to as ''temporal frequency'' for clarity, and is distinct from ''angular frequency''. Frequency is measured in hertz (Hz) which is eq ...
parameter of the Fourier transform). This definition can be analytically extended to a complex-value variable t. The relation between both is: :\varphi_X(t) = \hat f(-t)


Moment and cumulant generating functions

The
moment generating function In probability theory and statistics, the moment-generating function of a real-valued random variable is an alternative specification of its probability distribution. Thus, it provides the basis of an alternative route to analytical results compare ...
of a real random variable X is the expected value of e^, as a function of the real parameter t. For a normal distribution with density f, mean \mu and deviation \sigma, the moment generating function exists and is equal to :M(t) = \operatorname ^= \hat f(it) = e^ e^ The
cumulant generating function In probability theory and statistics, the cumulants of a probability distribution are a set of quantities that provide an alternative to the '' moments'' of the distribution. Any two probability distributions whose moments are identical will have ...
is the logarithm of the moment generating function, namely :g(t) = \ln M(t) = \mu t + \tfrac 12 \sigma^2 t^2 Since this is a quadratic polynomial in t, only the first two
cumulant In probability theory and statistics, the cumulants of a probability distribution are a set of quantities that provide an alternative to the '' moments'' of the distribution. Any two probability distributions whose moments are identical will ha ...
s are nonzero, namely the mean \mu and the variance \sigma^2.


Stein operator and class

Within
Stein's method Stein's method is a general method in probability theory to obtain bounds on the distance between two probability distributions with respect to a probability metric. It was introduced by Charles Stein, who first published it in 1972, to obtain ...
the Stein operator and class of a random variable X \sim \mathcal(\mu, \sigma^2) are \mathcalf(x) = \sigma^2 f'(x) - (x-\mu)f(x) and \mathcal the class of all absolutely continuous functions f : \R \to \R \mbox\mathbb limit (mathematics), limit when \sigma tends to zero, the probability density f(x) eventually tends to zero at any x\ne \mu, but grows without limit if x = \mu, while its integral remains equal to 1. Therefore, the normal distribution cannot be defined as an ordinary
function Function or functionality may refer to: Computing * Function key, a type of key on computer keyboards * Function model, a structured representation of processes in a system * Function object or functor or functionoid, a concept of object-oriente ...
when \sigma = 0. However, one can define the normal distribution with zero variance as a
generalized function In mathematics, generalized functions are objects extending the notion of functions. There is more than one recognized theory, for example the theory of distributions. Generalized functions are especially useful in making discontinuous functions ...
; specifically, as Dirac's "delta function" \delta translated by the mean \mu, that is f(x)=\delta(x-\mu). Its CDF is then the
Heaviside step function The Heaviside step function, or the unit step function, usually denoted by or (but sometimes , or ), is a step function, named after Oliver Heaviside (1850–1925), the value of which is zero for negative arguments and one for positive argume ...
translated by the mean \mu, namely :F(x) = \begin 0 & \textx < \mu \\ 1 & \textx \geq \mu \end


Maximum entropy

Of all probability distributions over the reals with a specified mean \mu and variance \sigma^2, the normal distribution N(\mu,\sigma^2) is the one with maximum entropy. If X is a
continuous random variable In probability theory and statistics, a probability distribution is the mathematical function that gives the probabilities of occurrence of different possible outcomes for an experiment. It is a mathematical description of a random phenomenon i ...
with
probability density In probability theory, a probability density function (PDF), or density of a continuous random variable, is a function whose value at any given sample (or point) in the sample space (the set of possible values taken by the random variable) can ...
f(x), then the entropy of X is defined as : H(X) = - \int_^\infty f(x)\log f(x)\, dx where f(x)\log f(x) is understood to be zero whenever f(x)=0. This functional can be maximized, subject to the constraints that the distribution is properly normalized and has a specified variance, by using
variational calculus The calculus of variations (or Variational Calculus) is a field of mathematical analysis that uses variations, which are small changes in functions and functionals, to find maxima and minima of functionals: mappings from a set of functions t ...
. A function with two
Lagrange multipliers In mathematical optimization, the method of Lagrange multipliers is a strategy for finding the local maxima and minima of a function subject to equality constraints (i.e., subject to the condition that one or more equations have to be satisfied ex ...
is defined: : L=\int_^\infty f(x)\ln(f(x))\,dx-\lambda_0\left(1-\int_^\infty f(x)\,dx\right)-\lambda\left(\sigma^2-\int_^\infty f(x)(x-\mu)^2\,dx\right) where f(x) is, for now, regarded as some density function with mean \mu and standard deviation \sigma. At maximum entropy, a small variation \delta f(x) about f(x) will produce a variation \delta L about L which is equal to 0: : 0=\delta L=\int_^\infty \delta f(x)\left (\ln(f(x))+1+\lambda_0+\lambda(x-\mu)^2\right )\,dx Since this must hold for any small \delta f(x), the term in brackets must be zero, and solving for f(x) yields: :f(x)=e^ Using the constraint equations to solve for \lambda_0 and \lambda yields the density of the normal distribution: : f(x, \mu, \sigma)=\frace^ The entropy of a normal distribution is equal to : H(X)=\tfrac(1+\log(2\sigma^2\pi))


Other properties


Related distributions


Central limit theorem

The central limit theorem states that under certain (fairly common) conditions, the sum of many random variables will have an approximately normal distribution. More specifically, where X_1,\ldots ,X_n are
independent and identically distributed In probability theory and statistics, a collection of random variables is independent and identically distributed if each random variable has the same probability distribution as the others and all are mutually independent. This property is usua ...
random variables with the same arbitrary distribution, zero mean, and variance \sigma^2 and Z is their mean scaled by \sqrt : Z = \sqrt\left(\frac\sum_^n X_i\right) Then, as n increases, the probability distribution of Z will tend to the normal distribution with zero mean and variance \sigma^2. The theorem can be extended to variables (X_i) that are not independent and/or not identically distributed if certain constraints are placed on the degree of dependence and the moments of the distributions. Many
test statistic A test statistic is a statistic (a quantity derived from the sample) used in statistical hypothesis testing.Berger, R. L.; Casella, G. (2001). ''Statistical Inference'', Duxbury Press, Second Edition (p.374) A hypothesis test is typically specif ...
s, scores, and
estimator In statistics, an estimator is a rule for calculating an estimate of a given quantity based on observed data: thus the rule (the estimator), the quantity of interest (the estimand) and its result (the estimate) are distinguished. For example, the ...
s encountered in practice contain sums of certain random variables in 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 distributions. The central limit theorem also implies that certain distributions can be approximated by the normal distribution, for example: * The
binomial distribution In probability theory and statistics, the binomial distribution with parameters ''n'' and ''p'' is the discrete probability distribution of the number of successes in a sequence of ''n'' independent experiments, each asking a yes–no quest ...
B(n,p) is approximately normal with mean np and variance np(1-p) for large n and for p not too close to 0 or 1. * The
Poisson distribution In probability theory and statistics, the Poisson distribution is a discrete probability distribution that expresses the probability of a given number of events occurring in a fixed interval of time or space if these events occur with a known co ...
with parameter \lambda is approximately normal with mean \lambda and variance \lambda, for large values of \lambda. * The
chi-squared distribution In probability theory and statistics, the chi-squared distribution (also chi-square or \chi^2-distribution) with k degrees of freedom is the distribution of a sum of the squares of k independent standard normal random variables. The chi-squa ...
\chi^2(k) is approximately normal with mean k and variance 2k, for large k. * The
Student's t-distribution In probability and statistics, Student's ''t''-distribution (or simply the ''t''-distribution) is any member of a family of continuous probability distributions that arise when estimating the mean of a normally distributed population in sit ...
t(\nu) is approximately normal with mean 0 and variance 1 when \nu is large. Whether these approximations are sufficiently accurate depends on the purpose for which they are needed, and the rate of convergence to the normal distribution. It is typically the case that such approximations are less accurate in the tails of the distribution. A general upper bound for the approximation error in the central limit theorem is given by the
Berry–Esseen theorem In probability theory, the central limit theorem states that, under certain circumstances, the probability distribution of the scaled mean of a random sample converges to a normal distribution as the sample size increases to infinity. Under strong ...
, improvements of the approximation are given by the
Edgeworth expansion The Gram–Charlier A series (named in honor of Jørgen Pedersen Gram and Carl Charlier), and the Edgeworth series (named in honor of Francis Ysidro Edgeworth) are series that approximate a probability distribution in terms of its cumulants. The se ...
s. This theorem can also be used to justify modeling the sum of many uniform noise sources as
Gaussian noise Gaussian noise, named after Carl Friedrich Gauss, is a term from signal processing theory denoting a kind of signal noise that has a probability density function (pdf) equal to that of the normal distribution (which is also known as the Gaussia ...
. See
AWGN Additive white Gaussian noise (AWGN) is a basic noise model used in information theory to mimic the effect of many random processes that occur in nature. The modifiers denote specific characteristics: * ''Additive'' because it is added to any nois ...
.


Operations and functions of normal variables

The
probability density In probability theory, a probability density function (PDF), or density of a continuous random variable, is a function whose value at any given sample (or point) in the sample space (the set of possible values taken by the random variable) can ...
,
cumulative distribution In statistics, the frequency (or absolute frequency) of an event i is the number n_i of times the observation has occurred/recorded in an experiment or study. These frequencies are often depicted graphically or in tabular form. Types The cumul ...
, and inverse cumulative distribution of any function of one or more independent or correlated normal variables can be computed with the numerical method of ray-tracing
Matlab code
. In the following sections we look at some special cases.


Operations on a single normal variable

If X is distributed normally with mean \mu and variance \sigma^2, then * aX+b, for any real numbers a and b, is also normally distributed, with mean a\mu+b and standard deviation , a, \sigma. That is, the family of normal distributions is closed under linear transformations. * The exponential of X is distributed log-normally: . * The absolute value of X has
folded normal distribution The folded normal distribution is a probability distribution related to the normal distribution. Given a normally distributed random variable ''X'' with mean ''μ'' and variance ''σ''2, the random variable ''Y'' = , ''X'', has a folded normal d ...
: . If \mu = 0 this is known as the
half-normal distribution In probability theory and statistics, the half-normal distribution is a special case of the folded normal distribution. Let X follow an ordinary normal distribution, N(0,\sigma^2). Then, Y=, X, follows a half-normal distribution. Thus, the hal ...
. * The absolute value of normalized residuals, , ''X'' − ''μ'', /''σ'', has
chi distribution In probability theory and statistics, the chi distribution is a continuous probability distribution. It is the distribution of the positive square root of the sum of squares of a set of independent random variables each following a standard norm ...
with one degree of freedom: , X - \mu, / \sigma \sim \chi_1. * The square of ''X''/''σ'' has the
noncentral chi-squared distribution In probability theory and statistics, the noncentral chi-squared distribution (or noncentral chi-square distribution, noncentral \chi^2 distribution) is a noncentral generalization of the chi-squared distribution. It often arises in the power a ...
with one degree of freedom: X^2 / \sigma^2 \sim \chi_1^2(\mu^2 / \sigma^2). If \mu = 0, the distribution is called simply chi-squared. * The log likelihood of a normal variable x is simply the log of its
probability density function In probability theory, a probability density function (PDF), or density of a continuous random variable, is a function whose value at any given sample (or point) in the sample space (the set of possible values taken by the random variable) can ...
: \ln p(x)= -\frac \left(\frac \right)^2 -\ln \left(\sigma \sqrt \right) = -\frac z^2 -\ln \left(\sigma \sqrt \right). Since this is a scaled and shifted square of a standard normal variable, it is distributed as a scaled and shifted chi-squared variable. * The distribution of the variable ''X'' restricted to an interval 'a'', ''b''is called the
truncated normal distribution In probability and statistics, the truncated normal distribution is the probability distribution derived from that of a normally distributed random variable by bounding the random variable from either below or above (or both). The truncated no ...
. * (''X'' − ''μ'')−2 has a
Lévy distribution In probability theory and statistics, the Lévy distribution, named after Paul Lévy, is a continuous probability distribution for a non-negative random variable. In spectroscopy, this distribution, with frequency as the dependent variable, is kn ...
with location 0 and scale ''σ''−2.


= Operations on two independent normal variables

= * If X_1 and X_2 are two
independent Independent or Independents may refer to: Arts, entertainment, and media Artist groups * Independents (artist group), a group of modernist painters based in the New Hope, Pennsylvania, area of the United States during the early 1930s * Independ ...
normal random variables, with means \mu_1, \mu_2 and standard deviations \sigma_1, \sigma_2, then their sum X_1 + X_2 will also be normally distributed, roof/sup> with mean \mu_1 + \mu_2 and variance \sigma_1^2 + \sigma_2^2. * In particular, if X and Y are independent normal deviates with zero mean and variance \sigma^2, then X + Y and X - Y are also independent and normally distributed, with zero mean and variance 2\sigma^2. This is a special case of the
polarization identity In linear algebra, a branch of mathematics, the polarization identity is any one of a family of formulas that express the inner product of two vectors in terms of the norm of a normed vector space. If a norm arises from an inner product then t ...
. * If X_1, X_2 are two independent normal deviates with mean \mu and deviation \sigma, and a, b are arbitrary real numbers, then the variable X_3 = \frac + \mu is also normally distributed with mean \mu and deviation \sigma. It follows that the normal distribution is
stable A stable is a building in which livestock, especially horses, are kept. It most commonly means a building that is divided into separate stalls for individual animals and livestock. There are many different types of stables in use today; the ...
(with exponent \alpha=2).


= Operations on two independent standard normal variables

= If X_1 and X_2 are two independent standard normal random variables with mean 0 and variance 1, then * Their sum and difference is distributed normally with mean zero and variance two: X_1 \pm X_2 \sim N(0, 2). * Their product Z = X_1 X_2 follows the
product distribution A product distribution is a probability distribution constructed as the distribution of the product of random variables having two other known distributions. Given two statistically independent random variables ''X'' and ''Y'', the distribution of ...
with density function f_Z(z) = \pi^ K_0(, z, ) where K_0 is the
modified Bessel function of the second kind Bessel functions, first defined by the mathematician Daniel Bernoulli and then generalized by Friedrich Bessel, are canonical solutions of Bessel's differential equation x^2 \frac + x \frac + \left(x^2 - \alpha^2 \right)y = 0 for an arbitrary ...
. This distribution is symmetric around zero, unbounded at z = 0, and has the
characteristic function In mathematics, the term "characteristic function" can refer to any of several distinct concepts: * The indicator function of a subset, that is the function ::\mathbf_A\colon X \to \, :which for a given subset ''A'' of ''X'', has value 1 at points ...
\phi_Z(t) = (1 + t^2)^. * Their ratio follows the standard
Cauchy distribution The Cauchy distribution, named after Augustin Cauchy, is a continuous probability distribution. It is also known, especially among physicists, as the Lorentz distribution (after Hendrik Lorentz), Cauchy–Lorentz distribution, Lorentz(ian) fun ...
: X_1/ X_2 \sim \operatorname(0, 1). * Their Euclidean norm \sqrt has the
Rayleigh distribution In probability theory and statistics, the Rayleigh distribution is a continuous probability distribution for nonnegative-valued random variables. Up to rescaling, it coincides with the chi distribution with two degrees of freedom. The distribut ...
.


Operations on multiple independent normal variables

* Any linear combination of independent normal deviates is a normal deviate. * If X_1, X_2, \ldots, X_n are independent standard normal random variables, then the sum of their squares has the
chi-squared distribution In probability theory and statistics, the chi-squared distribution (also chi-square or \chi^2-distribution) with k degrees of freedom is the distribution of a sum of the squares of k independent standard normal random variables. The chi-squa ...
with n degrees of freedom X_1^2 + \cdots + X_n^2 \sim \chi_n^2. * If X_1, X_2, \ldots, X_n are independent normally distributed random variables with means \mu and variances \sigma^2, then their
sample mean The sample mean (or "empirical mean") and the sample covariance are statistics computed from a Sample (statistics), sample of data on one or more random variables. The sample mean is the average value (or mean, mean value) of a sample (statistic ...
is independent from the sample
standard deviation In statistics, the standard deviation is a measure of the amount of variation or dispersion of a set of values. A low standard deviation indicates that the values tend to be close to the mean (also called the expected value) of the set, while ...
, which can be demonstrated using Basu's theorem or
Cochran's theorem In statistics, Cochran's theorem, devised by William G. Cochran, is a theorem used to justify results relating to the probability distributions of statistics that are used in the analysis of variance. Statement Let ''U''1, ..., ''U'N'' be i.i. ...
. The ratio of these two quantities will have the
Student's t-distribution In probability and statistics, Student's ''t''-distribution (or simply the ''t''-distribution) is any member of a family of continuous probability distributions that arise when estimating the mean of a normally distributed population in sit ...
with n-1 degrees of freedom: t = \frac = \frac \sim t_. * If X_1, X_2, \ldots, X_n, Y_1, Y_2, \ldots, Y_m are independent standard normal random variables, then the ratio of their normalized sums of squares will have the with degrees of freedom: F = \frac \sim F_.


Operations on multiple correlated normal variables

* A
quadratic form In mathematics, a quadratic form is a polynomial with terms all of degree two ("form" is another name for a homogeneous polynomial). For example, :4x^2 + 2xy - 3y^2 is a quadratic form in the variables and . The coefficients usually belong to a ...
of a normal vector, i.e. a quadratic function q = \sum x_i^2 + \sum x_j + c of multiple independent or correlated normal variables, is a generalized chi-square variable.


Operations on the density function

The split normal distribution is most directly defined in terms of joining scaled sections of the density functions of different normal distributions and rescaling the density to integrate to one. The
truncated normal distribution In probability and statistics, the truncated normal distribution is the probability distribution derived from that of a normally distributed random variable by bounding the random variable from either below or above (or both). The truncated no ...
results from rescaling a section of a single density function.


Infinite divisibility and Cramér's theorem

For any positive integer \text, any normal distribution with mean \mu and variance \sigma^2 is the distribution of the sum of \text independent normal deviates, each with mean \frac and variance \frac. This property is called
infinite divisibility Infinite divisibility arises in different ways in philosophy, physics, economics, order theory (a branch of mathematics), and probability theory (also a branch of mathematics). One may speak of infinite divisibility, or the lack thereof, of matter ...
. Conversely, if X_1 and X_2 are independent random variables and their sum X_1+X_2 has a normal distribution, then both X_1 and X_2 must be normal deviates. This result is known as Cramér's decomposition theorem, and is equivalent to saying that the convolution of two distributions is normal if and only if both are normal. Cramér's theorem implies that a linear combination of independent non-Gaussian variables will never have an exactly normal distribution, although it may approach it arbitrarily closely.


Bernstein's theorem

Bernstein's theorem states that if X and Y are independent and X + Y and X - Y are also independent, then both ''X'' and ''Y'' must necessarily have normal distributions. More generally, if X_1, \ldots, X_n are independent random variables, then two distinct linear combinations \sum and \sumwill be independent if and only if all X_k are normal and \sum, where \sigma_k^2 denotes the variance of X_k.


Extensions

The notion of normal distribution, being one of the most important distributions in probability theory, has been extended far beyond the standard framework of the univariate (that is one-dimensional) case (Case 1). All these extensions are also called ''normal'' or ''Gaussian'' laws, so a certain ambiguity in names exists. * The
multivariate normal distribution In probability theory and statistics, the multivariate normal distribution, multivariate Gaussian distribution, or joint normal distribution is a generalization of the one-dimensional (univariate) normal distribution to higher dimensions. One d ...
describes the Gaussian law in the ''k''-dimensional Euclidean space. A vector is multivariate-normally distributed if any linear combination of its components has a (univariate) normal distribution. The variance of ''X'' is a ''k×k'' symmetric positive-definite matrix ''V''. The multivariate normal distribution is a special case of the
elliptical distribution In probability and statistics, an elliptical distribution is any member of a broad family of probability distributions that generalize the multivariate normal distribution. Intuitively, in the simplified two and three dimensional case, the joint di ...
s. As such, its iso-density loci in the ''k'' = 2 case are ellipses and in the case of arbitrary ''k'' are ellipsoids. * Rectified Gaussian distribution a rectified version of normal distribution with all the negative elements reset to 0 * Complex normal distribution deals with the complex normal vectors. A complex vector is said to be normal if both its real and imaginary components jointly possess a 2''k''-dimensional multivariate normal distribution. The variance-covariance structure of ''X'' is described by two matrices: the ''variance'' matrix Γ, and the ''relation'' matrix ''C''. * Matrix normal distribution describes the case of normally distributed matrices. * Gaussian processes are the normally distributed stochastic processes. These can be viewed as elements of some infinite-dimensional Hilbert space ''H'', and thus are the analogues of multivariate normal vectors for the case . A random element is said to be normal if for any constant the scalar product has a (univariate) normal distribution. The variance structure of such Gaussian random element can be described in terms of the linear ''covariance ''. Several Gaussian processes became popular enough to have their own names: ** Wiener process, Brownian motion, ** Brownian bridge, ** Ornstein–Uhlenbeck process. * Gaussian q-distribution is an abstract mathematical construction that represents a "q-analogue" of the normal distribution. * the q-Gaussian is an analogue of the Gaussian distribution, in the sense that it maximises the Tsallis entropy, and is one type of Tsallis distribution. Note that this distribution is different from the Gaussian q-distribution above. * The Kaniadakis Gaussian distribution, Kaniadakis ''κ''-Gaussian distribution is a generalization of the Gaussian distribution which arises from the Kaniadakis statistics, being one of the Kaniadakis distribution, Kaniadakis distributions. A random variable ''X'' has a two-piece normal distribution if it has a distribution : f_X( x ) = N( \mu, \sigma_1^2 ) \text x \le \mu : f_X( x ) = N( \mu, \sigma_2^2 ) \text x \ge \mu where ''μ'' is the mean and ''σ''1 and ''σ''2 are the standard deviations of the distribution to the left and right of the mean respectively. The mean, variance and third central moment of this distribution have been determined : \operatorname( X ) = \mu + \sqrt ( \sigma_2 - \sigma_1 ) : \operatorname( X ) = \left( 1 - \frac 2 \pi\right)( \sigma_2 - \sigma_1 )^2 + \sigma_1 \sigma_2 : \operatorname( X ) = \sqrt( \sigma_2 - \sigma_1 ) \left[ \left( \frac 4 \pi - 1 \right) ( \sigma_2 - \sigma_1)^2 + \sigma_1 \sigma_2 \right] where E(''X''), V(''X'') and T(''X'') are the mean, variance, and third central moment respectively. One of the main practical uses of the Gaussian law is to model the empirical distributions of many different random variables encountered in practice. In such case a possible extension would be a richer family of distributions, having more than two parameters and therefore being able to fit the empirical distribution more accurately. The examples of such extensions are: * Pearson distribution — a four-parameter family of probability distributions that extend the normal law to include different skewness and kurtosis values. * The generalized normal distribution, also known as the exponential power distribution, allows for distribution tails with thicker or thinner asymptotic behaviors.


Statistical inference


Estimation of parameters

It is often the case that we do not know the parameters of the normal distribution, but instead want to Estimation theory, estimate them. That is, having a sample (x_1, \ldots, x_n) from a normal N(\mu, \sigma^2) population we would like to learn the approximate values of parameters \mu and \sigma^2. The standard approach to this problem is the maximum likelihood method, which requires maximization of the ''log-likelihood function'': : \ln\mathcal(\mu,\sigma^2) = \sum_^n \ln f(x_i\mid\mu,\sigma^2) = -\frac\ln(2\pi) - \frac\ln\sigma^2 - \frac\sum_^n (x_i-\mu)^2. Taking derivatives with respect to \mu and \sigma^2 and solving the resulting system of first order conditions yields the ''maximum likelihood estimates'': : \hat = \overline \equiv \frac\sum_^n x_i, \qquad \hat^2 = \frac \sum_^n (x_i - \overline)^2.


Sample mean

Estimator \textstyle\hat\mu is called the ''
sample mean The sample mean (or "empirical mean") and the sample covariance are statistics computed from a Sample (statistics), sample of data on one or more random variables. The sample mean is the average value (or mean, mean value) of a sample (statistic ...
'', since it is the arithmetic mean of all observations. The statistic \textstyle\overline is complete statistic, complete and sufficient statistic, sufficient for \mu, and therefore by the Lehmann–Scheffé theorem, \textstyle\hat\mu is the uniformly minimum variance unbiased (UMVU) estimator. In finite samples it is distributed normally: : \hat\mu \sim \mathcal(\mu,\sigma^2/n). The variance of this estimator is equal to the ''μμ''-element of the inverse Fisher information matrix \textstyle\mathcal^. This implies that the estimator is efficient estimator, finite-sample efficient. Of practical importance is the fact that the standard error (statistics), standard error of \textstyle\hat\mu is proportional to \textstyle1/\sqrt, that is, if one wishes to decrease the standard error by a factor of 10, one must increase the number of points in the sample by a factor of 100. This fact is widely used in determining sample sizes for opinion polls and the number of trials in Monte Carlo simulations. From the standpoint of the asymptotic theory (statistics), asymptotic theory, \textstyle\hat\mu is consistent estimator, consistent, that is, it convergence in probability, converges in probability to \mu as n\rightarrow\infty. The estimator is also asymptotic normality, asymptotically normal, which is a simple corollary of the fact that it is normal in finite samples: : \sqrt(\hat\mu-\mu) \,\xrightarrow\, \mathcal(0,\sigma^2).


Sample variance

The estimator \textstyle\hat\sigma^2 is called the ''sample variance'', since it is the variance of the sample ((x_1, \ldots, x_n)). In practice, another estimator is often used instead of the \textstyle\hat\sigma^2. This other estimator is denoted s^2, and is also called the ''sample variance'', which represents a certain ambiguity in terminology; its square root s is called the ''sample standard deviation''. The estimator s^2 differs from \textstyle\hat\sigma^2 by having instead of ''n'' in the denominator (the so-called Bessel's correction): : s^2 = \frac \hat\sigma^2 = \frac \sum_^n (x_i - \overline)^2. The difference between s^2 and \textstyle\hat\sigma^2 becomes negligibly small for large ''n''s. In finite samples however, the motivation behind the use of s^2 is that it is an unbiased estimator of the underlying parameter \sigma^2, whereas \textstyle\hat\sigma^2 is biased. Also, by the Lehmann–Scheffé theorem the estimator s^2 is uniformly minimum variance unbiased (Minimum-variance unbiased estimator, UMVU), which makes it the "best" estimator among all unbiased ones. However it can be shown that the biased estimator \textstyle\hat\sigma^2 is "better" than the s^2 in terms of the mean squared error (MSE) criterion. In finite samples both s^2 and \textstyle\hat\sigma^2 have scaled
chi-squared distribution In probability theory and statistics, the chi-squared distribution (also chi-square or \chi^2-distribution) with k degrees of freedom is the distribution of a sum of the squares of k independent standard normal random variables. The chi-squa ...
with degrees of freedom: : s^2 \sim \frac \cdot \chi^2_, \qquad \hat\sigma^2 \sim \frac \cdot \chi^2_. The first of these expressions shows that the variance of s^2 is equal to 2\sigma^4/(n-1), which is slightly greater than the ''σσ''-element of the inverse Fisher information matrix \textstyle\mathcal^. Thus, s^2 is not an efficient estimator for \sigma^2, and moreover, since s^2 is UMVU, we can conclude that the finite-sample efficient estimator for \sigma^2 does not exist. Applying the asymptotic theory, both estimators s^2 and \textstyle\hat\sigma^2 are consistent, that is they converge in probability to \sigma^2 as the sample size n\rightarrow\infty. The two estimators are also both asymptotically normal: : \sqrt(\hat\sigma^2 - \sigma^2) \simeq \sqrt(s^2-\sigma^2) \,\xrightarrow\, \mathcal(0,2\sigma^4). In particular, both estimators are asymptotically efficient for \sigma^2.


Confidence intervals

By
Cochran's theorem In statistics, Cochran's theorem, devised by William G. Cochran, is a theorem used to justify results relating to the probability distributions of statistics that are used in the analysis of variance. Statement Let ''U''1, ..., ''U'N'' be i.i. ...
, for normal distributions the sample mean \textstyle\hat\mu and the sample variance ''s''2 are
independent Independent or Independents may refer to: Arts, entertainment, and media Artist groups * Independents (artist group), a group of modernist painters based in the New Hope, Pennsylvania, area of the United States during the early 1930s * Independ ...
, which means there can be no gain in considering their joint distribution. There is also a converse theorem: if in a sample the sample mean and sample variance are independent, then the sample must have come from the normal distribution. The independence between \textstyle\hat\mu and ''s'' can be employed to construct the so-called ''t-statistic'': : t = \frac = \frac \sim t_ This quantity ''t'' has the
Student's t-distribution In probability and statistics, Student's ''t''-distribution (or simply the ''t''-distribution) is any member of a family of continuous probability distributions that arise when estimating the mean of a normally distributed population in sit ...
with degrees of freedom, and it is an ancillary statistic (independent of the value of the parameters). Inverting the distribution of this ''t''-statistics will allow us to construct the
confidence interval In frequentist statistics, a confidence interval (CI) is a range of estimates for an unknown parameter. A confidence interval is computed at a designated ''confidence level''; the 95% confidence level is most common, but other levels, such as 9 ...
for ''μ''; similarly, inverting the ''χ''2 distribution of the statistic ''s''2 will give us the confidence interval for ''σ''2: :\mu \in \left[ \hat\mu - t_ \fracs, \hat\mu + t_ \fracs \right], :\sigma^2 \in \left[ \frac, \frac \right], where ''tk,p'' and are the ''p''th
quantile In statistics and probability, quantiles are cut points dividing the range of a probability distribution into continuous intervals with equal probabilities, or dividing the observations in a sample in the same way. There is one fewer quantile tha ...
s of the ''t''- and ''χ''2-distributions respectively. These confidence intervals are of the ''confidence level'' , meaning that the true values ''μ'' and ''σ''2 fall outside of these intervals with probability (or significance level) ''α''. In practice people usually take , resulting in the 95% confidence intervals. Approximate formulas can be derived from the asymptotic distributions of \textstyle\hat\mu and ''s''2: :\mu \in \left[ \hat\mu - , z_, \fracs, \hat\mu + , z_, \fracs \right], :\sigma^2 \in \left[ s^2 - , z_, \fracs^2, s^2 + , z_, \fracs^2 \right], The approximate formulas become valid for large values of ''n'', and are more convenient for the manual calculation since the standard normal quantiles ''z''''α''/2 do not depend on ''n''. In particular, the most popular value of , results in .


Normality tests

Normality tests assess the likelihood that the given data set comes from a normal distribution. Typically the null hypothesis ''H''0 is that the observations are distributed normally with unspecified mean ''μ'' and variance ''σ''2, versus the alternative ''Ha'' that the distribution is arbitrary. Many tests (over 40) have been devised for this problem. The more prominent of them are outlined below: Diagnostic plots are more intuitively appealing but subjective at the same time, as they rely on informal human judgement to accept or reject the null hypothesis. *
Q–Q plot In statistics, a Q–Q plot (quantile-quantile plot) is a probability plot, a List of graphical methods, graphical method for comparing two probability distributions by plotting their ''quantiles'' against each other. A point on the plot co ...
, also known as normal probability plot or rankit plot—is a plot of the sorted values from the data set against the expected values of the corresponding quantiles from the standard normal distribution. That is, it's a plot of point of the form (Φ−1(''pk''), ''x''(''k'')), where plotting points ''pk'' are equal to ''pk'' = (''k'' − ''α'')/(''n'' + 1 − 2''α'') and ''α'' is an adjustment constant, which can be anything between 0 and 1. If the null hypothesis is true, the plotted points should approximately lie on a straight line. * P–P plot – similar to the Q–Q plot, but used much less frequently. This method consists of plotting the points (Φ(''z''(''k'')), ''pk''), where \textstyle z_ = (x_-\hat\mu)/\hat\sigma. For normally distributed data this plot should lie on a 45° line between (0, 0) and (1, 1). Goodness-of-fit tests: ''Moment-based tests'': * D'Agostino's K-squared test * Jarque–Bera test * Shapiro–Wilk test: This is based on the fact that the line in the Q–Q plot has the slope of ''σ''. The test compares the least squares estimate of that slope with the value of the sample variance, and rejects the null hypothesis if these two quantities differ significantly. ''Tests based on the empirical distribution function'': * Anderson–Darling test * Lilliefors test (an adaptation of the Kolmogorov–Smirnov test)


Bayesian analysis of the normal distribution

Bayesian analysis of normally distributed data is complicated by the many different possibilities that may be considered: * Either the mean, or the variance, or neither, may be considered a fixed quantity. * When the variance is unknown, analysis may be done directly in terms of the variance, or in terms of the
precision Precision, precise or precisely may refer to: Science, and technology, and mathematics Mathematics and computing (general) * Accuracy and precision, measurement deviation from true value and its scatter * Significant figures, the number of digit ...
, the reciprocal of the variance. The reason for expressing the formulas in terms of precision is that the analysis of most cases is simplified. * Both univariate and multivariate normal distribution, multivariate cases need to be considered. * Either conjugate prior, conjugate or improper prior, improper prior distributions may be placed on the unknown variables. * An additional set of cases occurs in Bayesian linear regression, where in the basic model the data is assumed to be normally distributed, and normal priors are placed on the regression coefficients. The resulting analysis is similar to the basic cases of independent identically distributed data. The formulas for the non-linear-regression cases are summarized in the conjugate prior article.


Sum of two quadratics


= Scalar form

= The following auxiliary formula is useful for simplifying the posterior distribution, posterior update equations, which otherwise become fairly tedious. :a(x-y)^2 + b(x-z)^2 = (a + b)\left(x - \frac\right)^2 + \frac(y-z)^2 This equation rewrites the sum of two quadratics in ''x'' by expanding the squares, grouping the terms in ''x'', and completing the square. Note the following about the complex constant factors attached to some of the terms: # The factor \frac has the form of a weighted average of ''y'' and ''z''. # \frac = \frac = (a^ + b^)^. This shows that this factor can be thought of as resulting from a situation where the Multiplicative inverse, reciprocals of quantities ''a'' and ''b'' add directly, so to combine ''a'' and ''b'' themselves, it's necessary to reciprocate, add, and reciprocate the result again to get back into the original units. This is exactly the sort of operation performed by the harmonic mean, so it is not surprising that \frac is one-half the harmonic mean of ''a'' and ''b''.


= Vector form

= A similar formula can be written for the sum of two vector quadratics: If x, y, z are vectors of length ''k'', and A and B are symmetric matrix, symmetric, invertible matrices of size k\times k, then : \begin & (\mathbf-\mathbf)'\mathbf(\mathbf-\mathbf) + (\mathbf-\mathbf)' \mathbf(\mathbf-\mathbf) \\ = & (\mathbf - \mathbf)'(\mathbf+\mathbf)(\mathbf - \mathbf) + (\mathbf - \mathbf)'(\mathbf^ + \mathbf^)^(\mathbf - \mathbf) \end where :\mathbf = (\mathbf + \mathbf)^(\mathbf\mathbf + \mathbf \mathbf) Note that the form x′ A x is called a
quadratic form In mathematics, a quadratic form is a polynomial with terms all of degree two ("form" is another name for a homogeneous polynomial). For example, :4x^2 + 2xy - 3y^2 is a quadratic form in the variables and . The coefficients usually belong to a ...
and is a scalar (mathematics), scalar: :\mathbf'\mathbf\mathbf = \sum_a_ x_i x_j In other words, it sums up all possible combinations of products of pairs of elements from x, with a separate coefficient for each. In addition, since x_i x_j = x_j x_i, only the sum a_ + a_ matters for any off-diagonal elements of A, and there is no loss of generality in assuming that A is symmetric matrix, symmetric. Furthermore, if A is symmetric, then the form \mathbf'\mathbf\mathbf = \mathbf'\mathbf\mathbf.


Sum of differences from the mean

Another useful formula is as follows: \sum_^n (x_i-\mu)^2 = \sum_^n (x_i-\bar)^2 + n(\bar -\mu)^2 where \bar = \frac \sum_^n x_i.


With known variance

For a set of i.i.d. normally distributed data points X of size ''n'' where each individual point ''x'' follows x \sim \mathcal(\mu, \sigma^2) with known
variance In probability theory and statistics, variance is the expectation of the squared deviation of a random variable from its population mean or sample mean. Variance is a measure of dispersion, meaning it is a measure of how far a set of numbers ...
σ2, the conjugate prior distribution is also normally distributed. This can be shown more easily by rewriting the variance as the
precision Precision, precise or precisely may refer to: Science, and technology, and mathematics Mathematics and computing (general) * Accuracy and precision, measurement deviation from true value and its scatter * Significant figures, the number of digit ...
, i.e. using τ = 1/σ2. Then if x \sim \mathcal(\mu, 1/\tau) and \mu \sim \mathcal(\mu_0, 1/\tau_0), we proceed as follows. First, the likelihood function is (using the formula above for the sum of differences from the mean): :\begin p(\mathbf\mid\mu,\tau) &= \prod_^n \sqrt \exp\left(-\frac\tau(x_i-\mu)^2\right) \\ &= \left(\frac\right)^ \exp\left(-\frac\tau \sum_^n (x_i-\mu)^2\right) \\ &= \left(\frac\right)^ \exp\left[-\frac\tau \left(\sum_^n(x_i-\bar)^2 + n(\bar -\mu)^2\right)\right]. \end Then, we proceed as follows: :\begin p(\mu\mid\mathbf) &\propto p(\mathbf\mid\mu) p(\mu) \\ & = \left(\frac\right)^ \exp\left[-\frac\tau \left(\sum_^n(x_i-\bar)^2 + n(\bar -\mu)^2\right)\right] \sqrt \exp\left(-\frac\tau_0(\mu-\mu_0)^2\right) \\ &\propto \exp\left(-\frac\left(\tau\left(\sum_^n(x_i-\bar)^2 + n(\bar -\mu)^2\right) + \tau_0(\mu-\mu_0)^2\right)\right) \\ &\propto \exp\left(-\frac \left(n\tau(\bar-\mu)^2 + \tau_0(\mu-\mu_0)^2 \right)\right) \\ &= \exp\left(-\frac(n\tau + \tau_0)\left(\mu - \dfrac\right)^2 + \frac(\bar - \mu_0)^2\right) \\ &\propto \exp\left(-\frac(n\tau + \tau_0)\left(\mu - \dfrac\right)^2\right) \end In the above derivation, we used the formula above for the sum of two quadratics and eliminated all constant factors not involving ''μ''. The result is the kernel (statistics), kernel of a normal distribution, with mean \frac and precision n\tau + \tau_0, i.e. :p(\mu\mid\mathbf) \sim \mathcal\left(\frac, \frac\right) This can be written as a set of Bayesian update equations for the posterior parameters in terms of the prior parameters: :\begin \tau_0' &= \tau_0 + n\tau \\[5pt] \mu_0' &= \frac \\[5pt] \bar &= \frac\sum_^n x_i \end That is, to combine ''n'' data points with total precision of ''nτ'' (or equivalently, total variance of ''n''/''σ''2) and mean of values \bar, derive a new total precision simply by adding the total precision of the data to the prior total precision, and form a new mean through a ''precision-weighted average'', i.e. a weighted average of the data mean and the prior mean, each weighted by the associated total precision. This makes logical sense if the precision is thought of as indicating the certainty of the observations: In the distribution of the posterior mean, each of the input components is weighted by its certainty, and the certainty of this distribution is the sum of the individual certainties. (For the intuition of this, compare the expression "the whole is (or is not) greater than the sum of its parts". In addition, consider that the knowledge of the posterior comes from a combination of the knowledge of the prior and likelihood, so it makes sense that we are more certain of it than of either of its components.) The above formula reveals why it is more convenient to do Bayesian analysis of conjugate priors for the normal distribution in terms of the precision. The posterior precision is simply the sum of the prior and likelihood precisions, and the posterior mean is computed through a precision-weighted average, as described above. The same formulas can be written in terms of variance by reciprocating all the precisions, yielding the more ugly formulas :\begin ' &= \frac \\[5pt] \mu_0' &= \frac \\[5pt] \bar &= \frac\sum_^n x_i \end


With known mean

For a set of i.i.d. normally distributed data points X of size ''n'' where each individual point ''x'' follows x \sim \mathcal(\mu, \sigma^2) with known mean μ, the conjugate prior of the
variance In probability theory and statistics, variance is the expectation of the squared deviation of a random variable from its population mean or sample mean. Variance is a measure of dispersion, meaning it is a measure of how far a set of numbers ...
has an inverse gamma distribution or a scaled inverse chi-squared distribution. The two are equivalent 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. The prior for σ2 is as follows: :p(\sigma^2\mid\nu_0,\sigma_0^2) = \frac~\frac \propto \frac The likelihood function from above, written in terms of the variance, is: :\begin p(\mathbf\mid\mu,\sigma^2) &= \left(\frac\right)^ \exp\left[-\frac \sum_^n (x_i-\mu)^2\right] \\ &= \left(\frac\right)^ \exp\left[-\frac\right] \end where :S = \sum_^n (x_i-\mu)^2. Then: :\begin p(\sigma^2\mid\mathbf) &\propto p(\mathbf\mid\sigma^2) p(\sigma^2) \\ &= \left(\frac\right)^ \exp\left[-\frac\right] \frac~\frac \\ &\propto \left(\frac\right)^ \frac \exp\left[-\frac + \frac\right] \\ &= \frac \exp\left[-\frac\right] \end The above is also a scaled inverse chi-squared distribution where :\begin \nu_0' &= \nu_0 + n \\ \nu_0'' &= \nu_0 \sigma_0^2 + \sum_^n (x_i-\mu)^2 \end or equivalently :\begin \nu_0' &= \nu_0 + n \\ ' &= \frac \end Reparameterizing in terms of an inverse gamma distribution, the result is: :\begin \alpha' &= \alpha + \frac \\ \beta' &= \beta + \frac \end


With unknown mean and unknown variance

For a set of i.i.d. normally distributed data points X of size ''n'' where each individual point ''x'' follows x \sim \mathcal(\mu, \sigma^2) with unknown mean μ and unknown
variance In probability theory and statistics, variance is the expectation of the squared deviation of a random variable from its population mean or sample mean. Variance is a measure of dispersion, meaning it is a measure of how far a set of numbers ...
σ2, a combined (multivariate) conjugate prior is placed over the mean and variance, consisting of a normal-inverse-gamma distribution. Logically, this originates as follows: # From the analysis of the case with unknown mean but known variance, we see that the update equations involve sufficient statistics computed from the data consisting of the mean of the data points and the total variance of the data points, computed in turn from the known variance divided by the number of data points. # From the analysis of the case with unknown variance but known mean, we see that the update equations involve sufficient statistics over the data consisting of the number of data points and sum of squared deviations. # Keep in mind that the posterior update values serve as the prior distribution when further data is handled. Thus, we should logically think of our priors in terms of the sufficient statistics just described, with the same semantics kept in mind as much as possible. # To handle the case where both mean and variance are unknown, we could place independent priors over the mean and variance, with fixed estimates of the average mean, total variance, number of data points used to compute the variance prior, and sum of squared deviations. Note however that in reality, the total variance of the mean depends on the unknown variance, and the sum of squared deviations that goes into the variance prior (appears to) depend on the unknown mean. In practice, the latter dependence is relatively unimportant: Shifting the actual mean shifts the generated points by an equal amount, and on average the squared deviations will remain the same. This is not the case, however, with the total variance of the mean: As the unknown variance increases, the total variance of the mean will increase proportionately, and we would like to capture this dependence. # This suggests that we create a ''conditional prior'' of the mean on the unknown variance, with a hyperparameter specifying the mean of the pseudo-observations associated with the prior, and another parameter specifying the number of pseudo-observations. This number serves as a scaling parameter on the variance, making it possible to control the overall variance of the mean relative to the actual variance parameter. The prior for the variance also has two hyperparameters, one specifying the sum of squared deviations of the pseudo-observations associated with the prior, and another specifying once again the number of pseudo-observations. Note that each of the priors has a hyperparameter specifying the number of pseudo-observations, and in each case this controls the relative variance of that prior. These are given as two separate hyperparameters so that the variance (aka the confidence) of the two priors can be controlled separately. # This leads immediately to the normal-inverse-gamma distribution, which is the product of the two distributions just defined, with conjugate priors used (an inverse gamma distribution over the variance, and a normal distribution over the mean, ''conditional'' on the variance) and with the same four parameters just defined. The priors are normally defined as follows: :\begin p(\mu\mid\sigma^2; \mu_0, n_0) &\sim \mathcal(\mu_0,\sigma^2/n_0) \\ p(\sigma^2; \nu_0,\sigma_0^2) &\sim I\chi^2(\nu_0,\sigma_0^2) = IG(\nu_0/2, \nu_0\sigma_0^2/2) \end The update equations can be derived, and look as follows: :\begin \bar &= \frac 1 n \sum_^n x_i \\ \mu_0' &= \frac \\ n_0' &= n_0 + n \\ \nu_0' &= \nu_0 + n \\ \nu_0'' &= \nu_0 \sigma_0^2 + \sum_^n (x_i-\bar)^2 + \frac(\mu_0 - \bar)^2 \end The respective numbers of pseudo-observations add the number of actual observations to them. The new mean hyperparameter is once again a weighted average, this time weighted by the relative numbers of observations. Finally, the update for \nu_0'' is similar to the case with known mean, but in this case the sum of squared deviations is taken with respect to the observed data mean rather than the true mean, and as a result a new "interaction term" needs to be added to take care of the additional error source stemming from the deviation between prior and data mean.


Occurrence and applications

The occurrence of normal distribution in practical problems can be loosely classified into four categories: # Exactly normal distributions; # Approximately normal laws, for example when such approximation is justified by the
central limit theorem In probability theory, the central limit theorem (CLT) establishes that, in many situations, when independent random variables are summed up, their properly normalized sum tends toward a normal distribution even if the original variables themselv ...
; and # Distributions modeled as normal – the normal distribution being the distribution with Principle of maximum entropy, maximum entropy for a given mean and variance. # Regression problems – the normal distribution being found after systematic effects have been modeled sufficiently well.


Exact normality

Certain quantities in physics are distributed normally, as was first demonstrated by James Clerk Maxwell. Examples of such quantities are: * Probability density function of a ground state in a quantum harmonic oscillator. * The position of a particle that experiences diffusion. If initially the particle is located at a specific point (that is its probability distribution is the Dirac delta function), then after time ''t'' its location is described by a normal distribution with variance ''t'', which satisfies the diffusion equation \frac f(x,t) = \frac \frac f(x,t). If the initial location is given by a certain density function g(x), then the density at time ''t'' is the convolution of ''g'' and the normal PDF.


Approximate normality

''Approximately'' normal distributions occur in many situations, as explained by the
central limit theorem In probability theory, the central limit theorem (CLT) establishes that, in many situations, when independent random variables are summed up, their properly normalized sum tends toward a normal distribution even if the original variables themselv ...
. When the outcome is produced by many small effects acting ''additively and independently'', its distribution will be close to normal. The normal approximation will not be valid if the effects act multiplicatively (instead of additively), or if there is a single external influence that has a considerably larger magnitude than the rest of the effects. * In counting problems, where the central limit theorem includes a discrete-to-continuum approximation and where Infinite divisibility, infinitely divisible and Indecomposable distribution, decomposable distributions are involved, such as ** binomial distribution, Binomial random variables, associated with binary response variables; ** Poisson distribution, Poisson random variables, associated with rare events; * Thermal radiation has a Bose–Einstein statistics, Bose–Einstein distribution on very short time scales, and a normal distribution on longer timescales due to the central limit theorem.


Assumed normality

There are statistical methods to empirically test that assumption; see the above #Normality tests, Normality tests section. * In biology, the ''logarithm'' of various variables tend to have a normal distribution, that is, they tend to have a
log-normal distribution In probability theory, a log-normal (or lognormal) distribution is a continuous probability distribution of a random variable whose logarithm is normally distributed. Thus, if the random variable is log-normally distributed, then has a normal ...
(after separation on male/female subpopulations), with examples including: ** Measures of size of living tissue (length, height, skin area, weight); ** The ''length'' of ''inert'' appendages (hair, claws, nails, teeth) of biological specimens, ''in the direction of growth''; presumably the thickness of tree bark also falls under this category; ** Certain physiological measurements, such as blood pressure of adult humans. * In finance, in particular the Black–Scholes model, changes in the ''logarithm'' of exchange rates, price indices, and stock market indices are assumed normal (these variables behave like compound interest, not like simple interest, and so are multiplicative). Some mathematicians such as Benoit Mandelbrot have argued that Levy skew alpha-stable distribution, log-Levy distributions, which possesses heavy tails would be a more appropriate model, in particular for the analysis for stock market crashes. The use of the assumption of normal distribution occurring in financial models has also been criticized by Nassim Nicholas Taleb in his works. * Propagation of uncertainty, Measurement errors in physical experiments are often modeled by a normal distribution. This use of a normal distribution does not imply that one is assuming the measurement errors are normally distributed, rather using the normal distribution produces the most conservative predictions possible given only knowledge about the mean and variance of the errors. * In Standardized testing (statistics), standardized testing, results can be made to have a normal distribution by either selecting the number and difficulty of questions (as in the Intelligence quotient, IQ test) or transforming the raw test scores into "output" scores by fitting them to the normal distribution. For example, the SAT's traditional range of 200–800 is based on a normal distribution with a mean of 500 and a standard deviation of 100. * Many scores are derived from the normal distribution, including percentile ranks ("percentiles" or "quantiles"), normal curve equivalents, stanines, Standard score, z-scores, and T-scores. Additionally, some behavioral statistical procedures assume that scores are normally distributed; for example, Student's t-test, t-tests and Analysis of variance, ANOVAs. Bell curve grading assigns relative grades based on a normal distribution of scores. * In hydrology the distribution of long duration river discharge or rainfall, e.g. monthly and yearly totals, is often thought to be practically normal according to the
central limit theorem In probability theory, the central limit theorem (CLT) establishes that, in many situations, when independent random variables are summed up, their properly normalized sum tends toward a normal distribution even if the original variables themselv ...
. The blue picture, made with CumFreq, illustrates an example of fitting the normal distribution to ranked October rainfalls showing the 90% confidence belt based on the
binomial distribution In probability theory and statistics, the binomial distribution with parameters ''n'' and ''p'' is the discrete probability distribution of the number of successes in a sequence of ''n'' independent experiments, each asking a yes–no quest ...
. The rainfall data are represented by plotting positions as part of the cumulative frequency analysis.


Methodological problems and peer review

John Ioannidis argues that using normally distributed standard deviations as standards for validating research findings leave falsifiability, falsifiable predictions about phenomena that are not normally distributed untested. This includes, for example, phenomena that only appear when all necessary conditions are present and one cannot be a substitute for another in an addition-like way and phenomena that are not randomly distributed. Ioannidis argues that standard deviation-centered validation gives a false appearance of validity to hypotheses and theories where some but not all falsifiable predictions are normally distributed since the portion of falsifiable predictions that there is evidence against may and in some cases are in the non-normally distributed parts of the range of falsifiable predictions, as well as baselessly dismissing hypotheses for which none of the falsifiable predictions are normally distributed as if were they unfalsifiable when in fact they do make falsifiable predictions. It is argued by Ioannidis that many cases of mutually exclusive theories being accepted as "validated" by research journals are caused by failure of the journals to take in empirical falsifications of non-normally distributed predictions, and not because mutually exclusive theories are true, which they cannot be, although two mutually exclusive theories can both be wrong and a third one correct.


Computational methods


Generating values from normal distribution

In computer simulations, especially in applications of the Monte-Carlo method, it is often desirable to generate values that are normally distributed. The algorithms listed below all generate the standard normal deviates, since a can be generated as , where ''Z'' is standard normal. All these algorithms rely on the availability of a random number generator ''U'' capable of producing Uniform distribution (continuous), uniform random variates. * The most straightforward method is based on the probability integral transform property: if ''U'' is distributed uniformly on (0,1), then Φ−1(''U'') will have the standard normal distribution. The drawback of this method is that it relies on calculation of the
probit function In probability theory and statistics, the probit function is the quantile function associated with the standard normal distribution. It has applications in data analysis and machine learning, in particular exploratory statistical graphics and ...
Φ−1, which cannot be done analytically. Some approximate methods are described in and in the error function, erf article. Wichura gives a fast algorithm for computing this function to 16 decimal places, which is used by R programming language, R to compute random variates of the normal distribution. * Irwin–Hall distribution#Approximating a Normal distribution, An easy-to-program approximate approach that relies on the
central limit theorem In probability theory, the central limit theorem (CLT) establishes that, in many situations, when independent random variables are summed up, their properly normalized sum tends toward a normal distribution even if the original variables themselv ...
is as follows: generate 12 uniform ''U''(0,1) deviates, add them all up, and subtract 6 – the resulting random variable will have approximately standard normal distribution. In truth, the distribution will be Irwin–Hall distribution, Irwin–Hall, which is a 12-section eleventh-order polynomial approximation to the normal distribution. This random deviate will have a limited range of (−6, 6). Note that in a true normal distribution, only 0.00034% of all samples will fall outside ±6σ. * The Box–Muller transform, Box–Muller method uses two independent random numbers ''U'' and ''V'' distributed uniform distribution (continuous), uniformly on (0,1). Then the two random variables ''X'' and ''Y'' X = \sqrt \, \cos(2 \pi V) , \qquad Y = \sqrt \, \sin(2 \pi V) . will both have the standard normal distribution, and will be
independent Independent or Independents may refer to: Arts, entertainment, and media Artist groups * Independents (artist group), a group of modernist painters based in the New Hope, Pennsylvania, area of the United States during the early 1930s * Independ ...
. This formulation arises because for a bivariate normal random vector (''X'', ''Y'') the squared norm will have the
chi-squared distribution In probability theory and statistics, the chi-squared distribution (also chi-square or \chi^2-distribution) with k degrees of freedom is the distribution of a sum of the squares of k independent standard normal random variables. The chi-squa ...
with two degrees of freedom, which is an easily generated exponential distribution, exponential random variable corresponding to the quantity −2ln(''U'') in these equations; and the angle is distributed uniformly around the circle, chosen by the random variable ''V''. * The Marsaglia polar method is a modification of the Box–Muller method which does not require computation of the sine and cosine functions. In this method, ''U'' and ''V'' are drawn from the uniform (−1,1) distribution, and then is computed. If ''S'' is greater or equal to 1, then the method starts over, otherwise the two quantities X = U\sqrt, \qquad Y = V\sqrt are returned. Again, ''X'' and ''Y'' are independent, standard normal random variables. * The Ratio method is a rejection method. The algorithm proceeds as follows: ** Generate two independent uniform deviates ''U'' and ''V''; ** Compute ''X'' = (''V'' − 0.5)/''U''; ** Optional: if ''X''2 ≤ 5 − 4''e''1/4''U'' then accept ''X'' and terminate algorithm; ** Optional: if ''X''2 ≥ 4''e''−1.35/''U'' + 1.4 then reject ''X'' and start over from step 1; ** If ''X''2 ≤ −4 ln''U'' then accept ''X'', otherwise start over the algorithm. *:The two optional steps allow the evaluation of the logarithm in the last step to be avoided in most cases. These steps can be greatly improved so that the logarithm is rarely evaluated. * The ziggurat algorithm is faster than the Box–Muller transform and still exact. In about 97% of all cases it uses only two random numbers, one random integer and one random uniform, one multiplication and an if-test. Only in 3% of the cases, where the combination of those two falls outside the "core of the ziggurat" (a kind of rejection sampling using logarithms), do exponentials and more uniform random numbers have to be employed. * Integer arithmetic can be used to sample from the standard normal distribution. This method is exact in the sense that it satisfies the conditions of ''ideal approximation''; i.e., it is equivalent to sampling a real number from the standard normal distribution and rounding this to the nearest representable floating point number. * There is also some investigation into the connection between the fast Hadamard transform and the normal distribution, since the transform employs just addition and subtraction and by the central limit theorem random numbers from almost any distribution will be transformed into the normal distribution. In this regard a series of Hadamard transforms can be combined with random permutations to turn arbitrary data sets into a normally distributed data.


Numerical approximations for the normal CDF and normal quantile function

The standard normal cumulative distribution function, CDF is widely used in scientific and statistical computing. The values Φ(''x'') may be approximated very accurately by a variety of methods, such as numerical integration, Taylor series, asymptotic series and Gauss's continued fraction#Of Kummer's confluent hypergeometric function, continued fractions. Different approximations are used depending on the desired level of accuracy. * give the approximation for Φ(''x'') for ''x > 0'' with the absolute error (algorith
26.2.17
: \Phi(x) = 1 - \varphi(x)\left(b_1 t + b_2 t^2 + b_3t^3 + b_4 t^4 + b_5 t^5\right) + \varepsilon(x), \qquad t = \frac, where ''ϕ''(''x'') is the standard normal PDF, and ''b''0 = 0.2316419, ''b''1 = 0.319381530, ''b''2 = −0.356563782, ''b''3 = 1.781477937, ''b''4 = −1.821255978, ''b''5 = 1.330274429. * lists some dozens of approximations – by means of rational functions, with or without exponentials – for the function. His algorithms vary in the degree of complexity and the resulting precision, with maximum absolute precision of 24 digits. An algorithm by combines Hart's algorithm 5666 with a continued fraction approximation in the tail to provide a fast computation algorithm with a 16-digit precision. * after recalling Hart68 solution is not suited for erf, gives a solution for both erf and erfc, with maximal relative error bound, via rational function, Rational Chebyshev Approximation. * suggested a simple algorithm based on the Taylor series expansion \Phi(x) = \frac12 + \varphi(x)\left( x + \frac 3 + \frac + \frac + \frac + \cdots \right) for calculating with arbitrary precision. The drawback of this algorithm is comparatively slow calculation time (for example it takes over 300 iterations to calculate the function with 16 digits of precision when ). * The GNU Scientific Library calculates values of the standard normal CDF using Hart's algorithms and approximations with Chebyshev polynomials. Shore (1982) introduced simple approximations that may be incorporated in stochastic optimization models of engineering and operations research, like reliability engineering and inventory analysis. Denoting , the simplest approximation for the quantile function is: z = \Phi^(p)=5.5556\left[1- \left( \frac p \right)^\right],\qquad p\ge 1/2 This approximation delivers for ''z'' a maximum absolute error of 0.026 (for , corresponding to ). For replace ''p'' by and change sign. Another approximation, somewhat less accurate, is the single-parameter approximation: z=-0.4115\left\, \qquad p\ge 1/2 The latter had served to derive a simple approximation for the loss integral of the normal distribution, defined by \begin L(z) & =\int_z^\infty (u-z)\varphi(u) \, du=\int_z^\infty [1-\Phi (u)] \, du \\[5pt] L(z) & \approx \begin 0.4115\left(\dfrac p \right) - z, & p<1/2, \\ \\ 0.4115\left( \dfrac p \right), & p\ge 1/2. \end \\[5pt] \text \\ L(z) & \approx \begin 0.4115\left\, & p < 1/2, \\ \\ 0.4115 \dfrac p, & p\ge 1/2. \end \end This approximation is particularly accurate for the right far-tail (maximum error of 10−3 for z≥1.4). Highly accurate approximations for the CDF, based on Response modeling methodology, Response Modeling Methodology (RMM, Shore, 2011, 2012), are shown in Shore (2005). Some more approximations can be found at: Error function#Approximation with elementary functions. In particular, small ''relative'' error on the whole domain for the CDF \Phi and the quantile function \Phi^ as well, is achieved via an explicitly invertible formula by Sergei Winitzki in 2008.


History


Development

Some authors attribute the credit for the discovery of the normal distribution to Abraham de Moivre, de Moivre, who in 1738 published in the second edition of his "''The Doctrine of Chances''" the study of the coefficients in the binomial expansion of . De Moivre proved that the middle term in this expansion has the approximate magnitude of 2^n/\sqrt, and that "If ''m'' or ''n'' be a Quantity infinitely great, then the Logarithm of the Ratio, which a Term distant from the middle by the Interval ''ℓ'', has to the middle Term, is -\frac." Although this theorem can be interpreted as the first obscure expression for the normal probability law, Stephen Stigler, Stigler points out that de Moivre himself did not interpret his results as anything more than the approximate rule for the binomial coefficients, and in particular de Moivre lacked the concept of the probability density function. In 1823 Carl Friedrich Gauss, Gauss published his monograph "''Theoria combinationis observationum erroribus minimis obnoxiae''" where among other things he introduces several important statistical concepts, such as the method of least squares, the method of maximum likelihood, and the ''normal distribution''. Gauss used ''M'', , to denote the measurements of some unknown quantity ''V'', and sought the "most probable" estimator of that quantity: the one that maximizes the probability of obtaining the observed experimental results. In his notation φΔ is the probability density function of the measurement errors of magnitude Δ. Not knowing what the function ''φ'' is, Gauss requires that his method should reduce to the well-known answer: the arithmetic mean of the measured values. Starting from these principles, Gauss demonstrates that the only law that rationalizes the choice of arithmetic mean as an estimator of the location parameter, is the normal law of errors: \varphi\mathit = \frac h \, e^, where ''h'' is "the measure of the precision of the observations". Using this normal law as a generic model for errors in the experiments, Gauss formulates what is now known as the non-linear least squares, non-linear weighted least squares method. Although Gauss was the first to suggest the normal distribution law, Pierre Simon de Laplace, Laplace made significant contributions. It was Laplace who first posed the problem of aggregating several observations in 1774, although his own solution led to the Laplacian distribution. It was Laplace who first calculated the value of the Gaussian integral, integral in 1782, providing the normalization constant for the normal distribution. Finally, it was Laplace who in 1810 proved and presented to the Academy the fundamental
central limit theorem In probability theory, the central limit theorem (CLT) establishes that, in many situations, when independent random variables are summed up, their properly normalized sum tends toward a normal distribution even if the original variables themselv ...
, which emphasized the theoretical importance of the normal distribution. It is of interest to note that in 1809 an Irish-American mathematician Robert Adrain published two insightful but flawed derivations of the normal probability law, simultaneously and independently from Gauss. His works remained largely unnoticed by the scientific community, until in 1871 they were exhumed by Cleveland Abbe, Abbe. In the middle of the 19th century James Clerk Maxwell, Maxwell demonstrated that the normal distribution is not just a convenient mathematical tool, but may also occur in natural phenomena: "The number of particles whose velocity, resolved in a certain direction, lies between ''x'' and ''x'' + ''dx'' is \operatorname \frac\; e^ \, dx


Naming

Today, the concept is usually known in English as the normal distribution or Gaussian distribution. Other less common names include Gauss distribution, Laplace-Gauss distribution, the law of error, the law of facility of errors, Laplace's second law, Gaussian law. Gauss himself apparently coined the term with reference to the "normal equations" involved in its applications, with normal having its technical meaning of orthogonal rather than "usual". However, by the end of the 19th century some authors had started using the name ''normal distribution'', where the word "normal" was used as an adjective – the term now being seen as a reflection of the fact that this distribution was seen as typical, common – and thus "normal". Charles Sanders Peirce, Peirce (one of those authors) once defined "normal" thus: "...the 'normal' is not the average (or any other kind of mean) of what actually occurs, but of what ''would'', in the long run, occur under certain circumstances." Around the turn of the 20th century Karl Pearson, Pearson popularized the term ''normal'' as a designation for this distribution. Also, it was Pearson who first wrote the distribution in terms of the standard deviation ''σ'' as in modern notation. Soon after this, in year 1915, Ronald Fisher, Fisher added the location parameter to the formula for normal distribution, expressing it in the way it is written nowadays: df = \frac e^ \, dx. The term "standard normal", which denotes the normal distribution with zero mean and unit variance came into general use around the 1950s, appearing in the popular textbooks by P. G. Hoel (1947) "''Introduction to mathematical statistics''" and A. M. Mood (1950) "''Introduction to the theory of statistics''".


See also

* Bates distribution – similar to the Irwin–Hall distribution, but rescaled back into the 0 to 1 range * Behrens–Fisher problem – the long-standing problem of testing whether two normal samples with different variances have same means; * Bhattacharyya distance – method used to separate mixtures of normal distributions * Erdős–Kac theorem – on the occurrence of the normal distribution in number theory * Full width at half maximum * Gaussian blur – convolution, which uses the normal distribution as a kernel * Modified half-normal distribution with the pdf on (0, \infty) is given as f(x)= \frac, where \Psi(\alpha,z)=_1\Psi_1\left(\begin\left(\alpha,\frac\right)\\(1,0)\end;z \right) denotes the Fox-Wright Psi function. * Normally distributed and uncorrelated does not imply independent * Ratio normal distribution * Reciprocal normal distribution * Standard normal table * Stein's lemma * Sub-Gaussian distribution * Sum of normally distributed random variables * Tweedie distribution – The normal distribution is a member of the family of Tweedie exponential dispersion models. * Wrapped normal distribution – the Normal distribution applied to a circular domain * Z-test – using the normal distribution


Notes


References


Citations


Sources

* * In particular, the entries fo
"bell-shaped and bell curve"
an

* * * * * * * * * * * * * * * * * * * * * * * * Translated by Stephen M. Stigler in ''Statistical Science'' 1 (3), 1986: . * * * * * * * * * * * * * * * * * * * * * * * * * * * *


External links

*
Normal distribution calculator
{{Authority control Normal distribution, Continuous distributions Conjugate prior distributions Exponential family distributions Stable distributions Location-scale family probability distributions]">X - \mu, ^p\right&= \sigma^p (p-1)!! \cdot \begin \sqrt & \textp\text \\ 1 & \textp\text \end \\ &= \sigma^p \cdot \frac. \end The last formula is valid also for any non-integer p>-1. When the mean \mu \ne 0, the plain and absolute moments can be expressed in terms of
confluent hypergeometric function In mathematics, a confluent hypergeometric function is a solution of a confluent hypergeometric equation, which is a degenerate form of a hypergeometric differential equation where two of the three regular singularities merge into an irregular ...
s _1F_1 and U. :\begin \operatorname\left ^p\right&= \sigma^p\cdot (-i\sqrt 2)^p U\left(-\frac, \frac, -\frac \left( \frac \mu \sigma \right)^2 \right), \\ \operatorname\left[, X, ^p \right] &= \sigma^p \cdot 2^ \frac _1F_1\left( -\frac, \frac, -\frac \left( \frac \mu \sigma \right)^2 \right). \end These expressions remain valid even if p is not an integer. See also Hermite polynomials#"Negative variance", generalized Hermite polynomials. The expectation of X conditioned on the event that X lies in an interval ,b/math> is given by :\operatorname\left \mid a= \mu - \sigma^2\frac where f and F respectively are the density and the cumulative distribution function of X. For b=\infty this is known as the
inverse Mills ratio In probability theory, the Mills ratio (or Mills's ratio) of a continuous random variable X is the function : m(x) := \frac , where f(x) is the probability density function, and :\bar(x) := \Pr x.html" ;"title=">x">>x= \int_x^ f(u)\, du is the ...
. Note that above, density f of X is used instead of standard normal density as in inverse Mills ratio, so here we have \sigma^2 instead of \sigma.


Fourier transform and characteristic function

The
Fourier transform A Fourier transform (FT) is a mathematical transform that decomposes functions into frequency components, which are represented by the output of the transform as a function of frequency. Most commonly functions of time or space are transformed, ...
of a normal density f with mean \mu and standard deviation \sigma is : \hat f(t) = \int_^\infty f(x)e^ \, dx = e^ e^ where i is the
imaginary unit The imaginary unit or unit imaginary number () is a solution to the quadratic equation x^2+1=0. Although there is no real number with this property, can be used to extend the real numbers to what are called complex numbers, using addition an ...
. If the mean \mu=0, the first factor is 1, and the Fourier transform is, apart from a constant factor, a normal density on the
frequency domain In physics, electronics, control systems engineering, and statistics, the frequency domain refers to the analysis of mathematical functions or signals with respect to frequency, rather than time. Put simply, a time-domain graph shows how a signa ...
, with mean 0 and standard deviation 1/\sigma. In particular, the standard normal distribution \varphi is an
eigenfunction In mathematics, an eigenfunction of a linear operator ''D'' defined on some function space is any non-zero function f in that space that, when acted upon by ''D'', is only multiplied by some scaling factor called an eigenvalue. As an equation, th ...
of the Fourier transform. In probability theory, the Fourier transform of the probability distribution of a real-valued random variable X is closely connected to the
characteristic function In mathematics, the term "characteristic function" can refer to any of several distinct concepts: * The indicator function of a subset, that is the function ::\mathbf_A\colon X \to \, :which for a given subset ''A'' of ''X'', has value 1 at points ...
\varphi_X(t) of that variable, which is defined as the
expected value In probability theory, the expected value (also called expectation, expectancy, mathematical expectation, mean, average, or first moment) is a generalization of the weighted average. Informally, the expected value is the arithmetic mean of a l ...
of e^, as a function of the real variable t (the
frequency Frequency is the number of occurrences of a repeating event per unit of time. It is also occasionally referred to as ''temporal frequency'' for clarity, and is distinct from ''angular frequency''. Frequency is measured in hertz (Hz) which is eq ...
parameter of the Fourier transform). This definition can be analytically extended to a complex-value variable t. The relation between both is: :\varphi_X(t) = \hat f(-t)


Moment and cumulant generating functions

The
moment generating function In probability theory and statistics, the moment-generating function of a real-valued random variable is an alternative specification of its probability distribution. Thus, it provides the basis of an alternative route to analytical results compare ...
of a real random variable X is the expected value of e^, as a function of the real parameter t. For a normal distribution with density f, mean \mu and deviation \sigma, the moment generating function exists and is equal to :M(t) = \operatorname ^= \hat f(it) = e^ e^ The
cumulant generating function In probability theory and statistics, the cumulants of a probability distribution are a set of quantities that provide an alternative to the '' moments'' of the distribution. Any two probability distributions whose moments are identical will have ...
is the logarithm of the moment generating function, namely :g(t) = \ln M(t) = \mu t + \tfrac 12 \sigma^2 t^2 Since this is a quadratic polynomial in t, only the first two
cumulant In probability theory and statistics, the cumulants of a probability distribution are a set of quantities that provide an alternative to the '' moments'' of the distribution. Any two probability distributions whose moments are identical will ha ...
s are nonzero, namely the mean \mu and the variance \sigma^2.


Stein operator and class

Within
Stein's method Stein's method is a general method in probability theory to obtain bounds on the distance between two probability distributions with respect to a probability metric. It was introduced by Charles Stein, who first published it in 1972, to obtain ...
the Stein operator and class of a random variable X \sim \mathcal(\mu, \sigma^2) are \mathcalf(x) = \sigma^2 f'(x) - (x-\mu)f(x) and \mathcal the class of all absolutely continuous functions f : \R \to \R \mbox\mathbb[, f'(X), ]< \infty.


Zero-variance limit

In the limit (mathematics), limit when \sigma tends to zero, the probability density f(x) eventually tends to zero at any x\ne \mu, but grows without limit if x = \mu, while its integral remains equal to 1. Therefore, the normal distribution cannot be defined as an ordinary
function Function or functionality may refer to: Computing * Function key, a type of key on computer keyboards * Function model, a structured representation of processes in a system * Function object or functor or functionoid, a concept of object-oriente ...
when \sigma = 0. However, one can define the normal distribution with zero variance as a
generalized function In mathematics, generalized functions are objects extending the notion of functions. There is more than one recognized theory, for example the theory of distributions. Generalized functions are especially useful in making discontinuous functions ...
; specifically, as Dirac's "delta function" \delta translated by the mean \mu, that is f(x)=\delta(x-\mu). Its CDF is then the
Heaviside step function The Heaviside step function, or the unit step function, usually denoted by or (but sometimes , or ), is a step function, named after Oliver Heaviside (1850–1925), the value of which is zero for negative arguments and one for positive argume ...
translated by the mean \mu, namely :F(x) = \begin 0 & \textx < \mu \\ 1 & \textx \geq \mu \end


Maximum entropy

Of all probability distributions over the reals with a specified mean \mu and variance \sigma^2, the normal distribution N(\mu,\sigma^2) is the one with maximum entropy. If X is a
continuous random variable In probability theory and statistics, a probability distribution is the mathematical function that gives the probabilities of occurrence of different possible outcomes for an experiment. It is a mathematical description of a random phenomenon i ...
with
probability density In probability theory, a probability density function (PDF), or density of a continuous random variable, is a function whose value at any given sample (or point) in the sample space (the set of possible values taken by the random variable) can ...
f(x), then the entropy of X is defined as : H(X) = - \int_^\infty f(x)\log f(x)\, dx where f(x)\log f(x) is understood to be zero whenever f(x)=0. This functional can be maximized, subject to the constraints that the distribution is properly normalized and has a specified variance, by using
variational calculus The calculus of variations (or Variational Calculus) is a field of mathematical analysis that uses variations, which are small changes in functions and functionals, to find maxima and minima of functionals: mappings from a set of functions t ...
. A function with two
Lagrange multipliers In mathematical optimization, the method of Lagrange multipliers is a strategy for finding the local maxima and minima of a function subject to equality constraints (i.e., subject to the condition that one or more equations have to be satisfied ex ...
is defined: : L=\int_^\infty f(x)\ln(f(x))\,dx-\lambda_0\left(1-\int_^\infty f(x)\,dx\right)-\lambda\left(\sigma^2-\int_^\infty f(x)(x-\mu)^2\,dx\right) where f(x) is, for now, regarded as some density function with mean \mu and standard deviation \sigma. At maximum entropy, a small variation \delta f(x) about f(x) will produce a variation \delta L about L which is equal to 0: : 0=\delta L=\int_^\infty \delta f(x)\left (\ln(f(x))+1+\lambda_0+\lambda(x-\mu)^2\right )\,dx Since this must hold for any small \delta f(x), the term in brackets must be zero, and solving for f(x) yields: :f(x)=e^ Using the constraint equations to solve for \lambda_0 and \lambda yields the density of the normal distribution: : f(x, \mu, \sigma)=\frace^ The entropy of a normal distribution is equal to : H(X)=\tfrac(1+\log(2\sigma^2\pi))


Other properties


Related distributions


Central limit theorem

The central limit theorem states that under certain (fairly common) conditions, the sum of many random variables will have an approximately normal distribution. More specifically, where X_1,\ldots ,X_n are
independent and identically distributed In probability theory and statistics, a collection of random variables is independent and identically distributed if each random variable has the same probability distribution as the others and all are mutually independent. This property is usua ...
random variables with the same arbitrary distribution, zero mean, and variance \sigma^2 and Z is their mean scaled by \sqrt : Z = \sqrt\left(\frac\sum_^n X_i\right) Then, as n increases, the probability distribution of Z will tend to the normal distribution with zero mean and variance \sigma^2. The theorem can be extended to variables (X_i) that are not independent and/or not identically distributed if certain constraints are placed on the degree of dependence and the moments of the distributions. Many
test statistic A test statistic is a statistic (a quantity derived from the sample) used in statistical hypothesis testing.Berger, R. L.; Casella, G. (2001). ''Statistical Inference'', Duxbury Press, Second Edition (p.374) A hypothesis test is typically specif ...
s, scores, and
estimator In statistics, an estimator is a rule for calculating an estimate of a given quantity based on observed data: thus the rule (the estimator), the quantity of interest (the estimand) and its result (the estimate) are distinguished. For example, the ...
s encountered in practice contain sums of certain random variables in 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 distributions. The central limit theorem also implies that certain distributions can be approximated by the normal distribution, for example: * The
binomial distribution In probability theory and statistics, the binomial distribution with parameters ''n'' and ''p'' is the discrete probability distribution of the number of successes in a sequence of ''n'' independent experiments, each asking a yes–no quest ...
B(n,p) is approximately normal with mean np and variance np(1-p) for large n and for p not too close to 0 or 1. * The
Poisson distribution In probability theory and statistics, the Poisson distribution is a discrete probability distribution that expresses the probability of a given number of events occurring in a fixed interval of time or space if these events occur with a known co ...
with parameter \lambda is approximately normal with mean \lambda and variance \lambda, for large values of \lambda. * The
chi-squared distribution In probability theory and statistics, the chi-squared distribution (also chi-square or \chi^2-distribution) with k degrees of freedom is the distribution of a sum of the squares of k independent standard normal random variables. The chi-squa ...
\chi^2(k) is approximately normal with mean k and variance 2k, for large k. * The
Student's t-distribution In probability and statistics, Student's ''t''-distribution (or simply the ''t''-distribution) is any member of a family of continuous probability distributions that arise when estimating the mean of a normally distributed population in sit ...
t(\nu) is approximately normal with mean 0 and variance 1 when \nu is large. Whether these approximations are sufficiently accurate depends on the purpose for which they are needed, and the rate of convergence to the normal distribution. It is typically the case that such approximations are less accurate in the tails of the distribution. A general upper bound for the approximation error in the central limit theorem is given by the
Berry–Esseen theorem In probability theory, the central limit theorem states that, under certain circumstances, the probability distribution of the scaled mean of a random sample converges to a normal distribution as the sample size increases to infinity. Under strong ...
, improvements of the approximation are given by the
Edgeworth expansion The Gram–Charlier A series (named in honor of Jørgen Pedersen Gram and Carl Charlier), and the Edgeworth series (named in honor of Francis Ysidro Edgeworth) are series that approximate a probability distribution in terms of its cumulants. The se ...
s. This theorem can also be used to justify modeling the sum of many uniform noise sources as
Gaussian noise Gaussian noise, named after Carl Friedrich Gauss, is a term from signal processing theory denoting a kind of signal noise that has a probability density function (pdf) equal to that of the normal distribution (which is also known as the Gaussia ...
. See
AWGN Additive white Gaussian noise (AWGN) is a basic noise model used in information theory to mimic the effect of many random processes that occur in nature. The modifiers denote specific characteristics: * ''Additive'' because it is added to any nois ...
.


Operations and functions of normal variables

The
probability density In probability theory, a probability density function (PDF), or density of a continuous random variable, is a function whose value at any given sample (or point) in the sample space (the set of possible values taken by the random variable) can ...
,
cumulative distribution In statistics, the frequency (or absolute frequency) of an event i is the number n_i of times the observation has occurred/recorded in an experiment or study. These frequencies are often depicted graphically or in tabular form. Types The cumul ...
, and inverse cumulative distribution of any function of one or more independent or correlated normal variables can be computed with the numerical method of ray-tracing
Matlab code
. In the following sections we look at some special cases.


Operations on a single normal variable

If X is distributed normally with mean \mu and variance \sigma^2, then * aX+b, for any real numbers a and b, is also normally distributed, with mean a\mu+b and standard deviation , a, \sigma. That is, the family of normal distributions is closed under linear transformations. * The exponential of X is distributed log-normally: . * The absolute value of X has
folded normal distribution The folded normal distribution is a probability distribution related to the normal distribution. Given a normally distributed random variable ''X'' with mean ''μ'' and variance ''σ''2, the random variable ''Y'' = , ''X'', has a folded normal d ...
: . If \mu = 0 this is known as the
half-normal distribution In probability theory and statistics, the half-normal distribution is a special case of the folded normal distribution. Let X follow an ordinary normal distribution, N(0,\sigma^2). Then, Y=, X, follows a half-normal distribution. Thus, the hal ...
. * The absolute value of normalized residuals, , ''X'' − ''μ'', /''σ'', has
chi distribution In probability theory and statistics, the chi distribution is a continuous probability distribution. It is the distribution of the positive square root of the sum of squares of a set of independent random variables each following a standard norm ...
with one degree of freedom: , X - \mu, / \sigma \sim \chi_1. * The square of ''X''/''σ'' has the
noncentral chi-squared distribution In probability theory and statistics, the noncentral chi-squared distribution (or noncentral chi-square distribution, noncentral \chi^2 distribution) is a noncentral generalization of the chi-squared distribution. It often arises in the power a ...
with one degree of freedom: X^2 / \sigma^2 \sim \chi_1^2(\mu^2 / \sigma^2). If \mu = 0, the distribution is called simply chi-squared. * The log likelihood of a normal variable x is simply the log of its
probability density function In probability theory, a probability density function (PDF), or density of a continuous random variable, is a function whose value at any given sample (or point) in the sample space (the set of possible values taken by the random variable) can ...
: \ln p(x)= -\frac \left(\frac \right)^2 -\ln \left(\sigma \sqrt \right) = -\frac z^2 -\ln \left(\sigma \sqrt \right). Since this is a scaled and shifted square of a standard normal variable, it is distributed as a scaled and shifted chi-squared variable. * The distribution of the variable ''X'' restricted to an interval 'a'', ''b''is called the
truncated normal distribution In probability and statistics, the truncated normal distribution is the probability distribution derived from that of a normally distributed random variable by bounding the random variable from either below or above (or both). The truncated no ...
. * (''X'' − ''μ'')−2 has a
Lévy distribution In probability theory and statistics, the Lévy distribution, named after Paul Lévy, is a continuous probability distribution for a non-negative random variable. In spectroscopy, this distribution, with frequency as the dependent variable, is kn ...
with location 0 and scale ''σ''−2.


= Operations on two independent normal variables

= * If X_1 and X_2 are two
independent Independent or Independents may refer to: Arts, entertainment, and media Artist groups * Independents (artist group), a group of modernist painters based in the New Hope, Pennsylvania, area of the United States during the early 1930s * Independ ...
normal random variables, with means \mu_1, \mu_2 and standard deviations \sigma_1, \sigma_2, then their sum X_1 + X_2 will also be normally distributed, roof/sup> with mean \mu_1 + \mu_2 and variance \sigma_1^2 + \sigma_2^2. * In particular, if X and Y are independent normal deviates with zero mean and variance \sigma^2, then X + Y and X - Y are also independent and normally distributed, with zero mean and variance 2\sigma^2. This is a special case of the
polarization identity In linear algebra, a branch of mathematics, the polarization identity is any one of a family of formulas that express the inner product of two vectors in terms of the norm of a normed vector space. If a norm arises from an inner product then t ...
. * If X_1, X_2 are two independent normal deviates with mean \mu and deviation \sigma, and a, b are arbitrary real numbers, then the variable X_3 = \frac + \mu is also normally distributed with mean \mu and deviation \sigma. It follows that the normal distribution is
stable A stable is a building in which livestock, especially horses, are kept. It most commonly means a building that is divided into separate stalls for individual animals and livestock. There are many different types of stables in use today; the ...
(with exponent \alpha=2).


= Operations on two independent standard normal variables

= If X_1 and X_2 are two independent standard normal random variables with mean 0 and variance 1, then * Their sum and difference is distributed normally with mean zero and variance two: X_1 \pm X_2 \sim N(0, 2). * Their product Z = X_1 X_2 follows the
product distribution A product distribution is a probability distribution constructed as the distribution of the product of random variables having two other known distributions. Given two statistically independent random variables ''X'' and ''Y'', the distribution of ...
with density function f_Z(z) = \pi^ K_0(, z, ) where K_0 is the
modified Bessel function of the second kind Bessel functions, first defined by the mathematician Daniel Bernoulli and then generalized by Friedrich Bessel, are canonical solutions of Bessel's differential equation x^2 \frac + x \frac + \left(x^2 - \alpha^2 \right)y = 0 for an arbitrary ...
. This distribution is symmetric around zero, unbounded at z = 0, and has the
characteristic function In mathematics, the term "characteristic function" can refer to any of several distinct concepts: * The indicator function of a subset, that is the function ::\mathbf_A\colon X \to \, :which for a given subset ''A'' of ''X'', has value 1 at points ...
\phi_Z(t) = (1 + t^2)^. * Their ratio follows the standard
Cauchy distribution The Cauchy distribution, named after Augustin Cauchy, is a continuous probability distribution. It is also known, especially among physicists, as the Lorentz distribution (after Hendrik Lorentz), Cauchy–Lorentz distribution, Lorentz(ian) fun ...
: X_1/ X_2 \sim \operatorname(0, 1). * Their Euclidean norm \sqrt has the
Rayleigh distribution In probability theory and statistics, the Rayleigh distribution is a continuous probability distribution for nonnegative-valued random variables. Up to rescaling, it coincides with the chi distribution with two degrees of freedom. The distribut ...
.


Operations on multiple independent normal variables

* Any linear combination of independent normal deviates is a normal deviate. * If X_1, X_2, \ldots, X_n are independent standard normal random variables, then the sum of their squares has the
chi-squared distribution In probability theory and statistics, the chi-squared distribution (also chi-square or \chi^2-distribution) with k degrees of freedom is the distribution of a sum of the squares of k independent standard normal random variables. The chi-squa ...
with n degrees of freedom X_1^2 + \cdots + X_n^2 \sim \chi_n^2. * If X_1, X_2, \ldots, X_n are independent normally distributed random variables with means \mu and variances \sigma^2, then their
sample mean The sample mean (or "empirical mean") and the sample covariance are statistics computed from a Sample (statistics), sample of data on one or more random variables. The sample mean is the average value (or mean, mean value) of a sample (statistic ...
is independent from the sample
standard deviation In statistics, the standard deviation is a measure of the amount of variation or dispersion of a set of values. A low standard deviation indicates that the values tend to be close to the mean (also called the expected value) of the set, while ...
, which can be demonstrated using Basu's theorem or
Cochran's theorem In statistics, Cochran's theorem, devised by William G. Cochran, is a theorem used to justify results relating to the probability distributions of statistics that are used in the analysis of variance. Statement Let ''U''1, ..., ''U'N'' be i.i. ...
. The ratio of these two quantities will have the
Student's t-distribution In probability and statistics, Student's ''t''-distribution (or simply the ''t''-distribution) is any member of a family of continuous probability distributions that arise when estimating the mean of a normally distributed population in sit ...
with n-1 degrees of freedom: t = \frac = \frac \sim t_. * If X_1, X_2, \ldots, X_n, Y_1, Y_2, \ldots, Y_m are independent standard normal random variables, then the ratio of their normalized sums of squares will have the with degrees of freedom: F = \frac \sim F_.


Operations on multiple correlated normal variables

* A
quadratic form In mathematics, a quadratic form is a polynomial with terms all of degree two ("form" is another name for a homogeneous polynomial). For example, :4x^2 + 2xy - 3y^2 is a quadratic form in the variables and . The coefficients usually belong to a ...
of a normal vector, i.e. a quadratic function q = \sum x_i^2 + \sum x_j + c of multiple independent or correlated normal variables, is a generalized chi-square variable.


Operations on the density function

The split normal distribution is most directly defined in terms of joining scaled sections of the density functions of different normal distributions and rescaling the density to integrate to one. The
truncated normal distribution In probability and statistics, the truncated normal distribution is the probability distribution derived from that of a normally distributed random variable by bounding the random variable from either below or above (or both). The truncated no ...
results from rescaling a section of a single density function.


Infinite divisibility and Cramér's theorem

For any positive integer \text, any normal distribution with mean \mu and variance \sigma^2 is the distribution of the sum of \text independent normal deviates, each with mean \frac and variance \frac. This property is called
infinite divisibility Infinite divisibility arises in different ways in philosophy, physics, economics, order theory (a branch of mathematics), and probability theory (also a branch of mathematics). One may speak of infinite divisibility, or the lack thereof, of matter ...
. Conversely, if X_1 and X_2 are independent random variables and their sum X_1+X_2 has a normal distribution, then both X_1 and X_2 must be normal deviates. This result is known as Cramér's decomposition theorem, and is equivalent to saying that the convolution of two distributions is normal if and only if both are normal. Cramér's theorem implies that a linear combination of independent non-Gaussian variables will never have an exactly normal distribution, although it may approach it arbitrarily closely.


Bernstein's theorem

Bernstein's theorem states that if X and Y are independent and X + Y and X - Y are also independent, then both ''X'' and ''Y'' must necessarily have normal distributions. More generally, if X_1, \ldots, X_n are independent random variables, then two distinct linear combinations \sum and \sumwill be independent if and only if all X_k are normal and \sum, where \sigma_k^2 denotes the variance of X_k.


Extensions

The notion of normal distribution, being one of the most important distributions in probability theory, has been extended far beyond the standard framework of the univariate (that is one-dimensional) case (Case 1). All these extensions are also called ''normal'' or ''Gaussian'' laws, so a certain ambiguity in names exists. * The
multivariate normal distribution In probability theory and statistics, the multivariate normal distribution, multivariate Gaussian distribution, or joint normal distribution is a generalization of the one-dimensional (univariate) normal distribution to higher dimensions. One d ...
describes the Gaussian law in the ''k''-dimensional Euclidean space. A vector is multivariate-normally distributed if any linear combination of its components has a (univariate) normal distribution. The variance of ''X'' is a ''k×k'' symmetric positive-definite matrix ''V''. The multivariate normal distribution is a special case of the
elliptical distribution In probability and statistics, an elliptical distribution is any member of a broad family of probability distributions that generalize the multivariate normal distribution. Intuitively, in the simplified two and three dimensional case, the joint di ...
s. As such, its iso-density loci in the ''k'' = 2 case are ellipses and in the case of arbitrary ''k'' are ellipsoids. * Rectified Gaussian distribution a rectified version of normal distribution with all the negative elements reset to 0 * Complex normal distribution deals with the complex normal vectors. A complex vector is said to be normal if both its real and imaginary components jointly possess a 2''k''-dimensional multivariate normal distribution. The variance-covariance structure of ''X'' is described by two matrices: the ''variance'' matrix Γ, and the ''relation'' matrix ''C''. * Matrix normal distribution describes the case of normally distributed matrices. * Gaussian processes are the normally distributed stochastic processes. These can be viewed as elements of some infinite-dimensional Hilbert space ''H'', and thus are the analogues of multivariate normal vectors for the case . A random element is said to be normal if for any constant the scalar product has a (univariate) normal distribution. The variance structure of such Gaussian random element can be described in terms of the linear ''covariance ''. Several Gaussian processes became popular enough to have their own names: ** Wiener process, Brownian motion, ** Brownian bridge, ** Ornstein–Uhlenbeck process. * Gaussian q-distribution is an abstract mathematical construction that represents a "q-analogue" of the normal distribution. * the q-Gaussian is an analogue of the Gaussian distribution, in the sense that it maximises the Tsallis entropy, and is one type of Tsallis distribution. Note that this distribution is different from the Gaussian q-distribution above. * The Kaniadakis Gaussian distribution, Kaniadakis ''κ''-Gaussian distribution is a generalization of the Gaussian distribution which arises from the Kaniadakis statistics, being one of the Kaniadakis distribution, Kaniadakis distributions. A random variable ''X'' has a two-piece normal distribution if it has a distribution : f_X( x ) = N( \mu, \sigma_1^2 ) \text x \le \mu : f_X( x ) = N( \mu, \sigma_2^2 ) \text x \ge \mu where ''μ'' is the mean and ''σ''1 and ''σ''2 are the standard deviations of the distribution to the left and right of the mean respectively. The mean, variance and third central moment of this distribution have been determined : \operatorname( X ) = \mu + \sqrt ( \sigma_2 - \sigma_1 ) : \operatorname( X ) = \left( 1 - \frac 2 \pi\right)( \sigma_2 - \sigma_1 )^2 + \sigma_1 \sigma_2 : \operatorname( X ) = \sqrt( \sigma_2 - \sigma_1 ) \left[ \left( \frac 4 \pi - 1 \right) ( \sigma_2 - \sigma_1)^2 + \sigma_1 \sigma_2 \right] where E(''X''), V(''X'') and T(''X'') are the mean, variance, and third central moment respectively. One of the main practical uses of the Gaussian law is to model the empirical distributions of many different random variables encountered in practice. In such case a possible extension would be a richer family of distributions, having more than two parameters and therefore being able to fit the empirical distribution more accurately. The examples of such extensions are: * Pearson distribution — a four-parameter family of probability distributions that extend the normal law to include different skewness and kurtosis values. * The generalized normal distribution, also known as the exponential power distribution, allows for distribution tails with thicker or thinner asymptotic behaviors.


Statistical inference


Estimation of parameters

It is often the case that we do not know the parameters of the normal distribution, but instead want to Estimation theory, estimate them. That is, having a sample (x_1, \ldots, x_n) from a normal N(\mu, \sigma^2) population we would like to learn the approximate values of parameters \mu and \sigma^2. The standard approach to this problem is the maximum likelihood method, which requires maximization of the ''log-likelihood function'': : \ln\mathcal(\mu,\sigma^2) = \sum_^n \ln f(x_i\mid\mu,\sigma^2) = -\frac\ln(2\pi) - \frac\ln\sigma^2 - \frac\sum_^n (x_i-\mu)^2. Taking derivatives with respect to \mu and \sigma^2 and solving the resulting system of first order conditions yields the ''maximum likelihood estimates'': : \hat = \overline \equiv \frac\sum_^n x_i, \qquad \hat^2 = \frac \sum_^n (x_i - \overline)^2.


Sample mean

Estimator \textstyle\hat\mu is called the ''
sample mean The sample mean (or "empirical mean") and the sample covariance are statistics computed from a Sample (statistics), sample of data on one or more random variables. The sample mean is the average value (or mean, mean value) of a sample (statistic ...
'', since it is the arithmetic mean of all observations. The statistic \textstyle\overline is complete statistic, complete and sufficient statistic, sufficient for \mu, and therefore by the Lehmann–Scheffé theorem, \textstyle\hat\mu is the uniformly minimum variance unbiased (UMVU) estimator. In finite samples it is distributed normally: : \hat\mu \sim \mathcal(\mu,\sigma^2/n). The variance of this estimator is equal to the ''μμ''-element of the inverse Fisher information matrix \textstyle\mathcal^. This implies that the estimator is efficient estimator, finite-sample efficient. Of practical importance is the fact that the standard error (statistics), standard error of \textstyle\hat\mu is proportional to \textstyle1/\sqrt, that is, if one wishes to decrease the standard error by a factor of 10, one must increase the number of points in the sample by a factor of 100. This fact is widely used in determining sample sizes for opinion polls and the number of trials in Monte Carlo simulations. From the standpoint of the asymptotic theory (statistics), asymptotic theory, \textstyle\hat\mu is consistent estimator, consistent, that is, it convergence in probability, converges in probability to \mu as n\rightarrow\infty. The estimator is also asymptotic normality, asymptotically normal, which is a simple corollary of the fact that it is normal in finite samples: : \sqrt(\hat\mu-\mu) \,\xrightarrow\, \mathcal(0,\sigma^2).


Sample variance

The estimator \textstyle\hat\sigma^2 is called the ''sample variance'', since it is the variance of the sample ((x_1, \ldots, x_n)). In practice, another estimator is often used instead of the \textstyle\hat\sigma^2. This other estimator is denoted s^2, and is also called the ''sample variance'', which represents a certain ambiguity in terminology; its square root s is called the ''sample standard deviation''. The estimator s^2 differs from \textstyle\hat\sigma^2 by having instead of ''n'' in the denominator (the so-called Bessel's correction): : s^2 = \frac \hat\sigma^2 = \frac \sum_^n (x_i - \overline)^2. The difference between s^2 and \textstyle\hat\sigma^2 becomes negligibly small for large ''n''s. In finite samples however, the motivation behind the use of s^2 is that it is an unbiased estimator of the underlying parameter \sigma^2, whereas \textstyle\hat\sigma^2 is biased. Also, by the Lehmann–Scheffé theorem the estimator s^2 is uniformly minimum variance unbiased (Minimum-variance unbiased estimator, UMVU), which makes it the "best" estimator among all unbiased ones. However it can be shown that the biased estimator \textstyle\hat\sigma^2 is "better" than the s^2 in terms of the mean squared error (MSE) criterion. In finite samples both s^2 and \textstyle\hat\sigma^2 have scaled
chi-squared distribution In probability theory and statistics, the chi-squared distribution (also chi-square or \chi^2-distribution) with k degrees of freedom is the distribution of a sum of the squares of k independent standard normal random variables. The chi-squa ...
with degrees of freedom: : s^2 \sim \frac \cdot \chi^2_, \qquad \hat\sigma^2 \sim \frac \cdot \chi^2_. The first of these expressions shows that the variance of s^2 is equal to 2\sigma^4/(n-1), which is slightly greater than the ''σσ''-element of the inverse Fisher information matrix \textstyle\mathcal^. Thus, s^2 is not an efficient estimator for \sigma^2, and moreover, since s^2 is UMVU, we can conclude that the finite-sample efficient estimator for \sigma^2 does not exist. Applying the asymptotic theory, both estimators s^2 and \textstyle\hat\sigma^2 are consistent, that is they converge in probability to \sigma^2 as the sample size n\rightarrow\infty. The two estimators are also both asymptotically normal: : \sqrt(\hat\sigma^2 - \sigma^2) \simeq \sqrt(s^2-\sigma^2) \,\xrightarrow\, \mathcal(0,2\sigma^4). In particular, both estimators are asymptotically efficient for \sigma^2.


Confidence intervals

By
Cochran's theorem In statistics, Cochran's theorem, devised by William G. Cochran, is a theorem used to justify results relating to the probability distributions of statistics that are used in the analysis of variance. Statement Let ''U''1, ..., ''U'N'' be i.i. ...
, for normal distributions the sample mean \textstyle\hat\mu and the sample variance ''s''2 are
independent Independent or Independents may refer to: Arts, entertainment, and media Artist groups * Independents (artist group), a group of modernist painters based in the New Hope, Pennsylvania, area of the United States during the early 1930s * Independ ...
, which means there can be no gain in considering their joint distribution. There is also a converse theorem: if in a sample the sample mean and sample variance are independent, then the sample must have come from the normal distribution. The independence between \textstyle\hat\mu and ''s'' can be employed to construct the so-called ''t-statistic'': : t = \frac = \frac \sim t_ This quantity ''t'' has the
Student's t-distribution In probability and statistics, Student's ''t''-distribution (or simply the ''t''-distribution) is any member of a family of continuous probability distributions that arise when estimating the mean of a normally distributed population in sit ...
with degrees of freedom, and it is an ancillary statistic (independent of the value of the parameters). Inverting the distribution of this ''t''-statistics will allow us to construct the
confidence interval In frequentist statistics, a confidence interval (CI) is a range of estimates for an unknown parameter. A confidence interval is computed at a designated ''confidence level''; the 95% confidence level is most common, but other levels, such as 9 ...
for ''μ''; similarly, inverting the ''χ''2 distribution of the statistic ''s''2 will give us the confidence interval for ''σ''2: :\mu \in \left[ \hat\mu - t_ \fracs, \hat\mu + t_ \fracs \right], :\sigma^2 \in \left[ \frac, \frac \right], where ''tk,p'' and are the ''p''th
quantile In statistics and probability, quantiles are cut points dividing the range of a probability distribution into continuous intervals with equal probabilities, or dividing the observations in a sample in the same way. There is one fewer quantile tha ...
s of the ''t''- and ''χ''2-distributions respectively. These confidence intervals are of the ''confidence level'' , meaning that the true values ''μ'' and ''σ''2 fall outside of these intervals with probability (or significance level) ''α''. In practice people usually take , resulting in the 95% confidence intervals. Approximate formulas can be derived from the asymptotic distributions of \textstyle\hat\mu and ''s''2: :\mu \in \left[ \hat\mu - , z_, \fracs, \hat\mu + , z_, \fracs \right], :\sigma^2 \in \left[ s^2 - , z_, \fracs^2, s^2 + , z_, \fracs^2 \right], The approximate formulas become valid for large values of ''n'', and are more convenient for the manual calculation since the standard normal quantiles ''z''''α''/2 do not depend on ''n''. In particular, the most popular value of , results in .


Normality tests

Normality tests assess the likelihood that the given data set comes from a normal distribution. Typically the null hypothesis ''H''0 is that the observations are distributed normally with unspecified mean ''μ'' and variance ''σ''2, versus the alternative ''Ha'' that the distribution is arbitrary. Many tests (over 40) have been devised for this problem. The more prominent of them are outlined below: Diagnostic plots are more intuitively appealing but subjective at the same time, as they rely on informal human judgement to accept or reject the null hypothesis. *
Q–Q plot In statistics, a Q–Q plot (quantile-quantile plot) is a probability plot, a List of graphical methods, graphical method for comparing two probability distributions by plotting their ''quantiles'' against each other. A point on the plot co ...
, also known as normal probability plot or rankit plot—is a plot of the sorted values from the data set against the expected values of the corresponding quantiles from the standard normal distribution. That is, it's a plot of point of the form (Φ−1(''pk''), ''x''(''k'')), where plotting points ''pk'' are equal to ''pk'' = (''k'' − ''α'')/(''n'' + 1 − 2''α'') and ''α'' is an adjustment constant, which can be anything between 0 and 1. If the null hypothesis is true, the plotted points should approximately lie on a straight line. * P–P plot – similar to the Q–Q plot, but used much less frequently. This method consists of plotting the points (Φ(''z''(''k'')), ''pk''), where \textstyle z_ = (x_-\hat\mu)/\hat\sigma. For normally distributed data this plot should lie on a 45° line between (0, 0) and (1, 1). Goodness-of-fit tests: ''Moment-based tests'': * D'Agostino's K-squared test * Jarque–Bera test * Shapiro–Wilk test: This is based on the fact that the line in the Q–Q plot has the slope of ''σ''. The test compares the least squares estimate of that slope with the value of the sample variance, and rejects the null hypothesis if these two quantities differ significantly. ''Tests based on the empirical distribution function'': * Anderson–Darling test * Lilliefors test (an adaptation of the Kolmogorov–Smirnov test)


Bayesian analysis of the normal distribution

Bayesian analysis of normally distributed data is complicated by the many different possibilities that may be considered: * Either the mean, or the variance, or neither, may be considered a fixed quantity. * When the variance is unknown, analysis may be done directly in terms of the variance, or in terms of the
precision Precision, precise or precisely may refer to: Science, and technology, and mathematics Mathematics and computing (general) * Accuracy and precision, measurement deviation from true value and its scatter * Significant figures, the number of digit ...
, the reciprocal of the variance. The reason for expressing the formulas in terms of precision is that the analysis of most cases is simplified. * Both univariate and multivariate normal distribution, multivariate cases need to be considered. * Either conjugate prior, conjugate or improper prior, improper prior distributions may be placed on the unknown variables. * An additional set of cases occurs in Bayesian linear regression, where in the basic model the data is assumed to be normally distributed, and normal priors are placed on the regression coefficients. The resulting analysis is similar to the basic cases of independent identically distributed data. The formulas for the non-linear-regression cases are summarized in the conjugate prior article.


Sum of two quadratics


= Scalar form

= The following auxiliary formula is useful for simplifying the posterior distribution, posterior update equations, which otherwise become fairly tedious. :a(x-y)^2 + b(x-z)^2 = (a + b)\left(x - \frac\right)^2 + \frac(y-z)^2 This equation rewrites the sum of two quadratics in ''x'' by expanding the squares, grouping the terms in ''x'', and completing the square. Note the following about the complex constant factors attached to some of the terms: # The factor \frac has the form of a weighted average of ''y'' and ''z''. # \frac = \frac = (a^ + b^)^. This shows that this factor can be thought of as resulting from a situation where the Multiplicative inverse, reciprocals of quantities ''a'' and ''b'' add directly, so to combine ''a'' and ''b'' themselves, it's necessary to reciprocate, add, and reciprocate the result again to get back into the original units. This is exactly the sort of operation performed by the harmonic mean, so it is not surprising that \frac is one-half the harmonic mean of ''a'' and ''b''.


= Vector form

= A similar formula can be written for the sum of two vector quadratics: If x, y, z are vectors of length ''k'', and A and B are symmetric matrix, symmetric, invertible matrices of size k\times k, then : \begin & (\mathbf-\mathbf)'\mathbf(\mathbf-\mathbf) + (\mathbf-\mathbf)' \mathbf(\mathbf-\mathbf) \\ = & (\mathbf - \mathbf)'(\mathbf+\mathbf)(\mathbf - \mathbf) + (\mathbf - \mathbf)'(\mathbf^ + \mathbf^)^(\mathbf - \mathbf) \end where :\mathbf = (\mathbf + \mathbf)^(\mathbf\mathbf + \mathbf \mathbf) Note that the form x′ A x is called a
quadratic form In mathematics, a quadratic form is a polynomial with terms all of degree two ("form" is another name for a homogeneous polynomial). For example, :4x^2 + 2xy - 3y^2 is a quadratic form in the variables and . The coefficients usually belong to a ...
and is a scalar (mathematics), scalar: :\mathbf'\mathbf\mathbf = \sum_a_ x_i x_j In other words, it sums up all possible combinations of products of pairs of elements from x, with a separate coefficient for each. In addition, since x_i x_j = x_j x_i, only the sum a_ + a_ matters for any off-diagonal elements of A, and there is no loss of generality in assuming that A is symmetric matrix, symmetric. Furthermore, if A is symmetric, then the form \mathbf'\mathbf\mathbf = \mathbf'\mathbf\mathbf.


Sum of differences from the mean

Another useful formula is as follows: \sum_^n (x_i-\mu)^2 = \sum_^n (x_i-\bar)^2 + n(\bar -\mu)^2 where \bar = \frac \sum_^n x_i.


With known variance

For a set of i.i.d. normally distributed data points X of size ''n'' where each individual point ''x'' follows x \sim \mathcal(\mu, \sigma^2) with known
variance In probability theory and statistics, variance is the expectation of the squared deviation of a random variable from its population mean or sample mean. Variance is a measure of dispersion, meaning it is a measure of how far a set of numbers ...
σ2, the conjugate prior distribution is also normally distributed. This can be shown more easily by rewriting the variance as the
precision Precision, precise or precisely may refer to: Science, and technology, and mathematics Mathematics and computing (general) * Accuracy and precision, measurement deviation from true value and its scatter * Significant figures, the number of digit ...
, i.e. using τ = 1/σ2. Then if x \sim \mathcal(\mu, 1/\tau) and \mu \sim \mathcal(\mu_0, 1/\tau_0), we proceed as follows. First, the likelihood function is (using the formula above for the sum of differences from the mean): :\begin p(\mathbf\mid\mu,\tau) &= \prod_^n \sqrt \exp\left(-\frac\tau(x_i-\mu)^2\right) \\ &= \left(\frac\right)^ \exp\left(-\frac\tau \sum_^n (x_i-\mu)^2\right) \\ &= \left(\frac\right)^ \exp\left[-\frac\tau \left(\sum_^n(x_i-\bar)^2 + n(\bar -\mu)^2\right)\right]. \end Then, we proceed as follows: :\begin p(\mu\mid\mathbf) &\propto p(\mathbf\mid\mu) p(\mu) \\ & = \left(\frac\right)^ \exp\left[-\frac\tau \left(\sum_^n(x_i-\bar)^2 + n(\bar -\mu)^2\right)\right] \sqrt \exp\left(-\frac\tau_0(\mu-\mu_0)^2\right) \\ &\propto \exp\left(-\frac\left(\tau\left(\sum_^n(x_i-\bar)^2 + n(\bar -\mu)^2\right) + \tau_0(\mu-\mu_0)^2\right)\right) \\ &\propto \exp\left(-\frac \left(n\tau(\bar-\mu)^2 + \tau_0(\mu-\mu_0)^2 \right)\right) \\ &= \exp\left(-\frac(n\tau + \tau_0)\left(\mu - \dfrac\right)^2 + \frac(\bar - \mu_0)^2\right) \\ &\propto \exp\left(-\frac(n\tau + \tau_0)\left(\mu - \dfrac\right)^2\right) \end In the above derivation, we used the formula above for the sum of two quadratics and eliminated all constant factors not involving ''μ''. The result is the kernel (statistics), kernel of a normal distribution, with mean \frac and precision n\tau + \tau_0, i.e. :p(\mu\mid\mathbf) \sim \mathcal\left(\frac, \frac\right) This can be written as a set of Bayesian update equations for the posterior parameters in terms of the prior parameters: :\begin \tau_0' &= \tau_0 + n\tau \\[5pt] \mu_0' &= \frac \\[5pt] \bar &= \frac\sum_^n x_i \end That is, to combine ''n'' data points with total precision of ''nτ'' (or equivalently, total variance of ''n''/''σ''2) and mean of values \bar, derive a new total precision simply by adding the total precision of the data to the prior total precision, and form a new mean through a ''precision-weighted average'', i.e. a weighted average of the data mean and the prior mean, each weighted by the associated total precision. This makes logical sense if the precision is thought of as indicating the certainty of the observations: In the distribution of the posterior mean, each of the input components is weighted by its certainty, and the certainty of this distribution is the sum of the individual certainties. (For the intuition of this, compare the expression "the whole is (or is not) greater than the sum of its parts". In addition, consider that the knowledge of the posterior comes from a combination of the knowledge of the prior and likelihood, so it makes sense that we are more certain of it than of either of its components.) The above formula reveals why it is more convenient to do Bayesian analysis of conjugate priors for the normal distribution in terms of the precision. The posterior precision is simply the sum of the prior and likelihood precisions, and the posterior mean is computed through a precision-weighted average, as described above. The same formulas can be written in terms of variance by reciprocating all the precisions, yielding the more ugly formulas :\begin ' &= \frac \\[5pt] \mu_0' &= \frac \\[5pt] \bar &= \frac\sum_^n x_i \end


With known mean

For a set of i.i.d. normally distributed data points X of size ''n'' where each individual point ''x'' follows x \sim \mathcal(\mu, \sigma^2) with known mean μ, the conjugate prior of the
variance In probability theory and statistics, variance is the expectation of the squared deviation of a random variable from its population mean or sample mean. Variance is a measure of dispersion, meaning it is a measure of how far a set of numbers ...
has an inverse gamma distribution or a scaled inverse chi-squared distribution. The two are equivalent 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. The prior for σ2 is as follows: :p(\sigma^2\mid\nu_0,\sigma_0^2) = \frac~\frac \propto \frac The likelihood function from above, written in terms of the variance, is: :\begin p(\mathbf\mid\mu,\sigma^2) &= \left(\frac\right)^ \exp\left[-\frac \sum_^n (x_i-\mu)^2\right] \\ &= \left(\frac\right)^ \exp\left[-\frac\right] \end where :S = \sum_^n (x_i-\mu)^2. Then: :\begin p(\sigma^2\mid\mathbf) &\propto p(\mathbf\mid\sigma^2) p(\sigma^2) \\ &= \left(\frac\right)^ \exp\left[-\frac\right] \frac~\frac \\ &\propto \left(\frac\right)^ \frac \exp\left[-\frac + \frac\right] \\ &= \frac \exp\left[-\frac\right] \end The above is also a scaled inverse chi-squared distribution where :\begin \nu_0' &= \nu_0 + n \\ \nu_0'' &= \nu_0 \sigma_0^2 + \sum_^n (x_i-\mu)^2 \end or equivalently :\begin \nu_0' &= \nu_0 + n \\ ' &= \frac \end Reparameterizing in terms of an inverse gamma distribution, the result is: :\begin \alpha' &= \alpha + \frac \\ \beta' &= \beta + \frac \end


With unknown mean and unknown variance

For a set of i.i.d. normally distributed data points X of size ''n'' where each individual point ''x'' follows x \sim \mathcal(\mu, \sigma^2) with unknown mean μ and unknown
variance In probability theory and statistics, variance is the expectation of the squared deviation of a random variable from its population mean or sample mean. Variance is a measure of dispersion, meaning it is a measure of how far a set of numbers ...
σ2, a combined (multivariate) conjugate prior is placed over the mean and variance, consisting of a normal-inverse-gamma distribution. Logically, this originates as follows: # From the analysis of the case with unknown mean but known variance, we see that the update equations involve sufficient statistics computed from the data consisting of the mean of the data points and the total variance of the data points, computed in turn from the known variance divided by the number of data points. # From the analysis of the case with unknown variance but known mean, we see that the update equations involve sufficient statistics over the data consisting of the number of data points and sum of squared deviations. # Keep in mind that the posterior update values serve as the prior distribution when further data is handled. Thus, we should logically think of our priors in terms of the sufficient statistics just described, with the same semantics kept in mind as much as possible. # To handle the case where both mean and variance are unknown, we could place independent priors over the mean and variance, with fixed estimates of the average mean, total variance, number of data points used to compute the variance prior, and sum of squared deviations. Note however that in reality, the total variance of the mean depends on the unknown variance, and the sum of squared deviations that goes into the variance prior (appears to) depend on the unknown mean. In practice, the latter dependence is relatively unimportant: Shifting the actual mean shifts the generated points by an equal amount, and on average the squared deviations will remain the same. This is not the case, however, with the total variance of the mean: As the unknown variance increases, the total variance of the mean will increase proportionately, and we would like to capture this dependence. # This suggests that we create a ''conditional prior'' of the mean on the unknown variance, with a hyperparameter specifying the mean of the pseudo-observations associated with the prior, and another parameter specifying the number of pseudo-observations. This number serves as a scaling parameter on the variance, making it possible to control the overall variance of the mean relative to the actual variance parameter. The prior for the variance also has two hyperparameters, one specifying the sum of squared deviations of the pseudo-observations associated with the prior, and another specifying once again the number of pseudo-observations. Note that each of the priors has a hyperparameter specifying the number of pseudo-observations, and in each case this controls the relative variance of that prior. These are given as two separate hyperparameters so that the variance (aka the confidence) of the two priors can be controlled separately. # This leads immediately to the normal-inverse-gamma distribution, which is the product of the two distributions just defined, with conjugate priors used (an inverse gamma distribution over the variance, and a normal distribution over the mean, ''conditional'' on the variance) and with the same four parameters just defined. The priors are normally defined as follows: :\begin p(\mu\mid\sigma^2; \mu_0, n_0) &\sim \mathcal(\mu_0,\sigma^2/n_0) \\ p(\sigma^2; \nu_0,\sigma_0^2) &\sim I\chi^2(\nu_0,\sigma_0^2) = IG(\nu_0/2, \nu_0\sigma_0^2/2) \end The update equations can be derived, and look as follows: :\begin \bar &= \frac 1 n \sum_^n x_i \\ \mu_0' &= \frac \\ n_0' &= n_0 + n \\ \nu_0' &= \nu_0 + n \\ \nu_0'' &= \nu_0 \sigma_0^2 + \sum_^n (x_i-\bar)^2 + \frac(\mu_0 - \bar)^2 \end The respective numbers of pseudo-observations add the number of actual observations to them. The new mean hyperparameter is once again a weighted average, this time weighted by the relative numbers of observations. Finally, the update for \nu_0'' is similar to the case with known mean, but in this case the sum of squared deviations is taken with respect to the observed data mean rather than the true mean, and as a result a new "interaction term" needs to be added to take care of the additional error source stemming from the deviation between prior and data mean.


Occurrence and applications

The occurrence of normal distribution in practical problems can be loosely classified into four categories: # Exactly normal distributions; # Approximately normal laws, for example when such approximation is justified by the
central limit theorem In probability theory, the central limit theorem (CLT) establishes that, in many situations, when independent random variables are summed up, their properly normalized sum tends toward a normal distribution even if the original variables themselv ...
; and # Distributions modeled as normal – the normal distribution being the distribution with Principle of maximum entropy, maximum entropy for a given mean and variance. # Regression problems – the normal distribution being found after systematic effects have been modeled sufficiently well.


Exact normality

Certain quantities in physics are distributed normally, as was first demonstrated by James Clerk Maxwell. Examples of such quantities are: * Probability density function of a ground state in a quantum harmonic oscillator. * The position of a particle that experiences diffusion. If initially the particle is located at a specific point (that is its probability distribution is the Dirac delta function), then after time ''t'' its location is described by a normal distribution with variance ''t'', which satisfies the diffusion equation \frac f(x,t) = \frac \frac f(x,t). If the initial location is given by a certain density function g(x), then the density at time ''t'' is the convolution of ''g'' and the normal PDF.


Approximate normality

''Approximately'' normal distributions occur in many situations, as explained by the
central limit theorem In probability theory, the central limit theorem (CLT) establishes that, in many situations, when independent random variables are summed up, their properly normalized sum tends toward a normal distribution even if the original variables themselv ...
. When the outcome is produced by many small effects acting ''additively and independently'', its distribution will be close to normal. The normal approximation will not be valid if the effects act multiplicatively (instead of additively), or if there is a single external influence that has a considerably larger magnitude than the rest of the effects. * In counting problems, where the central limit theorem includes a discrete-to-continuum approximation and where Infinite divisibility, infinitely divisible and Indecomposable distribution, decomposable distributions are involved, such as ** binomial distribution, Binomial random variables, associated with binary response variables; ** Poisson distribution, Poisson random variables, associated with rare events; * Thermal radiation has a Bose–Einstein statistics, Bose–Einstein distribution on very short time scales, and a normal distribution on longer timescales due to the central limit theorem.


Assumed normality

There are statistical methods to empirically test that assumption; see the above #Normality tests, Normality tests section. * In biology, the ''logarithm'' of various variables tend to have a normal distribution, that is, they tend to have a
log-normal distribution In probability theory, a log-normal (or lognormal) distribution is a continuous probability distribution of a random variable whose logarithm is normally distributed. Thus, if the random variable is log-normally distributed, then has a normal ...
(after separation on male/female subpopulations), with examples including: ** Measures of size of living tissue (length, height, skin area, weight); ** The ''length'' of ''inert'' appendages (hair, claws, nails, teeth) of biological specimens, ''in the direction of growth''; presumably the thickness of tree bark also falls under this category; ** Certain physiological measurements, such as blood pressure of adult humans. * In finance, in particular the Black–Scholes model, changes in the ''logarithm'' of exchange rates, price indices, and stock market indices are assumed normal (these variables behave like compound interest, not like simple interest, and so are multiplicative). Some mathematicians such as Benoit Mandelbrot have argued that Levy skew alpha-stable distribution, log-Levy distributions, which possesses heavy tails would be a more appropriate model, in particular for the analysis for stock market crashes. The use of the assumption of normal distribution occurring in financial models has also been criticized by Nassim Nicholas Taleb in his works. * Propagation of uncertainty, Measurement errors in physical experiments are often modeled by a normal distribution. This use of a normal distribution does not imply that one is assuming the measurement errors are normally distributed, rather using the normal distribution produces the most conservative predictions possible given only knowledge about the mean and variance of the errors. * In Standardized testing (statistics), standardized testing, results can be made to have a normal distribution by either selecting the number and difficulty of questions (as in the Intelligence quotient, IQ test) or transforming the raw test scores into "output" scores by fitting them to the normal distribution. For example, the SAT's traditional range of 200–800 is based on a normal distribution with a mean of 500 and a standard deviation of 100. * Many scores are derived from the normal distribution, including percentile ranks ("percentiles" or "quantiles"), normal curve equivalents, stanines, Standard score, z-scores, and T-scores. Additionally, some behavioral statistical procedures assume that scores are normally distributed; for example, Student's t-test, t-tests and Analysis of variance, ANOVAs. Bell curve grading assigns relative grades based on a normal distribution of scores. * In hydrology the distribution of long duration river discharge or rainfall, e.g. monthly and yearly totals, is often thought to be practically normal according to the
central limit theorem In probability theory, the central limit theorem (CLT) establishes that, in many situations, when independent random variables are summed up, their properly normalized sum tends toward a normal distribution even if the original variables themselv ...
. The blue picture, made with CumFreq, illustrates an example of fitting the normal distribution to ranked October rainfalls showing the 90% confidence belt based on the
binomial distribution In probability theory and statistics, the binomial distribution with parameters ''n'' and ''p'' is the discrete probability distribution of the number of successes in a sequence of ''n'' independent experiments, each asking a yes–no quest ...
. The rainfall data are represented by plotting positions as part of the cumulative frequency analysis.


Methodological problems and peer review

John Ioannidis argues that using normally distributed standard deviations as standards for validating research findings leave falsifiability, falsifiable predictions about phenomena that are not normally distributed untested. This includes, for example, phenomena that only appear when all necessary conditions are present and one cannot be a substitute for another in an addition-like way and phenomena that are not randomly distributed. Ioannidis argues that standard deviation-centered validation gives a false appearance of validity to hypotheses and theories where some but not all falsifiable predictions are normally distributed since the portion of falsifiable predictions that there is evidence against may and in some cases are in the non-normally distributed parts of the range of falsifiable predictions, as well as baselessly dismissing hypotheses for which none of the falsifiable predictions are normally distributed as if were they unfalsifiable when in fact they do make falsifiable predictions. It is argued by Ioannidis that many cases of mutually exclusive theories being accepted as "validated" by research journals are caused by failure of the journals to take in empirical falsifications of non-normally distributed predictions, and not because mutually exclusive theories are true, which they cannot be, although two mutually exclusive theories can both be wrong and a third one correct.


Computational methods


Generating values from normal distribution

In computer simulations, especially in applications of the Monte-Carlo method, it is often desirable to generate values that are normally distributed. The algorithms listed below all generate the standard normal deviates, since a can be generated as , where ''Z'' is standard normal. All these algorithms rely on the availability of a random number generator ''U'' capable of producing Uniform distribution (continuous), uniform random variates. * The most straightforward method is based on the probability integral transform property: if ''U'' is distributed uniformly on (0,1), then Φ−1(''U'') will have the standard normal distribution. The drawback of this method is that it relies on calculation of the
probit function In probability theory and statistics, the probit function is the quantile function associated with the standard normal distribution. It has applications in data analysis and machine learning, in particular exploratory statistical graphics and ...
Φ−1, which cannot be done analytically. Some approximate methods are described in and in the error function, erf article. Wichura gives a fast algorithm for computing this function to 16 decimal places, which is used by R programming language, R to compute random variates of the normal distribution. * Irwin–Hall distribution#Approximating a Normal distribution, An easy-to-program approximate approach that relies on the
central limit theorem In probability theory, the central limit theorem (CLT) establishes that, in many situations, when independent random variables are summed up, their properly normalized sum tends toward a normal distribution even if the original variables themselv ...
is as follows: generate 12 uniform ''U''(0,1) deviates, add them all up, and subtract 6 – the resulting random variable will have approximately standard normal distribution. In truth, the distribution will be Irwin–Hall distribution, Irwin–Hall, which is a 12-section eleventh-order polynomial approximation to the normal distribution. This random deviate will have a limited range of (−6, 6). Note that in a true normal distribution, only 0.00034% of all samples will fall outside ±6σ. * The Box–Muller transform, Box–Muller method uses two independent random numbers ''U'' and ''V'' distributed uniform distribution (continuous), uniformly on (0,1). Then the two random variables ''X'' and ''Y'' X = \sqrt \, \cos(2 \pi V) , \qquad Y = \sqrt \, \sin(2 \pi V) . will both have the standard normal distribution, and will be
independent Independent or Independents may refer to: Arts, entertainment, and media Artist groups * Independents (artist group), a group of modernist painters based in the New Hope, Pennsylvania, area of the United States during the early 1930s * Independ ...
. This formulation arises because for a bivariate normal random vector (''X'', ''Y'') the squared norm will have the
chi-squared distribution In probability theory and statistics, the chi-squared distribution (also chi-square or \chi^2-distribution) with k degrees of freedom is the distribution of a sum of the squares of k independent standard normal random variables. The chi-squa ...
with two degrees of freedom, which is an easily generated exponential distribution, exponential random variable corresponding to the quantity −2ln(''U'') in these equations; and the angle is distributed uniformly around the circle, chosen by the random variable ''V''. * The Marsaglia polar method is a modification of the Box–Muller method which does not require computation of the sine and cosine functions. In this method, ''U'' and ''V'' are drawn from the uniform (−1,1) distribution, and then is computed. If ''S'' is greater or equal to 1, then the method starts over, otherwise the two quantities X = U\sqrt, \qquad Y = V\sqrt are returned. Again, ''X'' and ''Y'' are independent, standard normal random variables. * The Ratio method is a rejection method. The algorithm proceeds as follows: ** Generate two independent uniform deviates ''U'' and ''V''; ** Compute ''X'' = (''V'' − 0.5)/''U''; ** Optional: if ''X''2 ≤ 5 − 4''e''1/4''U'' then accept ''X'' and terminate algorithm; ** Optional: if ''X''2 ≥ 4''e''−1.35/''U'' + 1.4 then reject ''X'' and start over from step 1; ** If ''X''2 ≤ −4 ln''U'' then accept ''X'', otherwise start over the algorithm. *:The two optional steps allow the evaluation of the logarithm in the last step to be avoided in most cases. These steps can be greatly improved so that the logarithm is rarely evaluated. * The ziggurat algorithm is faster than the Box–Muller transform and still exact. In about 97% of all cases it uses only two random numbers, one random integer and one random uniform, one multiplication and an if-test. Only in 3% of the cases, where the combination of those two falls outside the "core of the ziggurat" (a kind of rejection sampling using logarithms), do exponentials and more uniform random numbers have to be employed. * Integer arithmetic can be used to sample from the standard normal distribution. This method is exact in the sense that it satisfies the conditions of ''ideal approximation''; i.e., it is equivalent to sampling a real number from the standard normal distribution and rounding this to the nearest representable floating point number. * There is also some investigation into the connection between the fast Hadamard transform and the normal distribution, since the transform employs just addition and subtraction and by the central limit theorem random numbers from almost any distribution will be transformed into the normal distribution. In this regard a series of Hadamard transforms can be combined with random permutations to turn arbitrary data sets into a normally distributed data.


Numerical approximations for the normal CDF and normal quantile function

The standard normal cumulative distribution function, CDF is widely used in scientific and statistical computing. The values Φ(''x'') may be approximated very accurately by a variety of methods, such as numerical integration, Taylor series, asymptotic series and Gauss's continued fraction#Of Kummer's confluent hypergeometric function, continued fractions. Different approximations are used depending on the desired level of accuracy. * give the approximation for Φ(''x'') for ''x > 0'' with the absolute error (algorith
26.2.17
: \Phi(x) = 1 - \varphi(x)\left(b_1 t + b_2 t^2 + b_3t^3 + b_4 t^4 + b_5 t^5\right) + \varepsilon(x), \qquad t = \frac, where ''ϕ''(''x'') is the standard normal PDF, and ''b''0 = 0.2316419, ''b''1 = 0.319381530, ''b''2 = −0.356563782, ''b''3 = 1.781477937, ''b''4 = −1.821255978, ''b''5 = 1.330274429. * lists some dozens of approximations – by means of rational functions, with or without exponentials – for the function. His algorithms vary in the degree of complexity and the resulting precision, with maximum absolute precision of 24 digits. An algorithm by combines Hart's algorithm 5666 with a continued fraction approximation in the tail to provide a fast computation algorithm with a 16-digit precision. * after recalling Hart68 solution is not suited for erf, gives a solution for both erf and erfc, with maximal relative error bound, via rational function, Rational Chebyshev Approximation. * suggested a simple algorithm based on the Taylor series expansion \Phi(x) = \frac12 + \varphi(x)\left( x + \frac 3 + \frac + \frac + \frac + \cdots \right) for calculating with arbitrary precision. The drawback of this algorithm is comparatively slow calculation time (for example it takes over 300 iterations to calculate the function with 16 digits of precision when ). * The GNU Scientific Library calculates values of the standard normal CDF using Hart's algorithms and approximations with Chebyshev polynomials. Shore (1982) introduced simple approximations that may be incorporated in stochastic optimization models of engineering and operations research, like reliability engineering and inventory analysis. Denoting , the simplest approximation for the quantile function is: z = \Phi^(p)=5.5556\left[1- \left( \frac p \right)^\right],\qquad p\ge 1/2 This approximation delivers for ''z'' a maximum absolute error of 0.026 (for , corresponding to ). For replace ''p'' by and change sign. Another approximation, somewhat less accurate, is the single-parameter approximation: z=-0.4115\left\, \qquad p\ge 1/2 The latter had served to derive a simple approximation for the loss integral of the normal distribution, defined by \begin L(z) & =\int_z^\infty (u-z)\varphi(u) \, du=\int_z^\infty [1-\Phi (u)] \, du \\[5pt] L(z) & \approx \begin 0.4115\left(\dfrac p \right) - z, & p<1/2, \\ \\ 0.4115\left( \dfrac p \right), & p\ge 1/2. \end \\[5pt] \text \\ L(z) & \approx \begin 0.4115\left\, & p < 1/2, \\ \\ 0.4115 \dfrac p, & p\ge 1/2. \end \end This approximation is particularly accurate for the right far-tail (maximum error of 10−3 for z≥1.4). Highly accurate approximations for the CDF, based on Response modeling methodology, Response Modeling Methodology (RMM, Shore, 2011, 2012), are shown in Shore (2005). Some more approximations can be found at: Error function#Approximation with elementary functions. In particular, small ''relative'' error on the whole domain for the CDF \Phi and the quantile function \Phi^ as well, is achieved via an explicitly invertible formula by Sergei Winitzki in 2008.


History


Development

Some authors attribute the credit for the discovery of the normal distribution to Abraham de Moivre, de Moivre, who in 1738 published in the second edition of his "''The Doctrine of Chances''" the study of the coefficients in the binomial expansion of . De Moivre proved that the middle term in this expansion has the approximate magnitude of 2^n/\sqrt, and that "If ''m'' or ''n'' be a Quantity infinitely great, then the Logarithm of the Ratio, which a Term distant from the middle by the Interval ''ℓ'', has to the middle Term, is -\frac." Although this theorem can be interpreted as the first obscure expression for the normal probability law, Stephen Stigler, Stigler points out that de Moivre himself did not interpret his results as anything more than the approximate rule for the binomial coefficients, and in particular de Moivre lacked the concept of the probability density function. In 1823 Carl Friedrich Gauss, Gauss published his monograph "''Theoria combinationis observationum erroribus minimis obnoxiae''" where among other things he introduces several important statistical concepts, such as the method of least squares, the method of maximum likelihood, and the ''normal distribution''. Gauss used ''M'', , to denote the measurements of some unknown quantity ''V'', and sought the "most probable" estimator of that quantity: the one that maximizes the probability of obtaining the observed experimental results. In his notation φΔ is the probability density function of the measurement errors of magnitude Δ. Not knowing what the function ''φ'' is, Gauss requires that his method should reduce to the well-known answer: the arithmetic mean of the measured values. Starting from these principles, Gauss demonstrates that the only law that rationalizes the choice of arithmetic mean as an estimator of the location parameter, is the normal law of errors: \varphi\mathit = \frac h \, e^, where ''h'' is "the measure of the precision of the observations". Using this normal law as a generic model for errors in the experiments, Gauss formulates what is now known as the non-linear least squares, non-linear weighted least squares method. Although Gauss was the first to suggest the normal distribution law, Pierre Simon de Laplace, Laplace made significant contributions. It was Laplace who first posed the problem of aggregating several observations in 1774, although his own solution led to the Laplacian distribution. It was Laplace who first calculated the value of the Gaussian integral, integral in 1782, providing the normalization constant for the normal distribution. Finally, it was Laplace who in 1810 proved and presented to the Academy the fundamental
central limit theorem In probability theory, the central limit theorem (CLT) establishes that, in many situations, when independent random variables are summed up, their properly normalized sum tends toward a normal distribution even if the original variables themselv ...
, which emphasized the theoretical importance of the normal distribution. It is of interest to note that in 1809 an Irish-American mathematician Robert Adrain published two insightful but flawed derivations of the normal probability law, simultaneously and independently from Gauss. His works remained largely unnoticed by the scientific community, until in 1871 they were exhumed by Cleveland Abbe, Abbe. In the middle of the 19th century James Clerk Maxwell, Maxwell demonstrated that the normal distribution is not just a convenient mathematical tool, but may also occur in natural phenomena: "The number of particles whose velocity, resolved in a certain direction, lies between ''x'' and ''x'' + ''dx'' is \operatorname \frac\; e^ \, dx


Naming

Today, the concept is usually known in English as the normal distribution or Gaussian distribution. Other less common names include Gauss distribution, Laplace-Gauss distribution, the law of error, the law of facility of errors, Laplace's second law, Gaussian law. Gauss himself apparently coined the term with reference to the "normal equations" involved in its applications, with normal having its technical meaning of orthogonal rather than "usual". However, by the end of the 19th century some authors had started using the name ''normal distribution'', where the word "normal" was used as an adjective – the term now being seen as a reflection of the fact that this distribution was seen as typical, common – and thus "normal". Charles Sanders Peirce, Peirce (one of those authors) once defined "normal" thus: "...the 'normal' is not the average (or any other kind of mean) of what actually occurs, but of what ''would'', in the long run, occur under certain circumstances." Around the turn of the 20th century Karl Pearson, Pearson popularized the term ''normal'' as a designation for this distribution. Also, it was Pearson who first wrote the distribution in terms of the standard deviation ''σ'' as in modern notation. Soon after this, in year 1915, Ronald Fisher, Fisher added the location parameter to the formula for normal distribution, expressing it in the way it is written nowadays: df = \frac e^ \, dx. The term "standard normal", which denotes the normal distribution with zero mean and unit variance came into general use around the 1950s, appearing in the popular textbooks by P. G. Hoel (1947) "''Introduction to mathematical statistics''" and A. M. Mood (1950) "''Introduction to the theory of statistics''".


See also

* Bates distribution – similar to the Irwin–Hall distribution, but rescaled back into the 0 to 1 range * Behrens–Fisher problem – the long-standing problem of testing whether two normal samples with different variances have same means; * Bhattacharyya distance – method used to separate mixtures of normal distributions * Erdős–Kac theorem – on the occurrence of the normal distribution in number theory * Full width at half maximum * Gaussian blur – convolution, which uses the normal distribution as a kernel * Modified half-normal distribution with the pdf on (0, \infty) is given as f(x)= \frac, where \Psi(\alpha,z)=_1\Psi_1\left(\begin\left(\alpha,\frac\right)\\(1,0)\end;z \right) denotes the Fox-Wright Psi function. * Normally distributed and uncorrelated does not imply independent * Ratio normal distribution * Reciprocal normal distribution * Standard normal table * Stein's lemma * Sub-Gaussian distribution * Sum of normally distributed random variables * Tweedie distribution – The normal distribution is a member of the family of Tweedie exponential dispersion models. * Wrapped normal distribution – the Normal distribution applied to a circular domain * Z-test – using the normal distribution


Notes


References


Citations


Sources

* * In particular, the entries fo
"bell-shaped and bell curve"
an

* * * * * * * * * * * * * * * * * * * * * * * * Translated by Stephen M. Stigler in ''Statistical Science'' 1 (3), 1986: . * * * * * * * * * * * * * * * * * * * * * * * * * * * *


External links

*
Normal distribution calculator
{{Authority control Normal distribution, Continuous distributions Conjugate prior distributions Exponential family distributions Stable distributions Location-scale family probability distributions]">X, ^p \right&= \sigma^p \cdot 2^ \frac _1F_1\left( -\frac, \frac, -\frac \left( \frac \mu \sigma \right)^2 \right). \end These expressions remain valid even if p is not an integer. See also Hermite polynomials#"Negative variance", generalized Hermite polynomials. The expectation of X conditioned on the event that X lies in an interval ,b/math> is given by :\operatorname\left \mid a= \mu - \sigma^2\frac where f and F respectively are the density and the cumulative distribution function of X. For b=\infty this is known as the
inverse Mills ratio In probability theory, the Mills ratio (or Mills's ratio) of a continuous random variable X is the function : m(x) := \frac , where f(x) is the probability density function, and :\bar(x) := \Pr x.html" ;"title=">x">>x= \int_x^ f(u)\, du is the ...
. Note that above, density f of X is used instead of standard normal density as in inverse Mills ratio, so here we have \sigma^2 instead of \sigma.


Fourier transform and characteristic function

The
Fourier transform A Fourier transform (FT) is a mathematical transform that decomposes functions into frequency components, which are represented by the output of the transform as a function of frequency. Most commonly functions of time or space are transformed, ...
of a normal density f with mean \mu and standard deviation \sigma is : \hat f(t) = \int_^\infty f(x)e^ \, dx = e^ e^ where i is the
imaginary unit The imaginary unit or unit imaginary number () is a solution to the quadratic equation x^2+1=0. Although there is no real number with this property, can be used to extend the real numbers to what are called complex numbers, using addition an ...
. If the mean \mu=0, the first factor is 1, and the Fourier transform is, apart from a constant factor, a normal density on the
frequency domain In physics, electronics, control systems engineering, and statistics, the frequency domain refers to the analysis of mathematical functions or signals with respect to frequency, rather than time. Put simply, a time-domain graph shows how a signa ...
, with mean 0 and standard deviation 1/\sigma. In particular, the standard normal distribution \varphi is an
eigenfunction In mathematics, an eigenfunction of a linear operator ''D'' defined on some function space is any non-zero function f in that space that, when acted upon by ''D'', is only multiplied by some scaling factor called an eigenvalue. As an equation, th ...
of the Fourier transform. In probability theory, the Fourier transform of the probability distribution of a real-valued random variable X is closely connected to the
characteristic function In mathematics, the term "characteristic function" can refer to any of several distinct concepts: * The indicator function of a subset, that is the function ::\mathbf_A\colon X \to \, :which for a given subset ''A'' of ''X'', has value 1 at points ...
\varphi_X(t) of that variable, which is defined as the
expected value In probability theory, the expected value (also called expectation, expectancy, mathematical expectation, mean, average, or first moment) is a generalization of the weighted average. Informally, the expected value is the arithmetic mean of a l ...
of e^, as a function of the real variable t (the
frequency Frequency is the number of occurrences of a repeating event per unit of time. It is also occasionally referred to as ''temporal frequency'' for clarity, and is distinct from ''angular frequency''. Frequency is measured in hertz (Hz) which is eq ...
parameter of the Fourier transform). This definition can be analytically extended to a complex-value variable t. The relation between both is: :\varphi_X(t) = \hat f(-t)


Moment and cumulant generating functions

The
moment generating function In probability theory and statistics, the moment-generating function of a real-valued random variable is an alternative specification of its probability distribution. Thus, it provides the basis of an alternative route to analytical results compare ...
of a real random variable X is the expected value of e^, as a function of the real parameter t. For a normal distribution with density f, mean \mu and deviation \sigma, the moment generating function exists and is equal to :M(t) = \operatorname ^= \hat f(it) = e^ e^ The
cumulant generating function In probability theory and statistics, the cumulants of a probability distribution are a set of quantities that provide an alternative to the '' moments'' of the distribution. Any two probability distributions whose moments are identical will have ...
is the logarithm of the moment generating function, namely :g(t) = \ln M(t) = \mu t + \tfrac 12 \sigma^2 t^2 Since this is a quadratic polynomial in t, only the first two
cumulant In probability theory and statistics, the cumulants of a probability distribution are a set of quantities that provide an alternative to the '' moments'' of the distribution. Any two probability distributions whose moments are identical will ha ...
s are nonzero, namely the mean \mu and the variance \sigma^2.


Stein operator and class

Within
Stein's method Stein's method is a general method in probability theory to obtain bounds on the distance between two probability distributions with respect to a probability metric. It was introduced by Charles Stein, who first published it in 1972, to obtain ...
the Stein operator and class of a random variable X \sim \mathcal(\mu, \sigma^2) are \mathcalf(x) = \sigma^2 f'(x) - (x-\mu)f(x) and \mathcal the class of all absolutely continuous functions f : \R \to \R \mbox\mathbb[, f'(X), ]< \infty.


Zero-variance limit

In the limit (mathematics), limit when \sigma tends to zero, the probability density f(x) eventually tends to zero at any x\ne \mu, but grows without limit if x = \mu, while its integral remains equal to 1. Therefore, the normal distribution cannot be defined as an ordinary
function Function or functionality may refer to: Computing * Function key, a type of key on computer keyboards * Function model, a structured representation of processes in a system * Function object or functor or functionoid, a concept of object-oriente ...
when \sigma = 0. However, one can define the normal distribution with zero variance as a
generalized function In mathematics, generalized functions are objects extending the notion of functions. There is more than one recognized theory, for example the theory of distributions. Generalized functions are especially useful in making discontinuous functions ...
; specifically, as Dirac's "delta function" \delta translated by the mean \mu, that is f(x)=\delta(x-\mu). Its CDF is then the
Heaviside step function The Heaviside step function, or the unit step function, usually denoted by or (but sometimes , or ), is a step function, named after Oliver Heaviside (1850–1925), the value of which is zero for negative arguments and one for positive argume ...
translated by the mean \mu, namely :F(x) = \begin 0 & \textx < \mu \\ 1 & \textx \geq \mu \end


Maximum entropy

Of all probability distributions over the reals with a specified mean \mu and variance \sigma^2, the normal distribution N(\mu,\sigma^2) is the one with maximum entropy. If X is a
continuous random variable In probability theory and statistics, a probability distribution is the mathematical function that gives the probabilities of occurrence of different possible outcomes for an experiment. It is a mathematical description of a random phenomenon i ...
with
probability density In probability theory, a probability density function (PDF), or density of a continuous random variable, is a function whose value at any given sample (or point) in the sample space (the set of possible values taken by the random variable) can ...
f(x), then the entropy of X is defined as : H(X) = - \int_^\infty f(x)\log f(x)\, dx where f(x)\log f(x) is understood to be zero whenever f(x)=0. This functional can be maximized, subject to the constraints that the distribution is properly normalized and has a specified variance, by using
variational calculus The calculus of variations (or Variational Calculus) is a field of mathematical analysis that uses variations, which are small changes in functions and functionals, to find maxima and minima of functionals: mappings from a set of functions t ...
. A function with two
Lagrange multipliers In mathematical optimization, the method of Lagrange multipliers is a strategy for finding the local maxima and minima of a function subject to equality constraints (i.e., subject to the condition that one or more equations have to be satisfied ex ...
is defined: : L=\int_^\infty f(x)\ln(f(x))\,dx-\lambda_0\left(1-\int_^\infty f(x)\,dx\right)-\lambda\left(\sigma^2-\int_^\infty f(x)(x-\mu)^2\,dx\right) where f(x) is, for now, regarded as some density function with mean \mu and standard deviation \sigma. At maximum entropy, a small variation \delta f(x) about f(x) will produce a variation \delta L about L which is equal to 0: : 0=\delta L=\int_^\infty \delta f(x)\left (\ln(f(x))+1+\lambda_0+\lambda(x-\mu)^2\right )\,dx Since this must hold for any small \delta f(x), the term in brackets must be zero, and solving for f(x) yields: :f(x)=e^ Using the constraint equations to solve for \lambda_0 and \lambda yields the density of the normal distribution: : f(x, \mu, \sigma)=\frace^ The entropy of a normal distribution is equal to : H(X)=\tfrac(1+\log(2\sigma^2\pi))


Other properties


Related distributions


Central limit theorem

The central limit theorem states that under certain (fairly common) conditions, the sum of many random variables will have an approximately normal distribution. More specifically, where X_1,\ldots ,X_n are
independent and identically distributed In probability theory and statistics, a collection of random variables is independent and identically distributed if each random variable has the same probability distribution as the others and all are mutually independent. This property is usua ...
random variables with the same arbitrary distribution, zero mean, and variance \sigma^2 and Z is their mean scaled by \sqrt : Z = \sqrt\left(\frac\sum_^n X_i\right) Then, as n increases, the probability distribution of Z will tend to the normal distribution with zero mean and variance \sigma^2. The theorem can be extended to variables (X_i) that are not independent and/or not identically distributed if certain constraints are placed on the degree of dependence and the moments of the distributions. Many
test statistic A test statistic is a statistic (a quantity derived from the sample) used in statistical hypothesis testing.Berger, R. L.; Casella, G. (2001). ''Statistical Inference'', Duxbury Press, Second Edition (p.374) A hypothesis test is typically specif ...
s, scores, and
estimator In statistics, an estimator is a rule for calculating an estimate of a given quantity based on observed data: thus the rule (the estimator), the quantity of interest (the estimand) and its result (the estimate) are distinguished. For example, the ...
s encountered in practice contain sums of certain random variables in 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 distributions. The central limit theorem also implies that certain distributions can be approximated by the normal distribution, for example: * The
binomial distribution In probability theory and statistics, the binomial distribution with parameters ''n'' and ''p'' is the discrete probability distribution of the number of successes in a sequence of ''n'' independent experiments, each asking a yes–no quest ...
B(n,p) is approximately normal with mean np and variance np(1-p) for large n and for p not too close to 0 or 1. * The
Poisson distribution In probability theory and statistics, the Poisson distribution is a discrete probability distribution that expresses the probability of a given number of events occurring in a fixed interval of time or space if these events occur with a known co ...
with parameter \lambda is approximately normal with mean \lambda and variance \lambda, for large values of \lambda. * The
chi-squared distribution In probability theory and statistics, the chi-squared distribution (also chi-square or \chi^2-distribution) with k degrees of freedom is the distribution of a sum of the squares of k independent standard normal random variables. The chi-squa ...
\chi^2(k) is approximately normal with mean k and variance 2k, for large k. * The
Student's t-distribution In probability and statistics, Student's ''t''-distribution (or simply the ''t''-distribution) is any member of a family of continuous probability distributions that arise when estimating the mean of a normally distributed population in sit ...
t(\nu) is approximately normal with mean 0 and variance 1 when \nu is large. Whether these approximations are sufficiently accurate depends on the purpose for which they are needed, and the rate of convergence to the normal distribution. It is typically the case that such approximations are less accurate in the tails of the distribution. A general upper bound for the approximation error in the central limit theorem is given by the
Berry–Esseen theorem In probability theory, the central limit theorem states that, under certain circumstances, the probability distribution of the scaled mean of a random sample converges to a normal distribution as the sample size increases to infinity. Under strong ...
, improvements of the approximation are given by the
Edgeworth expansion The Gram–Charlier A series (named in honor of Jørgen Pedersen Gram and Carl Charlier), and the Edgeworth series (named in honor of Francis Ysidro Edgeworth) are series that approximate a probability distribution in terms of its cumulants. The se ...
s. This theorem can also be used to justify modeling the sum of many uniform noise sources as
Gaussian noise Gaussian noise, named after Carl Friedrich Gauss, is a term from signal processing theory denoting a kind of signal noise that has a probability density function (pdf) equal to that of the normal distribution (which is also known as the Gaussia ...
. See
AWGN Additive white Gaussian noise (AWGN) is a basic noise model used in information theory to mimic the effect of many random processes that occur in nature. The modifiers denote specific characteristics: * ''Additive'' because it is added to any nois ...
.


Operations and functions of normal variables

The
probability density In probability theory, a probability density function (PDF), or density of a continuous random variable, is a function whose value at any given sample (or point) in the sample space (the set of possible values taken by the random variable) can ...
,
cumulative distribution In statistics, the frequency (or absolute frequency) of an event i is the number n_i of times the observation has occurred/recorded in an experiment or study. These frequencies are often depicted graphically or in tabular form. Types The cumul ...
, and inverse cumulative distribution of any function of one or more independent or correlated normal variables can be computed with the numerical method of ray-tracing
Matlab code
. In the following sections we look at some special cases.


Operations on a single normal variable

If X is distributed normally with mean \mu and variance \sigma^2, then * aX+b, for any real numbers a and b, is also normally distributed, with mean a\mu+b and standard deviation , a, \sigma. That is, the family of normal distributions is closed under linear transformations. * The exponential of X is distributed log-normally: . * The absolute value of X has
folded normal distribution The folded normal distribution is a probability distribution related to the normal distribution. Given a normally distributed random variable ''X'' with mean ''μ'' and variance ''σ''2, the random variable ''Y'' = , ''X'', has a folded normal d ...
: . If \mu = 0 this is known as the
half-normal distribution In probability theory and statistics, the half-normal distribution is a special case of the folded normal distribution. Let X follow an ordinary normal distribution, N(0,\sigma^2). Then, Y=, X, follows a half-normal distribution. Thus, the hal ...
. * The absolute value of normalized residuals, , ''X'' − ''μ'', /''σ'', has
chi distribution In probability theory and statistics, the chi distribution is a continuous probability distribution. It is the distribution of the positive square root of the sum of squares of a set of independent random variables each following a standard norm ...
with one degree of freedom: , X - \mu, / \sigma \sim \chi_1. * The square of ''X''/''σ'' has the
noncentral chi-squared distribution In probability theory and statistics, the noncentral chi-squared distribution (or noncentral chi-square distribution, noncentral \chi^2 distribution) is a noncentral generalization of the chi-squared distribution. It often arises in the power a ...
with one degree of freedom: X^2 / \sigma^2 \sim \chi_1^2(\mu^2 / \sigma^2). If \mu = 0, the distribution is called simply chi-squared. * The log likelihood of a normal variable x is simply the log of its
probability density function In probability theory, a probability density function (PDF), or density of a continuous random variable, is a function whose value at any given sample (or point) in the sample space (the set of possible values taken by the random variable) can ...
: \ln p(x)= -\frac \left(\frac \right)^2 -\ln \left(\sigma \sqrt \right) = -\frac z^2 -\ln \left(\sigma \sqrt \right). Since this is a scaled and shifted square of a standard normal variable, it is distributed as a scaled and shifted chi-squared variable. * The distribution of the variable ''X'' restricted to an interval 'a'', ''b''is called the
truncated normal distribution In probability and statistics, the truncated normal distribution is the probability distribution derived from that of a normally distributed random variable by bounding the random variable from either below or above (or both). The truncated no ...
. * (''X'' − ''μ'')−2 has a
Lévy distribution In probability theory and statistics, the Lévy distribution, named after Paul Lévy, is a continuous probability distribution for a non-negative random variable. In spectroscopy, this distribution, with frequency as the dependent variable, is kn ...
with location 0 and scale ''σ''−2.


= Operations on two independent normal variables

= * If X_1 and X_2 are two
independent Independent or Independents may refer to: Arts, entertainment, and media Artist groups * Independents (artist group), a group of modernist painters based in the New Hope, Pennsylvania, area of the United States during the early 1930s * Independ ...
normal random variables, with means \mu_1, \mu_2 and standard deviations \sigma_1, \sigma_2, then their sum X_1 + X_2 will also be normally distributed, roof/sup> with mean \mu_1 + \mu_2 and variance \sigma_1^2 + \sigma_2^2. * In particular, if X and Y are independent normal deviates with zero mean and variance \sigma^2, then X + Y and X - Y are also independent and normally distributed, with zero mean and variance 2\sigma^2. This is a special case of the
polarization identity In linear algebra, a branch of mathematics, the polarization identity is any one of a family of formulas that express the inner product of two vectors in terms of the norm of a normed vector space. If a norm arises from an inner product then t ...
. * If X_1, X_2 are two independent normal deviates with mean \mu and deviation \sigma, and a, b are arbitrary real numbers, then the variable X_3 = \frac + \mu is also normally distributed with mean \mu and deviation \sigma. It follows that the normal distribution is
stable A stable is a building in which livestock, especially horses, are kept. It most commonly means a building that is divided into separate stalls for individual animals and livestock. There are many different types of stables in use today; the ...
(with exponent \alpha=2).


= Operations on two independent standard normal variables

= If X_1 and X_2 are two independent standard normal random variables with mean 0 and variance 1, then * Their sum and difference is distributed normally with mean zero and variance two: X_1 \pm X_2 \sim N(0, 2). * Their product Z = X_1 X_2 follows the
product distribution A product distribution is a probability distribution constructed as the distribution of the product of random variables having two other known distributions. Given two statistically independent random variables ''X'' and ''Y'', the distribution of ...
with density function f_Z(z) = \pi^ K_0(, z, ) where K_0 is the
modified Bessel function of the second kind Bessel functions, first defined by the mathematician Daniel Bernoulli and then generalized by Friedrich Bessel, are canonical solutions of Bessel's differential equation x^2 \frac + x \frac + \left(x^2 - \alpha^2 \right)y = 0 for an arbitrary ...
. This distribution is symmetric around zero, unbounded at z = 0, and has the
characteristic function In mathematics, the term "characteristic function" can refer to any of several distinct concepts: * The indicator function of a subset, that is the function ::\mathbf_A\colon X \to \, :which for a given subset ''A'' of ''X'', has value 1 at points ...
\phi_Z(t) = (1 + t^2)^. * Their ratio follows the standard
Cauchy distribution The Cauchy distribution, named after Augustin Cauchy, is a continuous probability distribution. It is also known, especially among physicists, as the Lorentz distribution (after Hendrik Lorentz), Cauchy–Lorentz distribution, Lorentz(ian) fun ...
: X_1/ X_2 \sim \operatorname(0, 1). * Their Euclidean norm \sqrt has the
Rayleigh distribution In probability theory and statistics, the Rayleigh distribution is a continuous probability distribution for nonnegative-valued random variables. Up to rescaling, it coincides with the chi distribution with two degrees of freedom. The distribut ...
.


Operations on multiple independent normal variables

* Any linear combination of independent normal deviates is a normal deviate. * If X_1, X_2, \ldots, X_n are independent standard normal random variables, then the sum of their squares has the
chi-squared distribution In probability theory and statistics, the chi-squared distribution (also chi-square or \chi^2-distribution) with k degrees of freedom is the distribution of a sum of the squares of k independent standard normal random variables. The chi-squa ...
with n degrees of freedom X_1^2 + \cdots + X_n^2 \sim \chi_n^2. * If X_1, X_2, \ldots, X_n are independent normally distributed random variables with means \mu and variances \sigma^2, then their
sample mean The sample mean (or "empirical mean") and the sample covariance are statistics computed from a Sample (statistics), sample of data on one or more random variables. The sample mean is the average value (or mean, mean value) of a sample (statistic ...
is independent from the sample
standard deviation In statistics, the standard deviation is a measure of the amount of variation or dispersion of a set of values. A low standard deviation indicates that the values tend to be close to the mean (also called the expected value) of the set, while ...
, which can be demonstrated using Basu's theorem or
Cochran's theorem In statistics, Cochran's theorem, devised by William G. Cochran, is a theorem used to justify results relating to the probability distributions of statistics that are used in the analysis of variance. Statement Let ''U''1, ..., ''U'N'' be i.i. ...
. The ratio of these two quantities will have the
Student's t-distribution In probability and statistics, Student's ''t''-distribution (or simply the ''t''-distribution) is any member of a family of continuous probability distributions that arise when estimating the mean of a normally distributed population in sit ...
with n-1 degrees of freedom: t = \frac = \frac \sim t_. * If X_1, X_2, \ldots, X_n, Y_1, Y_2, \ldots, Y_m are independent standard normal random variables, then the ratio of their normalized sums of squares will have the with degrees of freedom: F = \frac \sim F_.


Operations on multiple correlated normal variables

* A
quadratic form In mathematics, a quadratic form is a polynomial with terms all of degree two ("form" is another name for a homogeneous polynomial). For example, :4x^2 + 2xy - 3y^2 is a quadratic form in the variables and . The coefficients usually belong to a ...
of a normal vector, i.e. a quadratic function q = \sum x_i^2 + \sum x_j + c of multiple independent or correlated normal variables, is a generalized chi-square variable.


Operations on the density function

The split normal distribution is most directly defined in terms of joining scaled sections of the density functions of different normal distributions and rescaling the density to integrate to one. The
truncated normal distribution In probability and statistics, the truncated normal distribution is the probability distribution derived from that of a normally distributed random variable by bounding the random variable from either below or above (or both). The truncated no ...
results from rescaling a section of a single density function.


Infinite divisibility and Cramér's theorem

For any positive integer \text, any normal distribution with mean \mu and variance \sigma^2 is the distribution of the sum of \text independent normal deviates, each with mean \frac and variance \frac. This property is called
infinite divisibility Infinite divisibility arises in different ways in philosophy, physics, economics, order theory (a branch of mathematics), and probability theory (also a branch of mathematics). One may speak of infinite divisibility, or the lack thereof, of matter ...
. Conversely, if X_1 and X_2 are independent random variables and their sum X_1+X_2 has a normal distribution, then both X_1 and X_2 must be normal deviates. This result is known as Cramér's decomposition theorem, and is equivalent to saying that the convolution of two distributions is normal if and only if both are normal. Cramér's theorem implies that a linear combination of independent non-Gaussian variables will never have an exactly normal distribution, although it may approach it arbitrarily closely.


Bernstein's theorem

Bernstein's theorem states that if X and Y are independent and X + Y and X - Y are also independent, then both ''X'' and ''Y'' must necessarily have normal distributions. More generally, if X_1, \ldots, X_n are independent random variables, then two distinct linear combinations \sum and \sumwill be independent if and only if all X_k are normal and \sum, where \sigma_k^2 denotes the variance of X_k.


Extensions

The notion of normal distribution, being one of the most important distributions in probability theory, has been extended far beyond the standard framework of the univariate (that is one-dimensional) case (Case 1). All these extensions are also called ''normal'' or ''Gaussian'' laws, so a certain ambiguity in names exists. * The
multivariate normal distribution In probability theory and statistics, the multivariate normal distribution, multivariate Gaussian distribution, or joint normal distribution is a generalization of the one-dimensional (univariate) normal distribution to higher dimensions. One d ...
describes the Gaussian law in the ''k''-dimensional Euclidean space. A vector is multivariate-normally distributed if any linear combination of its components has a (univariate) normal distribution. The variance of ''X'' is a ''k×k'' symmetric positive-definite matrix ''V''. The multivariate normal distribution is a special case of the
elliptical distribution In probability and statistics, an elliptical distribution is any member of a broad family of probability distributions that generalize the multivariate normal distribution. Intuitively, in the simplified two and three dimensional case, the joint di ...
s. As such, its iso-density loci in the ''k'' = 2 case are ellipses and in the case of arbitrary ''k'' are ellipsoids. * Rectified Gaussian distribution a rectified version of normal distribution with all the negative elements reset to 0 * Complex normal distribution deals with the complex normal vectors. A complex vector is said to be normal if both its real and imaginary components jointly possess a 2''k''-dimensional multivariate normal distribution. The variance-covariance structure of ''X'' is described by two matrices: the ''variance'' matrix Γ, and the ''relation'' matrix ''C''. * Matrix normal distribution describes the case of normally distributed matrices. * Gaussian processes are the normally distributed stochastic processes. These can be viewed as elements of some infinite-dimensional Hilbert space ''H'', and thus are the analogues of multivariate normal vectors for the case . A random element is said to be normal if for any constant the scalar product has a (univariate) normal distribution. The variance structure of such Gaussian random element can be described in terms of the linear ''covariance ''. Several Gaussian processes became popular enough to have their own names: ** Wiener process, Brownian motion, ** Brownian bridge, ** Ornstein–Uhlenbeck process. * Gaussian q-distribution is an abstract mathematical construction that represents a "q-analogue" of the normal distribution. * the q-Gaussian is an analogue of the Gaussian distribution, in the sense that it maximises the Tsallis entropy, and is one type of Tsallis distribution. Note that this distribution is different from the Gaussian q-distribution above. * The Kaniadakis Gaussian distribution, Kaniadakis ''κ''-Gaussian distribution is a generalization of the Gaussian distribution which arises from the Kaniadakis statistics, being one of the Kaniadakis distribution, Kaniadakis distributions. A random variable ''X'' has a two-piece normal distribution if it has a distribution : f_X( x ) = N( \mu, \sigma_1^2 ) \text x \le \mu : f_X( x ) = N( \mu, \sigma_2^2 ) \text x \ge \mu where ''μ'' is the mean and ''σ''1 and ''σ''2 are the standard deviations of the distribution to the left and right of the mean respectively. The mean, variance and third central moment of this distribution have been determined : \operatorname( X ) = \mu + \sqrt ( \sigma_2 - \sigma_1 ) : \operatorname( X ) = \left( 1 - \frac 2 \pi\right)( \sigma_2 - \sigma_1 )^2 + \sigma_1 \sigma_2 : \operatorname( X ) = \sqrt( \sigma_2 - \sigma_1 ) \left[ \left( \frac 4 \pi - 1 \right) ( \sigma_2 - \sigma_1)^2 + \sigma_1 \sigma_2 \right] where E(''X''), V(''X'') and T(''X'') are the mean, variance, and third central moment respectively. One of the main practical uses of the Gaussian law is to model the empirical distributions of many different random variables encountered in practice. In such case a possible extension would be a richer family of distributions, having more than two parameters and therefore being able to fit the empirical distribution more accurately. The examples of such extensions are: * Pearson distribution — a four-parameter family of probability distributions that extend the normal law to include different skewness and kurtosis values. * The generalized normal distribution, also known as the exponential power distribution, allows for distribution tails with thicker or thinner asymptotic behaviors.


Statistical inference


Estimation of parameters

It is often the case that we do not know the parameters of the normal distribution, but instead want to Estimation theory, estimate them. That is, having a sample (x_1, \ldots, x_n) from a normal N(\mu, \sigma^2) population we would like to learn the approximate values of parameters \mu and \sigma^2. The standard approach to this problem is the maximum likelihood method, which requires maximization of the ''log-likelihood function'': : \ln\mathcal(\mu,\sigma^2) = \sum_^n \ln f(x_i\mid\mu,\sigma^2) = -\frac\ln(2\pi) - \frac\ln\sigma^2 - \frac\sum_^n (x_i-\mu)^2. Taking derivatives with respect to \mu and \sigma^2 and solving the resulting system of first order conditions yields the ''maximum likelihood estimates'': : \hat = \overline \equiv \frac\sum_^n x_i, \qquad \hat^2 = \frac \sum_^n (x_i - \overline)^2.


Sample mean

Estimator \textstyle\hat\mu is called the ''
sample mean The sample mean (or "empirical mean") and the sample covariance are statistics computed from a Sample (statistics), sample of data on one or more random variables. The sample mean is the average value (or mean, mean value) of a sample (statistic ...
'', since it is the arithmetic mean of all observations. The statistic \textstyle\overline is complete statistic, complete and sufficient statistic, sufficient for \mu, and therefore by the Lehmann–Scheffé theorem, \textstyle\hat\mu is the uniformly minimum variance unbiased (UMVU) estimator. In finite samples it is distributed normally: : \hat\mu \sim \mathcal(\mu,\sigma^2/n). The variance of this estimator is equal to the ''μμ''-element of the inverse Fisher information matrix \textstyle\mathcal^. This implies that the estimator is efficient estimator, finite-sample efficient. Of practical importance is the fact that the standard error (statistics), standard error of \textstyle\hat\mu is proportional to \textstyle1/\sqrt, that is, if one wishes to decrease the standard error by a factor of 10, one must increase the number of points in the sample by a factor of 100. This fact is widely used in determining sample sizes for opinion polls and the number of trials in Monte Carlo simulations. From the standpoint of the asymptotic theory (statistics), asymptotic theory, \textstyle\hat\mu is consistent estimator, consistent, that is, it convergence in probability, converges in probability to \mu as n\rightarrow\infty. The estimator is also asymptotic normality, asymptotically normal, which is a simple corollary of the fact that it is normal in finite samples: : \sqrt(\hat\mu-\mu) \,\xrightarrow\, \mathcal(0,\sigma^2).


Sample variance

The estimator \textstyle\hat\sigma^2 is called the ''sample variance'', since it is the variance of the sample ((x_1, \ldots, x_n)). In practice, another estimator is often used instead of the \textstyle\hat\sigma^2. This other estimator is denoted s^2, and is also called the ''sample variance'', which represents a certain ambiguity in terminology; its square root s is called the ''sample standard deviation''. The estimator s^2 differs from \textstyle\hat\sigma^2 by having instead of ''n'' in the denominator (the so-called Bessel's correction): : s^2 = \frac \hat\sigma^2 = \frac \sum_^n (x_i - \overline)^2. The difference between s^2 and \textstyle\hat\sigma^2 becomes negligibly small for large ''n''s. In finite samples however, the motivation behind the use of s^2 is that it is an unbiased estimator of the underlying parameter \sigma^2, whereas \textstyle\hat\sigma^2 is biased. Also, by the Lehmann–Scheffé theorem the estimator s^2 is uniformly minimum variance unbiased (Minimum-variance unbiased estimator, UMVU), which makes it the "best" estimator among all unbiased ones. However it can be shown that the biased estimator \textstyle\hat\sigma^2 is "better" than the s^2 in terms of the mean squared error (MSE) criterion. In finite samples both s^2 and \textstyle\hat\sigma^2 have scaled
chi-squared distribution In probability theory and statistics, the chi-squared distribution (also chi-square or \chi^2-distribution) with k degrees of freedom is the distribution of a sum of the squares of k independent standard normal random variables. The chi-squa ...
with degrees of freedom: : s^2 \sim \frac \cdot \chi^2_, \qquad \hat\sigma^2 \sim \frac \cdot \chi^2_. The first of these expressions shows that the variance of s^2 is equal to 2\sigma^4/(n-1), which is slightly greater than the ''σσ''-element of the inverse Fisher information matrix \textstyle\mathcal^. Thus, s^2 is not an efficient estimator for \sigma^2, and moreover, since s^2 is UMVU, we can conclude that the finite-sample efficient estimator for \sigma^2 does not exist. Applying the asymptotic theory, both estimators s^2 and \textstyle\hat\sigma^2 are consistent, that is they converge in probability to \sigma^2 as the sample size n\rightarrow\infty. The two estimators are also both asymptotically normal: : \sqrt(\hat\sigma^2 - \sigma^2) \simeq \sqrt(s^2-\sigma^2) \,\xrightarrow\, \mathcal(0,2\sigma^4). In particular, both estimators are asymptotically efficient for \sigma^2.


Confidence intervals

By
Cochran's theorem In statistics, Cochran's theorem, devised by William G. Cochran, is a theorem used to justify results relating to the probability distributions of statistics that are used in the analysis of variance. Statement Let ''U''1, ..., ''U'N'' be i.i. ...
, for normal distributions the sample mean \textstyle\hat\mu and the sample variance ''s''2 are
independent Independent or Independents may refer to: Arts, entertainment, and media Artist groups * Independents (artist group), a group of modernist painters based in the New Hope, Pennsylvania, area of the United States during the early 1930s * Independ ...
, which means there can be no gain in considering their joint distribution. There is also a converse theorem: if in a sample the sample mean and sample variance are independent, then the sample must have come from the normal distribution. The independence between \textstyle\hat\mu and ''s'' can be employed to construct the so-called ''t-statistic'': : t = \frac = \frac \sim t_ This quantity ''t'' has the
Student's t-distribution In probability and statistics, Student's ''t''-distribution (or simply the ''t''-distribution) is any member of a family of continuous probability distributions that arise when estimating the mean of a normally distributed population in sit ...
with degrees of freedom, and it is an ancillary statistic (independent of the value of the parameters). Inverting the distribution of this ''t''-statistics will allow us to construct the
confidence interval In frequentist statistics, a confidence interval (CI) is a range of estimates for an unknown parameter. A confidence interval is computed at a designated ''confidence level''; the 95% confidence level is most common, but other levels, such as 9 ...
for ''μ''; similarly, inverting the ''χ''2 distribution of the statistic ''s''2 will give us the confidence interval for ''σ''2: :\mu \in \left[ \hat\mu - t_ \fracs, \hat\mu + t_ \fracs \right], :\sigma^2 \in \left[ \frac, \frac \right], where ''tk,p'' and are the ''p''th
quantile In statistics and probability, quantiles are cut points dividing the range of a probability distribution into continuous intervals with equal probabilities, or dividing the observations in a sample in the same way. There is one fewer quantile tha ...
s of the ''t''- and ''χ''2-distributions respectively. These confidence intervals are of the ''confidence level'' , meaning that the true values ''μ'' and ''σ''2 fall outside of these intervals with probability (or significance level) ''α''. In practice people usually take , resulting in the 95% confidence intervals. Approximate formulas can be derived from the asymptotic distributions of \textstyle\hat\mu and ''s''2: :\mu \in \left[ \hat\mu - , z_, \fracs, \hat\mu + , z_, \fracs \right], :\sigma^2 \in \left[ s^2 - , z_, \fracs^2, s^2 + , z_, \fracs^2 \right], The approximate formulas become valid for large values of ''n'', and are more convenient for the manual calculation since the standard normal quantiles ''z''''α''/2 do not depend on ''n''. In particular, the most popular value of , results in .


Normality tests

Normality tests assess the likelihood that the given data set comes from a normal distribution. Typically the null hypothesis ''H''0 is that the observations are distributed normally with unspecified mean ''μ'' and variance ''σ''2, versus the alternative ''Ha'' that the distribution is arbitrary. Many tests (over 40) have been devised for this problem. The more prominent of them are outlined below: Diagnostic plots are more intuitively appealing but subjective at the same time, as they rely on informal human judgement to accept or reject the null hypothesis. *
Q–Q plot In statistics, a Q–Q plot (quantile-quantile plot) is a probability plot, a List of graphical methods, graphical method for comparing two probability distributions by plotting their ''quantiles'' against each other. A point on the plot co ...
, also known as normal probability plot or rankit plot—is a plot of the sorted values from the data set against the expected values of the corresponding quantiles from the standard normal distribution. That is, it's a plot of point of the form (Φ−1(''pk''), ''x''(''k'')), where plotting points ''pk'' are equal to ''pk'' = (''k'' − ''α'')/(''n'' + 1 − 2''α'') and ''α'' is an adjustment constant, which can be anything between 0 and 1. If the null hypothesis is true, the plotted points should approximately lie on a straight line. * P–P plot – similar to the Q–Q plot, but used much less frequently. This method consists of plotting the points (Φ(''z''(''k'')), ''pk''), where \textstyle z_ = (x_-\hat\mu)/\hat\sigma. For normally distributed data this plot should lie on a 45° line between (0, 0) and (1, 1). Goodness-of-fit tests: ''Moment-based tests'': * D'Agostino's K-squared test * Jarque–Bera test * Shapiro–Wilk test: This is based on the fact that the line in the Q–Q plot has the slope of ''σ''. The test compares the least squares estimate of that slope with the value of the sample variance, and rejects the null hypothesis if these two quantities differ significantly. ''Tests based on the empirical distribution function'': * Anderson–Darling test * Lilliefors test (an adaptation of the Kolmogorov–Smirnov test)


Bayesian analysis of the normal distribution

Bayesian analysis of normally distributed data is complicated by the many different possibilities that may be considered: * Either the mean, or the variance, or neither, may be considered a fixed quantity. * When the variance is unknown, analysis may be done directly in terms of the variance, or in terms of the
precision Precision, precise or precisely may refer to: Science, and technology, and mathematics Mathematics and computing (general) * Accuracy and precision, measurement deviation from true value and its scatter * Significant figures, the number of digit ...
, the reciprocal of the variance. The reason for expressing the formulas in terms of precision is that the analysis of most cases is simplified. * Both univariate and multivariate normal distribution, multivariate cases need to be considered. * Either conjugate prior, conjugate or improper prior, improper prior distributions may be placed on the unknown variables. * An additional set of cases occurs in Bayesian linear regression, where in the basic model the data is assumed to be normally distributed, and normal priors are placed on the regression coefficients. The resulting analysis is similar to the basic cases of independent identically distributed data. The formulas for the non-linear-regression cases are summarized in the conjugate prior article.


Sum of two quadratics


= Scalar form

= The following auxiliary formula is useful for simplifying the posterior distribution, posterior update equations, which otherwise become fairly tedious. :a(x-y)^2 + b(x-z)^2 = (a + b)\left(x - \frac\right)^2 + \frac(y-z)^2 This equation rewrites the sum of two quadratics in ''x'' by expanding the squares, grouping the terms in ''x'', and completing the square. Note the following about the complex constant factors attached to some of the terms: # The factor \frac has the form of a weighted average of ''y'' and ''z''. # \frac = \frac = (a^ + b^)^. This shows that this factor can be thought of as resulting from a situation where the Multiplicative inverse, reciprocals of quantities ''a'' and ''b'' add directly, so to combine ''a'' and ''b'' themselves, it's necessary to reciprocate, add, and reciprocate the result again to get back into the original units. This is exactly the sort of operation performed by the harmonic mean, so it is not surprising that \frac is one-half the harmonic mean of ''a'' and ''b''.


= Vector form

= A similar formula can be written for the sum of two vector quadratics: If x, y, z are vectors of length ''k'', and A and B are symmetric matrix, symmetric, invertible matrices of size k\times k, then : \begin & (\mathbf-\mathbf)'\mathbf(\mathbf-\mathbf) + (\mathbf-\mathbf)' \mathbf(\mathbf-\mathbf) \\ = & (\mathbf - \mathbf)'(\mathbf+\mathbf)(\mathbf - \mathbf) + (\mathbf - \mathbf)'(\mathbf^ + \mathbf^)^(\mathbf - \mathbf) \end where :\mathbf = (\mathbf + \mathbf)^(\mathbf\mathbf + \mathbf \mathbf) Note that the form x′ A x is called a
quadratic form In mathematics, a quadratic form is a polynomial with terms all of degree two ("form" is another name for a homogeneous polynomial). For example, :4x^2 + 2xy - 3y^2 is a quadratic form in the variables and . The coefficients usually belong to a ...
and is a scalar (mathematics), scalar: :\mathbf'\mathbf\mathbf = \sum_a_ x_i x_j In other words, it sums up all possible combinations of products of pairs of elements from x, with a separate coefficient for each. In addition, since x_i x_j = x_j x_i, only the sum a_ + a_ matters for any off-diagonal elements of A, and there is no loss of generality in assuming that A is symmetric matrix, symmetric. Furthermore, if A is symmetric, then the form \mathbf'\mathbf\mathbf = \mathbf'\mathbf\mathbf.


Sum of differences from the mean

Another useful formula is as follows: \sum_^n (x_i-\mu)^2 = \sum_^n (x_i-\bar)^2 + n(\bar -\mu)^2 where \bar = \frac \sum_^n x_i.


With known variance

For a set of i.i.d. normally distributed data points X of size ''n'' where each individual point ''x'' follows x \sim \mathcal(\mu, \sigma^2) with known
variance In probability theory and statistics, variance is the expectation of the squared deviation of a random variable from its population mean or sample mean. Variance is a measure of dispersion, meaning it is a measure of how far a set of numbers ...
σ2, the conjugate prior distribution is also normally distributed. This can be shown more easily by rewriting the variance as the
precision Precision, precise or precisely may refer to: Science, and technology, and mathematics Mathematics and computing (general) * Accuracy and precision, measurement deviation from true value and its scatter * Significant figures, the number of digit ...
, i.e. using τ = 1/σ2. Then if x \sim \mathcal(\mu, 1/\tau) and \mu \sim \mathcal(\mu_0, 1/\tau_0), we proceed as follows. First, the likelihood function is (using the formula above for the sum of differences from the mean): :\begin p(\mathbf\mid\mu,\tau) &= \prod_^n \sqrt \exp\left(-\frac\tau(x_i-\mu)^2\right) \\ &= \left(\frac\right)^ \exp\left(-\frac\tau \sum_^n (x_i-\mu)^2\right) \\ &= \left(\frac\right)^ \exp\left[-\frac\tau \left(\sum_^n(x_i-\bar)^2 + n(\bar -\mu)^2\right)\right]. \end Then, we proceed as follows: :\begin p(\mu\mid\mathbf) &\propto p(\mathbf\mid\mu) p(\mu) \\ & = \left(\frac\right)^ \exp\left[-\frac\tau \left(\sum_^n(x_i-\bar)^2 + n(\bar -\mu)^2\right)\right] \sqrt \exp\left(-\frac\tau_0(\mu-\mu_0)^2\right) \\ &\propto \exp\left(-\frac\left(\tau\left(\sum_^n(x_i-\bar)^2 + n(\bar -\mu)^2\right) + \tau_0(\mu-\mu_0)^2\right)\right) \\ &\propto \exp\left(-\frac \left(n\tau(\bar-\mu)^2 + \tau_0(\mu-\mu_0)^2 \right)\right) \\ &= \exp\left(-\frac(n\tau + \tau_0)\left(\mu - \dfrac\right)^2 + \frac(\bar - \mu_0)^2\right) \\ &\propto \exp\left(-\frac(n\tau + \tau_0)\left(\mu - \dfrac\right)^2\right) \end In the above derivation, we used the formula above for the sum of two quadratics and eliminated all constant factors not involving ''μ''. The result is the kernel (statistics), kernel of a normal distribution, with mean \frac and precision n\tau + \tau_0, i.e. :p(\mu\mid\mathbf) \sim \mathcal\left(\frac, \frac\right) This can be written as a set of Bayesian update equations for the posterior parameters in terms of the prior parameters: :\begin \tau_0' &= \tau_0 + n\tau \\[5pt] \mu_0' &= \frac \\[5pt] \bar &= \frac\sum_^n x_i \end That is, to combine ''n'' data points with total precision of ''nτ'' (or equivalently, total variance of ''n''/''σ''2) and mean of values \bar, derive a new total precision simply by adding the total precision of the data to the prior total precision, and form a new mean through a ''precision-weighted average'', i.e. a weighted average of the data mean and the prior mean, each weighted by the associated total precision. This makes logical sense if the precision is thought of as indicating the certainty of the observations: In the distribution of the posterior mean, each of the input components is weighted by its certainty, and the certainty of this distribution is the sum of the individual certainties. (For the intuition of this, compare the expression "the whole is (or is not) greater than the sum of its parts". In addition, consider that the knowledge of the posterior comes from a combination of the knowledge of the prior and likelihood, so it makes sense that we are more certain of it than of either of its components.) The above formula reveals why it is more convenient to do Bayesian analysis of conjugate priors for the normal distribution in terms of the precision. The posterior precision is simply the sum of the prior and likelihood precisions, and the posterior mean is computed through a precision-weighted average, as described above. The same formulas can be written in terms of variance by reciprocating all the precisions, yielding the more ugly formulas :\begin ' &= \frac \\[5pt] \mu_0' &= \frac \\[5pt] \bar &= \frac\sum_^n x_i \end


With known mean

For a set of i.i.d. normally distributed data points X of size ''n'' where each individual point ''x'' follows x \sim \mathcal(\mu, \sigma^2) with known mean μ, the conjugate prior of the
variance In probability theory and statistics, variance is the expectation of the squared deviation of a random variable from its population mean or sample mean. Variance is a measure of dispersion, meaning it is a measure of how far a set of numbers ...
has an inverse gamma distribution or a scaled inverse chi-squared distribution. The two are equivalent 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. The prior for σ2 is as follows: :p(\sigma^2\mid\nu_0,\sigma_0^2) = \frac~\frac \propto \frac The likelihood function from above, written in terms of the variance, is: :\begin p(\mathbf\mid\mu,\sigma^2) &= \left(\frac\right)^ \exp\left[-\frac \sum_^n (x_i-\mu)^2\right] \\ &= \left(\frac\right)^ \exp\left[-\frac\right] \end where :S = \sum_^n (x_i-\mu)^2. Then: :\begin p(\sigma^2\mid\mathbf) &\propto p(\mathbf\mid\sigma^2) p(\sigma^2) \\ &= \left(\frac\right)^ \exp\left[-\frac\right] \frac~\frac \\ &\propto \left(\frac\right)^ \frac \exp\left[-\frac + \frac\right] \\ &= \frac \exp\left[-\frac\right] \end The above is also a scaled inverse chi-squared distribution where :\begin \nu_0' &= \nu_0 + n \\ \nu_0'' &= \nu_0 \sigma_0^2 + \sum_^n (x_i-\mu)^2 \end or equivalently :\begin \nu_0' &= \nu_0 + n \\ ' &= \frac \end Reparameterizing in terms of an inverse gamma distribution, the result is: :\begin \alpha' &= \alpha + \frac \\ \beta' &= \beta + \frac \end


With unknown mean and unknown variance

For a set of i.i.d. normally distributed data points X of size ''n'' where each individual point ''x'' follows x \sim \mathcal(\mu, \sigma^2) with unknown mean μ and unknown
variance In probability theory and statistics, variance is the expectation of the squared deviation of a random variable from its population mean or sample mean. Variance is a measure of dispersion, meaning it is a measure of how far a set of numbers ...
σ2, a combined (multivariate) conjugate prior is placed over the mean and variance, consisting of a normal-inverse-gamma distribution. Logically, this originates as follows: # From the analysis of the case with unknown mean but known variance, we see that the update equations involve sufficient statistics computed from the data consisting of the mean of the data points and the total variance of the data points, computed in turn from the known variance divided by the number of data points. # From the analysis of the case with unknown variance but known mean, we see that the update equations involve sufficient statistics over the data consisting of the number of data points and sum of squared deviations. # Keep in mind that the posterior update values serve as the prior distribution when further data is handled. Thus, we should logically think of our priors in terms of the sufficient statistics just described, with the same semantics kept in mind as much as possible. # To handle the case where both mean and variance are unknown, we could place independent priors over the mean and variance, with fixed estimates of the average mean, total variance, number of data points used to compute the variance prior, and sum of squared deviations. Note however that in reality, the total variance of the mean depends on the unknown variance, and the sum of squared deviations that goes into the variance prior (appears to) depend on the unknown mean. In practice, the latter dependence is relatively unimportant: Shifting the actual mean shifts the generated points by an equal amount, and on average the squared deviations will remain the same. This is not the case, however, with the total variance of the mean: As the unknown variance increases, the total variance of the mean will increase proportionately, and we would like to capture this dependence. # This suggests that we create a ''conditional prior'' of the mean on the unknown variance, with a hyperparameter specifying the mean of the pseudo-observations associated with the prior, and another parameter specifying the number of pseudo-observations. This number serves as a scaling parameter on the variance, making it possible to control the overall variance of the mean relative to the actual variance parameter. The prior for the variance also has two hyperparameters, one specifying the sum of squared deviations of the pseudo-observations associated with the prior, and another specifying once again the number of pseudo-observations. Note that each of the priors has a hyperparameter specifying the number of pseudo-observations, and in each case this controls the relative variance of that prior. These are given as two separate hyperparameters so that the variance (aka the confidence) of the two priors can be controlled separately. # This leads immediately to the normal-inverse-gamma distribution, which is the product of the two distributions just defined, with conjugate priors used (an inverse gamma distribution over the variance, and a normal distribution over the mean, ''conditional'' on the variance) and with the same four parameters just defined. The priors are normally defined as follows: :\begin p(\mu\mid\sigma^2; \mu_0, n_0) &\sim \mathcal(\mu_0,\sigma^2/n_0) \\ p(\sigma^2; \nu_0,\sigma_0^2) &\sim I\chi^2(\nu_0,\sigma_0^2) = IG(\nu_0/2, \nu_0\sigma_0^2/2) \end The update equations can be derived, and look as follows: :\begin \bar &= \frac 1 n \sum_^n x_i \\ \mu_0' &= \frac \\ n_0' &= n_0 + n \\ \nu_0' &= \nu_0 + n \\ \nu_0'' &= \nu_0 \sigma_0^2 + \sum_^n (x_i-\bar)^2 + \frac(\mu_0 - \bar)^2 \end The respective numbers of pseudo-observations add the number of actual observations to them. The new mean hyperparameter is once again a weighted average, this time weighted by the relative numbers of observations. Finally, the update for \nu_0'' is similar to the case with known mean, but in this case the sum of squared deviations is taken with respect to the observed data mean rather than the true mean, and as a result a new "interaction term" needs to be added to take care of the additional error source stemming from the deviation between prior and data mean.


Occurrence and applications

The occurrence of normal distribution in practical problems can be loosely classified into four categories: # Exactly normal distributions; # Approximately normal laws, for example when such approximation is justified by the
central limit theorem In probability theory, the central limit theorem (CLT) establishes that, in many situations, when independent random variables are summed up, their properly normalized sum tends toward a normal distribution even if the original variables themselv ...
; and # Distributions modeled as normal – the normal distribution being the distribution with Principle of maximum entropy, maximum entropy for a given mean and variance. # Regression problems – the normal distribution being found after systematic effects have been modeled sufficiently well.


Exact normality

Certain quantities in physics are distributed normally, as was first demonstrated by James Clerk Maxwell. Examples of such quantities are: * Probability density function of a ground state in a quantum harmonic oscillator. * The position of a particle that experiences diffusion. If initially the particle is located at a specific point (that is its probability distribution is the Dirac delta function), then after time ''t'' its location is described by a normal distribution with variance ''t'', which satisfies the diffusion equation \frac f(x,t) = \frac \frac f(x,t). If the initial location is given by a certain density function g(x), then the density at time ''t'' is the convolution of ''g'' and the normal PDF.


Approximate normality

''Approximately'' normal distributions occur in many situations, as explained by the
central limit theorem In probability theory, the central limit theorem (CLT) establishes that, in many situations, when independent random variables are summed up, their properly normalized sum tends toward a normal distribution even if the original variables themselv ...
. When the outcome is produced by many small effects acting ''additively and independently'', its distribution will be close to normal. The normal approximation will not be valid if the effects act multiplicatively (instead of additively), or if there is a single external influence that has a considerably larger magnitude than the rest of the effects. * In counting problems, where the central limit theorem includes a discrete-to-continuum approximation and where Infinite divisibility, infinitely divisible and Indecomposable distribution, decomposable distributions are involved, such as ** binomial distribution, Binomial random variables, associated with binary response variables; ** Poisson distribution, Poisson random variables, associated with rare events; * Thermal radiation has a Bose–Einstein statistics, Bose–Einstein distribution on very short time scales, and a normal distribution on longer timescales due to the central limit theorem.


Assumed normality

There are statistical methods to empirically test that assumption; see the above #Normality tests, Normality tests section. * In biology, the ''logarithm'' of various variables tend to have a normal distribution, that is, they tend to have a
log-normal distribution In probability theory, a log-normal (or lognormal) distribution is a continuous probability distribution of a random variable whose logarithm is normally distributed. Thus, if the random variable is log-normally distributed, then has a normal ...
(after separation on male/female subpopulations), with examples including: ** Measures of size of living tissue (length, height, skin area, weight); ** The ''length'' of ''inert'' appendages (hair, claws, nails, teeth) of biological specimens, ''in the direction of growth''; presumably the thickness of tree bark also falls under this category; ** Certain physiological measurements, such as blood pressure of adult humans. * In finance, in particular the Black–Scholes model, changes in the ''logarithm'' of exchange rates, price indices, and stock market indices are assumed normal (these variables behave like compound interest, not like simple interest, and so are multiplicative). Some mathematicians such as Benoit Mandelbrot have argued that Levy skew alpha-stable distribution, log-Levy distributions, which possesses heavy tails would be a more appropriate model, in particular for the analysis for stock market crashes. The use of the assumption of normal distribution occurring in financial models has also been criticized by Nassim Nicholas Taleb in his works. * Propagation of uncertainty, Measurement errors in physical experiments are often modeled by a normal distribution. This use of a normal distribution does not imply that one is assuming the measurement errors are normally distributed, rather using the normal distribution produces the most conservative predictions possible given only knowledge about the mean and variance of the errors. * In Standardized testing (statistics), standardized testing, results can be made to have a normal distribution by either selecting the number and difficulty of questions (as in the Intelligence quotient, IQ test) or transforming the raw test scores into "output" scores by fitting them to the normal distribution. For example, the SAT's traditional range of 200–800 is based on a normal distribution with a mean of 500 and a standard deviation of 100. * Many scores are derived from the normal distribution, including percentile ranks ("percentiles" or "quantiles"), normal curve equivalents, stanines, Standard score, z-scores, and T-scores. Additionally, some behavioral statistical procedures assume that scores are normally distributed; for example, Student's t-test, t-tests and Analysis of variance, ANOVAs. Bell curve grading assigns relative grades based on a normal distribution of scores. * In hydrology the distribution of long duration river discharge or rainfall, e.g. monthly and yearly totals, is often thought to be practically normal according to the
central limit theorem In probability theory, the central limit theorem (CLT) establishes that, in many situations, when independent random variables are summed up, their properly normalized sum tends toward a normal distribution even if the original variables themselv ...
. The blue picture, made with CumFreq, illustrates an example of fitting the normal distribution to ranked October rainfalls showing the 90% confidence belt based on the
binomial distribution In probability theory and statistics, the binomial distribution with parameters ''n'' and ''p'' is the discrete probability distribution of the number of successes in a sequence of ''n'' independent experiments, each asking a yes–no quest ...
. The rainfall data are represented by plotting positions as part of the cumulative frequency analysis.


Methodological problems and peer review

John Ioannidis argues that using normally distributed standard deviations as standards for validating research findings leave falsifiability, falsifiable predictions about phenomena that are not normally distributed untested. This includes, for example, phenomena that only appear when all necessary conditions are present and one cannot be a substitute for another in an addition-like way and phenomena that are not randomly distributed. Ioannidis argues that standard deviation-centered validation gives a false appearance of validity to hypotheses and theories where some but not all falsifiable predictions are normally distributed since the portion of falsifiable predictions that there is evidence against may and in some cases are in the non-normally distributed parts of the range of falsifiable predictions, as well as baselessly dismissing hypotheses for which none of the falsifiable predictions are normally distributed as if were they unfalsifiable when in fact they do make falsifiable predictions. It is argued by Ioannidis that many cases of mutually exclusive theories being accepted as "validated" by research journals are caused by failure of the journals to take in empirical falsifications of non-normally distributed predictions, and not because mutually exclusive theories are true, which they cannot be, although two mutually exclusive theories can both be wrong and a third one correct.


Computational methods


Generating values from normal distribution

In computer simulations, especially in applications of the Monte-Carlo method, it is often desirable to generate values that are normally distributed. The algorithms listed below all generate the standard normal deviates, since a can be generated as , where ''Z'' is standard normal. All these algorithms rely on the availability of a random number generator ''U'' capable of producing Uniform distribution (continuous), uniform random variates. * The most straightforward method is based on the probability integral transform property: if ''U'' is distributed uniformly on (0,1), then Φ−1(''U'') will have the standard normal distribution. The drawback of this method is that it relies on calculation of the
probit function In probability theory and statistics, the probit function is the quantile function associated with the standard normal distribution. It has applications in data analysis and machine learning, in particular exploratory statistical graphics and ...
Φ−1, which cannot be done analytically. Some approximate methods are described in and in the error function, erf article. Wichura gives a fast algorithm for computing this function to 16 decimal places, which is used by R programming language, R to compute random variates of the normal distribution. * Irwin–Hall distribution#Approximating a Normal distribution, An easy-to-program approximate approach that relies on the
central limit theorem In probability theory, the central limit theorem (CLT) establishes that, in many situations, when independent random variables are summed up, their properly normalized sum tends toward a normal distribution even if the original variables themselv ...
is as follows: generate 12 uniform ''U''(0,1) deviates, add them all up, and subtract 6 – the resulting random variable will have approximately standard normal distribution. In truth, the distribution will be Irwin–Hall distribution, Irwin–Hall, which is a 12-section eleventh-order polynomial approximation to the normal distribution. This random deviate will have a limited range of (−6, 6). Note that in a true normal distribution, only 0.00034% of all samples will fall outside ±6σ. * The Box–Muller transform, Box–Muller method uses two independent random numbers ''U'' and ''V'' distributed uniform distribution (continuous), uniformly on (0,1). Then the two random variables ''X'' and ''Y'' X = \sqrt \, \cos(2 \pi V) , \qquad Y = \sqrt \, \sin(2 \pi V) . will both have the standard normal distribution, and will be
independent Independent or Independents may refer to: Arts, entertainment, and media Artist groups * Independents (artist group), a group of modernist painters based in the New Hope, Pennsylvania, area of the United States during the early 1930s * Independ ...
. This formulation arises because for a bivariate normal random vector (''X'', ''Y'') the squared norm will have the
chi-squared distribution In probability theory and statistics, the chi-squared distribution (also chi-square or \chi^2-distribution) with k degrees of freedom is the distribution of a sum of the squares of k independent standard normal random variables. The chi-squa ...
with two degrees of freedom, which is an easily generated exponential distribution, exponential random variable corresponding to the quantity −2ln(''U'') in these equations; and the angle is distributed uniformly around the circle, chosen by the random variable ''V''. * The Marsaglia polar method is a modification of the Box–Muller method which does not require computation of the sine and cosine functions. In this method, ''U'' and ''V'' are drawn from the uniform (−1,1) distribution, and then is computed. If ''S'' is greater or equal to 1, then the method starts over, otherwise the two quantities X = U\sqrt, \qquad Y = V\sqrt are returned. Again, ''X'' and ''Y'' are independent, standard normal random variables. * The Ratio method is a rejection method. The algorithm proceeds as follows: ** Generate two independent uniform deviates ''U'' and ''V''; ** Compute ''X'' = (''V'' − 0.5)/''U''; ** Optional: if ''X''2 ≤ 5 − 4''e''1/4''U'' then accept ''X'' and terminate algorithm; ** Optional: if ''X''2 ≥ 4''e''−1.35/''U'' + 1.4 then reject ''X'' and start over from step 1; ** If ''X''2 ≤ −4 ln''U'' then accept ''X'', otherwise start over the algorithm. *:The two optional steps allow the evaluation of the logarithm in the last step to be avoided in most cases. These steps can be greatly improved so that the logarithm is rarely evaluated. * The ziggurat algorithm is faster than the Box–Muller transform and still exact. In about 97% of all cases it uses only two random numbers, one random integer and one random uniform, one multiplication and an if-test. Only in 3% of the cases, where the combination of those two falls outside the "core of the ziggurat" (a kind of rejection sampling using logarithms), do exponentials and more uniform random numbers have to be employed. * Integer arithmetic can be used to sample from the standard normal distribution. This method is exact in the sense that it satisfies the conditions of ''ideal approximation''; i.e., it is equivalent to sampling a real number from the standard normal distribution and rounding this to the nearest representable floating point number. * There is also some investigation into the connection between the fast Hadamard transform and the normal distribution, since the transform employs just addition and subtraction and by the central limit theorem random numbers from almost any distribution will be transformed into the normal distribution. In this regard a series of Hadamard transforms can be combined with random permutations to turn arbitrary data sets into a normally distributed data.


Numerical approximations for the normal CDF and normal quantile function

The standard normal cumulative distribution function, CDF is widely used in scientific and statistical computing. The values Φ(''x'') may be approximated very accurately by a variety of methods, such as numerical integration, Taylor series, asymptotic series and Gauss's continued fraction#Of Kummer's confluent hypergeometric function, continued fractions. Different approximations are used depending on the desired level of accuracy. * give the approximation for Φ(''x'') for ''x > 0'' with the absolute error (algorith
26.2.17
: \Phi(x) = 1 - \varphi(x)\left(b_1 t + b_2 t^2 + b_3t^3 + b_4 t^4 + b_5 t^5\right) + \varepsilon(x), \qquad t = \frac, where ''ϕ''(''x'') is the standard normal PDF, and ''b''0 = 0.2316419, ''b''1 = 0.319381530, ''b''2 = −0.356563782, ''b''3 = 1.781477937, ''b''4 = −1.821255978, ''b''5 = 1.330274429. * lists some dozens of approximations – by means of rational functions, with or without exponentials – for the function. His algorithms vary in the degree of complexity and the resulting precision, with maximum absolute precision of 24 digits. An algorithm by combines Hart's algorithm 5666 with a continued fraction approximation in the tail to provide a fast computation algorithm with a 16-digit precision. * after recalling Hart68 solution is not suited for erf, gives a solution for both erf and erfc, with maximal relative error bound, via rational function, Rational Chebyshev Approximation. * suggested a simple algorithm based on the Taylor series expansion \Phi(x) = \frac12 + \varphi(x)\left( x + \frac 3 + \frac + \frac + \frac + \cdots \right) for calculating with arbitrary precision. The drawback of this algorithm is comparatively slow calculation time (for example it takes over 300 iterations to calculate the function with 16 digits of precision when ). * The GNU Scientific Library calculates values of the standard normal CDF using Hart's algorithms and approximations with Chebyshev polynomials. Shore (1982) introduced simple approximations that may be incorporated in stochastic optimization models of engineering and operations research, like reliability engineering and inventory analysis. Denoting , the simplest approximation for the quantile function is: z = \Phi^(p)=5.5556\left[1- \left( \frac p \right)^\right],\qquad p\ge 1/2 This approximation delivers for ''z'' a maximum absolute error of 0.026 (for , corresponding to ). For replace ''p'' by and change sign. Another approximation, somewhat less accurate, is the single-parameter approximation: z=-0.4115\left\, \qquad p\ge 1/2 The latter had served to derive a simple approximation for the loss integral of the normal distribution, defined by \begin L(z) & =\int_z^\infty (u-z)\varphi(u) \, du=\int_z^\infty [1-\Phi (u)] \, du \\[5pt] L(z) & \approx \begin 0.4115\left(\dfrac p \right) - z, & p<1/2, \\ \\ 0.4115\left( \dfrac p \right), & p\ge 1/2. \end \\[5pt] \text \\ L(z) & \approx \begin 0.4115\left\, & p < 1/2, \\ \\ 0.4115 \dfrac p, & p\ge 1/2. \end \end This approximation is particularly accurate for the right far-tail (maximum error of 10−3 for z≥1.4). Highly accurate approximations for the CDF, based on Response modeling methodology, Response Modeling Methodology (RMM, Shore, 2011, 2012), are shown in Shore (2005). Some more approximations can be found at: Error function#Approximation with elementary functions. In particular, small ''relative'' error on the whole domain for the CDF \Phi and the quantile function \Phi^ as well, is achieved via an explicitly invertible formula by Sergei Winitzki in 2008.


History


Development

Some authors attribute the credit for the discovery of the normal distribution to Abraham de Moivre, de Moivre, who in 1738 published in the second edition of his "''The Doctrine of Chances''" the study of the coefficients in the binomial expansion of . De Moivre proved that the middle term in this expansion has the approximate magnitude of 2^n/\sqrt, and that "If ''m'' or ''n'' be a Quantity infinitely great, then the Logarithm of the Ratio, which a Term distant from the middle by the Interval ''ℓ'', has to the middle Term, is -\frac." Although this theorem can be interpreted as the first obscure expression for the normal probability law, Stephen Stigler, Stigler points out that de Moivre himself did not interpret his results as anything more than the approximate rule for the binomial coefficients, and in particular de Moivre lacked the concept of the probability density function. In 1823 Carl Friedrich Gauss, Gauss published his monograph "''Theoria combinationis observationum erroribus minimis obnoxiae''" where among other things he introduces several important statistical concepts, such as the method of least squares, the method of maximum likelihood, and the ''normal distribution''. Gauss used ''M'', , to denote the measurements of some unknown quantity ''V'', and sought the "most probable" estimator of that quantity: the one that maximizes the probability of obtaining the observed experimental results. In his notation φΔ is the probability density function of the measurement errors of magnitude Δ. Not knowing what the function ''φ'' is, Gauss requires that his method should reduce to the well-known answer: the arithmetic mean of the measured values. Starting from these principles, Gauss demonstrates that the only law that rationalizes the choice of arithmetic mean as an estimator of the location parameter, is the normal law of errors: \varphi\mathit = \frac h \, e^, where ''h'' is "the measure of the precision of the observations". Using this normal law as a generic model for errors in the experiments, Gauss formulates what is now known as the non-linear least squares, non-linear weighted least squares method. Although Gauss was the first to suggest the normal distribution law, Pierre Simon de Laplace, Laplace made significant contributions. It was Laplace who first posed the problem of aggregating several observations in 1774, although his own solution led to the Laplacian distribution. It was Laplace who first calculated the value of the Gaussian integral, integral in 1782, providing the normalization constant for the normal distribution. Finally, it was Laplace who in 1810 proved and presented to the Academy the fundamental
central limit theorem In probability theory, the central limit theorem (CLT) establishes that, in many situations, when independent random variables are summed up, their properly normalized sum tends toward a normal distribution even if the original variables themselv ...
, which emphasized the theoretical importance of the normal distribution. It is of interest to note that in 1809 an Irish-American mathematician Robert Adrain published two insightful but flawed derivations of the normal probability law, simultaneously and independently from Gauss. His works remained largely unnoticed by the scientific community, until in 1871 they were exhumed by Cleveland Abbe, Abbe. In the middle of the 19th century James Clerk Maxwell, Maxwell demonstrated that the normal distribution is not just a convenient mathematical tool, but may also occur in natural phenomena: "The number of particles whose velocity, resolved in a certain direction, lies between ''x'' and ''x'' + ''dx'' is \operatorname \frac\; e^ \, dx


Naming

Today, the concept is usually known in English as the normal distribution or Gaussian distribution. Other less common names include Gauss distribution, Laplace-Gauss distribution, the law of error, the law of facility of errors, Laplace's second law, Gaussian law. Gauss himself apparently coined the term with reference to the "normal equations" involved in its applications, with normal having its technical meaning of orthogonal rather than "usual". However, by the end of the 19th century some authors had started using the name ''normal distribution'', where the word "normal" was used as an adjective – the term now being seen as a reflection of the fact that this distribution was seen as typical, common – and thus "normal". Charles Sanders Peirce, Peirce (one of those authors) once defined "normal" thus: "...the 'normal' is not the average (or any other kind of mean) of what actually occurs, but of what ''would'', in the long run, occur under certain circumstances." Around the turn of the 20th century Karl Pearson, Pearson popularized the term ''normal'' as a designation for this distribution. Also, it was Pearson who first wrote the distribution in terms of the standard deviation ''σ'' as in modern notation. Soon after this, in year 1915, Ronald Fisher, Fisher added the location parameter to the formula for normal distribution, expressing it in the way it is written nowadays: df = \frac e^ \, dx. The term "standard normal", which denotes the normal distribution with zero mean and unit variance came into general use around the 1950s, appearing in the popular textbooks by P. G. Hoel (1947) "''Introduction to mathematical statistics''" and A. M. Mood (1950) "''Introduction to the theory of statistics''".


See also

* Bates distribution – similar to the Irwin–Hall distribution, but rescaled back into the 0 to 1 range * Behrens–Fisher problem – the long-standing problem of testing whether two normal samples with different variances have same means; * Bhattacharyya distance – method used to separate mixtures of normal distributions * Erdős–Kac theorem – on the occurrence of the normal distribution in number theory * Full width at half maximum * Gaussian blur – convolution, which uses the normal distribution as a kernel * Modified half-normal distribution with the pdf on (0, \infty) is given as f(x)= \frac, where \Psi(\alpha,z)=_1\Psi_1\left(\begin\left(\alpha,\frac\right)\\(1,0)\end;z \right) denotes the Fox-Wright Psi function. * Normally distributed and uncorrelated does not imply independent * Ratio normal distribution * Reciprocal normal distribution * Standard normal table * Stein's lemma * Sub-Gaussian distribution * Sum of normally distributed random variables * Tweedie distribution – The normal distribution is a member of the family of Tweedie exponential dispersion models. * Wrapped normal distribution – the Normal distribution applied to a circular domain * Z-test – using the normal distribution


Notes


References


Citations


Sources

* * In particular, the entries fo
"bell-shaped and bell curve"
an

* * * * * * * * * * * * * * * * * * * * * * * * Translated by Stephen M. Stigler in ''Statistical Science'' 1 (3), 1986: . * * * * * * * * * * * * * * * * * * * * * * * * * * * *


External links

*
Normal distribution calculator
{{Authority control Normal distribution, Continuous distributions Conjugate prior distributions Exponential family distributions Stable distributions Location-scale family probability distributions]">X - \mu, ^p\right&= \sigma^p (p-1)!! \cdot \begin \sqrt & \textp\text \\ 1 & \textp\text \end \\ &= \sigma^p \cdot \frac. \end The last formula is valid also for any non-integer p>-1. When the mean \mu \ne 0, the plain and absolute moments can be expressed in terms of
confluent hypergeometric function In mathematics, a confluent hypergeometric function is a solution of a confluent hypergeometric equation, which is a degenerate form of a hypergeometric differential equation where two of the three regular singularities merge into an irregular ...
s _1F_1 and U. :\begin \operatorname\left ^p\right&= \sigma^p\cdot (-i\sqrt 2)^p U\left(-\frac, \frac, -\frac \left( \frac \mu \sigma \right)^2 \right), \\ \operatorname\left Hermite polynomials#"Negative variance", generalized Hermite polynomials. The expectation of X conditioned on the event that X lies in an interval ,b/math> is given by :\operatorname\left \mid a= \mu - \sigma^2\frac where f and F respectively are the density and the cumulative distribution function of X. For b=\infty this is known as the
inverse Mills ratio In probability theory, the Mills ratio (or Mills's ratio) of a continuous random variable X is the function : m(x) := \frac , where f(x) is the probability density function, and :\bar(x) := \Pr x.html" ;"title=">x">>x= \int_x^ f(u)\, du is the ...
. Note that above, density f of X is used instead of standard normal density as in inverse Mills ratio, so here we have \sigma^2 instead of \sigma.


Fourier transform and characteristic function

The
Fourier transform A Fourier transform (FT) is a mathematical transform that decomposes functions into frequency components, which are represented by the output of the transform as a function of frequency. Most commonly functions of time or space are transformed, ...
of a normal density f with mean \mu and standard deviation \sigma is : \hat f(t) = \int_^\infty f(x)e^ \, dx = e^ e^ where i is the
imaginary unit The imaginary unit or unit imaginary number () is a solution to the quadratic equation x^2+1=0. Although there is no real number with this property, can be used to extend the real numbers to what are called complex numbers, using addition an ...
. If the mean \mu=0, the first factor is 1, and the Fourier transform is, apart from a constant factor, a normal density on the
frequency domain In physics, electronics, control systems engineering, and statistics, the frequency domain refers to the analysis of mathematical functions or signals with respect to frequency, rather than time. Put simply, a time-domain graph shows how a signa ...
, with mean 0 and standard deviation 1/\sigma. In particular, the standard normal distribution \varphi is an
eigenfunction In mathematics, an eigenfunction of a linear operator ''D'' defined on some function space is any non-zero function f in that space that, when acted upon by ''D'', is only multiplied by some scaling factor called an eigenvalue. As an equation, th ...
of the Fourier transform. In probability theory, the Fourier transform of the probability distribution of a real-valued random variable X is closely connected to the
characteristic function In mathematics, the term "characteristic function" can refer to any of several distinct concepts: * The indicator function of a subset, that is the function ::\mathbf_A\colon X \to \, :which for a given subset ''A'' of ''X'', has value 1 at points ...
\varphi_X(t) of that variable, which is defined as the
expected value In probability theory, the expected value (also called expectation, expectancy, mathematical expectation, mean, average, or first moment) is a generalization of the weighted average. Informally, the expected value is the arithmetic mean of a l ...
of e^, as a function of the real variable t (the
frequency Frequency is the number of occurrences of a repeating event per unit of time. It is also occasionally referred to as ''temporal frequency'' for clarity, and is distinct from ''angular frequency''. Frequency is measured in hertz (Hz) which is eq ...
parameter of the Fourier transform). This definition can be analytically extended to a complex-value variable t. The relation between both is: :\varphi_X(t) = \hat f(-t)


Moment and cumulant generating functions

The
moment generating function In probability theory and statistics, the moment-generating function of a real-valued random variable is an alternative specification of its probability distribution. Thus, it provides the basis of an alternative route to analytical results compare ...
of a real random variable X is the expected value of e^, as a function of the real parameter t. For a normal distribution with density f, mean \mu and deviation \sigma, the moment generating function exists and is equal to :M(t) = \operatorname ^= \hat f(it) = e^ e^ The
cumulant generating function In probability theory and statistics, the cumulants of a probability distribution are a set of quantities that provide an alternative to the '' moments'' of the distribution. Any two probability distributions whose moments are identical will have ...
is the logarithm of the moment generating function, namely :g(t) = \ln M(t) = \mu t + \tfrac 12 \sigma^2 t^2 Since this is a quadratic polynomial in t, only the first two
cumulant In probability theory and statistics, the cumulants of a probability distribution are a set of quantities that provide an alternative to the '' moments'' of the distribution. Any two probability distributions whose moments are identical will ha ...
s are nonzero, namely the mean \mu and the variance \sigma^2.


Stein operator and class

Within
Stein's method Stein's method is a general method in probability theory to obtain bounds on the distance between two probability distributions with respect to a probability metric. It was introduced by Charles Stein, who first published it in 1972, to obtain ...
the Stein operator and class of a random variable X \sim \mathcal(\mu, \sigma^2) are \mathcalf(x) = \sigma^2 f'(x) - (x-\mu)f(x) and \mathcal the class of all absolutely continuous functions f : \R \to \R \mbox\mathbb[, f'(X), ]< \infty.


Zero-variance limit

In the limit (mathematics), limit when \sigma tends to zero, the probability density f(x) eventually tends to zero at any x\ne \mu, but grows without limit if x = \mu, while its integral remains equal to 1. Therefore, the normal distribution cannot be defined as an ordinary
function Function or functionality may refer to: Computing * Function key, a type of key on computer keyboards * Function model, a structured representation of processes in a system * Function object or functor or functionoid, a concept of object-oriente ...
when \sigma = 0. However, one can define the normal distribution with zero variance as a
generalized function In mathematics, generalized functions are objects extending the notion of functions. There is more than one recognized theory, for example the theory of distributions. Generalized functions are especially useful in making discontinuous functions ...
; specifically, as Dirac's "delta function" \delta translated by the mean \mu, that is f(x)=\delta(x-\mu). Its CDF is then the
Heaviside step function The Heaviside step function, or the unit step function, usually denoted by or (but sometimes , or ), is a step function, named after Oliver Heaviside (1850–1925), the value of which is zero for negative arguments and one for positive argume ...
translated by the mean \mu, namely :F(x) = \begin 0 & \textx < \mu \\ 1 & \textx \geq \mu \end


Maximum entropy

Of all probability distributions over the reals with a specified mean \mu and variance \sigma^2, the normal distribution N(\mu,\sigma^2) is the one with maximum entropy. If X is a
continuous random variable In probability theory and statistics, a probability distribution is the mathematical function that gives the probabilities of occurrence of different possible outcomes for an experiment. It is a mathematical description of a random phenomenon i ...
with
probability density In probability theory, a probability density function (PDF), or density of a continuous random variable, is a function whose value at any given sample (or point) in the sample space (the set of possible values taken by the random variable) can ...
f(x), then the entropy of X is defined as : H(X) = - \int_^\infty f(x)\log f(x)\, dx where f(x)\log f(x) is understood to be zero whenever f(x)=0. This functional can be maximized, subject to the constraints that the distribution is properly normalized and has a specified variance, by using
variational calculus The calculus of variations (or Variational Calculus) is a field of mathematical analysis that uses variations, which are small changes in functions and functionals, to find maxima and minima of functionals: mappings from a set of functions t ...
. A function with two
Lagrange multipliers In mathematical optimization, the method of Lagrange multipliers is a strategy for finding the local maxima and minima of a function subject to equality constraints (i.e., subject to the condition that one or more equations have to be satisfied ex ...
is defined: : L=\int_^\infty f(x)\ln(f(x))\,dx-\lambda_0\left(1-\int_^\infty f(x)\,dx\right)-\lambda\left(\sigma^2-\int_^\infty f(x)(x-\mu)^2\,dx\right) where f(x) is, for now, regarded as some density function with mean \mu and standard deviation \sigma. At maximum entropy, a small variation \delta f(x) about f(x) will produce a variation \delta L about L which is equal to 0: : 0=\delta L=\int_^\infty \delta f(x)\left (\ln(f(x))+1+\lambda_0+\lambda(x-\mu)^2\right )\,dx Since this must hold for any small \delta f(x), the term in brackets must be zero, and solving for f(x) yields: :f(x)=e^ Using the constraint equations to solve for \lambda_0 and \lambda yields the density of the normal distribution: : f(x, \mu, \sigma)=\frace^ The entropy of a normal distribution is equal to : H(X)=\tfrac(1+\log(2\sigma^2\pi))


Other properties


Related distributions


Central limit theorem

The central limit theorem states that under certain (fairly common) conditions, the sum of many random variables will have an approximately normal distribution. More specifically, where X_1,\ldots ,X_n are
independent and identically distributed In probability theory and statistics, a collection of random variables is independent and identically distributed if each random variable has the same probability distribution as the others and all are mutually independent. This property is usua ...
random variables with the same arbitrary distribution, zero mean, and variance \sigma^2 and Z is their mean scaled by \sqrt : Z = \sqrt\left(\frac\sum_^n X_i\right) Then, as n increases, the probability distribution of Z will tend to the normal distribution with zero mean and variance \sigma^2. The theorem can be extended to variables (X_i) that are not independent and/or not identically distributed if certain constraints are placed on the degree of dependence and the moments of the distributions. Many
test statistic A test statistic is a statistic (a quantity derived from the sample) used in statistical hypothesis testing.Berger, R. L.; Casella, G. (2001). ''Statistical Inference'', Duxbury Press, Second Edition (p.374) A hypothesis test is typically specif ...
s, scores, and
estimator In statistics, an estimator is a rule for calculating an estimate of a given quantity based on observed data: thus the rule (the estimator), the quantity of interest (the estimand) and its result (the estimate) are distinguished. For example, the ...
s encountered in practice contain sums of certain random variables in 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 distributions. The central limit theorem also implies that certain distributions can be approximated by the normal distribution, for example: * The
binomial distribution In probability theory and statistics, the binomial distribution with parameters ''n'' and ''p'' is the discrete probability distribution of the number of successes in a sequence of ''n'' independent experiments, each asking a yes–no quest ...
B(n,p) is approximately normal with mean np and variance np(1-p) for large n and for p not too close to 0 or 1. * The
Poisson distribution In probability theory and statistics, the Poisson distribution is a discrete probability distribution that expresses the probability of a given number of events occurring in a fixed interval of time or space if these events occur with a known co ...
with parameter \lambda is approximately normal with mean \lambda and variance \lambda, for large values of \lambda. * The
chi-squared distribution In probability theory and statistics, the chi-squared distribution (also chi-square or \chi^2-distribution) with k degrees of freedom is the distribution of a sum of the squares of k independent standard normal random variables. The chi-squa ...
\chi^2(k) is approximately normal with mean k and variance 2k, for large k. * The
Student's t-distribution In probability and statistics, Student's ''t''-distribution (or simply the ''t''-distribution) is any member of a family of continuous probability distributions that arise when estimating the mean of a normally distributed population in sit ...
t(\nu) is approximately normal with mean 0 and variance 1 when \nu is large. Whether these approximations are sufficiently accurate depends on the purpose for which they are needed, and the rate of convergence to the normal distribution. It is typically the case that such approximations are less accurate in the tails of the distribution. A general upper bound for the approximation error in the central limit theorem is given by the
Berry–Esseen theorem In probability theory, the central limit theorem states that, under certain circumstances, the probability distribution of the scaled mean of a random sample converges to a normal distribution as the sample size increases to infinity. Under strong ...
, improvements of the approximation are given by the
Edgeworth expansion The Gram–Charlier A series (named in honor of Jørgen Pedersen Gram and Carl Charlier), and the Edgeworth series (named in honor of Francis Ysidro Edgeworth) are series that approximate a probability distribution in terms of its cumulants. The se ...
s. This theorem can also be used to justify modeling the sum of many uniform noise sources as
Gaussian noise Gaussian noise, named after Carl Friedrich Gauss, is a term from signal processing theory denoting a kind of signal noise that has a probability density function (pdf) equal to that of the normal distribution (which is also known as the Gaussia ...
. See
AWGN Additive white Gaussian noise (AWGN) is a basic noise model used in information theory to mimic the effect of many random processes that occur in nature. The modifiers denote specific characteristics: * ''Additive'' because it is added to any nois ...
.


Operations and functions of normal variables

The
probability density In probability theory, a probability density function (PDF), or density of a continuous random variable, is a function whose value at any given sample (or point) in the sample space (the set of possible values taken by the random variable) can ...
,
cumulative distribution In statistics, the frequency (or absolute frequency) of an event i is the number n_i of times the observation has occurred/recorded in an experiment or study. These frequencies are often depicted graphically or in tabular form. Types The cumul ...
, and inverse cumulative distribution of any function of one or more independent or correlated normal variables can be computed with the numerical method of ray-tracing
Matlab code
. In the following sections we look at some special cases.


Operations on a single normal variable

If X is distributed normally with mean \mu and variance \sigma^2, then * aX+b, for any real numbers a and b, is also normally distributed, with mean a\mu+b and standard deviation , a, \sigma. That is, the family of normal distributions is closed under linear transformations. * The exponential of X is distributed log-normally: . * The absolute value of X has
folded normal distribution The folded normal distribution is a probability distribution related to the normal distribution. Given a normally distributed random variable ''X'' with mean ''μ'' and variance ''σ''2, the random variable ''Y'' = , ''X'', has a folded normal d ...
: . If \mu = 0 this is known as the
half-normal distribution In probability theory and statistics, the half-normal distribution is a special case of the folded normal distribution. Let X follow an ordinary normal distribution, N(0,\sigma^2). Then, Y=, X, follows a half-normal distribution. Thus, the hal ...
. * The absolute value of normalized residuals, , ''X'' − ''μ'', /''σ'', has
chi distribution In probability theory and statistics, the chi distribution is a continuous probability distribution. It is the distribution of the positive square root of the sum of squares of a set of independent random variables each following a standard norm ...
with one degree of freedom: , X - \mu, / \sigma \sim \chi_1. * The square of ''X''/''σ'' has the
noncentral chi-squared distribution In probability theory and statistics, the noncentral chi-squared distribution (or noncentral chi-square distribution, noncentral \chi^2 distribution) is a noncentral generalization of the chi-squared distribution. It often arises in the power a ...
with one degree of freedom: X^2 / \sigma^2 \sim \chi_1^2(\mu^2 / \sigma^2). If \mu = 0, the distribution is called simply chi-squared. * The log likelihood of a normal variable x is simply the log of its
probability density function In probability theory, a probability density function (PDF), or density of a continuous random variable, is a function whose value at any given sample (or point) in the sample space (the set of possible values taken by the random variable) can ...
: \ln p(x)= -\frac \left(\frac \right)^2 -\ln \left(\sigma \sqrt \right) = -\frac z^2 -\ln \left(\sigma \sqrt \right). Since this is a scaled and shifted square of a standard normal variable, it is distributed as a scaled and shifted chi-squared variable. * The distribution of the variable ''X'' restricted to an interval 'a'', ''b''is called the
truncated normal distribution In probability and statistics, the truncated normal distribution is the probability distribution derived from that of a normally distributed random variable by bounding the random variable from either below or above (or both). The truncated no ...
. * (''X'' − ''μ'')−2 has a
Lévy distribution In probability theory and statistics, the Lévy distribution, named after Paul Lévy, is a continuous probability distribution for a non-negative random variable. In spectroscopy, this distribution, with frequency as the dependent variable, is kn ...
with location 0 and scale ''σ''−2.


= Operations on two independent normal variables

= * If X_1 and X_2 are two
independent Independent or Independents may refer to: Arts, entertainment, and media Artist groups * Independents (artist group), a group of modernist painters based in the New Hope, Pennsylvania, area of the United States during the early 1930s * Independ ...
normal random variables, with means \mu_1, \mu_2 and standard deviations \sigma_1, \sigma_2, then their sum X_1 + X_2 will also be normally distributed, roof/sup> with mean \mu_1 + \mu_2 and variance \sigma_1^2 + \sigma_2^2. * In particular, if X and Y are independent normal deviates with zero mean and variance \sigma^2, then X + Y and X - Y are also independent and normally distributed, with zero mean and variance 2\sigma^2. This is a special case of the
polarization identity In linear algebra, a branch of mathematics, the polarization identity is any one of a family of formulas that express the inner product of two vectors in terms of the norm of a normed vector space. If a norm arises from an inner product then t ...
. * If X_1, X_2 are two independent normal deviates with mean \mu and deviation \sigma, and a, b are arbitrary real numbers, then the variable X_3 = \frac + \mu is also normally distributed with mean \mu and deviation \sigma. It follows that the normal distribution is
stable A stable is a building in which livestock, especially horses, are kept. It most commonly means a building that is divided into separate stalls for individual animals and livestock. There are many different types of stables in use today; the ...
(with exponent \alpha=2).


= Operations on two independent standard normal variables

= If X_1 and X_2 are two independent standard normal random variables with mean 0 and variance 1, then * Their sum and difference is distributed normally with mean zero and variance two: X_1 \pm X_2 \sim N(0, 2). * Their product Z = X_1 X_2 follows the
product distribution A product distribution is a probability distribution constructed as the distribution of the product of random variables having two other known distributions. Given two statistically independent random variables ''X'' and ''Y'', the distribution of ...
with density function f_Z(z) = \pi^ K_0(, z, ) where K_0 is the
modified Bessel function of the second kind Bessel functions, first defined by the mathematician Daniel Bernoulli and then generalized by Friedrich Bessel, are canonical solutions of Bessel's differential equation x^2 \frac + x \frac + \left(x^2 - \alpha^2 \right)y = 0 for an arbitrary ...
. This distribution is symmetric around zero, unbounded at z = 0, and has the
characteristic function In mathematics, the term "characteristic function" can refer to any of several distinct concepts: * The indicator function of a subset, that is the function ::\mathbf_A\colon X \to \, :which for a given subset ''A'' of ''X'', has value 1 at points ...
\phi_Z(t) = (1 + t^2)^. * Their ratio follows the standard
Cauchy distribution The Cauchy distribution, named after Augustin Cauchy, is a continuous probability distribution. It is also known, especially among physicists, as the Lorentz distribution (after Hendrik Lorentz), Cauchy–Lorentz distribution, Lorentz(ian) fun ...
: X_1/ X_2 \sim \operatorname(0, 1). * Their Euclidean norm \sqrt has the
Rayleigh distribution In probability theory and statistics, the Rayleigh distribution is a continuous probability distribution for nonnegative-valued random variables. Up to rescaling, it coincides with the chi distribution with two degrees of freedom. The distribut ...
.


Operations on multiple independent normal variables

* Any linear combination of independent normal deviates is a normal deviate. * If X_1, X_2, \ldots, X_n are independent standard normal random variables, then the sum of their squares has the
chi-squared distribution In probability theory and statistics, the chi-squared distribution (also chi-square or \chi^2-distribution) with k degrees of freedom is the distribution of a sum of the squares of k independent standard normal random variables. The chi-squa ...
with n degrees of freedom X_1^2 + \cdots + X_n^2 \sim \chi_n^2. * If X_1, X_2, \ldots, X_n are independent normally distributed random variables with means \mu and variances \sigma^2, then their
sample mean The sample mean (or "empirical mean") and the sample covariance are statistics computed from a Sample (statistics), sample of data on one or more random variables. The sample mean is the average value (or mean, mean value) of a sample (statistic ...
is independent from the sample
standard deviation In statistics, the standard deviation is a measure of the amount of variation or dispersion of a set of values. A low standard deviation indicates that the values tend to be close to the mean (also called the expected value) of the set, while ...
, which can be demonstrated using Basu's theorem or
Cochran's theorem In statistics, Cochran's theorem, devised by William G. Cochran, is a theorem used to justify results relating to the probability distributions of statistics that are used in the analysis of variance. Statement Let ''U''1, ..., ''U'N'' be i.i. ...
. The ratio of these two quantities will have the
Student's t-distribution In probability and statistics, Student's ''t''-distribution (or simply the ''t''-distribution) is any member of a family of continuous probability distributions that arise when estimating the mean of a normally distributed population in sit ...
with n-1 degrees of freedom: t = \frac = \frac \sim t_. * If X_1, X_2, \ldots, X_n, Y_1, Y_2, \ldots, Y_m are independent standard normal random variables, then the ratio of their normalized sums of squares will have the with degrees of freedom: F = \frac \sim F_.


Operations on multiple correlated normal variables

* A
quadratic form In mathematics, a quadratic form is a polynomial with terms all of degree two ("form" is another name for a homogeneous polynomial). For example, :4x^2 + 2xy - 3y^2 is a quadratic form in the variables and . The coefficients usually belong to a ...
of a normal vector, i.e. a quadratic function q = \sum x_i^2 + \sum x_j + c of multiple independent or correlated normal variables, is a generalized chi-square variable.


Operations on the density function

The split normal distribution is most directly defined in terms of joining scaled sections of the density functions of different normal distributions and rescaling the density to integrate to one. The
truncated normal distribution In probability and statistics, the truncated normal distribution is the probability distribution derived from that of a normally distributed random variable by bounding the random variable from either below or above (or both). The truncated no ...
results from rescaling a section of a single density function.


Infinite divisibility and Cramér's theorem

For any positive integer \text, any normal distribution with mean \mu and variance \sigma^2 is the distribution of the sum of \text independent normal deviates, each with mean \frac and variance \frac. This property is called
infinite divisibility Infinite divisibility arises in different ways in philosophy, physics, economics, order theory (a branch of mathematics), and probability theory (also a branch of mathematics). One may speak of infinite divisibility, or the lack thereof, of matter ...
. Conversely, if X_1 and X_2 are independent random variables and their sum X_1+X_2 has a normal distribution, then both X_1 and X_2 must be normal deviates. This result is known as Cramér's decomposition theorem, and is equivalent to saying that the convolution of two distributions is normal if and only if both are normal. Cramér's theorem implies that a linear combination of independent non-Gaussian variables will never have an exactly normal distribution, although it may approach it arbitrarily closely.


Bernstein's theorem

Bernstein's theorem states that if X and Y are independent and X + Y and X - Y are also independent, then both ''X'' and ''Y'' must necessarily have normal distributions. More generally, if X_1, \ldots, X_n are independent random variables, then two distinct linear combinations \sum and \sumwill be independent if and only if all X_k are normal and \sum, where \sigma_k^2 denotes the variance of X_k.


Extensions

The notion of normal distribution, being one of the most important distributions in probability theory, has been extended far beyond the standard framework of the univariate (that is one-dimensional) case (Case 1). All these extensions are also called ''normal'' or ''Gaussian'' laws, so a certain ambiguity in names exists. * The
multivariate normal distribution In probability theory and statistics, the multivariate normal distribution, multivariate Gaussian distribution, or joint normal distribution is a generalization of the one-dimensional (univariate) normal distribution to higher dimensions. One d ...
describes the Gaussian law in the ''k''-dimensional Euclidean space. A vector is multivariate-normally distributed if any linear combination of its components has a (univariate) normal distribution. The variance of ''X'' is a ''k×k'' symmetric positive-definite matrix ''V''. The multivariate normal distribution is a special case of the
elliptical distribution In probability and statistics, an elliptical distribution is any member of a broad family of probability distributions that generalize the multivariate normal distribution. Intuitively, in the simplified two and three dimensional case, the joint di ...
s. As such, its iso-density loci in the ''k'' = 2 case are ellipses and in the case of arbitrary ''k'' are ellipsoids. * Rectified Gaussian distribution a rectified version of normal distribution with all the negative elements reset to 0 * Complex normal distribution deals with the complex normal vectors. A complex vector is said to be normal if both its real and imaginary components jointly possess a 2''k''-dimensional multivariate normal distribution. The variance-covariance structure of ''X'' is described by two matrices: the ''variance'' matrix Γ, and the ''relation'' matrix ''C''. * Matrix normal distribution describes the case of normally distributed matrices. * Gaussian processes are the normally distributed stochastic processes. These can be viewed as elements of some infinite-dimensional Hilbert space ''H'', and thus are the analogues of multivariate normal vectors for the case . A random element is said to be normal if for any constant the scalar product has a (univariate) normal distribution. The variance structure of such Gaussian random element can be described in terms of the linear ''covariance ''. Several Gaussian processes became popular enough to have their own names: ** Wiener process, Brownian motion, ** Brownian bridge, ** Ornstein–Uhlenbeck process. * Gaussian q-distribution is an abstract mathematical construction that represents a "q-analogue" of the normal distribution. * the q-Gaussian is an analogue of the Gaussian distribution, in the sense that it maximises the Tsallis entropy, and is one type of Tsallis distribution. Note that this distribution is different from the Gaussian q-distribution above. * The Kaniadakis Gaussian distribution, Kaniadakis ''κ''-Gaussian distribution is a generalization of the Gaussian distribution which arises from the Kaniadakis statistics, being one of the Kaniadakis distribution, Kaniadakis distributions. A random variable ''X'' has a two-piece normal distribution if it has a distribution : f_X( x ) = N( \mu, \sigma_1^2 ) \text x \le \mu : f_X( x ) = N( \mu, \sigma_2^2 ) \text x \ge \mu where ''μ'' is the mean and ''σ''1 and ''σ''2 are the standard deviations of the distribution to the left and right of the mean respectively. The mean, variance and third central moment of this distribution have been determined : \operatorname( X ) = \mu + \sqrt ( \sigma_2 - \sigma_1 ) : \operatorname( X ) = \left( 1 - \frac 2 \pi\right)( \sigma_2 - \sigma_1 )^2 + \sigma_1 \sigma_2 : \operatorname( X ) = \sqrt( \sigma_2 - \sigma_1 ) \left[ \left( \frac 4 \pi - 1 \right) ( \sigma_2 - \sigma_1)^2 + \sigma_1 \sigma_2 \right] where E(''X''), V(''X'') and T(''X'') are the mean, variance, and third central moment respectively. One of the main practical uses of the Gaussian law is to model the empirical distributions of many different random variables encountered in practice. In such case a possible extension would be a richer family of distributions, having more than two parameters and therefore being able to fit the empirical distribution more accurately. The examples of such extensions are: * Pearson distribution — a four-parameter family of probability distributions that extend the normal law to include different skewness and kurtosis values. * The generalized normal distribution, also known as the exponential power distribution, allows for distribution tails with thicker or thinner asymptotic behaviors.


Statistical inference


Estimation of parameters

It is often the case that we do not know the parameters of the normal distribution, but instead want to Estimation theory, estimate them. That is, having a sample (x_1, \ldots, x_n) from a normal N(\mu, \sigma^2) population we would like to learn the approximate values of parameters \mu and \sigma^2. The standard approach to this problem is the maximum likelihood method, which requires maximization of the ''log-likelihood function'': : \ln\mathcal(\mu,\sigma^2) = \sum_^n \ln f(x_i\mid\mu,\sigma^2) = -\frac\ln(2\pi) - \frac\ln\sigma^2 - \frac\sum_^n (x_i-\mu)^2. Taking derivatives with respect to \mu and \sigma^2 and solving the resulting system of first order conditions yields the ''maximum likelihood estimates'': : \hat = \overline \equiv \frac\sum_^n x_i, \qquad \hat^2 = \frac \sum_^n (x_i - \overline)^2.


Sample mean

Estimator \textstyle\hat\mu is called the ''
sample mean The sample mean (or "empirical mean") and the sample covariance are statistics computed from a Sample (statistics), sample of data on one or more random variables. The sample mean is the average value (or mean, mean value) of a sample (statistic ...
'', since it is the arithmetic mean of all observations. The statistic \textstyle\overline is complete statistic, complete and sufficient statistic, sufficient for \mu, and therefore by the Lehmann–Scheffé theorem, \textstyle\hat\mu is the uniformly minimum variance unbiased (UMVU) estimator. In finite samples it is distributed normally: : \hat\mu \sim \mathcal(\mu,\sigma^2/n). The variance of this estimator is equal to the ''μμ''-element of the inverse Fisher information matrix \textstyle\mathcal^. This implies that the estimator is efficient estimator, finite-sample efficient. Of practical importance is the fact that the standard error (statistics), standard error of \textstyle\hat\mu is proportional to \textstyle1/\sqrt, that is, if one wishes to decrease the standard error by a factor of 10, one must increase the number of points in the sample by a factor of 100. This fact is widely used in determining sample sizes for opinion polls and the number of trials in Monte Carlo simulations. From the standpoint of the asymptotic theory (statistics), asymptotic theory, \textstyle\hat\mu is consistent estimator, consistent, that is, it convergence in probability, converges in probability to \mu as n\rightarrow\infty. The estimator is also asymptotic normality, asymptotically normal, which is a simple corollary of the fact that it is normal in finite samples: : \sqrt(\hat\mu-\mu) \,\xrightarrow\, \mathcal(0,\sigma^2).


Sample variance

The estimator \textstyle\hat\sigma^2 is called the ''sample variance'', since it is the variance of the sample ((x_1, \ldots, x_n)). In practice, another estimator is often used instead of the \textstyle\hat\sigma^2. This other estimator is denoted s^2, and is also called the ''sample variance'', which represents a certain ambiguity in terminology; its square root s is called the ''sample standard deviation''. The estimator s^2 differs from \textstyle\hat\sigma^2 by having instead of ''n'' in the denominator (the so-called Bessel's correction): : s^2 = \frac \hat\sigma^2 = \frac \sum_^n (x_i - \overline)^2. The difference between s^2 and \textstyle\hat\sigma^2 becomes negligibly small for large ''n''s. In finite samples however, the motivation behind the use of s^2 is that it is an unbiased estimator of the underlying parameter \sigma^2, whereas \textstyle\hat\sigma^2 is biased. Also, by the Lehmann–Scheffé theorem the estimator s^2 is uniformly minimum variance unbiased (Minimum-variance unbiased estimator, UMVU), which makes it the "best" estimator among all unbiased ones. However it can be shown that the biased estimator \textstyle\hat\sigma^2 is "better" than the s^2 in terms of the mean squared error (MSE) criterion. In finite samples both s^2 and \textstyle\hat\sigma^2 have scaled
chi-squared distribution In probability theory and statistics, the chi-squared distribution (also chi-square or \chi^2-distribution) with k degrees of freedom is the distribution of a sum of the squares of k independent standard normal random variables. The chi-squa ...
with degrees of freedom: : s^2 \sim \frac \cdot \chi^2_, \qquad \hat\sigma^2 \sim \frac \cdot \chi^2_. The first of these expressions shows that the variance of s^2 is equal to 2\sigma^4/(n-1), which is slightly greater than the ''σσ''-element of the inverse Fisher information matrix \textstyle\mathcal^. Thus, s^2 is not an efficient estimator for \sigma^2, and moreover, since s^2 is UMVU, we can conclude that the finite-sample efficient estimator for \sigma^2 does not exist. Applying the asymptotic theory, both estimators s^2 and \textstyle\hat\sigma^2 are consistent, that is they converge in probability to \sigma^2 as the sample size n\rightarrow\infty. The two estimators are also both asymptotically normal: : \sqrt(\hat\sigma^2 - \sigma^2) \simeq \sqrt(s^2-\sigma^2) \,\xrightarrow\, \mathcal(0,2\sigma^4). In particular, both estimators are asymptotically efficient for \sigma^2.


Confidence intervals

By
Cochran's theorem In statistics, Cochran's theorem, devised by William G. Cochran, is a theorem used to justify results relating to the probability distributions of statistics that are used in the analysis of variance. Statement Let ''U''1, ..., ''U'N'' be i.i. ...
, for normal distributions the sample mean \textstyle\hat\mu and the sample variance ''s''2 are
independent Independent or Independents may refer to: Arts, entertainment, and media Artist groups * Independents (artist group), a group of modernist painters based in the New Hope, Pennsylvania, area of the United States during the early 1930s * Independ ...
, which means there can be no gain in considering their joint distribution. There is also a converse theorem: if in a sample the sample mean and sample variance are independent, then the sample must have come from the normal distribution. The independence between \textstyle\hat\mu and ''s'' can be employed to construct the so-called ''t-statistic'': : t = \frac = \frac \sim t_ This quantity ''t'' has the
Student's t-distribution In probability and statistics, Student's ''t''-distribution (or simply the ''t''-distribution) is any member of a family of continuous probability distributions that arise when estimating the mean of a normally distributed population in sit ...
with degrees of freedom, and it is an ancillary statistic (independent of the value of the parameters). Inverting the distribution of this ''t''-statistics will allow us to construct the
confidence interval In frequentist statistics, a confidence interval (CI) is a range of estimates for an unknown parameter. A confidence interval is computed at a designated ''confidence level''; the 95% confidence level is most common, but other levels, such as 9 ...
for ''μ''; similarly, inverting the ''χ''2 distribution of the statistic ''s''2 will give us the confidence interval for ''σ''2: :\mu \in \left[ \hat\mu - t_ \fracs, \hat\mu + t_ \fracs \right], :\sigma^2 \in \left[ \frac, \frac \right], where ''tk,p'' and are the ''p''th
quantile In statistics and probability, quantiles are cut points dividing the range of a probability distribution into continuous intervals with equal probabilities, or dividing the observations in a sample in the same way. There is one fewer quantile tha ...
s of the ''t''- and ''χ''2-distributions respectively. These confidence intervals are of the ''confidence level'' , meaning that the true values ''μ'' and ''σ''2 fall outside of these intervals with probability (or significance level) ''α''. In practice people usually take , resulting in the 95% confidence intervals. Approximate formulas can be derived from the asymptotic distributions of \textstyle\hat\mu and ''s''2: :\mu \in \left[ \hat\mu - , z_, \fracs, \hat\mu + , z_, \fracs \right], :\sigma^2 \in \left[ s^2 - , z_, \fracs^2, s^2 + , z_, \fracs^2 \right], The approximate formulas become valid for large values of ''n'', and are more convenient for the manual calculation since the standard normal quantiles ''z''''α''/2 do not depend on ''n''. In particular, the most popular value of , results in .


Normality tests

Normality tests assess the likelihood that the given data set comes from a normal distribution. Typically the null hypothesis ''H''0 is that the observations are distributed normally with unspecified mean ''μ'' and variance ''σ''2, versus the alternative ''Ha'' that the distribution is arbitrary. Many tests (over 40) have been devised for this problem. The more prominent of them are outlined below: Diagnostic plots are more intuitively appealing but subjective at the same time, as they rely on informal human judgement to accept or reject the null hypothesis. *
Q–Q plot In statistics, a Q–Q plot (quantile-quantile plot) is a probability plot, a List of graphical methods, graphical method for comparing two probability distributions by plotting their ''quantiles'' against each other. A point on the plot co ...
, also known as normal probability plot or rankit plot—is a plot of the sorted values from the data set against the expected values of the corresponding quantiles from the standard normal distribution. That is, it's a plot of point of the form (Φ−1(''pk''), ''x''(''k'')), where plotting points ''pk'' are equal to ''pk'' = (''k'' − ''α'')/(''n'' + 1 − 2''α'') and ''α'' is an adjustment constant, which can be anything between 0 and 1. If the null hypothesis is true, the plotted points should approximately lie on a straight line. * P–P plot – similar to the Q–Q plot, but used much less frequently. This method consists of plotting the points (Φ(''z''(''k'')), ''pk''), where \textstyle z_ = (x_-\hat\mu)/\hat\sigma. For normally distributed data this plot should lie on a 45° line between (0, 0) and (1, 1). Goodness-of-fit tests: ''Moment-based tests'': * D'Agostino's K-squared test * Jarque–Bera test * Shapiro–Wilk test: This is based on the fact that the line in the Q–Q plot has the slope of ''σ''. The test compares the least squares estimate of that slope with the value of the sample variance, and rejects the null hypothesis if these two quantities differ significantly. ''Tests based on the empirical distribution function'': * Anderson–Darling test * Lilliefors test (an adaptation of the Kolmogorov–Smirnov test)


Bayesian analysis of the normal distribution

Bayesian analysis of normally distributed data is complicated by the many different possibilities that may be considered: * Either the mean, or the variance, or neither, may be considered a fixed quantity. * When the variance is unknown, analysis may be done directly in terms of the variance, or in terms of the
precision Precision, precise or precisely may refer to: Science, and technology, and mathematics Mathematics and computing (general) * Accuracy and precision, measurement deviation from true value and its scatter * Significant figures, the number of digit ...
, the reciprocal of the variance. The reason for expressing the formulas in terms of precision is that the analysis of most cases is simplified. * Both univariate and multivariate normal distribution, multivariate cases need to be considered. * Either conjugate prior, conjugate or improper prior, improper prior distributions may be placed on the unknown variables. * An additional set of cases occurs in Bayesian linear regression, where in the basic model the data is assumed to be normally distributed, and normal priors are placed on the regression coefficients. The resulting analysis is similar to the basic cases of independent identically distributed data. The formulas for the non-linear-regression cases are summarized in the conjugate prior article.


Sum of two quadratics


= Scalar form

= The following auxiliary formula is useful for simplifying the posterior distribution, posterior update equations, which otherwise become fairly tedious. :a(x-y)^2 + b(x-z)^2 = (a + b)\left(x - \frac\right)^2 + \frac(y-z)^2 This equation rewrites the sum of two quadratics in ''x'' by expanding the squares, grouping the terms in ''x'', and completing the square. Note the following about the complex constant factors attached to some of the terms: # The factor \frac has the form of a weighted average of ''y'' and ''z''. # \frac = \frac = (a^ + b^)^. This shows that this factor can be thought of as resulting from a situation where the Multiplicative inverse, reciprocals of quantities ''a'' and ''b'' add directly, so to combine ''a'' and ''b'' themselves, it's necessary to reciprocate, add, and reciprocate the result again to get back into the original units. This is exactly the sort of operation performed by the harmonic mean, so it is not surprising that \frac is one-half the harmonic mean of ''a'' and ''b''.


= Vector form

= A similar formula can be written for the sum of two vector quadratics: If x, y, z are vectors of length ''k'', and A and B are symmetric matrix, symmetric, invertible matrices of size k\times k, then : \begin & (\mathbf-\mathbf)'\mathbf(\mathbf-\mathbf) + (\mathbf-\mathbf)' \mathbf(\mathbf-\mathbf) \\ = & (\mathbf - \mathbf)'(\mathbf+\mathbf)(\mathbf - \mathbf) + (\mathbf - \mathbf)'(\mathbf^ + \mathbf^)^(\mathbf - \mathbf) \end where :\mathbf = (\mathbf + \mathbf)^(\mathbf\mathbf + \mathbf \mathbf) Note that the form x′ A x is called a
quadratic form In mathematics, a quadratic form is a polynomial with terms all of degree two ("form" is another name for a homogeneous polynomial). For example, :4x^2 + 2xy - 3y^2 is a quadratic form in the variables and . The coefficients usually belong to a ...
and is a scalar (mathematics), scalar: :\mathbf'\mathbf\mathbf = \sum_a_ x_i x_j In other words, it sums up all possible combinations of products of pairs of elements from x, with a separate coefficient for each. In addition, since x_i x_j = x_j x_i, only the sum a_ + a_ matters for any off-diagonal elements of A, and there is no loss of generality in assuming that A is symmetric matrix, symmetric. Furthermore, if A is symmetric, then the form \mathbf'\mathbf\mathbf = \mathbf'\mathbf\mathbf.


Sum of differences from the mean

Another useful formula is as follows: \sum_^n (x_i-\mu)^2 = \sum_^n (x_i-\bar)^2 + n(\bar -\mu)^2 where \bar = \frac \sum_^n x_i.


With known variance

For a set of i.i.d. normally distributed data points X of size ''n'' where each individual point ''x'' follows x \sim \mathcal(\mu, \sigma^2) with known
variance In probability theory and statistics, variance is the expectation of the squared deviation of a random variable from its population mean or sample mean. Variance is a measure of dispersion, meaning it is a measure of how far a set of numbers ...
σ2, the conjugate prior distribution is also normally distributed. This can be shown more easily by rewriting the variance as the
precision Precision, precise or precisely may refer to: Science, and technology, and mathematics Mathematics and computing (general) * Accuracy and precision, measurement deviation from true value and its scatter * Significant figures, the number of digit ...
, i.e. using τ = 1/σ2. Then if x \sim \mathcal(\mu, 1/\tau) and \mu \sim \mathcal(\mu_0, 1/\tau_0), we proceed as follows. First, the likelihood function is (using the formula above for the sum of differences from the mean): :\begin p(\mathbf\mid\mu,\tau) &= \prod_^n \sqrt \exp\left(-\frac\tau(x_i-\mu)^2\right) \\ &= \left(\frac\right)^ \exp\left(-\frac\tau \sum_^n (x_i-\mu)^2\right) \\ &= \left(\frac\right)^ \exp\left[-\frac\tau \left(\sum_^n(x_i-\bar)^2 + n(\bar -\mu)^2\right)\right]. \end Then, we proceed as follows: :\begin p(\mu\mid\mathbf) &\propto p(\mathbf\mid\mu) p(\mu) \\ & = \left(\frac\right)^ \exp\left[-\frac\tau \left(\sum_^n(x_i-\bar)^2 + n(\bar -\mu)^2\right)\right] \sqrt \exp\left(-\frac\tau_0(\mu-\mu_0)^2\right) \\ &\propto \exp\left(-\frac\left(\tau\left(\sum_^n(x_i-\bar)^2 + n(\bar -\mu)^2\right) + \tau_0(\mu-\mu_0)^2\right)\right) \\ &\propto \exp\left(-\frac \left(n\tau(\bar-\mu)^2 + \tau_0(\mu-\mu_0)^2 \right)\right) \\ &= \exp\left(-\frac(n\tau + \tau_0)\left(\mu - \dfrac\right)^2 + \frac(\bar - \mu_0)^2\right) \\ &\propto \exp\left(-\frac(n\tau + \tau_0)\left(\mu - \dfrac\right)^2\right) \end In the above derivation, we used the formula above for the sum of two quadratics and eliminated all constant factors not involving ''μ''. The result is the kernel (statistics), kernel of a normal distribution, with mean \frac and precision n\tau + \tau_0, i.e. :p(\mu\mid\mathbf) \sim \mathcal\left(\frac, \frac\right) This can be written as a set of Bayesian update equations for the posterior parameters in terms of the prior parameters: :\begin \tau_0' &= \tau_0 + n\tau \\[5pt] \mu_0' &= \frac \\[5pt] \bar &= \frac\sum_^n x_i \end That is, to combine ''n'' data points with total precision of ''nτ'' (or equivalently, total variance of ''n''/''σ''2) and mean of values \bar, derive a new total precision simply by adding the total precision of the data to the prior total precision, and form a new mean through a ''precision-weighted average'', i.e. a weighted average of the data mean and the prior mean, each weighted by the associated total precision. This makes logical sense if the precision is thought of as indicating the certainty of the observations: In the distribution of the posterior mean, each of the input components is weighted by its certainty, and the certainty of this distribution is the sum of the individual certainties. (For the intuition of this, compare the expression "the whole is (or is not) greater than the sum of its parts". In addition, consider that the knowledge of the posterior comes from a combination of the knowledge of the prior and likelihood, so it makes sense that we are more certain of it than of either of its components.) The above formula reveals why it is more convenient to do Bayesian analysis of conjugate priors for the normal distribution in terms of the precision. The posterior precision is simply the sum of the prior and likelihood precisions, and the posterior mean is computed through a precision-weighted average, as described above. The same formulas can be written in terms of variance by reciprocating all the precisions, yielding the more ugly formulas :\begin ' &= \frac \\[5pt] \mu_0' &= \frac \\[5pt] \bar &= \frac\sum_^n x_i \end


With known mean

For a set of i.i.d. normally distributed data points X of size ''n'' where each individual point ''x'' follows x \sim \mathcal(\mu, \sigma^2) with known mean μ, the conjugate prior of the
variance In probability theory and statistics, variance is the expectation of the squared deviation of a random variable from its population mean or sample mean. Variance is a measure of dispersion, meaning it is a measure of how far a set of numbers ...
has an inverse gamma distribution or a scaled inverse chi-squared distribution. The two are equivalent 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. The prior for σ2 is as follows: :p(\sigma^2\mid\nu_0,\sigma_0^2) = \frac~\frac \propto \frac The likelihood function from above, written in terms of the variance, is: :\begin p(\mathbf\mid\mu,\sigma^2) &= \left(\frac\right)^ \exp\left[-\frac \sum_^n (x_i-\mu)^2\right] \\ &= \left(\frac\right)^ \exp\left[-\frac\right] \end where :S = \sum_^n (x_i-\mu)^2. Then: :\begin p(\sigma^2\mid\mathbf) &\propto p(\mathbf\mid\sigma^2) p(\sigma^2) \\ &= \left(\frac\right)^ \exp\left[-\frac\right] \frac~\frac \\ &\propto \left(\frac\right)^ \frac \exp\left[-\frac + \frac\right] \\ &= \frac \exp\left[-\frac\right] \end The above is also a scaled inverse chi-squared distribution where :\begin \nu_0' &= \nu_0 + n \\ \nu_0'' &= \nu_0 \sigma_0^2 + \sum_^n (x_i-\mu)^2 \end or equivalently :\begin \nu_0' &= \nu_0 + n \\ ' &= \frac \end Reparameterizing in terms of an inverse gamma distribution, the result is: :\begin \alpha' &= \alpha + \frac \\ \beta' &= \beta + \frac \end


With unknown mean and unknown variance

For a set of i.i.d. normally distributed data points X of size ''n'' where each individual point ''x'' follows x \sim \mathcal(\mu, \sigma^2) with unknown mean μ and unknown
variance In probability theory and statistics, variance is the expectation of the squared deviation of a random variable from its population mean or sample mean. Variance is a measure of dispersion, meaning it is a measure of how far a set of numbers ...
σ2, a combined (multivariate) conjugate prior is placed over the mean and variance, consisting of a normal-inverse-gamma distribution. Logically, this originates as follows: # From the analysis of the case with unknown mean but known variance, we see that the update equations involve sufficient statistics computed from the data consisting of the mean of the data points and the total variance of the data points, computed in turn from the known variance divided by the number of data points. # From the analysis of the case with unknown variance but known mean, we see that the update equations involve sufficient statistics over the data consisting of the number of data points and sum of squared deviations. # Keep in mind that the posterior update values serve as the prior distribution when further data is handled. Thus, we should logically think of our priors in terms of the sufficient statistics just described, with the same semantics kept in mind as much as possible. # To handle the case where both mean and variance are unknown, we could place independent priors over the mean and variance, with fixed estimates of the average mean, total variance, number of data points used to compute the variance prior, and sum of squared deviations. Note however that in reality, the total variance of the mean depends on the unknown variance, and the sum of squared deviations that goes into the variance prior (appears to) depend on the unknown mean. In practice, the latter dependence is relatively unimportant: Shifting the actual mean shifts the generated points by an equal amount, and on average the squared deviations will remain the same. This is not the case, however, with the total variance of the mean: As the unknown variance increases, the total variance of the mean will increase proportionately, and we would like to capture this dependence. # This suggests that we create a ''conditional prior'' of the mean on the unknown variance, with a hyperparameter specifying the mean of the pseudo-observations associated with the prior, and another parameter specifying the number of pseudo-observations. This number serves as a scaling parameter on the variance, making it possible to control the overall variance of the mean relative to the actual variance parameter. The prior for the variance also has two hyperparameters, one specifying the sum of squared deviations of the pseudo-observations associated with the prior, and another specifying once again the number of pseudo-observations. Note that each of the priors has a hyperparameter specifying the number of pseudo-observations, and in each case this controls the relative variance of that prior. These are given as two separate hyperparameters so that the variance (aka the confidence) of the two priors can be controlled separately. # This leads immediately to the normal-inverse-gamma distribution, which is the product of the two distributions just defined, with conjugate priors used (an inverse gamma distribution over the variance, and a normal distribution over the mean, ''conditional'' on the variance) and with the same four parameters just defined. The priors are normally defined as follows: :\begin p(\mu\mid\sigma^2; \mu_0, n_0) &\sim \mathcal(\mu_0,\sigma^2/n_0) \\ p(\sigma^2; \nu_0,\sigma_0^2) &\sim I\chi^2(\nu_0,\sigma_0^2) = IG(\nu_0/2, \nu_0\sigma_0^2/2) \end The update equations can be derived, and look as follows: :\begin \bar &= \frac 1 n \sum_^n x_i \\ \mu_0' &= \frac \\ n_0' &= n_0 + n \\ \nu_0' &= \nu_0 + n \\ \nu_0'' &= \nu_0 \sigma_0^2 + \sum_^n (x_i-\bar)^2 + \frac(\mu_0 - \bar)^2 \end The respective numbers of pseudo-observations add the number of actual observations to them. The new mean hyperparameter is once again a weighted average, this time weighted by the relative numbers of observations. Finally, the update for \nu_0'' is similar to the case with known mean, but in this case the sum of squared deviations is taken with respect to the observed data mean rather than the true mean, and as a result a new "interaction term" needs to be added to take care of the additional error source stemming from the deviation between prior and data mean.


Occurrence and applications

The occurrence of normal distribution in practical problems can be loosely classified into four categories: # Exactly normal distributions; # Approximately normal laws, for example when such approximation is justified by the
central limit theorem In probability theory, the central limit theorem (CLT) establishes that, in many situations, when independent random variables are summed up, their properly normalized sum tends toward a normal distribution even if the original variables themselv ...
; and # Distributions modeled as normal – the normal distribution being the distribution with Principle of maximum entropy, maximum entropy for a given mean and variance. # Regression problems – the normal distribution being found after systematic effects have been modeled sufficiently well.


Exact normality

Certain quantities in physics are distributed normally, as was first demonstrated by James Clerk Maxwell. Examples of such quantities are: * Probability density function of a ground state in a quantum harmonic oscillator. * The position of a particle that experiences diffusion. If initially the particle is located at a specific point (that is its probability distribution is the Dirac delta function), then after time ''t'' its location is described by a normal distribution with variance ''t'', which satisfies the diffusion equation \frac f(x,t) = \frac \frac f(x,t). If the initial location is given by a certain density function g(x), then the density at time ''t'' is the convolution of ''g'' and the normal PDF.


Approximate normality

''Approximately'' normal distributions occur in many situations, as explained by the
central limit theorem In probability theory, the central limit theorem (CLT) establishes that, in many situations, when independent random variables are summed up, their properly normalized sum tends toward a normal distribution even if the original variables themselv ...
. When the outcome is produced by many small effects acting ''additively and independently'', its distribution will be close to normal. The normal approximation will not be valid if the effects act multiplicatively (instead of additively), or if there is a single external influence that has a considerably larger magnitude than the rest of the effects. * In counting problems, where the central limit theorem includes a discrete-to-continuum approximation and where Infinite divisibility, infinitely divisible and Indecomposable distribution, decomposable distributions are involved, such as ** binomial distribution, Binomial random variables, associated with binary response variables; ** Poisson distribution, Poisson random variables, associated with rare events; * Thermal radiation has a Bose–Einstein statistics, Bose–Einstein distribution on very short time scales, and a normal distribution on longer timescales due to the central limit theorem.


Assumed normality

There are statistical methods to empirically test that assumption; see the above #Normality tests, Normality tests section. * In biology, the ''logarithm'' of various variables tend to have a normal distribution, that is, they tend to have a
log-normal distribution In probability theory, a log-normal (or lognormal) distribution is a continuous probability distribution of a random variable whose logarithm is normally distributed. Thus, if the random variable is log-normally distributed, then has a normal ...
(after separation on male/female subpopulations), with examples including: ** Measures of size of living tissue (length, height, skin area, weight); ** The ''length'' of ''inert'' appendages (hair, claws, nails, teeth) of biological specimens, ''in the direction of growth''; presumably the thickness of tree bark also falls under this category; ** Certain physiological measurements, such as blood pressure of adult humans. * In finance, in particular the Black–Scholes model, changes in the ''logarithm'' of exchange rates, price indices, and stock market indices are assumed normal (these variables behave like compound interest, not like simple interest, and so are multiplicative). Some mathematicians such as Benoit Mandelbrot have argued that Levy skew alpha-stable distribution, log-Levy distributions, which possesses heavy tails would be a more appropriate model, in particular for the analysis for stock market crashes. The use of the assumption of normal distribution occurring in financial models has also been criticized by Nassim Nicholas Taleb in his works. * Propagation of uncertainty, Measurement errors in physical experiments are often modeled by a normal distribution. This use of a normal distribution does not imply that one is assuming the measurement errors are normally distributed, rather using the normal distribution produces the most conservative predictions possible given only knowledge about the mean and variance of the errors. * In Standardized testing (statistics), standardized testing, results can be made to have a normal distribution by either selecting the number and difficulty of questions (as in the Intelligence quotient, IQ test) or transforming the raw test scores into "output" scores by fitting them to the normal distribution. For example, the SAT's traditional range of 200–800 is based on a normal distribution with a mean of 500 and a standard deviation of 100. * Many scores are derived from the normal distribution, including percentile ranks ("percentiles" or "quantiles"), normal curve equivalents, stanines, Standard score, z-scores, and T-scores. Additionally, some behavioral statistical procedures assume that scores are normally distributed; for example, Student's t-test, t-tests and Analysis of variance, ANOVAs. Bell curve grading assigns relative grades based on a normal distribution of scores. * In hydrology the distribution of long duration river discharge or rainfall, e.g. monthly and yearly totals, is often thought to be practically normal according to the
central limit theorem In probability theory, the central limit theorem (CLT) establishes that, in many situations, when independent random variables are summed up, their properly normalized sum tends toward a normal distribution even if the original variables themselv ...
. The blue picture, made with CumFreq, illustrates an example of fitting the normal distribution to ranked October rainfalls showing the 90% confidence belt based on the
binomial distribution In probability theory and statistics, the binomial distribution with parameters ''n'' and ''p'' is the discrete probability distribution of the number of successes in a sequence of ''n'' independent experiments, each asking a yes–no quest ...
. The rainfall data are represented by plotting positions as part of the cumulative frequency analysis.


Methodological problems and peer review

John Ioannidis argues that using normally distributed standard deviations as standards for validating research findings leave falsifiability, falsifiable predictions about phenomena that are not normally distributed untested. This includes, for example, phenomena that only appear when all necessary conditions are present and one cannot be a substitute for another in an addition-like way and phenomena that are not randomly distributed. Ioannidis argues that standard deviation-centered validation gives a false appearance of validity to hypotheses and theories where some but not all falsifiable predictions are normally distributed since the portion of falsifiable predictions that there is evidence against may and in some cases are in the non-normally distributed parts of the range of falsifiable predictions, as well as baselessly dismissing hypotheses for which none of the falsifiable predictions are normally distributed as if were they unfalsifiable when in fact they do make falsifiable predictions. It is argued by Ioannidis that many cases of mutually exclusive theories being accepted as "validated" by research journals are caused by failure of the journals to take in empirical falsifications of non-normally distributed predictions, and not because mutually exclusive theories are true, which they cannot be, although two mutually exclusive theories can both be wrong and a third one correct.


Computational methods


Generating values from normal distribution

In computer simulations, especially in applications of the Monte-Carlo method, it is often desirable to generate values that are normally distributed. The algorithms listed below all generate the standard normal deviates, since a can be generated as , where ''Z'' is standard normal. All these algorithms rely on the availability of a random number generator ''U'' capable of producing Uniform distribution (continuous), uniform random variates. * The most straightforward method is based on the probability integral transform property: if ''U'' is distributed uniformly on (0,1), then Φ−1(''U'') will have the standard normal distribution. The drawback of this method is that it relies on calculation of the
probit function In probability theory and statistics, the probit function is the quantile function associated with the standard normal distribution. It has applications in data analysis and machine learning, in particular exploratory statistical graphics and ...
Φ−1, which cannot be done analytically. Some approximate methods are described in and in the error function, erf article. Wichura gives a fast algorithm for computing this function to 16 decimal places, which is used by R programming language, R to compute random variates of the normal distribution. * Irwin–Hall distribution#Approximating a Normal distribution, An easy-to-program approximate approach that relies on the
central limit theorem In probability theory, the central limit theorem (CLT) establishes that, in many situations, when independent random variables are summed up, their properly normalized sum tends toward a normal distribution even if the original variables themselv ...
is as follows: generate 12 uniform ''U''(0,1) deviates, add them all up, and subtract 6 – the resulting random variable will have approximately standard normal distribution. In truth, the distribution will be Irwin–Hall distribution, Irwin–Hall, which is a 12-section eleventh-order polynomial approximation to the normal distribution. This random deviate will have a limited range of (−6, 6). Note that in a true normal distribution, only 0.00034% of all samples will fall outside ±6σ. * The Box–Muller transform, Box–Muller method uses two independent random numbers ''U'' and ''V'' distributed uniform distribution (continuous), uniformly on (0,1). Then the two random variables ''X'' and ''Y'' X = \sqrt \, \cos(2 \pi V) , \qquad Y = \sqrt \, \sin(2 \pi V) . will both have the standard normal distribution, and will be
independent Independent or Independents may refer to: Arts, entertainment, and media Artist groups * Independents (artist group), a group of modernist painters based in the New Hope, Pennsylvania, area of the United States during the early 1930s * Independ ...
. This formulation arises because for a bivariate normal random vector (''X'', ''Y'') the squared norm will have the
chi-squared distribution In probability theory and statistics, the chi-squared distribution (also chi-square or \chi^2-distribution) with k degrees of freedom is the distribution of a sum of the squares of k independent standard normal random variables. The chi-squa ...
with two degrees of freedom, which is an easily generated exponential distribution, exponential random variable corresponding to the quantity −2ln(''U'') in these equations; and the angle is distributed uniformly around the circle, chosen by the random variable ''V''. * The Marsaglia polar method is a modification of the Box–Muller method which does not require computation of the sine and cosine functions. In this method, ''U'' and ''V'' are drawn from the uniform (−1,1) distribution, and then is computed. If ''S'' is greater or equal to 1, then the method starts over, otherwise the two quantities X = U\sqrt, \qquad Y = V\sqrt are returned. Again, ''X'' and ''Y'' are independent, standard normal random variables. * The Ratio method is a rejection method. The algorithm proceeds as follows: ** Generate two independent uniform deviates ''U'' and ''V''; ** Compute ''X'' = (''V'' − 0.5)/''U''; ** Optional: if ''X''2 ≤ 5 − 4''e''1/4''U'' then accept ''X'' and terminate algorithm; ** Optional: if ''X''2 ≥ 4''e''−1.35/''U'' + 1.4 then reject ''X'' and start over from step 1; ** If ''X''2 ≤ −4 ln''U'' then accept ''X'', otherwise start over the algorithm. *:The two optional steps allow the evaluation of the logarithm in the last step to be avoided in most cases. These steps can be greatly improved so that the logarithm is rarely evaluated. * The ziggurat algorithm is faster than the Box–Muller transform and still exact. In about 97% of all cases it uses only two random numbers, one random integer and one random uniform, one multiplication and an if-test. Only in 3% of the cases, where the combination of those two falls outside the "core of the ziggurat" (a kind of rejection sampling using logarithms), do exponentials and more uniform random numbers have to be employed. * Integer arithmetic can be used to sample from the standard normal distribution. This method is exact in the sense that it satisfies the conditions of ''ideal approximation''; i.e., it is equivalent to sampling a real number from the standard normal distribution and rounding this to the nearest representable floating point number. * There is also some investigation into the connection between the fast Hadamard transform and the normal distribution, since the transform employs just addition and subtraction and by the central limit theorem random numbers from almost any distribution will be transformed into the normal distribution. In this regard a series of Hadamard transforms can be combined with random permutations to turn arbitrary data sets into a normally distributed data.


Numerical approximations for the normal CDF and normal quantile function

The standard normal cumulative distribution function, CDF is widely used in scientific and statistical computing. The values Φ(''x'') may be approximated very accurately by a variety of methods, such as numerical integration, Taylor series, asymptotic series and Gauss's continued fraction#Of Kummer's confluent hypergeometric function, continued fractions. Different approximations are used depending on the desired level of accuracy. * give the approximation for Φ(''x'') for ''x > 0'' with the absolute error (algorith
26.2.17
: \Phi(x) = 1 - \varphi(x)\left(b_1 t + b_2 t^2 + b_3t^3 + b_4 t^4 + b_5 t^5\right) + \varepsilon(x), \qquad t = \frac, where ''ϕ''(''x'') is the standard normal PDF, and ''b''0 = 0.2316419, ''b''1 = 0.319381530, ''b''2 = −0.356563782, ''b''3 = 1.781477937, ''b''4 = −1.821255978, ''b''5 = 1.330274429. * lists some dozens of approximations – by means of rational functions, with or without exponentials – for the function. His algorithms vary in the degree of complexity and the resulting precision, with maximum absolute precision of 24 digits. An algorithm by combines Hart's algorithm 5666 with a continued fraction approximation in the tail to provide a fast computation algorithm with a 16-digit precision. * after recalling Hart68 solution is not suited for erf, gives a solution for both erf and erfc, with maximal relative error bound, via rational function, Rational Chebyshev Approximation. * suggested a simple algorithm based on the Taylor series expansion \Phi(x) = \frac12 + \varphi(x)\left( x + \frac 3 + \frac + \frac + \frac + \cdots \right) for calculating with arbitrary precision. The drawback of this algorithm is comparatively slow calculation time (for example it takes over 300 iterations to calculate the function with 16 digits of precision when ). * The GNU Scientific Library calculates values of the standard normal CDF using Hart's algorithms and approximations with Chebyshev polynomials. Shore (1982) introduced simple approximations that may be incorporated in stochastic optimization models of engineering and operations research, like reliability engineering and inventory analysis. Denoting , the simplest approximation for the quantile function is: z = \Phi^(p)=5.5556\left[1- \left( \frac p \right)^\right],\qquad p\ge 1/2 This approximation delivers for ''z'' a maximum absolute error of 0.026 (for , corresponding to ). For replace ''p'' by and change sign. Another approximation, somewhat less accurate, is the single-parameter approximation: z=-0.4115\left\, \qquad p\ge 1/2 The latter had served to derive a simple approximation for the loss integral of the normal distribution, defined by \begin L(z) & =\int_z^\infty (u-z)\varphi(u) \, du=\int_z^\infty [1-\Phi (u)] \, du \\[5pt] L(z) & \approx \begin 0.4115\left(\dfrac p \right) - z, & p<1/2, \\ \\ 0.4115\left( \dfrac p \right), & p\ge 1/2. \end \\[5pt] \text \\ L(z) & \approx \begin 0.4115\left\, & p < 1/2, \\ \\ 0.4115 \dfrac p, & p\ge 1/2. \end \end This approximation is particularly accurate for the right far-tail (maximum error of 10−3 for z≥1.4). Highly accurate approximations for the CDF, based on Response modeling methodology, Response Modeling Methodology (RMM, Shore, 2011, 2012), are shown in Shore (2005). Some more approximations can be found at: Error function#Approximation with elementary functions. In particular, small ''relative'' error on the whole domain for the CDF \Phi and the quantile function \Phi^ as well, is achieved via an explicitly invertible formula by Sergei Winitzki in 2008.


History


Development

Some authors attribute the credit for the discovery of the normal distribution to Abraham de Moivre, de Moivre, who in 1738 published in the second edition of his "''The Doctrine of Chances''" the study of the coefficients in the binomial expansion of . De Moivre proved that the middle term in this expansion has the approximate magnitude of 2^n/\sqrt, and that "If ''m'' or ''n'' be a Quantity infinitely great, then the Logarithm of the Ratio, which a Term distant from the middle by the Interval ''ℓ'', has to the middle Term, is -\frac." Although this theorem can be interpreted as the first obscure expression for the normal probability law, Stephen Stigler, Stigler points out that de Moivre himself did not interpret his results as anything more than the approximate rule for the binomial coefficients, and in particular de Moivre lacked the concept of the probability density function. In 1823 Carl Friedrich Gauss, Gauss published his monograph "''Theoria combinationis observationum erroribus minimis obnoxiae''" where among other things he introduces several important statistical concepts, such as the method of least squares, the method of maximum likelihood, and the ''normal distribution''. Gauss used ''M'', , to denote the measurements of some unknown quantity ''V'', and sought the "most probable" estimator of that quantity: the one that maximizes the probability of obtaining the observed experimental results. In his notation φΔ is the probability density function of the measurement errors of magnitude Δ. Not knowing what the function ''φ'' is, Gauss requires that his method should reduce to the well-known answer: the arithmetic mean of the measured values. Starting from these principles, Gauss demonstrates that the only law that rationalizes the choice of arithmetic mean as an estimator of the location parameter, is the normal law of errors: \varphi\mathit = \frac h \, e^, where ''h'' is "the measure of the precision of the observations". Using this normal law as a generic model for errors in the experiments, Gauss formulates what is now known as the non-linear least squares, non-linear weighted least squares method. Although Gauss was the first to suggest the normal distribution law, Pierre Simon de Laplace, Laplace made significant contributions. It was Laplace who first posed the problem of aggregating several observations in 1774, although his own solution led to the Laplacian distribution. It was Laplace who first calculated the value of the Gaussian integral, integral in 1782, providing the normalization constant for the normal distribution. Finally, it was Laplace who in 1810 proved and presented to the Academy the fundamental
central limit theorem In probability theory, the central limit theorem (CLT) establishes that, in many situations, when independent random variables are summed up, their properly normalized sum tends toward a normal distribution even if the original variables themselv ...
, which emphasized the theoretical importance of the normal distribution. It is of interest to note that in 1809 an Irish-American mathematician Robert Adrain published two insightful but flawed derivations of the normal probability law, simultaneously and independently from Gauss. His works remained largely unnoticed by the scientific community, until in 1871 they were exhumed by Cleveland Abbe, Abbe. In the middle of the 19th century James Clerk Maxwell, Maxwell demonstrated that the normal distribution is not just a convenient mathematical tool, but may also occur in natural phenomena: "The number of particles whose velocity, resolved in a certain direction, lies between ''x'' and ''x'' + ''dx'' is \operatorname \frac\; e^ \, dx


Naming

Today, the concept is usually known in English as the normal distribution or Gaussian distribution. Other less common names include Gauss distribution, Laplace-Gauss distribution, the law of error, the law of facility of errors, Laplace's second law, Gaussian law. Gauss himself apparently coined the term with reference to the "normal equations" involved in its applications, with normal having its technical meaning of orthogonal rather than "usual". However, by the end of the 19th century some authors had started using the name ''normal distribution'', where the word "normal" was used as an adjective – the term now being seen as a reflection of the fact that this distribution was seen as typical, common – and thus "normal". Charles Sanders Peirce, Peirce (one of those authors) once defined "normal" thus: "...the 'normal' is not the average (or any other kind of mean) of what actually occurs, but of what ''would'', in the long run, occur under certain circumstances." Around the turn of the 20th century Karl Pearson, Pearson popularized the term ''normal'' as a designation for this distribution. Also, it was Pearson who first wrote the distribution in terms of the standard deviation ''σ'' as in modern notation. Soon after this, in year 1915, Ronald Fisher, Fisher added the location parameter to the formula for normal distribution, expressing it in the way it is written nowadays: df = \frac e^ \, dx. The term "standard normal", which denotes the normal distribution with zero mean and unit variance came into general use around the 1950s, appearing in the popular textbooks by P. G. Hoel (1947) "''Introduction to mathematical statistics''" and A. M. Mood (1950) "''Introduction to the theory of statistics''".


See also

* Bates distribution – similar to the Irwin–Hall distribution, but rescaled back into the 0 to 1 range * Behrens–Fisher problem – the long-standing problem of testing whether two normal samples with different variances have same means; * Bhattacharyya distance – method used to separate mixtures of normal distributions * Erdős–Kac theorem – on the occurrence of the normal distribution in number theory * Full width at half maximum * Gaussian blur – convolution, which uses the normal distribution as a kernel * Modified half-normal distribution with the pdf on (0, \infty) is given as f(x)= \frac, where \Psi(\alpha,z)=_1\Psi_1\left(\begin\left(\alpha,\frac\right)\\(1,0)\end;z \right) denotes the Fox-Wright Psi function. * Normally distributed and uncorrelated does not imply independent * Ratio normal distribution * Reciprocal normal distribution * Standard normal table * Stein's lemma * Sub-Gaussian distribution * Sum of normally distributed random variables * Tweedie distribution – The normal distribution is a member of the family of Tweedie exponential dispersion models. * Wrapped normal distribution – the Normal distribution applied to a circular domain * Z-test – using the normal distribution


Notes


References


Citations


Sources

* * In particular, the entries fo
"bell-shaped and bell curve"
an

* * * * * * * * * * * * * * * * * * * * * * * * Translated by Stephen M. Stigler in ''Statistical Science'' 1 (3), 1986: . * * * * * * * * * * * * * * * * * * * * * * * * * * * *


External links

*
Normal distribution calculator
{{Authority control Normal distribution, Continuous distributions Conjugate prior distributions Exponential family distributions Stable distributions Location-scale family probability distributions]">X - \mu, ^p\right&= \sigma^p (p-1)!! \cdot \begin \sqrt & \textp\text \\ 1 & \textp\text \end \\ &= \sigma^p \cdot \frac. \end The last formula is valid also for any non-integer p>-1. When the mean \mu \ne 0, the plain and absolute moments can be expressed in terms of
confluent hypergeometric function In mathematics, a confluent hypergeometric function is a solution of a confluent hypergeometric equation, which is a degenerate form of a hypergeometric differential equation where two of the three regular singularities merge into an irregular ...
s _1F_1 and U. :\begin \operatorname\left ^p\right&= \sigma^p\cdot (-i\sqrt 2)^p U\left(-\frac, \frac, -\frac \left( \frac \mu \sigma \right)^2 \right), \\ \operatorname\left[, X, ^p \right] &= \sigma^p \cdot 2^ \frac _1F_1\left( -\frac, \frac, -\frac \left( \frac \mu \sigma \right)^2 \right). \end These expressions remain valid even if p is not an integer. See also Hermite polynomials#"Negative variance", generalized Hermite polynomials. The expectation of X conditioned on the event that X lies in an interval ,b/math> is given by :\operatorname\left \mid a= \mu - \sigma^2\frac where f and F respectively are the density and the cumulative distribution function of X. For b=\infty this is known as the
inverse Mills ratio In probability theory, the Mills ratio (or Mills's ratio) of a continuous random variable X is the function : m(x) := \frac , where f(x) is the probability density function, and :\bar(x) := \Pr x.html" ;"title=">x">>x= \int_x^ f(u)\, du is the ...
. Note that above, density f of X is used instead of standard normal density as in inverse Mills ratio, so here we have \sigma^2 instead of \sigma.


Fourier transform and characteristic function

The
Fourier transform A Fourier transform (FT) is a mathematical transform that decomposes functions into frequency components, which are represented by the output of the transform as a function of frequency. Most commonly functions of time or space are transformed, ...
of a normal density f with mean \mu and standard deviation \sigma is : \hat f(t) = \int_^\infty f(x)e^ \, dx = e^ e^ where i is the
imaginary unit The imaginary unit or unit imaginary number () is a solution to the quadratic equation x^2+1=0. Although there is no real number with this property, can be used to extend the real numbers to what are called complex numbers, using addition an ...
. If the mean \mu=0, the first factor is 1, and the Fourier transform is, apart from a constant factor, a normal density on the
frequency domain In physics, electronics, control systems engineering, and statistics, the frequency domain refers to the analysis of mathematical functions or signals with respect to frequency, rather than time. Put simply, a time-domain graph shows how a signa ...
, with mean 0 and standard deviation 1/\sigma. In particular, the standard normal distribution \varphi is an
eigenfunction In mathematics, an eigenfunction of a linear operator ''D'' defined on some function space is any non-zero function f in that space that, when acted upon by ''D'', is only multiplied by some scaling factor called an eigenvalue. As an equation, th ...
of the Fourier transform. In probability theory, the Fourier transform of the probability distribution of a real-valued random variable X is closely connected to the
characteristic function In mathematics, the term "characteristic function" can refer to any of several distinct concepts: * The indicator function of a subset, that is the function ::\mathbf_A\colon X \to \, :which for a given subset ''A'' of ''X'', has value 1 at points ...
\varphi_X(t) of that variable, which is defined as the
expected value In probability theory, the expected value (also called expectation, expectancy, mathematical expectation, mean, average, or first moment) is a generalization of the weighted average. Informally, the expected value is the arithmetic mean of a l ...
of e^, as a function of the real variable t (the
frequency Frequency is the number of occurrences of a repeating event per unit of time. It is also occasionally referred to as ''temporal frequency'' for clarity, and is distinct from ''angular frequency''. Frequency is measured in hertz (Hz) which is eq ...
parameter of the Fourier transform). This definition can be analytically extended to a complex-value variable t. The relation between both is: :\varphi_X(t) = \hat f(-t)


Moment and cumulant generating functions

The
moment generating function In probability theory and statistics, the moment-generating function of a real-valued random variable is an alternative specification of its probability distribution. Thus, it provides the basis of an alternative route to analytical results compare ...
of a real random variable X is the expected value of e^, as a function of the real parameter t. For a normal distribution with density f, mean \mu and deviation \sigma, the moment generating function exists and is equal to :M(t) = \operatorname ^= \hat f(it) = e^ e^ The
cumulant generating function In probability theory and statistics, the cumulants of a probability distribution are a set of quantities that provide an alternative to the '' moments'' of the distribution. Any two probability distributions whose moments are identical will have ...
is the logarithm of the moment generating function, namely :g(t) = \ln M(t) = \mu t + \tfrac 12 \sigma^2 t^2 Since this is a quadratic polynomial in t, only the first two
cumulant In probability theory and statistics, the cumulants of a probability distribution are a set of quantities that provide an alternative to the '' moments'' of the distribution. Any two probability distributions whose moments are identical will ha ...
s are nonzero, namely the mean \mu and the variance \sigma^2.


Stein operator and class

Within
Stein's method Stein's method is a general method in probability theory to obtain bounds on the distance between two probability distributions with respect to a probability metric. It was introduced by Charles Stein, who first published it in 1972, to obtain ...
the Stein operator and class of a random variable X \sim \mathcal(\mu, \sigma^2) are \mathcalf(x) = \sigma^2 f'(x) - (x-\mu)f(x) and \mathcal the class of all absolutely continuous functions f : \R \to \R \mbox\mathbb[, f'(X), ]< \infty.


Zero-variance limit

In the limit (mathematics), limit when \sigma tends to zero, the probability density f(x) eventually tends to zero at any x\ne \mu, but grows without limit if x = \mu, while its integral remains equal to 1. Therefore, the normal distribution cannot be defined as an ordinary
function Function or functionality may refer to: Computing * Function key, a type of key on computer keyboards * Function model, a structured representation of processes in a system * Function object or functor or functionoid, a concept of object-oriente ...
when \sigma = 0. However, one can define the normal distribution with zero variance as a
generalized function In mathematics, generalized functions are objects extending the notion of functions. There is more than one recognized theory, for example the theory of distributions. Generalized functions are especially useful in making discontinuous functions ...
; specifically, as Dirac's "delta function" \delta translated by the mean \mu, that is f(x)=\delta(x-\mu). Its CDF is then the
Heaviside step function The Heaviside step function, or the unit step function, usually denoted by or (but sometimes , or ), is a step function, named after Oliver Heaviside (1850–1925), the value of which is zero for negative arguments and one for positive argume ...
translated by the mean \mu, namely :F(x) = \begin 0 & \textx < \mu \\ 1 & \textx \geq \mu \end


Maximum entropy

Of all probability distributions over the reals with a specified mean \mu and variance \sigma^2, the normal distribution N(\mu,\sigma^2) is the one with maximum entropy. If X is a
continuous random variable In probability theory and statistics, a probability distribution is the mathematical function that gives the probabilities of occurrence of different possible outcomes for an experiment. It is a mathematical description of a random phenomenon i ...
with
probability density In probability theory, a probability density function (PDF), or density of a continuous random variable, is a function whose value at any given sample (or point) in the sample space (the set of possible values taken by the random variable) can ...
f(x), then the entropy of X is defined as : H(X) = - \int_^\infty f(x)\log f(x)\, dx where f(x)\log f(x) is understood to be zero whenever f(x)=0. This functional can be maximized, subject to the constraints that the distribution is properly normalized and has a specified variance, by using
variational calculus The calculus of variations (or Variational Calculus) is a field of mathematical analysis that uses variations, which are small changes in functions and functionals, to find maxima and minima of functionals: mappings from a set of functions t ...
. A function with two
Lagrange multipliers In mathematical optimization, the method of Lagrange multipliers is a strategy for finding the local maxima and minima of a function subject to equality constraints (i.e., subject to the condition that one or more equations have to be satisfied ex ...
is defined: : L=\int_^\infty f(x)\ln(f(x))\,dx-\lambda_0\left(1-\int_^\infty f(x)\,dx\right)-\lambda\left(\sigma^2-\int_^\infty f(x)(x-\mu)^2\,dx\right) where f(x) is, for now, regarded as some density function with mean \mu and standard deviation \sigma. At maximum entropy, a small variation \delta f(x) about f(x) will produce a variation \delta L about L which is equal to 0: : 0=\delta L=\int_^\infty \delta f(x)\left (\ln(f(x))+1+\lambda_0+\lambda(x-\mu)^2\right )\,dx Since this must hold for any small \delta f(x), the term in brackets must be zero, and solving for f(x) yields: :f(x)=e^ Using the constraint equations to solve for \lambda_0 and \lambda yields the density of the normal distribution: : f(x, \mu, \sigma)=\frace^ The entropy of a normal distribution is equal to : H(X)=\tfrac(1+\log(2\sigma^2\pi))


Other properties


Related distributions


Central limit theorem

The central limit theorem states that under certain (fairly common) conditions, the sum of many random variables will have an approximately normal distribution. More specifically, where X_1,\ldots ,X_n are
independent and identically distributed In probability theory and statistics, a collection of random variables is independent and identically distributed if each random variable has the same probability distribution as the others and all are mutually independent. This property is usua ...
random variables with the same arbitrary distribution, zero mean, and variance \sigma^2 and Z is their mean scaled by \sqrt : Z = \sqrt\left(\frac\sum_^n X_i\right) Then, as n increases, the probability distribution of Z will tend to the normal distribution with zero mean and variance \sigma^2. The theorem can be extended to variables (X_i) that are not independent and/or not identically distributed if certain constraints are placed on the degree of dependence and the moments of the distributions. Many
test statistic A test statistic is a statistic (a quantity derived from the sample) used in statistical hypothesis testing.Berger, R. L.; Casella, G. (2001). ''Statistical Inference'', Duxbury Press, Second Edition (p.374) A hypothesis test is typically specif ...
s, scores, and
estimator In statistics, an estimator is a rule for calculating an estimate of a given quantity based on observed data: thus the rule (the estimator), the quantity of interest (the estimand) and its result (the estimate) are distinguished. For example, the ...
s encountered in practice contain sums of certain random variables in 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 distributions. The central limit theorem also implies that certain distributions can be approximated by the normal distribution, for example: * The
binomial distribution In probability theory and statistics, the binomial distribution with parameters ''n'' and ''p'' is the discrete probability distribution of the number of successes in a sequence of ''n'' independent experiments, each asking a yes–no quest ...
B(n,p) is approximately normal with mean np and variance np(1-p) for large n and for p not too close to 0 or 1. * The
Poisson distribution In probability theory and statistics, the Poisson distribution is a discrete probability distribution that expresses the probability of a given number of events occurring in a fixed interval of time or space if these events occur with a known co ...
with parameter \lambda is approximately normal with mean \lambda and variance \lambda, for large values of \lambda. * The
chi-squared distribution In probability theory and statistics, the chi-squared distribution (also chi-square or \chi^2-distribution) with k degrees of freedom is the distribution of a sum of the squares of k independent standard normal random variables. The chi-squa ...
\chi^2(k) is approximately normal with mean k and variance 2k, for large k. * The
Student's t-distribution In probability and statistics, Student's ''t''-distribution (or simply the ''t''-distribution) is any member of a family of continuous probability distributions that arise when estimating the mean of a normally distributed population in sit ...
t(\nu) is approximately normal with mean 0 and variance 1 when \nu is large. Whether these approximations are sufficiently accurate depends on the purpose for which they are needed, and the rate of convergence to the normal distribution. It is typically the case that such approximations are less accurate in the tails of the distribution. A general upper bound for the approximation error in the central limit theorem is given by the
Berry–Esseen theorem In probability theory, the central limit theorem states that, under certain circumstances, the probability distribution of the scaled mean of a random sample converges to a normal distribution as the sample size increases to infinity. Under strong ...
, improvements of the approximation are given by the
Edgeworth expansion The Gram–Charlier A series (named in honor of Jørgen Pedersen Gram and Carl Charlier), and the Edgeworth series (named in honor of Francis Ysidro Edgeworth) are series that approximate a probability distribution in terms of its cumulants. The se ...
s. This theorem can also be used to justify modeling the sum of many uniform noise sources as
Gaussian noise Gaussian noise, named after Carl Friedrich Gauss, is a term from signal processing theory denoting a kind of signal noise that has a probability density function (pdf) equal to that of the normal distribution (which is also known as the Gaussia ...
. See
AWGN Additive white Gaussian noise (AWGN) is a basic noise model used in information theory to mimic the effect of many random processes that occur in nature. The modifiers denote specific characteristics: * ''Additive'' because it is added to any nois ...
.


Operations and functions of normal variables

The
probability density In probability theory, a probability density function (PDF), or density of a continuous random variable, is a function whose value at any given sample (or point) in the sample space (the set of possible values taken by the random variable) can ...
,
cumulative distribution In statistics, the frequency (or absolute frequency) of an event i is the number n_i of times the observation has occurred/recorded in an experiment or study. These frequencies are often depicted graphically or in tabular form. Types The cumul ...
, and inverse cumulative distribution of any function of one or more independent or correlated normal variables can be computed with the numerical method of ray-tracing
Matlab code
. In the following sections we look at some special cases.


Operations on a single normal variable

If X is distributed normally with mean \mu and variance \sigma^2, then * aX+b, for any real numbers a and b, is also normally distributed, with mean a\mu+b and standard deviation , a, \sigma. That is, the family of normal distributions is closed under linear transformations. * The exponential of X is distributed log-normally: . * The absolute value of X has
folded normal distribution The folded normal distribution is a probability distribution related to the normal distribution. Given a normally distributed random variable ''X'' with mean ''μ'' and variance ''σ''2, the random variable ''Y'' = , ''X'', has a folded normal d ...
: . If \mu = 0 this is known as the
half-normal distribution In probability theory and statistics, the half-normal distribution is a special case of the folded normal distribution. Let X follow an ordinary normal distribution, N(0,\sigma^2). Then, Y=, X, follows a half-normal distribution. Thus, the hal ...
. * The absolute value of normalized residuals, , ''X'' − ''μ'', /''σ'', has
chi distribution In probability theory and statistics, the chi distribution is a continuous probability distribution. It is the distribution of the positive square root of the sum of squares of a set of independent random variables each following a standard norm ...
with one degree of freedom: , X - \mu, / \sigma \sim \chi_1. * The square of ''X''/''σ'' has the
noncentral chi-squared distribution In probability theory and statistics, the noncentral chi-squared distribution (or noncentral chi-square distribution, noncentral \chi^2 distribution) is a noncentral generalization of the chi-squared distribution. It often arises in the power a ...
with one degree of freedom: X^2 / \sigma^2 \sim \chi_1^2(\mu^2 / \sigma^2). If \mu = 0, the distribution is called simply chi-squared. * The log likelihood of a normal variable x is simply the log of its
probability density function In probability theory, a probability density function (PDF), or density of a continuous random variable, is a function whose value at any given sample (or point) in the sample space (the set of possible values taken by the random variable) can ...
: \ln p(x)= -\frac \left(\frac \right)^2 -\ln \left(\sigma \sqrt \right) = -\frac z^2 -\ln \left(\sigma \sqrt \right). Since this is a scaled and shifted square of a standard normal variable, it is distributed as a scaled and shifted chi-squared variable. * The distribution of the variable ''X'' restricted to an interval 'a'', ''b''is called the
truncated normal distribution In probability and statistics, the truncated normal distribution is the probability distribution derived from that of a normally distributed random variable by bounding the random variable from either below or above (or both). The truncated no ...
. * (''X'' − ''μ'')−2 has a
Lévy distribution In probability theory and statistics, the Lévy distribution, named after Paul Lévy, is a continuous probability distribution for a non-negative random variable. In spectroscopy, this distribution, with frequency as the dependent variable, is kn ...
with location 0 and scale ''σ''−2.


= Operations on two independent normal variables

= * If X_1 and X_2 are two
independent Independent or Independents may refer to: Arts, entertainment, and media Artist groups * Independents (artist group), a group of modernist painters based in the New Hope, Pennsylvania, area of the United States during the early 1930s * Independ ...
normal random variables, with means \mu_1, \mu_2 and standard deviations \sigma_1, \sigma_2, then their sum X_1 + X_2 will also be normally distributed, roof/sup> with mean \mu_1 + \mu_2 and variance \sigma_1^2 + \sigma_2^2. * In particular, if X and Y are independent normal deviates with zero mean and variance \sigma^2, then X + Y and X - Y are also independent and normally distributed, with zero mean and variance 2\sigma^2. This is a special case of the
polarization identity In linear algebra, a branch of mathematics, the polarization identity is any one of a family of formulas that express the inner product of two vectors in terms of the norm of a normed vector space. If a norm arises from an inner product then t ...
. * If X_1, X_2 are two independent normal deviates with mean \mu and deviation \sigma, and a, b are arbitrary real numbers, then the variable X_3 = \frac + \mu is also normally distributed with mean \mu and deviation \sigma. It follows that the normal distribution is
stable A stable is a building in which livestock, especially horses, are kept. It most commonly means a building that is divided into separate stalls for individual animals and livestock. There are many different types of stables in use today; the ...
(with exponent \alpha=2).


= Operations on two independent standard normal variables

= If X_1 and X_2 are two independent standard normal random variables with mean 0 and variance 1, then * Their sum and difference is distributed normally with mean zero and variance two: X_1 \pm X_2 \sim N(0, 2). * Their product Z = X_1 X_2 follows the
product distribution A product distribution is a probability distribution constructed as the distribution of the product of random variables having two other known distributions. Given two statistically independent random variables ''X'' and ''Y'', the distribution of ...
with density function f_Z(z) = \pi^ K_0(, z, ) where K_0 is the
modified Bessel function of the second kind Bessel functions, first defined by the mathematician Daniel Bernoulli and then generalized by Friedrich Bessel, are canonical solutions of Bessel's differential equation x^2 \frac + x \frac + \left(x^2 - \alpha^2 \right)y = 0 for an arbitrary ...
. This distribution is symmetric around zero, unbounded at z = 0, and has the
characteristic function In mathematics, the term "characteristic function" can refer to any of several distinct concepts: * The indicator function of a subset, that is the function ::\mathbf_A\colon X \to \, :which for a given subset ''A'' of ''X'', has value 1 at points ...
\phi_Z(t) = (1 + t^2)^. * Their ratio follows the standard
Cauchy distribution The Cauchy distribution, named after Augustin Cauchy, is a continuous probability distribution. It is also known, especially among physicists, as the Lorentz distribution (after Hendrik Lorentz), Cauchy–Lorentz distribution, Lorentz(ian) fun ...
: X_1/ X_2 \sim \operatorname(0, 1). * Their Euclidean norm \sqrt has the
Rayleigh distribution In probability theory and statistics, the Rayleigh distribution is a continuous probability distribution for nonnegative-valued random variables. Up to rescaling, it coincides with the chi distribution with two degrees of freedom. The distribut ...
.


Operations on multiple independent normal variables

* Any linear combination of independent normal deviates is a normal deviate. * If X_1, X_2, \ldots, X_n are independent standard normal random variables, then the sum of their squares has the
chi-squared distribution In probability theory and statistics, the chi-squared distribution (also chi-square or \chi^2-distribution) with k degrees of freedom is the distribution of a sum of the squares of k independent standard normal random variables. The chi-squa ...
with n degrees of freedom X_1^2 + \cdots + X_n^2 \sim \chi_n^2. * If X_1, X_2, \ldots, X_n are independent normally distributed random variables with means \mu and variances \sigma^2, then their
sample mean The sample mean (or "empirical mean") and the sample covariance are statistics computed from a Sample (statistics), sample of data on one or more random variables. The sample mean is the average value (or mean, mean value) of a sample (statistic ...
is independent from the sample
standard deviation In statistics, the standard deviation is a measure of the amount of variation or dispersion of a set of values. A low standard deviation indicates that the values tend to be close to the mean (also called the expected value) of the set, while ...
, which can be demonstrated using Basu's theorem or
Cochran's theorem In statistics, Cochran's theorem, devised by William G. Cochran, is a theorem used to justify results relating to the probability distributions of statistics that are used in the analysis of variance. Statement Let ''U''1, ..., ''U'N'' be i.i. ...
. The ratio of these two quantities will have the
Student's t-distribution In probability and statistics, Student's ''t''-distribution (or simply the ''t''-distribution) is any member of a family of continuous probability distributions that arise when estimating the mean of a normally distributed population in sit ...
with n-1 degrees of freedom: t = \frac = \frac \sim t_. * If X_1, X_2, \ldots, X_n, Y_1, Y_2, \ldots, Y_m are independent standard normal random variables, then the ratio of their normalized sums of squares will have the with degrees of freedom: F = \frac \sim F_.


Operations on multiple correlated normal variables

* A
quadratic form In mathematics, a quadratic form is a polynomial with terms all of degree two ("form" is another name for a homogeneous polynomial). For example, :4x^2 + 2xy - 3y^2 is a quadratic form in the variables and . The coefficients usually belong to a ...
of a normal vector, i.e. a quadratic function q = \sum x_i^2 + \sum x_j + c of multiple independent or correlated normal variables, is a generalized chi-square variable.


Operations on the density function

The split normal distribution is most directly defined in terms of joining scaled sections of the density functions of different normal distributions and rescaling the density to integrate to one. The
truncated normal distribution In probability and statistics, the truncated normal distribution is the probability distribution derived from that of a normally distributed random variable by bounding the random variable from either below or above (or both). The truncated no ...
results from rescaling a section of a single density function.


Infinite divisibility and Cramér's theorem

For any positive integer \text, any normal distribution with mean \mu and variance \sigma^2 is the distribution of the sum of \text independent normal deviates, each with mean \frac and variance \frac. This property is called
infinite divisibility Infinite divisibility arises in different ways in philosophy, physics, economics, order theory (a branch of mathematics), and probability theory (also a branch of mathematics). One may speak of infinite divisibility, or the lack thereof, of matter ...
. Conversely, if X_1 and X_2 are independent random variables and their sum X_1+X_2 has a normal distribution, then both X_1 and X_2 must be normal deviates. This result is known as Cramér's decomposition theorem, and is equivalent to saying that the convolution of two distributions is normal if and only if both are normal. Cramér's theorem implies that a linear combination of independent non-Gaussian variables will never have an exactly normal distribution, although it may approach it arbitrarily closely.


Bernstein's theorem

Bernstein's theorem states that if X and Y are independent and X + Y and X - Y are also independent, then both ''X'' and ''Y'' must necessarily have normal distributions. More generally, if X_1, \ldots, X_n are independent random variables, then two distinct linear combinations \sum and \sumwill be independent if and only if all X_k are normal and \sum, where \sigma_k^2 denotes the variance of X_k.


Extensions

The notion of normal distribution, being one of the most important distributions in probability theory, has been extended far beyond the standard framework of the univariate (that is one-dimensional) case (Case 1). All these extensions are also called ''normal'' or ''Gaussian'' laws, so a certain ambiguity in names exists. * The
multivariate normal distribution In probability theory and statistics, the multivariate normal distribution, multivariate Gaussian distribution, or joint normal distribution is a generalization of the one-dimensional (univariate) normal distribution to higher dimensions. One d ...
describes the Gaussian law in the ''k''-dimensional Euclidean space. A vector is multivariate-normally distributed if any linear combination of its components has a (univariate) normal distribution. The variance of ''X'' is a ''k×k'' symmetric positive-definite matrix ''V''. The multivariate normal distribution is a special case of the
elliptical distribution In probability and statistics, an elliptical distribution is any member of a broad family of probability distributions that generalize the multivariate normal distribution. Intuitively, in the simplified two and three dimensional case, the joint di ...
s. As such, its iso-density loci in the ''k'' = 2 case are ellipses and in the case of arbitrary ''k'' are ellipsoids. * Rectified Gaussian distribution a rectified version of normal distribution with all the negative elements reset to 0 * Complex normal distribution deals with the complex normal vectors. A complex vector is said to be normal if both its real and imaginary components jointly possess a 2''k''-dimensional multivariate normal distribution. The variance-covariance structure of ''X'' is described by two matrices: the ''variance'' matrix Γ, and the ''relation'' matrix ''C''. * Matrix normal distribution describes the case of normally distributed matrices. * Gaussian processes are the normally distributed stochastic processes. These can be viewed as elements of some infinite-dimensional Hilbert space ''H'', and thus are the analogues of multivariate normal vectors for the case . A random element is said to be normal if for any constant the scalar product has a (univariate) normal distribution. The variance structure of such Gaussian random element can be described in terms of the linear ''covariance ''. Several Gaussian processes became popular enough to have their own names: ** Wiener process, Brownian motion, ** Brownian bridge, ** Ornstein–Uhlenbeck process. * Gaussian q-distribution is an abstract mathematical construction that represents a "q-analogue" of the normal distribution. * the q-Gaussian is an analogue of the Gaussian distribution, in the sense that it maximises the Tsallis entropy, and is one type of Tsallis distribution. Note that this distribution is different from the Gaussian q-distribution above. * The Kaniadakis Gaussian distribution, Kaniadakis ''κ''-Gaussian distribution is a generalization of the Gaussian distribution which arises from the Kaniadakis statistics, being one of the Kaniadakis distribution, Kaniadakis distributions. A random variable ''X'' has a two-piece normal distribution if it has a distribution : f_X( x ) = N( \mu, \sigma_1^2 ) \text x \le \mu : f_X( x ) = N( \mu, \sigma_2^2 ) \text x \ge \mu where ''μ'' is the mean and ''σ''1 and ''σ''2 are the standard deviations of the distribution to the left and right of the mean respectively. The mean, variance and third central moment of this distribution have been determined : \operatorname( X ) = \mu + \sqrt ( \sigma_2 - \sigma_1 ) : \operatorname( X ) = \left( 1 - \frac 2 \pi\right)( \sigma_2 - \sigma_1 )^2 + \sigma_1 \sigma_2 : \operatorname( X ) = \sqrt( \sigma_2 - \sigma_1 ) \left[ \left( \frac 4 \pi - 1 \right) ( \sigma_2 - \sigma_1)^2 + \sigma_1 \sigma_2 \right] where E(''X''), V(''X'') and T(''X'') are the mean, variance, and third central moment respectively. One of the main practical uses of the Gaussian law is to model the empirical distributions of many different random variables encountered in practice. In such case a possible extension would be a richer family of distributions, having more than two parameters and therefore being able to fit the empirical distribution more accurately. The examples of such extensions are: * Pearson distribution — a four-parameter family of probability distributions that extend the normal law to include different skewness and kurtosis values. * The generalized normal distribution, also known as the exponential power distribution, allows for distribution tails with thicker or thinner asymptotic behaviors.


Statistical inference


Estimation of parameters

It is often the case that we do not know the parameters of the normal distribution, but instead want to Estimation theory, estimate them. That is, having a sample (x_1, \ldots, x_n) from a normal N(\mu, \sigma^2) population we would like to learn the approximate values of parameters \mu and \sigma^2. The standard approach to this problem is the maximum likelihood method, which requires maximization of the ''log-likelihood function'': : \ln\mathcal(\mu,\sigma^2) = \sum_^n \ln f(x_i\mid\mu,\sigma^2) = -\frac\ln(2\pi) - \frac\ln\sigma^2 - \frac\sum_^n (x_i-\mu)^2. Taking derivatives with respect to \mu and \sigma^2 and solving the resulting system of first order conditions yields the ''maximum likelihood estimates'': : \hat = \overline \equiv \frac\sum_^n x_i, \qquad \hat^2 = \frac \sum_^n (x_i - \overline)^2.


Sample mean

Estimator \textstyle\hat\mu is called the ''
sample mean The sample mean (or "empirical mean") and the sample covariance are statistics computed from a Sample (statistics), sample of data on one or more random variables. The sample mean is the average value (or mean, mean value) of a sample (statistic ...
'', since it is the arithmetic mean of all observations. The statistic \textstyle\overline is complete statistic, complete and sufficient statistic, sufficient for \mu, and therefore by the Lehmann–Scheffé theorem, \textstyle\hat\mu is the uniformly minimum variance unbiased (UMVU) estimator. In finite samples it is distributed normally: : \hat\mu \sim \mathcal(\mu,\sigma^2/n). The variance of this estimator is equal to the ''μμ''-element of the inverse Fisher information matrix \textstyle\mathcal^. This implies that the estimator is efficient estimator, finite-sample efficient. Of practical importance is the fact that the standard error (statistics), standard error of \textstyle\hat\mu is proportional to \textstyle1/\sqrt, that is, if one wishes to decrease the standard error by a factor of 10, one must increase the number of points in the sample by a factor of 100. This fact is widely used in determining sample sizes for opinion polls and the number of trials in Monte Carlo simulations. From the standpoint of the asymptotic theory (statistics), asymptotic theory, \textstyle\hat\mu is consistent estimator, consistent, that is, it convergence in probability, converges in probability to \mu as n\rightarrow\infty. The estimator is also asymptotic normality, asymptotically normal, which is a simple corollary of the fact that it is normal in finite samples: : \sqrt(\hat\mu-\mu) \,\xrightarrow\, \mathcal(0,\sigma^2).


Sample variance

The estimator \textstyle\hat\sigma^2 is called the ''sample variance'', since it is the variance of the sample ((x_1, \ldots, x_n)). In practice, another estimator is often used instead of the \textstyle\hat\sigma^2. This other estimator is denoted s^2, and is also called the ''sample variance'', which represents a certain ambiguity in terminology; its square root s is called the ''sample standard deviation''. The estimator s^2 differs from \textstyle\hat\sigma^2 by having instead of ''n'' in the denominator (the so-called Bessel's correction): : s^2 = \frac \hat\sigma^2 = \frac \sum_^n (x_i - \overline)^2. The difference between s^2 and \textstyle\hat\sigma^2 becomes negligibly small for large ''n''s. In finite samples however, the motivation behind the use of s^2 is that it is an unbiased estimator of the underlying parameter \sigma^2, whereas \textstyle\hat\sigma^2 is biased. Also, by the Lehmann–Scheffé theorem the estimator s^2 is uniformly minimum variance unbiased (Minimum-variance unbiased estimator, UMVU), which makes it the "best" estimator among all unbiased ones. However it can be shown that the biased estimator \textstyle\hat\sigma^2 is "better" than the s^2 in terms of the mean squared error (MSE) criterion. In finite samples both s^2 and \textstyle\hat\sigma^2 have scaled
chi-squared distribution In probability theory and statistics, the chi-squared distribution (also chi-square or \chi^2-distribution) with k degrees of freedom is the distribution of a sum of the squares of k independent standard normal random variables. The chi-squa ...
with degrees of freedom: : s^2 \sim \frac \cdot \chi^2_, \qquad \hat\sigma^2 \sim \frac \cdot \chi^2_. The first of these expressions shows that the variance of s^2 is equal to 2\sigma^4/(n-1), which is slightly greater than the ''σσ''-element of the inverse Fisher information matrix \textstyle\mathcal^. Thus, s^2 is not an efficient estimator for \sigma^2, and moreover, since s^2 is UMVU, we can conclude that the finite-sample efficient estimator for \sigma^2 does not exist. Applying the asymptotic theory, both estimators s^2 and \textstyle\hat\sigma^2 are consistent, that is they converge in probability to \sigma^2 as the sample size n\rightarrow\infty. The two estimators are also both asymptotically normal: : \sqrt(\hat\sigma^2 - \sigma^2) \simeq \sqrt(s^2-\sigma^2) \,\xrightarrow\, \mathcal(0,2\sigma^4). In particular, both estimators are asymptotically efficient for \sigma^2.


Confidence intervals

By
Cochran's theorem In statistics, Cochran's theorem, devised by William G. Cochran, is a theorem used to justify results relating to the probability distributions of statistics that are used in the analysis of variance. Statement Let ''U''1, ..., ''U'N'' be i.i. ...
, for normal distributions the sample mean \textstyle\hat\mu and the sample variance ''s''2 are
independent Independent or Independents may refer to: Arts, entertainment, and media Artist groups * Independents (artist group), a group of modernist painters based in the New Hope, Pennsylvania, area of the United States during the early 1930s * Independ ...
, which means there can be no gain in considering their joint distribution. There is also a converse theorem: if in a sample the sample mean and sample variance are independent, then the sample must have come from the normal distribution. The independence between \textstyle\hat\mu and ''s'' can be employed to construct the so-called ''t-statistic'': : t = \frac = \frac \sim t_ This quantity ''t'' has the
Student's t-distribution In probability and statistics, Student's ''t''-distribution (or simply the ''t''-distribution) is any member of a family of continuous probability distributions that arise when estimating the mean of a normally distributed population in sit ...
with degrees of freedom, and it is an ancillary statistic (independent of the value of the parameters). Inverting the distribution of this ''t''-statistics will allow us to construct the
confidence interval In frequentist statistics, a confidence interval (CI) is a range of estimates for an unknown parameter. A confidence interval is computed at a designated ''confidence level''; the 95% confidence level is most common, but other levels, such as 9 ...
for ''μ''; similarly, inverting the ''χ''2 distribution of the statistic ''s''2 will give us the confidence interval for ''σ''2: :\mu \in \left[ \hat\mu - t_ \fracs, \hat\mu + t_ \fracs \right], :\sigma^2 \in \left[ \frac, \frac \right], where ''tk,p'' and are the ''p''th
quantile In statistics and probability, quantiles are cut points dividing the range of a probability distribution into continuous intervals with equal probabilities, or dividing the observations in a sample in the same way. There is one fewer quantile tha ...
s of the ''t''- and ''χ''2-distributions respectively. These confidence intervals are of the ''confidence level'' , meaning that the true values ''μ'' and ''σ''2 fall outside of these intervals with probability (or significance level) ''α''. In practice people usually take , resulting in the 95% confidence intervals. Approximate formulas can be derived from the asymptotic distributions of \textstyle\hat\mu and ''s''2: :\mu \in \left[ \hat\mu - , z_, \fracs, \hat\mu + , z_, \fracs \right], :\sigma^2 \in \left[ s^2 - , z_, \fracs^2, s^2 + , z_, \fracs^2 \right], The approximate formulas become valid for large values of ''n'', and are more convenient for the manual calculation since the standard normal quantiles ''z''''α''/2 do not depend on ''n''. In particular, the most popular value of , results in .


Normality tests

Normality tests assess the likelihood that the given data set comes from a normal distribution. Typically the null hypothesis ''H''0 is that the observations are distributed normally with unspecified mean ''μ'' and variance ''σ''2, versus the alternative ''Ha'' that the distribution is arbitrary. Many tests (over 40) have been devised for this problem. The more prominent of them are outlined below: Diagnostic plots are more intuitively appealing but subjective at the same time, as they rely on informal human judgement to accept or reject the null hypothesis. *
Q–Q plot In statistics, a Q–Q plot (quantile-quantile plot) is a probability plot, a List of graphical methods, graphical method for comparing two probability distributions by plotting their ''quantiles'' against each other. A point on the plot co ...
, also known as normal probability plot or rankit plot—is a plot of the sorted values from the data set against the expected values of the corresponding quantiles from the standard normal distribution. That is, it's a plot of point of the form (Φ−1(''pk''), ''x''(''k'')), where plotting points ''pk'' are equal to ''pk'' = (''k'' − ''α'')/(''n'' + 1 − 2''α'') and ''α'' is an adjustment constant, which can be anything between 0 and 1. If the null hypothesis is true, the plotted points should approximately lie on a straight line. * P–P plot – similar to the Q–Q plot, but used much less frequently. This method consists of plotting the points (Φ(''z''(''k'')), ''pk''), where \textstyle z_ = (x_-\hat\mu)/\hat\sigma. For normally distributed data this plot should lie on a 45° line between (0, 0) and (1, 1). Goodness-of-fit tests: ''Moment-based tests'': * D'Agostino's K-squared test * Jarque–Bera test * Shapiro–Wilk test: This is based on the fact that the line in the Q–Q plot has the slope of ''σ''. The test compares the least squares estimate of that slope with the value of the sample variance, and rejects the null hypothesis if these two quantities differ significantly. ''Tests based on the empirical distribution function'': * Anderson–Darling test * Lilliefors test (an adaptation of the Kolmogorov–Smirnov test)


Bayesian analysis of the normal distribution

Bayesian analysis of normally distributed data is complicated by the many different possibilities that may be considered: * Either the mean, or the variance, or neither, may be considered a fixed quantity. * When the variance is unknown, analysis may be done directly in terms of the variance, or in terms of the
precision Precision, precise or precisely may refer to: Science, and technology, and mathematics Mathematics and computing (general) * Accuracy and precision, measurement deviation from true value and its scatter * Significant figures, the number of digit ...
, the reciprocal of the variance. The reason for expressing the formulas in terms of precision is that the analysis of most cases is simplified. * Both univariate and multivariate normal distribution, multivariate cases need to be considered. * Either conjugate prior, conjugate or improper prior, improper prior distributions may be placed on the unknown variables. * An additional set of cases occurs in Bayesian linear regression, where in the basic model the data is assumed to be normally distributed, and normal priors are placed on the regression coefficients. The resulting analysis is similar to the basic cases of independent identically distributed data. The formulas for the non-linear-regression cases are summarized in the conjugate prior article.


Sum of two quadratics


= Scalar form

= The following auxiliary formula is useful for simplifying the posterior distribution, posterior update equations, which otherwise become fairly tedious. :a(x-y)^2 + b(x-z)^2 = (a + b)\left(x - \frac\right)^2 + \frac(y-z)^2 This equation rewrites the sum of two quadratics in ''x'' by expanding the squares, grouping the terms in ''x'', and completing the square. Note the following about the complex constant factors attached to some of the terms: # The factor \frac has the form of a weighted average of ''y'' and ''z''. # \frac = \frac = (a^ + b^)^. This shows that this factor can be thought of as resulting from a situation where the Multiplicative inverse, reciprocals of quantities ''a'' and ''b'' add directly, so to combine ''a'' and ''b'' themselves, it's necessary to reciprocate, add, and reciprocate the result again to get back into the original units. This is exactly the sort of operation performed by the harmonic mean, so it is not surprising that \frac is one-half the harmonic mean of ''a'' and ''b''.


= Vector form

= A similar formula can be written for the sum of two vector quadratics: If x, y, z are vectors of length ''k'', and A and B are symmetric matrix, symmetric, invertible matrices of size k\times k, then : \begin & (\mathbf-\mathbf)'\mathbf(\mathbf-\mathbf) + (\mathbf-\mathbf)' \mathbf(\mathbf-\mathbf) \\ = & (\mathbf - \mathbf)'(\mathbf+\mathbf)(\mathbf - \mathbf) + (\mathbf - \mathbf)'(\mathbf^ + \mathbf^)^(\mathbf - \mathbf) \end where :\mathbf = (\mathbf + \mathbf)^(\mathbf\mathbf + \mathbf \mathbf) Note that the form x′ A x is called a
quadratic form In mathematics, a quadratic form is a polynomial with terms all of degree two ("form" is another name for a homogeneous polynomial). For example, :4x^2 + 2xy - 3y^2 is a quadratic form in the variables and . The coefficients usually belong to a ...
and is a scalar (mathematics), scalar: :\mathbf'\mathbf\mathbf = \sum_a_ x_i x_j In other words, it sums up all possible combinations of products of pairs of elements from x, with a separate coefficient for each. In addition, since x_i x_j = x_j x_i, only the sum a_ + a_ matters for any off-diagonal elements of A, and there is no loss of generality in assuming that A is symmetric matrix, symmetric. Furthermore, if A is symmetric, then the form \mathbf'\mathbf\mathbf = \mathbf'\mathbf\mathbf.


Sum of differences from the mean

Another useful formula is as follows: \sum_^n (x_i-\mu)^2 = \sum_^n (x_i-\bar)^2 + n(\bar -\mu)^2 where \bar = \frac \sum_^n x_i.


With known variance

For a set of i.i.d. normally distributed data points X of size ''n'' where each individual point ''x'' follows x \sim \mathcal(\mu, \sigma^2) with known
variance In probability theory and statistics, variance is the expectation of the squared deviation of a random variable from its population mean or sample mean. Variance is a measure of dispersion, meaning it is a measure of how far a set of numbers ...
σ2, the conjugate prior distribution is also normally distributed. This can be shown more easily by rewriting the variance as the
precision Precision, precise or precisely may refer to: Science, and technology, and mathematics Mathematics and computing (general) * Accuracy and precision, measurement deviation from true value and its scatter * Significant figures, the number of digit ...
, i.e. using τ = 1/σ2. Then if x \sim \mathcal(\mu, 1/\tau) and \mu \sim \mathcal(\mu_0, 1/\tau_0), we proceed as follows. First, the likelihood function is (using the formula above for the sum of differences from the mean): :\begin p(\mathbf\mid\mu,\tau) &= \prod_^n \sqrt \exp\left(-\frac\tau(x_i-\mu)^2\right) \\ &= \left(\frac\right)^ \exp\left(-\frac\tau \sum_^n (x_i-\mu)^2\right) \\ &= \left(\frac\right)^ \exp\left[-\frac\tau \left(\sum_^n(x_i-\bar)^2 + n(\bar -\mu)^2\right)\right]. \end Then, we proceed as follows: :\begin p(\mu\mid\mathbf) &\propto p(\mathbf\mid\mu) p(\mu) \\ & = \left(\frac\right)^ \exp\left[-\frac\tau \left(\sum_^n(x_i-\bar)^2 + n(\bar -\mu)^2\right)\right] \sqrt \exp\left(-\frac\tau_0(\mu-\mu_0)^2\right) \\ &\propto \exp\left(-\frac\left(\tau\left(\sum_^n(x_i-\bar)^2 + n(\bar -\mu)^2\right) + \tau_0(\mu-\mu_0)^2\right)\right) \\ &\propto \exp\left(-\frac \left(n\tau(\bar-\mu)^2 + \tau_0(\mu-\mu_0)^2 \right)\right) \\ &= \exp\left(-\frac(n\tau + \tau_0)\left(\mu - \dfrac\right)^2 + \frac(\bar - \mu_0)^2\right) \\ &\propto \exp\left(-\frac(n\tau + \tau_0)\left(\mu - \dfrac\right)^2\right) \end In the above derivation, we used the formula above for the sum of two quadratics and eliminated all constant factors not involving ''μ''. The result is the kernel (statistics), kernel of a normal distribution, with mean \frac and precision n\tau + \tau_0, i.e. :p(\mu\mid\mathbf) \sim \mathcal\left(\frac, \frac\right) This can be written as a set of Bayesian update equations for the posterior parameters in terms of the prior parameters: :\begin \tau_0' &= \tau_0 + n\tau \\[5pt] \mu_0' &= \frac \\[5pt] \bar &= \frac\sum_^n x_i \end That is, to combine ''n'' data points with total precision of ''nτ'' (or equivalently, total variance of ''n''/''σ''2) and mean of values \bar, derive a new total precision simply by adding the total precision of the data to the prior total precision, and form a new mean through a ''precision-weighted average'', i.e. a weighted average of the data mean and the prior mean, each weighted by the associated total precision. This makes logical sense if the precision is thought of as indicating the certainty of the observations: In the distribution of the posterior mean, each of the input components is weighted by its certainty, and the certainty of this distribution is the sum of the individual certainties. (For the intuition of this, compare the expression "the whole is (or is not) greater than the sum of its parts". In addition, consider that the knowledge of the posterior comes from a combination of the knowledge of the prior and likelihood, so it makes sense that we are more certain of it than of either of its components.) The above formula reveals why it is more convenient to do Bayesian analysis of conjugate priors for the normal distribution in terms of the precision. The posterior precision is simply the sum of the prior and likelihood precisions, and the posterior mean is computed through a precision-weighted average, as described above. The same formulas can be written in terms of variance by reciprocating all the precisions, yielding the more ugly formulas :\begin ' &= \frac \\[5pt] \mu_0' &= \frac \\[5pt] \bar &= \frac\sum_^n x_i \end


With known mean

For a set of i.i.d. normally distributed data points X of size ''n'' where each individual point ''x'' follows x \sim \mathcal(\mu, \sigma^2) with known mean μ, the conjugate prior of the
variance In probability theory and statistics, variance is the expectation of the squared deviation of a random variable from its population mean or sample mean. Variance is a measure of dispersion, meaning it is a measure of how far a set of numbers ...
has an inverse gamma distribution or a scaled inverse chi-squared distribution. The two are equivalent 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. The prior for σ2 is as follows: :p(\sigma^2\mid\nu_0,\sigma_0^2) = \frac~\frac \propto \frac The likelihood function from above, written in terms of the variance, is: :\begin p(\mathbf\mid\mu,\sigma^2) &= \left(\frac\right)^ \exp\left[-\frac \sum_^n (x_i-\mu)^2\right] \\ &= \left(\frac\right)^ \exp\left[-\frac\right] \end where :S = \sum_^n (x_i-\mu)^2. Then: :\begin p(\sigma^2\mid\mathbf) &\propto p(\mathbf\mid\sigma^2) p(\sigma^2) \\ &= \left(\frac\right)^ \exp\left[-\frac\right] \frac~\frac \\ &\propto \left(\frac\right)^ \frac \exp\left[-\frac + \frac\right] \\ &= \frac \exp\left[-\frac\right] \end The above is also a scaled inverse chi-squared distribution where :\begin \nu_0' &= \nu_0 + n \\ \nu_0'' &= \nu_0 \sigma_0^2 + \sum_^n (x_i-\mu)^2 \end or equivalently :\begin \nu_0' &= \nu_0 + n \\ ' &= \frac \end Reparameterizing in terms of an inverse gamma distribution, the result is: :\begin \alpha' &= \alpha + \frac \\ \beta' &= \beta + \frac \end


With unknown mean and unknown variance

For a set of i.i.d. normally distributed data points X of size ''n'' where each individual point ''x'' follows x \sim \mathcal(\mu, \sigma^2) with unknown mean μ and unknown
variance In probability theory and statistics, variance is the expectation of the squared deviation of a random variable from its population mean or sample mean. Variance is a measure of dispersion, meaning it is a measure of how far a set of numbers ...
σ2, a combined (multivariate) conjugate prior is placed over the mean and variance, consisting of a normal-inverse-gamma distribution. Logically, this originates as follows: # From the analysis of the case with unknown mean but known variance, we see that the update equations involve sufficient statistics computed from the data consisting of the mean of the data points and the total variance of the data points, computed in turn from the known variance divided by the number of data points. # From the analysis of the case with unknown variance but known mean, we see that the update equations involve sufficient statistics over the data consisting of the number of data points and sum of squared deviations. # Keep in mind that the posterior update values serve as the prior distribution when further data is handled. Thus, we should logically think of our priors in terms of the sufficient statistics just described, with the same semantics kept in mind as much as possible. # To handle the case where both mean and variance are unknown, we could place independent priors over the mean and variance, with fixed estimates of the average mean, total variance, number of data points used to compute the variance prior, and sum of squared deviations. Note however that in reality, the total variance of the mean depends on the unknown variance, and the sum of squared deviations that goes into the variance prior (appears to) depend on the unknown mean. In practice, the latter dependence is relatively unimportant: Shifting the actual mean shifts the generated points by an equal amount, and on average the squared deviations will remain the same. This is not the case, however, with the total variance of the mean: As the unknown variance increases, the total variance of the mean will increase proportionately, and we would like to capture this dependence. # This suggests that we create a ''conditional prior'' of the mean on the unknown variance, with a hyperparameter specifying the mean of the pseudo-observations associated with the prior, and another parameter specifying the number of pseudo-observations. This number serves as a scaling parameter on the variance, making it possible to control the overall variance of the mean relative to the actual variance parameter. The prior for the variance also has two hyperparameters, one specifying the sum of squared deviations of the pseudo-observations associated with the prior, and another specifying once again the number of pseudo-observations. Note that each of the priors has a hyperparameter specifying the number of pseudo-observations, and in each case this controls the relative variance of that prior. These are given as two separate hyperparameters so that the variance (aka the confidence) of the two priors can be controlled separately. # This leads immediately to the normal-inverse-gamma distribution, which is the product of the two distributions just defined, with conjugate priors used (an inverse gamma distribution over the variance, and a normal distribution over the mean, ''conditional'' on the variance) and with the same four parameters just defined. The priors are normally defined as follows: :\begin p(\mu\mid\sigma^2; \mu_0, n_0) &\sim \mathcal(\mu_0,\sigma^2/n_0) \\ p(\sigma^2; \nu_0,\sigma_0^2) &\sim I\chi^2(\nu_0,\sigma_0^2) = IG(\nu_0/2, \nu_0\sigma_0^2/2) \end The update equations can be derived, and look as follows: :\begin \bar &= \frac 1 n \sum_^n x_i \\ \mu_0' &= \frac \\ n_0' &= n_0 + n \\ \nu_0' &= \nu_0 + n \\ \nu_0'' &= \nu_0 \sigma_0^2 + \sum_^n (x_i-\bar)^2 + \frac(\mu_0 - \bar)^2 \end The respective numbers of pseudo-observations add the number of actual observations to them. The new mean hyperparameter is once again a weighted average, this time weighted by the relative numbers of observations. Finally, the update for \nu_0'' is similar to the case with known mean, but in this case the sum of squared deviations is taken with respect to the observed data mean rather than the true mean, and as a result a new "interaction term" needs to be added to take care of the additional error source stemming from the deviation between prior and data mean.


Occurrence and applications

The occurrence of normal distribution in practical problems can be loosely classified into four categories: # Exactly normal distributions; # Approximately normal laws, for example when such approximation is justified by the
central limit theorem In probability theory, the central limit theorem (CLT) establishes that, in many situations, when independent random variables are summed up, their properly normalized sum tends toward a normal distribution even if the original variables themselv ...
; and # Distributions modeled as normal – the normal distribution being the distribution with Principle of maximum entropy, maximum entropy for a given mean and variance. # Regression problems – the normal distribution being found after systematic effects have been modeled sufficiently well.


Exact normality

Certain quantities in physics are distributed normally, as was first demonstrated by James Clerk Maxwell. Examples of such quantities are: * Probability density function of a ground state in a quantum harmonic oscillator. * The position of a particle that experiences diffusion. If initially the particle is located at a specific point (that is its probability distribution is the Dirac delta function), then after time ''t'' its location is described by a normal distribution with variance ''t'', which satisfies the diffusion equation \frac f(x,t) = \frac \frac f(x,t). If the initial location is given by a certain density function g(x), then the density at time ''t'' is the convolution of ''g'' and the normal PDF.


Approximate normality

''Approximately'' normal distributions occur in many situations, as explained by the
central limit theorem In probability theory, the central limit theorem (CLT) establishes that, in many situations, when independent random variables are summed up, their properly normalized sum tends toward a normal distribution even if the original variables themselv ...
. When the outcome is produced by many small effects acting ''additively and independently'', its distribution will be close to normal. The normal approximation will not be valid if the effects act multiplicatively (instead of additively), or if there is a single external influence that has a considerably larger magnitude than the rest of the effects. * In counting problems, where the central limit theorem includes a discrete-to-continuum approximation and where Infinite divisibility, infinitely divisible and Indecomposable distribution, decomposable distributions are involved, such as ** binomial distribution, Binomial random variables, associated with binary response variables; ** Poisson distribution, Poisson random variables, associated with rare events; * Thermal radiation has a Bose–Einstein statistics, Bose–Einstein distribution on very short time scales, and a normal distribution on longer timescales due to the central limit theorem.


Assumed normality

There are statistical methods to empirically test that assumption; see the above #Normality tests, Normality tests section. * In biology, the ''logarithm'' of various variables tend to have a normal distribution, that is, they tend to have a
log-normal distribution In probability theory, a log-normal (or lognormal) distribution is a continuous probability distribution of a random variable whose logarithm is normally distributed. Thus, if the random variable is log-normally distributed, then has a normal ...
(after separation on male/female subpopulations), with examples including: ** Measures of size of living tissue (length, height, skin area, weight); ** The ''length'' of ''inert'' appendages (hair, claws, nails, teeth) of biological specimens, ''in the direction of growth''; presumably the thickness of tree bark also falls under this category; ** Certain physiological measurements, such as blood pressure of adult humans. * In finance, in particular the Black–Scholes model, changes in the ''logarithm'' of exchange rates, price indices, and stock market indices are assumed normal (these variables behave like compound interest, not like simple interest, and so are multiplicative). Some mathematicians such as Benoit Mandelbrot have argued that Levy skew alpha-stable distribution, log-Levy distributions, which possesses heavy tails would be a more appropriate model, in particular for the analysis for stock market crashes. The use of the assumption of normal distribution occurring in financial models has also been criticized by Nassim Nicholas Taleb in his works. * Propagation of uncertainty, Measurement errors in physical experiments are often modeled by a normal distribution. This use of a normal distribution does not imply that one is assuming the measurement errors are normally distributed, rather using the normal distribution produces the most conservative predictions possible given only knowledge about the mean and variance of the errors. * In Standardized testing (statistics), standardized testing, results can be made to have a normal distribution by either selecting the number and difficulty of questions (as in the Intelligence quotient, IQ test) or transforming the raw test scores into "output" scores by fitting them to the normal distribution. For example, the SAT's traditional range of 200–800 is based on a normal distribution with a mean of 500 and a standard deviation of 100. * Many scores are derived from the normal distribution, including percentile ranks ("percentiles" or "quantiles"), normal curve equivalents, stanines, Standard score, z-scores, and T-scores. Additionally, some behavioral statistical procedures assume that scores are normally distributed; for example, Student's t-test, t-tests and Analysis of variance, ANOVAs. Bell curve grading assigns relative grades based on a normal distribution of scores. * In hydrology the distribution of long duration river discharge or rainfall, e.g. monthly and yearly totals, is often thought to be practically normal according to the
central limit theorem In probability theory, the central limit theorem (CLT) establishes that, in many situations, when independent random variables are summed up, their properly normalized sum tends toward a normal distribution even if the original variables themselv ...
. The blue picture, made with CumFreq, illustrates an example of fitting the normal distribution to ranked October rainfalls showing the 90% confidence belt based on the
binomial distribution In probability theory and statistics, the binomial distribution with parameters ''n'' and ''p'' is the discrete probability distribution of the number of successes in a sequence of ''n'' independent experiments, each asking a yes–no quest ...
. The rainfall data are represented by plotting positions as part of the cumulative frequency analysis.


Methodological problems and peer review

John Ioannidis argues that using normally distributed standard deviations as standards for validating research findings leave falsifiability, falsifiable predictions about phenomena that are not normally distributed untested. This includes, for example, phenomena that only appear when all necessary conditions are present and one cannot be a substitute for another in an addition-like way and phenomena that are not randomly distributed. Ioannidis argues that standard deviation-centered validation gives a false appearance of validity to hypotheses and theories where some but not all falsifiable predictions are normally distributed since the portion of falsifiable predictions that there is evidence against may and in some cases are in the non-normally distributed parts of the range of falsifiable predictions, as well as baselessly dismissing hypotheses for which none of the falsifiable predictions are normally distributed as if were they unfalsifiable when in fact they do make falsifiable predictions. It is argued by Ioannidis that many cases of mutually exclusive theories being accepted as "validated" by research journals are caused by failure of the journals to take in empirical falsifications of non-normally distributed predictions, and not because mutually exclusive theories are true, which they cannot be, although two mutually exclusive theories can both be wrong and a third one correct.


Computational methods


Generating values from normal distribution

In computer simulations, especially in applications of the Monte-Carlo method, it is often desirable to generate values that are normally distributed. The algorithms listed below all generate the standard normal deviates, since a can be generated as , where ''Z'' is standard normal. All these algorithms rely on the availability of a random number generator ''U'' capable of producing Uniform distribution (continuous), uniform random variates. * The most straightforward method is based on the probability integral transform property: if ''U'' is distributed uniformly on (0,1), then Φ−1(''U'') will have the standard normal distribution. The drawback of this method is that it relies on calculation of the
probit function In probability theory and statistics, the probit function is the quantile function associated with the standard normal distribution. It has applications in data analysis and machine learning, in particular exploratory statistical graphics and ...
Φ−1, which cannot be done analytically. Some approximate methods are described in and in the error function, erf article. Wichura gives a fast algorithm for computing this function to 16 decimal places, which is used by R programming language, R to compute random variates of the normal distribution. * Irwin–Hall distribution#Approximating a Normal distribution, An easy-to-program approximate approach that relies on the
central limit theorem In probability theory, the central limit theorem (CLT) establishes that, in many situations, when independent random variables are summed up, their properly normalized sum tends toward a normal distribution even if the original variables themselv ...
is as follows: generate 12 uniform ''U''(0,1) deviates, add them all up, and subtract 6 – the resulting random variable will have approximately standard normal distribution. In truth, the distribution will be Irwin–Hall distribution, Irwin–Hall, which is a 12-section eleventh-order polynomial approximation to the normal distribution. This random deviate will have a limited range of (−6, 6). Note that in a true normal distribution, only 0.00034% of all samples will fall outside ±6σ. * The Box–Muller transform, Box–Muller method uses two independent random numbers ''U'' and ''V'' distributed uniform distribution (continuous), uniformly on (0,1). Then the two random variables ''X'' and ''Y'' X = \sqrt \, \cos(2 \pi V) , \qquad Y = \sqrt \, \sin(2 \pi V) . will both have the standard normal distribution, and will be
independent Independent or Independents may refer to: Arts, entertainment, and media Artist groups * Independents (artist group), a group of modernist painters based in the New Hope, Pennsylvania, area of the United States during the early 1930s * Independ ...
. This formulation arises because for a bivariate normal random vector (''X'', ''Y'') the squared norm will have the
chi-squared distribution In probability theory and statistics, the chi-squared distribution (also chi-square or \chi^2-distribution) with k degrees of freedom is the distribution of a sum of the squares of k independent standard normal random variables. The chi-squa ...
with two degrees of freedom, which is an easily generated exponential distribution, exponential random variable corresponding to the quantity −2ln(''U'') in these equations; and the angle is distributed uniformly around the circle, chosen by the random variable ''V''. * The Marsaglia polar method is a modification of the Box–Muller method which does not require computation of the sine and cosine functions. In this method, ''U'' and ''V'' are drawn from the uniform (−1,1) distribution, and then is computed. If ''S'' is greater or equal to 1, then the method starts over, otherwise the two quantities X = U\sqrt, \qquad Y = V\sqrt are returned. Again, ''X'' and ''Y'' are independent, standard normal random variables. * The Ratio method is a rejection method. The algorithm proceeds as follows: ** Generate two independent uniform deviates ''U'' and ''V''; ** Compute ''X'' = (''V'' − 0.5)/''U''; ** Optional: if ''X''2 ≤ 5 − 4''e''1/4''U'' then accept ''X'' and terminate algorithm; ** Optional: if ''X''2 ≥ 4''e''−1.35/''U'' + 1.4 then reject ''X'' and start over from step 1; ** If ''X''2 ≤ −4 ln''U'' then accept ''X'', otherwise start over the algorithm. *:The two optional steps allow the evaluation of the logarithm in the last step to be avoided in most cases. These steps can be greatly improved so that the logarithm is rarely evaluated. * The ziggurat algorithm is faster than the Box–Muller transform and still exact. In about 97% of all cases it uses only two random numbers, one random integer and one random uniform, one multiplication and an if-test. Only in 3% of the cases, where the combination of those two falls outside the "core of the ziggurat" (a kind of rejection sampling using logarithms), do exponentials and more uniform random numbers have to be employed. * Integer arithmetic can be used to sample from the standard normal distribution. This method is exact in the sense that it satisfies the conditions of ''ideal approximation''; i.e., it is equivalent to sampling a real number from the standard normal distribution and rounding this to the nearest representable floating point number. * There is also some investigation into the connection between the fast Hadamard transform and the normal distribution, since the transform employs just addition and subtraction and by the central limit theorem random numbers from almost any distribution will be transformed into the normal distribution. In this regard a series of Hadamard transforms can be combined with random permutations to turn arbitrary data sets into a normally distributed data.


Numerical approximations for the normal CDF and normal quantile function

The standard normal cumulative distribution function, CDF is widely used in scientific and statistical computing. The values Φ(''x'') may be approximated very accurately by a variety of methods, such as numerical integration, Taylor series, asymptotic series and Gauss's continued fraction#Of Kummer's confluent hypergeometric function, continued fractions. Different approximations are used depending on the desired level of accuracy. * give the approximation for Φ(''x'') for ''x > 0'' with the absolute error (algorith
26.2.17
: \Phi(x) = 1 - \varphi(x)\left(b_1 t + b_2 t^2 + b_3t^3 + b_4 t^4 + b_5 t^5\right) + \varepsilon(x), \qquad t = \frac, where ''ϕ''(''x'') is the standard normal PDF, and ''b''0 = 0.2316419, ''b''1 = 0.319381530, ''b''2 = −0.356563782, ''b''3 = 1.781477937, ''b''4 = −1.821255978, ''b''5 = 1.330274429. * lists some dozens of approximations – by means of rational functions, with or without exponentials – for the function. His algorithms vary in the degree of complexity and the resulting precision, with maximum absolute precision of 24 digits. An algorithm by combines Hart's algorithm 5666 with a continued fraction approximation in the tail to provide a fast computation algorithm with a 16-digit precision. * after recalling Hart68 solution is not suited for erf, gives a solution for both erf and erfc, with maximal relative error bound, via rational function, Rational Chebyshev Approximation. * suggested a simple algorithm based on the Taylor series expansion \Phi(x) = \frac12 + \varphi(x)\left( x + \frac 3 + \frac + \frac + \frac + \cdots \right) for calculating with arbitrary precision. The drawback of this algorithm is comparatively slow calculation time (for example it takes over 300 iterations to calculate the function with 16 digits of precision when ). * The GNU Scientific Library calculates values of the standard normal CDF using Hart's algorithms and approximations with Chebyshev polynomials. Shore (1982) introduced simple approximations that may be incorporated in stochastic optimization models of engineering and operations research, like reliability engineering and inventory analysis. Denoting , the simplest approximation for the quantile function is: z = \Phi^(p)=5.5556\left[1- \left( \frac p \right)^\right],\qquad p\ge 1/2 This approximation delivers for ''z'' a maximum absolute error of 0.026 (for , corresponding to ). For replace ''p'' by and change sign. Another approximation, somewhat less accurate, is the single-parameter approximation: z=-0.4115\left\, \qquad p\ge 1/2 The latter had served to derive a simple approximation for the loss integral of the normal distribution, defined by \begin L(z) & =\int_z^\infty (u-z)\varphi(u) \, du=\int_z^\infty [1-\Phi (u)] \, du \\[5pt] L(z) & \approx \begin 0.4115\left(\dfrac p \right) - z, & p<1/2, \\ \\ 0.4115\left( \dfrac p \right), & p\ge 1/2. \end \\[5pt] \text \\ L(z) & \approx \begin 0.4115\left\, & p < 1/2, \\ \\ 0.4115 \dfrac p, & p\ge 1/2. \end \end This approximation is particularly accurate for the right far-tail (maximum error of 10−3 for z≥1.4). Highly accurate approximations for the CDF, based on Response modeling methodology, Response Modeling Methodology (RMM, Shore, 2011, 2012), are shown in Shore (2005). Some more approximations can be found at: Error function#Approximation with elementary functions. In particular, small ''relative'' error on the whole domain for the CDF \Phi and the quantile function \Phi^ as well, is achieved via an explicitly invertible formula by Sergei Winitzki in 2008.


History


Development

Some authors attribute the credit for the discovery of the normal distribution to Abraham de Moivre, de Moivre, who in 1738 published in the second edition of his "''The Doctrine of Chances''" the study of the coefficients in the binomial expansion of . De Moivre proved that the middle term in this expansion has the approximate magnitude of 2^n/\sqrt, and that "If ''m'' or ''n'' be a Quantity infinitely great, then the Logarithm of the Ratio, which a Term distant from the middle by the Interval ''ℓ'', has to the middle Term, is -\frac." Although this theorem can be interpreted as the first obscure expression for the normal probability law, Stephen Stigler, Stigler points out that de Moivre himself did not interpret his results as anything more than the approximate rule for the binomial coefficients, and in particular de Moivre lacked the concept of the probability density function. In 1823 Carl Friedrich Gauss, Gauss published his monograph "''Theoria combinationis observationum erroribus minimis obnoxiae''" where among other things he introduces several important statistical concepts, such as the method of least squares, the method of maximum likelihood, and the ''normal distribution''. Gauss used ''M'', , to denote the measurements of some unknown quantity ''V'', and sought the "most probable" estimator of that quantity: the one that maximizes the probability of obtaining the observed experimental results. In his notation φΔ is the probability density function of the measurement errors of magnitude Δ. Not knowing what the function ''φ'' is, Gauss requires that his method should reduce to the well-known answer: the arithmetic mean of the measured values. Starting from these principles, Gauss demonstrates that the only law that rationalizes the choice of arithmetic mean as an estimator of the location parameter, is the normal law of errors: \varphi\mathit = \frac h \, e^, where ''h'' is "the measure of the precision of the observations". Using this normal law as a generic model for errors in the experiments, Gauss formulates what is now known as the non-linear least squares, non-linear weighted least squares method. Although Gauss was the first to suggest the normal distribution law, Pierre Simon de Laplace, Laplace made significant contributions. It was Laplace who first posed the problem of aggregating several observations in 1774, although his own solution led to the Laplacian distribution. It was Laplace who first calculated the value of the Gaussian integral, integral in 1782, providing the normalization constant for the normal distribution. Finally, it was Laplace who in 1810 proved and presented to the Academy the fundamental
central limit theorem In probability theory, the central limit theorem (CLT) establishes that, in many situations, when independent random variables are summed up, their properly normalized sum tends toward a normal distribution even if the original variables themselv ...
, which emphasized the theoretical importance of the normal distribution. It is of interest to note that in 1809 an Irish-American mathematician Robert Adrain published two insightful but flawed derivations of the normal probability law, simultaneously and independently from Gauss. His works remained largely unnoticed by the scientific community, until in 1871 they were exhumed by Cleveland Abbe, Abbe. In the middle of the 19th century James Clerk Maxwell, Maxwell demonstrated that the normal distribution is not just a convenient mathematical tool, but may also occur in natural phenomena: "The number of particles whose velocity, resolved in a certain direction, lies between ''x'' and ''x'' + ''dx'' is \operatorname \frac\; e^ \, dx


Naming

Today, the concept is usually known in English as the normal distribution or Gaussian distribution. Other less common names include Gauss distribution, Laplace-Gauss distribution, the law of error, the law of facility of errors, Laplace's second law, Gaussian law. Gauss himself apparently coined the term with reference to the "normal equations" involved in its applications, with normal having its technical meaning of orthogonal rather than "usual". However, by the end of the 19th century some authors had started using the name ''normal distribution'', where the word "normal" was used as an adjective – the term now being seen as a reflection of the fact that this distribution was seen as typical, common – and thus "normal". Charles Sanders Peirce, Peirce (one of those authors) once defined "normal" thus: "...the 'normal' is not the average (or any other kind of mean) of what actually occurs, but of what ''would'', in the long run, occur under certain circumstances." Around the turn of the 20th century Karl Pearson, Pearson popularized the term ''normal'' as a designation for this distribution. Also, it was Pearson who first wrote the distribution in terms of the standard deviation ''σ'' as in modern notation. Soon after this, in year 1915, Ronald Fisher, Fisher added the location parameter to the formula for normal distribution, expressing it in the way it is written nowadays: df = \frac e^ \, dx. The term "standard normal", which denotes the normal distribution with zero mean and unit variance came into general use around the 1950s, appearing in the popular textbooks by P. G. Hoel (1947) "''Introduction to mathematical statistics''" and A. M. Mood (1950) "''Introduction to the theory of statistics''".


See also

* Bates distribution – similar to the Irwin–Hall distribution, but rescaled back into the 0 to 1 range * Behrens–Fisher problem – the long-standing problem of testing whether two normal samples with different variances have same means; * Bhattacharyya distance – method used to separate mixtures of normal distributions * Erdős–Kac theorem – on the occurrence of the normal distribution in number theory * Full width at half maximum * Gaussian blur – convolution, which uses the normal distribution as a kernel * Modified half-normal distribution with the pdf on (0, \infty) is given as f(x)= \frac, where \Psi(\alpha,z)=_1\Psi_1\left(\begin\left(\alpha,\frac\right)\\(1,0)\end;z \right) denotes the Fox-Wright Psi function. * Normally distributed and uncorrelated does not imply independent * Ratio normal distribution * Reciprocal normal distribution * Standard normal table * Stein's lemma * Sub-Gaussian distribution * Sum of normally distributed random variables * Tweedie distribution – The normal distribution is a member of the family of Tweedie exponential dispersion models. * Wrapped normal distribution – the Normal distribution applied to a circular domain * Z-test – using the normal distribution


Notes


References


Citations


Sources

* * In particular, the entries fo
"bell-shaped and bell curve"
an

* * * * * * * * * * * * * * * * * * * * * * * * Translated by Stephen M. Stigler in ''Statistical Science'' 1 (3), 1986: . * * * * * * * * * * * * * * * * * * * * * * * * * * * *


External links

*
Normal distribution calculator
{{Authority control Normal distribution, Continuous distributions Conjugate prior distributions Exponential family distributions Stable distributions Location-scale family probability distributions]">X, ^p \right&= \sigma^p \cdot 2^ \frac _1F_1\left( -\frac, \frac, -\frac \left( \frac \mu \sigma \right)^2 \right). \end These expressions remain valid even if p is not an integer. See also Hermite polynomials#"Negative variance", generalized Hermite polynomials. The expectation of X conditioned on the event that X lies in an interval ,b/math> is given by :\operatorname\left \mid a= \mu - \sigma^2\frac where f and F respectively are the density and the cumulative distribution function of X. For b=\infty this is known as the
inverse Mills ratio In probability theory, the Mills ratio (or Mills's ratio) of a continuous random variable X is the function : m(x) := \frac , where f(x) is the probability density function, and :\bar(x) := \Pr x.html" ;"title=">x">>x= \int_x^ f(u)\, du is the ...
. Note that above, density f of X is used instead of standard normal density as in inverse Mills ratio, so here we have \sigma^2 instead of \sigma.


Fourier transform and characteristic function

The
Fourier transform A Fourier transform (FT) is a mathematical transform that decomposes functions into frequency components, which are represented by the output of the transform as a function of frequency. Most commonly functions of time or space are transformed, ...
of a normal density f with mean \mu and standard deviation \sigma is : \hat f(t) = \int_^\infty f(x)e^ \, dx = e^ e^ where i is the
imaginary unit The imaginary unit or unit imaginary number () is a solution to the quadratic equation x^2+1=0. Although there is no real number with this property, can be used to extend the real numbers to what are called complex numbers, using addition an ...
. If the mean \mu=0, the first factor is 1, and the Fourier transform is, apart from a constant factor, a normal density on the
frequency domain In physics, electronics, control systems engineering, and statistics, the frequency domain refers to the analysis of mathematical functions or signals with respect to frequency, rather than time. Put simply, a time-domain graph shows how a signa ...
, with mean 0 and standard deviation 1/\sigma. In particular, the standard normal distribution \varphi is an
eigenfunction In mathematics, an eigenfunction of a linear operator ''D'' defined on some function space is any non-zero function f in that space that, when acted upon by ''D'', is only multiplied by some scaling factor called an eigenvalue. As an equation, th ...
of the Fourier transform. In probability theory, the Fourier transform of the probability distribution of a real-valued random variable X is closely connected to the
characteristic function In mathematics, the term "characteristic function" can refer to any of several distinct concepts: * The indicator function of a subset, that is the function ::\mathbf_A\colon X \to \, :which for a given subset ''A'' of ''X'', has value 1 at points ...
\varphi_X(t) of that variable, which is defined as the
expected value In probability theory, the expected value (also called expectation, expectancy, mathematical expectation, mean, average, or first moment) is a generalization of the weighted average. Informally, the expected value is the arithmetic mean of a l ...
of e^, as a function of the real variable t (the
frequency Frequency is the number of occurrences of a repeating event per unit of time. It is also occasionally referred to as ''temporal frequency'' for clarity, and is distinct from ''angular frequency''. Frequency is measured in hertz (Hz) which is eq ...
parameter of the Fourier transform). This definition can be analytically extended to a complex-value variable t. The relation between both is: :\varphi_X(t) = \hat f(-t)


Moment and cumulant generating functions

The
moment generating function In probability theory and statistics, the moment-generating function of a real-valued random variable is an alternative specification of its probability distribution. Thus, it provides the basis of an alternative route to analytical results compare ...
of a real random variable X is the expected value of e^, as a function of the real parameter t. For a normal distribution with density f, mean \mu and deviation \sigma, the moment generating function exists and is equal to :M(t) = \operatorname ^= \hat f(it) = e^ e^ The
cumulant generating function In probability theory and statistics, the cumulants of a probability distribution are a set of quantities that provide an alternative to the '' moments'' of the distribution. Any two probability distributions whose moments are identical will have ...
is the logarithm of the moment generating function, namely :g(t) = \ln M(t) = \mu t + \tfrac 12 \sigma^2 t^2 Since this is a quadratic polynomial in t, only the first two
cumulant In probability theory and statistics, the cumulants of a probability distribution are a set of quantities that provide an alternative to the '' moments'' of the distribution. Any two probability distributions whose moments are identical will ha ...
s are nonzero, namely the mean \mu and the variance \sigma^2.


Stein operator and class

Within
Stein's method Stein's method is a general method in probability theory to obtain bounds on the distance between two probability distributions with respect to a probability metric. It was introduced by Charles Stein, who first published it in 1972, to obtain ...
the Stein operator and class of a random variable X \sim \mathcal(\mu, \sigma^2) are \mathcalf(x) = \sigma^2 f'(x) - (x-\mu)f(x) and \mathcal the class of all absolutely continuous functions f : \R \to \R \mbox\mathbb[, f'(X), ]< \infty.


Zero-variance limit

In the limit (mathematics), limit when \sigma tends to zero, the probability density f(x) eventually tends to zero at any x\ne \mu, but grows without limit if x = \mu, while its integral remains equal to 1. Therefore, the normal distribution cannot be defined as an ordinary
function Function or functionality may refer to: Computing * Function key, a type of key on computer keyboards * Function model, a structured representation of processes in a system * Function object or functor or functionoid, a concept of object-oriente ...
when \sigma = 0. However, one can define the normal distribution with zero variance as a
generalized function In mathematics, generalized functions are objects extending the notion of functions. There is more than one recognized theory, for example the theory of distributions. Generalized functions are especially useful in making discontinuous functions ...
; specifically, as Dirac's "delta function" \delta translated by the mean \mu, that is f(x)=\delta(x-\mu). Its CDF is then the
Heaviside step function The Heaviside step function, or the unit step function, usually denoted by or (but sometimes , or ), is a step function, named after Oliver Heaviside (1850–1925), the value of which is zero for negative arguments and one for positive argume ...
translated by the mean \mu, namely :F(x) = \begin 0 & \textx < \mu \\ 1 & \textx \geq \mu \end


Maximum entropy

Of all probability distributions over the reals with a specified mean \mu and variance \sigma^2, the normal distribution N(\mu,\sigma^2) is the one with maximum entropy. If X is a
continuous random variable In probability theory and statistics, a probability distribution is the mathematical function that gives the probabilities of occurrence of different possible outcomes for an experiment. It is a mathematical description of a random phenomenon i ...
with
probability density In probability theory, a probability density function (PDF), or density of a continuous random variable, is a function whose value at any given sample (or point) in the sample space (the set of possible values taken by the random variable) can ...
f(x), then the entropy of X is defined as : H(X) = - \int_^\infty f(x)\log f(x)\, dx where f(x)\log f(x) is understood to be zero whenever f(x)=0. This functional can be maximized, subject to the constraints that the distribution is properly normalized and has a specified variance, by using
variational calculus The calculus of variations (or Variational Calculus) is a field of mathematical analysis that uses variations, which are small changes in functions and functionals, to find maxima and minima of functionals: mappings from a set of functions t ...
. A function with two
Lagrange multipliers In mathematical optimization, the method of Lagrange multipliers is a strategy for finding the local maxima and minima of a function subject to equality constraints (i.e., subject to the condition that one or more equations have to be satisfied ex ...
is defined: : L=\int_^\infty f(x)\ln(f(x))\,dx-\lambda_0\left(1-\int_^\infty f(x)\,dx\right)-\lambda\left(\sigma^2-\int_^\infty f(x)(x-\mu)^2\,dx\right) where f(x) is, for now, regarded as some density function with mean \mu and standard deviation \sigma. At maximum entropy, a small variation \delta f(x) about f(x) will produce a variation \delta L about L which is equal to 0: : 0=\delta L=\int_^\infty \delta f(x)\left (\ln(f(x))+1+\lambda_0+\lambda(x-\mu)^2\right )\,dx Since this must hold for any small \delta f(x), the term in brackets must be zero, and solving for f(x) yields: :f(x)=e^ Using the constraint equations to solve for \lambda_0 and \lambda yields the density of the normal distribution: : f(x, \mu, \sigma)=\frace^ The entropy of a normal distribution is equal to : H(X)=\tfrac(1+\log(2\sigma^2\pi))


Other properties


Related distributions


Central limit theorem

The central limit theorem states that under certain (fairly common) conditions, the sum of many random variables will have an approximately normal distribution. More specifically, where X_1,\ldots ,X_n are
independent and identically distributed In probability theory and statistics, a collection of random variables is independent and identically distributed if each random variable has the same probability distribution as the others and all are mutually independent. This property is usua ...
random variables with the same arbitrary distribution, zero mean, and variance \sigma^2 and Z is their mean scaled by \sqrt : Z = \sqrt\left(\frac\sum_^n X_i\right) Then, as n increases, the probability distribution of Z will tend to the normal distribution with zero mean and variance \sigma^2. The theorem can be extended to variables (X_i) that are not independent and/or not identically distributed if certain constraints are placed on the degree of dependence and the moments of the distributions. Many
test statistic A test statistic is a statistic (a quantity derived from the sample) used in statistical hypothesis testing.Berger, R. L.; Casella, G. (2001). ''Statistical Inference'', Duxbury Press, Second Edition (p.374) A hypothesis test is typically specif ...
s, scores, and
estimator In statistics, an estimator is a rule for calculating an estimate of a given quantity based on observed data: thus the rule (the estimator), the quantity of interest (the estimand) and its result (the estimate) are distinguished. For example, the ...
s encountered in practice contain sums of certain random variables in 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 distributions. The central limit theorem also implies that certain distributions can be approximated by the normal distribution, for example: * The
binomial distribution In probability theory and statistics, the binomial distribution with parameters ''n'' and ''p'' is the discrete probability distribution of the number of successes in a sequence of ''n'' independent experiments, each asking a yes–no quest ...
B(n,p) is approximately normal with mean np and variance np(1-p) for large n and for p not too close to 0 or 1. * The
Poisson distribution In probability theory and statistics, the Poisson distribution is a discrete probability distribution that expresses the probability of a given number of events occurring in a fixed interval of time or space if these events occur with a known co ...
with parameter \lambda is approximately normal with mean \lambda and variance \lambda, for large values of \lambda. * The
chi-squared distribution In probability theory and statistics, the chi-squared distribution (also chi-square or \chi^2-distribution) with k degrees of freedom is the distribution of a sum of the squares of k independent standard normal random variables. The chi-squa ...
\chi^2(k) is approximately normal with mean k and variance 2k, for large k. * The
Student's t-distribution In probability and statistics, Student's ''t''-distribution (or simply the ''t''-distribution) is any member of a family of continuous probability distributions that arise when estimating the mean of a normally distributed population in sit ...
t(\nu) is approximately normal with mean 0 and variance 1 when \nu is large. Whether these approximations are sufficiently accurate depends on the purpose for which they are needed, and the rate of convergence to the normal distribution. It is typically the case that such approximations are less accurate in the tails of the distribution. A general upper bound for the approximation error in the central limit theorem is given by the
Berry–Esseen theorem In probability theory, the central limit theorem states that, under certain circumstances, the probability distribution of the scaled mean of a random sample converges to a normal distribution as the sample size increases to infinity. Under strong ...
, improvements of the approximation are given by the
Edgeworth expansion The Gram–Charlier A series (named in honor of Jørgen Pedersen Gram and Carl Charlier), and the Edgeworth series (named in honor of Francis Ysidro Edgeworth) are series that approximate a probability distribution in terms of its cumulants. The se ...
s. This theorem can also be used to justify modeling the sum of many uniform noise sources as
Gaussian noise Gaussian noise, named after Carl Friedrich Gauss, is a term from signal processing theory denoting a kind of signal noise that has a probability density function (pdf) equal to that of the normal distribution (which is also known as the Gaussia ...
. See
AWGN Additive white Gaussian noise (AWGN) is a basic noise model used in information theory to mimic the effect of many random processes that occur in nature. The modifiers denote specific characteristics: * ''Additive'' because it is added to any nois ...
.


Operations and functions of normal variables

The
probability density In probability theory, a probability density function (PDF), or density of a continuous random variable, is a function whose value at any given sample (or point) in the sample space (the set of possible values taken by the random variable) can ...
,
cumulative distribution In statistics, the frequency (or absolute frequency) of an event i is the number n_i of times the observation has occurred/recorded in an experiment or study. These frequencies are often depicted graphically or in tabular form. Types The cumul ...
, and inverse cumulative distribution of any function of one or more independent or correlated normal variables can be computed with the numerical method of ray-tracing
Matlab code
. In the following sections we look at some special cases.


Operations on a single normal variable

If X is distributed normally with mean \mu and variance \sigma^2, then * aX+b, for any real numbers a and b, is also normally distributed, with mean a\mu+b and standard deviation , a, \sigma. That is, the family of normal distributions is closed under linear transformations. * The exponential of X is distributed log-normally: . * The absolute value of X has
folded normal distribution The folded normal distribution is a probability distribution related to the normal distribution. Given a normally distributed random variable ''X'' with mean ''μ'' and variance ''σ''2, the random variable ''Y'' = , ''X'', has a folded normal d ...
: . If \mu = 0 this is known as the
half-normal distribution In probability theory and statistics, the half-normal distribution is a special case of the folded normal distribution. Let X follow an ordinary normal distribution, N(0,\sigma^2). Then, Y=, X, follows a half-normal distribution. Thus, the hal ...
. * The absolute value of normalized residuals, , ''X'' − ''μ'', /''σ'', has
chi distribution In probability theory and statistics, the chi distribution is a continuous probability distribution. It is the distribution of the positive square root of the sum of squares of a set of independent random variables each following a standard norm ...
with one degree of freedom: , X - \mu, / \sigma \sim \chi_1. * The square of ''X''/''σ'' has the
noncentral chi-squared distribution In probability theory and statistics, the noncentral chi-squared distribution (or noncentral chi-square distribution, noncentral \chi^2 distribution) is a noncentral generalization of the chi-squared distribution. It often arises in the power a ...
with one degree of freedom: X^2 / \sigma^2 \sim \chi_1^2(\mu^2 / \sigma^2). If \mu = 0, the distribution is called simply chi-squared. * The log likelihood of a normal variable x is simply the log of its
probability density function In probability theory, a probability density function (PDF), or density of a continuous random variable, is a function whose value at any given sample (or point) in the sample space (the set of possible values taken by the random variable) can ...
: \ln p(x)= -\frac \left(\frac \right)^2 -\ln \left(\sigma \sqrt \right) = -\frac z^2 -\ln \left(\sigma \sqrt \right). Since this is a scaled and shifted square of a standard normal variable, it is distributed as a scaled and shifted chi-squared variable. * The distribution of the variable ''X'' restricted to an interval 'a'', ''b''is called the
truncated normal distribution In probability and statistics, the truncated normal distribution is the probability distribution derived from that of a normally distributed random variable by bounding the random variable from either below or above (or both). The truncated no ...
. * (''X'' − ''μ'')−2 has a
Lévy distribution In probability theory and statistics, the Lévy distribution, named after Paul Lévy, is a continuous probability distribution for a non-negative random variable. In spectroscopy, this distribution, with frequency as the dependent variable, is kn ...
with location 0 and scale ''σ''−2.


= Operations on two independent normal variables

= * If X_1 and X_2 are two
independent Independent or Independents may refer to: Arts, entertainment, and media Artist groups * Independents (artist group), a group of modernist painters based in the New Hope, Pennsylvania, area of the United States during the early 1930s * Independ ...
normal random variables, with means \mu_1, \mu_2 and standard deviations \sigma_1, \sigma_2, then their sum X_1 + X_2 will also be normally distributed, roof/sup> with mean \mu_1 + \mu_2 and variance \sigma_1^2 + \sigma_2^2. * In particular, if X and Y are independent normal deviates with zero mean and variance \sigma^2, then X + Y and X - Y are also independent and normally distributed, with zero mean and variance 2\sigma^2. This is a special case of the
polarization identity In linear algebra, a branch of mathematics, the polarization identity is any one of a family of formulas that express the inner product of two vectors in terms of the norm of a normed vector space. If a norm arises from an inner product then t ...
. * If X_1, X_2 are two independent normal deviates with mean \mu and deviation \sigma, and a, b are arbitrary real numbers, then the variable X_3 = \frac + \mu is also normally distributed with mean \mu and deviation \sigma. It follows that the normal distribution is
stable A stable is a building in which livestock, especially horses, are kept. It most commonly means a building that is divided into separate stalls for individual animals and livestock. There are many different types of stables in use today; the ...
(with exponent \alpha=2).


= Operations on two independent standard normal variables

= If X_1 and X_2 are two independent standard normal random variables with mean 0 and variance 1, then * Their sum and difference is distributed normally with mean zero and variance two: X_1 \pm X_2 \sim N(0, 2). * Their product Z = X_1 X_2 follows the
product distribution A product distribution is a probability distribution constructed as the distribution of the product of random variables having two other known distributions. Given two statistically independent random variables ''X'' and ''Y'', the distribution of ...
with density function f_Z(z) = \pi^ K_0(, z, ) where K_0 is the
modified Bessel function of the second kind Bessel functions, first defined by the mathematician Daniel Bernoulli and then generalized by Friedrich Bessel, are canonical solutions of Bessel's differential equation x^2 \frac + x \frac + \left(x^2 - \alpha^2 \right)y = 0 for an arbitrary ...
. This distribution is symmetric around zero, unbounded at z = 0, and has the
characteristic function In mathematics, the term "characteristic function" can refer to any of several distinct concepts: * The indicator function of a subset, that is the function ::\mathbf_A\colon X \to \, :which for a given subset ''A'' of ''X'', has value 1 at points ...
\phi_Z(t) = (1 + t^2)^. * Their ratio follows the standard
Cauchy distribution The Cauchy distribution, named after Augustin Cauchy, is a continuous probability distribution. It is also known, especially among physicists, as the Lorentz distribution (after Hendrik Lorentz), Cauchy–Lorentz distribution, Lorentz(ian) fun ...
: X_1/ X_2 \sim \operatorname(0, 1). * Their Euclidean norm \sqrt has the
Rayleigh distribution In probability theory and statistics, the Rayleigh distribution is a continuous probability distribution for nonnegative-valued random variables. Up to rescaling, it coincides with the chi distribution with two degrees of freedom. The distribut ...
.


Operations on multiple independent normal variables

* Any linear combination of independent normal deviates is a normal deviate. * If X_1, X_2, \ldots, X_n are independent standard normal random variables, then the sum of their squares has the
chi-squared distribution In probability theory and statistics, the chi-squared distribution (also chi-square or \chi^2-distribution) with k degrees of freedom is the distribution of a sum of the squares of k independent standard normal random variables. The chi-squa ...
with n degrees of freedom X_1^2 + \cdots + X_n^2 \sim \chi_n^2. * If X_1, X_2, \ldots, X_n are independent normally distributed random variables with means \mu and variances \sigma^2, then their
sample mean The sample mean (or "empirical mean") and the sample covariance are statistics computed from a Sample (statistics), sample of data on one or more random variables. The sample mean is the average value (or mean, mean value) of a sample (statistic ...
is independent from the sample
standard deviation In statistics, the standard deviation is a measure of the amount of variation or dispersion of a set of values. A low standard deviation indicates that the values tend to be close to the mean (also called the expected value) of the set, while ...
, which can be demonstrated using Basu's theorem or
Cochran's theorem In statistics, Cochran's theorem, devised by William G. Cochran, is a theorem used to justify results relating to the probability distributions of statistics that are used in the analysis of variance. Statement Let ''U''1, ..., ''U'N'' be i.i. ...
. The ratio of these two quantities will have the
Student's t-distribution In probability and statistics, Student's ''t''-distribution (or simply the ''t''-distribution) is any member of a family of continuous probability distributions that arise when estimating the mean of a normally distributed population in sit ...
with n-1 degrees of freedom: t = \frac = \frac \sim t_. * If X_1, X_2, \ldots, X_n, Y_1, Y_2, \ldots, Y_m are independent standard normal random variables, then the ratio of their normalized sums of squares will have the with degrees of freedom: F = \frac \sim F_.


Operations on multiple correlated normal variables

* A
quadratic form In mathematics, a quadratic form is a polynomial with terms all of degree two ("form" is another name for a homogeneous polynomial). For example, :4x^2 + 2xy - 3y^2 is a quadratic form in the variables and . The coefficients usually belong to a ...
of a normal vector, i.e. a quadratic function q = \sum x_i^2 + \sum x_j + c of multiple independent or correlated normal variables, is a generalized chi-square variable.


Operations on the density function

The split normal distribution is most directly defined in terms of joining scaled sections of the density functions of different normal distributions and rescaling the density to integrate to one. The
truncated normal distribution In probability and statistics, the truncated normal distribution is the probability distribution derived from that of a normally distributed random variable by bounding the random variable from either below or above (or both). The truncated no ...
results from rescaling a section of a single density function.


Infinite divisibility and Cramér's theorem

For any positive integer \text, any normal distribution with mean \mu and variance \sigma^2 is the distribution of the sum of \text independent normal deviates, each with mean \frac and variance \frac. This property is called
infinite divisibility Infinite divisibility arises in different ways in philosophy, physics, economics, order theory (a branch of mathematics), and probability theory (also a branch of mathematics). One may speak of infinite divisibility, or the lack thereof, of matter ...
. Conversely, if X_1 and X_2 are independent random variables and their sum X_1+X_2 has a normal distribution, then both X_1 and X_2 must be normal deviates. This result is known as Cramér's decomposition theorem, and is equivalent to saying that the convolution of two distributions is normal if and only if both are normal. Cramér's theorem implies that a linear combination of independent non-Gaussian variables will never have an exactly normal distribution, although it may approach it arbitrarily closely.


Bernstein's theorem

Bernstein's theorem states that if X and Y are independent and X + Y and X - Y are also independent, then both ''X'' and ''Y'' must necessarily have normal distributions. More generally, if X_1, \ldots, X_n are independent random variables, then two distinct linear combinations \sum and \sumwill be independent if and only if all X_k are normal and \sum, where \sigma_k^2 denotes the variance of X_k.


Extensions

The notion of normal distribution, being one of the most important distributions in probability theory, has been extended far beyond the standard framework of the univariate (that is one-dimensional) case (Case 1). All these extensions are also called ''normal'' or ''Gaussian'' laws, so a certain ambiguity in names exists. * The
multivariate normal distribution In probability theory and statistics, the multivariate normal distribution, multivariate Gaussian distribution, or joint normal distribution is a generalization of the one-dimensional (univariate) normal distribution to higher dimensions. One d ...
describes the Gaussian law in the ''k''-dimensional Euclidean space. A vector is multivariate-normally distributed if any linear combination of its components has a (univariate) normal distribution. The variance of ''X'' is a ''k×k'' symmetric positive-definite matrix ''V''. The multivariate normal distribution is a special case of the
elliptical distribution In probability and statistics, an elliptical distribution is any member of a broad family of probability distributions that generalize the multivariate normal distribution. Intuitively, in the simplified two and three dimensional case, the joint di ...
s. As such, its iso-density loci in the ''k'' = 2 case are ellipses and in the case of arbitrary ''k'' are ellipsoids. * Rectified Gaussian distribution a rectified version of normal distribution with all the negative elements reset to 0 * Complex normal distribution deals with the complex normal vectors. A complex vector is said to be normal if both its real and imaginary components jointly possess a 2''k''-dimensional multivariate normal distribution. The variance-covariance structure of ''X'' is described by two matrices: the ''variance'' matrix Γ, and the ''relation'' matrix ''C''. * Matrix normal distribution describes the case of normally distributed matrices. * Gaussian processes are the normally distributed stochastic processes. These can be viewed as elements of some infinite-dimensional Hilbert space ''H'', and thus are the analogues of multivariate normal vectors for the case . A random element is said to be normal if for any constant the scalar product has a (univariate) normal distribution. The variance structure of such Gaussian random element can be described in terms of the linear ''covariance ''. Several Gaussian processes became popular enough to have their own names: ** Wiener process, Brownian motion, ** Brownian bridge, ** Ornstein–Uhlenbeck process. * Gaussian q-distribution is an abstract mathematical construction that represents a "q-analogue" of the normal distribution. * the q-Gaussian is an analogue of the Gaussian distribution, in the sense that it maximises the Tsallis entropy, and is one type of Tsallis distribution. Note that this distribution is different from the Gaussian q-distribution above. * The Kaniadakis Gaussian distribution, Kaniadakis ''κ''-Gaussian distribution is a generalization of the Gaussian distribution which arises from the Kaniadakis statistics, being one of the Kaniadakis distribution, Kaniadakis distributions. A random variable ''X'' has a two-piece normal distribution if it has a distribution : f_X( x ) = N( \mu, \sigma_1^2 ) \text x \le \mu : f_X( x ) = N( \mu, \sigma_2^2 ) \text x \ge \mu where ''μ'' is the mean and ''σ''1 and ''σ''2 are the standard deviations of the distribution to the left and right of the mean respectively. The mean, variance and third central moment of this distribution have been determined : \operatorname( X ) = \mu + \sqrt ( \sigma_2 - \sigma_1 ) : \operatorname( X ) = \left( 1 - \frac 2 \pi\right)( \sigma_2 - \sigma_1 )^2 + \sigma_1 \sigma_2 : \operatorname( X ) = \sqrt( \sigma_2 - \sigma_1 ) \left[ \left( \frac 4 \pi - 1 \right) ( \sigma_2 - \sigma_1)^2 + \sigma_1 \sigma_2 \right] where E(''X''), V(''X'') and T(''X'') are the mean, variance, and third central moment respectively. One of the main practical uses of the Gaussian law is to model the empirical distributions of many different random variables encountered in practice. In such case a possible extension would be a richer family of distributions, having more than two parameters and therefore being able to fit the empirical distribution more accurately. The examples of such extensions are: * Pearson distribution — a four-parameter family of probability distributions that extend the normal law to include different skewness and kurtosis values. * The generalized normal distribution, also known as the exponential power distribution, allows for distribution tails with thicker or thinner asymptotic behaviors.


Statistical inference


Estimation of parameters

It is often the case that we do not know the parameters of the normal distribution, but instead want to Estimation theory, estimate them. That is, having a sample (x_1, \ldots, x_n) from a normal N(\mu, \sigma^2) population we would like to learn the approximate values of parameters \mu and \sigma^2. The standard approach to this problem is the maximum likelihood method, which requires maximization of the ''log-likelihood function'': : \ln\mathcal(\mu,\sigma^2) = \sum_^n \ln f(x_i\mid\mu,\sigma^2) = -\frac\ln(2\pi) - \frac\ln\sigma^2 - \frac\sum_^n (x_i-\mu)^2. Taking derivatives with respect to \mu and \sigma^2 and solving the resulting system of first order conditions yields the ''maximum likelihood estimates'': : \hat = \overline \equiv \frac\sum_^n x_i, \qquad \hat^2 = \frac \sum_^n (x_i - \overline)^2.


Sample mean

Estimator \textstyle\hat\mu is called the ''
sample mean The sample mean (or "empirical mean") and the sample covariance are statistics computed from a Sample (statistics), sample of data on one or more random variables. The sample mean is the average value (or mean, mean value) of a sample (statistic ...
'', since it is the arithmetic mean of all observations. The statistic \textstyle\overline is complete statistic, complete and sufficient statistic, sufficient for \mu, and therefore by the Lehmann–Scheffé theorem, \textstyle\hat\mu is the uniformly minimum variance unbiased (UMVU) estimator. In finite samples it is distributed normally: : \hat\mu \sim \mathcal(\mu,\sigma^2/n). The variance of this estimator is equal to the ''μμ''-element of the inverse Fisher information matrix \textstyle\mathcal^. This implies that the estimator is efficient estimator, finite-sample efficient. Of practical importance is the fact that the standard error (statistics), standard error of \textstyle\hat\mu is proportional to \textstyle1/\sqrt, that is, if one wishes to decrease the standard error by a factor of 10, one must increase the number of points in the sample by a factor of 100. This fact is widely used in determining sample sizes for opinion polls and the number of trials in Monte Carlo simulations. From the standpoint of the asymptotic theory (statistics), asymptotic theory, \textstyle\hat\mu is consistent estimator, consistent, that is, it convergence in probability, converges in probability to \mu as n\rightarrow\infty. The estimator is also asymptotic normality, asymptotically normal, which is a simple corollary of the fact that it is normal in finite samples: : \sqrt(\hat\mu-\mu) \,\xrightarrow\, \mathcal(0,\sigma^2).


Sample variance

The estimator \textstyle\hat\sigma^2 is called the ''sample variance'', since it is the variance of the sample ((x_1, \ldots, x_n)). In practice, another estimator is often used instead of the \textstyle\hat\sigma^2. This other estimator is denoted s^2, and is also called the ''sample variance'', which represents a certain ambiguity in terminology; its square root s is called the ''sample standard deviation''. The estimator s^2 differs from \textstyle\hat\sigma^2 by having instead of ''n'' in the denominator (the so-called Bessel's correction): : s^2 = \frac \hat\sigma^2 = \frac \sum_^n (x_i - \overline)^2. The difference between s^2 and \textstyle\hat\sigma^2 becomes negligibly small for large ''n''s. In finite samples however, the motivation behind the use of s^2 is that it is an unbiased estimator of the underlying parameter \sigma^2, whereas \textstyle\hat\sigma^2 is biased. Also, by the Lehmann–Scheffé theorem the estimator s^2 is uniformly minimum variance unbiased (Minimum-variance unbiased estimator, UMVU), which makes it the "best" estimator among all unbiased ones. However it can be shown that the biased estimator \textstyle\hat\sigma^2 is "better" than the s^2 in terms of the mean squared error (MSE) criterion. In finite samples both s^2 and \textstyle\hat\sigma^2 have scaled
chi-squared distribution In probability theory and statistics, the chi-squared distribution (also chi-square or \chi^2-distribution) with k degrees of freedom is the distribution of a sum of the squares of k independent standard normal random variables. The chi-squa ...
with degrees of freedom: : s^2 \sim \frac \cdot \chi^2_, \qquad \hat\sigma^2 \sim \frac \cdot \chi^2_. The first of these expressions shows that the variance of s^2 is equal to 2\sigma^4/(n-1), which is slightly greater than the ''σσ''-element of the inverse Fisher information matrix \textstyle\mathcal^. Thus, s^2 is not an efficient estimator for \sigma^2, and moreover, since s^2 is UMVU, we can conclude that the finite-sample efficient estimator for \sigma^2 does not exist. Applying the asymptotic theory, both estimators s^2 and \textstyle\hat\sigma^2 are consistent, that is they converge in probability to \sigma^2 as the sample size n\rightarrow\infty. The two estimators are also both asymptotically normal: : \sqrt(\hat\sigma^2 - \sigma^2) \simeq \sqrt(s^2-\sigma^2) \,\xrightarrow\, \mathcal(0,2\sigma^4). In particular, both estimators are asymptotically efficient for \sigma^2.


Confidence intervals

By
Cochran's theorem In statistics, Cochran's theorem, devised by William G. Cochran, is a theorem used to justify results relating to the probability distributions of statistics that are used in the analysis of variance. Statement Let ''U''1, ..., ''U'N'' be i.i. ...
, for normal distributions the sample mean \textstyle\hat\mu and the sample variance ''s''2 are
independent Independent or Independents may refer to: Arts, entertainment, and media Artist groups * Independents (artist group), a group of modernist painters based in the New Hope, Pennsylvania, area of the United States during the early 1930s * Independ ...
, which means there can be no gain in considering their joint distribution. There is also a converse theorem: if in a sample the sample mean and sample variance are independent, then the sample must have come from the normal distribution. The independence between \textstyle\hat\mu and ''s'' can be employed to construct the so-called ''t-statistic'': : t = \frac = \frac \sim t_ This quantity ''t'' has the
Student's t-distribution In probability and statistics, Student's ''t''-distribution (or simply the ''t''-distribution) is any member of a family of continuous probability distributions that arise when estimating the mean of a normally distributed population in sit ...
with degrees of freedom, and it is an ancillary statistic (independent of the value of the parameters). Inverting the distribution of this ''t''-statistics will allow us to construct the
confidence interval In frequentist statistics, a confidence interval (CI) is a range of estimates for an unknown parameter. A confidence interval is computed at a designated ''confidence level''; the 95% confidence level is most common, but other levels, such as 9 ...
for ''μ''; similarly, inverting the ''χ''2 distribution of the statistic ''s''2 will give us the confidence interval for ''σ''2: :\mu \in \left[ \hat\mu - t_ \fracs, \hat\mu + t_ \fracs \right], :\sigma^2 \in \left[ \frac, \frac \right], where ''tk,p'' and are the ''p''th
quantile In statistics and probability, quantiles are cut points dividing the range of a probability distribution into continuous intervals with equal probabilities, or dividing the observations in a sample in the same way. There is one fewer quantile tha ...
s of the ''t''- and ''χ''2-distributions respectively. These confidence intervals are of the ''confidence level'' , meaning that the true values ''μ'' and ''σ''2 fall outside of these intervals with probability (or significance level) ''α''. In practice people usually take , resulting in the 95% confidence intervals. Approximate formulas can be derived from the asymptotic distributions of \textstyle\hat\mu and ''s''2: :\mu \in \left[ \hat\mu - , z_, \fracs, \hat\mu + , z_, \fracs \right], :\sigma^2 \in \left[ s^2 - , z_, \fracs^2, s^2 + , z_, \fracs^2 \right], The approximate formulas become valid for large values of ''n'', and are more convenient for the manual calculation since the standard normal quantiles ''z''''α''/2 do not depend on ''n''. In particular, the most popular value of , results in .


Normality tests

Normality tests assess the likelihood that the given data set comes from a normal distribution. Typically the null hypothesis ''H''0 is that the observations are distributed normally with unspecified mean ''μ'' and variance ''σ''2, versus the alternative ''Ha'' that the distribution is arbitrary. Many tests (over 40) have been devised for this problem. The more prominent of them are outlined below: Diagnostic plots are more intuitively appealing but subjective at the same time, as they rely on informal human judgement to accept or reject the null hypothesis. *
Q–Q plot In statistics, a Q–Q plot (quantile-quantile plot) is a probability plot, a List of graphical methods, graphical method for comparing two probability distributions by plotting their ''quantiles'' against each other. A point on the plot co ...
, also known as normal probability plot or rankit plot—is a plot of the sorted values from the data set against the expected values of the corresponding quantiles from the standard normal distribution. That is, it's a plot of point of the form (Φ−1(''pk''), ''x''(''k'')), where plotting points ''pk'' are equal to ''pk'' = (''k'' − ''α'')/(''n'' + 1 − 2''α'') and ''α'' is an adjustment constant, which can be anything between 0 and 1. If the null hypothesis is true, the plotted points should approximately lie on a straight line. * P–P plot – similar to the Q–Q plot, but used much less frequently. This method consists of plotting the points (Φ(''z''(''k'')), ''pk''), where \textstyle z_ = (x_-\hat\mu)/\hat\sigma. For normally distributed data this plot should lie on a 45° line between (0, 0) and (1, 1). Goodness-of-fit tests: ''Moment-based tests'': * D'Agostino's K-squared test * Jarque–Bera test * Shapiro–Wilk test: This is based on the fact that the line in the Q–Q plot has the slope of ''σ''. The test compares the least squares estimate of that slope with the value of the sample variance, and rejects the null hypothesis if these two quantities differ significantly. ''Tests based on the empirical distribution function'': * Anderson–Darling test * Lilliefors test (an adaptation of the Kolmogorov–Smirnov test)


Bayesian analysis of the normal distribution

Bayesian analysis of normally distributed data is complicated by the many different possibilities that may be considered: * Either the mean, or the variance, or neither, may be considered a fixed quantity. * When the variance is unknown, analysis may be done directly in terms of the variance, or in terms of the
precision Precision, precise or precisely may refer to: Science, and technology, and mathematics Mathematics and computing (general) * Accuracy and precision, measurement deviation from true value and its scatter * Significant figures, the number of digit ...
, the reciprocal of the variance. The reason for expressing the formulas in terms of precision is that the analysis of most cases is simplified. * Both univariate and multivariate normal distribution, multivariate cases need to be considered. * Either conjugate prior, conjugate or improper prior, improper prior distributions may be placed on the unknown variables. * An additional set of cases occurs in Bayesian linear regression, where in the basic model the data is assumed to be normally distributed, and normal priors are placed on the regression coefficients. The resulting analysis is similar to the basic cases of independent identically distributed data. The formulas for the non-linear-regression cases are summarized in the conjugate prior article.


Sum of two quadratics


= Scalar form

= The following auxiliary formula is useful for simplifying the posterior distribution, posterior update equations, which otherwise become fairly tedious. :a(x-y)^2 + b(x-z)^2 = (a + b)\left(x - \frac\right)^2 + \frac(y-z)^2 This equation rewrites the sum of two quadratics in ''x'' by expanding the squares, grouping the terms in ''x'', and completing the square. Note the following about the complex constant factors attached to some of the terms: # The factor \frac has the form of a weighted average of ''y'' and ''z''. # \frac = \frac = (a^ + b^)^. This shows that this factor can be thought of as resulting from a situation where the Multiplicative inverse, reciprocals of quantities ''a'' and ''b'' add directly, so to combine ''a'' and ''b'' themselves, it's necessary to reciprocate, add, and reciprocate the result again to get back into the original units. This is exactly the sort of operation performed by the harmonic mean, so it is not surprising that \frac is one-half the harmonic mean of ''a'' and ''b''.


= Vector form

= A similar formula can be written for the sum of two vector quadratics: If x, y, z are vectors of length ''k'', and A and B are symmetric matrix, symmetric, invertible matrices of size k\times k, then : \begin & (\mathbf-\mathbf)'\mathbf(\mathbf-\mathbf) + (\mathbf-\mathbf)' \mathbf(\mathbf-\mathbf) \\ = & (\mathbf - \mathbf)'(\mathbf+\mathbf)(\mathbf - \mathbf) + (\mathbf - \mathbf)'(\mathbf^ + \mathbf^)^(\mathbf - \mathbf) \end where :\mathbf = (\mathbf + \mathbf)^(\mathbf\mathbf + \mathbf \mathbf) Note that the form x′ A x is called a
quadratic form In mathematics, a quadratic form is a polynomial with terms all of degree two ("form" is another name for a homogeneous polynomial). For example, :4x^2 + 2xy - 3y^2 is a quadratic form in the variables and . The coefficients usually belong to a ...
and is a scalar (mathematics), scalar: :\mathbf'\mathbf\mathbf = \sum_a_ x_i x_j In other words, it sums up all possible combinations of products of pairs of elements from x, with a separate coefficient for each. In addition, since x_i x_j = x_j x_i, only the sum a_ + a_ matters for any off-diagonal elements of A, and there is no loss of generality in assuming that A is symmetric matrix, symmetric. Furthermore, if A is symmetric, then the form \mathbf'\mathbf\mathbf = \mathbf'\mathbf\mathbf.


Sum of differences from the mean

Another useful formula is as follows: \sum_^n (x_i-\mu)^2 = \sum_^n (x_i-\bar)^2 + n(\bar -\mu)^2 where \bar = \frac \sum_^n x_i.


With known variance

For a set of i.i.d. normally distributed data points X of size ''n'' where each individual point ''x'' follows x \sim \mathcal(\mu, \sigma^2) with known
variance In probability theory and statistics, variance is the expectation of the squared deviation of a random variable from its population mean or sample mean. Variance is a measure of dispersion, meaning it is a measure of how far a set of numbers ...
σ2, the conjugate prior distribution is also normally distributed. This can be shown more easily by rewriting the variance as the
precision Precision, precise or precisely may refer to: Science, and technology, and mathematics Mathematics and computing (general) * Accuracy and precision, measurement deviation from true value and its scatter * Significant figures, the number of digit ...
, i.e. using τ = 1/σ2. Then if x \sim \mathcal(\mu, 1/\tau) and \mu \sim \mathcal(\mu_0, 1/\tau_0), we proceed as follows. First, the likelihood function is (using the formula above for the sum of differences from the mean): :\begin p(\mathbf\mid\mu,\tau) &= \prod_^n \sqrt \exp\left(-\frac\tau(x_i-\mu)^2\right) \\ &= \left(\frac\right)^ \exp\left(-\frac\tau \sum_^n (x_i-\mu)^2\right) \\ &= \left(\frac\right)^ \exp\left[-\frac\tau \left(\sum_^n(x_i-\bar)^2 + n(\bar -\mu)^2\right)\right]. \end Then, we proceed as follows: :\begin p(\mu\mid\mathbf) &\propto p(\mathbf\mid\mu) p(\mu) \\ & = \left(\frac\right)^ \exp\left[-\frac\tau \left(\sum_^n(x_i-\bar)^2 + n(\bar -\mu)^2\right)\right] \sqrt \exp\left(-\frac\tau_0(\mu-\mu_0)^2\right) \\ &\propto \exp\left(-\frac\left(\tau\left(\sum_^n(x_i-\bar)^2 + n(\bar -\mu)^2\right) + \tau_0(\mu-\mu_0)^2\right)\right) \\ &\propto \exp\left(-\frac \left(n\tau(\bar-\mu)^2 + \tau_0(\mu-\mu_0)^2 \right)\right) \\ &= \exp\left(-\frac(n\tau + \tau_0)\left(\mu - \dfrac\right)^2 + \frac(\bar - \mu_0)^2\right) \\ &\propto \exp\left(-\frac(n\tau + \tau_0)\left(\mu - \dfrac\right)^2\right) \end In the above derivation, we used the formula above for the sum of two quadratics and eliminated all constant factors not involving ''μ''. The result is the kernel (statistics), kernel of a normal distribution, with mean \frac and precision n\tau + \tau_0, i.e. :p(\mu\mid\mathbf) \sim \mathcal\left(\frac, \frac\right) This can be written as a set of Bayesian update equations for the posterior parameters in terms of the prior parameters: :\begin \tau_0' &= \tau_0 + n\tau \\[5pt] \mu_0' &= \frac \\[5pt] \bar &= \frac\sum_^n x_i \end That is, to combine ''n'' data points with total precision of ''nτ'' (or equivalently, total variance of ''n''/''σ''2) and mean of values \bar, derive a new total precision simply by adding the total precision of the data to the prior total precision, and form a new mean through a ''precision-weighted average'', i.e. a weighted average of the data mean and the prior mean, each weighted by the associated total precision. This makes logical sense if the precision is thought of as indicating the certainty of the observations: In the distribution of the posterior mean, each of the input components is weighted by its certainty, and the certainty of this distribution is the sum of the individual certainties. (For the intuition of this, compare the expression "the whole is (or is not) greater than the sum of its parts". In addition, consider that the knowledge of the posterior comes from a combination of the knowledge of the prior and likelihood, so it makes sense that we are more certain of it than of either of its components.) The above formula reveals why it is more convenient to do Bayesian analysis of conjugate priors for the normal distribution in terms of the precision. The posterior precision is simply the sum of the prior and likelihood precisions, and the posterior mean is computed through a precision-weighted average, as described above. The same formulas can be written in terms of variance by reciprocating all the precisions, yielding the more ugly formulas :\begin ' &= \frac \\[5pt] \mu_0' &= \frac \\[5pt] \bar &= \frac\sum_^n x_i \end


With known mean

For a set of i.i.d. normally distributed data points X of size ''n'' where each individual point ''x'' follows x \sim \mathcal(\mu, \sigma^2) with known mean μ, the conjugate prior of the
variance In probability theory and statistics, variance is the expectation of the squared deviation of a random variable from its population mean or sample mean. Variance is a measure of dispersion, meaning it is a measure of how far a set of numbers ...
has an inverse gamma distribution or a scaled inverse chi-squared distribution. The two are equivalent 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. The prior for σ2 is as follows: :p(\sigma^2\mid\nu_0,\sigma_0^2) = \frac~\frac \propto \frac The likelihood function from above, written in terms of the variance, is: :\begin p(\mathbf\mid\mu,\sigma^2) &= \left(\frac\right)^ \exp\left[-\frac \sum_^n (x_i-\mu)^2\right] \\ &= \left(\frac\right)^ \exp\left[-\frac\right] \end where :S = \sum_^n (x_i-\mu)^2. Then: :\begin p(\sigma^2\mid\mathbf) &\propto p(\mathbf\mid\sigma^2) p(\sigma^2) \\ &= \left(\frac\right)^ \exp\left[-\frac\right] \frac~\frac \\ &\propto \left(\frac\right)^ \frac \exp\left[-\frac + \frac\right] \\ &= \frac \exp\left[-\frac\right] \end The above is also a scaled inverse chi-squared distribution where :\begin \nu_0' &= \nu_0 + n \\ \nu_0'' &= \nu_0 \sigma_0^2 + \sum_^n (x_i-\mu)^2 \end or equivalently :\begin \nu_0' &= \nu_0 + n \\ ' &= \frac \end Reparameterizing in terms of an inverse gamma distribution, the result is: :\begin \alpha' &= \alpha + \frac \\ \beta' &= \beta + \frac \end


With unknown mean and unknown variance

For a set of i.i.d. normally distributed data points X of size ''n'' where each individual point ''x'' follows x \sim \mathcal(\mu, \sigma^2) with unknown mean μ and unknown
variance In probability theory and statistics, variance is the expectation of the squared deviation of a random variable from its population mean or sample mean. Variance is a measure of dispersion, meaning it is a measure of how far a set of numbers ...
σ2, a combined (multivariate) conjugate prior is placed over the mean and variance, consisting of a normal-inverse-gamma distribution. Logically, this originates as follows: # From the analysis of the case with unknown mean but known variance, we see that the update equations involve sufficient statistics computed from the data consisting of the mean of the data points and the total variance of the data points, computed in turn from the known variance divided by the number of data points. # From the analysis of the case with unknown variance but known mean, we see that the update equations involve sufficient statistics over the data consisting of the number of data points and sum of squared deviations. # Keep in mind that the posterior update values serve as the prior distribution when further data is handled. Thus, we should logically think of our priors in terms of the sufficient statistics just described, with the same semantics kept in mind as much as possible. # To handle the case where both mean and variance are unknown, we could place independent priors over the mean and variance, with fixed estimates of the average mean, total variance, number of data points used to compute the variance prior, and sum of squared deviations. Note however that in reality, the total variance of the mean depends on the unknown variance, and the sum of squared deviations that goes into the variance prior (appears to) depend on the unknown mean. In practice, the latter dependence is relatively unimportant: Shifting the actual mean shifts the generated points by an equal amount, and on average the squared deviations will remain the same. This is not the case, however, with the total variance of the mean: As the unknown variance increases, the total variance of the mean will increase proportionately, and we would like to capture this dependence. # This suggests that we create a ''conditional prior'' of the mean on the unknown variance, with a hyperparameter specifying the mean of the pseudo-observations associated with the prior, and another parameter specifying the number of pseudo-observations. This number serves as a scaling parameter on the variance, making it possible to control the overall variance of the mean relative to the actual variance parameter. The prior for the variance also has two hyperparameters, one specifying the sum of squared deviations of the pseudo-observations associated with the prior, and another specifying once again the number of pseudo-observations. Note that each of the priors has a hyperparameter specifying the number of pseudo-observations, and in each case this controls the relative variance of that prior. These are given as two separate hyperparameters so that the variance (aka the confidence) of the two priors can be controlled separately. # This leads immediately to the normal-inverse-gamma distribution, which is the product of the two distributions just defined, with conjugate priors used (an inverse gamma distribution over the variance, and a normal distribution over the mean, ''conditional'' on the variance) and with the same four parameters just defined. The priors are normally defined as follows: :\begin p(\mu\mid\sigma^2; \mu_0, n_0) &\sim \mathcal(\mu_0,\sigma^2/n_0) \\ p(\sigma^2; \nu_0,\sigma_0^2) &\sim I\chi^2(\nu_0,\sigma_0^2) = IG(\nu_0/2, \nu_0\sigma_0^2/2) \end The update equations can be derived, and look as follows: :\begin \bar &= \frac 1 n \sum_^n x_i \\ \mu_0' &= \frac \\ n_0' &= n_0 + n \\ \nu_0' &= \nu_0 + n \\ \nu_0'' &= \nu_0 \sigma_0^2 + \sum_^n (x_i-\bar)^2 + \frac(\mu_0 - \bar)^2 \end The respective numbers of pseudo-observations add the number of actual observations to them. The new mean hyperparameter is once again a weighted average, this time weighted by the relative numbers of observations. Finally, the update for \nu_0'' is similar to the case with known mean, but in this case the sum of squared deviations is taken with respect to the observed data mean rather than the true mean, and as a result a new "interaction term" needs to be added to take care of the additional error source stemming from the deviation between prior and data mean.


Occurrence and applications

The occurrence of normal distribution in practical problems can be loosely classified into four categories: # Exactly normal distributions; # Approximately normal laws, for example when such approximation is justified by the
central limit theorem In probability theory, the central limit theorem (CLT) establishes that, in many situations, when independent random variables are summed up, their properly normalized sum tends toward a normal distribution even if the original variables themselv ...
; and # Distributions modeled as normal – the normal distribution being the distribution with Principle of maximum entropy, maximum entropy for a given mean and variance. # Regression problems – the normal distribution being found after systematic effects have been modeled sufficiently well.


Exact normality

Certain quantities in physics are distributed normally, as was first demonstrated by James Clerk Maxwell. Examples of such quantities are: * Probability density function of a ground state in a quantum harmonic oscillator. * The position of a particle that experiences diffusion. If initially the particle is located at a specific point (that is its probability distribution is the Dirac delta function), then after time ''t'' its location is described by a normal distribution with variance ''t'', which satisfies the diffusion equation \frac f(x,t) = \frac \frac f(x,t). If the initial location is given by a certain density function g(x), then the density at time ''t'' is the convolution of ''g'' and the normal PDF.


Approximate normality

''Approximately'' normal distributions occur in many situations, as explained by the
central limit theorem In probability theory, the central limit theorem (CLT) establishes that, in many situations, when independent random variables are summed up, their properly normalized sum tends toward a normal distribution even if the original variables themselv ...
. When the outcome is produced by many small effects acting ''additively and independently'', its distribution will be close to normal. The normal approximation will not be valid if the effects act multiplicatively (instead of additively), or if there is a single external influence that has a considerably larger magnitude than the rest of the effects. * In counting problems, where the central limit theorem includes a discrete-to-continuum approximation and where Infinite divisibility, infinitely divisible and Indecomposable distribution, decomposable distributions are involved, such as ** binomial distribution, Binomial random variables, associated with binary response variables; ** Poisson distribution, Poisson random variables, associated with rare events; * Thermal radiation has a Bose–Einstein statistics, Bose–Einstein distribution on very short time scales, and a normal distribution on longer timescales due to the central limit theorem.


Assumed normality

There are statistical methods to empirically test that assumption; see the above #Normality tests, Normality tests section. * In biology, the ''logarithm'' of various variables tend to have a normal distribution, that is, they tend to have a
log-normal distribution In probability theory, a log-normal (or lognormal) distribution is a continuous probability distribution of a random variable whose logarithm is normally distributed. Thus, if the random variable is log-normally distributed, then has a normal ...
(after separation on male/female subpopulations), with examples including: ** Measures of size of living tissue (length, height, skin area, weight); ** The ''length'' of ''inert'' appendages (hair, claws, nails, teeth) of biological specimens, ''in the direction of growth''; presumably the thickness of tree bark also falls under this category; ** Certain physiological measurements, such as blood pressure of adult humans. * In finance, in particular the Black–Scholes model, changes in the ''logarithm'' of exchange rates, price indices, and stock market indices are assumed normal (these variables behave like compound interest, not like simple interest, and so are multiplicative). Some mathematicians such as Benoit Mandelbrot have argued that Levy skew alpha-stable distribution, log-Levy distributions, which possesses heavy tails would be a more appropriate model, in particular for the analysis for stock market crashes. The use of the assumption of normal distribution occurring in financial models has also been criticized by Nassim Nicholas Taleb in his works. * Propagation of uncertainty, Measurement errors in physical experiments are often modeled by a normal distribution. This use of a normal distribution does not imply that one is assuming the measurement errors are normally distributed, rather using the normal distribution produces the most conservative predictions possible given only knowledge about the mean and variance of the errors. * In Standardized testing (statistics), standardized testing, results can be made to have a normal distribution by either selecting the number and difficulty of questions (as in the Intelligence quotient, IQ test) or transforming the raw test scores into "output" scores by fitting them to the normal distribution. For example, the SAT's traditional range of 200–800 is based on a normal distribution with a mean of 500 and a standard deviation of 100. * Many scores are derived from the normal distribution, including percentile ranks ("percentiles" or "quantiles"), normal curve equivalents, stanines, Standard score, z-scores, and T-scores. Additionally, some behavioral statistical procedures assume that scores are normally distributed; for example, Student's t-test, t-tests and Analysis of variance, ANOVAs. Bell curve grading assigns relative grades based on a normal distribution of scores. * In hydrology the distribution of long duration river discharge or rainfall, e.g. monthly and yearly totals, is often thought to be practically normal according to the
central limit theorem In probability theory, the central limit theorem (CLT) establishes that, in many situations, when independent random variables are summed up, their properly normalized sum tends toward a normal distribution even if the original variables themselv ...
. The blue picture, made with CumFreq, illustrates an example of fitting the normal distribution to ranked October rainfalls showing the 90% confidence belt based on the
binomial distribution In probability theory and statistics, the binomial distribution with parameters ''n'' and ''p'' is the discrete probability distribution of the number of successes in a sequence of ''n'' independent experiments, each asking a yes–no quest ...
. The rainfall data are represented by plotting positions as part of the cumulative frequency analysis.


Methodological problems and peer review

John Ioannidis argues that using normally distributed standard deviations as standards for validating research findings leave falsifiability, falsifiable predictions about phenomena that are not normally distributed untested. This includes, for example, phenomena that only appear when all necessary conditions are present and one cannot be a substitute for another in an addition-like way and phenomena that are not randomly distributed. Ioannidis argues that standard deviation-centered validation gives a false appearance of validity to hypotheses and theories where some but not all falsifiable predictions are normally distributed since the portion of falsifiable predictions that there is evidence against may and in some cases are in the non-normally distributed parts of the range of falsifiable predictions, as well as baselessly dismissing hypotheses for which none of the falsifiable predictions are normally distributed as if were they unfalsifiable when in fact they do make falsifiable predictions. It is argued by Ioannidis that many cases of mutually exclusive theories being accepted as "validated" by research journals are caused by failure of the journals to take in empirical falsifications of non-normally distributed predictions, and not because mutually exclusive theories are true, which they cannot be, although two mutually exclusive theories can both be wrong and a third one correct.


Computational methods


Generating values from normal distribution

In computer simulations, especially in applications of the Monte-Carlo method, it is often desirable to generate values that are normally distributed. The algorithms listed below all generate the standard normal deviates, since a can be generated as , where ''Z'' is standard normal. All these algorithms rely on the availability of a random number generator ''U'' capable of producing Uniform distribution (continuous), uniform random variates. * The most straightforward method is based on the probability integral transform property: if ''U'' is distributed uniformly on (0,1), then Φ−1(''U'') will have the standard normal distribution. The drawback of this method is that it relies on calculation of the
probit function In probability theory and statistics, the probit function is the quantile function associated with the standard normal distribution. It has applications in data analysis and machine learning, in particular exploratory statistical graphics and ...
Φ−1, which cannot be done analytically. Some approximate methods are described in and in the error function, erf article. Wichura gives a fast algorithm for computing this function to 16 decimal places, which is used by R programming language, R to compute random variates of the normal distribution. * Irwin–Hall distribution#Approximating a Normal distribution, An easy-to-program approximate approach that relies on the
central limit theorem In probability theory, the central limit theorem (CLT) establishes that, in many situations, when independent random variables are summed up, their properly normalized sum tends toward a normal distribution even if the original variables themselv ...
is as follows: generate 12 uniform ''U''(0,1) deviates, add them all up, and subtract 6 – the resulting random variable will have approximately standard normal distribution. In truth, the distribution will be Irwin–Hall distribution, Irwin–Hall, which is a 12-section eleventh-order polynomial approximation to the normal distribution. This random deviate will have a limited range of (−6, 6). Note that in a true normal distribution, only 0.00034% of all samples will fall outside ±6σ. * The Box–Muller transform, Box–Muller method uses two independent random numbers ''U'' and ''V'' distributed uniform distribution (continuous), uniformly on (0,1). Then the two random variables ''X'' and ''Y'' X = \sqrt \, \cos(2 \pi V) , \qquad Y = \sqrt \, \sin(2 \pi V) . will both have the standard normal distribution, and will be
independent Independent or Independents may refer to: Arts, entertainment, and media Artist groups * Independents (artist group), a group of modernist painters based in the New Hope, Pennsylvania, area of the United States during the early 1930s * Independ ...
. This formulation arises because for a bivariate normal random vector (''X'', ''Y'') the squared norm will have the
chi-squared distribution In probability theory and statistics, the chi-squared distribution (also chi-square or \chi^2-distribution) with k degrees of freedom is the distribution of a sum of the squares of k independent standard normal random variables. The chi-squa ...
with two degrees of freedom, which is an easily generated exponential distribution, exponential random variable corresponding to the quantity −2ln(''U'') in these equations; and the angle is distributed uniformly around the circle, chosen by the random variable ''V''. * The Marsaglia polar method is a modification of the Box–Muller method which does not require computation of the sine and cosine functions. In this method, ''U'' and ''V'' are drawn from the uniform (−1,1) distribution, and then is computed. If ''S'' is greater or equal to 1, then the method starts over, otherwise the two quantities X = U\sqrt, \qquad Y = V\sqrt are returned. Again, ''X'' and ''Y'' are independent, standard normal random variables. * The Ratio method is a rejection method. The algorithm proceeds as follows: ** Generate two independent uniform deviates ''U'' and ''V''; ** Compute ''X'' = (''V'' − 0.5)/''U''; ** Optional: if ''X''2 ≤ 5 − 4''e''1/4''U'' then accept ''X'' and terminate algorithm; ** Optional: if ''X''2 ≥ 4''e''−1.35/''U'' + 1.4 then reject ''X'' and start over from step 1; ** If ''X''2 ≤ −4 ln''U'' then accept ''X'', otherwise start over the algorithm. *:The two optional steps allow the evaluation of the logarithm in the last step to be avoided in most cases. These steps can be greatly improved so that the logarithm is rarely evaluated. * The ziggurat algorithm is faster than the Box–Muller transform and still exact. In about 97% of all cases it uses only two random numbers, one random integer and one random uniform, one multiplication and an if-test. Only in 3% of the cases, where the combination of those two falls outside the "core of the ziggurat" (a kind of rejection sampling using logarithms), do exponentials and more uniform random numbers have to be employed. * Integer arithmetic can be used to sample from the standard normal distribution. This method is exact in the sense that it satisfies the conditions of ''ideal approximation''; i.e., it is equivalent to sampling a real number from the standard normal distribution and rounding this to the nearest representable floating point number. * There is also some investigation into the connection between the fast Hadamard transform and the normal distribution, since the transform employs just addition and subtraction and by the central limit theorem random numbers from almost any distribution will be transformed into the normal distribution. In this regard a series of Hadamard transforms can be combined with random permutations to turn arbitrary data sets into a normally distributed data.


Numerical approximations for the normal CDF and normal quantile function

The standard normal cumulative distribution function, CDF is widely used in scientific and statistical computing. The values Φ(''x'') may be approximated very accurately by a variety of methods, such as numerical integration, Taylor series, asymptotic series and Gauss's continued fraction#Of Kummer's confluent hypergeometric function, continued fractions. Different approximations are used depending on the desired level of accuracy. * give the approximation for Φ(''x'') for ''x > 0'' with the absolute error (algorith
26.2.17
: \Phi(x) = 1 - \varphi(x)\left(b_1 t + b_2 t^2 + b_3t^3 + b_4 t^4 + b_5 t^5\right) + \varepsilon(x), \qquad t = \frac, where ''ϕ''(''x'') is the standard normal PDF, and ''b''0 = 0.2316419, ''b''1 = 0.319381530, ''b''2 = −0.356563782, ''b''3 = 1.781477937, ''b''4 = −1.821255978, ''b''5 = 1.330274429. * lists some dozens of approximations – by means of rational functions, with or without exponentials – for the function. His algorithms vary in the degree of complexity and the resulting precision, with maximum absolute precision of 24 digits. An algorithm by combines Hart's algorithm 5666 with a continued fraction approximation in the tail to provide a fast computation algorithm with a 16-digit precision. * after recalling Hart68 solution is not suited for erf, gives a solution for both erf and erfc, with maximal relative error bound, via rational function, Rational Chebyshev Approximation. * suggested a simple algorithm based on the Taylor series expansion \Phi(x) = \frac12 + \varphi(x)\left( x + \frac 3 + \frac + \frac + \frac + \cdots \right) for calculating with arbitrary precision. The drawback of this algorithm is comparatively slow calculation time (for example it takes over 300 iterations to calculate the function with 16 digits of precision when ). * The GNU Scientific Library calculates values of the standard normal CDF using Hart's algorithms and approximations with Chebyshev polynomials. Shore (1982) introduced simple approximations that may be incorporated in stochastic optimization models of engineering and operations research, like reliability engineering and inventory analysis. Denoting , the simplest approximation for the quantile function is: z = \Phi^(p)=5.5556\left[1- \left( \frac p \right)^\right],\qquad p\ge 1/2 This approximation delivers for ''z'' a maximum absolute error of 0.026 (for , corresponding to ). For replace ''p'' by and change sign. Another approximation, somewhat less accurate, is the single-parameter approximation: z=-0.4115\left\, \qquad p\ge 1/2 The latter had served to derive a simple approximation for the loss integral of the normal distribution, defined by \begin L(z) & =\int_z^\infty (u-z)\varphi(u) \, du=\int_z^\infty [1-\Phi (u)] \, du \\[5pt] L(z) & \approx \begin 0.4115\left(\dfrac p \right) - z, & p<1/2, \\ \\ 0.4115\left( \dfrac p \right), & p\ge 1/2. \end \\[5pt] \text \\ L(z) & \approx \begin 0.4115\left\, & p < 1/2, \\ \\ 0.4115 \dfrac p, & p\ge 1/2. \end \end This approximation is particularly accurate for the right far-tail (maximum error of 10−3 for z≥1.4). Highly accurate approximations for the CDF, based on Response modeling methodology, Response Modeling Methodology (RMM, Shore, 2011, 2012), are shown in Shore (2005). Some more approximations can be found at: Error function#Approximation with elementary functions. In particular, small ''relative'' error on the whole domain for the CDF \Phi and the quantile function \Phi^ as well, is achieved via an explicitly invertible formula by Sergei Winitzki in 2008.


History


Development

Some authors attribute the credit for the discovery of the normal distribution to Abraham de Moivre, de Moivre, who in 1738 published in the second edition of his "''The Doctrine of Chances''" the study of the coefficients in the binomial expansion of . De Moivre proved that the middle term in this expansion has the approximate magnitude of 2^n/\sqrt, and that "If ''m'' or ''n'' be a Quantity infinitely great, then the Logarithm of the Ratio, which a Term distant from the middle by the Interval ''ℓ'', has to the middle Term, is -\frac." Although this theorem can be interpreted as the first obscure expression for the normal probability law, Stephen Stigler, Stigler points out that de Moivre himself did not interpret his results as anything more than the approximate rule for the binomial coefficients, and in particular de Moivre lacked the concept of the probability density function. In 1823 Carl Friedrich Gauss, Gauss published his monograph "''Theoria combinationis observationum erroribus minimis obnoxiae''" where among other things he introduces several important statistical concepts, such as the method of least squares, the method of maximum likelihood, and the ''normal distribution''. Gauss used ''M'', , to denote the measurements of some unknown quantity ''V'', and sought the "most probable" estimator of that quantity: the one that maximizes the probability of obtaining the observed experimental results. In his notation φΔ is the probability density function of the measurement errors of magnitude Δ. Not knowing what the function ''φ'' is, Gauss requires that his method should reduce to the well-known answer: the arithmetic mean of the measured values. Starting from these principles, Gauss demonstrates that the only law that rationalizes the choice of arithmetic mean as an estimator of the location parameter, is the normal law of errors: \varphi\mathit = \frac h \, e^, where ''h'' is "the measure of the precision of the observations". Using this normal law as a generic model for errors in the experiments, Gauss formulates what is now known as the non-linear least squares, non-linear weighted least squares method. Although Gauss was the first to suggest the normal distribution law, Pierre Simon de Laplace, Laplace made significant contributions. It was Laplace who first posed the problem of aggregating several observations in 1774, although his own solution led to the Laplacian distribution. It was Laplace who first calculated the value of the Gaussian integral, integral in 1782, providing the normalization constant for the normal distribution. Finally, it was Laplace who in 1810 proved and presented to the Academy the fundamental
central limit theorem In probability theory, the central limit theorem (CLT) establishes that, in many situations, when independent random variables are summed up, their properly normalized sum tends toward a normal distribution even if the original variables themselv ...
, which emphasized the theoretical importance of the normal distribution. It is of interest to note that in 1809 an Irish-American mathematician Robert Adrain published two insightful but flawed derivations of the normal probability law, simultaneously and independently from Gauss. His works remained largely unnoticed by the scientific community, until in 1871 they were exhumed by Cleveland Abbe, Abbe. In the middle of the 19th century James Clerk Maxwell, Maxwell demonstrated that the normal distribution is not just a convenient mathematical tool, but may also occur in natural phenomena: "The number of particles whose velocity, resolved in a certain direction, lies between ''x'' and ''x'' + ''dx'' is \operatorname \frac\; e^ \, dx


Naming

Today, the concept is usually known in English as the normal distribution or Gaussian distribution. Other less common names include Gauss distribution, Laplace-Gauss distribution, the law of error, the law of facility of errors, Laplace's second law, Gaussian law. Gauss himself apparently coined the term with reference to the "normal equations" involved in its applications, with normal having its technical meaning of orthogonal rather than "usual". However, by the end of the 19th century some authors had started using the name ''normal distribution'', where the word "normal" was used as an adjective – the term now being seen as a reflection of the fact that this distribution was seen as typical, common – and thus "normal". Charles Sanders Peirce, Peirce (one of those authors) once defined "normal" thus: "...the 'normal' is not the average (or any other kind of mean) of what actually occurs, but of what ''would'', in the long run, occur under certain circumstances." Around the turn of the 20th century Karl Pearson, Pearson popularized the term ''normal'' as a designation for this distribution. Also, it was Pearson who first wrote the distribution in terms of the standard deviation ''σ'' as in modern notation. Soon after this, in year 1915, Ronald Fisher, Fisher added the location parameter to the formula for normal distribution, expressing it in the way it is written nowadays: df = \frac e^ \, dx. The term "standard normal", which denotes the normal distribution with zero mean and unit variance came into general use around the 1950s, appearing in the popular textbooks by P. G. Hoel (1947) "''Introduction to mathematical statistics''" and A. M. Mood (1950) "''Introduction to the theory of statistics''".


See also

* Bates distribution – similar to the Irwin–Hall distribution, but rescaled back into the 0 to 1 range * Behrens–Fisher problem – the long-standing problem of testing whether two normal samples with different variances have same means; * Bhattacharyya distance – method used to separate mixtures of normal distributions * Erdős–Kac theorem – on the occurrence of the normal distribution in number theory * Full width at half maximum * Gaussian blur – convolution, which uses the normal distribution as a kernel * Modified half-normal distribution with the pdf on (0, \infty) is given as f(x)= \frac, where \Psi(\alpha,z)=_1\Psi_1\left(\begin\left(\alpha,\frac\right)\\(1,0)\end;z \right) denotes the Fox-Wright Psi function. * Normally distributed and uncorrelated does not imply independent * Ratio normal distribution * Reciprocal normal distribution * Standard normal table * Stein's lemma * Sub-Gaussian distribution * Sum of normally distributed random variables * Tweedie distribution – The normal distribution is a member of the family of Tweedie exponential dispersion models. * Wrapped normal distribution – the Normal distribution applied to a circular domain * Z-test – using the normal distribution


Notes


References


Citations


Sources

* * In particular, the entries fo
"bell-shaped and bell curve"
an

* * * * * * * * * * * * * * * * * * * * * * * * Translated by Stephen M. Stigler in ''Statistical Science'' 1 (3), 1986: . * * * * * * * * * * * * * * * * * * * * * * * * * * * *


External links

*
Normal distribution calculator
{{Authority control Normal distribution, Continuous distributions Conjugate prior distributions Exponential family distributions Stable distributions Location-scale family probability distributions]">f'(X), \infty.


Zero-variance limit

In the limit (mathematics), limit when \sigma tends to zero, the probability density f(x) eventually tends to zero at any x\ne \mu, but grows without limit if x = \mu, while its integral remains equal to 1. Therefore, the normal distribution cannot be defined as an ordinary
function Function or functionality may refer to: Computing * Function key, a type of key on computer keyboards * Function model, a structured representation of processes in a system * Function object or functor or functionoid, a concept of object-oriente ...
when \sigma = 0. However, one can define the normal distribution with zero variance as a
generalized function In mathematics, generalized functions are objects extending the notion of functions. There is more than one recognized theory, for example the theory of distributions. Generalized functions are especially useful in making discontinuous functions ...
; specifically, as Dirac's "delta function" \delta translated by the mean \mu, that is f(x)=\delta(x-\mu). Its CDF is then the
Heaviside step function The Heaviside step function, or the unit step function, usually denoted by or (but sometimes , or ), is a step function, named after Oliver Heaviside (1850–1925), the value of which is zero for negative arguments and one for positive argume ...
translated by the mean \mu, namely :F(x) = \begin 0 & \textx < \mu \\ 1 & \textx \geq \mu \end


Maximum entropy

Of all probability distributions over the reals with a specified mean \mu and variance \sigma^2, the normal distribution N(\mu,\sigma^2) is the one with maximum entropy. If X is a
continuous random variable In probability theory and statistics, a probability distribution is the mathematical function that gives the probabilities of occurrence of different possible outcomes for an experiment. It is a mathematical description of a random phenomenon i ...
with
probability density In probability theory, a probability density function (PDF), or density of a continuous random variable, is a function whose value at any given sample (or point) in the sample space (the set of possible values taken by the random variable) can ...
f(x), then the entropy of X is defined as : H(X) = - \int_^\infty f(x)\log f(x)\, dx where f(x)\log f(x) is understood to be zero whenever f(x)=0. This functional can be maximized, subject to the constraints that the distribution is properly normalized and has a specified variance, by using
variational calculus The calculus of variations (or Variational Calculus) is a field of mathematical analysis that uses variations, which are small changes in functions and functionals, to find maxima and minima of functionals: mappings from a set of functions t ...
. A function with two
Lagrange multipliers In mathematical optimization, the method of Lagrange multipliers is a strategy for finding the local maxima and minima of a function subject to equality constraints (i.e., subject to the condition that one or more equations have to be satisfied ex ...
is defined: : L=\int_^\infty f(x)\ln(f(x))\,dx-\lambda_0\left(1-\int_^\infty f(x)\,dx\right)-\lambda\left(\sigma^2-\int_^\infty f(x)(x-\mu)^2\,dx\right) where f(x) is, for now, regarded as some density function with mean \mu and standard deviation \sigma. At maximum entropy, a small variation \delta f(x) about f(x) will produce a variation \delta L about L which is equal to 0: : 0=\delta L=\int_^\infty \delta f(x)\left (\ln(f(x))+1+\lambda_0+\lambda(x-\mu)^2\right )\,dx Since this must hold for any small \delta f(x), the term in brackets must be zero, and solving for f(x) yields: :f(x)=e^ Using the constraint equations to solve for \lambda_0 and \lambda yields the density of the normal distribution: : f(x, \mu, \sigma)=\frace^ The entropy of a normal distribution is equal to : H(X)=\tfrac(1+\log(2\sigma^2\pi))


Other properties


Related distributions


Central limit theorem

The central limit theorem states that under certain (fairly common) conditions, the sum of many random variables will have an approximately normal distribution. More specifically, where X_1,\ldots ,X_n are
independent and identically distributed In probability theory and statistics, a collection of random variables is independent and identically distributed if each random variable has the same probability distribution as the others and all are mutually independent. This property is usua ...
random variables with the same arbitrary distribution, zero mean, and variance \sigma^2 and Z is their mean scaled by \sqrt : Z = \sqrt\left(\frac\sum_^n X_i\right) Then, as n increases, the probability distribution of Z will tend to the normal distribution with zero mean and variance \sigma^2. The theorem can be extended to variables (X_i) that are not independent and/or not identically distributed if certain constraints are placed on the degree of dependence and the moments of the distributions. Many
test statistic A test statistic is a statistic (a quantity derived from the sample) used in statistical hypothesis testing.Berger, R. L.; Casella, G. (2001). ''Statistical Inference'', Duxbury Press, Second Edition (p.374) A hypothesis test is typically specif ...
s, scores, and
estimator In statistics, an estimator is a rule for calculating an estimate of a given quantity based on observed data: thus the rule (the estimator), the quantity of interest (the estimand) and its result (the estimate) are distinguished. For example, the ...
s encountered in practice contain sums of certain random variables in 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 distributions. The central limit theorem also implies that certain distributions can be approximated by the normal distribution, for example: * The
binomial distribution In probability theory and statistics, the binomial distribution with parameters ''n'' and ''p'' is the discrete probability distribution of the number of successes in a sequence of ''n'' independent experiments, each asking a yes–no quest ...
B(n,p) is approximately normal with mean np and variance np(1-p) for large n and for p not too close to 0 or 1. * The
Poisson distribution In probability theory and statistics, the Poisson distribution is a discrete probability distribution that expresses the probability of a given number of events occurring in a fixed interval of time or space if these events occur with a known co ...
with parameter \lambda is approximately normal with mean \lambda and variance \lambda, for large values of \lambda. * The
chi-squared distribution In probability theory and statistics, the chi-squared distribution (also chi-square or \chi^2-distribution) with k degrees of freedom is the distribution of a sum of the squares of k independent standard normal random variables. The chi-squa ...
\chi^2(k) is approximately normal with mean k and variance 2k, for large k. * The
Student's t-distribution In probability and statistics, Student's ''t''-distribution (or simply the ''t''-distribution) is any member of a family of continuous probability distributions that arise when estimating the mean of a normally distributed population in sit ...
t(\nu) is approximately normal with mean 0 and variance 1 when \nu is large. Whether these approximations are sufficiently accurate depends on the purpose for which they are needed, and the rate of convergence to the normal distribution. It is typically the case that such approximations are less accurate in the tails of the distribution. A general upper bound for the approximation error in the central limit theorem is given by the
Berry–Esseen theorem In probability theory, the central limit theorem states that, under certain circumstances, the probability distribution of the scaled mean of a random sample converges to a normal distribution as the sample size increases to infinity. Under strong ...
, improvements of the approximation are given by the
Edgeworth expansion The Gram–Charlier A series (named in honor of Jørgen Pedersen Gram and Carl Charlier), and the Edgeworth series (named in honor of Francis Ysidro Edgeworth) are series that approximate a probability distribution in terms of its cumulants. The se ...
s. This theorem can also be used to justify modeling the sum of many uniform noise sources as
Gaussian noise Gaussian noise, named after Carl Friedrich Gauss, is a term from signal processing theory denoting a kind of signal noise that has a probability density function (pdf) equal to that of the normal distribution (which is also known as the Gaussia ...
. See
AWGN Additive white Gaussian noise (AWGN) is a basic noise model used in information theory to mimic the effect of many random processes that occur in nature. The modifiers denote specific characteristics: * ''Additive'' because it is added to any nois ...
.


Operations and functions of normal variables

The
probability density In probability theory, a probability density function (PDF), or density of a continuous random variable, is a function whose value at any given sample (or point) in the sample space (the set of possible values taken by the random variable) can ...
,
cumulative distribution In statistics, the frequency (or absolute frequency) of an event i is the number n_i of times the observation has occurred/recorded in an experiment or study. These frequencies are often depicted graphically or in tabular form. Types The cumul ...
, and inverse cumulative distribution of any function of one or more independent or correlated normal variables can be computed with the numerical method of ray-tracing
Matlab code
. In the following sections we look at some special cases.


Operations on a single normal variable

If X is distributed normally with mean \mu and variance \sigma^2, then * aX+b, for any real numbers a and b, is also normally distributed, with mean a\mu+b and standard deviation , a, \sigma. That is, the family of normal distributions is closed under linear transformations. * The exponential of X is distributed log-normally: . * The absolute value of X has
folded normal distribution The folded normal distribution is a probability distribution related to the normal distribution. Given a normally distributed random variable ''X'' with mean ''μ'' and variance ''σ''2, the random variable ''Y'' = , ''X'', has a folded normal d ...
: . If \mu = 0 this is known as the
half-normal distribution In probability theory and statistics, the half-normal distribution is a special case of the folded normal distribution. Let X follow an ordinary normal distribution, N(0,\sigma^2). Then, Y=, X, follows a half-normal distribution. Thus, the hal ...
. * The absolute value of normalized residuals, , ''X'' − ''μ'', /''σ'', has
chi distribution In probability theory and statistics, the chi distribution is a continuous probability distribution. It is the distribution of the positive square root of the sum of squares of a set of independent random variables each following a standard norm ...
with one degree of freedom: , X - \mu, / \sigma \sim \chi_1. * The square of ''X''/''σ'' has the
noncentral chi-squared distribution In probability theory and statistics, the noncentral chi-squared distribution (or noncentral chi-square distribution, noncentral \chi^2 distribution) is a noncentral generalization of the chi-squared distribution. It often arises in the power a ...
with one degree of freedom: X^2 / \sigma^2 \sim \chi_1^2(\mu^2 / \sigma^2). If \mu = 0, the distribution is called simply chi-squared. * The log likelihood of a normal variable x is simply the log of its
probability density function In probability theory, a probability density function (PDF), or density of a continuous random variable, is a function whose value at any given sample (or point) in the sample space (the set of possible values taken by the random variable) can ...
: \ln p(x)= -\frac \left(\frac \right)^2 -\ln \left(\sigma \sqrt \right) = -\frac z^2 -\ln \left(\sigma \sqrt \right). Since this is a scaled and shifted square of a standard normal variable, it is distributed as a scaled and shifted chi-squared variable. * The distribution of the variable ''X'' restricted to an interval 'a'', ''b''is called the
truncated normal distribution In probability and statistics, the truncated normal distribution is the probability distribution derived from that of a normally distributed random variable by bounding the random variable from either below or above (or both). The truncated no ...
. * (''X'' − ''μ'')−2 has a
Lévy distribution In probability theory and statistics, the Lévy distribution, named after Paul Lévy, is a continuous probability distribution for a non-negative random variable. In spectroscopy, this distribution, with frequency as the dependent variable, is kn ...
with location 0 and scale ''σ''−2.


= Operations on two independent normal variables

= * If X_1 and X_2 are two
independent Independent or Independents may refer to: Arts, entertainment, and media Artist groups * Independents (artist group), a group of modernist painters based in the New Hope, Pennsylvania, area of the United States during the early 1930s * Independ ...
normal random variables, with means \mu_1, \mu_2 and standard deviations \sigma_1, \sigma_2, then their sum X_1 + X_2 will also be normally distributed, roof/sup> with mean \mu_1 + \mu_2 and variance \sigma_1^2 + \sigma_2^2. * In particular, if X and Y are independent normal deviates with zero mean and variance \sigma^2, then X + Y and X - Y are also independent and normally distributed, with zero mean and variance 2\sigma^2. This is a special case of the
polarization identity In linear algebra, a branch of mathematics, the polarization identity is any one of a family of formulas that express the inner product of two vectors in terms of the norm of a normed vector space. If a norm arises from an inner product then t ...
. * If X_1, X_2 are two independent normal deviates with mean \mu and deviation \sigma, and a, b are arbitrary real numbers, then the variable X_3 = \frac + \mu is also normally distributed with mean \mu and deviation \sigma. It follows that the normal distribution is
stable A stable is a building in which livestock, especially horses, are kept. It most commonly means a building that is divided into separate stalls for individual animals and livestock. There are many different types of stables in use today; the ...
(with exponent \alpha=2).


= Operations on two independent standard normal variables

= If X_1 and X_2 are two independent standard normal random variables with mean 0 and variance 1, then * Their sum and difference is distributed normally with mean zero and variance two: X_1 \pm X_2 \sim N(0, 2). * Their product Z = X_1 X_2 follows the
product distribution A product distribution is a probability distribution constructed as the distribution of the product of random variables having two other known distributions. Given two statistically independent random variables ''X'' and ''Y'', the distribution of ...
with density function f_Z(z) = \pi^ K_0(, z, ) where K_0 is the
modified Bessel function of the second kind Bessel functions, first defined by the mathematician Daniel Bernoulli and then generalized by Friedrich Bessel, are canonical solutions of Bessel's differential equation x^2 \frac + x \frac + \left(x^2 - \alpha^2 \right)y = 0 for an arbitrary ...
. This distribution is symmetric around zero, unbounded at z = 0, and has the
characteristic function In mathematics, the term "characteristic function" can refer to any of several distinct concepts: * The indicator function of a subset, that is the function ::\mathbf_A\colon X \to \, :which for a given subset ''A'' of ''X'', has value 1 at points ...
\phi_Z(t) = (1 + t^2)^. * Their ratio follows the standard
Cauchy distribution The Cauchy distribution, named after Augustin Cauchy, is a continuous probability distribution. It is also known, especially among physicists, as the Lorentz distribution (after Hendrik Lorentz), Cauchy–Lorentz distribution, Lorentz(ian) fun ...
: X_1/ X_2 \sim \operatorname(0, 1). * Their Euclidean norm \sqrt has the
Rayleigh distribution In probability theory and statistics, the Rayleigh distribution is a continuous probability distribution for nonnegative-valued random variables. Up to rescaling, it coincides with the chi distribution with two degrees of freedom. The distribut ...
.


Operations on multiple independent normal variables

* Any linear combination of independent normal deviates is a normal deviate. * If X_1, X_2, \ldots, X_n are independent standard normal random variables, then the sum of their squares has the
chi-squared distribution In probability theory and statistics, the chi-squared distribution (also chi-square or \chi^2-distribution) with k degrees of freedom is the distribution of a sum of the squares of k independent standard normal random variables. The chi-squa ...
with n degrees of freedom X_1^2 + \cdots + X_n^2 \sim \chi_n^2. * If X_1, X_2, \ldots, X_n are independent normally distributed random variables with means \mu and variances \sigma^2, then their
sample mean The sample mean (or "empirical mean") and the sample covariance are statistics computed from a Sample (statistics), sample of data on one or more random variables. The sample mean is the average value (or mean, mean value) of a sample (statistic ...
is independent from the sample
standard deviation In statistics, the standard deviation is a measure of the amount of variation or dispersion of a set of values. A low standard deviation indicates that the values tend to be close to the mean (also called the expected value) of the set, while ...
, which can be demonstrated using Basu's theorem or
Cochran's theorem In statistics, Cochran's theorem, devised by William G. Cochran, is a theorem used to justify results relating to the probability distributions of statistics that are used in the analysis of variance. Statement Let ''U''1, ..., ''U'N'' be i.i. ...
. The ratio of these two quantities will have the
Student's t-distribution In probability and statistics, Student's ''t''-distribution (or simply the ''t''-distribution) is any member of a family of continuous probability distributions that arise when estimating the mean of a normally distributed population in sit ...
with n-1 degrees of freedom: t = \frac = \frac \sim t_. * If X_1, X_2, \ldots, X_n, Y_1, Y_2, \ldots, Y_m are independent standard normal random variables, then the ratio of their normalized sums of squares will have the with degrees of freedom: F = \frac \sim F_.


Operations on multiple correlated normal variables

* A
quadratic form In mathematics, a quadratic form is a polynomial with terms all of degree two ("form" is another name for a homogeneous polynomial). For example, :4x^2 + 2xy - 3y^2 is a quadratic form in the variables and . The coefficients usually belong to a ...
of a normal vector, i.e. a quadratic function q = \sum x_i^2 + \sum x_j + c of multiple independent or correlated normal variables, is a generalized chi-square variable.


Operations on the density function

The split normal distribution is most directly defined in terms of joining scaled sections of the density functions of different normal distributions and rescaling the density to integrate to one. The
truncated normal distribution In probability and statistics, the truncated normal distribution is the probability distribution derived from that of a normally distributed random variable by bounding the random variable from either below or above (or both). The truncated no ...
results from rescaling a section of a single density function.


Infinite divisibility and Cramér's theorem

For any positive integer \text, any normal distribution with mean \mu and variance \sigma^2 is the distribution of the sum of \text independent normal deviates, each with mean \frac and variance \frac. This property is called
infinite divisibility Infinite divisibility arises in different ways in philosophy, physics, economics, order theory (a branch of mathematics), and probability theory (also a branch of mathematics). One may speak of infinite divisibility, or the lack thereof, of matter ...
. Conversely, if X_1 and X_2 are independent random variables and their sum X_1+X_2 has a normal distribution, then both X_1 and X_2 must be normal deviates. This result is known as Cramér's decomposition theorem, and is equivalent to saying that the convolution of two distributions is normal if and only if both are normal. Cramér's theorem implies that a linear combination of independent non-Gaussian variables will never have an exactly normal distribution, although it may approach it arbitrarily closely.


Bernstein's theorem

Bernstein's theorem states that if X and Y are independent and X + Y and X - Y are also independent, then both ''X'' and ''Y'' must necessarily have normal distributions. More generally, if X_1, \ldots, X_n are independent random variables, then two distinct linear combinations \sum and \sumwill be independent if and only if all X_k are normal and \sum, where \sigma_k^2 denotes the variance of X_k.


Extensions

The notion of normal distribution, being one of the most important distributions in probability theory, has been extended far beyond the standard framework of the univariate (that is one-dimensional) case (Case 1). All these extensions are also called ''normal'' or ''Gaussian'' laws, so a certain ambiguity in names exists. * The
multivariate normal distribution In probability theory and statistics, the multivariate normal distribution, multivariate Gaussian distribution, or joint normal distribution is a generalization of the one-dimensional (univariate) normal distribution to higher dimensions. One d ...
describes the Gaussian law in the ''k''-dimensional Euclidean space. A vector is multivariate-normally distributed if any linear combination of its components has a (univariate) normal distribution. The variance of ''X'' is a ''k×k'' symmetric positive-definite matrix ''V''. The multivariate normal distribution is a special case of the
elliptical distribution In probability and statistics, an elliptical distribution is any member of a broad family of probability distributions that generalize the multivariate normal distribution. Intuitively, in the simplified two and three dimensional case, the joint di ...
s. As such, its iso-density loci in the ''k'' = 2 case are ellipses and in the case of arbitrary ''k'' are ellipsoids. * Rectified Gaussian distribution a rectified version of normal distribution with all the negative elements reset to 0 * Complex normal distribution deals with the complex normal vectors. A complex vector is said to be normal if both its real and imaginary components jointly possess a 2''k''-dimensional multivariate normal distribution. The variance-covariance structure of ''X'' is described by two matrices: the ''variance'' matrix Γ, and the ''relation'' matrix ''C''. * Matrix normal distribution describes the case of normally distributed matrices. * Gaussian processes are the normally distributed stochastic processes. These can be viewed as elements of some infinite-dimensional Hilbert space ''H'', and thus are the analogues of multivariate normal vectors for the case . A random element is said to be normal if for any constant the scalar product has a (univariate) normal distribution. The variance structure of such Gaussian random element can be described in terms of the linear ''covariance ''. Several Gaussian processes became popular enough to have their own names: ** Wiener process, Brownian motion, ** Brownian bridge, ** Ornstein–Uhlenbeck process. * Gaussian q-distribution is an abstract mathematical construction that represents a "q-analogue" of the normal distribution. * the q-Gaussian is an analogue of the Gaussian distribution, in the sense that it maximises the Tsallis entropy, and is one type of Tsallis distribution. Note that this distribution is different from the Gaussian q-distribution above. * The Kaniadakis Gaussian distribution, Kaniadakis ''κ''-Gaussian distribution is a generalization of the Gaussian distribution which arises from the Kaniadakis statistics, being one of the Kaniadakis distribution, Kaniadakis distributions. A random variable ''X'' has a two-piece normal distribution if it has a distribution : f_X( x ) = N( \mu, \sigma_1^2 ) \text x \le \mu : f_X( x ) = N( \mu, \sigma_2^2 ) \text x \ge \mu where ''μ'' is the mean and ''σ''1 and ''σ''2 are the standard deviations of the distribution to the left and right of the mean respectively. The mean, variance and third central moment of this distribution have been determined : \operatorname( X ) = \mu + \sqrt ( \sigma_2 - \sigma_1 ) : \operatorname( X ) = \left( 1 - \frac 2 \pi\right)( \sigma_2 - \sigma_1 )^2 + \sigma_1 \sigma_2 : \operatorname( X ) = \sqrt( \sigma_2 - \sigma_1 ) \left[ \left( \frac 4 \pi - 1 \right) ( \sigma_2 - \sigma_1)^2 + \sigma_1 \sigma_2 \right] where E(''X''), V(''X'') and T(''X'') are the mean, variance, and third central moment respectively. One of the main practical uses of the Gaussian law is to model the empirical distributions of many different random variables encountered in practice. In such case a possible extension would be a richer family of distributions, having more than two parameters and therefore being able to fit the empirical distribution more accurately. The examples of such extensions are: * Pearson distribution — a four-parameter family of probability distributions that extend the normal law to include different skewness and kurtosis values. * The generalized normal distribution, also known as the exponential power distribution, allows for distribution tails with thicker or thinner asymptotic behaviors.


Statistical inference


Estimation of parameters

It is often the case that we do not know the parameters of the normal distribution, but instead want to Estimation theory, estimate them. That is, having a sample (x_1, \ldots, x_n) from a normal N(\mu, \sigma^2) population we would like to learn the approximate values of parameters \mu and \sigma^2. The standard approach to this problem is the maximum likelihood method, which requires maximization of the ''log-likelihood function'': : \ln\mathcal(\mu,\sigma^2) = \sum_^n \ln f(x_i\mid\mu,\sigma^2) = -\frac\ln(2\pi) - \frac\ln\sigma^2 - \frac\sum_^n (x_i-\mu)^2. Taking derivatives with respect to \mu and \sigma^2 and solving the resulting system of first order conditions yields the ''maximum likelihood estimates'': : \hat = \overline \equiv \frac\sum_^n x_i, \qquad \hat^2 = \frac \sum_^n (x_i - \overline)^2.


Sample mean

Estimator \textstyle\hat\mu is called the ''
sample mean The sample mean (or "empirical mean") and the sample covariance are statistics computed from a Sample (statistics), sample of data on one or more random variables. The sample mean is the average value (or mean, mean value) of a sample (statistic ...
'', since it is the arithmetic mean of all observations. The statistic \textstyle\overline is complete statistic, complete and sufficient statistic, sufficient for \mu, and therefore by the Lehmann–Scheffé theorem, \textstyle\hat\mu is the uniformly minimum variance unbiased (UMVU) estimator. In finite samples it is distributed normally: : \hat\mu \sim \mathcal(\mu,\sigma^2/n). The variance of this estimator is equal to the ''μμ''-element of the inverse Fisher information matrix \textstyle\mathcal^. This implies that the estimator is efficient estimator, finite-sample efficient. Of practical importance is the fact that the standard error (statistics), standard error of \textstyle\hat\mu is proportional to \textstyle1/\sqrt, that is, if one wishes to decrease the standard error by a factor of 10, one must increase the number of points in the sample by a factor of 100. This fact is widely used in determining sample sizes for opinion polls and the number of trials in Monte Carlo simulations. From the standpoint of the asymptotic theory (statistics), asymptotic theory, \textstyle\hat\mu is consistent estimator, consistent, that is, it convergence in probability, converges in probability to \mu as n\rightarrow\infty. The estimator is also asymptotic normality, asymptotically normal, which is a simple corollary of the fact that it is normal in finite samples: : \sqrt(\hat\mu-\mu) \,\xrightarrow\, \mathcal(0,\sigma^2).


Sample variance

The estimator \textstyle\hat\sigma^2 is called the ''sample variance'', since it is the variance of the sample ((x_1, \ldots, x_n)). In practice, another estimator is often used instead of the \textstyle\hat\sigma^2. This other estimator is denoted s^2, and is also called the ''sample variance'', which represents a certain ambiguity in terminology; its square root s is called the ''sample standard deviation''. The estimator s^2 differs from \textstyle\hat\sigma^2 by having instead of ''n'' in the denominator (the so-called Bessel's correction): : s^2 = \frac \hat\sigma^2 = \frac \sum_^n (x_i - \overline)^2. The difference between s^2 and \textstyle\hat\sigma^2 becomes negligibly small for large ''n''s. In finite samples however, the motivation behind the use of s^2 is that it is an unbiased estimator of the underlying parameter \sigma^2, whereas \textstyle\hat\sigma^2 is biased. Also, by the Lehmann–Scheffé theorem the estimator s^2 is uniformly minimum variance unbiased (Minimum-variance unbiased estimator, UMVU), which makes it the "best" estimator among all unbiased ones. However it can be shown that the biased estimator \textstyle\hat\sigma^2 is "better" than the s^2 in terms of the mean squared error (MSE) criterion. In finite samples both s^2 and \textstyle\hat\sigma^2 have scaled
chi-squared distribution In probability theory and statistics, the chi-squared distribution (also chi-square or \chi^2-distribution) with k degrees of freedom is the distribution of a sum of the squares of k independent standard normal random variables. The chi-squa ...
with degrees of freedom: : s^2 \sim \frac \cdot \chi^2_, \qquad \hat\sigma^2 \sim \frac \cdot \chi^2_. The first of these expressions shows that the variance of s^2 is equal to 2\sigma^4/(n-1), which is slightly greater than the ''σσ''-element of the inverse Fisher information matrix \textstyle\mathcal^. Thus, s^2 is not an efficient estimator for \sigma^2, and moreover, since s^2 is UMVU, we can conclude that the finite-sample efficient estimator for \sigma^2 does not exist. Applying the asymptotic theory, both estimators s^2 and \textstyle\hat\sigma^2 are consistent, that is they converge in probability to \sigma^2 as the sample size n\rightarrow\infty. The two estimators are also both asymptotically normal: : \sqrt(\hat\sigma^2 - \sigma^2) \simeq \sqrt(s^2-\sigma^2) \,\xrightarrow\, \mathcal(0,2\sigma^4). In particular, both estimators are asymptotically efficient for \sigma^2.


Confidence intervals

By
Cochran's theorem In statistics, Cochran's theorem, devised by William G. Cochran, is a theorem used to justify results relating to the probability distributions of statistics that are used in the analysis of variance. Statement Let ''U''1, ..., ''U'N'' be i.i. ...
, for normal distributions the sample mean \textstyle\hat\mu and the sample variance ''s''2 are
independent Independent or Independents may refer to: Arts, entertainment, and media Artist groups * Independents (artist group), a group of modernist painters based in the New Hope, Pennsylvania, area of the United States during the early 1930s * Independ ...
, which means there can be no gain in considering their joint distribution. There is also a converse theorem: if in a sample the sample mean and sample variance are independent, then the sample must have come from the normal distribution. The independence between \textstyle\hat\mu and ''s'' can be employed to construct the so-called ''t-statistic'': : t = \frac = \frac \sim t_ This quantity ''t'' has the
Student's t-distribution In probability and statistics, Student's ''t''-distribution (or simply the ''t''-distribution) is any member of a family of continuous probability distributions that arise when estimating the mean of a normally distributed population in sit ...
with degrees of freedom, and it is an ancillary statistic (independent of the value of the parameters). Inverting the distribution of this ''t''-statistics will allow us to construct the
confidence interval In frequentist statistics, a confidence interval (CI) is a range of estimates for an unknown parameter. A confidence interval is computed at a designated ''confidence level''; the 95% confidence level is most common, but other levels, such as 9 ...
for ''μ''; similarly, inverting the ''χ''2 distribution of the statistic ''s''2 will give us the confidence interval for ''σ''2: :\mu \in \left[ \hat\mu - t_ \fracs, \hat\mu + t_ \fracs \right], :\sigma^2 \in \left[ \frac, \frac \right], where ''tk,p'' and are the ''p''th
quantile In statistics and probability, quantiles are cut points dividing the range of a probability distribution into continuous intervals with equal probabilities, or dividing the observations in a sample in the same way. There is one fewer quantile tha ...
s of the ''t''- and ''χ''2-distributions respectively. These confidence intervals are of the ''confidence level'' , meaning that the true values ''μ'' and ''σ''2 fall outside of these intervals with probability (or significance level) ''α''. In practice people usually take , resulting in the 95% confidence intervals. Approximate formulas can be derived from the asymptotic distributions of \textstyle\hat\mu and ''s''2: :\mu \in \left[ \hat\mu - , z_, \fracs, \hat\mu + , z_, \fracs \right], :\sigma^2 \in \left[ s^2 - , z_, \fracs^2, s^2 + , z_, \fracs^2 \right], The approximate formulas become valid for large values of ''n'', and are more convenient for the manual calculation since the standard normal quantiles ''z''''α''/2 do not depend on ''n''. In particular, the most popular value of , results in .


Normality tests

Normality tests assess the likelihood that the given data set comes from a normal distribution. Typically the null hypothesis ''H''0 is that the observations are distributed normally with unspecified mean ''μ'' and variance ''σ''2, versus the alternative ''Ha'' that the distribution is arbitrary. Many tests (over 40) have been devised for this problem. The more prominent of them are outlined below: Diagnostic plots are more intuitively appealing but subjective at the same time, as they rely on informal human judgement to accept or reject the null hypothesis. *
Q–Q plot In statistics, a Q–Q plot (quantile-quantile plot) is a probability plot, a List of graphical methods, graphical method for comparing two probability distributions by plotting their ''quantiles'' against each other. A point on the plot co ...
, also known as normal probability plot or rankit plot—is a plot of the sorted values from the data set against the expected values of the corresponding quantiles from the standard normal distribution. That is, it's a plot of point of the form (Φ−1(''pk''), ''x''(''k'')), where plotting points ''pk'' are equal to ''pk'' = (''k'' − ''α'')/(''n'' + 1 − 2''α'') and ''α'' is an adjustment constant, which can be anything between 0 and 1. If the null hypothesis is true, the plotted points should approximately lie on a straight line. * P–P plot – similar to the Q–Q plot, but used much less frequently. This method consists of plotting the points (Φ(''z''(''k'')), ''pk''), where \textstyle z_ = (x_-\hat\mu)/\hat\sigma. For normally distributed data this plot should lie on a 45° line between (0, 0) and (1, 1). Goodness-of-fit tests: ''Moment-based tests'': * D'Agostino's K-squared test * Jarque–Bera test * Shapiro–Wilk test: This is based on the fact that the line in the Q–Q plot has the slope of ''σ''. The test compares the least squares estimate of that slope with the value of the sample variance, and rejects the null hypothesis if these two quantities differ significantly. ''Tests based on the empirical distribution function'': * Anderson–Darling test * Lilliefors test (an adaptation of the Kolmogorov–Smirnov test)


Bayesian analysis of the normal distribution

Bayesian analysis of normally distributed data is complicated by the many different possibilities that may be considered: * Either the mean, or the variance, or neither, may be considered a fixed quantity. * When the variance is unknown, analysis may be done directly in terms of the variance, or in terms of the
precision Precision, precise or precisely may refer to: Science, and technology, and mathematics Mathematics and computing (general) * Accuracy and precision, measurement deviation from true value and its scatter * Significant figures, the number of digit ...
, the reciprocal of the variance. The reason for expressing the formulas in terms of precision is that the analysis of most cases is simplified. * Both univariate and multivariate normal distribution, multivariate cases need to be considered. * Either conjugate prior, conjugate or improper prior, improper prior distributions may be placed on the unknown variables. * An additional set of cases occurs in Bayesian linear regression, where in the basic model the data is assumed to be normally distributed, and normal priors are placed on the regression coefficients. The resulting analysis is similar to the basic cases of independent identically distributed data. The formulas for the non-linear-regression cases are summarized in the conjugate prior article.


Sum of two quadratics


= Scalar form

= The following auxiliary formula is useful for simplifying the posterior distribution, posterior update equations, which otherwise become fairly tedious. :a(x-y)^2 + b(x-z)^2 = (a + b)\left(x - \frac\right)^2 + \frac(y-z)^2 This equation rewrites the sum of two quadratics in ''x'' by expanding the squares, grouping the terms in ''x'', and completing the square. Note the following about the complex constant factors attached to some of the terms: # The factor \frac has the form of a weighted average of ''y'' and ''z''. # \frac = \frac = (a^ + b^)^. This shows that this factor can be thought of as resulting from a situation where the Multiplicative inverse, reciprocals of quantities ''a'' and ''b'' add directly, so to combine ''a'' and ''b'' themselves, it's necessary to reciprocate, add, and reciprocate the result again to get back into the original units. This is exactly the sort of operation performed by the harmonic mean, so it is not surprising that \frac is one-half the harmonic mean of ''a'' and ''b''.


= Vector form

= A similar formula can be written for the sum of two vector quadratics: If x, y, z are vectors of length ''k'', and A and B are symmetric matrix, symmetric, invertible matrices of size k\times k, then : \begin & (\mathbf-\mathbf)'\mathbf(\mathbf-\mathbf) + (\mathbf-\mathbf)' \mathbf(\mathbf-\mathbf) \\ = & (\mathbf - \mathbf)'(\mathbf+\mathbf)(\mathbf - \mathbf) + (\mathbf - \mathbf)'(\mathbf^ + \mathbf^)^(\mathbf - \mathbf) \end where :\mathbf = (\mathbf + \mathbf)^(\mathbf\mathbf + \mathbf \mathbf) Note that the form x′ A x is called a
quadratic form In mathematics, a quadratic form is a polynomial with terms all of degree two ("form" is another name for a homogeneous polynomial). For example, :4x^2 + 2xy - 3y^2 is a quadratic form in the variables and . The coefficients usually belong to a ...
and is a scalar (mathematics), scalar: :\mathbf'\mathbf\mathbf = \sum_a_ x_i x_j In other words, it sums up all possible combinations of products of pairs of elements from x, with a separate coefficient for each. In addition, since x_i x_j = x_j x_i, only the sum a_ + a_ matters for any off-diagonal elements of A, and there is no loss of generality in assuming that A is symmetric matrix, symmetric. Furthermore, if A is symmetric, then the form \mathbf'\mathbf\mathbf = \mathbf'\mathbf\mathbf.


Sum of differences from the mean

Another useful formula is as follows: \sum_^n (x_i-\mu)^2 = \sum_^n (x_i-\bar)^2 + n(\bar -\mu)^2 where \bar = \frac \sum_^n x_i.


With known variance

For a set of i.i.d. normally distributed data points X of size ''n'' where each individual point ''x'' follows x \sim \mathcal(\mu, \sigma^2) with known
variance In probability theory and statistics, variance is the expectation of the squared deviation of a random variable from its population mean or sample mean. Variance is a measure of dispersion, meaning it is a measure of how far a set of numbers ...
σ2, the conjugate prior distribution is also normally distributed. This can be shown more easily by rewriting the variance as the
precision Precision, precise or precisely may refer to: Science, and technology, and mathematics Mathematics and computing (general) * Accuracy and precision, measurement deviation from true value and its scatter * Significant figures, the number of digit ...
, i.e. using τ = 1/σ2. Then if x \sim \mathcal(\mu, 1/\tau) and \mu \sim \mathcal(\mu_0, 1/\tau_0), we proceed as follows. First, the likelihood function is (using the formula above for the sum of differences from the mean): :\begin p(\mathbf\mid\mu,\tau) &= \prod_^n \sqrt \exp\left(-\frac\tau(x_i-\mu)^2\right) \\ &= \left(\frac\right)^ \exp\left(-\frac\tau \sum_^n (x_i-\mu)^2\right) \\ &= \left(\frac\right)^ \exp\left[-\frac\tau \left(\sum_^n(x_i-\bar)^2 + n(\bar -\mu)^2\right)\right]. \end Then, we proceed as follows: :\begin p(\mu\mid\mathbf) &\propto p(\mathbf\mid\mu) p(\mu) \\ & = \left(\frac\right)^ \exp\left[-\frac\tau \left(\sum_^n(x_i-\bar)^2 + n(\bar -\mu)^2\right)\right] \sqrt \exp\left(-\frac\tau_0(\mu-\mu_0)^2\right) \\ &\propto \exp\left(-\frac\left(\tau\left(\sum_^n(x_i-\bar)^2 + n(\bar -\mu)^2\right) + \tau_0(\mu-\mu_0)^2\right)\right) \\ &\propto \exp\left(-\frac \left(n\tau(\bar-\mu)^2 + \tau_0(\mu-\mu_0)^2 \right)\right) \\ &= \exp\left(-\frac(n\tau + \tau_0)\left(\mu - \dfrac\right)^2 + \frac(\bar - \mu_0)^2\right) \\ &\propto \exp\left(-\frac(n\tau + \tau_0)\left(\mu - \dfrac\right)^2\right) \end In the above derivation, we used the formula above for the sum of two quadratics and eliminated all constant factors not involving ''μ''. The result is the kernel (statistics), kernel of a normal distribution, with mean \frac and precision n\tau + \tau_0, i.e. :p(\mu\mid\mathbf) \sim \mathcal\left(\frac, \frac\right) This can be written as a set of Bayesian update equations for the posterior parameters in terms of the prior parameters: :\begin \tau_0' &= \tau_0 + n\tau \\[5pt] \mu_0' &= \frac \\[5pt] \bar &= \frac\sum_^n x_i \end That is, to combine ''n'' data points with total precision of ''nτ'' (or equivalently, total variance of ''n''/''σ''2) and mean of values \bar, derive a new total precision simply by adding the total precision of the data to the prior total precision, and form a new mean through a ''precision-weighted average'', i.e. a weighted average of the data mean and the prior mean, each weighted by the associated total precision. This makes logical sense if the precision is thought of as indicating the certainty of the observations: In the distribution of the posterior mean, each of the input components is weighted by its certainty, and the certainty of this distribution is the sum of the individual certainties. (For the intuition of this, compare the expression "the whole is (or is not) greater than the sum of its parts". In addition, consider that the knowledge of the posterior comes from a combination of the knowledge of the prior and likelihood, so it makes sense that we are more certain of it than of either of its components.) The above formula reveals why it is more convenient to do Bayesian analysis of conjugate priors for the normal distribution in terms of the precision. The posterior precision is simply the sum of the prior and likelihood precisions, and the posterior mean is computed through a precision-weighted average, as described above. The same formulas can be written in terms of variance by reciprocating all the precisions, yielding the more ugly formulas :\begin ' &= \frac \\[5pt] \mu_0' &= \frac \\[5pt] \bar &= \frac\sum_^n x_i \end


With known mean

For a set of i.i.d. normally distributed data points X of size ''n'' where each individual point ''x'' follows x \sim \mathcal(\mu, \sigma^2) with known mean μ, the conjugate prior of the
variance In probability theory and statistics, variance is the expectation of the squared deviation of a random variable from its population mean or sample mean. Variance is a measure of dispersion, meaning it is a measure of how far a set of numbers ...
has an inverse gamma distribution or a scaled inverse chi-squared distribution. The two are equivalent 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. The prior for σ2 is as follows: :p(\sigma^2\mid\nu_0,\sigma_0^2) = \frac~\frac \propto \frac The likelihood function from above, written in terms of the variance, is: :\begin p(\mathbf\mid\mu,\sigma^2) &= \left(\frac\right)^ \exp\left[-\frac \sum_^n (x_i-\mu)^2\right] \\ &= \left(\frac\right)^ \exp\left[-\frac\right] \end where :S = \sum_^n (x_i-\mu)^2. Then: :\begin p(\sigma^2\mid\mathbf) &\propto p(\mathbf\mid\sigma^2) p(\sigma^2) \\ &= \left(\frac\right)^ \exp\left[-\frac\right] \frac~\frac \\ &\propto \left(\frac\right)^ \frac \exp\left[-\frac + \frac\right] \\ &= \frac \exp\left[-\frac\right] \end The above is also a scaled inverse chi-squared distribution where :\begin \nu_0' &= \nu_0 + n \\ \nu_0'' &= \nu_0 \sigma_0^2 + \sum_^n (x_i-\mu)^2 \end or equivalently :\begin \nu_0' &= \nu_0 + n \\ ' &= \frac \end Reparameterizing in terms of an inverse gamma distribution, the result is: :\begin \alpha' &= \alpha + \frac \\ \beta' &= \beta + \frac \end


With unknown mean and unknown variance

For a set of i.i.d. normally distributed data points X of size ''n'' where each individual point ''x'' follows x \sim \mathcal(\mu, \sigma^2) with unknown mean μ and unknown
variance In probability theory and statistics, variance is the expectation of the squared deviation of a random variable from its population mean or sample mean. Variance is a measure of dispersion, meaning it is a measure of how far a set of numbers ...
σ2, a combined (multivariate) conjugate prior is placed over the mean and variance, consisting of a normal-inverse-gamma distribution. Logically, this originates as follows: # From the analysis of the case with unknown mean but known variance, we see that the update equations involve sufficient statistics computed from the data consisting of the mean of the data points and the total variance of the data points, computed in turn from the known variance divided by the number of data points. # From the analysis of the case with unknown variance but known mean, we see that the update equations involve sufficient statistics over the data consisting of the number of data points and sum of squared deviations. # Keep in mind that the posterior update values serve as the prior distribution when further data is handled. Thus, we should logically think of our priors in terms of the sufficient statistics just described, with the same semantics kept in mind as much as possible. # To handle the case where both mean and variance are unknown, we could place independent priors over the mean and variance, with fixed estimates of the average mean, total variance, number of data points used to compute the variance prior, and sum of squared deviations. Note however that in reality, the total variance of the mean depends on the unknown variance, and the sum of squared deviations that goes into the variance prior (appears to) depend on the unknown mean. In practice, the latter dependence is relatively unimportant: Shifting the actual mean shifts the generated points by an equal amount, and on average the squared deviations will remain the same. This is not the case, however, with the total variance of the mean: As the unknown variance increases, the total variance of the mean will increase proportionately, and we would like to capture this dependence. # This suggests that we create a ''conditional prior'' of the mean on the unknown variance, with a hyperparameter specifying the mean of the pseudo-observations associated with the prior, and another parameter specifying the number of pseudo-observations. This number serves as a scaling parameter on the variance, making it possible to control the overall variance of the mean relative to the actual variance parameter. The prior for the variance also has two hyperparameters, one specifying the sum of squared deviations of the pseudo-observations associated with the prior, and another specifying once again the number of pseudo-observations. Note that each of the priors has a hyperparameter specifying the number of pseudo-observations, and in each case this controls the relative variance of that prior. These are given as two separate hyperparameters so that the variance (aka the confidence) of the two priors can be controlled separately. # This leads immediately to the normal-inverse-gamma distribution, which is the product of the two distributions just defined, with conjugate priors used (an inverse gamma distribution over the variance, and a normal distribution over the mean, ''conditional'' on the variance) and with the same four parameters just defined. The priors are normally defined as follows: :\begin p(\mu\mid\sigma^2; \mu_0, n_0) &\sim \mathcal(\mu_0,\sigma^2/n_0) \\ p(\sigma^2; \nu_0,\sigma_0^2) &\sim I\chi^2(\nu_0,\sigma_0^2) = IG(\nu_0/2, \nu_0\sigma_0^2/2) \end The update equations can be derived, and look as follows: :\begin \bar &= \frac 1 n \sum_^n x_i \\ \mu_0' &= \frac \\ n_0' &= n_0 + n \\ \nu_0' &= \nu_0 + n \\ \nu_0'' &= \nu_0 \sigma_0^2 + \sum_^n (x_i-\bar)^2 + \frac(\mu_0 - \bar)^2 \end The respective numbers of pseudo-observations add the number of actual observations to them. The new mean hyperparameter is once again a weighted average, this time weighted by the relative numbers of observations. Finally, the update for \nu_0'' is similar to the case with known mean, but in this case the sum of squared deviations is taken with respect to the observed data mean rather than the true mean, and as a result a new "interaction term" needs to be added to take care of the additional error source stemming from the deviation between prior and data mean.


Occurrence and applications

The occurrence of normal distribution in practical problems can be loosely classified into four categories: # Exactly normal distributions; # Approximately normal laws, for example when such approximation is justified by the
central limit theorem In probability theory, the central limit theorem (CLT) establishes that, in many situations, when independent random variables are summed up, their properly normalized sum tends toward a normal distribution even if the original variables themselv ...
; and # Distributions modeled as normal – the normal distribution being the distribution with Principle of maximum entropy, maximum entropy for a given mean and variance. # Regression problems – the normal distribution being found after systematic effects have been modeled sufficiently well.


Exact normality

Certain quantities in physics are distributed normally, as was first demonstrated by James Clerk Maxwell. Examples of such quantities are: * Probability density function of a ground state in a quantum harmonic oscillator. * The position of a particle that experiences diffusion. If initially the particle is located at a specific point (that is its probability distribution is the Dirac delta function), then after time ''t'' its location is described by a normal distribution with variance ''t'', which satisfies the diffusion equation \frac f(x,t) = \frac \frac f(x,t). If the initial location is given by a certain density function g(x), then the density at time ''t'' is the convolution of ''g'' and the normal PDF.


Approximate normality

''Approximately'' normal distributions occur in many situations, as explained by the
central limit theorem In probability theory, the central limit theorem (CLT) establishes that, in many situations, when independent random variables are summed up, their properly normalized sum tends toward a normal distribution even if the original variables themselv ...
. When the outcome is produced by many small effects acting ''additively and independently'', its distribution will be close to normal. The normal approximation will not be valid if the effects act multiplicatively (instead of additively), or if there is a single external influence that has a considerably larger magnitude than the rest of the effects. * In counting problems, where the central limit theorem includes a discrete-to-continuum approximation and where Infinite divisibility, infinitely divisible and Indecomposable distribution, decomposable distributions are involved, such as ** binomial distribution, Binomial random variables, associated with binary response variables; ** Poisson distribution, Poisson random variables, associated with rare events; * Thermal radiation has a Bose–Einstein statistics, Bose–Einstein distribution on very short time scales, and a normal distribution on longer timescales due to the central limit theorem.


Assumed normality

There are statistical methods to empirically test that assumption; see the above #Normality tests, Normality tests section. * In biology, the ''logarithm'' of various variables tend to have a normal distribution, that is, they tend to have a
log-normal distribution In probability theory, a log-normal (or lognormal) distribution is a continuous probability distribution of a random variable whose logarithm is normally distributed. Thus, if the random variable is log-normally distributed, then has a normal ...
(after separation on male/female subpopulations), with examples including: ** Measures of size of living tissue (length, height, skin area, weight); ** The ''length'' of ''inert'' appendages (hair, claws, nails, teeth) of biological specimens, ''in the direction of growth''; presumably the thickness of tree bark also falls under this category; ** Certain physiological measurements, such as blood pressure of adult humans. * In finance, in particular the Black–Scholes model, changes in the ''logarithm'' of exchange rates, price indices, and stock market indices are assumed normal (these variables behave like compound interest, not like simple interest, and so are multiplicative). Some mathematicians such as Benoit Mandelbrot have argued that Levy skew alpha-stable distribution, log-Levy distributions, which possesses heavy tails would be a more appropriate model, in particular for the analysis for stock market crashes. The use of the assumption of normal distribution occurring in financial models has also been criticized by Nassim Nicholas Taleb in his works. * Propagation of uncertainty, Measurement errors in physical experiments are often modeled by a normal distribution. This use of a normal distribution does not imply that one is assuming the measurement errors are normally distributed, rather using the normal distribution produces the most conservative predictions possible given only knowledge about the mean and variance of the errors. * In Standardized testing (statistics), standardized testing, results can be made to have a normal distribution by either selecting the number and difficulty of questions (as in the Intelligence quotient, IQ test) or transforming the raw test scores into "output" scores by fitting them to the normal distribution. For example, the SAT's traditional range of 200–800 is based on a normal distribution with a mean of 500 and a standard deviation of 100. * Many scores are derived from the normal distribution, including percentile ranks ("percentiles" or "quantiles"), normal curve equivalents, stanines, Standard score, z-scores, and T-scores. Additionally, some behavioral statistical procedures assume that scores are normally distributed; for example, Student's t-test, t-tests and Analysis of variance, ANOVAs. Bell curve grading assigns relative grades based on a normal distribution of scores. * In hydrology the distribution of long duration river discharge or rainfall, e.g. monthly and yearly totals, is often thought to be practically normal according to the
central limit theorem In probability theory, the central limit theorem (CLT) establishes that, in many situations, when independent random variables are summed up, their properly normalized sum tends toward a normal distribution even if the original variables themselv ...
. The blue picture, made with CumFreq, illustrates an example of fitting the normal distribution to ranked October rainfalls showing the 90% confidence belt based on the
binomial distribution In probability theory and statistics, the binomial distribution with parameters ''n'' and ''p'' is the discrete probability distribution of the number of successes in a sequence of ''n'' independent experiments, each asking a yes–no quest ...
. The rainfall data are represented by plotting positions as part of the cumulative frequency analysis.


Methodological problems and peer review

John Ioannidis argues that using normally distributed standard deviations as standards for validating research findings leave falsifiability, falsifiable predictions about phenomena that are not normally distributed untested. This includes, for example, phenomena that only appear when all necessary conditions are present and one cannot be a substitute for another in an addition-like way and phenomena that are not randomly distributed. Ioannidis argues that standard deviation-centered validation gives a false appearance of validity to hypotheses and theories where some but not all falsifiable predictions are normally distributed since the portion of falsifiable predictions that there is evidence against may and in some cases are in the non-normally distributed parts of the range of falsifiable predictions, as well as baselessly dismissing hypotheses for which none of the falsifiable predictions are normally distributed as if were they unfalsifiable when in fact they do make falsifiable predictions. It is argued by Ioannidis that many cases of mutually exclusive theories being accepted as "validated" by research journals are caused by failure of the journals to take in empirical falsifications of non-normally distributed predictions, and not because mutually exclusive theories are true, which they cannot be, although two mutually exclusive theories can both be wrong and a third one correct.


Computational methods


Generating values from normal distribution

In computer simulations, especially in applications of the Monte-Carlo method, it is often desirable to generate values that are normally distributed. The algorithms listed below all generate the standard normal deviates, since a can be generated as , where ''Z'' is standard normal. All these algorithms rely on the availability of a random number generator ''U'' capable of producing Uniform distribution (continuous), uniform random variates. * The most straightforward method is based on the probability integral transform property: if ''U'' is distributed uniformly on (0,1), then Φ−1(''U'') will have the standard normal distribution. The drawback of this method is that it relies on calculation of the
probit function In probability theory and statistics, the probit function is the quantile function associated with the standard normal distribution. It has applications in data analysis and machine learning, in particular exploratory statistical graphics and ...
Φ−1, which cannot be done analytically. Some approximate methods are described in and in the error function, erf article. Wichura gives a fast algorithm for computing this function to 16 decimal places, which is used by R programming language, R to compute random variates of the normal distribution. * Irwin–Hall distribution#Approximating a Normal distribution, An easy-to-program approximate approach that relies on the
central limit theorem In probability theory, the central limit theorem (CLT) establishes that, in many situations, when independent random variables are summed up, their properly normalized sum tends toward a normal distribution even if the original variables themselv ...
is as follows: generate 12 uniform ''U''(0,1) deviates, add them all up, and subtract 6 – the resulting random variable will have approximately standard normal distribution. In truth, the distribution will be Irwin–Hall distribution, Irwin–Hall, which is a 12-section eleventh-order polynomial approximation to the normal distribution. This random deviate will have a limited range of (−6, 6). Note that in a true normal distribution, only 0.00034% of all samples will fall outside ±6σ. * The Box–Muller transform, Box–Muller method uses two independent random numbers ''U'' and ''V'' distributed uniform distribution (continuous), uniformly on (0,1). Then the two random variables ''X'' and ''Y'' X = \sqrt \, \cos(2 \pi V) , \qquad Y = \sqrt \, \sin(2 \pi V) . will both have the standard normal distribution, and will be
independent Independent or Independents may refer to: Arts, entertainment, and media Artist groups * Independents (artist group), a group of modernist painters based in the New Hope, Pennsylvania, area of the United States during the early 1930s * Independ ...
. This formulation arises because for a bivariate normal random vector (''X'', ''Y'') the squared norm will have the
chi-squared distribution In probability theory and statistics, the chi-squared distribution (also chi-square or \chi^2-distribution) with k degrees of freedom is the distribution of a sum of the squares of k independent standard normal random variables. The chi-squa ...
with two degrees of freedom, which is an easily generated exponential distribution, exponential random variable corresponding to the quantity −2ln(''U'') in these equations; and the angle is distributed uniformly around the circle, chosen by the random variable ''V''. * The Marsaglia polar method is a modification of the Box–Muller method which does not require computation of the sine and cosine functions. In this method, ''U'' and ''V'' are drawn from the uniform (−1,1) distribution, and then is computed. If ''S'' is greater or equal to 1, then the method starts over, otherwise the two quantities X = U\sqrt, \qquad Y = V\sqrt are returned. Again, ''X'' and ''Y'' are independent, standard normal random variables. * The Ratio method is a rejection method. The algorithm proceeds as follows: ** Generate two independent uniform deviates ''U'' and ''V''; ** Compute ''X'' = (''V'' − 0.5)/''U''; ** Optional: if ''X''2 ≤ 5 − 4''e''1/4''U'' then accept ''X'' and terminate algorithm; ** Optional: if ''X''2 ≥ 4''e''−1.35/''U'' + 1.4 then reject ''X'' and start over from step 1; ** If ''X''2 ≤ −4 ln''U'' then accept ''X'', otherwise start over the algorithm. *:The two optional steps allow the evaluation of the logarithm in the last step to be avoided in most cases. These steps can be greatly improved so that the logarithm is rarely evaluated. * The ziggurat algorithm is faster than the Box–Muller transform and still exact. In about 97% of all cases it uses only two random numbers, one random integer and one random uniform, one multiplication and an if-test. Only in 3% of the cases, where the combination of those two falls outside the "core of the ziggurat" (a kind of rejection sampling using logarithms), do exponentials and more uniform random numbers have to be employed. * Integer arithmetic can be used to sample from the standard normal distribution. This method is exact in the sense that it satisfies the conditions of ''ideal approximation''; i.e., it is equivalent to sampling a real number from the standard normal distribution and rounding this to the nearest representable floating point number. * There is also some investigation into the connection between the fast Hadamard transform and the normal distribution, since the transform employs just addition and subtraction and by the central limit theorem random numbers from almost any distribution will be transformed into the normal distribution. In this regard a series of Hadamard transforms can be combined with random permutations to turn arbitrary data sets into a normally distributed data.


Numerical approximations for the normal CDF and normal quantile function

The standard normal cumulative distribution function, CDF is widely used in scientific and statistical computing. The values Φ(''x'') may be approximated very accurately by a variety of methods, such as numerical integration, Taylor series, asymptotic series and Gauss's continued fraction#Of Kummer's confluent hypergeometric function, continued fractions. Different approximations are used depending on the desired level of accuracy. * give the approximation for Φ(''x'') for ''x > 0'' with the absolute error (algorith
26.2.17
: \Phi(x) = 1 - \varphi(x)\left(b_1 t + b_2 t^2 + b_3t^3 + b_4 t^4 + b_5 t^5\right) + \varepsilon(x), \qquad t = \frac, where ''ϕ''(''x'') is the standard normal PDF, and ''b''0 = 0.2316419, ''b''1 = 0.319381530, ''b''2 = −0.356563782, ''b''3 = 1.781477937, ''b''4 = −1.821255978, ''b''5 = 1.330274429. * lists some dozens of approximations – by means of rational functions, with or without exponentials – for the function. His algorithms vary in the degree of complexity and the resulting precision, with maximum absolute precision of 24 digits. An algorithm by combines Hart's algorithm 5666 with a continued fraction approximation in the tail to provide a fast computation algorithm with a 16-digit precision. * after recalling Hart68 solution is not suited for erf, gives a solution for both erf and erfc, with maximal relative error bound, via rational function, Rational Chebyshev Approximation. * suggested a simple algorithm based on the Taylor series expansion \Phi(x) = \frac12 + \varphi(x)\left( x + \frac 3 + \frac + \frac + \frac + \cdots \right) for calculating with arbitrary precision. The drawback of this algorithm is comparatively slow calculation time (for example it takes over 300 iterations to calculate the function with 16 digits of precision when ). * The GNU Scientific Library calculates values of the standard normal CDF using Hart's algorithms and approximations with Chebyshev polynomials. Shore (1982) introduced simple approximations that may be incorporated in stochastic optimization models of engineering and operations research, like reliability engineering and inventory analysis. Denoting , the simplest approximation for the quantile function is: z = \Phi^(p)=5.5556\left[1- \left( \frac p \right)^\right],\qquad p\ge 1/2 This approximation delivers for ''z'' a maximum absolute error of 0.026 (for , corresponding to ). For replace ''p'' by and change sign. Another approximation, somewhat less accurate, is the single-parameter approximation: z=-0.4115\left\, \qquad p\ge 1/2 The latter had served to derive a simple approximation for the loss integral of the normal distribution, defined by \begin L(z) & =\int_z^\infty (u-z)\varphi(u) \, du=\int_z^\infty [1-\Phi (u)] \, du \\[5pt] L(z) & \approx \begin 0.4115\left(\dfrac p \right) - z, & p<1/2, \\ \\ 0.4115\left( \dfrac p \right), & p\ge 1/2. \end \\[5pt] \text \\ L(z) & \approx \begin 0.4115\left\, & p < 1/2, \\ \\ 0.4115 \dfrac p, & p\ge 1/2. \end \end This approximation is particularly accurate for the right far-tail (maximum error of 10−3 for z≥1.4). Highly accurate approximations for the CDF, based on Response modeling methodology, Response Modeling Methodology (RMM, Shore, 2011, 2012), are shown in Shore (2005). Some more approximations can be found at: Error function#Approximation with elementary functions. In particular, small ''relative'' error on the whole domain for the CDF \Phi and the quantile function \Phi^ as well, is achieved via an explicitly invertible formula by Sergei Winitzki in 2008.


History


Development

Some authors attribute the credit for the discovery of the normal distribution to Abraham de Moivre, de Moivre, who in 1738 published in the second edition of his "''The Doctrine of Chances''" the study of the coefficients in the binomial expansion of . De Moivre proved that the middle term in this expansion has the approximate magnitude of 2^n/\sqrt, and that "If ''m'' or ''n'' be a Quantity infinitely great, then the Logarithm of the Ratio, which a Term distant from the middle by the Interval ''ℓ'', has to the middle Term, is -\frac." Although this theorem can be interpreted as the first obscure expression for the normal probability law, Stephen Stigler, Stigler points out that de Moivre himself did not interpret his results as anything more than the approximate rule for the binomial coefficients, and in particular de Moivre lacked the concept of the probability density function. In 1823 Carl Friedrich Gauss, Gauss published his monograph "''Theoria combinationis observationum erroribus minimis obnoxiae''" where among other things he introduces several important statistical concepts, such as the method of least squares, the method of maximum likelihood, and the ''normal distribution''. Gauss used ''M'', , to denote the measurements of some unknown quantity ''V'', and sought the "most probable" estimator of that quantity: the one that maximizes the probability of obtaining the observed experimental results. In his notation φΔ is the probability density function of the measurement errors of magnitude Δ. Not knowing what the function ''φ'' is, Gauss requires that his method should reduce to the well-known answer: the arithmetic mean of the measured values. Starting from these principles, Gauss demonstrates that the only law that rationalizes the choice of arithmetic mean as an estimator of the location parameter, is the normal law of errors: \varphi\mathit = \frac h \, e^, where ''h'' is "the measure of the precision of the observations". Using this normal law as a generic model for errors in the experiments, Gauss formulates what is now known as the non-linear least squares, non-linear weighted least squares method. Although Gauss was the first to suggest the normal distribution law, Pierre Simon de Laplace, Laplace made significant contributions. It was Laplace who first posed the problem of aggregating several observations in 1774, although his own solution led to the Laplacian distribution. It was Laplace who first calculated the value of the Gaussian integral, integral in 1782, providing the normalization constant for the normal distribution. Finally, it was Laplace who in 1810 proved and presented to the Academy the fundamental
central limit theorem In probability theory, the central limit theorem (CLT) establishes that, in many situations, when independent random variables are summed up, their properly normalized sum tends toward a normal distribution even if the original variables themselv ...
, which emphasized the theoretical importance of the normal distribution. It is of interest to note that in 1809 an Irish-American mathematician Robert Adrain published two insightful but flawed derivations of the normal probability law, simultaneously and independently from Gauss. His works remained largely unnoticed by the scientific community, until in 1871 they were exhumed by Cleveland Abbe, Abbe. In the middle of the 19th century James Clerk Maxwell, Maxwell demonstrated that the normal distribution is not just a convenient mathematical tool, but may also occur in natural phenomena: "The number of particles whose velocity, resolved in a certain direction, lies between ''x'' and ''x'' + ''dx'' is \operatorname \frac\; e^ \, dx


Naming

Today, the concept is usually known in English as the normal distribution or Gaussian distribution. Other less common names include Gauss distribution, Laplace-Gauss distribution, the law of error, the law of facility of errors, Laplace's second law, Gaussian law. Gauss himself apparently coined the term with reference to the "normal equations" involved in its applications, with normal having its technical meaning of orthogonal rather than "usual". However, by the end of the 19th century some authors had started using the name ''normal distribution'', where the word "normal" was used as an adjective – the term now being seen as a reflection of the fact that this distribution was seen as typical, common – and thus "normal". Charles Sanders Peirce, Peirce (one of those authors) once defined "normal" thus: "...the 'normal' is not the average (or any other kind of mean) of what actually occurs, but of what ''would'', in the long run, occur under certain circumstances." Around the turn of the 20th century Karl Pearson, Pearson popularized the term ''normal'' as a designation for this distribution. Also, it was Pearson who first wrote the distribution in terms of the standard deviation ''σ'' as in modern notation. Soon after this, in year 1915, Ronald Fisher, Fisher added the location parameter to the formula for normal distribution, expressing it in the way it is written nowadays: df = \frac e^ \, dx. The term "standard normal", which denotes the normal distribution with zero mean and unit variance came into general use around the 1950s, appearing in the popular textbooks by P. G. Hoel (1947) "''Introduction to mathematical statistics''" and A. M. Mood (1950) "''Introduction to the theory of statistics''".


See also

* Bates distribution – similar to the Irwin–Hall distribution, but rescaled back into the 0 to 1 range * Behrens–Fisher problem – the long-standing problem of testing whether two normal samples with different variances have same means; * Bhattacharyya distance – method used to separate mixtures of normal distributions * Erdős–Kac theorem – on the occurrence of the normal distribution in number theory * Full width at half maximum * Gaussian blur – convolution, which uses the normal distribution as a kernel * Modified half-normal distribution with the pdf on (0, \infty) is given as f(x)= \frac, where \Psi(\alpha,z)=_1\Psi_1\left(\begin\left(\alpha,\frac\right)\\(1,0)\end;z \right) denotes the Fox-Wright Psi function. * Normally distributed and uncorrelated does not imply independent * Ratio normal distribution * Reciprocal normal distribution * Standard normal table * Stein's lemma * Sub-Gaussian distribution * Sum of normally distributed random variables * Tweedie distribution – The normal distribution is a member of the family of Tweedie exponential dispersion models. * Wrapped normal distribution – the Normal distribution applied to a circular domain * Z-test – using the normal distribution


Notes


References


Citations


Sources

* * In particular, the entries fo
"bell-shaped and bell curve"
an

* * * * * * * * * * * * * * * * * * * * * * * * Translated by Stephen M. Stigler in ''Statistical Science'' 1 (3), 1986: . * * * * * * * * * * * * * * * * * * * * * * * * * * * *


External links

*
Normal distribution calculator
{{Authority control Normal distribution, Continuous distributions Conjugate prior distributions Exponential family distributions Stable distributions Location-scale family probability distributions]">X - \mu, ^p\right&= \sigma^p (p-1)!! \cdot \begin \sqrt & \textp\text \\ 1 & \textp\text \end \\ &= \sigma^p \cdot \frac. \end The last formula is valid also for any non-integer p>-1. When the mean \mu \ne 0, the plain and absolute moments can be expressed in terms of
confluent hypergeometric function In mathematics, a confluent hypergeometric function is a solution of a confluent hypergeometric equation, which is a degenerate form of a hypergeometric differential equation where two of the three regular singularities merge into an irregular ...
s _1F_1 and U. :\begin \operatorname\left ^p\right&= \sigma^p\cdot (-i\sqrt 2)^p U\left(-\frac, \frac, -\frac \left( \frac \mu \sigma \right)^2 \right), \\ \operatorname\left Hermite polynomials#"Negative variance", generalized Hermite polynomials. The expectation of X conditioned on the event that X lies in an interval ,b/math> is given by :\operatorname\left \mid a= \mu - \sigma^2\frac where f and F respectively are the density and the cumulative distribution function of X. For b=\infty this is known as the
inverse Mills ratio In probability theory, the Mills ratio (or Mills's ratio) of a continuous random variable X is the function : m(x) := \frac , where f(x) is the probability density function, and :\bar(x) := \Pr x.html" ;"title=">x">>x= \int_x^ f(u)\, du is the ...
. Note that above, density f of X is used instead of standard normal density as in inverse Mills ratio, so here we have \sigma^2 instead of \sigma.


Fourier transform and characteristic function

The
Fourier transform A Fourier transform (FT) is a mathematical transform that decomposes functions into frequency components, which are represented by the output of the transform as a function of frequency. Most commonly functions of time or space are transformed, ...
of a normal density f with mean \mu and standard deviation \sigma is : \hat f(t) = \int_^\infty f(x)e^ \, dx = e^ e^ where i is the
imaginary unit The imaginary unit or unit imaginary number () is a solution to the quadratic equation x^2+1=0. Although there is no real number with this property, can be used to extend the real numbers to what are called complex numbers, using addition an ...
. If the mean \mu=0, the first factor is 1, and the Fourier transform is, apart from a constant factor, a normal density on the
frequency domain In physics, electronics, control systems engineering, and statistics, the frequency domain refers to the analysis of mathematical functions or signals with respect to frequency, rather than time. Put simply, a time-domain graph shows how a signa ...
, with mean 0 and standard deviation 1/\sigma. In particular, the standard normal distribution \varphi is an
eigenfunction In mathematics, an eigenfunction of a linear operator ''D'' defined on some function space is any non-zero function f in that space that, when acted upon by ''D'', is only multiplied by some scaling factor called an eigenvalue. As an equation, th ...
of the Fourier transform. In probability theory, the Fourier transform of the probability distribution of a real-valued random variable X is closely connected to the
characteristic function In mathematics, the term "characteristic function" can refer to any of several distinct concepts: * The indicator function of a subset, that is the function ::\mathbf_A\colon X \to \, :which for a given subset ''A'' of ''X'', has value 1 at points ...
\varphi_X(t) of that variable, which is defined as the
expected value In probability theory, the expected value (also called expectation, expectancy, mathematical expectation, mean, average, or first moment) is a generalization of the weighted average. Informally, the expected value is the arithmetic mean of a l ...
of e^, as a function of the real variable t (the
frequency Frequency is the number of occurrences of a repeating event per unit of time. It is also occasionally referred to as ''temporal frequency'' for clarity, and is distinct from ''angular frequency''. Frequency is measured in hertz (Hz) which is eq ...
parameter of the Fourier transform). This definition can be analytically extended to a complex-value variable t. The relation between both is: :\varphi_X(t) = \hat f(-t)


Moment and cumulant generating functions

The
moment generating function In probability theory and statistics, the moment-generating function of a real-valued random variable is an alternative specification of its probability distribution. Thus, it provides the basis of an alternative route to analytical results compare ...
of a real random variable X is the expected value of e^, as a function of the real parameter t. For a normal distribution with density f, mean \mu and deviation \sigma, the moment generating function exists and is equal to :M(t) = \operatorname ^= \hat f(it) = e^ e^ The
cumulant generating function In probability theory and statistics, the cumulants of a probability distribution are a set of quantities that provide an alternative to the '' moments'' of the distribution. Any two probability distributions whose moments are identical will have ...
is the logarithm of the moment generating function, namely :g(t) = \ln M(t) = \mu t + \tfrac 12 \sigma^2 t^2 Since this is a quadratic polynomial in t, only the first two
cumulant In probability theory and statistics, the cumulants of a probability distribution are a set of quantities that provide an alternative to the '' moments'' of the distribution. Any two probability distributions whose moments are identical will ha ...
s are nonzero, namely the mean \mu and the variance \sigma^2.


Stein operator and class

Within
Stein's method Stein's method is a general method in probability theory to obtain bounds on the distance between two probability distributions with respect to a probability metric. It was introduced by Charles Stein, who first published it in 1972, to obtain ...
the Stein operator and class of a random variable X \sim \mathcal(\mu, \sigma^2) are \mathcalf(x) = \sigma^2 f'(x) - (x-\mu)f(x) and \mathcal the class of all absolutely continuous functions f : \R \to \R \mbox\mathbb limit (mathematics), limit when \sigma tends to zero, the probability density f(x) eventually tends to zero at any x\ne \mu, but grows without limit if x = \mu, while its integral remains equal to 1. Therefore, the normal distribution cannot be defined as an ordinary
function Function or functionality may refer to: Computing * Function key, a type of key on computer keyboards * Function model, a structured representation of processes in a system * Function object or functor or functionoid, a concept of object-oriente ...
when \sigma = 0. However, one can define the normal distribution with zero variance as a
generalized function In mathematics, generalized functions are objects extending the notion of functions. There is more than one recognized theory, for example the theory of distributions. Generalized functions are especially useful in making discontinuous functions ...
; specifically, as Dirac's "delta function" \delta translated by the mean \mu, that is f(x)=\delta(x-\mu). Its CDF is then the
Heaviside step function The Heaviside step function, or the unit step function, usually denoted by or (but sometimes , or ), is a step function, named after Oliver Heaviside (1850–1925), the value of which is zero for negative arguments and one for positive argume ...
translated by the mean \mu, namely :F(x) = \begin 0 & \textx < \mu \\ 1 & \textx \geq \mu \end


Maximum entropy

Of all probability distributions over the reals with a specified mean \mu and variance \sigma^2, the normal distribution N(\mu,\sigma^2) is the one with maximum entropy. If X is a
continuous random variable In probability theory and statistics, a probability distribution is the mathematical function that gives the probabilities of occurrence of different possible outcomes for an experiment. It is a mathematical description of a random phenomenon i ...
with
probability density In probability theory, a probability density function (PDF), or density of a continuous random variable, is a function whose value at any given sample (or point) in the sample space (the set of possible values taken by the random variable) can ...
f(x), then the entropy of X is defined as : H(X) = - \int_^\infty f(x)\log f(x)\, dx where f(x)\log f(x) is understood to be zero whenever f(x)=0. This functional can be maximized, subject to the constraints that the distribution is properly normalized and has a specified variance, by using
variational calculus The calculus of variations (or Variational Calculus) is a field of mathematical analysis that uses variations, which are small changes in functions and functionals, to find maxima and minima of functionals: mappings from a set of functions t ...
. A function with two
Lagrange multipliers In mathematical optimization, the method of Lagrange multipliers is a strategy for finding the local maxima and minima of a function subject to equality constraints (i.e., subject to the condition that one or more equations have to be satisfied ex ...
is defined: : L=\int_^\infty f(x)\ln(f(x))\,dx-\lambda_0\left(1-\int_^\infty f(x)\,dx\right)-\lambda\left(\sigma^2-\int_^\infty f(x)(x-\mu)^2\,dx\right) where f(x) is, for now, regarded as some density function with mean \mu and standard deviation \sigma. At maximum entropy, a small variation \delta f(x) about f(x) will produce a variation \delta L about L which is equal to 0: : 0=\delta L=\int_^\infty \delta f(x)\left (\ln(f(x))+1+\lambda_0+\lambda(x-\mu)^2\right )\,dx Since this must hold for any small \delta f(x), the term in brackets must be zero, and solving for f(x) yields: :f(x)=e^ Using the constraint equations to solve for \lambda_0 and \lambda yields the density of the normal distribution: : f(x, \mu, \sigma)=\frace^ The entropy of a normal distribution is equal to : H(X)=\tfrac(1+\log(2\sigma^2\pi))


Other properties


Related distributions


Central limit theorem

The central limit theorem states that under certain (fairly common) conditions, the sum of many random variables will have an approximately normal distribution. More specifically, where X_1,\ldots ,X_n are
independent and identically distributed In probability theory and statistics, a collection of random variables is independent and identically distributed if each random variable has the same probability distribution as the others and all are mutually independent. This property is usua ...
random variables with the same arbitrary distribution, zero mean, and variance \sigma^2 and Z is their mean scaled by \sqrt : Z = \sqrt\left(\frac\sum_^n X_i\right) Then, as n increases, the probability distribution of Z will tend to the normal distribution with zero mean and variance \sigma^2. The theorem can be extended to variables (X_i) that are not independent and/or not identically distributed if certain constraints are placed on the degree of dependence and the moments of the distributions. Many
test statistic A test statistic is a statistic (a quantity derived from the sample) used in statistical hypothesis testing.Berger, R. L.; Casella, G. (2001). ''Statistical Inference'', Duxbury Press, Second Edition (p.374) A hypothesis test is typically specif ...
s, scores, and
estimator In statistics, an estimator is a rule for calculating an estimate of a given quantity based on observed data: thus the rule (the estimator), the quantity of interest (the estimand) and its result (the estimate) are distinguished. For example, the ...
s encountered in practice contain sums of certain random variables in 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 distributions. The central limit theorem also implies that certain distributions can be approximated by the normal distribution, for example: * The
binomial distribution In probability theory and statistics, the binomial distribution with parameters ''n'' and ''p'' is the discrete probability distribution of the number of successes in a sequence of ''n'' independent experiments, each asking a yes–no quest ...
B(n,p) is approximately normal with mean np and variance np(1-p) for large n and for p not too close to 0 or 1. * The
Poisson distribution In probability theory and statistics, the Poisson distribution is a discrete probability distribution that expresses the probability of a given number of events occurring in a fixed interval of time or space if these events occur with a known co ...
with parameter \lambda is approximately normal with mean \lambda and variance \lambda, for large values of \lambda. * The
chi-squared distribution In probability theory and statistics, the chi-squared distribution (also chi-square or \chi^2-distribution) with k degrees of freedom is the distribution of a sum of the squares of k independent standard normal random variables. The chi-squa ...
\chi^2(k) is approximately normal with mean k and variance 2k, for large k. * The
Student's t-distribution In probability and statistics, Student's ''t''-distribution (or simply the ''t''-distribution) is any member of a family of continuous probability distributions that arise when estimating the mean of a normally distributed population in sit ...
t(\nu) is approximately normal with mean 0 and variance 1 when \nu is large. Whether these approximations are sufficiently accurate depends on the purpose for which they are needed, and the rate of convergence to the normal distribution. It is typically the case that such approximations are less accurate in the tails of the distribution. A general upper bound for the approximation error in the central limit theorem is given by the
Berry–Esseen theorem In probability theory, the central limit theorem states that, under certain circumstances, the probability distribution of the scaled mean of a random sample converges to a normal distribution as the sample size increases to infinity. Under strong ...
, improvements of the approximation are given by the
Edgeworth expansion The Gram–Charlier A series (named in honor of Jørgen Pedersen Gram and Carl Charlier), and the Edgeworth series (named in honor of Francis Ysidro Edgeworth) are series that approximate a probability distribution in terms of its cumulants. The se ...
s. This theorem can also be used to justify modeling the sum of many uniform noise sources as
Gaussian noise Gaussian noise, named after Carl Friedrich Gauss, is a term from signal processing theory denoting a kind of signal noise that has a probability density function (pdf) equal to that of the normal distribution (which is also known as the Gaussia ...
. See
AWGN Additive white Gaussian noise (AWGN) is a basic noise model used in information theory to mimic the effect of many random processes that occur in nature. The modifiers denote specific characteristics: * ''Additive'' because it is added to any nois ...
.


Operations and functions of normal variables

The
probability density In probability theory, a probability density function (PDF), or density of a continuous random variable, is a function whose value at any given sample (or point) in the sample space (the set of possible values taken by the random variable) can ...
,
cumulative distribution In statistics, the frequency (or absolute frequency) of an event i is the number n_i of times the observation has occurred/recorded in an experiment or study. These frequencies are often depicted graphically or in tabular form. Types The cumul ...
, and inverse cumulative distribution of any function of one or more independent or correlated normal variables can be computed with the numerical method of ray-tracing
Matlab code
. In the following sections we look at some special cases.


Operations on a single normal variable

If X is distributed normally with mean \mu and variance \sigma^2, then * aX+b, for any real numbers a and b, is also normally distributed, with mean a\mu+b and standard deviation , a, \sigma. That is, the family of normal distributions is closed under linear transformations. * The exponential of X is distributed log-normally: . * The absolute value of X has
folded normal distribution The folded normal distribution is a probability distribution related to the normal distribution. Given a normally distributed random variable ''X'' with mean ''μ'' and variance ''σ''2, the random variable ''Y'' = , ''X'', has a folded normal d ...
: . If \mu = 0 this is known as the
half-normal distribution In probability theory and statistics, the half-normal distribution is a special case of the folded normal distribution. Let X follow an ordinary normal distribution, N(0,\sigma^2). Then, Y=, X, follows a half-normal distribution. Thus, the hal ...
. * The absolute value of normalized residuals, , ''X'' − ''μ'', /''σ'', has
chi distribution In probability theory and statistics, the chi distribution is a continuous probability distribution. It is the distribution of the positive square root of the sum of squares of a set of independent random variables each following a standard norm ...
with one degree of freedom: , X - \mu, / \sigma \sim \chi_1. * The square of ''X''/''σ'' has the
noncentral chi-squared distribution In probability theory and statistics, the noncentral chi-squared distribution (or noncentral chi-square distribution, noncentral \chi^2 distribution) is a noncentral generalization of the chi-squared distribution. It often arises in the power a ...
with one degree of freedom: X^2 / \sigma^2 \sim \chi_1^2(\mu^2 / \sigma^2). If \mu = 0, the distribution is called simply chi-squared. * The log likelihood of a normal variable x is simply the log of its
probability density function In probability theory, a probability density function (PDF), or density of a continuous random variable, is a function whose value at any given sample (or point) in the sample space (the set of possible values taken by the random variable) can ...
: \ln p(x)= -\frac \left(\frac \right)^2 -\ln \left(\sigma \sqrt \right) = -\frac z^2 -\ln \left(\sigma \sqrt \right). Since this is a scaled and shifted square of a standard normal variable, it is distributed as a scaled and shifted chi-squared variable. * The distribution of the variable ''X'' restricted to an interval 'a'', ''b''is called the
truncated normal distribution In probability and statistics, the truncated normal distribution is the probability distribution derived from that of a normally distributed random variable by bounding the random variable from either below or above (or both). The truncated no ...
. * (''X'' − ''μ'')−2 has a
Lévy distribution In probability theory and statistics, the Lévy distribution, named after Paul Lévy, is a continuous probability distribution for a non-negative random variable. In spectroscopy, this distribution, with frequency as the dependent variable, is kn ...
with location 0 and scale ''σ''−2.


= Operations on two independent normal variables

= * If X_1 and X_2 are two
independent Independent or Independents may refer to: Arts, entertainment, and media Artist groups * Independents (artist group), a group of modernist painters based in the New Hope, Pennsylvania, area of the United States during the early 1930s * Independ ...
normal random variables, with means \mu_1, \mu_2 and standard deviations \sigma_1, \sigma_2, then their sum X_1 + X_2 will also be normally distributed, roof/sup> with mean \mu_1 + \mu_2 and variance \sigma_1^2 + \sigma_2^2. * In particular, if X and Y are independent normal deviates with zero mean and variance \sigma^2, then X + Y and X - Y are also independent and normally distributed, with zero mean and variance 2\sigma^2. This is a special case of the
polarization identity In linear algebra, a branch of mathematics, the polarization identity is any one of a family of formulas that express the inner product of two vectors in terms of the norm of a normed vector space. If a norm arises from an inner product then t ...
. * If X_1, X_2 are two independent normal deviates with mean \mu and deviation \sigma, and a, b are arbitrary real numbers, then the variable X_3 = \frac + \mu is also normally distributed with mean \mu and deviation \sigma. It follows that the normal distribution is
stable A stable is a building in which livestock, especially horses, are kept. It most commonly means a building that is divided into separate stalls for individual animals and livestock. There are many different types of stables in use today; the ...
(with exponent \alpha=2).


= Operations on two independent standard normal variables

= If X_1 and X_2 are two independent standard normal random variables with mean 0 and variance 1, then * Their sum and difference is distributed normally with mean zero and variance two: X_1 \pm X_2 \sim N(0, 2). * Their product Z = X_1 X_2 follows the
product distribution A product distribution is a probability distribution constructed as the distribution of the product of random variables having two other known distributions. Given two statistically independent random variables ''X'' and ''Y'', the distribution of ...
with density function f_Z(z) = \pi^ K_0(, z, ) where K_0 is the
modified Bessel function of the second kind Bessel functions, first defined by the mathematician Daniel Bernoulli and then generalized by Friedrich Bessel, are canonical solutions of Bessel's differential equation x^2 \frac + x \frac + \left(x^2 - \alpha^2 \right)y = 0 for an arbitrary ...
. This distribution is symmetric around zero, unbounded at z = 0, and has the
characteristic function In mathematics, the term "characteristic function" can refer to any of several distinct concepts: * The indicator function of a subset, that is the function ::\mathbf_A\colon X \to \, :which for a given subset ''A'' of ''X'', has value 1 at points ...
\phi_Z(t) = (1 + t^2)^. * Their ratio follows the standard
Cauchy distribution The Cauchy distribution, named after Augustin Cauchy, is a continuous probability distribution. It is also known, especially among physicists, as the Lorentz distribution (after Hendrik Lorentz), Cauchy–Lorentz distribution, Lorentz(ian) fun ...
: X_1/ X_2 \sim \operatorname(0, 1). * Their Euclidean norm \sqrt has the
Rayleigh distribution In probability theory and statistics, the Rayleigh distribution is a continuous probability distribution for nonnegative-valued random variables. Up to rescaling, it coincides with the chi distribution with two degrees of freedom. The distribut ...
.


Operations on multiple independent normal variables

* Any linear combination of independent normal deviates is a normal deviate. * If X_1, X_2, \ldots, X_n are independent standard normal random variables, then the sum of their squares has the
chi-squared distribution In probability theory and statistics, the chi-squared distribution (also chi-square or \chi^2-distribution) with k degrees of freedom is the distribution of a sum of the squares of k independent standard normal random variables. The chi-squa ...
with n degrees of freedom X_1^2 + \cdots + X_n^2 \sim \chi_n^2. * If X_1, X_2, \ldots, X_n are independent normally distributed random variables with means \mu and variances \sigma^2, then their
sample mean The sample mean (or "empirical mean") and the sample covariance are statistics computed from a Sample (statistics), sample of data on one or more random variables. The sample mean is the average value (or mean, mean value) of a sample (statistic ...
is independent from the sample
standard deviation In statistics, the standard deviation is a measure of the amount of variation or dispersion of a set of values. A low standard deviation indicates that the values tend to be close to the mean (also called the expected value) of the set, while ...
, which can be demonstrated using Basu's theorem or
Cochran's theorem In statistics, Cochran's theorem, devised by William G. Cochran, is a theorem used to justify results relating to the probability distributions of statistics that are used in the analysis of variance. Statement Let ''U''1, ..., ''U'N'' be i.i. ...
. The ratio of these two quantities will have the
Student's t-distribution In probability and statistics, Student's ''t''-distribution (or simply the ''t''-distribution) is any member of a family of continuous probability distributions that arise when estimating the mean of a normally distributed population in sit ...
with n-1 degrees of freedom: t = \frac = \frac \sim t_. * If X_1, X_2, \ldots, X_n, Y_1, Y_2, \ldots, Y_m are independent standard normal random variables, then the ratio of their normalized sums of squares will have the with degrees of freedom: F = \frac \sim F_.


Operations on multiple correlated normal variables

* A
quadratic form In mathematics, a quadratic form is a polynomial with terms all of degree two ("form" is another name for a homogeneous polynomial). For example, :4x^2 + 2xy - 3y^2 is a quadratic form in the variables and . The coefficients usually belong to a ...
of a normal vector, i.e. a quadratic function q = \sum x_i^2 + \sum x_j + c of multiple independent or correlated normal variables, is a generalized chi-square variable.


Operations on the density function

The split normal distribution is most directly defined in terms of joining scaled sections of the density functions of different normal distributions and rescaling the density to integrate to one. The
truncated normal distribution In probability and statistics, the truncated normal distribution is the probability distribution derived from that of a normally distributed random variable by bounding the random variable from either below or above (or both). The truncated no ...
results from rescaling a section of a single density function.


Infinite divisibility and Cramér's theorem

For any positive integer \text, any normal distribution with mean \mu and variance \sigma^2 is the distribution of the sum of \text independent normal deviates, each with mean \frac and variance \frac. This property is called
infinite divisibility Infinite divisibility arises in different ways in philosophy, physics, economics, order theory (a branch of mathematics), and probability theory (also a branch of mathematics). One may speak of infinite divisibility, or the lack thereof, of matter ...
. Conversely, if X_1 and X_2 are independent random variables and their sum X_1+X_2 has a normal distribution, then both X_1 and X_2 must be normal deviates. This result is known as Cramér's decomposition theorem, and is equivalent to saying that the convolution of two distributions is normal if and only if both are normal. Cramér's theorem implies that a linear combination of independent non-Gaussian variables will never have an exactly normal distribution, although it may approach it arbitrarily closely.


Bernstein's theorem

Bernstein's theorem states that if X and Y are independent and X + Y and X - Y are also independent, then both ''X'' and ''Y'' must necessarily have normal distributions. More generally, if X_1, \ldots, X_n are independent random variables, then two distinct linear combinations \sum and \sumwill be independent if and only if all X_k are normal and \sum, where \sigma_k^2 denotes the variance of X_k.


Extensions

The notion of normal distribution, being one of the most important distributions in probability theory, has been extended far beyond the standard framework of the univariate (that is one-dimensional) case (Case 1). All these extensions are also called ''normal'' or ''Gaussian'' laws, so a certain ambiguity in names exists. * The
multivariate normal distribution In probability theory and statistics, the multivariate normal distribution, multivariate Gaussian distribution, or joint normal distribution is a generalization of the one-dimensional (univariate) normal distribution to higher dimensions. One d ...
describes the Gaussian law in the ''k''-dimensional Euclidean space. A vector is multivariate-normally distributed if any linear combination of its components has a (univariate) normal distribution. The variance of ''X'' is a ''k×k'' symmetric positive-definite matrix ''V''. The multivariate normal distribution is a special case of the
elliptical distribution In probability and statistics, an elliptical distribution is any member of a broad family of probability distributions that generalize the multivariate normal distribution. Intuitively, in the simplified two and three dimensional case, the joint di ...
s. As such, its iso-density loci in the ''k'' = 2 case are ellipses and in the case of arbitrary ''k'' are ellipsoids. * Rectified Gaussian distribution a rectified version of normal distribution with all the negative elements reset to 0 * Complex normal distribution deals with the complex normal vectors. A complex vector is said to be normal if both its real and imaginary components jointly possess a 2''k''-dimensional multivariate normal distribution. The variance-covariance structure of ''X'' is described by two matrices: the ''variance'' matrix Γ, and the ''relation'' matrix ''C''. * Matrix normal distribution describes the case of normally distributed matrices. * Gaussian processes are the normally distributed stochastic processes. These can be viewed as elements of some infinite-dimensional Hilbert space ''H'', and thus are the analogues of multivariate normal vectors for the case . A random element is said to be normal if for any constant the scalar product has a (univariate) normal distribution. The variance structure of such Gaussian random element can be described in terms of the linear ''covariance ''. Several Gaussian processes became popular enough to have their own names: ** Wiener process, Brownian motion, ** Brownian bridge, ** Ornstein–Uhlenbeck process. * Gaussian q-distribution is an abstract mathematical construction that represents a "q-analogue" of the normal distribution. * the q-Gaussian is an analogue of the Gaussian distribution, in the sense that it maximises the Tsallis entropy, and is one type of Tsallis distribution. Note that this distribution is different from the Gaussian q-distribution above. * The Kaniadakis Gaussian distribution, Kaniadakis ''κ''-Gaussian distribution is a generalization of the Gaussian distribution which arises from the Kaniadakis statistics, being one of the Kaniadakis distribution, Kaniadakis distributions. A random variable ''X'' has a two-piece normal distribution if it has a distribution : f_X( x ) = N( \mu, \sigma_1^2 ) \text x \le \mu : f_X( x ) = N( \mu, \sigma_2^2 ) \text x \ge \mu where ''μ'' is the mean and ''σ''1 and ''σ''2 are the standard deviations of the distribution to the left and right of the mean respectively. The mean, variance and third central moment of this distribution have been determined : \operatorname( X ) = \mu + \sqrt ( \sigma_2 - \sigma_1 ) : \operatorname( X ) = \left( 1 - \frac 2 \pi\right)( \sigma_2 - \sigma_1 )^2 + \sigma_1 \sigma_2 : \operatorname( X ) = \sqrt( \sigma_2 - \sigma_1 ) \left[ \left( \frac 4 \pi - 1 \right) ( \sigma_2 - \sigma_1)^2 + \sigma_1 \sigma_2 \right] where E(''X''), V(''X'') and T(''X'') are the mean, variance, and third central moment respectively. One of the main practical uses of the Gaussian law is to model the empirical distributions of many different random variables encountered in practice. In such case a possible extension would be a richer family of distributions, having more than two parameters and therefore being able to fit the empirical distribution more accurately. The examples of such extensions are: * Pearson distribution — a four-parameter family of probability distributions that extend the normal law to include different skewness and kurtosis values. * The generalized normal distribution, also known as the exponential power distribution, allows for distribution tails with thicker or thinner asymptotic behaviors.


Statistical inference


Estimation of parameters

It is often the case that we do not know the parameters of the normal distribution, but instead want to Estimation theory, estimate them. That is, having a sample (x_1, \ldots, x_n) from a normal N(\mu, \sigma^2) population we would like to learn the approximate values of parameters \mu and \sigma^2. The standard approach to this problem is the maximum likelihood method, which requires maximization of the ''log-likelihood function'': : \ln\mathcal(\mu,\sigma^2) = \sum_^n \ln f(x_i\mid\mu,\sigma^2) = -\frac\ln(2\pi) - \frac\ln\sigma^2 - \frac\sum_^n (x_i-\mu)^2. Taking derivatives with respect to \mu and \sigma^2 and solving the resulting system of first order conditions yields the ''maximum likelihood estimates'': : \hat = \overline \equiv \frac\sum_^n x_i, \qquad \hat^2 = \frac \sum_^n (x_i - \overline)^2.


Sample mean

Estimator \textstyle\hat\mu is called the ''
sample mean The sample mean (or "empirical mean") and the sample covariance are statistics computed from a Sample (statistics), sample of data on one or more random variables. The sample mean is the average value (or mean, mean value) of a sample (statistic ...
'', since it is the arithmetic mean of all observations. The statistic \textstyle\overline is complete statistic, complete and sufficient statistic, sufficient for \mu, and therefore by the Lehmann–Scheffé theorem, \textstyle\hat\mu is the uniformly minimum variance unbiased (UMVU) estimator. In finite samples it is distributed normally: : \hat\mu \sim \mathcal(\mu,\sigma^2/n). The variance of this estimator is equal to the ''μμ''-element of the inverse Fisher information matrix \textstyle\mathcal^. This implies that the estimator is efficient estimator, finite-sample efficient. Of practical importance is the fact that the standard error (statistics), standard error of \textstyle\hat\mu is proportional to \textstyle1/\sqrt, that is, if one wishes to decrease the standard error by a factor of 10, one must increase the number of points in the sample by a factor of 100. This fact is widely used in determining sample sizes for opinion polls and the number of trials in Monte Carlo simulations. From the standpoint of the asymptotic theory (statistics), asymptotic theory, \textstyle\hat\mu is consistent estimator, consistent, that is, it convergence in probability, converges in probability to \mu as n\rightarrow\infty. The estimator is also asymptotic normality, asymptotically normal, which is a simple corollary of the fact that it is normal in finite samples: : \sqrt(\hat\mu-\mu) \,\xrightarrow\, \mathcal(0,\sigma^2).


Sample variance

The estimator \textstyle\hat\sigma^2 is called the ''sample variance'', since it is the variance of the sample ((x_1, \ldots, x_n)). In practice, another estimator is often used instead of the \textstyle\hat\sigma^2. This other estimator is denoted s^2, and is also called the ''sample variance'', which represents a certain ambiguity in terminology; its square root s is called the ''sample standard deviation''. The estimator s^2 differs from \textstyle\hat\sigma^2 by having instead of ''n'' in the denominator (the so-called Bessel's correction): : s^2 = \frac \hat\sigma^2 = \frac \sum_^n (x_i - \overline)^2. The difference between s^2 and \textstyle\hat\sigma^2 becomes negligibly small for large ''n''s. In finite samples however, the motivation behind the use of s^2 is that it is an unbiased estimator of the underlying parameter \sigma^2, whereas \textstyle\hat\sigma^2 is biased. Also, by the Lehmann–Scheffé theorem the estimator s^2 is uniformly minimum variance unbiased (Minimum-variance unbiased estimator, UMVU), which makes it the "best" estimator among all unbiased ones. However it can be shown that the biased estimator \textstyle\hat\sigma^2 is "better" than the s^2 in terms of the mean squared error (MSE) criterion. In finite samples both s^2 and \textstyle\hat\sigma^2 have scaled
chi-squared distribution In probability theory and statistics, the chi-squared distribution (also chi-square or \chi^2-distribution) with k degrees of freedom is the distribution of a sum of the squares of k independent standard normal random variables. The chi-squa ...
with degrees of freedom: : s^2 \sim \frac \cdot \chi^2_, \qquad \hat\sigma^2 \sim \frac \cdot \chi^2_. The first of these expressions shows that the variance of s^2 is equal to 2\sigma^4/(n-1), which is slightly greater than the ''σσ''-element of the inverse Fisher information matrix \textstyle\mathcal^. Thus, s^2 is not an efficient estimator for \sigma^2, and moreover, since s^2 is UMVU, we can conclude that the finite-sample efficient estimator for \sigma^2 does not exist. Applying the asymptotic theory, both estimators s^2 and \textstyle\hat\sigma^2 are consistent, that is they converge in probability to \sigma^2 as the sample size n\rightarrow\infty. The two estimators are also both asymptotically normal: : \sqrt(\hat\sigma^2 - \sigma^2) \simeq \sqrt(s^2-\sigma^2) \,\xrightarrow\, \mathcal(0,2\sigma^4). In particular, both estimators are asymptotically efficient for \sigma^2.


Confidence intervals

By
Cochran's theorem In statistics, Cochran's theorem, devised by William G. Cochran, is a theorem used to justify results relating to the probability distributions of statistics that are used in the analysis of variance. Statement Let ''U''1, ..., ''U'N'' be i.i. ...
, for normal distributions the sample mean \textstyle\hat\mu and the sample variance ''s''2 are
independent Independent or Independents may refer to: Arts, entertainment, and media Artist groups * Independents (artist group), a group of modernist painters based in the New Hope, Pennsylvania, area of the United States during the early 1930s * Independ ...
, which means there can be no gain in considering their joint distribution. There is also a converse theorem: if in a sample the sample mean and sample variance are independent, then the sample must have come from the normal distribution. The independence between \textstyle\hat\mu and ''s'' can be employed to construct the so-called ''t-statistic'': : t = \frac = \frac \sim t_ This quantity ''t'' has the
Student's t-distribution In probability and statistics, Student's ''t''-distribution (or simply the ''t''-distribution) is any member of a family of continuous probability distributions that arise when estimating the mean of a normally distributed population in sit ...
with degrees of freedom, and it is an ancillary statistic (independent of the value of the parameters). Inverting the distribution of this ''t''-statistics will allow us to construct the
confidence interval In frequentist statistics, a confidence interval (CI) is a range of estimates for an unknown parameter. A confidence interval is computed at a designated ''confidence level''; the 95% confidence level is most common, but other levels, such as 9 ...
for ''μ''; similarly, inverting the ''χ''2 distribution of the statistic ''s''2 will give us the confidence interval for ''σ''2: :\mu \in \left[ \hat\mu - t_ \fracs, \hat\mu + t_ \fracs \right], :\sigma^2 \in \left[ \frac, \frac \right], where ''tk,p'' and are the ''p''th
quantile In statistics and probability, quantiles are cut points dividing the range of a probability distribution into continuous intervals with equal probabilities, or dividing the observations in a sample in the same way. There is one fewer quantile tha ...
s of the ''t''- and ''χ''2-distributions respectively. These confidence intervals are of the ''confidence level'' , meaning that the true values ''μ'' and ''σ''2 fall outside of these intervals with probability (or significance level) ''α''. In practice people usually take , resulting in the 95% confidence intervals. Approximate formulas can be derived from the asymptotic distributions of \textstyle\hat\mu and ''s''2: :\mu \in \left[ \hat\mu - , z_, \fracs, \hat\mu + , z_, \fracs \right], :\sigma^2 \in \left[ s^2 - , z_, \fracs^2, s^2 + , z_, \fracs^2 \right], The approximate formulas become valid for large values of ''n'', and are more convenient for the manual calculation since the standard normal quantiles ''z''''α''/2 do not depend on ''n''. In particular, the most popular value of , results in .


Normality tests

Normality tests assess the likelihood that the given data set comes from a normal distribution. Typically the null hypothesis ''H''0 is that the observations are distributed normally with unspecified mean ''μ'' and variance ''σ''2, versus the alternative ''Ha'' that the distribution is arbitrary. Many tests (over 40) have been devised for this problem. The more prominent of them are outlined below: Diagnostic plots are more intuitively appealing but subjective at the same time, as they rely on informal human judgement to accept or reject the null hypothesis. *
Q–Q plot In statistics, a Q–Q plot (quantile-quantile plot) is a probability plot, a List of graphical methods, graphical method for comparing two probability distributions by plotting their ''quantiles'' against each other. A point on the plot co ...
, also known as normal probability plot or rankit plot—is a plot of the sorted values from the data set against the expected values of the corresponding quantiles from the standard normal distribution. That is, it's a plot of point of the form (Φ−1(''pk''), ''x''(''k'')), where plotting points ''pk'' are equal to ''pk'' = (''k'' − ''α'')/(''n'' + 1 − 2''α'') and ''α'' is an adjustment constant, which can be anything between 0 and 1. If the null hypothesis is true, the plotted points should approximately lie on a straight line. * P–P plot – similar to the Q–Q plot, but used much less frequently. This method consists of plotting the points (Φ(''z''(''k'')), ''pk''), where \textstyle z_ = (x_-\hat\mu)/\hat\sigma. For normally distributed data this plot should lie on a 45° line between (0, 0) and (1, 1). Goodness-of-fit tests: ''Moment-based tests'': * D'Agostino's K-squared test * Jarque–Bera test * Shapiro–Wilk test: This is based on the fact that the line in the Q–Q plot has the slope of ''σ''. The test compares the least squares estimate of that slope with the value of the sample variance, and rejects the null hypothesis if these two quantities differ significantly. ''Tests based on the empirical distribution function'': * Anderson–Darling test * Lilliefors test (an adaptation of the Kolmogorov–Smirnov test)


Bayesian analysis of the normal distribution

Bayesian analysis of normally distributed data is complicated by the many different possibilities that may be considered: * Either the mean, or the variance, or neither, may be considered a fixed quantity. * When the variance is unknown, analysis may be done directly in terms of the variance, or in terms of the
precision Precision, precise or precisely may refer to: Science, and technology, and mathematics Mathematics and computing (general) * Accuracy and precision, measurement deviation from true value and its scatter * Significant figures, the number of digit ...
, the reciprocal of the variance. The reason for expressing the formulas in terms of precision is that the analysis of most cases is simplified. * Both univariate and multivariate normal distribution, multivariate cases need to be considered. * Either conjugate prior, conjugate or improper prior, improper prior distributions may be placed on the unknown variables. * An additional set of cases occurs in Bayesian linear regression, where in the basic model the data is assumed to be normally distributed, and normal priors are placed on the regression coefficients. The resulting analysis is similar to the basic cases of independent identically distributed data. The formulas for the non-linear-regression cases are summarized in the conjugate prior article.


Sum of two quadratics


= Scalar form

= The following auxiliary formula is useful for simplifying the posterior distribution, posterior update equations, which otherwise become fairly tedious. :a(x-y)^2 + b(x-z)^2 = (a + b)\left(x - \frac\right)^2 + \frac(y-z)^2 This equation rewrites the sum of two quadratics in ''x'' by expanding the squares, grouping the terms in ''x'', and completing the square. Note the following about the complex constant factors attached to some of the terms: # The factor \frac has the form of a weighted average of ''y'' and ''z''. # \frac = \frac = (a^ + b^)^. This shows that this factor can be thought of as resulting from a situation where the Multiplicative inverse, reciprocals of quantities ''a'' and ''b'' add directly, so to combine ''a'' and ''b'' themselves, it's necessary to reciprocate, add, and reciprocate the result again to get back into the original units. This is exactly the sort of operation performed by the harmonic mean, so it is not surprising that \frac is one-half the harmonic mean of ''a'' and ''b''.


= Vector form

= A similar formula can be written for the sum of two vector quadratics: If x, y, z are vectors of length ''k'', and A and B are symmetric matrix, symmetric, invertible matrices of size k\times k, then : \begin & (\mathbf-\mathbf)'\mathbf(\mathbf-\mathbf) + (\mathbf-\mathbf)' \mathbf(\mathbf-\mathbf) \\ = & (\mathbf - \mathbf)'(\mathbf+\mathbf)(\mathbf - \mathbf) + (\mathbf - \mathbf)'(\mathbf^ + \mathbf^)^(\mathbf - \mathbf) \end where :\mathbf = (\mathbf + \mathbf)^(\mathbf\mathbf + \mathbf \mathbf) Note that the form x′ A x is called a
quadratic form In mathematics, a quadratic form is a polynomial with terms all of degree two ("form" is another name for a homogeneous polynomial). For example, :4x^2 + 2xy - 3y^2 is a quadratic form in the variables and . The coefficients usually belong to a ...
and is a scalar (mathematics), scalar: :\mathbf'\mathbf\mathbf = \sum_a_ x_i x_j In other words, it sums up all possible combinations of products of pairs of elements from x, with a separate coefficient for each. In addition, since x_i x_j = x_j x_i, only the sum a_ + a_ matters for any off-diagonal elements of A, and there is no loss of generality in assuming that A is symmetric matrix, symmetric. Furthermore, if A is symmetric, then the form \mathbf'\mathbf\mathbf = \mathbf'\mathbf\mathbf.


Sum of differences from the mean

Another useful formula is as follows: \sum_^n (x_i-\mu)^2 = \sum_^n (x_i-\bar)^2 + n(\bar -\mu)^2 where \bar = \frac \sum_^n x_i.


With known variance

For a set of i.i.d. normally distributed data points X of size ''n'' where each individual point ''x'' follows x \sim \mathcal(\mu, \sigma^2) with known
variance In probability theory and statistics, variance is the expectation of the squared deviation of a random variable from its population mean or sample mean. Variance is a measure of dispersion, meaning it is a measure of how far a set of numbers ...
σ2, the conjugate prior distribution is also normally distributed. This can be shown more easily by rewriting the variance as the
precision Precision, precise or precisely may refer to: Science, and technology, and mathematics Mathematics and computing (general) * Accuracy and precision, measurement deviation from true value and its scatter * Significant figures, the number of digit ...
, i.e. using τ = 1/σ2. Then if x \sim \mathcal(\mu, 1/\tau) and \mu \sim \mathcal(\mu_0, 1/\tau_0), we proceed as follows. First, the likelihood function is (using the formula above for the sum of differences from the mean): :\begin p(\mathbf\mid\mu,\tau) &= \prod_^n \sqrt \exp\left(-\frac\tau(x_i-\mu)^2\right) \\ &= \left(\frac\right)^ \exp\left(-\frac\tau \sum_^n (x_i-\mu)^2\right) \\ &= \left(\frac\right)^ \exp\left[-\frac\tau \left(\sum_^n(x_i-\bar)^2 + n(\bar -\mu)^2\right)\right]. \end Then, we proceed as follows: :\begin p(\mu\mid\mathbf) &\propto p(\mathbf\mid\mu) p(\mu) \\ & = \left(\frac\right)^ \exp\left[-\frac\tau \left(\sum_^n(x_i-\bar)^2 + n(\bar -\mu)^2\right)\right] \sqrt \exp\left(-\frac\tau_0(\mu-\mu_0)^2\right) \\ &\propto \exp\left(-\frac\left(\tau\left(\sum_^n(x_i-\bar)^2 + n(\bar -\mu)^2\right) + \tau_0(\mu-\mu_0)^2\right)\right) \\ &\propto \exp\left(-\frac \left(n\tau(\bar-\mu)^2 + \tau_0(\mu-\mu_0)^2 \right)\right) \\ &= \exp\left(-\frac(n\tau + \tau_0)\left(\mu - \dfrac\right)^2 + \frac(\bar - \mu_0)^2\right) \\ &\propto \exp\left(-\frac(n\tau + \tau_0)\left(\mu - \dfrac\right)^2\right) \end In the above derivation, we used the formula above for the sum of two quadratics and eliminated all constant factors not involving ''μ''. The result is the kernel (statistics), kernel of a normal distribution, with mean \frac and precision n\tau + \tau_0, i.e. :p(\mu\mid\mathbf) \sim \mathcal\left(\frac, \frac\right) This can be written as a set of Bayesian update equations for the posterior parameters in terms of the prior parameters: :\begin \tau_0' &= \tau_0 + n\tau \\[5pt] \mu_0' &= \frac \\[5pt] \bar &= \frac\sum_^n x_i \end That is, to combine ''n'' data points with total precision of ''nτ'' (or equivalently, total variance of ''n''/''σ''2) and mean of values \bar, derive a new total precision simply by adding the total precision of the data to the prior total precision, and form a new mean through a ''precision-weighted average'', i.e. a weighted average of the data mean and the prior mean, each weighted by the associated total precision. This makes logical sense if the precision is thought of as indicating the certainty of the observations: In the distribution of the posterior mean, each of the input components is weighted by its certainty, and the certainty of this distribution is the sum of the individual certainties. (For the intuition of this, compare the expression "the whole is (or is not) greater than the sum of its parts". In addition, consider that the knowledge of the posterior comes from a combination of the knowledge of the prior and likelihood, so it makes sense that we are more certain of it than of either of its components.) The above formula reveals why it is more convenient to do Bayesian analysis of conjugate priors for the normal distribution in terms of the precision. The posterior precision is simply the sum of the prior and likelihood precisions, and the posterior mean is computed through a precision-weighted average, as described above. The same formulas can be written in terms of variance by reciprocating all the precisions, yielding the more ugly formulas :\begin ' &= \frac \\[5pt] \mu_0' &= \frac \\[5pt] \bar &= \frac\sum_^n x_i \end


With known mean

For a set of i.i.d. normally distributed data points X of size ''n'' where each individual point ''x'' follows x \sim \mathcal(\mu, \sigma^2) with known mean μ, the conjugate prior of the
variance In probability theory and statistics, variance is the expectation of the squared deviation of a random variable from its population mean or sample mean. Variance is a measure of dispersion, meaning it is a measure of how far a set of numbers ...
has an inverse gamma distribution or a scaled inverse chi-squared distribution. The two are equivalent 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. The prior for σ2 is as follows: :p(\sigma^2\mid\nu_0,\sigma_0^2) = \frac~\frac \propto \frac The likelihood function from above, written in terms of the variance, is: :\begin p(\mathbf\mid\mu,\sigma^2) &= \left(\frac\right)^ \exp\left[-\frac \sum_^n (x_i-\mu)^2\right] \\ &= \left(\frac\right)^ \exp\left[-\frac\right] \end where :S = \sum_^n (x_i-\mu)^2. Then: :\begin p(\sigma^2\mid\mathbf) &\propto p(\mathbf\mid\sigma^2) p(\sigma^2) \\ &= \left(\frac\right)^ \exp\left[-\frac\right] \frac~\frac \\ &\propto \left(\frac\right)^ \frac \exp\left[-\frac + \frac\right] \\ &= \frac \exp\left[-\frac\right] \end The above is also a scaled inverse chi-squared distribution where :\begin \nu_0' &= \nu_0 + n \\ \nu_0'' &= \nu_0 \sigma_0^2 + \sum_^n (x_i-\mu)^2 \end or equivalently :\begin \nu_0' &= \nu_0 + n \\ ' &= \frac \end Reparameterizing in terms of an inverse gamma distribution, the result is: :\begin \alpha' &= \alpha + \frac \\ \beta' &= \beta + \frac \end


With unknown mean and unknown variance

For a set of i.i.d. normally distributed data points X of size ''n'' where each individual point ''x'' follows x \sim \mathcal(\mu, \sigma^2) with unknown mean μ and unknown
variance In probability theory and statistics, variance is the expectation of the squared deviation of a random variable from its population mean or sample mean. Variance is a measure of dispersion, meaning it is a measure of how far a set of numbers ...
σ2, a combined (multivariate) conjugate prior is placed over the mean and variance, consisting of a normal-inverse-gamma distribution. Logically, this originates as follows: # From the analysis of the case with unknown mean but known variance, we see that the update equations involve sufficient statistics computed from the data consisting of the mean of the data points and the total variance of the data points, computed in turn from the known variance divided by the number of data points. # From the analysis of the case with unknown variance but known mean, we see that the update equations involve sufficient statistics over the data consisting of the number of data points and sum of squared deviations. # Keep in mind that the posterior update values serve as the prior distribution when further data is handled. Thus, we should logically think of our priors in terms of the sufficient statistics just described, with the same semantics kept in mind as much as possible. # To handle the case where both mean and variance are unknown, we could place independent priors over the mean and variance, with fixed estimates of the average mean, total variance, number of data points used to compute the variance prior, and sum of squared deviations. Note however that in reality, the total variance of the mean depends on the unknown variance, and the sum of squared deviations that goes into the variance prior (appears to) depend on the unknown mean. In practice, the latter dependence is relatively unimportant: Shifting the actual mean shifts the generated points by an equal amount, and on average the squared deviations will remain the same. This is not the case, however, with the total variance of the mean: As the unknown variance increases, the total variance of the mean will increase proportionately, and we would like to capture this dependence. # This suggests that we create a ''conditional prior'' of the mean on the unknown variance, with a hyperparameter specifying the mean of the pseudo-observations associated with the prior, and another parameter specifying the number of pseudo-observations. This number serves as a scaling parameter on the variance, making it possible to control the overall variance of the mean relative to the actual variance parameter. The prior for the variance also has two hyperparameters, one specifying the sum of squared deviations of the pseudo-observations associated with the prior, and another specifying once again the number of pseudo-observations. Note that each of the priors has a hyperparameter specifying the number of pseudo-observations, and in each case this controls the relative variance of that prior. These are given as two separate hyperparameters so that the variance (aka the confidence) of the two priors can be controlled separately. # This leads immediately to the normal-inverse-gamma distribution, which is the product of the two distributions just defined, with conjugate priors used (an inverse gamma distribution over the variance, and a normal distribution over the mean, ''conditional'' on the variance) and with the same four parameters just defined. The priors are normally defined as follows: :\begin p(\mu\mid\sigma^2; \mu_0, n_0) &\sim \mathcal(\mu_0,\sigma^2/n_0) \\ p(\sigma^2; \nu_0,\sigma_0^2) &\sim I\chi^2(\nu_0,\sigma_0^2) = IG(\nu_0/2, \nu_0\sigma_0^2/2) \end The update equations can be derived, and look as follows: :\begin \bar &= \frac 1 n \sum_^n x_i \\ \mu_0' &= \frac \\ n_0' &= n_0 + n \\ \nu_0' &= \nu_0 + n \\ \nu_0'' &= \nu_0 \sigma_0^2 + \sum_^n (x_i-\bar)^2 + \frac(\mu_0 - \bar)^2 \end The respective numbers of pseudo-observations add the number of actual observations to them. The new mean hyperparameter is once again a weighted average, this time weighted by the relative numbers of observations. Finally, the update for \nu_0'' is similar to the case with known mean, but in this case the sum of squared deviations is taken with respect to the observed data mean rather than the true mean, and as a result a new "interaction term" needs to be added to take care of the additional error source stemming from the deviation between prior and data mean.


Occurrence and applications

The occurrence of normal distribution in practical problems can be loosely classified into four categories: # Exactly normal distributions; # Approximately normal laws, for example when such approximation is justified by the
central limit theorem In probability theory, the central limit theorem (CLT) establishes that, in many situations, when independent random variables are summed up, their properly normalized sum tends toward a normal distribution even if the original variables themselv ...
; and # Distributions modeled as normal – the normal distribution being the distribution with Principle of maximum entropy, maximum entropy for a given mean and variance. # Regression problems – the normal distribution being found after systematic effects have been modeled sufficiently well.


Exact normality

Certain quantities in physics are distributed normally, as was first demonstrated by James Clerk Maxwell. Examples of such quantities are: * Probability density function of a ground state in a quantum harmonic oscillator. * The position of a particle that experiences diffusion. If initially the particle is located at a specific point (that is its probability distribution is the Dirac delta function), then after time ''t'' its location is described by a normal distribution with variance ''t'', which satisfies the diffusion equation \frac f(x,t) = \frac \frac f(x,t). If the initial location is given by a certain density function g(x), then the density at time ''t'' is the convolution of ''g'' and the normal PDF.


Approximate normality

''Approximately'' normal distributions occur in many situations, as explained by the
central limit theorem In probability theory, the central limit theorem (CLT) establishes that, in many situations, when independent random variables are summed up, their properly normalized sum tends toward a normal distribution even if the original variables themselv ...
. When the outcome is produced by many small effects acting ''additively and independently'', its distribution will be close to normal. The normal approximation will not be valid if the effects act multiplicatively (instead of additively), or if there is a single external influence that has a considerably larger magnitude than the rest of the effects. * In counting problems, where the central limit theorem includes a discrete-to-continuum approximation and where Infinite divisibility, infinitely divisible and Indecomposable distribution, decomposable distributions are involved, such as ** binomial distribution, Binomial random variables, associated with binary response variables; ** Poisson distribution, Poisson random variables, associated with rare events; * Thermal radiation has a Bose–Einstein statistics, Bose–Einstein distribution on very short time scales, and a normal distribution on longer timescales due to the central limit theorem.


Assumed normality

There are statistical methods to empirically test that assumption; see the above #Normality tests, Normality tests section. * In biology, the ''logarithm'' of various variables tend to have a normal distribution, that is, they tend to have a
log-normal distribution In probability theory, a log-normal (or lognormal) distribution is a continuous probability distribution of a random variable whose logarithm is normally distributed. Thus, if the random variable is log-normally distributed, then has a normal ...
(after separation on male/female subpopulations), with examples including: ** Measures of size of living tissue (length, height, skin area, weight); ** The ''length'' of ''inert'' appendages (hair, claws, nails, teeth) of biological specimens, ''in the direction of growth''; presumably the thickness of tree bark also falls under this category; ** Certain physiological measurements, such as blood pressure of adult humans. * In finance, in particular the Black–Scholes model, changes in the ''logarithm'' of exchange rates, price indices, and stock market indices are assumed normal (these variables behave like compound interest, not like simple interest, and so are multiplicative). Some mathematicians such as Benoit Mandelbrot have argued that Levy skew alpha-stable distribution, log-Levy distributions, which possesses heavy tails would be a more appropriate model, in particular for the analysis for stock market crashes. The use of the assumption of normal distribution occurring in financial models has also been criticized by Nassim Nicholas Taleb in his works. * Propagation of uncertainty, Measurement errors in physical experiments are often modeled by a normal distribution. This use of a normal distribution does not imply that one is assuming the measurement errors are normally distributed, rather using the normal distribution produces the most conservative predictions possible given only knowledge about the mean and variance of the errors. * In Standardized testing (statistics), standardized testing, results can be made to have a normal distribution by either selecting the number and difficulty of questions (as in the Intelligence quotient, IQ test) or transforming the raw test scores into "output" scores by fitting them to the normal distribution. For example, the SAT's traditional range of 200–800 is based on a normal distribution with a mean of 500 and a standard deviation of 100. * Many scores are derived from the normal distribution, including percentile ranks ("percentiles" or "quantiles"), normal curve equivalents, stanines, Standard score, z-scores, and T-scores. Additionally, some behavioral statistical procedures assume that scores are normally distributed; for example, Student's t-test, t-tests and Analysis of variance, ANOVAs. Bell curve grading assigns relative grades based on a normal distribution of scores. * In hydrology the distribution of long duration river discharge or rainfall, e.g. monthly and yearly totals, is often thought to be practically normal according to the
central limit theorem In probability theory, the central limit theorem (CLT) establishes that, in many situations, when independent random variables are summed up, their properly normalized sum tends toward a normal distribution even if the original variables themselv ...
. The blue picture, made with CumFreq, illustrates an example of fitting the normal distribution to ranked October rainfalls showing the 90% confidence belt based on the
binomial distribution In probability theory and statistics, the binomial distribution with parameters ''n'' and ''p'' is the discrete probability distribution of the number of successes in a sequence of ''n'' independent experiments, each asking a yes–no quest ...
. The rainfall data are represented by plotting positions as part of the cumulative frequency analysis.


Methodological problems and peer review

John Ioannidis argues that using normally distributed standard deviations as standards for validating research findings leave falsifiability, falsifiable predictions about phenomena that are not normally distributed untested. This includes, for example, phenomena that only appear when all necessary conditions are present and one cannot be a substitute for another in an addition-like way and phenomena that are not randomly distributed. Ioannidis argues that standard deviation-centered validation gives a false appearance of validity to hypotheses and theories where some but not all falsifiable predictions are normally distributed since the portion of falsifiable predictions that there is evidence against may and in some cases are in the non-normally distributed parts of the range of falsifiable predictions, as well as baselessly dismissing hypotheses for which none of the falsifiable predictions are normally distributed as if were they unfalsifiable when in fact they do make falsifiable predictions. It is argued by Ioannidis that many cases of mutually exclusive theories being accepted as "validated" by research journals are caused by failure of the journals to take in empirical falsifications of non-normally distributed predictions, and not because mutually exclusive theories are true, which they cannot be, although two mutually exclusive theories can both be wrong and a third one correct.


Computational methods


Generating values from normal distribution

In computer simulations, especially in applications of the Monte-Carlo method, it is often desirable to generate values that are normally distributed. The algorithms listed below all generate the standard normal deviates, since a can be generated as , where ''Z'' is standard normal. All these algorithms rely on the availability of a random number generator ''U'' capable of producing Uniform distribution (continuous), uniform random variates. * The most straightforward method is based on the probability integral transform property: if ''U'' is distributed uniformly on (0,1), then Φ−1(''U'') will have the standard normal distribution. The drawback of this method is that it relies on calculation of the
probit function In probability theory and statistics, the probit function is the quantile function associated with the standard normal distribution. It has applications in data analysis and machine learning, in particular exploratory statistical graphics and ...
Φ−1, which cannot be done analytically. Some approximate methods are described in and in the error function, erf article. Wichura gives a fast algorithm for computing this function to 16 decimal places, which is used by R programming language, R to compute random variates of the normal distribution. * Irwin–Hall distribution#Approximating a Normal distribution, An easy-to-program approximate approach that relies on the
central limit theorem In probability theory, the central limit theorem (CLT) establishes that, in many situations, when independent random variables are summed up, their properly normalized sum tends toward a normal distribution even if the original variables themselv ...
is as follows: generate 12 uniform ''U''(0,1) deviates, add them all up, and subtract 6 – the resulting random variable will have approximately standard normal distribution. In truth, the distribution will be Irwin–Hall distribution, Irwin–Hall, which is a 12-section eleventh-order polynomial approximation to the normal distribution. This random deviate will have a limited range of (−6, 6). Note that in a true normal distribution, only 0.00034% of all samples will fall outside ±6σ. * The Box–Muller transform, Box–Muller method uses two independent random numbers ''U'' and ''V'' distributed uniform distribution (continuous), uniformly on (0,1). Then the two random variables ''X'' and ''Y'' X = \sqrt \, \cos(2 \pi V) , \qquad Y = \sqrt \, \sin(2 \pi V) . will both have the standard normal distribution, and will be
independent Independent or Independents may refer to: Arts, entertainment, and media Artist groups * Independents (artist group), a group of modernist painters based in the New Hope, Pennsylvania, area of the United States during the early 1930s * Independ ...
. This formulation arises because for a bivariate normal random vector (''X'', ''Y'') the squared norm will have the
chi-squared distribution In probability theory and statistics, the chi-squared distribution (also chi-square or \chi^2-distribution) with k degrees of freedom is the distribution of a sum of the squares of k independent standard normal random variables. The chi-squa ...
with two degrees of freedom, which is an easily generated exponential distribution, exponential random variable corresponding to the quantity −2ln(''U'') in these equations; and the angle is distributed uniformly around the circle, chosen by the random variable ''V''. * The Marsaglia polar method is a modification of the Box–Muller method which does not require computation of the sine and cosine functions. In this method, ''U'' and ''V'' are drawn from the uniform (−1,1) distribution, and then is computed. If ''S'' is greater or equal to 1, then the method starts over, otherwise the two quantities X = U\sqrt, \qquad Y = V\sqrt are returned. Again, ''X'' and ''Y'' are independent, standard normal random variables. * The Ratio method is a rejection method. The algorithm proceeds as follows: ** Generate two independent uniform deviates ''U'' and ''V''; ** Compute ''X'' = (''V'' − 0.5)/''U''; ** Optional: if ''X''2 ≤ 5 − 4''e''1/4''U'' then accept ''X'' and terminate algorithm; ** Optional: if ''X''2 ≥ 4''e''−1.35/''U'' + 1.4 then reject ''X'' and start over from step 1; ** If ''X''2 ≤ −4 ln''U'' then accept ''X'', otherwise start over the algorithm. *:The two optional steps allow the evaluation of the logarithm in the last step to be avoided in most cases. These steps can be greatly improved so that the logarithm is rarely evaluated. * The ziggurat algorithm is faster than the Box–Muller transform and still exact. In about 97% of all cases it uses only two random numbers, one random integer and one random uniform, one multiplication and an if-test. Only in 3% of the cases, where the combination of those two falls outside the "core of the ziggurat" (a kind of rejection sampling using logarithms), do exponentials and more uniform random numbers have to be employed. * Integer arithmetic can be used to sample from the standard normal distribution. This method is exact in the sense that it satisfies the conditions of ''ideal approximation''; i.e., it is equivalent to sampling a real number from the standard normal distribution and rounding this to the nearest representable floating point number. * There is also some investigation into the connection between the fast Hadamard transform and the normal distribution, since the transform employs just addition and subtraction and by the central limit theorem random numbers from almost any distribution will be transformed into the normal distribution. In this regard a series of Hadamard transforms can be combined with random permutations to turn arbitrary data sets into a normally distributed data.


Numerical approximations for the normal CDF and normal quantile function

The standard normal cumulative distribution function, CDF is widely used in scientific and statistical computing. The values Φ(''x'') may be approximated very accurately by a variety of methods, such as numerical integration, Taylor series, asymptotic series and Gauss's continued fraction#Of Kummer's confluent hypergeometric function, continued fractions. Different approximations are used depending on the desired level of accuracy. * give the approximation for Φ(''x'') for ''x > 0'' with the absolute error (algorith
26.2.17
: \Phi(x) = 1 - \varphi(x)\left(b_1 t + b_2 t^2 + b_3t^3 + b_4 t^4 + b_5 t^5\right) + \varepsilon(x), \qquad t = \frac, where ''ϕ''(''x'') is the standard normal PDF, and ''b''0 = 0.2316419, ''b''1 = 0.319381530, ''b''2 = −0.356563782, ''b''3 = 1.781477937, ''b''4 = −1.821255978, ''b''5 = 1.330274429. * lists some dozens of approximations – by means of rational functions, with or without exponentials – for the function. His algorithms vary in the degree of complexity and the resulting precision, with maximum absolute precision of 24 digits. An algorithm by combines Hart's algorithm 5666 with a continued fraction approximation in the tail to provide a fast computation algorithm with a 16-digit precision. * after recalling Hart68 solution is not suited for erf, gives a solution for both erf and erfc, with maximal relative error bound, via rational function, Rational Chebyshev Approximation. * suggested a simple algorithm based on the Taylor series expansion \Phi(x) = \frac12 + \varphi(x)\left( x + \frac 3 + \frac + \frac + \frac + \cdots \right) for calculating with arbitrary precision. The drawback of this algorithm is comparatively slow calculation time (for example it takes over 300 iterations to calculate the function with 16 digits of precision when ). * The GNU Scientific Library calculates values of the standard normal CDF using Hart's algorithms and approximations with Chebyshev polynomials. Shore (1982) introduced simple approximations that may be incorporated in stochastic optimization models of engineering and operations research, like reliability engineering and inventory analysis. Denoting , the simplest approximation for the quantile function is: z = \Phi^(p)=5.5556\left[1- \left( \frac p \right)^\right],\qquad p\ge 1/2 This approximation delivers for ''z'' a maximum absolute error of 0.026 (for , corresponding to ). For replace ''p'' by and change sign. Another approximation, somewhat less accurate, is the single-parameter approximation: z=-0.4115\left\, \qquad p\ge 1/2 The latter had served to derive a simple approximation for the loss integral of the normal distribution, defined by \begin L(z) & =\int_z^\infty (u-z)\varphi(u) \, du=\int_z^\infty [1-\Phi (u)] \, du \\[5pt] L(z) & \approx \begin 0.4115\left(\dfrac p \right) - z, & p<1/2, \\ \\ 0.4115\left( \dfrac p \right), & p\ge 1/2. \end \\[5pt] \text \\ L(z) & \approx \begin 0.4115\left\, & p < 1/2, \\ \\ 0.4115 \dfrac p, & p\ge 1/2. \end \end This approximation is particularly accurate for the right far-tail (maximum error of 10−3 for z≥1.4). Highly accurate approximations for the CDF, based on Response modeling methodology, Response Modeling Methodology (RMM, Shore, 2011, 2012), are shown in Shore (2005). Some more approximations can be found at: Error function#Approximation with elementary functions. In particular, small ''relative'' error on the whole domain for the CDF \Phi and the quantile function \Phi^ as well, is achieved via an explicitly invertible formula by Sergei Winitzki in 2008.


History


Development

Some authors attribute the credit for the discovery of the normal distribution to Abraham de Moivre, de Moivre, who in 1738 published in the second edition of his "''The Doctrine of Chances''" the study of the coefficients in the binomial expansion of . De Moivre proved that the middle term in this expansion has the approximate magnitude of 2^n/\sqrt, and that "If ''m'' or ''n'' be a Quantity infinitely great, then the Logarithm of the Ratio, which a Term distant from the middle by the Interval ''ℓ'', has to the middle Term, is -\frac." Although this theorem can be interpreted as the first obscure expression for the normal probability law, Stephen Stigler, Stigler points out that de Moivre himself did not interpret his results as anything more than the approximate rule for the binomial coefficients, and in particular de Moivre lacked the concept of the probability density function. In 1823 Carl Friedrich Gauss, Gauss published his monograph "''Theoria combinationis observationum erroribus minimis obnoxiae''" where among other things he introduces several important statistical concepts, such as the method of least squares, the method of maximum likelihood, and the ''normal distribution''. Gauss used ''M'', , to denote the measurements of some unknown quantity ''V'', and sought the "most probable" estimator of that quantity: the one that maximizes the probability of obtaining the observed experimental results. In his notation φΔ is the probability density function of the measurement errors of magnitude Δ. Not knowing what the function ''φ'' is, Gauss requires that his method should reduce to the well-known answer: the arithmetic mean of the measured values. Starting from these principles, Gauss demonstrates that the only law that rationalizes the choice of arithmetic mean as an estimator of the location parameter, is the normal law of errors: \varphi\mathit = \frac h \, e^, where ''h'' is "the measure of the precision of the observations". Using this normal law as a generic model for errors in the experiments, Gauss formulates what is now known as the non-linear least squares, non-linear weighted least squares method. Although Gauss was the first to suggest the normal distribution law, Pierre Simon de Laplace, Laplace made significant contributions. It was Laplace who first posed the problem of aggregating several observations in 1774, although his own solution led to the Laplacian distribution. It was Laplace who first calculated the value of the Gaussian integral, integral in 1782, providing the normalization constant for the normal distribution. Finally, it was Laplace who in 1810 proved and presented to the Academy the fundamental
central limit theorem In probability theory, the central limit theorem (CLT) establishes that, in many situations, when independent random variables are summed up, their properly normalized sum tends toward a normal distribution even if the original variables themselv ...
, which emphasized the theoretical importance of the normal distribution. It is of interest to note that in 1809 an Irish-American mathematician Robert Adrain published two insightful but flawed derivations of the normal probability law, simultaneously and independently from Gauss. His works remained largely unnoticed by the scientific community, until in 1871 they were exhumed by Cleveland Abbe, Abbe. In the middle of the 19th century James Clerk Maxwell, Maxwell demonstrated that the normal distribution is not just a convenient mathematical tool, but may also occur in natural phenomena: "The number of particles whose velocity, resolved in a certain direction, lies between ''x'' and ''x'' + ''dx'' is \operatorname \frac\; e^ \, dx


Naming

Today, the concept is usually known in English as the normal distribution or Gaussian distribution. Other less common names include Gauss distribution, Laplace-Gauss distribution, the law of error, the law of facility of errors, Laplace's second law, Gaussian law. Gauss himself apparently coined the term with reference to the "normal equations" involved in its applications, with normal having its technical meaning of orthogonal rather than "usual". However, by the end of the 19th century some authors had started using the name ''normal distribution'', where the word "normal" was used as an adjective – the term now being seen as a reflection of the fact that this distribution was seen as typical, common – and thus "normal". Charles Sanders Peirce, Peirce (one of those authors) once defined "normal" thus: "...the 'normal' is not the average (or any other kind of mean) of what actually occurs, but of what ''would'', in the long run, occur under certain circumstances." Around the turn of the 20th century Karl Pearson, Pearson popularized the term ''normal'' as a designation for this distribution. Also, it was Pearson who first wrote the distribution in terms of the standard deviation ''σ'' as in modern notation. Soon after this, in year 1915, Ronald Fisher, Fisher added the location parameter to the formula for normal distribution, expressing it in the way it is written nowadays: df = \frac e^ \, dx. The term "standard normal", which denotes the normal distribution with zero mean and unit variance came into general use around the 1950s, appearing in the popular textbooks by P. G. Hoel (1947) "''Introduction to mathematical statistics''" and A. M. Mood (1950) "''Introduction to the theory of statistics''".


See also

* Bates distribution – similar to the Irwin–Hall distribution, but rescaled back into the 0 to 1 range * Behrens–Fisher problem – the long-standing problem of testing whether two normal samples with different variances have same means; * Bhattacharyya distance – method used to separate mixtures of normal distributions * Erdős–Kac theorem – on the occurrence of the normal distribution in number theory * Full width at half maximum * Gaussian blur – convolution, which uses the normal distribution as a kernel * Modified half-normal distribution with the pdf on (0, \infty) is given as f(x)= \frac, where \Psi(\alpha,z)=_1\Psi_1\left(\begin\left(\alpha,\frac\right)\\(1,0)\end;z \right) denotes the Fox-Wright Psi function. * Normally distributed and uncorrelated does not imply independent * Ratio normal distribution * Reciprocal normal distribution * Standard normal table * Stein's lemma * Sub-Gaussian distribution * Sum of normally distributed random variables * Tweedie distribution – The normal distribution is a member of the family of Tweedie exponential dispersion models. * Wrapped normal distribution – the Normal distribution applied to a circular domain * Z-test – using the normal distribution


Notes


References


Citations


Sources

* * In particular, the entries fo
"bell-shaped and bell curve"
an

* * * * * * * * * * * * * * * * * * * * * * * * Translated by Stephen M. Stigler in ''Statistical Science'' 1 (3), 1986: . * * * * * * * * * * * * * * * * * * * * * * * * * * * *


External links

*
Normal distribution calculator
{{Authority control Normal distribution, Continuous distributions Conjugate prior distributions Exponential family distributions Stable distributions Location-scale family probability distributions]">X - \mu, ^p\right&= \sigma^p (p-1)!! \cdot \begin \sqrt & \textp\text \\ 1 & \textp\text \end \\ &= \sigma^p \cdot \frac. \end The last formula is valid also for any non-integer p>-1. When the mean \mu \ne 0, the plain and absolute moments can be expressed in terms of
confluent hypergeometric function In mathematics, a confluent hypergeometric function is a solution of a confluent hypergeometric equation, which is a degenerate form of a hypergeometric differential equation where two of the three regular singularities merge into an irregular ...
s _1F_1 and U. :\begin \operatorname\left ^p\right&= \sigma^p\cdot (-i\sqrt 2)^p U\left(-\frac, \frac, -\frac \left( \frac \mu \sigma \right)^2 \right), \\ \operatorname\left[, X, ^p \right] &= \sigma^p \cdot 2^ \frac _1F_1\left( -\frac, \frac, -\frac \left( \frac \mu \sigma \right)^2 \right). \end These expressions remain valid even if p is not an integer. See also Hermite polynomials#"Negative variance", generalized Hermite polynomials. The expectation of X conditioned on the event that X lies in an interval ,b/math> is given by :\operatorname\left \mid a= \mu - \sigma^2\frac where f and F respectively are the density and the cumulative distribution function of X. For b=\infty this is known as the
inverse Mills ratio In probability theory, the Mills ratio (or Mills's ratio) of a continuous random variable X is the function : m(x) := \frac , where f(x) is the probability density function, and :\bar(x) := \Pr x.html" ;"title=">x">>x= \int_x^ f(u)\, du is the ...
. Note that above, density f of X is used instead of standard normal density as in inverse Mills ratio, so here we have \sigma^2 instead of \sigma.


Fourier transform and characteristic function

The
Fourier transform A Fourier transform (FT) is a mathematical transform that decomposes functions into frequency components, which are represented by the output of the transform as a function of frequency. Most commonly functions of time or space are transformed, ...
of a normal density f with mean \mu and standard deviation \sigma is : \hat f(t) = \int_^\infty f(x)e^ \, dx = e^ e^ where i is the
imaginary unit The imaginary unit or unit imaginary number () is a solution to the quadratic equation x^2+1=0. Although there is no real number with this property, can be used to extend the real numbers to what are called complex numbers, using addition an ...
. If the mean \mu=0, the first factor is 1, and the Fourier transform is, apart from a constant factor, a normal density on the
frequency domain In physics, electronics, control systems engineering, and statistics, the frequency domain refers to the analysis of mathematical functions or signals with respect to frequency, rather than time. Put simply, a time-domain graph shows how a signa ...
, with mean 0 and standard deviation 1/\sigma. In particular, the standard normal distribution \varphi is an
eigenfunction In mathematics, an eigenfunction of a linear operator ''D'' defined on some function space is any non-zero function f in that space that, when acted upon by ''D'', is only multiplied by some scaling factor called an eigenvalue. As an equation, th ...
of the Fourier transform. In probability theory, the Fourier transform of the probability distribution of a real-valued random variable X is closely connected to the
characteristic function In mathematics, the term "characteristic function" can refer to any of several distinct concepts: * The indicator function of a subset, that is the function ::\mathbf_A\colon X \to \, :which for a given subset ''A'' of ''X'', has value 1 at points ...
\varphi_X(t) of that variable, which is defined as the
expected value In probability theory, the expected value (also called expectation, expectancy, mathematical expectation, mean, average, or first moment) is a generalization of the weighted average. Informally, the expected value is the arithmetic mean of a l ...
of e^, as a function of the real variable t (the
frequency Frequency is the number of occurrences of a repeating event per unit of time. It is also occasionally referred to as ''temporal frequency'' for clarity, and is distinct from ''angular frequency''. Frequency is measured in hertz (Hz) which is eq ...
parameter of the Fourier transform). This definition can be analytically extended to a complex-value variable t. The relation between both is: :\varphi_X(t) = \hat f(-t)


Moment and cumulant generating functions

The
moment generating function In probability theory and statistics, the moment-generating function of a real-valued random variable is an alternative specification of its probability distribution. Thus, it provides the basis of an alternative route to analytical results compare ...
of a real random variable X is the expected value of e^, as a function of the real parameter t. For a normal distribution with density f, mean \mu and deviation \sigma, the moment generating function exists and is equal to :M(t) = \operatorname ^= \hat f(it) = e^ e^ The
cumulant generating function In probability theory and statistics, the cumulants of a probability distribution are a set of quantities that provide an alternative to the '' moments'' of the distribution. Any two probability distributions whose moments are identical will have ...
is the logarithm of the moment generating function, namely :g(t) = \ln M(t) = \mu t + \tfrac 12 \sigma^2 t^2 Since this is a quadratic polynomial in t, only the first two
cumulant In probability theory and statistics, the cumulants of a probability distribution are a set of quantities that provide an alternative to the '' moments'' of the distribution. Any two probability distributions whose moments are identical will ha ...
s are nonzero, namely the mean \mu and the variance \sigma^2.


Stein operator and class

Within
Stein's method Stein's method is a general method in probability theory to obtain bounds on the distance between two probability distributions with respect to a probability metric. It was introduced by Charles Stein, who first published it in 1972, to obtain ...
the Stein operator and class of a random variable X \sim \mathcal(\mu, \sigma^2) are \mathcalf(x) = \sigma^2 f'(x) - (x-\mu)f(x) and \mathcal the class of all absolutely continuous functions f : \R \to \R \mbox\mathbb[, f'(X), ]< \infty.


Zero-variance limit

In the limit (mathematics), limit when \sigma tends to zero, the probability density f(x) eventually tends to zero at any x\ne \mu, but grows without limit if x = \mu, while its integral remains equal to 1. Therefore, the normal distribution cannot be defined as an ordinary
function Function or functionality may refer to: Computing * Function key, a type of key on computer keyboards * Function model, a structured representation of processes in a system * Function object or functor or functionoid, a concept of object-oriente ...
when \sigma = 0. However, one can define the normal distribution with zero variance as a
generalized function In mathematics, generalized functions are objects extending the notion of functions. There is more than one recognized theory, for example the theory of distributions. Generalized functions are especially useful in making discontinuous functions ...
; specifically, as Dirac's "delta function" \delta translated by the mean \mu, that is f(x)=\delta(x-\mu). Its CDF is then the
Heaviside step function The Heaviside step function, or the unit step function, usually denoted by or (but sometimes , or ), is a step function, named after Oliver Heaviside (1850–1925), the value of which is zero for negative arguments and one for positive argume ...
translated by the mean \mu, namely :F(x) = \begin 0 & \textx < \mu \\ 1 & \textx \geq \mu \end


Maximum entropy

Of all probability distributions over the reals with a specified mean \mu and variance \sigma^2, the normal distribution N(\mu,\sigma^2) is the one with maximum entropy. If X is a
continuous random variable In probability theory and statistics, a probability distribution is the mathematical function that gives the probabilities of occurrence of different possible outcomes for an experiment. It is a mathematical description of a random phenomenon i ...
with
probability density In probability theory, a probability density function (PDF), or density of a continuous random variable, is a function whose value at any given sample (or point) in the sample space (the set of possible values taken by the random variable) can ...
f(x), then the entropy of X is defined as : H(X) = - \int_^\infty f(x)\log f(x)\, dx where f(x)\log f(x) is understood to be zero whenever f(x)=0. This functional can be maximized, subject to the constraints that the distribution is properly normalized and has a specified variance, by using
variational calculus The calculus of variations (or Variational Calculus) is a field of mathematical analysis that uses variations, which are small changes in functions and functionals, to find maxima and minima of functionals: mappings from a set of functions t ...
. A function with two
Lagrange multipliers In mathematical optimization, the method of Lagrange multipliers is a strategy for finding the local maxima and minima of a function subject to equality constraints (i.e., subject to the condition that one or more equations have to be satisfied ex ...
is defined: : L=\int_^\infty f(x)\ln(f(x))\,dx-\lambda_0\left(1-\int_^\infty f(x)\,dx\right)-\lambda\left(\sigma^2-\int_^\infty f(x)(x-\mu)^2\,dx\right) where f(x) is, for now, regarded as some density function with mean \mu and standard deviation \sigma. At maximum entropy, a small variation \delta f(x) about f(x) will produce a variation \delta L about L which is equal to 0: : 0=\delta L=\int_^\infty \delta f(x)\left (\ln(f(x))+1+\lambda_0+\lambda(x-\mu)^2\right )\,dx Since this must hold for any small \delta f(x), the term in brackets must be zero, and solving for f(x) yields: :f(x)=e^ Using the constraint equations to solve for \lambda_0 and \lambda yields the density of the normal distribution: : f(x, \mu, \sigma)=\frace^ The entropy of a normal distribution is equal to : H(X)=\tfrac(1+\log(2\sigma^2\pi))


Other properties


Related distributions


Central limit theorem

The central limit theorem states that under certain (fairly common) conditions, the sum of many random variables will have an approximately normal distribution. More specifically, where X_1,\ldots ,X_n are
independent and identically distributed In probability theory and statistics, a collection of random variables is independent and identically distributed if each random variable has the same probability distribution as the others and all are mutually independent. This property is usua ...
random variables with the same arbitrary distribution, zero mean, and variance \sigma^2 and Z is their mean scaled by \sqrt : Z = \sqrt\left(\frac\sum_^n X_i\right) Then, as n increases, the probability distribution of Z will tend to the normal distribution with zero mean and variance \sigma^2. The theorem can be extended to variables (X_i) that are not independent and/or not identically distributed if certain constraints are placed on the degree of dependence and the moments of the distributions. Many
test statistic A test statistic is a statistic (a quantity derived from the sample) used in statistical hypothesis testing.Berger, R. L.; Casella, G. (2001). ''Statistical Inference'', Duxbury Press, Second Edition (p.374) A hypothesis test is typically specif ...
s, scores, and
estimator In statistics, an estimator is a rule for calculating an estimate of a given quantity based on observed data: thus the rule (the estimator), the quantity of interest (the estimand) and its result (the estimate) are distinguished. For example, the ...
s encountered in practice contain sums of certain random variables in 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 distributions. The central limit theorem also implies that certain distributions can be approximated by the normal distribution, for example: * The
binomial distribution In probability theory and statistics, the binomial distribution with parameters ''n'' and ''p'' is the discrete probability distribution of the number of successes in a sequence of ''n'' independent experiments, each asking a yes–no quest ...
B(n,p) is approximately normal with mean np and variance np(1-p) for large n and for p not too close to 0 or 1. * The
Poisson distribution In probability theory and statistics, the Poisson distribution is a discrete probability distribution that expresses the probability of a given number of events occurring in a fixed interval of time or space if these events occur with a known co ...
with parameter \lambda is approximately normal with mean \lambda and variance \lambda, for large values of \lambda. * The
chi-squared distribution In probability theory and statistics, the chi-squared distribution (also chi-square or \chi^2-distribution) with k degrees of freedom is the distribution of a sum of the squares of k independent standard normal random variables. The chi-squa ...
\chi^2(k) is approximately normal with mean k and variance 2k, for large k. * The
Student's t-distribution In probability and statistics, Student's ''t''-distribution (or simply the ''t''-distribution) is any member of a family of continuous probability distributions that arise when estimating the mean of a normally distributed population in sit ...
t(\nu) is approximately normal with mean 0 and variance 1 when \nu is large. Whether these approximations are sufficiently accurate depends on the purpose for which they are needed, and the rate of convergence to the normal distribution. It is typically the case that such approximations are less accurate in the tails of the distribution. A general upper bound for the approximation error in the central limit theorem is given by the
Berry–Esseen theorem In probability theory, the central limit theorem states that, under certain circumstances, the probability distribution of the scaled mean of a random sample converges to a normal distribution as the sample size increases to infinity. Under strong ...
, improvements of the approximation are given by the
Edgeworth expansion The Gram–Charlier A series (named in honor of Jørgen Pedersen Gram and Carl Charlier), and the Edgeworth series (named in honor of Francis Ysidro Edgeworth) are series that approximate a probability distribution in terms of its cumulants. The se ...
s. This theorem can also be used to justify modeling the sum of many uniform noise sources as
Gaussian noise Gaussian noise, named after Carl Friedrich Gauss, is a term from signal processing theory denoting a kind of signal noise that has a probability density function (pdf) equal to that of the normal distribution (which is also known as the Gaussia ...
. See
AWGN Additive white Gaussian noise (AWGN) is a basic noise model used in information theory to mimic the effect of many random processes that occur in nature. The modifiers denote specific characteristics: * ''Additive'' because it is added to any nois ...
.


Operations and functions of normal variables

The
probability density In probability theory, a probability density function (PDF), or density of a continuous random variable, is a function whose value at any given sample (or point) in the sample space (the set of possible values taken by the random variable) can ...
,
cumulative distribution In statistics, the frequency (or absolute frequency) of an event i is the number n_i of times the observation has occurred/recorded in an experiment or study. These frequencies are often depicted graphically or in tabular form. Types The cumul ...
, and inverse cumulative distribution of any function of one or more independent or correlated normal variables can be computed with the numerical method of ray-tracing
Matlab code
. In the following sections we look at some special cases.


Operations on a single normal variable

If X is distributed normally with mean \mu and variance \sigma^2, then * aX+b, for any real numbers a and b, is also normally distributed, with mean a\mu+b and standard deviation , a, \sigma. That is, the family of normal distributions is closed under linear transformations. * The exponential of X is distributed log-normally: . * The absolute value of X has
folded normal distribution The folded normal distribution is a probability distribution related to the normal distribution. Given a normally distributed random variable ''X'' with mean ''μ'' and variance ''σ''2, the random variable ''Y'' = , ''X'', has a folded normal d ...
: . If \mu = 0 this is known as the
half-normal distribution In probability theory and statistics, the half-normal distribution is a special case of the folded normal distribution. Let X follow an ordinary normal distribution, N(0,\sigma^2). Then, Y=, X, follows a half-normal distribution. Thus, the hal ...
. * The absolute value of normalized residuals, , ''X'' − ''μ'', /''σ'', has
chi distribution In probability theory and statistics, the chi distribution is a continuous probability distribution. It is the distribution of the positive square root of the sum of squares of a set of independent random variables each following a standard norm ...
with one degree of freedom: , X - \mu, / \sigma \sim \chi_1. * The square of ''X''/''σ'' has the
noncentral chi-squared distribution In probability theory and statistics, the noncentral chi-squared distribution (or noncentral chi-square distribution, noncentral \chi^2 distribution) is a noncentral generalization of the chi-squared distribution. It often arises in the power a ...
with one degree of freedom: X^2 / \sigma^2 \sim \chi_1^2(\mu^2 / \sigma^2). If \mu = 0, the distribution is called simply chi-squared. * The log likelihood of a normal variable x is simply the log of its
probability density function In probability theory, a probability density function (PDF), or density of a continuous random variable, is a function whose value at any given sample (or point) in the sample space (the set of possible values taken by the random variable) can ...
: \ln p(x)= -\frac \left(\frac \right)^2 -\ln \left(\sigma \sqrt \right) = -\frac z^2 -\ln \left(\sigma \sqrt \right). Since this is a scaled and shifted square of a standard normal variable, it is distributed as a scaled and shifted chi-squared variable. * The distribution of the variable ''X'' restricted to an interval 'a'', ''b''is called the
truncated normal distribution In probability and statistics, the truncated normal distribution is the probability distribution derived from that of a normally distributed random variable by bounding the random variable from either below or above (or both). The truncated no ...
. * (''X'' − ''μ'')−2 has a
Lévy distribution In probability theory and statistics, the Lévy distribution, named after Paul Lévy, is a continuous probability distribution for a non-negative random variable. In spectroscopy, this distribution, with frequency as the dependent variable, is kn ...
with location 0 and scale ''σ''−2.


= Operations on two independent normal variables

= * If X_1 and X_2 are two
independent Independent or Independents may refer to: Arts, entertainment, and media Artist groups * Independents (artist group), a group of modernist painters based in the New Hope, Pennsylvania, area of the United States during the early 1930s * Independ ...
normal random variables, with means \mu_1, \mu_2 and standard deviations \sigma_1, \sigma_2, then their sum X_1 + X_2 will also be normally distributed, roof/sup> with mean \mu_1 + \mu_2 and variance \sigma_1^2 + \sigma_2^2. * In particular, if X and Y are independent normal deviates with zero mean and variance \sigma^2, then X + Y and X - Y are also independent and normally distributed, with zero mean and variance 2\sigma^2. This is a special case of the
polarization identity In linear algebra, a branch of mathematics, the polarization identity is any one of a family of formulas that express the inner product of two vectors in terms of the norm of a normed vector space. If a norm arises from an inner product then t ...
. * If X_1, X_2 are two independent normal deviates with mean \mu and deviation \sigma, and a, b are arbitrary real numbers, then the variable X_3 = \frac + \mu is also normally distributed with mean \mu and deviation \sigma. It follows that the normal distribution is
stable A stable is a building in which livestock, especially horses, are kept. It most commonly means a building that is divided into separate stalls for individual animals and livestock. There are many different types of stables in use today; the ...
(with exponent \alpha=2).


= Operations on two independent standard normal variables

= If X_1 and X_2 are two independent standard normal random variables with mean 0 and variance 1, then * Their sum and difference is distributed normally with mean zero and variance two: X_1 \pm X_2 \sim N(0, 2). * Their product Z = X_1 X_2 follows the
product distribution A product distribution is a probability distribution constructed as the distribution of the product of random variables having two other known distributions. Given two statistically independent random variables ''X'' and ''Y'', the distribution of ...
with density function f_Z(z) = \pi^ K_0(, z, ) where K_0 is the
modified Bessel function of the second kind Bessel functions, first defined by the mathematician Daniel Bernoulli and then generalized by Friedrich Bessel, are canonical solutions of Bessel's differential equation x^2 \frac + x \frac + \left(x^2 - \alpha^2 \right)y = 0 for an arbitrary ...
. This distribution is symmetric around zero, unbounded at z = 0, and has the
characteristic function In mathematics, the term "characteristic function" can refer to any of several distinct concepts: * The indicator function of a subset, that is the function ::\mathbf_A\colon X \to \, :which for a given subset ''A'' of ''X'', has value 1 at points ...
\phi_Z(t) = (1 + t^2)^. * Their ratio follows the standard
Cauchy distribution The Cauchy distribution, named after Augustin Cauchy, is a continuous probability distribution. It is also known, especially among physicists, as the Lorentz distribution (after Hendrik Lorentz), Cauchy–Lorentz distribution, Lorentz(ian) fun ...
: X_1/ X_2 \sim \operatorname(0, 1). * Their Euclidean norm \sqrt has the
Rayleigh distribution In probability theory and statistics, the Rayleigh distribution is a continuous probability distribution for nonnegative-valued random variables. Up to rescaling, it coincides with the chi distribution with two degrees of freedom. The distribut ...
.


Operations on multiple independent normal variables

* Any linear combination of independent normal deviates is a normal deviate. * If X_1, X_2, \ldots, X_n are independent standard normal random variables, then the sum of their squares has the
chi-squared distribution In probability theory and statistics, the chi-squared distribution (also chi-square or \chi^2-distribution) with k degrees of freedom is the distribution of a sum of the squares of k independent standard normal random variables. The chi-squa ...
with n degrees of freedom X_1^2 + \cdots + X_n^2 \sim \chi_n^2. * If X_1, X_2, \ldots, X_n are independent normally distributed random variables with means \mu and variances \sigma^2, then their
sample mean The sample mean (or "empirical mean") and the sample covariance are statistics computed from a Sample (statistics), sample of data on one or more random variables. The sample mean is the average value (or mean, mean value) of a sample (statistic ...
is independent from the sample
standard deviation In statistics, the standard deviation is a measure of the amount of variation or dispersion of a set of values. A low standard deviation indicates that the values tend to be close to the mean (also called the expected value) of the set, while ...
, which can be demonstrated using Basu's theorem or
Cochran's theorem In statistics, Cochran's theorem, devised by William G. Cochran, is a theorem used to justify results relating to the probability distributions of statistics that are used in the analysis of variance. Statement Let ''U''1, ..., ''U'N'' be i.i. ...
. The ratio of these two quantities will have the
Student's t-distribution In probability and statistics, Student's ''t''-distribution (or simply the ''t''-distribution) is any member of a family of continuous probability distributions that arise when estimating the mean of a normally distributed population in sit ...
with n-1 degrees of freedom: t = \frac = \frac \sim t_. * If X_1, X_2, \ldots, X_n, Y_1, Y_2, \ldots, Y_m are independent standard normal random variables, then the ratio of their normalized sums of squares will have the with degrees of freedom: F = \frac \sim F_.


Operations on multiple correlated normal variables

* A
quadratic form In mathematics, a quadratic form is a polynomial with terms all of degree two ("form" is another name for a homogeneous polynomial). For example, :4x^2 + 2xy - 3y^2 is a quadratic form in the variables and . The coefficients usually belong to a ...
of a normal vector, i.e. a quadratic function q = \sum x_i^2 + \sum x_j + c of multiple independent or correlated normal variables, is a generalized chi-square variable.


Operations on the density function

The split normal distribution is most directly defined in terms of joining scaled sections of the density functions of different normal distributions and rescaling the density to integrate to one. The
truncated normal distribution In probability and statistics, the truncated normal distribution is the probability distribution derived from that of a normally distributed random variable by bounding the random variable from either below or above (or both). The truncated no ...
results from rescaling a section of a single density function.


Infinite divisibility and Cramér's theorem

For any positive integer \text, any normal distribution with mean \mu and variance \sigma^2 is the distribution of the sum of \text independent normal deviates, each with mean \frac and variance \frac. This property is called
infinite divisibility Infinite divisibility arises in different ways in philosophy, physics, economics, order theory (a branch of mathematics), and probability theory (also a branch of mathematics). One may speak of infinite divisibility, or the lack thereof, of matter ...
. Conversely, if X_1 and X_2 are independent random variables and their sum X_1+X_2 has a normal distribution, then both X_1 and X_2 must be normal deviates. This result is known as Cramér's decomposition theorem, and is equivalent to saying that the convolution of two distributions is normal if and only if both are normal. Cramér's theorem implies that a linear combination of independent non-Gaussian variables will never have an exactly normal distribution, although it may approach it arbitrarily closely.


Bernstein's theorem

Bernstein's theorem states that if X and Y are independent and X + Y and X - Y are also independent, then both ''X'' and ''Y'' must necessarily have normal distributions. More generally, if X_1, \ldots, X_n are independent random variables, then two distinct linear combinations \sum and \sumwill be independent if and only if all X_k are normal and \sum, where \sigma_k^2 denotes the variance of X_k.


Extensions

The notion of normal distribution, being one of the most important distributions in probability theory, has been extended far beyond the standard framework of the univariate (that is one-dimensional) case (Case 1). All these extensions are also called ''normal'' or ''Gaussian'' laws, so a certain ambiguity in names exists. * The
multivariate normal distribution In probability theory and statistics, the multivariate normal distribution, multivariate Gaussian distribution, or joint normal distribution is a generalization of the one-dimensional (univariate) normal distribution to higher dimensions. One d ...
describes the Gaussian law in the ''k''-dimensional Euclidean space. A vector is multivariate-normally distributed if any linear combination of its components has a (univariate) normal distribution. The variance of ''X'' is a ''k×k'' symmetric positive-definite matrix ''V''. The multivariate normal distribution is a special case of the
elliptical distribution In probability and statistics, an elliptical distribution is any member of a broad family of probability distributions that generalize the multivariate normal distribution. Intuitively, in the simplified two and three dimensional case, the joint di ...
s. As such, its iso-density loci in the ''k'' = 2 case are ellipses and in the case of arbitrary ''k'' are ellipsoids. * Rectified Gaussian distribution a rectified version of normal distribution with all the negative elements reset to 0 * Complex normal distribution deals with the complex normal vectors. A complex vector is said to be normal if both its real and imaginary components jointly possess a 2''k''-dimensional multivariate normal distribution. The variance-covariance structure of ''X'' is described by two matrices: the ''variance'' matrix Γ, and the ''relation'' matrix ''C''. * Matrix normal distribution describes the case of normally distributed matrices. * Gaussian processes are the normally distributed stochastic processes. These can be viewed as elements of some infinite-dimensional Hilbert space ''H'', and thus are the analogues of multivariate normal vectors for the case . A random element is said to be normal if for any constant the scalar product has a (univariate) normal distribution. The variance structure of such Gaussian random element can be described in terms of the linear ''covariance ''. Several Gaussian processes became popular enough to have their own names: ** Wiener process, Brownian motion, ** Brownian bridge, ** Ornstein–Uhlenbeck process. * Gaussian q-distribution is an abstract mathematical construction that represents a "q-analogue" of the normal distribution. * the q-Gaussian is an analogue of the Gaussian distribution, in the sense that it maximises the Tsallis entropy, and is one type of Tsallis distribution. Note that this distribution is different from the Gaussian q-distribution above. * The Kaniadakis Gaussian distribution, Kaniadakis ''κ''-Gaussian distribution is a generalization of the Gaussian distribution which arises from the Kaniadakis statistics, being one of the Kaniadakis distribution, Kaniadakis distributions. A random variable ''X'' has a two-piece normal distribution if it has a distribution : f_X( x ) = N( \mu, \sigma_1^2 ) \text x \le \mu : f_X( x ) = N( \mu, \sigma_2^2 ) \text x \ge \mu where ''μ'' is the mean and ''σ''1 and ''σ''2 are the standard deviations of the distribution to the left and right of the mean respectively. The mean, variance and third central moment of this distribution have been determined : \operatorname( X ) = \mu + \sqrt ( \sigma_2 - \sigma_1 ) : \operatorname( X ) = \left( 1 - \frac 2 \pi\right)( \sigma_2 - \sigma_1 )^2 + \sigma_1 \sigma_2 : \operatorname( X ) = \sqrt( \sigma_2 - \sigma_1 ) \left[ \left( \frac 4 \pi - 1 \right) ( \sigma_2 - \sigma_1)^2 + \sigma_1 \sigma_2 \right] where E(''X''), V(''X'') and T(''X'') are the mean, variance, and third central moment respectively. One of the main practical uses of the Gaussian law is to model the empirical distributions of many different random variables encountered in practice. In such case a possible extension would be a richer family of distributions, having more than two parameters and therefore being able to fit the empirical distribution more accurately. The examples of such extensions are: * Pearson distribution — a four-parameter family of probability distributions that extend the normal law to include different skewness and kurtosis values. * The generalized normal distribution, also known as the exponential power distribution, allows for distribution tails with thicker or thinner asymptotic behaviors.


Statistical inference


Estimation of parameters

It is often the case that we do not know the parameters of the normal distribution, but instead want to Estimation theory, estimate them. That is, having a sample (x_1, \ldots, x_n) from a normal N(\mu, \sigma^2) population we would like to learn the approximate values of parameters \mu and \sigma^2. The standard approach to this problem is the maximum likelihood method, which requires maximization of the ''log-likelihood function'': : \ln\mathcal(\mu,\sigma^2) = \sum_^n \ln f(x_i\mid\mu,\sigma^2) = -\frac\ln(2\pi) - \frac\ln\sigma^2 - \frac\sum_^n (x_i-\mu)^2. Taking derivatives with respect to \mu and \sigma^2 and solving the resulting system of first order conditions yields the ''maximum likelihood estimates'': : \hat = \overline \equiv \frac\sum_^n x_i, \qquad \hat^2 = \frac \sum_^n (x_i - \overline)^2.


Sample mean

Estimator \textstyle\hat\mu is called the ''
sample mean The sample mean (or "empirical mean") and the sample covariance are statistics computed from a Sample (statistics), sample of data on one or more random variables. The sample mean is the average value (or mean, mean value) of a sample (statistic ...
'', since it is the arithmetic mean of all observations. The statistic \textstyle\overline is complete statistic, complete and sufficient statistic, sufficient for \mu, and therefore by the Lehmann–Scheffé theorem, \textstyle\hat\mu is the uniformly minimum variance unbiased (UMVU) estimator. In finite samples it is distributed normally: : \hat\mu \sim \mathcal(\mu,\sigma^2/n). The variance of this estimator is equal to the ''μμ''-element of the inverse Fisher information matrix \textstyle\mathcal^. This implies that the estimator is efficient estimator, finite-sample efficient. Of practical importance is the fact that the standard error (statistics), standard error of \textstyle\hat\mu is proportional to \textstyle1/\sqrt, that is, if one wishes to decrease the standard error by a factor of 10, one must increase the number of points in the sample by a factor of 100. This fact is widely used in determining sample sizes for opinion polls and the number of trials in Monte Carlo simulations. From the standpoint of the asymptotic theory (statistics), asymptotic theory, \textstyle\hat\mu is consistent estimator, consistent, that is, it convergence in probability, converges in probability to \mu as n\rightarrow\infty. The estimator is also asymptotic normality, asymptotically normal, which is a simple corollary of the fact that it is normal in finite samples: : \sqrt(\hat\mu-\mu) \,\xrightarrow\, \mathcal(0,\sigma^2).


Sample variance

The estimator \textstyle\hat\sigma^2 is called the ''sample variance'', since it is the variance of the sample ((x_1, \ldots, x_n)). In practice, another estimator is often used instead of the \textstyle\hat\sigma^2. This other estimator is denoted s^2, and is also called the ''sample variance'', which represents a certain ambiguity in terminology; its square root s is called the ''sample standard deviation''. The estimator s^2 differs from \textstyle\hat\sigma^2 by having instead of ''n'' in the denominator (the so-called Bessel's correction): : s^2 = \frac \hat\sigma^2 = \frac \sum_^n (x_i - \overline)^2. The difference between s^2 and \textstyle\hat\sigma^2 becomes negligibly small for large ''n''s. In finite samples however, the motivation behind the use of s^2 is that it is an unbiased estimator of the underlying parameter \sigma^2, whereas \textstyle\hat\sigma^2 is biased. Also, by the Lehmann–Scheffé theorem the estimator s^2 is uniformly minimum variance unbiased (Minimum-variance unbiased estimator, UMVU), which makes it the "best" estimator among all unbiased ones. However it can be shown that the biased estimator \textstyle\hat\sigma^2 is "better" than the s^2 in terms of the mean squared error (MSE) criterion. In finite samples both s^2 and \textstyle\hat\sigma^2 have scaled
chi-squared distribution In probability theory and statistics, the chi-squared distribution (also chi-square or \chi^2-distribution) with k degrees of freedom is the distribution of a sum of the squares of k independent standard normal random variables. The chi-squa ...
with degrees of freedom: : s^2 \sim \frac \cdot \chi^2_, \qquad \hat\sigma^2 \sim \frac \cdot \chi^2_. The first of these expressions shows that the variance of s^2 is equal to 2\sigma^4/(n-1), which is slightly greater than the ''σσ''-element of the inverse Fisher information matrix \textstyle\mathcal^. Thus, s^2 is not an efficient estimator for \sigma^2, and moreover, since s^2 is UMVU, we can conclude that the finite-sample efficient estimator for \sigma^2 does not exist. Applying the asymptotic theory, both estimators s^2 and \textstyle\hat\sigma^2 are consistent, that is they converge in probability to \sigma^2 as the sample size n\rightarrow\infty. The two estimators are also both asymptotically normal: : \sqrt(\hat\sigma^2 - \sigma^2) \simeq \sqrt(s^2-\sigma^2) \,\xrightarrow\, \mathcal(0,2\sigma^4). In particular, both estimators are asymptotically efficient for \sigma^2.


Confidence intervals

By
Cochran's theorem In statistics, Cochran's theorem, devised by William G. Cochran, is a theorem used to justify results relating to the probability distributions of statistics that are used in the analysis of variance. Statement Let ''U''1, ..., ''U'N'' be i.i. ...
, for normal distributions the sample mean \textstyle\hat\mu and the sample variance ''s''2 are
independent Independent or Independents may refer to: Arts, entertainment, and media Artist groups * Independents (artist group), a group of modernist painters based in the New Hope, Pennsylvania, area of the United States during the early 1930s * Independ ...
, which means there can be no gain in considering their joint distribution. There is also a converse theorem: if in a sample the sample mean and sample variance are independent, then the sample must have come from the normal distribution. The independence between \textstyle\hat\mu and ''s'' can be employed to construct the so-called ''t-statistic'': : t = \frac = \frac \sim t_ This quantity ''t'' has the
Student's t-distribution In probability and statistics, Student's ''t''-distribution (or simply the ''t''-distribution) is any member of a family of continuous probability distributions that arise when estimating the mean of a normally distributed population in sit ...
with degrees of freedom, and it is an ancillary statistic (independent of the value of the parameters). Inverting the distribution of this ''t''-statistics will allow us to construct the
confidence interval In frequentist statistics, a confidence interval (CI) is a range of estimates for an unknown parameter. A confidence interval is computed at a designated ''confidence level''; the 95% confidence level is most common, but other levels, such as 9 ...
for ''μ''; similarly, inverting the ''χ''2 distribution of the statistic ''s''2 will give us the confidence interval for ''σ''2: :\mu \in \left[ \hat\mu - t_ \fracs, \hat\mu + t_ \fracs \right], :\sigma^2 \in \left[ \frac, \frac \right], where ''tk,p'' and are the ''p''th
quantile In statistics and probability, quantiles are cut points dividing the range of a probability distribution into continuous intervals with equal probabilities, or dividing the observations in a sample in the same way. There is one fewer quantile tha ...
s of the ''t''- and ''χ''2-distributions respectively. These confidence intervals are of the ''confidence level'' , meaning that the true values ''μ'' and ''σ''2 fall outside of these intervals with probability (or significance level) ''α''. In practice people usually take , resulting in the 95% confidence intervals. Approximate formulas can be derived from the asymptotic distributions of \textstyle\hat\mu and ''s''2: :\mu \in \left[ \hat\mu - , z_, \fracs, \hat\mu + , z_, \fracs \right], :\sigma^2 \in \left[ s^2 - , z_, \fracs^2, s^2 + , z_, \fracs^2 \right], The approximate formulas become valid for large values of ''n'', and are more convenient for the manual calculation since the standard normal quantiles ''z''''α''/2 do not depend on ''n''. In particular, the most popular value of , results in .


Normality tests

Normality tests assess the likelihood that the given data set comes from a normal distribution. Typically the null hypothesis ''H''0 is that the observations are distributed normally with unspecified mean ''μ'' and variance ''σ''2, versus the alternative ''Ha'' that the distribution is arbitrary. Many tests (over 40) have been devised for this problem. The more prominent of them are outlined below: Diagnostic plots are more intuitively appealing but subjective at the same time, as they rely on informal human judgement to accept or reject the null hypothesis. *
Q–Q plot In statistics, a Q–Q plot (quantile-quantile plot) is a probability plot, a List of graphical methods, graphical method for comparing two probability distributions by plotting their ''quantiles'' against each other. A point on the plot co ...
, also known as normal probability plot or rankit plot—is a plot of the sorted values from the data set against the expected values of the corresponding quantiles from the standard normal distribution. That is, it's a plot of point of the form (Φ−1(''pk''), ''x''(''k'')), where plotting points ''pk'' are equal to ''pk'' = (''k'' − ''α'')/(''n'' + 1 − 2''α'') and ''α'' is an adjustment constant, which can be anything between 0 and 1. If the null hypothesis is true, the plotted points should approximately lie on a straight line. * P–P plot – similar to the Q–Q plot, but used much less frequently. This method consists of plotting the points (Φ(''z''(''k'')), ''pk''), where \textstyle z_ = (x_-\hat\mu)/\hat\sigma. For normally distributed data this plot should lie on a 45° line between (0, 0) and (1, 1). Goodness-of-fit tests: ''Moment-based tests'': * D'Agostino's K-squared test * Jarque–Bera test * Shapiro–Wilk test: This is based on the fact that the line in the Q–Q plot has the slope of ''σ''. The test compares the least squares estimate of that slope with the value of the sample variance, and rejects the null hypothesis if these two quantities differ significantly. ''Tests based on the empirical distribution function'': * Anderson–Darling test * Lilliefors test (an adaptation of the Kolmogorov–Smirnov test)


Bayesian analysis of the normal distribution

Bayesian analysis of normally distributed data is complicated by the many different possibilities that may be considered: * Either the mean, or the variance, or neither, may be considered a fixed quantity. * When the variance is unknown, analysis may be done directly in terms of the variance, or in terms of the
precision Precision, precise or precisely may refer to: Science, and technology, and mathematics Mathematics and computing (general) * Accuracy and precision, measurement deviation from true value and its scatter * Significant figures, the number of digit ...
, the reciprocal of the variance. The reason for expressing the formulas in terms of precision is that the analysis of most cases is simplified. * Both univariate and multivariate normal distribution, multivariate cases need to be considered. * Either conjugate prior, conjugate or improper prior, improper prior distributions may be placed on the unknown variables. * An additional set of cases occurs in Bayesian linear regression, where in the basic model the data is assumed to be normally distributed, and normal priors are placed on the regression coefficients. The resulting analysis is similar to the basic cases of independent identically distributed data. The formulas for the non-linear-regression cases are summarized in the conjugate prior article.


Sum of two quadratics


= Scalar form

= The following auxiliary formula is useful for simplifying the posterior distribution, posterior update equations, which otherwise become fairly tedious. :a(x-y)^2 + b(x-z)^2 = (a + b)\left(x - \frac\right)^2 + \frac(y-z)^2 This equation rewrites the sum of two quadratics in ''x'' by expanding the squares, grouping the terms in ''x'', and completing the square. Note the following about the complex constant factors attached to some of the terms: # The factor \frac has the form of a weighted average of ''y'' and ''z''. # \frac = \frac = (a^ + b^)^. This shows that this factor can be thought of as resulting from a situation where the Multiplicative inverse, reciprocals of quantities ''a'' and ''b'' add directly, so to combine ''a'' and ''b'' themselves, it's necessary to reciprocate, add, and reciprocate the result again to get back into the original units. This is exactly the sort of operation performed by the harmonic mean, so it is not surprising that \frac is one-half the harmonic mean of ''a'' and ''b''.


= Vector form

= A similar formula can be written for the sum of two vector quadratics: If x, y, z are vectors of length ''k'', and A and B are symmetric matrix, symmetric, invertible matrices of size k\times k, then : \begin & (\mathbf-\mathbf)'\mathbf(\mathbf-\mathbf) + (\mathbf-\mathbf)' \mathbf(\mathbf-\mathbf) \\ = & (\mathbf - \mathbf)'(\mathbf+\mathbf)(\mathbf - \mathbf) + (\mathbf - \mathbf)'(\mathbf^ + \mathbf^)^(\mathbf - \mathbf) \end where :\mathbf = (\mathbf + \mathbf)^(\mathbf\mathbf + \mathbf \mathbf) Note that the form x′ A x is called a
quadratic form In mathematics, a quadratic form is a polynomial with terms all of degree two ("form" is another name for a homogeneous polynomial). For example, :4x^2 + 2xy - 3y^2 is a quadratic form in the variables and . The coefficients usually belong to a ...
and is a scalar (mathematics), scalar: :\mathbf'\mathbf\mathbf = \sum_a_ x_i x_j In other words, it sums up all possible combinations of products of pairs of elements from x, with a separate coefficient for each. In addition, since x_i x_j = x_j x_i, only the sum a_ + a_ matters for any off-diagonal elements of A, and there is no loss of generality in assuming that A is symmetric matrix, symmetric. Furthermore, if A is symmetric, then the form \mathbf'\mathbf\mathbf = \mathbf'\mathbf\mathbf.


Sum of differences from the mean

Another useful formula is as follows: \sum_^n (x_i-\mu)^2 = \sum_^n (x_i-\bar)^2 + n(\bar -\mu)^2 where \bar = \frac \sum_^n x_i.


With known variance

For a set of i.i.d. normally distributed data points X of size ''n'' where each individual point ''x'' follows x \sim \mathcal(\mu, \sigma^2) with known
variance In probability theory and statistics, variance is the expectation of the squared deviation of a random variable from its population mean or sample mean. Variance is a measure of dispersion, meaning it is a measure of how far a set of numbers ...
σ2, the conjugate prior distribution is also normally distributed. This can be shown more easily by rewriting the variance as the
precision Precision, precise or precisely may refer to: Science, and technology, and mathematics Mathematics and computing (general) * Accuracy and precision, measurement deviation from true value and its scatter * Significant figures, the number of digit ...
, i.e. using τ = 1/σ2. Then if x \sim \mathcal(\mu, 1/\tau) and \mu \sim \mathcal(\mu_0, 1/\tau_0), we proceed as follows. First, the likelihood function is (using the formula above for the sum of differences from the mean): :\begin p(\mathbf\mid\mu,\tau) &= \prod_^n \sqrt \exp\left(-\frac\tau(x_i-\mu)^2\right) \\ &= \left(\frac\right)^ \exp\left(-\frac\tau \sum_^n (x_i-\mu)^2\right) \\ &= \left(\frac\right)^ \exp\left[-\frac\tau \left(\sum_^n(x_i-\bar)^2 + n(\bar -\mu)^2\right)\right]. \end Then, we proceed as follows: :\begin p(\mu\mid\mathbf) &\propto p(\mathbf\mid\mu) p(\mu) \\ & = \left(\frac\right)^ \exp\left[-\frac\tau \left(\sum_^n(x_i-\bar)^2 + n(\bar -\mu)^2\right)\right] \sqrt \exp\left(-\frac\tau_0(\mu-\mu_0)^2\right) \\ &\propto \exp\left(-\frac\left(\tau\left(\sum_^n(x_i-\bar)^2 + n(\bar -\mu)^2\right) + \tau_0(\mu-\mu_0)^2\right)\right) \\ &\propto \exp\left(-\frac \left(n\tau(\bar-\mu)^2 + \tau_0(\mu-\mu_0)^2 \right)\right) \\ &= \exp\left(-\frac(n\tau + \tau_0)\left(\mu - \dfrac\right)^2 + \frac(\bar - \mu_0)^2\right) \\ &\propto \exp\left(-\frac(n\tau + \tau_0)\left(\mu - \dfrac\right)^2\right) \end In the above derivation, we used the formula above for the sum of two quadratics and eliminated all constant factors not involving ''μ''. The result is the kernel (statistics), kernel of a normal distribution, with mean \frac and precision n\tau + \tau_0, i.e. :p(\mu\mid\mathbf) \sim \mathcal\left(\frac, \frac\right) This can be written as a set of Bayesian update equations for the posterior parameters in terms of the prior parameters: :\begin \tau_0' &= \tau_0 + n\tau \\[5pt] \mu_0' &= \frac \\[5pt] \bar &= \frac\sum_^n x_i \end That is, to combine ''n'' data points with total precision of ''nτ'' (or equivalently, total variance of ''n''/''σ''2) and mean of values \bar, derive a new total precision simply by adding the total precision of the data to the prior total precision, and form a new mean through a ''precision-weighted average'', i.e. a weighted average of the data mean and the prior mean, each weighted by the associated total precision. This makes logical sense if the precision is thought of as indicating the certainty of the observations: In the distribution of the posterior mean, each of the input components is weighted by its certainty, and the certainty of this distribution is the sum of the individual certainties. (For the intuition of this, compare the expression "the whole is (or is not) greater than the sum of its parts". In addition, consider that the knowledge of the posterior comes from a combination of the knowledge of the prior and likelihood, so it makes sense that we are more certain of it than of either of its components.) The above formula reveals why it is more convenient to do Bayesian analysis of conjugate priors for the normal distribution in terms of the precision. The posterior precision is simply the sum of the prior and likelihood precisions, and the posterior mean is computed through a precision-weighted average, as described above. The same formulas can be written in terms of variance by reciprocating all the precisions, yielding the more ugly formulas :\begin ' &= \frac \\[5pt] \mu_0' &= \frac \\[5pt] \bar &= \frac\sum_^n x_i \end


With known mean

For a set of i.i.d. normally distributed data points X of size ''n'' where each individual point ''x'' follows x \sim \mathcal(\mu, \sigma^2) with known mean μ, the conjugate prior of the
variance In probability theory and statistics, variance is the expectation of the squared deviation of a random variable from its population mean or sample mean. Variance is a measure of dispersion, meaning it is a measure of how far a set of numbers ...
has an inverse gamma distribution or a scaled inverse chi-squared distribution. The two are equivalent 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. The prior for σ2 is as follows: :p(\sigma^2\mid\nu_0,\sigma_0^2) = \frac~\frac \propto \frac The likelihood function from above, written in terms of the variance, is: :\begin p(\mathbf\mid\mu,\sigma^2) &= \left(\frac\right)^ \exp\left[-\frac \sum_^n (x_i-\mu)^2\right] \\ &= \left(\frac\right)^ \exp\left[-\frac\right] \end where :S = \sum_^n (x_i-\mu)^2. Then: :\begin p(\sigma^2\mid\mathbf) &\propto p(\mathbf\mid\sigma^2) p(\sigma^2) \\ &= \left(\frac\right)^ \exp\left[-\frac\right] \frac~\frac \\ &\propto \left(\frac\right)^ \frac \exp\left[-\frac + \frac\right] \\ &= \frac \exp\left[-\frac\right] \end The above is also a scaled inverse chi-squared distribution where :\begin \nu_0' &= \nu_0 + n \\ \nu_0'' &= \nu_0 \sigma_0^2 + \sum_^n (x_i-\mu)^2 \end or equivalently :\begin \nu_0' &= \nu_0 + n \\ ' &= \frac \end Reparameterizing in terms of an inverse gamma distribution, the result is: :\begin \alpha' &= \alpha + \frac \\ \beta' &= \beta + \frac \end


With unknown mean and unknown variance

For a set of i.i.d. normally distributed data points X of size ''n'' where each individual point ''x'' follows x \sim \mathcal(\mu, \sigma^2) with unknown mean μ and unknown
variance In probability theory and statistics, variance is the expectation of the squared deviation of a random variable from its population mean or sample mean. Variance is a measure of dispersion, meaning it is a measure of how far a set of numbers ...
σ2, a combined (multivariate) conjugate prior is placed over the mean and variance, consisting of a normal-inverse-gamma distribution. Logically, this originates as follows: # From the analysis of the case with unknown mean but known variance, we see that the update equations involve sufficient statistics computed from the data consisting of the mean of the data points and the total variance of the data points, computed in turn from the known variance divided by the number of data points. # From the analysis of the case with unknown variance but known mean, we see that the update equations involve sufficient statistics over the data consisting of the number of data points and sum of squared deviations. # Keep in mind that the posterior update values serve as the prior distribution when further data is handled. Thus, we should logically think of our priors in terms of the sufficient statistics just described, with the same semantics kept in mind as much as possible. # To handle the case where both mean and variance are unknown, we could place independent priors over the mean and variance, with fixed estimates of the average mean, total variance, number of data points used to compute the variance prior, and sum of squared deviations. Note however that in reality, the total variance of the mean depends on the unknown variance, and the sum of squared deviations that goes into the variance prior (appears to) depend on the unknown mean. In practice, the latter dependence is relatively unimportant: Shifting the actual mean shifts the generated points by an equal amount, and on average the squared deviations will remain the same. This is not the case, however, with the total variance of the mean: As the unknown variance increases, the total variance of the mean will increase proportionately, and we would like to capture this dependence. # This suggests that we create a ''conditional prior'' of the mean on the unknown variance, with a hyperparameter specifying the mean of the pseudo-observations associated with the prior, and another parameter specifying the number of pseudo-observations. This number serves as a scaling parameter on the variance, making it possible to control the overall variance of the mean relative to the actual variance parameter. The prior for the variance also has two hyperparameters, one specifying the sum of squared deviations of the pseudo-observations associated with the prior, and another specifying once again the number of pseudo-observations. Note that each of the priors has a hyperparameter specifying the number of pseudo-observations, and in each case this controls the relative variance of that prior. These are given as two separate hyperparameters so that the variance (aka the confidence) of the two priors can be controlled separately. # This leads immediately to the normal-inverse-gamma distribution, which is the product of the two distributions just defined, with conjugate priors used (an inverse gamma distribution over the variance, and a normal distribution over the mean, ''conditional'' on the variance) and with the same four parameters just defined. The priors are normally defined as follows: :\begin p(\mu\mid\sigma^2; \mu_0, n_0) &\sim \mathcal(\mu_0,\sigma^2/n_0) \\ p(\sigma^2; \nu_0,\sigma_0^2) &\sim I\chi^2(\nu_0,\sigma_0^2) = IG(\nu_0/2, \nu_0\sigma_0^2/2) \end The update equations can be derived, and look as follows: :\begin \bar &= \frac 1 n \sum_^n x_i \\ \mu_0' &= \frac \\ n_0' &= n_0 + n \\ \nu_0' &= \nu_0 + n \\ \nu_0'' &= \nu_0 \sigma_0^2 + \sum_^n (x_i-\bar)^2 + \frac(\mu_0 - \bar)^2 \end The respective numbers of pseudo-observations add the number of actual observations to them. The new mean hyperparameter is once again a weighted average, this time weighted by the relative numbers of observations. Finally, the update for \nu_0'' is similar to the case with known mean, but in this case the sum of squared deviations is taken with respect to the observed data mean rather than the true mean, and as a result a new "interaction term" needs to be added to take care of the additional error source stemming from the deviation between prior and data mean.


Occurrence and applications

The occurrence of normal distribution in practical problems can be loosely classified into four categories: # Exactly normal distributions; # Approximately normal laws, for example when such approximation is justified by the
central limit theorem In probability theory, the central limit theorem (CLT) establishes that, in many situations, when independent random variables are summed up, their properly normalized sum tends toward a normal distribution even if the original variables themselv ...
; and # Distributions modeled as normal – the normal distribution being the distribution with Principle of maximum entropy, maximum entropy for a given mean and variance. # Regression problems – the normal distribution being found after systematic effects have been modeled sufficiently well.


Exact normality

Certain quantities in physics are distributed normally, as was first demonstrated by James Clerk Maxwell. Examples of such quantities are: * Probability density function of a ground state in a quantum harmonic oscillator. * The position of a particle that experiences diffusion. If initially the particle is located at a specific point (that is its probability distribution is the Dirac delta function), then after time ''t'' its location is described by a normal distribution with variance ''t'', which satisfies the diffusion equation \frac f(x,t) = \frac \frac f(x,t). If the initial location is given by a certain density function g(x), then the density at time ''t'' is the convolution of ''g'' and the normal PDF.


Approximate normality

''Approximately'' normal distributions occur in many situations, as explained by the
central limit theorem In probability theory, the central limit theorem (CLT) establishes that, in many situations, when independent random variables are summed up, their properly normalized sum tends toward a normal distribution even if the original variables themselv ...
. When the outcome is produced by many small effects acting ''additively and independently'', its distribution will be close to normal. The normal approximation will not be valid if the effects act multiplicatively (instead of additively), or if there is a single external influence that has a considerably larger magnitude than the rest of the effects. * In counting problems, where the central limit theorem includes a discrete-to-continuum approximation and where Infinite divisibility, infinitely divisible and Indecomposable distribution, decomposable distributions are involved, such as ** binomial distribution, Binomial random variables, associated with binary response variables; ** Poisson distribution, Poisson random variables, associated with rare events; * Thermal radiation has a Bose–Einstein statistics, Bose–Einstein distribution on very short time scales, and a normal distribution on longer timescales due to the central limit theorem.


Assumed normality

There are statistical methods to empirically test that assumption; see the above #Normality tests, Normality tests section. * In biology, the ''logarithm'' of various variables tend to have a normal distribution, that is, they tend to have a
log-normal distribution In probability theory, a log-normal (or lognormal) distribution is a continuous probability distribution of a random variable whose logarithm is normally distributed. Thus, if the random variable is log-normally distributed, then has a normal ...
(after separation on male/female subpopulations), with examples including: ** Measures of size of living tissue (length, height, skin area, weight); ** The ''length'' of ''inert'' appendages (hair, claws, nails, teeth) of biological specimens, ''in the direction of growth''; presumably the thickness of tree bark also falls under this category; ** Certain physiological measurements, such as blood pressure of adult humans. * In finance, in particular the Black–Scholes model, changes in the ''logarithm'' of exchange rates, price indices, and stock market indices are assumed normal (these variables behave like compound interest, not like simple interest, and so are multiplicative). Some mathematicians such as Benoit Mandelbrot have argued that Levy skew alpha-stable distribution, log-Levy distributions, which possesses heavy tails would be a more appropriate model, in particular for the analysis for stock market crashes. The use of the assumption of normal distribution occurring in financial models has also been criticized by Nassim Nicholas Taleb in his works. * Propagation of uncertainty, Measurement errors in physical experiments are often modeled by a normal distribution. This use of a normal distribution does not imply that one is assuming the measurement errors are normally distributed, rather using the normal distribution produces the most conservative predictions possible given only knowledge about the mean and variance of the errors. * In Standardized testing (statistics), standardized testing, results can be made to have a normal distribution by either selecting the number and difficulty of questions (as in the Intelligence quotient, IQ test) or transforming the raw test scores into "output" scores by fitting them to the normal distribution. For example, the SAT's traditional range of 200–800 is based on a normal distribution with a mean of 500 and a standard deviation of 100. * Many scores are derived from the normal distribution, including percentile ranks ("percentiles" or "quantiles"), normal curve equivalents, stanines, Standard score, z-scores, and T-scores. Additionally, some behavioral statistical procedures assume that scores are normally distributed; for example, Student's t-test, t-tests and Analysis of variance, ANOVAs. Bell curve grading assigns relative grades based on a normal distribution of scores. * In hydrology the distribution of long duration river discharge or rainfall, e.g. monthly and yearly totals, is often thought to be practically normal according to the
central limit theorem In probability theory, the central limit theorem (CLT) establishes that, in many situations, when independent random variables are summed up, their properly normalized sum tends toward a normal distribution even if the original variables themselv ...
. The blue picture, made with CumFreq, illustrates an example of fitting the normal distribution to ranked October rainfalls showing the 90% confidence belt based on the
binomial distribution In probability theory and statistics, the binomial distribution with parameters ''n'' and ''p'' is the discrete probability distribution of the number of successes in a sequence of ''n'' independent experiments, each asking a yes–no quest ...
. The rainfall data are represented by plotting positions as part of the cumulative frequency analysis.


Methodological problems and peer review

John Ioannidis argues that using normally distributed standard deviations as standards for validating research findings leave falsifiability, falsifiable predictions about phenomena that are not normally distributed untested. This includes, for example, phenomena that only appear when all necessary conditions are present and one cannot be a substitute for another in an addition-like way and phenomena that are not randomly distributed. Ioannidis argues that standard deviation-centered validation gives a false appearance of validity to hypotheses and theories where some but not all falsifiable predictions are normally distributed since the portion of falsifiable predictions that there is evidence against may and in some cases are in the non-normally distributed parts of the range of falsifiable predictions, as well as baselessly dismissing hypotheses for which none of the falsifiable predictions are normally distributed as if were they unfalsifiable when in fact they do make falsifiable predictions. It is argued by Ioannidis that many cases of mutually exclusive theories being accepted as "validated" by research journals are caused by failure of the journals to take in empirical falsifications of non-normally distributed predictions, and not because mutually exclusive theories are true, which they cannot be, although two mutually exclusive theories can both be wrong and a third one correct.


Computational methods


Generating values from normal distribution

In computer simulations, especially in applications of the Monte-Carlo method, it is often desirable to generate values that are normally distributed. The algorithms listed below all generate the standard normal deviates, since a can be generated as , where ''Z'' is standard normal. All these algorithms rely on the availability of a random number generator ''U'' capable of producing Uniform distribution (continuous), uniform random variates. * The most straightforward method is based on the probability integral transform property: if ''U'' is distributed uniformly on (0,1), then Φ−1(''U'') will have the standard normal distribution. The drawback of this method is that it relies on calculation of the
probit function In probability theory and statistics, the probit function is the quantile function associated with the standard normal distribution. It has applications in data analysis and machine learning, in particular exploratory statistical graphics and ...
Φ−1, which cannot be done analytically. Some approximate methods are described in and in the error function, erf article. Wichura gives a fast algorithm for computing this function to 16 decimal places, which is used by R programming language, R to compute random variates of the normal distribution. * Irwin–Hall distribution#Approximating a Normal distribution, An easy-to-program approximate approach that relies on the
central limit theorem In probability theory, the central limit theorem (CLT) establishes that, in many situations, when independent random variables are summed up, their properly normalized sum tends toward a normal distribution even if the original variables themselv ...
is as follows: generate 12 uniform ''U''(0,1) deviates, add them all up, and subtract 6 – the resulting random variable will have approximately standard normal distribution. In truth, the distribution will be Irwin–Hall distribution, Irwin–Hall, which is a 12-section eleventh-order polynomial approximation to the normal distribution. This random deviate will have a limited range of (−6, 6). Note that in a true normal distribution, only 0.00034% of all samples will fall outside ±6σ. * The Box–Muller transform, Box–Muller method uses two independent random numbers ''U'' and ''V'' distributed uniform distribution (continuous), uniformly on (0,1). Then the two random variables ''X'' and ''Y'' X = \sqrt \, \cos(2 \pi V) , \qquad Y = \sqrt \, \sin(2 \pi V) . will both have the standard normal distribution, and will be
independent Independent or Independents may refer to: Arts, entertainment, and media Artist groups * Independents (artist group), a group of modernist painters based in the New Hope, Pennsylvania, area of the United States during the early 1930s * Independ ...
. This formulation arises because for a bivariate normal random vector (''X'', ''Y'') the squared norm will have the
chi-squared distribution In probability theory and statistics, the chi-squared distribution (also chi-square or \chi^2-distribution) with k degrees of freedom is the distribution of a sum of the squares of k independent standard normal random variables. The chi-squa ...
with two degrees of freedom, which is an easily generated exponential distribution, exponential random variable corresponding to the quantity −2ln(''U'') in these equations; and the angle is distributed uniformly around the circle, chosen by the random variable ''V''. * The Marsaglia polar method is a modification of the Box–Muller method which does not require computation of the sine and cosine functions. In this method, ''U'' and ''V'' are drawn from the uniform (−1,1) distribution, and then is computed. If ''S'' is greater or equal to 1, then the method starts over, otherwise the two quantities X = U\sqrt, \qquad Y = V\sqrt are returned. Again, ''X'' and ''Y'' are independent, standard normal random variables. * The Ratio method is a rejection method. The algorithm proceeds as follows: ** Generate two independent uniform deviates ''U'' and ''V''; ** Compute ''X'' = (''V'' − 0.5)/''U''; ** Optional: if ''X''2 ≤ 5 − 4''e''1/4''U'' then accept ''X'' and terminate algorithm; ** Optional: if ''X''2 ≥ 4''e''−1.35/''U'' + 1.4 then reject ''X'' and start over from step 1; ** If ''X''2 ≤ −4 ln''U'' then accept ''X'', otherwise start over the algorithm. *:The two optional steps allow the evaluation of the logarithm in the last step to be avoided in most cases. These steps can be greatly improved so that the logarithm is rarely evaluated. * The ziggurat algorithm is faster than the Box–Muller transform and still exact. In about 97% of all cases it uses only two random numbers, one random integer and one random uniform, one multiplication and an if-test. Only in 3% of the cases, where the combination of those two falls outside the "core of the ziggurat" (a kind of rejection sampling using logarithms), do exponentials and more uniform random numbers have to be employed. * Integer arithmetic can be used to sample from the standard normal distribution. This method is exact in the sense that it satisfies the conditions of ''ideal approximation''; i.e., it is equivalent to sampling a real number from the standard normal distribution and rounding this to the nearest representable floating point number. * There is also some investigation into the connection between the fast Hadamard transform and the normal distribution, since the transform employs just addition and subtraction and by the central limit theorem random numbers from almost any distribution will be transformed into the normal distribution. In this regard a series of Hadamard transforms can be combined with random permutations to turn arbitrary data sets into a normally distributed data.


Numerical approximations for the normal CDF and normal quantile function

The standard normal cumulative distribution function, CDF is widely used in scientific and statistical computing. The values Φ(''x'') may be approximated very accurately by a variety of methods, such as numerical integration, Taylor series, asymptotic series and Gauss's continued fraction#Of Kummer's confluent hypergeometric function, continued fractions. Different approximations are used depending on the desired level of accuracy. * give the approximation for Φ(''x'') for ''x > 0'' with the absolute error (algorith
26.2.17
: \Phi(x) = 1 - \varphi(x)\left(b_1 t + b_2 t^2 + b_3t^3 + b_4 t^4 + b_5 t^5\right) + \varepsilon(x), \qquad t = \frac, where ''ϕ''(''x'') is the standard normal PDF, and ''b''0 = 0.2316419, ''b''1 = 0.319381530, ''b''2 = −0.356563782, ''b''3 = 1.781477937, ''b''4 = −1.821255978, ''b''5 = 1.330274429. * lists some dozens of approximations – by means of rational functions, with or without exponentials – for the function. His algorithms vary in the degree of complexity and the resulting precision, with maximum absolute precision of 24 digits. An algorithm by combines Hart's algorithm 5666 with a continued fraction approximation in the tail to provide a fast computation algorithm with a 16-digit precision. * after recalling Hart68 solution is not suited for erf, gives a solution for both erf and erfc, with maximal relative error bound, via rational function, Rational Chebyshev Approximation. * suggested a simple algorithm based on the Taylor series expansion \Phi(x) = \frac12 + \varphi(x)\left( x + \frac 3 + \frac + \frac + \frac + \cdots \right) for calculating with arbitrary precision. The drawback of this algorithm is comparatively slow calculation time (for example it takes over 300 iterations to calculate the function with 16 digits of precision when ). * The GNU Scientific Library calculates values of the standard normal CDF using Hart's algorithms and approximations with Chebyshev polynomials. Shore (1982) introduced simple approximations that may be incorporated in stochastic optimization models of engineering and operations research, like reliability engineering and inventory analysis. Denoting , the simplest approximation for the quantile function is: z = \Phi^(p)=5.5556\left[1- \left( \frac p \right)^\right],\qquad p\ge 1/2 This approximation delivers for ''z'' a maximum absolute error of 0.026 (for , corresponding to ). For replace ''p'' by and change sign. Another approximation, somewhat less accurate, is the single-parameter approximation: z=-0.4115\left\, \qquad p\ge 1/2 The latter had served to derive a simple approximation for the loss integral of the normal distribution, defined by \begin L(z) & =\int_z^\infty (u-z)\varphi(u) \, du=\int_z^\infty [1-\Phi (u)] \, du \\[5pt] L(z) & \approx \begin 0.4115\left(\dfrac p \right) - z, & p<1/2, \\ \\ 0.4115\left( \dfrac p \right), & p\ge 1/2. \end \\[5pt] \text \\ L(z) & \approx \begin 0.4115\left\, & p < 1/2, \\ \\ 0.4115 \dfrac p, & p\ge 1/2. \end \end This approximation is particularly accurate for the right far-tail (maximum error of 10−3 for z≥1.4). Highly accurate approximations for the CDF, based on Response modeling methodology, Response Modeling Methodology (RMM, Shore, 2011, 2012), are shown in Shore (2005). Some more approximations can be found at: Error function#Approximation with elementary functions. In particular, small ''relative'' error on the whole domain for the CDF \Phi and the quantile function \Phi^ as well, is achieved via an explicitly invertible formula by Sergei Winitzki in 2008.


History


Development

Some authors attribute the credit for the discovery of the normal distribution to Abraham de Moivre, de Moivre, who in 1738 published in the second edition of his "''The Doctrine of Chances''" the study of the coefficients in the binomial expansion of . De Moivre proved that the middle term in this expansion has the approximate magnitude of 2^n/\sqrt, and that "If ''m'' or ''n'' be a Quantity infinitely great, then the Logarithm of the Ratio, which a Term distant from the middle by the Interval ''ℓ'', has to the middle Term, is -\frac." Although this theorem can be interpreted as the first obscure expression for the normal probability law, Stephen Stigler, Stigler points out that de Moivre himself did not interpret his results as anything more than the approximate rule for the binomial coefficients, and in particular de Moivre lacked the concept of the probability density function. In 1823 Carl Friedrich Gauss, Gauss published his monograph "''Theoria combinationis observationum erroribus minimis obnoxiae''" where among other things he introduces several important statistical concepts, such as the method of least squares, the method of maximum likelihood, and the ''normal distribution''. Gauss used ''M'', , to denote the measurements of some unknown quantity ''V'', and sought the "most probable" estimator of that quantity: the one that maximizes the probability of obtaining the observed experimental results. In his notation φΔ is the probability density function of the measurement errors of magnitude Δ. Not knowing what the function ''φ'' is, Gauss requires that his method should reduce to the well-known answer: the arithmetic mean of the measured values. Starting from these principles, Gauss demonstrates that the only law that rationalizes the choice of arithmetic mean as an estimator of the location parameter, is the normal law of errors: \varphi\mathit = \frac h \, e^, where ''h'' is "the measure of the precision of the observations". Using this normal law as a generic model for errors in the experiments, Gauss formulates what is now known as the non-linear least squares, non-linear weighted least squares method. Although Gauss was the first to suggest the normal distribution law, Pierre Simon de Laplace, Laplace made significant contributions. It was Laplace who first posed the problem of aggregating several observations in 1774, although his own solution led to the Laplacian distribution. It was Laplace who first calculated the value of the Gaussian integral, integral in 1782, providing the normalization constant for the normal distribution. Finally, it was Laplace who in 1810 proved and presented to the Academy the fundamental
central limit theorem In probability theory, the central limit theorem (CLT) establishes that, in many situations, when independent random variables are summed up, their properly normalized sum tends toward a normal distribution even if the original variables themselv ...
, which emphasized the theoretical importance of the normal distribution. It is of interest to note that in 1809 an Irish-American mathematician Robert Adrain published two insightful but flawed derivations of the normal probability law, simultaneously and independently from Gauss. His works remained largely unnoticed by the scientific community, until in 1871 they were exhumed by Cleveland Abbe, Abbe. In the middle of the 19th century James Clerk Maxwell, Maxwell demonstrated that the normal distribution is not just a convenient mathematical tool, but may also occur in natural phenomena: "The number of particles whose velocity, resolved in a certain direction, lies between ''x'' and ''x'' + ''dx'' is \operatorname \frac\; e^ \, dx


Naming

Today, the concept is usually known in English as the normal distribution or Gaussian distribution. Other less common names include Gauss distribution, Laplace-Gauss distribution, the law of error, the law of facility of errors, Laplace's second law, Gaussian law. Gauss himself apparently coined the term with reference to the "normal equations" involved in its applications, with normal having its technical meaning of orthogonal rather than "usual". However, by the end of the 19th century some authors had started using the name ''normal distribution'', where the word "normal" was used as an adjective – the term now being seen as a reflection of the fact that this distribution was seen as typical, common – and thus "normal". Charles Sanders Peirce, Peirce (one of those authors) once defined "normal" thus: "...the 'normal' is not the average (or any other kind of mean) of what actually occurs, but of what ''would'', in the long run, occur under certain circumstances." Around the turn of the 20th century Karl Pearson, Pearson popularized the term ''normal'' as a designation for this distribution. Also, it was Pearson who first wrote the distribution in terms of the standard deviation ''σ'' as in modern notation. Soon after this, in year 1915, Ronald Fisher, Fisher added the location parameter to the formula for normal distribution, expressing it in the way it is written nowadays: df = \frac e^ \, dx. The term "standard normal", which denotes the normal distribution with zero mean and unit variance came into general use around the 1950s, appearing in the popular textbooks by P. G. Hoel (1947) "''Introduction to mathematical statistics''" and A. M. Mood (1950) "''Introduction to the theory of statistics''".


See also

* Bates distribution – similar to the Irwin–Hall distribution, but rescaled back into the 0 to 1 range * Behrens–Fisher problem – the long-standing problem of testing whether two normal samples with different variances have same means; * Bhattacharyya distance – method used to separate mixtures of normal distributions * Erdős–Kac theorem – on the occurrence of the normal distribution in number theory * Full width at half maximum * Gaussian blur – convolution, which uses the normal distribution as a kernel * Modified half-normal distribution with the pdf on (0, \infty) is given as f(x)= \frac, where \Psi(\alpha,z)=_1\Psi_1\left(\begin\left(\alpha,\frac\right)\\(1,0)\end;z \right) denotes the Fox-Wright Psi function. * Normally distributed and uncorrelated does not imply independent * Ratio normal distribution * Reciprocal normal distribution * Standard normal table * Stein's lemma * Sub-Gaussian distribution * Sum of normally distributed random variables * Tweedie distribution – The normal distribution is a member of the family of Tweedie exponential dispersion models. * Wrapped normal distribution – the Normal distribution applied to a circular domain * Z-test – using the normal distribution


Notes


References


Citations


Sources

* * In particular, the entries fo
"bell-shaped and bell curve"
an

* * * * * * * * * * * * * * * * * * * * * * * * Translated by Stephen M. Stigler in ''Statistical Science'' 1 (3), 1986: . * * * * * * * * * * * * * * * * * * * * * * * * * * * *


External links

*
Normal distribution calculator
{{Authority control Normal distribution, Continuous distributions Conjugate prior distributions Exponential family distributions Stable distributions Location-scale family probability distributions]">X, ^p \right&= \sigma^p \cdot 2^ \frac _1F_1\left( -\frac, \frac, -\frac \left( \frac \mu \sigma \right)^2 \right). \end These expressions remain valid even if p is not an integer. See also Hermite polynomials#"Negative variance", generalized Hermite polynomials. The expectation of X conditioned on the event that X lies in an interval ,b/math> is given by :\operatorname\left \mid a= \mu - \sigma^2\frac where f and F respectively are the density and the cumulative distribution function of X. For b=\infty this is known as the
inverse Mills ratio In probability theory, the Mills ratio (or Mills's ratio) of a continuous random variable X is the function : m(x) := \frac , where f(x) is the probability density function, and :\bar(x) := \Pr x.html" ;"title=">x">>x= \int_x^ f(u)\, du is the ...
. Note that above, density f of X is used instead of standard normal density as in inverse Mills ratio, so here we have \sigma^2 instead of \sigma.


Fourier transform and characteristic function

The
Fourier transform A Fourier transform (FT) is a mathematical transform that decomposes functions into frequency components, which are represented by the output of the transform as a function of frequency. Most commonly functions of time or space are transformed, ...
of a normal density f with mean \mu and standard deviation \sigma is : \hat f(t) = \int_^\infty f(x)e^ \, dx = e^ e^ where i is the
imaginary unit The imaginary unit or unit imaginary number () is a solution to the quadratic equation x^2+1=0. Although there is no real number with this property, can be used to extend the real numbers to what are called complex numbers, using addition an ...
. If the mean \mu=0, the first factor is 1, and the Fourier transform is, apart from a constant factor, a normal density on the
frequency domain In physics, electronics, control systems engineering, and statistics, the frequency domain refers to the analysis of mathematical functions or signals with respect to frequency, rather than time. Put simply, a time-domain graph shows how a signa ...
, with mean 0 and standard deviation 1/\sigma. In particular, the standard normal distribution \varphi is an
eigenfunction In mathematics, an eigenfunction of a linear operator ''D'' defined on some function space is any non-zero function f in that space that, when acted upon by ''D'', is only multiplied by some scaling factor called an eigenvalue. As an equation, th ...
of the Fourier transform. In probability theory, the Fourier transform of the probability distribution of a real-valued random variable X is closely connected to the
characteristic function In mathematics, the term "characteristic function" can refer to any of several distinct concepts: * The indicator function of a subset, that is the function ::\mathbf_A\colon X \to \, :which for a given subset ''A'' of ''X'', has value 1 at points ...
\varphi_X(t) of that variable, which is defined as the
expected value In probability theory, the expected value (also called expectation, expectancy, mathematical expectation, mean, average, or first moment) is a generalization of the weighted average. Informally, the expected value is the arithmetic mean of a l ...
of e^, as a function of the real variable t (the
frequency Frequency is the number of occurrences of a repeating event per unit of time. It is also occasionally referred to as ''temporal frequency'' for clarity, and is distinct from ''angular frequency''. Frequency is measured in hertz (Hz) which is eq ...
parameter of the Fourier transform). This definition can be analytically extended to a complex-value variable t. The relation between both is: :\varphi_X(t) = \hat f(-t)


Moment and cumulant generating functions

The
moment generating function In probability theory and statistics, the moment-generating function of a real-valued random variable is an alternative specification of its probability distribution. Thus, it provides the basis of an alternative route to analytical results compare ...
of a real random variable X is the expected value of e^, as a function of the real parameter t. For a normal distribution with density f, mean \mu and deviation \sigma, the moment generating function exists and is equal to :M(t) = \operatorname ^= \hat f(it) = e^ e^ The
cumulant generating function In probability theory and statistics, the cumulants of a probability distribution are a set of quantities that provide an alternative to the '' moments'' of the distribution. Any two probability distributions whose moments are identical will have ...
is the logarithm of the moment generating function, namely :g(t) = \ln M(t) = \mu t + \tfrac 12 \sigma^2 t^2 Since this is a quadratic polynomial in t, only the first two
cumulant In probability theory and statistics, the cumulants of a probability distribution are a set of quantities that provide an alternative to the '' moments'' of the distribution. Any two probability distributions whose moments are identical will ha ...
s are nonzero, namely the mean \mu and the variance \sigma^2.


Stein operator and class

Within
Stein's method Stein's method is a general method in probability theory to obtain bounds on the distance between two probability distributions with respect to a probability metric. It was introduced by Charles Stein, who first published it in 1972, to obtain ...
the Stein operator and class of a random variable X \sim \mathcal(\mu, \sigma^2) are \mathcalf(x) = \sigma^2 f'(x) - (x-\mu)f(x) and \mathcal the class of all absolutely continuous functions f : \R \to \R \mbox\mathbb[, f'(X), ]< \infty.


Zero-variance limit

In the limit (mathematics), limit when \sigma tends to zero, the probability density f(x) eventually tends to zero at any x\ne \mu, but grows without limit if x = \mu, while its integral remains equal to 1. Therefore, the normal distribution cannot be defined as an ordinary
function Function or functionality may refer to: Computing * Function key, a type of key on computer keyboards * Function model, a structured representation of processes in a system * Function object or functor or functionoid, a concept of object-oriente ...
when \sigma = 0. However, one can define the normal distribution with zero variance as a
generalized function In mathematics, generalized functions are objects extending the notion of functions. There is more than one recognized theory, for example the theory of distributions. Generalized functions are especially useful in making discontinuous functions ...
; specifically, as Dirac's "delta function" \delta translated by the mean \mu, that is f(x)=\delta(x-\mu). Its CDF is then the
Heaviside step function The Heaviside step function, or the unit step function, usually denoted by or (but sometimes , or ), is a step function, named after Oliver Heaviside (1850–1925), the value of which is zero for negative arguments and one for positive argume ...
translated by the mean \mu, namely :F(x) = \begin 0 & \textx < \mu \\ 1 & \textx \geq \mu \end


Maximum entropy

Of all probability distributions over the reals with a specified mean \mu and variance \sigma^2, the normal distribution N(\mu,\sigma^2) is the one with maximum entropy. If X is a
continuous random variable In probability theory and statistics, a probability distribution is the mathematical function that gives the probabilities of occurrence of different possible outcomes for an experiment. It is a mathematical description of a random phenomenon i ...
with
probability density In probability theory, a probability density function (PDF), or density of a continuous random variable, is a function whose value at any given sample (or point) in the sample space (the set of possible values taken by the random variable) can ...
f(x), then the entropy of X is defined as : H(X) = - \int_^\infty f(x)\log f(x)\, dx where f(x)\log f(x) is understood to be zero whenever f(x)=0. This functional can be maximized, subject to the constraints that the distribution is properly normalized and has a specified variance, by using
variational calculus The calculus of variations (or Variational Calculus) is a field of mathematical analysis that uses variations, which are small changes in functions and functionals, to find maxima and minima of functionals: mappings from a set of functions t ...
. A function with two
Lagrange multipliers In mathematical optimization, the method of Lagrange multipliers is a strategy for finding the local maxima and minima of a function subject to equality constraints (i.e., subject to the condition that one or more equations have to be satisfied ex ...
is defined: : L=\int_^\infty f(x)\ln(f(x))\,dx-\lambda_0\left(1-\int_^\infty f(x)\,dx\right)-\lambda\left(\sigma^2-\int_^\infty f(x)(x-\mu)^2\,dx\right) where f(x) is, for now, regarded as some density function with mean \mu and standard deviation \sigma. At maximum entropy, a small variation \delta f(x) about f(x) will produce a variation \delta L about L which is equal to 0: : 0=\delta L=\int_^\infty \delta f(x)\left (\ln(f(x))+1+\lambda_0+\lambda(x-\mu)^2\right )\,dx Since this must hold for any small \delta f(x), the term in brackets must be zero, and solving for f(x) yields: :f(x)=e^ Using the constraint equations to solve for \lambda_0 and \lambda yields the density of the normal distribution: : f(x, \mu, \sigma)=\frace^ The entropy of a normal distribution is equal to : H(X)=\tfrac(1+\log(2\sigma^2\pi))


Other properties


Related distributions


Central limit theorem

The central limit theorem states that under certain (fairly common) conditions, the sum of many random variables will have an approximately normal distribution. More specifically, where X_1,\ldots ,X_n are
independent and identically distributed In probability theory and statistics, a collection of random variables is independent and identically distributed if each random variable has the same probability distribution as the others and all are mutually independent. This property is usua ...
random variables with the same arbitrary distribution, zero mean, and variance \sigma^2 and Z is their mean scaled by \sqrt : Z = \sqrt\left(\frac\sum_^n X_i\right) Then, as n increases, the probability distribution of Z will tend to the normal distribution with zero mean and variance \sigma^2. The theorem can be extended to variables (X_i) that are not independent and/or not identically distributed if certain constraints are placed on the degree of dependence and the moments of the distributions. Many
test statistic A test statistic is a statistic (a quantity derived from the sample) used in statistical hypothesis testing.Berger, R. L.; Casella, G. (2001). ''Statistical Inference'', Duxbury Press, Second Edition (p.374) A hypothesis test is typically specif ...
s, scores, and
estimator In statistics, an estimator is a rule for calculating an estimate of a given quantity based on observed data: thus the rule (the estimator), the quantity of interest (the estimand) and its result (the estimate) are distinguished. For example, the ...
s encountered in practice contain sums of certain random variables in 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 distributions. The central limit theorem also implies that certain distributions can be approximated by the normal distribution, for example: * The
binomial distribution In probability theory and statistics, the binomial distribution with parameters ''n'' and ''p'' is the discrete probability distribution of the number of successes in a sequence of ''n'' independent experiments, each asking a yes–no quest ...
B(n,p) is approximately normal with mean np and variance np(1-p) for large n and for p not too close to 0 or 1. * The
Poisson distribution In probability theory and statistics, the Poisson distribution is a discrete probability distribution that expresses the probability of a given number of events occurring in a fixed interval of time or space if these events occur with a known co ...
with parameter \lambda is approximately normal with mean \lambda and variance \lambda, for large values of \lambda. * The
chi-squared distribution In probability theory and statistics, the chi-squared distribution (also chi-square or \chi^2-distribution) with k degrees of freedom is the distribution of a sum of the squares of k independent standard normal random variables. The chi-squa ...
\chi^2(k) is approximately normal with mean k and variance 2k, for large k. * The
Student's t-distribution In probability and statistics, Student's ''t''-distribution (or simply the ''t''-distribution) is any member of a family of continuous probability distributions that arise when estimating the mean of a normally distributed population in sit ...
t(\nu) is approximately normal with mean 0 and variance 1 when \nu is large. Whether these approximations are sufficiently accurate depends on the purpose for which they are needed, and the rate of convergence to the normal distribution. It is typically the case that such approximations are less accurate in the tails of the distribution. A general upper bound for the approximation error in the central limit theorem is given by the
Berry–Esseen theorem In probability theory, the central limit theorem states that, under certain circumstances, the probability distribution of the scaled mean of a random sample converges to a normal distribution as the sample size increases to infinity. Under strong ...
, improvements of the approximation are given by the
Edgeworth expansion The Gram–Charlier A series (named in honor of Jørgen Pedersen Gram and Carl Charlier), and the Edgeworth series (named in honor of Francis Ysidro Edgeworth) are series that approximate a probability distribution in terms of its cumulants. The se ...
s. This theorem can also be used to justify modeling the sum of many uniform noise sources as
Gaussian noise Gaussian noise, named after Carl Friedrich Gauss, is a term from signal processing theory denoting a kind of signal noise that has a probability density function (pdf) equal to that of the normal distribution (which is also known as the Gaussia ...
. See
AWGN Additive white Gaussian noise (AWGN) is a basic noise model used in information theory to mimic the effect of many random processes that occur in nature. The modifiers denote specific characteristics: * ''Additive'' because it is added to any nois ...
.


Operations and functions of normal variables

The
probability density In probability theory, a probability density function (PDF), or density of a continuous random variable, is a function whose value at any given sample (or point) in the sample space (the set of possible values taken by the random variable) can ...
,
cumulative distribution In statistics, the frequency (or absolute frequency) of an event i is the number n_i of times the observation has occurred/recorded in an experiment or study. These frequencies are often depicted graphically or in tabular form. Types The cumul ...
, and inverse cumulative distribution of any function of one or more independent or correlated normal variables can be computed with the numerical method of ray-tracing
Matlab code
. In the following sections we look at some special cases.


Operations on a single normal variable

If X is distributed normally with mean \mu and variance \sigma^2, then * aX+b, for any real numbers a and b, is also normally distributed, with mean a\mu+b and standard deviation , a, \sigma. That is, the family of normal distributions is closed under linear transformations. * The exponential of X is distributed log-normally: . * The absolute value of X has
folded normal distribution The folded normal distribution is a probability distribution related to the normal distribution. Given a normally distributed random variable ''X'' with mean ''μ'' and variance ''σ''2, the random variable ''Y'' = , ''X'', has a folded normal d ...
: . If \mu = 0 this is known as the
half-normal distribution In probability theory and statistics, the half-normal distribution is a special case of the folded normal distribution. Let X follow an ordinary normal distribution, N(0,\sigma^2). Then, Y=, X, follows a half-normal distribution. Thus, the hal ...
. * The absolute value of normalized residuals, , ''X'' − ''μ'', /''σ'', has
chi distribution In probability theory and statistics, the chi distribution is a continuous probability distribution. It is the distribution of the positive square root of the sum of squares of a set of independent random variables each following a standard norm ...
with one degree of freedom: , X - \mu, / \sigma \sim \chi_1. * The square of ''X''/''σ'' has the
noncentral chi-squared distribution In probability theory and statistics, the noncentral chi-squared distribution (or noncentral chi-square distribution, noncentral \chi^2 distribution) is a noncentral generalization of the chi-squared distribution. It often arises in the power a ...
with one degree of freedom: X^2 / \sigma^2 \sim \chi_1^2(\mu^2 / \sigma^2). If \mu = 0, the distribution is called simply chi-squared. * The log likelihood of a normal variable x is simply the log of its
probability density function In probability theory, a probability density function (PDF), or density of a continuous random variable, is a function whose value at any given sample (or point) in the sample space (the set of possible values taken by the random variable) can ...
: \ln p(x)= -\frac \left(\frac \right)^2 -\ln \left(\sigma \sqrt \right) = -\frac z^2 -\ln \left(\sigma \sqrt \right). Since this is a scaled and shifted square of a standard normal variable, it is distributed as a scaled and shifted chi-squared variable. * The distribution of the variable ''X'' restricted to an interval 'a'', ''b''is called the
truncated normal distribution In probability and statistics, the truncated normal distribution is the probability distribution derived from that of a normally distributed random variable by bounding the random variable from either below or above (or both). The truncated no ...
. * (''X'' − ''μ'')−2 has a
Lévy distribution In probability theory and statistics, the Lévy distribution, named after Paul Lévy, is a continuous probability distribution for a non-negative random variable. In spectroscopy, this distribution, with frequency as the dependent variable, is kn ...
with location 0 and scale ''σ''−2.


= Operations on two independent normal variables

= * If X_1 and X_2 are two
independent Independent or Independents may refer to: Arts, entertainment, and media Artist groups * Independents (artist group), a group of modernist painters based in the New Hope, Pennsylvania, area of the United States during the early 1930s * Independ ...
normal random variables, with means \mu_1, \mu_2 and standard deviations \sigma_1, \sigma_2, then their sum X_1 + X_2 will also be normally distributed, roof/sup> with mean \mu_1 + \mu_2 and variance \sigma_1^2 + \sigma_2^2. * In particular, if X and Y are independent normal deviates with zero mean and variance \sigma^2, then X + Y and X - Y are also independent and normally distributed, with zero mean and variance 2\sigma^2. This is a special case of the
polarization identity In linear algebra, a branch of mathematics, the polarization identity is any one of a family of formulas that express the inner product of two vectors in terms of the norm of a normed vector space. If a norm arises from an inner product then t ...
. * If X_1, X_2 are two independent normal deviates with mean \mu and deviation \sigma, and a, b are arbitrary real numbers, then the variable X_3 = \frac + \mu is also normally distributed with mean \mu and deviation \sigma. It follows that the normal distribution is
stable A stable is a building in which livestock, especially horses, are kept. It most commonly means a building that is divided into separate stalls for individual animals and livestock. There are many different types of stables in use today; the ...
(with exponent \alpha=2).


= Operations on two independent standard normal variables

= If X_1 and X_2 are two independent standard normal random variables with mean 0 and variance 1, then * Their sum and difference is distributed normally with mean zero and variance two: X_1 \pm X_2 \sim N(0, 2). * Their product Z = X_1 X_2 follows the
product distribution A product distribution is a probability distribution constructed as the distribution of the product of random variables having two other known distributions. Given two statistically independent random variables ''X'' and ''Y'', the distribution of ...
with density function f_Z(z) = \pi^ K_0(, z, ) where K_0 is the
modified Bessel function of the second kind Bessel functions, first defined by the mathematician Daniel Bernoulli and then generalized by Friedrich Bessel, are canonical solutions of Bessel's differential equation x^2 \frac + x \frac + \left(x^2 - \alpha^2 \right)y = 0 for an arbitrary ...
. This distribution is symmetric around zero, unbounded at z = 0, and has the
characteristic function In mathematics, the term "characteristic function" can refer to any of several distinct concepts: * The indicator function of a subset, that is the function ::\mathbf_A\colon X \to \, :which for a given subset ''A'' of ''X'', has value 1 at points ...
\phi_Z(t) = (1 + t^2)^. * Their ratio follows the standard
Cauchy distribution The Cauchy distribution, named after Augustin Cauchy, is a continuous probability distribution. It is also known, especially among physicists, as the Lorentz distribution (after Hendrik Lorentz), Cauchy–Lorentz distribution, Lorentz(ian) fun ...
: X_1/ X_2 \sim \operatorname(0, 1). * Their Euclidean norm \sqrt has the
Rayleigh distribution In probability theory and statistics, the Rayleigh distribution is a continuous probability distribution for nonnegative-valued random variables. Up to rescaling, it coincides with the chi distribution with two degrees of freedom. The distribut ...
.


Operations on multiple independent normal variables

* Any linear combination of independent normal deviates is a normal deviate. * If X_1, X_2, \ldots, X_n are independent standard normal random variables, then the sum of their squares has the
chi-squared distribution In probability theory and statistics, the chi-squared distribution (also chi-square or \chi^2-distribution) with k degrees of freedom is the distribution of a sum of the squares of k independent standard normal random variables. The chi-squa ...
with n degrees of freedom X_1^2 + \cdots + X_n^2 \sim \chi_n^2. * If X_1, X_2, \ldots, X_n are independent normally distributed random variables with means \mu and variances \sigma^2, then their
sample mean The sample mean (or "empirical mean") and the sample covariance are statistics computed from a Sample (statistics), sample of data on one or more random variables. The sample mean is the average value (or mean, mean value) of a sample (statistic ...
is independent from the sample
standard deviation In statistics, the standard deviation is a measure of the amount of variation or dispersion of a set of values. A low standard deviation indicates that the values tend to be close to the mean (also called the expected value) of the set, while ...
, which can be demonstrated using Basu's theorem or
Cochran's theorem In statistics, Cochran's theorem, devised by William G. Cochran, is a theorem used to justify results relating to the probability distributions of statistics that are used in the analysis of variance. Statement Let ''U''1, ..., ''U'N'' be i.i. ...
. The ratio of these two quantities will have the
Student's t-distribution In probability and statistics, Student's ''t''-distribution (or simply the ''t''-distribution) is any member of a family of continuous probability distributions that arise when estimating the mean of a normally distributed population in sit ...
with n-1 degrees of freedom: t = \frac = \frac \sim t_. * If X_1, X_2, \ldots, X_n, Y_1, Y_2, \ldots, Y_m are independent standard normal random variables, then the ratio of their normalized sums of squares will have the with degrees of freedom: F = \frac \sim F_.


Operations on multiple correlated normal variables

* A
quadratic form In mathematics, a quadratic form is a polynomial with terms all of degree two ("form" is another name for a homogeneous polynomial). For example, :4x^2 + 2xy - 3y^2 is a quadratic form in the variables and . The coefficients usually belong to a ...
of a normal vector, i.e. a quadratic function q = \sum x_i^2 + \sum x_j + c of multiple independent or correlated normal variables, is a generalized chi-square variable.


Operations on the density function

The split normal distribution is most directly defined in terms of joining scaled sections of the density functions of different normal distributions and rescaling the density to integrate to one. The
truncated normal distribution In probability and statistics, the truncated normal distribution is the probability distribution derived from that of a normally distributed random variable by bounding the random variable from either below or above (or both). The truncated no ...
results from rescaling a section of a single density function.


Infinite divisibility and Cramér's theorem

For any positive integer \text, any normal distribution with mean \mu and variance \sigma^2 is the distribution of the sum of \text independent normal deviates, each with mean \frac and variance \frac. This property is called
infinite divisibility Infinite divisibility arises in different ways in philosophy, physics, economics, order theory (a branch of mathematics), and probability theory (also a branch of mathematics). One may speak of infinite divisibility, or the lack thereof, of matter ...
. Conversely, if X_1 and X_2 are independent random variables and their sum X_1+X_2 has a normal distribution, then both X_1 and X_2 must be normal deviates. This result is known as Cramér's decomposition theorem, and is equivalent to saying that the convolution of two distributions is normal if and only if both are normal. Cramér's theorem implies that a linear combination of independent non-Gaussian variables will never have an exactly normal distribution, although it may approach it arbitrarily closely.


Bernstein's theorem

Bernstein's theorem states that if X and Y are independent and X + Y and X - Y are also independent, then both ''X'' and ''Y'' must necessarily have normal distributions. More generally, if X_1, \ldots, X_n are independent random variables, then two distinct linear combinations \sum and \sumwill be independent if and only if all X_k are normal and \sum, where \sigma_k^2 denotes the variance of X_k.


Extensions

The notion of normal distribution, being one of the most important distributions in probability theory, has been extended far beyond the standard framework of the univariate (that is one-dimensional) case (Case 1). All these extensions are also called ''normal'' or ''Gaussian'' laws, so a certain ambiguity in names exists. * The
multivariate normal distribution In probability theory and statistics, the multivariate normal distribution, multivariate Gaussian distribution, or joint normal distribution is a generalization of the one-dimensional (univariate) normal distribution to higher dimensions. One d ...
describes the Gaussian law in the ''k''-dimensional Euclidean space. A vector is multivariate-normally distributed if any linear combination of its components has a (univariate) normal distribution. The variance of ''X'' is a ''k×k'' symmetric positive-definite matrix ''V''. The multivariate normal distribution is a special case of the
elliptical distribution In probability and statistics, an elliptical distribution is any member of a broad family of probability distributions that generalize the multivariate normal distribution. Intuitively, in the simplified two and three dimensional case, the joint di ...
s. As such, its iso-density loci in the ''k'' = 2 case are ellipses and in the case of arbitrary ''k'' are ellipsoids. * Rectified Gaussian distribution a rectified version of normal distribution with all the negative elements reset to 0 * Complex normal distribution deals with the complex normal vectors. A complex vector is said to be normal if both its real and imaginary components jointly possess a 2''k''-dimensional multivariate normal distribution. The variance-covariance structure of ''X'' is described by two matrices: the ''variance'' matrix Γ, and the ''relation'' matrix ''C''. * Matrix normal distribution describes the case of normally distributed matrices. * Gaussian processes are the normally distributed stochastic processes. These can be viewed as elements of some infinite-dimensional Hilbert space ''H'', and thus are the analogues of multivariate normal vectors for the case . A random element is said to be normal if for any constant the scalar product has a (univariate) normal distribution. The variance structure of such Gaussian random element can be described in terms of the linear ''covariance ''. Several Gaussian processes became popular enough to have their own names: ** Wiener process, Brownian motion, ** Brownian bridge, ** Ornstein–Uhlenbeck process. * Gaussian q-distribution is an abstract mathematical construction that represents a "q-analogue" of the normal distribution. * the q-Gaussian is an analogue of the Gaussian distribution, in the sense that it maximises the Tsallis entropy, and is one type of Tsallis distribution. Note that this distribution is different from the Gaussian q-distribution above. * The Kaniadakis Gaussian distribution, Kaniadakis ''κ''-Gaussian distribution is a generalization of the Gaussian distribution which arises from the Kaniadakis statistics, being one of the Kaniadakis distribution, Kaniadakis distributions. A random variable ''X'' has a two-piece normal distribution if it has a distribution : f_X( x ) = N( \mu, \sigma_1^2 ) \text x \le \mu : f_X( x ) = N( \mu, \sigma_2^2 ) \text x \ge \mu where ''μ'' is the mean and ''σ''1 and ''σ''2 are the standard deviations of the distribution to the left and right of the mean respectively. The mean, variance and third central moment of this distribution have been determined : \operatorname( X ) = \mu + \sqrt ( \sigma_2 - \sigma_1 ) : \operatorname( X ) = \left( 1 - \frac 2 \pi\right)( \sigma_2 - \sigma_1 )^2 + \sigma_1 \sigma_2 : \operatorname( X ) = \sqrt( \sigma_2 - \sigma_1 ) \left[ \left( \frac 4 \pi - 1 \right) ( \sigma_2 - \sigma_1)^2 + \sigma_1 \sigma_2 \right] where E(''X''), V(''X'') and T(''X'') are the mean, variance, and third central moment respectively. One of the main practical uses of the Gaussian law is to model the empirical distributions of many different random variables encountered in practice. In such case a possible extension would be a richer family of distributions, having more than two parameters and therefore being able to fit the empirical distribution more accurately. The examples of such extensions are: * Pearson distribution — a four-parameter family of probability distributions that extend the normal law to include different skewness and kurtosis values. * The generalized normal distribution, also known as the exponential power distribution, allows for distribution tails with thicker or thinner asymptotic behaviors.


Statistical inference


Estimation of parameters

It is often the case that we do not know the parameters of the normal distribution, but instead want to Estimation theory, estimate them. That is, having a sample (x_1, \ldots, x_n) from a normal N(\mu, \sigma^2) population we would like to learn the approximate values of parameters \mu and \sigma^2. The standard approach to this problem is the maximum likelihood method, which requires maximization of the ''log-likelihood function'': : \ln\mathcal(\mu,\sigma^2) = \sum_^n \ln f(x_i\mid\mu,\sigma^2) = -\frac\ln(2\pi) - \frac\ln\sigma^2 - \frac\sum_^n (x_i-\mu)^2. Taking derivatives with respect to \mu and \sigma^2 and solving the resulting system of first order conditions yields the ''maximum likelihood estimates'': : \hat = \overline \equiv \frac\sum_^n x_i, \qquad \hat^2 = \frac \sum_^n (x_i - \overline)^2.


Sample mean

Estimator \textstyle\hat\mu is called the ''
sample mean The sample mean (or "empirical mean") and the sample covariance are statistics computed from a Sample (statistics), sample of data on one or more random variables. The sample mean is the average value (or mean, mean value) of a sample (statistic ...
'', since it is the arithmetic mean of all observations. The statistic \textstyle\overline is complete statistic, complete and sufficient statistic, sufficient for \mu, and therefore by the Lehmann–Scheffé theorem, \textstyle\hat\mu is the uniformly minimum variance unbiased (UMVU) estimator. In finite samples it is distributed normally: : \hat\mu \sim \mathcal(\mu,\sigma^2/n). The variance of this estimator is equal to the ''μμ''-element of the inverse Fisher information matrix \textstyle\mathcal^. This implies that the estimator is efficient estimator, finite-sample efficient. Of practical importance is the fact that the standard error (statistics), standard error of \textstyle\hat\mu is proportional to \textstyle1/\sqrt, that is, if one wishes to decrease the standard error by a factor of 10, one must increase the number of points in the sample by a factor of 100. This fact is widely used in determining sample sizes for opinion polls and the number of trials in Monte Carlo simulations. From the standpoint of the asymptotic theory (statistics), asymptotic theory, \textstyle\hat\mu is consistent estimator, consistent, that is, it convergence in probability, converges in probability to \mu as n\rightarrow\infty. The estimator is also asymptotic normality, asymptotically normal, which is a simple corollary of the fact that it is normal in finite samples: : \sqrt(\hat\mu-\mu) \,\xrightarrow\, \mathcal(0,\sigma^2).


Sample variance

The estimator \textstyle\hat\sigma^2 is called the ''sample variance'', since it is the variance of the sample ((x_1, \ldots, x_n)). In practice, another estimator is often used instead of the \textstyle\hat\sigma^2. This other estimator is denoted s^2, and is also called the ''sample variance'', which represents a certain ambiguity in terminology; its square root s is called the ''sample standard deviation''. The estimator s^2 differs from \textstyle\hat\sigma^2 by having instead of ''n'' in the denominator (the so-called Bessel's correction): : s^2 = \frac \hat\sigma^2 = \frac \sum_^n (x_i - \overline)^2. The difference between s^2 and \textstyle\hat\sigma^2 becomes negligibly small for large ''n''s. In finite samples however, the motivation behind the use of s^2 is that it is an unbiased estimator of the underlying parameter \sigma^2, whereas \textstyle\hat\sigma^2 is biased. Also, by the Lehmann–Scheffé theorem the estimator s^2 is uniformly minimum variance unbiased (Minimum-variance unbiased estimator, UMVU), which makes it the "best" estimator among all unbiased ones. However it can be shown that the biased estimator \textstyle\hat\sigma^2 is "better" than the s^2 in terms of the mean squared error (MSE) criterion. In finite samples both s^2 and \textstyle\hat\sigma^2 have scaled
chi-squared distribution In probability theory and statistics, the chi-squared distribution (also chi-square or \chi^2-distribution) with k degrees of freedom is the distribution of a sum of the squares of k independent standard normal random variables. The chi-squa ...
with degrees of freedom: : s^2 \sim \frac \cdot \chi^2_, \qquad \hat\sigma^2 \sim \frac \cdot \chi^2_. The first of these expressions shows that the variance of s^2 is equal to 2\sigma^4/(n-1), which is slightly greater than the ''σσ''-element of the inverse Fisher information matrix \textstyle\mathcal^. Thus, s^2 is not an efficient estimator for \sigma^2, and moreover, since s^2 is UMVU, we can conclude that the finite-sample efficient estimator for \sigma^2 does not exist. Applying the asymptotic theory, both estimators s^2 and \textstyle\hat\sigma^2 are consistent, that is they converge in probability to \sigma^2 as the sample size n\rightarrow\infty. The two estimators are also both asymptotically normal: : \sqrt(\hat\sigma^2 - \sigma^2) \simeq \sqrt(s^2-\sigma^2) \,\xrightarrow\, \mathcal(0,2\sigma^4). In particular, both estimators are asymptotically efficient for \sigma^2.


Confidence intervals

By
Cochran's theorem In statistics, Cochran's theorem, devised by William G. Cochran, is a theorem used to justify results relating to the probability distributions of statistics that are used in the analysis of variance. Statement Let ''U''1, ..., ''U'N'' be i.i. ...
, for normal distributions the sample mean \textstyle\hat\mu and the sample variance ''s''2 are
independent Independent or Independents may refer to: Arts, entertainment, and media Artist groups * Independents (artist group), a group of modernist painters based in the New Hope, Pennsylvania, area of the United States during the early 1930s * Independ ...
, which means there can be no gain in considering their joint distribution. There is also a converse theorem: if in a sample the sample mean and sample variance are independent, then the sample must have come from the normal distribution. The independence between \textstyle\hat\mu and ''s'' can be employed to construct the so-called ''t-statistic'': : t = \frac = \frac \sim t_ This quantity ''t'' has the
Student's t-distribution In probability and statistics, Student's ''t''-distribution (or simply the ''t''-distribution) is any member of a family of continuous probability distributions that arise when estimating the mean of a normally distributed population in sit ...
with degrees of freedom, and it is an ancillary statistic (independent of the value of the parameters). Inverting the distribution of this ''t''-statistics will allow us to construct the
confidence interval In frequentist statistics, a confidence interval (CI) is a range of estimates for an unknown parameter. A confidence interval is computed at a designated ''confidence level''; the 95% confidence level is most common, but other levels, such as 9 ...
for ''μ''; similarly, inverting the ''χ''2 distribution of the statistic ''s''2 will give us the confidence interval for ''σ''2: :\mu \in \left[ \hat\mu - t_ \fracs, \hat\mu + t_ \fracs \right], :\sigma^2 \in \left[ \frac, \frac \right], where ''tk,p'' and are the ''p''th
quantile In statistics and probability, quantiles are cut points dividing the range of a probability distribution into continuous intervals with equal probabilities, or dividing the observations in a sample in the same way. There is one fewer quantile tha ...
s of the ''t''- and ''χ''2-distributions respectively. These confidence intervals are of the ''confidence level'' , meaning that the true values ''μ'' and ''σ''2 fall outside of these intervals with probability (or significance level) ''α''. In practice people usually take , resulting in the 95% confidence intervals. Approximate formulas can be derived from the asymptotic distributions of \textstyle\hat\mu and ''s''2: :\mu \in \left[ \hat\mu - , z_, \fracs, \hat\mu + , z_, \fracs \right], :\sigma^2 \in \left[ s^2 - , z_, \fracs^2, s^2 + , z_, \fracs^2 \right], The approximate formulas become valid for large values of ''n'', and are more convenient for the manual calculation since the standard normal quantiles ''z''''α''/2 do not depend on ''n''. In particular, the most popular value of , results in .


Normality tests

Normality tests assess the likelihood that the given data set comes from a normal distribution. Typically the null hypothesis ''H''0 is that the observations are distributed normally with unspecified mean ''μ'' and variance ''σ''2, versus the alternative ''Ha'' that the distribution is arbitrary. Many tests (over 40) have been devised for this problem. The more prominent of them are outlined below: Diagnostic plots are more intuitively appealing but subjective at the same time, as they rely on informal human judgement to accept or reject the null hypothesis. *
Q–Q plot In statistics, a Q–Q plot (quantile-quantile plot) is a probability plot, a List of graphical methods, graphical method for comparing two probability distributions by plotting their ''quantiles'' against each other. A point on the plot co ...
, also known as normal probability plot or rankit plot—is a plot of the sorted values from the data set against the expected values of the corresponding quantiles from the standard normal distribution. That is, it's a plot of point of the form (Φ−1(''pk''), ''x''(''k'')), where plotting points ''pk'' are equal to ''pk'' = (''k'' − ''α'')/(''n'' + 1 − 2''α'') and ''α'' is an adjustment constant, which can be anything between 0 and 1. If the null hypothesis is true, the plotted points should approximately lie on a straight line. * P–P plot – similar to the Q–Q plot, but used much less frequently. This method consists of plotting the points (Φ(''z''(''k'')), ''pk''), where \textstyle z_ = (x_-\hat\mu)/\hat\sigma. For normally distributed data this plot should lie on a 45° line between (0, 0) and (1, 1). Goodness-of-fit tests: ''Moment-based tests'': * D'Agostino's K-squared test * Jarque–Bera test * Shapiro–Wilk test: This is based on the fact that the line in the Q–Q plot has the slope of ''σ''. The test compares the least squares estimate of that slope with the value of the sample variance, and rejects the null hypothesis if these two quantities differ significantly. ''Tests based on the empirical distribution function'': * Anderson–Darling test * Lilliefors test (an adaptation of the Kolmogorov–Smirnov test)


Bayesian analysis of the normal distribution

Bayesian analysis of normally distributed data is complicated by the many different possibilities that may be considered: * Either the mean, or the variance, or neither, may be considered a fixed quantity. * When the variance is unknown, analysis may be done directly in terms of the variance, or in terms of the
precision Precision, precise or precisely may refer to: Science, and technology, and mathematics Mathematics and computing (general) * Accuracy and precision, measurement deviation from true value and its scatter * Significant figures, the number of digit ...
, the reciprocal of the variance. The reason for expressing the formulas in terms of precision is that the analysis of most cases is simplified. * Both univariate and multivariate normal distribution, multivariate cases need to be considered. * Either conjugate prior, conjugate or improper prior, improper prior distributions may be placed on the unknown variables. * An additional set of cases occurs in Bayesian linear regression, where in the basic model the data is assumed to be normally distributed, and normal priors are placed on the regression coefficients. The resulting analysis is similar to the basic cases of independent identically distributed data. The formulas for the non-linear-regression cases are summarized in the conjugate prior article.


Sum of two quadratics


= Scalar form

= The following auxiliary formula is useful for simplifying the posterior distribution, posterior update equations, which otherwise become fairly tedious. :a(x-y)^2 + b(x-z)^2 = (a + b)\left(x - \frac\right)^2 + \frac(y-z)^2 This equation rewrites the sum of two quadratics in ''x'' by expanding the squares, grouping the terms in ''x'', and completing the square. Note the following about the complex constant factors attached to some of the terms: # The factor \frac has the form of a weighted average of ''y'' and ''z''. # \frac = \frac = (a^ + b^)^. This shows that this factor can be thought of as resulting from a situation where the Multiplicative inverse, reciprocals of quantities ''a'' and ''b'' add directly, so to combine ''a'' and ''b'' themselves, it's necessary to reciprocate, add, and reciprocate the result again to get back into the original units. This is exactly the sort of operation performed by the harmonic mean, so it is not surprising that \frac is one-half the harmonic mean of ''a'' and ''b''.


= Vector form

= A similar formula can be written for the sum of two vector quadratics: If x, y, z are vectors of length ''k'', and A and B are symmetric matrix, symmetric, invertible matrices of size k\times k, then : \begin & (\mathbf-\mathbf)'\mathbf(\mathbf-\mathbf) + (\mathbf-\mathbf)' \mathbf(\mathbf-\mathbf) \\ = & (\mathbf - \mathbf)'(\mathbf+\mathbf)(\mathbf - \mathbf) + (\mathbf - \mathbf)'(\mathbf^ + \mathbf^)^(\mathbf - \mathbf) \end where :\mathbf = (\mathbf + \mathbf)^(\mathbf\mathbf + \mathbf \mathbf) Note that the form x′ A x is called a
quadratic form In mathematics, a quadratic form is a polynomial with terms all of degree two ("form" is another name for a homogeneous polynomial). For example, :4x^2 + 2xy - 3y^2 is a quadratic form in the variables and . The coefficients usually belong to a ...
and is a scalar (mathematics), scalar: :\mathbf'\mathbf\mathbf = \sum_a_ x_i x_j In other words, it sums up all possible combinations of products of pairs of elements from x, with a separate coefficient for each. In addition, since x_i x_j = x_j x_i, only the sum a_ + a_ matters for any off-diagonal elements of A, and there is no loss of generality in assuming that A is symmetric matrix, symmetric. Furthermore, if A is symmetric, then the form \mathbf'\mathbf\mathbf = \mathbf'\mathbf\mathbf.


Sum of differences from the mean

Another useful formula is as follows: \sum_^n (x_i-\mu)^2 = \sum_^n (x_i-\bar)^2 + n(\bar -\mu)^2 where \bar = \frac \sum_^n x_i.


With known variance

For a set of i.i.d. normally distributed data points X of size ''n'' where each individual point ''x'' follows x \sim \mathcal(\mu, \sigma^2) with known
variance In probability theory and statistics, variance is the expectation of the squared deviation of a random variable from its population mean or sample mean. Variance is a measure of dispersion, meaning it is a measure of how far a set of numbers ...
σ2, the conjugate prior distribution is also normally distributed. This can be shown more easily by rewriting the variance as the
precision Precision, precise or precisely may refer to: Science, and technology, and mathematics Mathematics and computing (general) * Accuracy and precision, measurement deviation from true value and its scatter * Significant figures, the number of digit ...
, i.e. using τ = 1/σ2. Then if x \sim \mathcal(\mu, 1/\tau) and \mu \sim \mathcal(\mu_0, 1/\tau_0), we proceed as follows. First, the likelihood function is (using the formula above for the sum of differences from the mean): :\begin p(\mathbf\mid\mu,\tau) &= \prod_^n \sqrt \exp\left(-\frac\tau(x_i-\mu)^2\right) \\ &= \left(\frac\right)^ \exp\left(-\frac\tau \sum_^n (x_i-\mu)^2\right) \\ &= \left(\frac\right)^ \exp\left[-\frac\tau \left(\sum_^n(x_i-\bar)^2 + n(\bar -\mu)^2\right)\right]. \end Then, we proceed as follows: :\begin p(\mu\mid\mathbf) &\propto p(\mathbf\mid\mu) p(\mu) \\ & = \left(\frac\right)^ \exp\left[-\frac\tau \left(\sum_^n(x_i-\bar)^2 + n(\bar -\mu)^2\right)\right] \sqrt \exp\left(-\frac\tau_0(\mu-\mu_0)^2\right) \\ &\propto \exp\left(-\frac\left(\tau\left(\sum_^n(x_i-\bar)^2 + n(\bar -\mu)^2\right) + \tau_0(\mu-\mu_0)^2\right)\right) \\ &\propto \exp\left(-\frac \left(n\tau(\bar-\mu)^2 + \tau_0(\mu-\mu_0)^2 \right)\right) \\ &= \exp\left(-\frac(n\tau + \tau_0)\left(\mu - \dfrac\right)^2 + \frac(\bar - \mu_0)^2\right) \\ &\propto \exp\left(-\frac(n\tau + \tau_0)\left(\mu - \dfrac\right)^2\right) \end In the above derivation, we used the formula above for the sum of two quadratics and eliminated all constant factors not involving ''μ''. The result is the kernel (statistics), kernel of a normal distribution, with mean \frac and precision n\tau + \tau_0, i.e. :p(\mu\mid\mathbf) \sim \mathcal\left(\frac, \frac\right) This can be written as a set of Bayesian update equations for the posterior parameters in terms of the prior parameters: :\begin \tau_0' &= \tau_0 + n\tau \\[5pt] \mu_0' &= \frac \\[5pt] \bar &= \frac\sum_^n x_i \end That is, to combine ''n'' data points with total precision of ''nτ'' (or equivalently, total variance of ''n''/''σ''2) and mean of values \bar, derive a new total precision simply by adding the total precision of the data to the prior total precision, and form a new mean through a ''precision-weighted average'', i.e. a weighted average of the data mean and the prior mean, each weighted by the associated total precision. This makes logical sense if the precision is thought of as indicating the certainty of the observations: In the distribution of the posterior mean, each of the input components is weighted by its certainty, and the certainty of this distribution is the sum of the individual certainties. (For the intuition of this, compare the expression "the whole is (or is not) greater than the sum of its parts". In addition, consider that the knowledge of the posterior comes from a combination of the knowledge of the prior and likelihood, so it makes sense that we are more certain of it than of either of its components.) The above formula reveals why it is more convenient to do Bayesian analysis of conjugate priors for the normal distribution in terms of the precision. The posterior precision is simply the sum of the prior and likelihood precisions, and the posterior mean is computed through a precision-weighted average, as described above. The same formulas can be written in terms of variance by reciprocating all the precisions, yielding the more ugly formulas :\begin ' &= \frac \\[5pt] \mu_0' &= \frac \\[5pt] \bar &= \frac\sum_^n x_i \end


With known mean

For a set of i.i.d. normally distributed data points X of size ''n'' where each individual point ''x'' follows x \sim \mathcal(\mu, \sigma^2) with known mean μ, the conjugate prior of the
variance In probability theory and statistics, variance is the expectation of the squared deviation of a random variable from its population mean or sample mean. Variance is a measure of dispersion, meaning it is a measure of how far a set of numbers ...
has an inverse gamma distribution or a scaled inverse chi-squared distribution. The two are equivalent 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. The prior for σ2 is as follows: :p(\sigma^2\mid\nu_0,\sigma_0^2) = \frac~\frac \propto \frac The likelihood function from above, written in terms of the variance, is: :\begin p(\mathbf\mid\mu,\sigma^2) &= \left(\frac\right)^ \exp\left[-\frac \sum_^n (x_i-\mu)^2\right] \\ &= \left(\frac\right)^ \exp\left[-\frac\right] \end where :S = \sum_^n (x_i-\mu)^2. Then: :\begin p(\sigma^2\mid\mathbf) &\propto p(\mathbf\mid\sigma^2) p(\sigma^2) \\ &= \left(\frac\right)^ \exp\left[-\frac\right] \frac~\frac \\ &\propto \left(\frac\right)^ \frac \exp\left[-\frac + \frac\right] \\ &= \frac \exp\left[-\frac\right] \end The above is also a scaled inverse chi-squared distribution where :\begin \nu_0' &= \nu_0 + n \\ \nu_0'' &= \nu_0 \sigma_0^2 + \sum_^n (x_i-\mu)^2 \end or equivalently :\begin \nu_0' &= \nu_0 + n \\ ' &= \frac \end Reparameterizing in terms of an inverse gamma distribution, the result is: :\begin \alpha' &= \alpha + \frac \\ \beta' &= \beta + \frac \end


With unknown mean and unknown variance

For a set of i.i.d. normally distributed data points X of size ''n'' where each individual point ''x'' follows x \sim \mathcal(\mu, \sigma^2) with unknown mean μ and unknown
variance In probability theory and statistics, variance is the expectation of the squared deviation of a random variable from its population mean or sample mean. Variance is a measure of dispersion, meaning it is a measure of how far a set of numbers ...
σ2, a combined (multivariate) conjugate prior is placed over the mean and variance, consisting of a normal-inverse-gamma distribution. Logically, this originates as follows: # From the analysis of the case with unknown mean but known variance, we see that the update equations involve sufficient statistics computed from the data consisting of the mean of the data points and the total variance of the data points, computed in turn from the known variance divided by the number of data points. # From the analysis of the case with unknown variance but known mean, we see that the update equations involve sufficient statistics over the data consisting of the number of data points and sum of squared deviations. # Keep in mind that the posterior update values serve as the prior distribution when further data is handled. Thus, we should logically think of our priors in terms of the sufficient statistics just described, with the same semantics kept in mind as much as possible. # To handle the case where both mean and variance are unknown, we could place independent priors over the mean and variance, with fixed estimates of the average mean, total variance, number of data points used to compute the variance prior, and sum of squared deviations. Note however that in reality, the total variance of the mean depends on the unknown variance, and the sum of squared deviations that goes into the variance prior (appears to) depend on the unknown mean. In practice, the latter dependence is relatively unimportant: Shifting the actual mean shifts the generated points by an equal amount, and on average the squared deviations will remain the same. This is not the case, however, with the total variance of the mean: As the unknown variance increases, the total variance of the mean will increase proportionately, and we would like to capture this dependence. # This suggests that we create a ''conditional prior'' of the mean on the unknown variance, with a hyperparameter specifying the mean of the pseudo-observations associated with the prior, and another parameter specifying the number of pseudo-observations. This number serves as a scaling parameter on the variance, making it possible to control the overall variance of the mean relative to the actual variance parameter. The prior for the variance also has two hyperparameters, one specifying the sum of squared deviations of the pseudo-observations associated with the prior, and another specifying once again the number of pseudo-observations. Note that each of the priors has a hyperparameter specifying the number of pseudo-observations, and in each case this controls the relative variance of that prior. These are given as two separate hyperparameters so that the variance (aka the confidence) of the two priors can be controlled separately. # This leads immediately to the normal-inverse-gamma distribution, which is the product of the two distributions just defined, with conjugate priors used (an inverse gamma distribution over the variance, and a normal distribution over the mean, ''conditional'' on the variance) and with the same four parameters just defined. The priors are normally defined as follows: :\begin p(\mu\mid\sigma^2; \mu_0, n_0) &\sim \mathcal(\mu_0,\sigma^2/n_0) \\ p(\sigma^2; \nu_0,\sigma_0^2) &\sim I\chi^2(\nu_0,\sigma_0^2) = IG(\nu_0/2, \nu_0\sigma_0^2/2) \end The update equations can be derived, and look as follows: :\begin \bar &= \frac 1 n \sum_^n x_i \\ \mu_0' &= \frac \\ n_0' &= n_0 + n \\ \nu_0' &= \nu_0 + n \\ \nu_0'' &= \nu_0 \sigma_0^2 + \sum_^n (x_i-\bar)^2 + \frac(\mu_0 - \bar)^2 \end The respective numbers of pseudo-observations add the number of actual observations to them. The new mean hyperparameter is once again a weighted average, this time weighted by the relative numbers of observations. Finally, the update for \nu_0'' is similar to the case with known mean, but in this case the sum of squared deviations is taken with respect to the observed data mean rather than the true mean, and as a result a new "interaction term" needs to be added to take care of the additional error source stemming from the deviation between prior and data mean.


Occurrence and applications

The occurrence of normal distribution in practical problems can be loosely classified into four categories: # Exactly normal distributions; # Approximately normal laws, for example when such approximation is justified by the
central limit theorem In probability theory, the central limit theorem (CLT) establishes that, in many situations, when independent random variables are summed up, their properly normalized sum tends toward a normal distribution even if the original variables themselv ...
; and # Distributions modeled as normal – the normal distribution being the distribution with Principle of maximum entropy, maximum entropy for a given mean and variance. # Regression problems – the normal distribution being found after systematic effects have been modeled sufficiently well.


Exact normality

Certain quantities in physics are distributed normally, as was first demonstrated by James Clerk Maxwell. Examples of such quantities are: * Probability density function of a ground state in a quantum harmonic oscillator. * The position of a particle that experiences diffusion. If initially the particle is located at a specific point (that is its probability distribution is the Dirac delta function), then after time ''t'' its location is described by a normal distribution with variance ''t'', which satisfies the diffusion equation \frac f(x,t) = \frac \frac f(x,t). If the initial location is given by a certain density function g(x), then the density at time ''t'' is the convolution of ''g'' and the normal PDF.


Approximate normality

''Approximately'' normal distributions occur in many situations, as explained by the
central limit theorem In probability theory, the central limit theorem (CLT) establishes that, in many situations, when independent random variables are summed up, their properly normalized sum tends toward a normal distribution even if the original variables themselv ...
. When the outcome is produced by many small effects acting ''additively and independently'', its distribution will be close to normal. The normal approximation will not be valid if the effects act multiplicatively (instead of additively), or if there is a single external influence that has a considerably larger magnitude than the rest of the effects. * In counting problems, where the central limit theorem includes a discrete-to-continuum approximation and where Infinite divisibility, infinitely divisible and Indecomposable distribution, decomposable distributions are involved, such as ** binomial distribution, Binomial random variables, associated with binary response variables; ** Poisson distribution, Poisson random variables, associated with rare events; * Thermal radiation has a Bose–Einstein statistics, Bose–Einstein distribution on very short time scales, and a normal distribution on longer timescales due to the central limit theorem.


Assumed normality

There are statistical methods to empirically test that assumption; see the above #Normality tests, Normality tests section. * In biology, the ''logarithm'' of various variables tend to have a normal distribution, that is, they tend to have a
log-normal distribution In probability theory, a log-normal (or lognormal) distribution is a continuous probability distribution of a random variable whose logarithm is normally distributed. Thus, if the random variable is log-normally distributed, then has a normal ...
(after separation on male/female subpopulations), with examples including: ** Measures of size of living tissue (length, height, skin area, weight); ** The ''length'' of ''inert'' appendages (hair, claws, nails, teeth) of biological specimens, ''in the direction of growth''; presumably the thickness of tree bark also falls under this category; ** Certain physiological measurements, such as blood pressure of adult humans. * In finance, in particular the Black–Scholes model, changes in the ''logarithm'' of exchange rates, price indices, and stock market indices are assumed normal (these variables behave like compound interest, not like simple interest, and so are multiplicative). Some mathematicians such as Benoit Mandelbrot have argued that Levy skew alpha-stable distribution, log-Levy distributions, which possesses heavy tails would be a more appropriate model, in particular for the analysis for stock market crashes. The use of the assumption of normal distribution occurring in financial models has also been criticized by Nassim Nicholas Taleb in his works. * Propagation of uncertainty, Measurement errors in physical experiments are often modeled by a normal distribution. This use of a normal distribution does not imply that one is assuming the measurement errors are normally distributed, rather using the normal distribution produces the most conservative predictions possible given only knowledge about the mean and variance of the errors. * In Standardized testing (statistics), standardized testing, results can be made to have a normal distribution by either selecting the number and difficulty of questions (as in the Intelligence quotient, IQ test) or transforming the raw test scores into "output" scores by fitting them to the normal distribution. For example, the SAT's traditional range of 200–800 is based on a normal distribution with a mean of 500 and a standard deviation of 100. * Many scores are derived from the normal distribution, including percentile ranks ("percentiles" or "quantiles"), normal curve equivalents, stanines, Standard score, z-scores, and T-scores. Additionally, some behavioral statistical procedures assume that scores are normally distributed; for example, Student's t-test, t-tests and Analysis of variance, ANOVAs. Bell curve grading assigns relative grades based on a normal distribution of scores. * In hydrology the distribution of long duration river discharge or rainfall, e.g. monthly and yearly totals, is often thought to be practically normal according to the
central limit theorem In probability theory, the central limit theorem (CLT) establishes that, in many situations, when independent random variables are summed up, their properly normalized sum tends toward a normal distribution even if the original variables themselv ...
. The blue picture, made with CumFreq, illustrates an example of fitting the normal distribution to ranked October rainfalls showing the 90% confidence belt based on the
binomial distribution In probability theory and statistics, the binomial distribution with parameters ''n'' and ''p'' is the discrete probability distribution of the number of successes in a sequence of ''n'' independent experiments, each asking a yes–no quest ...
. The rainfall data are represented by plotting positions as part of the cumulative frequency analysis.


Methodological problems and peer review

John Ioannidis argues that using normally distributed standard deviations as standards for validating research findings leave falsifiability, falsifiable predictions about phenomena that are not normally distributed untested. This includes, for example, phenomena that only appear when all necessary conditions are present and one cannot be a substitute for another in an addition-like way and phenomena that are not randomly distributed. Ioannidis argues that standard deviation-centered validation gives a false appearance of validity to hypotheses and theories where some but not all falsifiable predictions are normally distributed since the portion of falsifiable predictions that there is evidence against may and in some cases are in the non-normally distributed parts of the range of falsifiable predictions, as well as baselessly dismissing hypotheses for which none of the falsifiable predictions are normally distributed as if were they unfalsifiable when in fact they do make falsifiable predictions. It is argued by Ioannidis that many cases of mutually exclusive theories being accepted as "validated" by research journals are caused by failure of the journals to take in empirical falsifications of non-normally distributed predictions, and not because mutually exclusive theories are true, which they cannot be, although two mutually exclusive theories can both be wrong and a third one correct.


Computational methods


Generating values from normal distribution

In computer simulations, especially in applications of the Monte-Carlo method, it is often desirable to generate values that are normally distributed. The algorithms listed below all generate the standard normal deviates, since a can be generated as , where ''Z'' is standard normal. All these algorithms rely on the availability of a random number generator ''U'' capable of producing Uniform distribution (continuous), uniform random variates. * The most straightforward method is based on the probability integral transform property: if ''U'' is distributed uniformly on (0,1), then Φ−1(''U'') will have the standard normal distribution. The drawback of this method is that it relies on calculation of the
probit function In probability theory and statistics, the probit function is the quantile function associated with the standard normal distribution. It has applications in data analysis and machine learning, in particular exploratory statistical graphics and ...
Φ−1, which cannot be done analytically. Some approximate methods are described in and in the error function, erf article. Wichura gives a fast algorithm for computing this function to 16 decimal places, which is used by R programming language, R to compute random variates of the normal distribution. * Irwin–Hall distribution#Approximating a Normal distribution, An easy-to-program approximate approach that relies on the
central limit theorem In probability theory, the central limit theorem (CLT) establishes that, in many situations, when independent random variables are summed up, their properly normalized sum tends toward a normal distribution even if the original variables themselv ...
is as follows: generate 12 uniform ''U''(0,1) deviates, add them all up, and subtract 6 – the resulting random variable will have approximately standard normal distribution. In truth, the distribution will be Irwin–Hall distribution, Irwin–Hall, which is a 12-section eleventh-order polynomial approximation to the normal distribution. This random deviate will have a limited range of (−6, 6). Note that in a true normal distribution, only 0.00034% of all samples will fall outside ±6σ. * The Box–Muller transform, Box–Muller method uses two independent random numbers ''U'' and ''V'' distributed uniform distribution (continuous), uniformly on (0,1). Then the two random variables ''X'' and ''Y'' X = \sqrt \, \cos(2 \pi V) , \qquad Y = \sqrt \, \sin(2 \pi V) . will both have the standard normal distribution, and will be
independent Independent or Independents may refer to: Arts, entertainment, and media Artist groups * Independents (artist group), a group of modernist painters based in the New Hope, Pennsylvania, area of the United States during the early 1930s * Independ ...
. This formulation arises because for a bivariate normal random vector (''X'', ''Y'') the squared norm will have the
chi-squared distribution In probability theory and statistics, the chi-squared distribution (also chi-square or \chi^2-distribution) with k degrees of freedom is the distribution of a sum of the squares of k independent standard normal random variables. The chi-squa ...
with two degrees of freedom, which is an easily generated exponential distribution, exponential random variable corresponding to the quantity −2ln(''U'') in these equations; and the angle is distributed uniformly around the circle, chosen by the random variable ''V''. * The Marsaglia polar method is a modification of the Box–Muller method which does not require computation of the sine and cosine functions. In this method, ''U'' and ''V'' are drawn from the uniform (−1,1) distribution, and then is computed. If ''S'' is greater or equal to 1, then the method starts over, otherwise the two quantities X = U\sqrt, \qquad Y = V\sqrt are returned. Again, ''X'' and ''Y'' are independent, standard normal random variables. * The Ratio method is a rejection method. The algorithm proceeds as follows: ** Generate two independent uniform deviates ''U'' and ''V''; ** Compute ''X'' = (''V'' − 0.5)/''U''; ** Optional: if ''X''2 ≤ 5 − 4''e''1/4''U'' then accept ''X'' and terminate algorithm; ** Optional: if ''X''2 ≥ 4''e''−1.35/''U'' + 1.4 then reject ''X'' and start over from step 1; ** If ''X''2 ≤ −4 ln''U'' then accept ''X'', otherwise start over the algorithm. *:The two optional steps allow the evaluation of the logarithm in the last step to be avoided in most cases. These steps can be greatly improved so that the logarithm is rarely evaluated. * The ziggurat algorithm is faster than the Box–Muller transform and still exact. In about 97% of all cases it uses only two random numbers, one random integer and one random uniform, one multiplication and an if-test. Only in 3% of the cases, where the combination of those two falls outside the "core of the ziggurat" (a kind of rejection sampling using logarithms), do exponentials and more uniform random numbers have to be employed. * Integer arithmetic can be used to sample from the standard normal distribution. This method is exact in the sense that it satisfies the conditions of ''ideal approximation''; i.e., it is equivalent to sampling a real number from the standard normal distribution and rounding this to the nearest representable floating point number. * There is also some investigation into the connection between the fast Hadamard transform and the normal distribution, since the transform employs just addition and subtraction and by the central limit theorem random numbers from almost any distribution will be transformed into the normal distribution. In this regard a series of Hadamard transforms can be combined with random permutations to turn arbitrary data sets into a normally distributed data.


Numerical approximations for the normal CDF and normal quantile function

The standard normal cumulative distribution function, CDF is widely used in scientific and statistical computing. The values Φ(''x'') may be approximated very accurately by a variety of methods, such as numerical integration, Taylor series, asymptotic series and Gauss's continued fraction#Of Kummer's confluent hypergeometric function, continued fractions. Different approximations are used depending on the desired level of accuracy. * give the approximation for Φ(''x'') for ''x > 0'' with the absolute error (algorith
26.2.17
: \Phi(x) = 1 - \varphi(x)\left(b_1 t + b_2 t^2 + b_3t^3 + b_4 t^4 + b_5 t^5\right) + \varepsilon(x), \qquad t = \frac, where ''ϕ''(''x'') is the standard normal PDF, and ''b''0 = 0.2316419, ''b''1 = 0.319381530, ''b''2 = −0.356563782, ''b''3 = 1.781477937, ''b''4 = −1.821255978, ''b''5 = 1.330274429. * lists some dozens of approximations – by means of rational functions, with or without exponentials – for the function. His algorithms vary in the degree of complexity and the resulting precision, with maximum absolute precision of 24 digits. An algorithm by combines Hart's algorithm 5666 with a continued fraction approximation in the tail to provide a fast computation algorithm with a 16-digit precision. * after recalling Hart68 solution is not suited for erf, gives a solution for both erf and erfc, with maximal relative error bound, via rational function, Rational Chebyshev Approximation. * suggested a simple algorithm based on the Taylor series expansion \Phi(x) = \frac12 + \varphi(x)\left( x + \frac 3 + \frac + \frac + \frac + \cdots \right) for calculating with arbitrary precision. The drawback of this algorithm is comparatively slow calculation time (for example it takes over 300 iterations to calculate the function with 16 digits of precision when ). * The GNU Scientific Library calculates values of the standard normal CDF using Hart's algorithms and approximations with Chebyshev polynomials. Shore (1982) introduced simple approximations that may be incorporated in stochastic optimization models of engineering and operations research, like reliability engineering and inventory analysis. Denoting , the simplest approximation for the quantile function is: z = \Phi^(p)=5.5556\left[1- \left( \frac p \right)^\right],\qquad p\ge 1/2 This approximation delivers for ''z'' a maximum absolute error of 0.026 (for , corresponding to ). For replace ''p'' by and change sign. Another approximation, somewhat less accurate, is the single-parameter approximation: z=-0.4115\left\, \qquad p\ge 1/2 The latter had served to derive a simple approximation for the loss integral of the normal distribution, defined by \begin L(z) & =\int_z^\infty (u-z)\varphi(u) \, du=\int_z^\infty [1-\Phi (u)] \, du \\[5pt] L(z) & \approx \begin 0.4115\left(\dfrac p \right) - z, & p<1/2, \\ \\ 0.4115\left( \dfrac p \right), & p\ge 1/2. \end \\[5pt] \text \\ L(z) & \approx \begin 0.4115\left\, & p < 1/2, \\ \\ 0.4115 \dfrac p, & p\ge 1/2. \end \end This approximation is particularly accurate for the right far-tail (maximum error of 10−3 for z≥1.4). Highly accurate approximations for the CDF, based on Response modeling methodology, Response Modeling Methodology (RMM, Shore, 2011, 2012), are shown in Shore (2005). Some more approximations can be found at: Error function#Approximation with elementary functions. In particular, small ''relative'' error on the whole domain for the CDF \Phi and the quantile function \Phi^ as well, is achieved via an explicitly invertible formula by Sergei Winitzki in 2008.


History


Development

Some authors attribute the credit for the discovery of the normal distribution to Abraham de Moivre, de Moivre, who in 1738 published in the second edition of his "''The Doctrine of Chances''" the study of the coefficients in the binomial expansion of . De Moivre proved that the middle term in this expansion has the approximate magnitude of 2^n/\sqrt, and that "If ''m'' or ''n'' be a Quantity infinitely great, then the Logarithm of the Ratio, which a Term distant from the middle by the Interval ''ℓ'', has to the middle Term, is -\frac." Although this theorem can be interpreted as the first obscure expression for the normal probability law, Stephen Stigler, Stigler points out that de Moivre himself did not interpret his results as anything more than the approximate rule for the binomial coefficients, and in particular de Moivre lacked the concept of the probability density function. In 1823 Carl Friedrich Gauss, Gauss published his monograph "''Theoria combinationis observationum erroribus minimis obnoxiae''" where among other things he introduces several important statistical concepts, such as the method of least squares, the method of maximum likelihood, and the ''normal distribution''. Gauss used ''M'', , to denote the measurements of some unknown quantity ''V'', and sought the "most probable" estimator of that quantity: the one that maximizes the probability of obtaining the observed experimental results. In his notation φΔ is the probability density function of the measurement errors of magnitude Δ. Not knowing what the function ''φ'' is, Gauss requires that his method should reduce to the well-known answer: the arithmetic mean of the measured values. Starting from these principles, Gauss demonstrates that the only law that rationalizes the choice of arithmetic mean as an estimator of the location parameter, is the normal law of errors: \varphi\mathit = \frac h \, e^, where ''h'' is "the measure of the precision of the observations". Using this normal law as a generic model for errors in the experiments, Gauss formulates what is now known as the non-linear least squares, non-linear weighted least squares method. Although Gauss was the first to suggest the normal distribution law, Pierre Simon de Laplace, Laplace made significant contributions. It was Laplace who first posed the problem of aggregating several observations in 1774, although his own solution led to the Laplacian distribution. It was Laplace who first calculated the value of the Gaussian integral, integral in 1782, providing the normalization constant for the normal distribution. Finally, it was Laplace who in 1810 proved and presented to the Academy the fundamental
central limit theorem In probability theory, the central limit theorem (CLT) establishes that, in many situations, when independent random variables are summed up, their properly normalized sum tends toward a normal distribution even if the original variables themselv ...
, which emphasized the theoretical importance of the normal distribution. It is of interest to note that in 1809 an Irish-American mathematician Robert Adrain published two insightful but flawed derivations of the normal probability law, simultaneously and independently from Gauss. His works remained largely unnoticed by the scientific community, until in 1871 they were exhumed by Cleveland Abbe, Abbe. In the middle of the 19th century James Clerk Maxwell, Maxwell demonstrated that the normal distribution is not just a convenient mathematical tool, but may also occur in natural phenomena: "The number of particles whose velocity, resolved in a certain direction, lies between ''x'' and ''x'' + ''dx'' is \operatorname \frac\; e^ \, dx


Naming

Today, the concept is usually known in English as the normal distribution or Gaussian distribution. Other less common names include Gauss distribution, Laplace-Gauss distribution, the law of error, the law of facility of errors, Laplace's second law, Gaussian law. Gauss himself apparently coined the term with reference to the "normal equations" involved in its applications, with normal having its technical meaning of orthogonal rather than "usual". However, by the end of the 19th century some authors had started using the name ''normal distribution'', where the word "normal" was used as an adjective – the term now being seen as a reflection of the fact that this distribution was seen as typical, common – and thus "normal". Charles Sanders Peirce, Peirce (one of those authors) once defined "normal" thus: "...the 'normal' is not the average (or any other kind of mean) of what actually occurs, but of what ''would'', in the long run, occur under certain circumstances." Around the turn of the 20th century Karl Pearson, Pearson popularized the term ''normal'' as a designation for this distribution. Also, it was Pearson who first wrote the distribution in terms of the standard deviation ''σ'' as in modern notation. Soon after this, in year 1915, Ronald Fisher, Fisher added the location parameter to the formula for normal distribution, expressing it in the way it is written nowadays: df = \frac e^ \, dx. The term "standard normal", which denotes the normal distribution with zero mean and unit variance came into general use around the 1950s, appearing in the popular textbooks by P. G. Hoel (1947) "''Introduction to mathematical statistics''" and A. M. Mood (1950) "''Introduction to the theory of statistics''".


See also

* Bates distribution – similar to the Irwin–Hall distribution, but rescaled back into the 0 to 1 range * Behrens–Fisher problem – the long-standing problem of testing whether two normal samples with different variances have same means; * Bhattacharyya distance – method used to separate mixtures of normal distributions * Erdős–Kac theorem – on the occurrence of the normal distribution in number theory * Full width at half maximum * Gaussian blur – convolution, which uses the normal distribution as a kernel * Modified half-normal distribution with the pdf on (0, \infty) is given as f(x)= \frac, where \Psi(\alpha,z)=_1\Psi_1\left(\begin\left(\alpha,\frac\right)\\(1,0)\end;z \right) denotes the Fox-Wright Psi function. * Normally distributed and uncorrelated does not imply independent * Ratio normal distribution * Reciprocal normal distribution * Standard normal table * Stein's lemma * Sub-Gaussian distribution * Sum of normally distributed random variables * Tweedie distribution – The normal distribution is a member of the family of Tweedie exponential dispersion models. * Wrapped normal distribution – the Normal distribution applied to a circular domain * Z-test – using the normal distribution


Notes


References


Citations


Sources

* * In particular, the entries fo
"bell-shaped and bell curve"
an

* * * * * * * * * * * * * * * * * * * * * * * * Translated by Stephen M. Stigler in ''Statistical Science'' 1 (3), 1986: . * * * * * * * * * * * * * * * * * * * * * * * * * * * *


External links

*
Normal distribution calculator
{{Authority control Normal distribution, Continuous distributions Conjugate prior distributions Exponential family distributions Stable distributions Location-scale family probability distributions]">X - \mu, ^p\right&= \sigma^p (p-1)!! \cdot \begin \sqrt & \textp\text \\ 1 & \textp\text \end \\ &= \sigma^p \cdot \frac. \end The last formula is valid also for any non-integer p>-1. When the mean \mu \ne 0, the plain and absolute moments can be expressed in terms of
confluent hypergeometric function In mathematics, a confluent hypergeometric function is a solution of a confluent hypergeometric equation, which is a degenerate form of a hypergeometric differential equation where two of the three regular singularities merge into an irregular ...
s _1F_1 and U. :\begin \operatorname\left ^p\right&= \sigma^p\cdot (-i\sqrt 2)^p U\left(-\frac, \frac, -\frac \left( \frac \mu \sigma \right)^2 \right), \\ \operatorname\left Hermite polynomials#"Negative variance", generalized Hermite polynomials. The expectation of X conditioned on the event that X lies in an interval ,b/math> is given by :\operatorname\left \mid a= \mu - \sigma^2\frac where f and F respectively are the density and the cumulative distribution function of X. For b=\infty this is known as the
inverse Mills ratio In probability theory, the Mills ratio (or Mills's ratio) of a continuous random variable X is the function : m(x) := \frac , where f(x) is the probability density function, and :\bar(x) := \Pr x.html" ;"title=">x">>x= \int_x^ f(u)\, du is the ...
. Note that above, density f of X is used instead of standard normal density as in inverse Mills ratio, so here we have \sigma^2 instead of \sigma.


Fourier transform and characteristic function

The
Fourier transform A Fourier transform (FT) is a mathematical transform that decomposes functions into frequency components, which are represented by the output of the transform as a function of frequency. Most commonly functions of time or space are transformed, ...
of a normal density f with mean \mu and standard deviation \sigma is : \hat f(t) = \int_^\infty f(x)e^ \, dx = e^ e^ where i is the
imaginary unit The imaginary unit or unit imaginary number () is a solution to the quadratic equation x^2+1=0. Although there is no real number with this property, can be used to extend the real numbers to what are called complex numbers, using addition an ...
. If the mean \mu=0, the first factor is 1, and the Fourier transform is, apart from a constant factor, a normal density on the
frequency domain In physics, electronics, control systems engineering, and statistics, the frequency domain refers to the analysis of mathematical functions or signals with respect to frequency, rather than time. Put simply, a time-domain graph shows how a signa ...
, with mean 0 and standard deviation 1/\sigma. In particular, the standard normal distribution \varphi is an
eigenfunction In mathematics, an eigenfunction of a linear operator ''D'' defined on some function space is any non-zero function f in that space that, when acted upon by ''D'', is only multiplied by some scaling factor called an eigenvalue. As an equation, th ...
of the Fourier transform. In probability theory, the Fourier transform of the probability distribution of a real-valued random variable X is closely connected to the
characteristic function In mathematics, the term "characteristic function" can refer to any of several distinct concepts: * The indicator function of a subset, that is the function ::\mathbf_A\colon X \to \, :which for a given subset ''A'' of ''X'', has value 1 at points ...
\varphi_X(t) of that variable, which is defined as the
expected value In probability theory, the expected value (also called expectation, expectancy, mathematical expectation, mean, average, or first moment) is a generalization of the weighted average. Informally, the expected value is the arithmetic mean of a l ...
of e^, as a function of the real variable t (the
frequency Frequency is the number of occurrences of a repeating event per unit of time. It is also occasionally referred to as ''temporal frequency'' for clarity, and is distinct from ''angular frequency''. Frequency is measured in hertz (Hz) which is eq ...
parameter of the Fourier transform). This definition can be analytically extended to a complex-value variable t. The relation between both is: :\varphi_X(t) = \hat f(-t)


Moment and cumulant generating functions

The
moment generating function In probability theory and statistics, the moment-generating function of a real-valued random variable is an alternative specification of its probability distribution. Thus, it provides the basis of an alternative route to analytical results compare ...
of a real random variable X is the expected value of e^, as a function of the real parameter t. For a normal distribution with density f, mean \mu and deviation \sigma, the moment generating function exists and is equal to :M(t) = \operatorname ^= \hat f(it) = e^ e^ The
cumulant generating function In probability theory and statistics, the cumulants of a probability distribution are a set of quantities that provide an alternative to the '' moments'' of the distribution. Any two probability distributions whose moments are identical will have ...
is the logarithm of the moment generating function, namely :g(t) = \ln M(t) = \mu t + \tfrac 12 \sigma^2 t^2 Since this is a quadratic polynomial in t, only the first two
cumulant In probability theory and statistics, the cumulants of a probability distribution are a set of quantities that provide an alternative to the '' moments'' of the distribution. Any two probability distributions whose moments are identical will ha ...
s are nonzero, namely the mean \mu and the variance \sigma^2.


Stein operator and class

Within
Stein's method Stein's method is a general method in probability theory to obtain bounds on the distance between two probability distributions with respect to a probability metric. It was introduced by Charles Stein, who first published it in 1972, to obtain ...
the Stein operator and class of a random variable X \sim \mathcal(\mu, \sigma^2) are \mathcalf(x) = \sigma^2 f'(x) - (x-\mu)f(x) and \mathcal the class of all absolutely continuous functions f : \R \to \R \mbox\mathbb[, f'(X), ]< \infty.


Zero-variance limit

In the limit (mathematics), limit when \sigma tends to zero, the probability density f(x) eventually tends to zero at any x\ne \mu, but grows without limit if x = \mu, while its integral remains equal to 1. Therefore, the normal distribution cannot be defined as an ordinary
function Function or functionality may refer to: Computing * Function key, a type of key on computer keyboards * Function model, a structured representation of processes in a system * Function object or functor or functionoid, a concept of object-oriente ...
when \sigma = 0. However, one can define the normal distribution with zero variance as a
generalized function In mathematics, generalized functions are objects extending the notion of functions. There is more than one recognized theory, for example the theory of distributions. Generalized functions are especially useful in making discontinuous functions ...
; specifically, as Dirac's "delta function" \delta translated by the mean \mu, that is f(x)=\delta(x-\mu). Its CDF is then the
Heaviside step function The Heaviside step function, or the unit step function, usually denoted by or (but sometimes , or ), is a step function, named after Oliver Heaviside (1850–1925), the value of which is zero for negative arguments and one for positive argume ...
translated by the mean \mu, namely :F(x) = \begin 0 & \textx < \mu \\ 1 & \textx \geq \mu \end


Maximum entropy

Of all probability distributions over the reals with a specified mean \mu and variance \sigma^2, the normal distribution N(\mu,\sigma^2) is the one with maximum entropy. If X is a
continuous random variable In probability theory and statistics, a probability distribution is the mathematical function that gives the probabilities of occurrence of different possible outcomes for an experiment. It is a mathematical description of a random phenomenon i ...
with
probability density In probability theory, a probability density function (PDF), or density of a continuous random variable, is a function whose value at any given sample (or point) in the sample space (the set of possible values taken by the random variable) can ...
f(x), then the entropy of X is defined as : H(X) = - \int_^\infty f(x)\log f(x)\, dx where f(x)\log f(x) is understood to be zero whenever f(x)=0. This functional can be maximized, subject to the constraints that the distribution is properly normalized and has a specified variance, by using
variational calculus The calculus of variations (or Variational Calculus) is a field of mathematical analysis that uses variations, which are small changes in functions and functionals, to find maxima and minima of functionals: mappings from a set of functions t ...
. A function with two
Lagrange multipliers In mathematical optimization, the method of Lagrange multipliers is a strategy for finding the local maxima and minima of a function subject to equality constraints (i.e., subject to the condition that one or more equations have to be satisfied ex ...
is defined: : L=\int_^\infty f(x)\ln(f(x))\,dx-\lambda_0\left(1-\int_^\infty f(x)\,dx\right)-\lambda\left(\sigma^2-\int_^\infty f(x)(x-\mu)^2\,dx\right) where f(x) is, for now, regarded as some density function with mean \mu and standard deviation \sigma. At maximum entropy, a small variation \delta f(x) about f(x) will produce a variation \delta L about L which is equal to 0: : 0=\delta L=\int_^\infty \delta f(x)\left (\ln(f(x))+1+\lambda_0+\lambda(x-\mu)^2\right )\,dx Since this must hold for any small \delta f(x), the term in brackets must be zero, and solving for f(x) yields: :f(x)=e^ Using the constraint equations to solve for \lambda_0 and \lambda yields the density of the normal distribution: : f(x, \mu, \sigma)=\frace^ The entropy of a normal distribution is equal to : H(X)=\tfrac(1+\log(2\sigma^2\pi))


Other properties


Related distributions


Central limit theorem

The central limit theorem states that under certain (fairly common) conditions, the sum of many random variables will have an approximately normal distribution. More specifically, where X_1,\ldots ,X_n are
independent and identically distributed In probability theory and statistics, a collection of random variables is independent and identically distributed if each random variable has the same probability distribution as the others and all are mutually independent. This property is usua ...
random variables with the same arbitrary distribution, zero mean, and variance \sigma^2 and Z is their mean scaled by \sqrt : Z = \sqrt\left(\frac\sum_^n X_i\right) Then, as n increases, the probability distribution of Z will tend to the normal distribution with zero mean and variance \sigma^2. The theorem can be extended to variables (X_i) that are not independent and/or not identically distributed if certain constraints are placed on the degree of dependence and the moments of the distributions. Many
test statistic A test statistic is a statistic (a quantity derived from the sample) used in statistical hypothesis testing.Berger, R. L.; Casella, G. (2001). ''Statistical Inference'', Duxbury Press, Second Edition (p.374) A hypothesis test is typically specif ...
s, scores, and
estimator In statistics, an estimator is a rule for calculating an estimate of a given quantity based on observed data: thus the rule (the estimator), the quantity of interest (the estimand) and its result (the estimate) are distinguished. For example, the ...
s encountered in practice contain sums of certain random variables in 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 distributions. The central limit theorem also implies that certain distributions can be approximated by the normal distribution, for example: * The
binomial distribution In probability theory and statistics, the binomial distribution with parameters ''n'' and ''p'' is the discrete probability distribution of the number of successes in a sequence of ''n'' independent experiments, each asking a yes–no quest ...
B(n,p) is approximately normal with mean np and variance np(1-p) for large n and for p not too close to 0 or 1. * The
Poisson distribution In probability theory and statistics, the Poisson distribution is a discrete probability distribution that expresses the probability of a given number of events occurring in a fixed interval of time or space if these events occur with a known co ...
with parameter \lambda is approximately normal with mean \lambda and variance \lambda, for large values of \lambda. * The
chi-squared distribution In probability theory and statistics, the chi-squared distribution (also chi-square or \chi^2-distribution) with k degrees of freedom is the distribution of a sum of the squares of k independent standard normal random variables. The chi-squa ...
\chi^2(k) is approximately normal with mean k and variance 2k, for large k. * The
Student's t-distribution In probability and statistics, Student's ''t''-distribution (or simply the ''t''-distribution) is any member of a family of continuous probability distributions that arise when estimating the mean of a normally distributed population in sit ...
t(\nu) is approximately normal with mean 0 and variance 1 when \nu is large. Whether these approximations are sufficiently accurate depends on the purpose for which they are needed, and the rate of convergence to the normal distribution. It is typically the case that such approximations are less accurate in the tails of the distribution. A general upper bound for the approximation error in the central limit theorem is given by the
Berry–Esseen theorem In probability theory, the central limit theorem states that, under certain circumstances, the probability distribution of the scaled mean of a random sample converges to a normal distribution as the sample size increases to infinity. Under strong ...
, improvements of the approximation are given by the
Edgeworth expansion The Gram–Charlier A series (named in honor of Jørgen Pedersen Gram and Carl Charlier), and the Edgeworth series (named in honor of Francis Ysidro Edgeworth) are series that approximate a probability distribution in terms of its cumulants. The se ...
s. This theorem can also be used to justify modeling the sum of many uniform noise sources as
Gaussian noise Gaussian noise, named after Carl Friedrich Gauss, is a term from signal processing theory denoting a kind of signal noise that has a probability density function (pdf) equal to that of the normal distribution (which is also known as the Gaussia ...
. See
AWGN Additive white Gaussian noise (AWGN) is a basic noise model used in information theory to mimic the effect of many random processes that occur in nature. The modifiers denote specific characteristics: * ''Additive'' because it is added to any nois ...
.


Operations and functions of normal variables

The
probability density In probability theory, a probability density function (PDF), or density of a continuous random variable, is a function whose value at any given sample (or point) in the sample space (the set of possible values taken by the random variable) can ...
,
cumulative distribution In statistics, the frequency (or absolute frequency) of an event i is the number n_i of times the observation has occurred/recorded in an experiment or study. These frequencies are often depicted graphically or in tabular form. Types The cumul ...
, and inverse cumulative distribution of any function of one or more independent or correlated normal variables can be computed with the numerical method of ray-tracing
Matlab code
. In the following sections we look at some special cases.


Operations on a single normal variable

If X is distributed normally with mean \mu and variance \sigma^2, then * aX+b, for any real numbers a and b, is also normally distributed, with mean a\mu+b and standard deviation , a, \sigma. That is, the family of normal distributions is closed under linear transformations. * The exponential of X is distributed log-normally: . * The absolute value of X has
folded normal distribution The folded normal distribution is a probability distribution related to the normal distribution. Given a normally distributed random variable ''X'' with mean ''μ'' and variance ''σ''2, the random variable ''Y'' = , ''X'', has a folded normal d ...
: . If \mu = 0 this is known as the
half-normal distribution In probability theory and statistics, the half-normal distribution is a special case of the folded normal distribution. Let X follow an ordinary normal distribution, N(0,\sigma^2). Then, Y=, X, follows a half-normal distribution. Thus, the hal ...
. * The absolute value of normalized residuals, , ''X'' − ''μ'', /''σ'', has
chi distribution In probability theory and statistics, the chi distribution is a continuous probability distribution. It is the distribution of the positive square root of the sum of squares of a set of independent random variables each following a standard norm ...
with one degree of freedom: , X - \mu, / \sigma \sim \chi_1. * The square of ''X''/''σ'' has the
noncentral chi-squared distribution In probability theory and statistics, the noncentral chi-squared distribution (or noncentral chi-square distribution, noncentral \chi^2 distribution) is a noncentral generalization of the chi-squared distribution. It often arises in the power a ...
with one degree of freedom: X^2 / \sigma^2 \sim \chi_1^2(\mu^2 / \sigma^2). If \mu = 0, the distribution is called simply chi-squared. * The log likelihood of a normal variable x is simply the log of its
probability density function In probability theory, a probability density function (PDF), or density of a continuous random variable, is a function whose value at any given sample (or point) in the sample space (the set of possible values taken by the random variable) can ...
: \ln p(x)= -\frac \left(\frac \right)^2 -\ln \left(\sigma \sqrt \right) = -\frac z^2 -\ln \left(\sigma \sqrt \right). Since this is a scaled and shifted square of a standard normal variable, it is distributed as a scaled and shifted chi-squared variable. * The distribution of the variable ''X'' restricted to an interval 'a'', ''b''is called the
truncated normal distribution In probability and statistics, the truncated normal distribution is the probability distribution derived from that of a normally distributed random variable by bounding the random variable from either below or above (or both). The truncated no ...
. * (''X'' − ''μ'')−2 has a
Lévy distribution In probability theory and statistics, the Lévy distribution, named after Paul Lévy, is a continuous probability distribution for a non-negative random variable. In spectroscopy, this distribution, with frequency as the dependent variable, is kn ...
with location 0 and scale ''σ''−2.


= Operations on two independent normal variables

= * If X_1 and X_2 are two
independent Independent or Independents may refer to: Arts, entertainment, and media Artist groups * Independents (artist group), a group of modernist painters based in the New Hope, Pennsylvania, area of the United States during the early 1930s * Independ ...
normal random variables, with means \mu_1, \mu_2 and standard deviations \sigma_1, \sigma_2, then their sum X_1 + X_2 will also be normally distributed, roof/sup> with mean \mu_1 + \mu_2 and variance \sigma_1^2 + \sigma_2^2. * In particular, if X and Y are independent normal deviates with zero mean and variance \sigma^2, then X + Y and X - Y are also independent and normally distributed, with zero mean and variance 2\sigma^2. This is a special case of the
polarization identity In linear algebra, a branch of mathematics, the polarization identity is any one of a family of formulas that express the inner product of two vectors in terms of the norm of a normed vector space. If a norm arises from an inner product then t ...
. * If X_1, X_2 are two independent normal deviates with mean \mu and deviation \sigma, and a, b are arbitrary real numbers, then the variable X_3 = \frac + \mu is also normally distributed with mean \mu and deviation \sigma. It follows that the normal distribution is
stable A stable is a building in which livestock, especially horses, are kept. It most commonly means a building that is divided into separate stalls for individual animals and livestock. There are many different types of stables in use today; the ...
(with exponent \alpha=2).


= Operations on two independent standard normal variables

= If X_1 and X_2 are two independent standard normal random variables with mean 0 and variance 1, then * Their sum and difference is distributed normally with mean zero and variance two: X_1 \pm X_2 \sim N(0, 2). * Their product Z = X_1 X_2 follows the
product distribution A product distribution is a probability distribution constructed as the distribution of the product of random variables having two other known distributions. Given two statistically independent random variables ''X'' and ''Y'', the distribution of ...
with density function f_Z(z) = \pi^ K_0(, z, ) where K_0 is the
modified Bessel function of the second kind Bessel functions, first defined by the mathematician Daniel Bernoulli and then generalized by Friedrich Bessel, are canonical solutions of Bessel's differential equation x^2 \frac + x \frac + \left(x^2 - \alpha^2 \right)y = 0 for an arbitrary ...
. This distribution is symmetric around zero, unbounded at z = 0, and has the
characteristic function In mathematics, the term "characteristic function" can refer to any of several distinct concepts: * The indicator function of a subset, that is the function ::\mathbf_A\colon X \to \, :which for a given subset ''A'' of ''X'', has value 1 at points ...
\phi_Z(t) = (1 + t^2)^. * Their ratio follows the standard
Cauchy distribution The Cauchy distribution, named after Augustin Cauchy, is a continuous probability distribution. It is also known, especially among physicists, as the Lorentz distribution (after Hendrik Lorentz), Cauchy–Lorentz distribution, Lorentz(ian) fun ...
: X_1/ X_2 \sim \operatorname(0, 1). * Their Euclidean norm \sqrt has the
Rayleigh distribution In probability theory and statistics, the Rayleigh distribution is a continuous probability distribution for nonnegative-valued random variables. Up to rescaling, it coincides with the chi distribution with two degrees of freedom. The distribut ...
.


Operations on multiple independent normal variables

* Any linear combination of independent normal deviates is a normal deviate. * If X_1, X_2, \ldots, X_n are independent standard normal random variables, then the sum of their squares has the
chi-squared distribution In probability theory and statistics, the chi-squared distribution (also chi-square or \chi^2-distribution) with k degrees of freedom is the distribution of a sum of the squares of k independent standard normal random variables. The chi-squa ...
with n degrees of freedom X_1^2 + \cdots + X_n^2 \sim \chi_n^2. * If X_1, X_2, \ldots, X_n are independent normally distributed random variables with means \mu and variances \sigma^2, then their
sample mean The sample mean (or "empirical mean") and the sample covariance are statistics computed from a Sample (statistics), sample of data on one or more random variables. The sample mean is the average value (or mean, mean value) of a sample (statistic ...
is independent from the sample
standard deviation In statistics, the standard deviation is a measure of the amount of variation or dispersion of a set of values. A low standard deviation indicates that the values tend to be close to the mean (also called the expected value) of the set, while ...
, which can be demonstrated using Basu's theorem or
Cochran's theorem In statistics, Cochran's theorem, devised by William G. Cochran, is a theorem used to justify results relating to the probability distributions of statistics that are used in the analysis of variance. Statement Let ''U''1, ..., ''U'N'' be i.i. ...
. The ratio of these two quantities will have the
Student's t-distribution In probability and statistics, Student's ''t''-distribution (or simply the ''t''-distribution) is any member of a family of continuous probability distributions that arise when estimating the mean of a normally distributed population in sit ...
with n-1 degrees of freedom: t = \frac = \frac \sim t_. * If X_1, X_2, \ldots, X_n, Y_1, Y_2, \ldots, Y_m are independent standard normal random variables, then the ratio of their normalized sums of squares will have the with degrees of freedom: F = \frac \sim F_.


Operations on multiple correlated normal variables

* A
quadratic form In mathematics, a quadratic form is a polynomial with terms all of degree two ("form" is another name for a homogeneous polynomial). For example, :4x^2 + 2xy - 3y^2 is a quadratic form in the variables and . The coefficients usually belong to a ...
of a normal vector, i.e. a quadratic function q = \sum x_i^2 + \sum x_j + c of multiple independent or correlated normal variables, is a generalized chi-square variable.


Operations on the density function

The split normal distribution is most directly defined in terms of joining scaled sections of the density functions of different normal distributions and rescaling the density to integrate to one. The
truncated normal distribution In probability and statistics, the truncated normal distribution is the probability distribution derived from that of a normally distributed random variable by bounding the random variable from either below or above (or both). The truncated no ...
results from rescaling a section of a single density function.


Infinite divisibility and Cramér's theorem

For any positive integer \text, any normal distribution with mean \mu and variance \sigma^2 is the distribution of the sum of \text independent normal deviates, each with mean \frac and variance \frac. This property is called
infinite divisibility Infinite divisibility arises in different ways in philosophy, physics, economics, order theory (a branch of mathematics), and probability theory (also a branch of mathematics). One may speak of infinite divisibility, or the lack thereof, of matter ...
. Conversely, if X_1 and X_2 are independent random variables and their sum X_1+X_2 has a normal distribution, then both X_1 and X_2 must be normal deviates. This result is known as Cramér's decomposition theorem, and is equivalent to saying that the convolution of two distributions is normal if and only if both are normal. Cramér's theorem implies that a linear combination of independent non-Gaussian variables will never have an exactly normal distribution, although it may approach it arbitrarily closely.


Bernstein's theorem

Bernstein's theorem states that if X and Y are independent and X + Y and X - Y are also independent, then both ''X'' and ''Y'' must necessarily have normal distributions. More generally, if X_1, \ldots, X_n are independent random variables, then two distinct linear combinations \sum and \sumwill be independent if and only if all X_k are normal and \sum, where \sigma_k^2 denotes the variance of X_k.


Extensions

The notion of normal distribution, being one of the most important distributions in probability theory, has been extended far beyond the standard framework of the univariate (that is one-dimensional) case (Case 1). All these extensions are also called ''normal'' or ''Gaussian'' laws, so a certain ambiguity in names exists. * The
multivariate normal distribution In probability theory and statistics, the multivariate normal distribution, multivariate Gaussian distribution, or joint normal distribution is a generalization of the one-dimensional (univariate) normal distribution to higher dimensions. One d ...
describes the Gaussian law in the ''k''-dimensional Euclidean space. A vector is multivariate-normally distributed if any linear combination of its components has a (univariate) normal distribution. The variance of ''X'' is a ''k×k'' symmetric positive-definite matrix ''V''. The multivariate normal distribution is a special case of the
elliptical distribution In probability and statistics, an elliptical distribution is any member of a broad family of probability distributions that generalize the multivariate normal distribution. Intuitively, in the simplified two and three dimensional case, the joint di ...
s. As such, its iso-density loci in the ''k'' = 2 case are ellipses and in the case of arbitrary ''k'' are ellipsoids. * Rectified Gaussian distribution a rectified version of normal distribution with all the negative elements reset to 0 * Complex normal distribution deals with the complex normal vectors. A complex vector is said to be normal if both its real and imaginary components jointly possess a 2''k''-dimensional multivariate normal distribution. The variance-covariance structure of ''X'' is described by two matrices: the ''variance'' matrix Γ, and the ''relation'' matrix ''C''. * Matrix normal distribution describes the case of normally distributed matrices. * Gaussian processes are the normally distributed stochastic processes. These can be viewed as elements of some infinite-dimensional Hilbert space ''H'', and thus are the analogues of multivariate normal vectors for the case . A random element is said to be normal if for any constant the scalar product has a (univariate) normal distribution. The variance structure of such Gaussian random element can be described in terms of the linear ''covariance ''. Several Gaussian processes became popular enough to have their own names: ** Wiener process, Brownian motion, ** Brownian bridge, ** Ornstein–Uhlenbeck process. * Gaussian q-distribution is an abstract mathematical construction that represents a "q-analogue" of the normal distribution. * the q-Gaussian is an analogue of the Gaussian distribution, in the sense that it maximises the Tsallis entropy, and is one type of Tsallis distribution. Note that this distribution is different from the Gaussian q-distribution above. * The Kaniadakis Gaussian distribution, Kaniadakis ''κ''-Gaussian distribution is a generalization of the Gaussian distribution which arises from the Kaniadakis statistics, being one of the Kaniadakis distribution, Kaniadakis distributions. A random variable ''X'' has a two-piece normal distribution if it has a distribution : f_X( x ) = N( \mu, \sigma_1^2 ) \text x \le \mu : f_X( x ) = N( \mu, \sigma_2^2 ) \text x \ge \mu where ''μ'' is the mean and ''σ''1 and ''σ''2 are the standard deviations of the distribution to the left and right of the mean respectively. The mean, variance and third central moment of this distribution have been determined : \operatorname( X ) = \mu + \sqrt ( \sigma_2 - \sigma_1 ) : \operatorname( X ) = \left( 1 - \frac 2 \pi\right)( \sigma_2 - \sigma_1 )^2 + \sigma_1 \sigma_2 : \operatorname( X ) = \sqrt( \sigma_2 - \sigma_1 ) \left[ \left( \frac 4 \pi - 1 \right) ( \sigma_2 - \sigma_1)^2 + \sigma_1 \sigma_2 \right] where E(''X''), V(''X'') and T(''X'') are the mean, variance, and third central moment respectively. One of the main practical uses of the Gaussian law is to model the empirical distributions of many different random variables encountered in practice. In such case a possible extension would be a richer family of distributions, having more than two parameters and therefore being able to fit the empirical distribution more accurately. The examples of such extensions are: * Pearson distribution — a four-parameter family of probability distributions that extend the normal law to include different skewness and kurtosis values. * The generalized normal distribution, also known as the exponential power distribution, allows for distribution tails with thicker or thinner asymptotic behaviors.


Statistical inference


Estimation of parameters

It is often the case that we do not know the parameters of the normal distribution, but instead want to Estimation theory, estimate them. That is, having a sample (x_1, \ldots, x_n) from a normal N(\mu, \sigma^2) population we would like to learn the approximate values of parameters \mu and \sigma^2. The standard approach to this problem is the maximum likelihood method, which requires maximization of the ''log-likelihood function'': : \ln\mathcal(\mu,\sigma^2) = \sum_^n \ln f(x_i\mid\mu,\sigma^2) = -\frac\ln(2\pi) - \frac\ln\sigma^2 - \frac\sum_^n (x_i-\mu)^2. Taking derivatives with respect to \mu and \sigma^2 and solving the resulting system of first order conditions yields the ''maximum likelihood estimates'': : \hat = \overline \equiv \frac\sum_^n x_i, \qquad \hat^2 = \frac \sum_^n (x_i - \overline)^2.


Sample mean

Estimator \textstyle\hat\mu is called the ''
sample mean The sample mean (or "empirical mean") and the sample covariance are statistics computed from a Sample (statistics), sample of data on one or more random variables. The sample mean is the average value (or mean, mean value) of a sample (statistic ...
'', since it is the arithmetic mean of all observations. The statistic \textstyle\overline is complete statistic, complete and sufficient statistic, sufficient for \mu, and therefore by the Lehmann–Scheffé theorem, \textstyle\hat\mu is the uniformly minimum variance unbiased (UMVU) estimator. In finite samples it is distributed normally: : \hat\mu \sim \mathcal(\mu,\sigma^2/n). The variance of this estimator is equal to the ''μμ''-element of the inverse Fisher information matrix \textstyle\mathcal^. This implies that the estimator is efficient estimator, finite-sample efficient. Of practical importance is the fact that the standard error (statistics), standard error of \textstyle\hat\mu is proportional to \textstyle1/\sqrt, that is, if one wishes to decrease the standard error by a factor of 10, one must increase the number of points in the sample by a factor of 100. This fact is widely used in determining sample sizes for opinion polls and the number of trials in Monte Carlo simulations. From the standpoint of the asymptotic theory (statistics), asymptotic theory, \textstyle\hat\mu is consistent estimator, consistent, that is, it convergence in probability, converges in probability to \mu as n\rightarrow\infty. The estimator is also asymptotic normality, asymptotically normal, which is a simple corollary of the fact that it is normal in finite samples: : \sqrt(\hat\mu-\mu) \,\xrightarrow\, \mathcal(0,\sigma^2).


Sample variance

The estimator \textstyle\hat\sigma^2 is called the ''sample variance'', since it is the variance of the sample ((x_1, \ldots, x_n)). In practice, another estimator is often used instead of the \textstyle\hat\sigma^2. This other estimator is denoted s^2, and is also called the ''sample variance'', which represents a certain ambiguity in terminology; its square root s is called the ''sample standard deviation''. The estimator s^2 differs from \textstyle\hat\sigma^2 by having instead of ''n'' in the denominator (the so-called Bessel's correction): : s^2 = \frac \hat\sigma^2 = \frac \sum_^n (x_i - \overline)^2. The difference between s^2 and \textstyle\hat\sigma^2 becomes negligibly small for large ''n''s. In finite samples however, the motivation behind the use of s^2 is that it is an unbiased estimator of the underlying parameter \sigma^2, whereas \textstyle\hat\sigma^2 is biased. Also, by the Lehmann–Scheffé theorem the estimator s^2 is uniformly minimum variance unbiased (Minimum-variance unbiased estimator, UMVU), which makes it the "best" estimator among all unbiased ones. However it can be shown that the biased estimator \textstyle\hat\sigma^2 is "better" than the s^2 in terms of the mean squared error (MSE) criterion. In finite samples both s^2 and \textstyle\hat\sigma^2 have scaled
chi-squared distribution In probability theory and statistics, the chi-squared distribution (also chi-square or \chi^2-distribution) with k degrees of freedom is the distribution of a sum of the squares of k independent standard normal random variables. The chi-squa ...
with degrees of freedom: : s^2 \sim \frac \cdot \chi^2_, \qquad \hat\sigma^2 \sim \frac \cdot \chi^2_. The first of these expressions shows that the variance of s^2 is equal to 2\sigma^4/(n-1), which is slightly greater than the ''σσ''-element of the inverse Fisher information matrix \textstyle\mathcal^. Thus, s^2 is not an efficient estimator for \sigma^2, and moreover, since s^2 is UMVU, we can conclude that the finite-sample efficient estimator for \sigma^2 does not exist. Applying the asymptotic theory, both estimators s^2 and \textstyle\hat\sigma^2 are consistent, that is they converge in probability to \sigma^2 as the sample size n\rightarrow\infty. The two estimators are also both asymptotically normal: : \sqrt(\hat\sigma^2 - \sigma^2) \simeq \sqrt(s^2-\sigma^2) \,\xrightarrow\, \mathcal(0,2\sigma^4). In particular, both estimators are asymptotically efficient for \sigma^2.


Confidence intervals

By
Cochran's theorem In statistics, Cochran's theorem, devised by William G. Cochran, is a theorem used to justify results relating to the probability distributions of statistics that are used in the analysis of variance. Statement Let ''U''1, ..., ''U'N'' be i.i. ...
, for normal distributions the sample mean \textstyle\hat\mu and the sample variance ''s''2 are
independent Independent or Independents may refer to: Arts, entertainment, and media Artist groups * Independents (artist group), a group of modernist painters based in the New Hope, Pennsylvania, area of the United States during the early 1930s * Independ ...
, which means there can be no gain in considering their joint distribution. There is also a converse theorem: if in a sample the sample mean and sample variance are independent, then the sample must have come from the normal distribution. The independence between \textstyle\hat\mu and ''s'' can be employed to construct the so-called ''t-statistic'': : t = \frac = \frac \sim t_ This quantity ''t'' has the
Student's t-distribution In probability and statistics, Student's ''t''-distribution (or simply the ''t''-distribution) is any member of a family of continuous probability distributions that arise when estimating the mean of a normally distributed population in sit ...
with degrees of freedom, and it is an ancillary statistic (independent of the value of the parameters). Inverting the distribution of this ''t''-statistics will allow us to construct the
confidence interval In frequentist statistics, a confidence interval (CI) is a range of estimates for an unknown parameter. A confidence interval is computed at a designated ''confidence level''; the 95% confidence level is most common, but other levels, such as 9 ...
for ''μ''; similarly, inverting the ''χ''2 distribution of the statistic ''s''2 will give us the confidence interval for ''σ''2: :\mu \in \left[ \hat\mu - t_ \fracs, \hat\mu + t_ \fracs \right], :\sigma^2 \in \left[ \frac, \frac \right], where ''tk,p'' and are the ''p''th
quantile In statistics and probability, quantiles are cut points dividing the range of a probability distribution into continuous intervals with equal probabilities, or dividing the observations in a sample in the same way. There is one fewer quantile tha ...
s of the ''t''- and ''χ''2-distributions respectively. These confidence intervals are of the ''confidence level'' , meaning that the true values ''μ'' and ''σ''2 fall outside of these intervals with probability (or significance level) ''α''. In practice people usually take , resulting in the 95% confidence intervals. Approximate formulas can be derived from the asymptotic distributions of \textstyle\hat\mu and ''s''2: :\mu \in \left[ \hat\mu - , z_, \fracs, \hat\mu + , z_, \fracs \right], :\sigma^2 \in \left[ s^2 - , z_, \fracs^2, s^2 + , z_, \fracs^2 \right], The approximate formulas become valid for large values of ''n'', and are more convenient for the manual calculation since the standard normal quantiles ''z''''α''/2 do not depend on ''n''. In particular, the most popular value of , results in .


Normality tests

Normality tests assess the likelihood that the given data set comes from a normal distribution. Typically the null hypothesis ''H''0 is that the observations are distributed normally with unspecified mean ''μ'' and variance ''σ''2, versus the alternative ''Ha'' that the distribution is arbitrary. Many tests (over 40) have been devised for this problem. The more prominent of them are outlined below: Diagnostic plots are more intuitively appealing but subjective at the same time, as they rely on informal human judgement to accept or reject the null hypothesis. *
Q–Q plot In statistics, a Q–Q plot (quantile-quantile plot) is a probability plot, a List of graphical methods, graphical method for comparing two probability distributions by plotting their ''quantiles'' against each other. A point on the plot co ...
, also known as normal probability plot or rankit plot—is a plot of the sorted values from the data set against the expected values of the corresponding quantiles from the standard normal distribution. That is, it's a plot of point of the form (Φ−1(''pk''), ''x''(''k'')), where plotting points ''pk'' are equal to ''pk'' = (''k'' − ''α'')/(''n'' + 1 − 2''α'') and ''α'' is an adjustment constant, which can be anything between 0 and 1. If the null hypothesis is true, the plotted points should approximately lie on a straight line. * P–P plot – similar to the Q–Q plot, but used much less frequently. This method consists of plotting the points (Φ(''z''(''k'')), ''pk''), where \textstyle z_ = (x_-\hat\mu)/\hat\sigma. For normally distributed data this plot should lie on a 45° line between (0, 0) and (1, 1). Goodness-of-fit tests: ''Moment-based tests'': * D'Agostino's K-squared test * Jarque–Bera test * Shapiro–Wilk test: This is based on the fact that the line in the Q–Q plot has the slope of ''σ''. The test compares the least squares estimate of that slope with the value of the sample variance, and rejects the null hypothesis if these two quantities differ significantly. ''Tests based on the empirical distribution function'': * Anderson–Darling test * Lilliefors test (an adaptation of the Kolmogorov–Smirnov test)


Bayesian analysis of the normal distribution

Bayesian analysis of normally distributed data is complicated by the many different possibilities that may be considered: * Either the mean, or the variance, or neither, may be considered a fixed quantity. * When the variance is unknown, analysis may be done directly in terms of the variance, or in terms of the
precision Precision, precise or precisely may refer to: Science, and technology, and mathematics Mathematics and computing (general) * Accuracy and precision, measurement deviation from true value and its scatter * Significant figures, the number of digit ...
, the reciprocal of the variance. The reason for expressing the formulas in terms of precision is that the analysis of most cases is simplified. * Both univariate and multivariate normal distribution, multivariate cases need to be considered. * Either conjugate prior, conjugate or improper prior, improper prior distributions may be placed on the unknown variables. * An additional set of cases occurs in Bayesian linear regression, where in the basic model the data is assumed to be normally distributed, and normal priors are placed on the regression coefficients. The resulting analysis is similar to the basic cases of independent identically distributed data. The formulas for the non-linear-regression cases are summarized in the conjugate prior article.


Sum of two quadratics


= Scalar form

= The following auxiliary formula is useful for simplifying the posterior distribution, posterior update equations, which otherwise become fairly tedious. :a(x-y)^2 + b(x-z)^2 = (a + b)\left(x - \frac\right)^2 + \frac(y-z)^2 This equation rewrites the sum of two quadratics in ''x'' by expanding the squares, grouping the terms in ''x'', and completing the square. Note the following about the complex constant factors attached to some of the terms: # The factor \frac has the form of a weighted average of ''y'' and ''z''. # \frac = \frac = (a^ + b^)^. This shows that this factor can be thought of as resulting from a situation where the Multiplicative inverse, reciprocals of quantities ''a'' and ''b'' add directly, so to combine ''a'' and ''b'' themselves, it's necessary to reciprocate, add, and reciprocate the result again to get back into the original units. This is exactly the sort of operation performed by the harmonic mean, so it is not surprising that \frac is one-half the harmonic mean of ''a'' and ''b''.


= Vector form

= A similar formula can be written for the sum of two vector quadratics: If x, y, z are vectors of length ''k'', and A and B are symmetric matrix, symmetric, invertible matrices of size k\times k, then : \begin & (\mathbf-\mathbf)'\mathbf(\mathbf-\mathbf) + (\mathbf-\mathbf)' \mathbf(\mathbf-\mathbf) \\ = & (\mathbf - \mathbf)'(\mathbf+\mathbf)(\mathbf - \mathbf) + (\mathbf - \mathbf)'(\mathbf^ + \mathbf^)^(\mathbf - \mathbf) \end where :\mathbf = (\mathbf + \mathbf)^(\mathbf\mathbf + \mathbf \mathbf) Note that the form x′ A x is called a
quadratic form In mathematics, a quadratic form is a polynomial with terms all of degree two ("form" is another name for a homogeneous polynomial). For example, :4x^2 + 2xy - 3y^2 is a quadratic form in the variables and . The coefficients usually belong to a ...
and is a scalar (mathematics), scalar: :\mathbf'\mathbf\mathbf = \sum_a_ x_i x_j In other words, it sums up all possible combinations of products of pairs of elements from x, with a separate coefficient for each. In addition, since x_i x_j = x_j x_i, only the sum a_ + a_ matters for any off-diagonal elements of A, and there is no loss of generality in assuming that A is symmetric matrix, symmetric. Furthermore, if A is symmetric, then the form \mathbf'\mathbf\mathbf = \mathbf'\mathbf\mathbf.


Sum of differences from the mean

Another useful formula is as follows: \sum_^n (x_i-\mu)^2 = \sum_^n (x_i-\bar)^2 + n(\bar -\mu)^2 where \bar = \frac \sum_^n x_i.


With known variance

For a set of i.i.d. normally distributed data points X of size ''n'' where each individual point ''x'' follows x \sim \mathcal(\mu, \sigma^2) with known
variance In probability theory and statistics, variance is the expectation of the squared deviation of a random variable from its population mean or sample mean. Variance is a measure of dispersion, meaning it is a measure of how far a set of numbers ...
σ2, the conjugate prior distribution is also normally distributed. This can be shown more easily by rewriting the variance as the
precision Precision, precise or precisely may refer to: Science, and technology, and mathematics Mathematics and computing (general) * Accuracy and precision, measurement deviation from true value and its scatter * Significant figures, the number of digit ...
, i.e. using τ = 1/σ2. Then if x \sim \mathcal(\mu, 1/\tau) and \mu \sim \mathcal(\mu_0, 1/\tau_0), we proceed as follows. First, the likelihood function is (using the formula above for the sum of differences from the mean): :\begin p(\mathbf\mid\mu,\tau) &= \prod_^n \sqrt \exp\left(-\frac\tau(x_i-\mu)^2\right) \\ &= \left(\frac\right)^ \exp\left(-\frac\tau \sum_^n (x_i-\mu)^2\right) \\ &= \left(\frac\right)^ \exp\left[-\frac\tau \left(\sum_^n(x_i-\bar)^2 + n(\bar -\mu)^2\right)\right]. \end Then, we proceed as follows: :\begin p(\mu\mid\mathbf) &\propto p(\mathbf\mid\mu) p(\mu) \\ & = \left(\frac\right)^ \exp\left[-\frac\tau \left(\sum_^n(x_i-\bar)^2 + n(\bar -\mu)^2\right)\right] \sqrt \exp\left(-\frac\tau_0(\mu-\mu_0)^2\right) \\ &\propto \exp\left(-\frac\left(\tau\left(\sum_^n(x_i-\bar)^2 + n(\bar -\mu)^2\right) + \tau_0(\mu-\mu_0)^2\right)\right) \\ &\propto \exp\left(-\frac \left(n\tau(\bar-\mu)^2 + \tau_0(\mu-\mu_0)^2 \right)\right) \\ &= \exp\left(-\frac(n\tau + \tau_0)\left(\mu - \dfrac\right)^2 + \frac(\bar - \mu_0)^2\right) \\ &\propto \exp\left(-\frac(n\tau + \tau_0)\left(\mu - \dfrac\right)^2\right) \end In the above derivation, we used the formula above for the sum of two quadratics and eliminated all constant factors not involving ''μ''. The result is the kernel (statistics), kernel of a normal distribution, with mean \frac and precision n\tau + \tau_0, i.e. :p(\mu\mid\mathbf) \sim \mathcal\left(\frac, \frac\right) This can be written as a set of Bayesian update equations for the posterior parameters in terms of the prior parameters: :\begin \tau_0' &= \tau_0 + n\tau \\[5pt] \mu_0' &= \frac \\[5pt] \bar &= \frac\sum_^n x_i \end That is, to combine ''n'' data points with total precision of ''nτ'' (or equivalently, total variance of ''n''/''σ''2) and mean of values \bar, derive a new total precision simply by adding the total precision of the data to the prior total precision, and form a new mean through a ''precision-weighted average'', i.e. a weighted average of the data mean and the prior mean, each weighted by the associated total precision. This makes logical sense if the precision is thought of as indicating the certainty of the observations: In the distribution of the posterior mean, each of the input components is weighted by its certainty, and the certainty of this distribution is the sum of the individual certainties. (For the intuition of this, compare the expression "the whole is (or is not) greater than the sum of its parts". In addition, consider that the knowledge of the posterior comes from a combination of the knowledge of the prior and likelihood, so it makes sense that we are more certain of it than of either of its components.) The above formula reveals why it is more convenient to do Bayesian analysis of conjugate priors for the normal distribution in terms of the precision. The posterior precision is simply the sum of the prior and likelihood precisions, and the posterior mean is computed through a precision-weighted average, as described above. The same formulas can be written in terms of variance by reciprocating all the precisions, yielding the more ugly formulas :\begin ' &= \frac \\[5pt] \mu_0' &= \frac \\[5pt] \bar &= \frac\sum_^n x_i \end


With known mean

For a set of i.i.d. normally distributed data points X of size ''n'' where each individual point ''x'' follows x \sim \mathcal(\mu, \sigma^2) with known mean μ, the conjugate prior of the
variance In probability theory and statistics, variance is the expectation of the squared deviation of a random variable from its population mean or sample mean. Variance is a measure of dispersion, meaning it is a measure of how far a set of numbers ...
has an inverse gamma distribution or a scaled inverse chi-squared distribution. The two are equivalent 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. The prior for σ2 is as follows: :p(\sigma^2\mid\nu_0,\sigma_0^2) = \frac~\frac \propto \frac The likelihood function from above, written in terms of the variance, is: :\begin p(\mathbf\mid\mu,\sigma^2) &= \left(\frac\right)^ \exp\left[-\frac \sum_^n (x_i-\mu)^2\right] \\ &= \left(\frac\right)^ \exp\left[-\frac\right] \end where :S = \sum_^n (x_i-\mu)^2. Then: :\begin p(\sigma^2\mid\mathbf) &\propto p(\mathbf\mid\sigma^2) p(\sigma^2) \\ &= \left(\frac\right)^ \exp\left[-\frac\right] \frac~\frac \\ &\propto \left(\frac\right)^ \frac \exp\left[-\frac + \frac\right] \\ &= \frac \exp\left[-\frac\right] \end The above is also a scaled inverse chi-squared distribution where :\begin \nu_0' &= \nu_0 + n \\ \nu_0'' &= \nu_0 \sigma_0^2 + \sum_^n (x_i-\mu)^2 \end or equivalently :\begin \nu_0' &= \nu_0 + n \\ ' &= \frac \end Reparameterizing in terms of an inverse gamma distribution, the result is: :\begin \alpha' &= \alpha + \frac \\ \beta' &= \beta + \frac \end


With unknown mean and unknown variance

For a set of i.i.d. normally distributed data points X of size ''n'' where each individual point ''x'' follows x \sim \mathcal(\mu, \sigma^2) with unknown mean μ and unknown
variance In probability theory and statistics, variance is the expectation of the squared deviation of a random variable from its population mean or sample mean. Variance is a measure of dispersion, meaning it is a measure of how far a set of numbers ...
σ2, a combined (multivariate) conjugate prior is placed over the mean and variance, consisting of a normal-inverse-gamma distribution. Logically, this originates as follows: # From the analysis of the case with unknown mean but known variance, we see that the update equations involve sufficient statistics computed from the data consisting of the mean of the data points and the total variance of the data points, computed in turn from the known variance divided by the number of data points. # From the analysis of the case with unknown variance but known mean, we see that the update equations involve sufficient statistics over the data consisting of the number of data points and sum of squared deviations. # Keep in mind that the posterior update values serve as the prior distribution when further data is handled. Thus, we should logically think of our priors in terms of the sufficient statistics just described, with the same semantics kept in mind as much as possible. # To handle the case where both mean and variance are unknown, we could place independent priors over the mean and variance, with fixed estimates of the average mean, total variance, number of data points used to compute the variance prior, and sum of squared deviations. Note however that in reality, the total variance of the mean depends on the unknown variance, and the sum of squared deviations that goes into the variance prior (appears to) depend on the unknown mean. In practice, the latter dependence is relatively unimportant: Shifting the actual mean shifts the generated points by an equal amount, and on average the squared deviations will remain the same. This is not the case, however, with the total variance of the mean: As the unknown variance increases, the total variance of the mean will increase proportionately, and we would like to capture this dependence. # This suggests that we create a ''conditional prior'' of the mean on the unknown variance, with a hyperparameter specifying the mean of the pseudo-observations associated with the prior, and another parameter specifying the number of pseudo-observations. This number serves as a scaling parameter on the variance, making it possible to control the overall variance of the mean relative to the actual variance parameter. The prior for the variance also has two hyperparameters, one specifying the sum of squared deviations of the pseudo-observations associated with the prior, and another specifying once again the number of pseudo-observations. Note that each of the priors has a hyperparameter specifying the number of pseudo-observations, and in each case this controls the relative variance of that prior. These are given as two separate hyperparameters so that the variance (aka the confidence) of the two priors can be controlled separately. # This leads immediately to the normal-inverse-gamma distribution, which is the product of the two distributions just defined, with conjugate priors used (an inverse gamma distribution over the variance, and a normal distribution over the mean, ''conditional'' on the variance) and with the same four parameters just defined. The priors are normally defined as follows: :\begin p(\mu\mid\sigma^2; \mu_0, n_0) &\sim \mathcal(\mu_0,\sigma^2/n_0) \\ p(\sigma^2; \nu_0,\sigma_0^2) &\sim I\chi^2(\nu_0,\sigma_0^2) = IG(\nu_0/2, \nu_0\sigma_0^2/2) \end The update equations can be derived, and look as follows: :\begin \bar &= \frac 1 n \sum_^n x_i \\ \mu_0' &= \frac \\ n_0' &= n_0 + n \\ \nu_0' &= \nu_0 + n \\ \nu_0'' &= \nu_0 \sigma_0^2 + \sum_^n (x_i-\bar)^2 + \frac(\mu_0 - \bar)^2 \end The respective numbers of pseudo-observations add the number of actual observations to them. The new mean hyperparameter is once again a weighted average, this time weighted by the relative numbers of observations. Finally, the update for \nu_0'' is similar to the case with known mean, but in this case the sum of squared deviations is taken with respect to the observed data mean rather than the true mean, and as a result a new "interaction term" needs to be added to take care of the additional error source stemming from the deviation between prior and data mean.


Occurrence and applications

The occurrence of normal distribution in practical problems can be loosely classified into four categories: # Exactly normal distributions; # Approximately normal laws, for example when such approximation is justified by the
central limit theorem In probability theory, the central limit theorem (CLT) establishes that, in many situations, when independent random variables are summed up, their properly normalized sum tends toward a normal distribution even if the original variables themselv ...
; and # Distributions modeled as normal – the normal distribution being the distribution with Principle of maximum entropy, maximum entropy for a given mean and variance. # Regression problems – the normal distribution being found after systematic effects have been modeled sufficiently well.


Exact normality

Certain quantities in physics are distributed normally, as was first demonstrated by James Clerk Maxwell. Examples of such quantities are: * Probability density function of a ground state in a quantum harmonic oscillator. * The position of a particle that experiences diffusion. If initially the particle is located at a specific point (that is its probability distribution is the Dirac delta function), then after time ''t'' its location is described by a normal distribution with variance ''t'', which satisfies the diffusion equation \frac f(x,t) = \frac \frac f(x,t). If the initial location is given by a certain density function g(x), then the density at time ''t'' is the convolution of ''g'' and the normal PDF.


Approximate normality

''Approximately'' normal distributions occur in many situations, as explained by the
central limit theorem In probability theory, the central limit theorem (CLT) establishes that, in many situations, when independent random variables are summed up, their properly normalized sum tends toward a normal distribution even if the original variables themselv ...
. When the outcome is produced by many small effects acting ''additively and independently'', its distribution will be close to normal. The normal approximation will not be valid if the effects act multiplicatively (instead of additively), or if there is a single external influence that has a considerably larger magnitude than the rest of the effects. * In counting problems, where the central limit theorem includes a discrete-to-continuum approximation and where Infinite divisibility, infinitely divisible and Indecomposable distribution, decomposable distributions are involved, such as ** binomial distribution, Binomial random variables, associated with binary response variables; ** Poisson distribution, Poisson random variables, associated with rare events; * Thermal radiation has a Bose–Einstein statistics, Bose–Einstein distribution on very short time scales, and a normal distribution on longer timescales due to the central limit theorem.


Assumed normality

There are statistical methods to empirically test that assumption; see the above #Normality tests, Normality tests section. * In biology, the ''logarithm'' of various variables tend to have a normal distribution, that is, they tend to have a
log-normal distribution In probability theory, a log-normal (or lognormal) distribution is a continuous probability distribution of a random variable whose logarithm is normally distributed. Thus, if the random variable is log-normally distributed, then has a normal ...
(after separation on male/female subpopulations), with examples including: ** Measures of size of living tissue (length, height, skin area, weight); ** The ''length'' of ''inert'' appendages (hair, claws, nails, teeth) of biological specimens, ''in the direction of growth''; presumably the thickness of tree bark also falls under this category; ** Certain physiological measurements, such as blood pressure of adult humans. * In finance, in particular the Black–Scholes model, changes in the ''logarithm'' of exchange rates, price indices, and stock market indices are assumed normal (these variables behave like compound interest, not like simple interest, and so are multiplicative). Some mathematicians such as Benoit Mandelbrot have argued that Levy skew alpha-stable distribution, log-Levy distributions, which possesses heavy tails would be a more appropriate model, in particular for the analysis for stock market crashes. The use of the assumption of normal distribution occurring in financial models has also been criticized by Nassim Nicholas Taleb in his works. * Propagation of uncertainty, Measurement errors in physical experiments are often modeled by a normal distribution. This use of a normal distribution does not imply that one is assuming the measurement errors are normally distributed, rather using the normal distribution produces the most conservative predictions possible given only knowledge about the mean and variance of the errors. * In Standardized testing (statistics), standardized testing, results can be made to have a normal distribution by either selecting the number and difficulty of questions (as in the Intelligence quotient, IQ test) or transforming the raw test scores into "output" scores by fitting them to the normal distribution. For example, the SAT's traditional range of 200–800 is based on a normal distribution with a mean of 500 and a standard deviation of 100. * Many scores are derived from the normal distribution, including percentile ranks ("percentiles" or "quantiles"), normal curve equivalents, stanines, Standard score, z-scores, and T-scores. Additionally, some behavioral statistical procedures assume that scores are normally distributed; for example, Student's t-test, t-tests and Analysis of variance, ANOVAs. Bell curve grading assigns relative grades based on a normal distribution of scores. * In hydrology the distribution of long duration river discharge or rainfall, e.g. monthly and yearly totals, is often thought to be practically normal according to the
central limit theorem In probability theory, the central limit theorem (CLT) establishes that, in many situations, when independent random variables are summed up, their properly normalized sum tends toward a normal distribution even if the original variables themselv ...
. The blue picture, made with CumFreq, illustrates an example of fitting the normal distribution to ranked October rainfalls showing the 90% confidence belt based on the
binomial distribution In probability theory and statistics, the binomial distribution with parameters ''n'' and ''p'' is the discrete probability distribution of the number of successes in a sequence of ''n'' independent experiments, each asking a yes–no quest ...
. The rainfall data are represented by plotting positions as part of the cumulative frequency analysis.


Methodological problems and peer review

John Ioannidis argues that using normally distributed standard deviations as standards for validating research findings leave falsifiability, falsifiable predictions about phenomena that are not normally distributed untested. This includes, for example, phenomena that only appear when all necessary conditions are present and one cannot be a substitute for another in an addition-like way and phenomena that are not randomly distributed. Ioannidis argues that standard deviation-centered validation gives a false appearance of validity to hypotheses and theories where some but not all falsifiable predictions are normally distributed since the portion of falsifiable predictions that there is evidence against may and in some cases are in the non-normally distributed parts of the range of falsifiable predictions, as well as baselessly dismissing hypotheses for which none of the falsifiable predictions are normally distributed as if were they unfalsifiable when in fact they do make falsifiable predictions. It is argued by Ioannidis that many cases of mutually exclusive theories being accepted as "validated" by research journals are caused by failure of the journals to take in empirical falsifications of non-normally distributed predictions, and not because mutually exclusive theories are true, which they cannot be, although two mutually exclusive theories can both be wrong and a third one correct.


Computational methods


Generating values from normal distribution

In computer simulations, especially in applications of the Monte-Carlo method, it is often desirable to generate values that are normally distributed. The algorithms listed below all generate the standard normal deviates, since a can be generated as , where ''Z'' is standard normal. All these algorithms rely on the availability of a random number generator ''U'' capable of producing Uniform distribution (continuous), uniform random variates. * The most straightforward method is based on the probability integral transform property: if ''U'' is distributed uniformly on (0,1), then Φ−1(''U'') will have the standard normal distribution. The drawback of this method is that it relies on calculation of the
probit function In probability theory and statistics, the probit function is the quantile function associated with the standard normal distribution. It has applications in data analysis and machine learning, in particular exploratory statistical graphics and ...
Φ−1, which cannot be done analytically. Some approximate methods are described in and in the error function, erf article. Wichura gives a fast algorithm for computing this function to 16 decimal places, which is used by R programming language, R to compute random variates of the normal distribution. * Irwin–Hall distribution#Approximating a Normal distribution, An easy-to-program approximate approach that relies on the
central limit theorem In probability theory, the central limit theorem (CLT) establishes that, in many situations, when independent random variables are summed up, their properly normalized sum tends toward a normal distribution even if the original variables themselv ...
is as follows: generate 12 uniform ''U''(0,1) deviates, add them all up, and subtract 6 – the resulting random variable will have approximately standard normal distribution. In truth, the distribution will be Irwin–Hall distribution, Irwin–Hall, which is a 12-section eleventh-order polynomial approximation to the normal distribution. This random deviate will have a limited range of (−6, 6). Note that in a true normal distribution, only 0.00034% of all samples will fall outside ±6σ. * The Box–Muller transform, Box–Muller method uses two independent random numbers ''U'' and ''V'' distributed uniform distribution (continuous), uniformly on (0,1). Then the two random variables ''X'' and ''Y'' X = \sqrt \, \cos(2 \pi V) , \qquad Y = \sqrt \, \sin(2 \pi V) . will both have the standard normal distribution, and will be
independent Independent or Independents may refer to: Arts, entertainment, and media Artist groups * Independents (artist group), a group of modernist painters based in the New Hope, Pennsylvania, area of the United States during the early 1930s * Independ ...
. This formulation arises because for a bivariate normal random vector (''X'', ''Y'') the squared norm will have the
chi-squared distribution In probability theory and statistics, the chi-squared distribution (also chi-square or \chi^2-distribution) with k degrees of freedom is the distribution of a sum of the squares of k independent standard normal random variables. The chi-squa ...
with two degrees of freedom, which is an easily generated exponential distribution, exponential random variable corresponding to the quantity −2ln(''U'') in these equations; and the angle is distributed uniformly around the circle, chosen by the random variable ''V''. * The Marsaglia polar method is a modification of the Box–Muller method which does not require computation of the sine and cosine functions. In this method, ''U'' and ''V'' are drawn from the uniform (−1,1) distribution, and then is computed. If ''S'' is greater or equal to 1, then the method starts over, otherwise the two quantities X = U\sqrt, \qquad Y = V\sqrt are returned. Again, ''X'' and ''Y'' are independent, standard normal random variables. * The Ratio method is a rejection method. The algorithm proceeds as follows: ** Generate two independent uniform deviates ''U'' and ''V''; ** Compute ''X'' = (''V'' − 0.5)/''U''; ** Optional: if ''X''2 ≤ 5 − 4''e''1/4''U'' then accept ''X'' and terminate algorithm; ** Optional: if ''X''2 ≥ 4''e''−1.35/''U'' + 1.4 then reject ''X'' and start over from step 1; ** If ''X''2 ≤ −4 ln''U'' then accept ''X'', otherwise start over the algorithm. *:The two optional steps allow the evaluation of the logarithm in the last step to be avoided in most cases. These steps can be greatly improved so that the logarithm is rarely evaluated. * The ziggurat algorithm is faster than the Box–Muller transform and still exact. In about 97% of all cases it uses only two random numbers, one random integer and one random uniform, one multiplication and an if-test. Only in 3% of the cases, where the combination of those two falls outside the "core of the ziggurat" (a kind of rejection sampling using logarithms), do exponentials and more uniform random numbers have to be employed. * Integer arithmetic can be used to sample from the standard normal distribution. This method is exact in the sense that it satisfies the conditions of ''ideal approximation''; i.e., it is equivalent to sampling a real number from the standard normal distribution and rounding this to the nearest representable floating point number. * There is also some investigation into the connection between the fast Hadamard transform and the normal distribution, since the transform employs just addition and subtraction and by the central limit theorem random numbers from almost any distribution will be transformed into the normal distribution. In this regard a series of Hadamard transforms can be combined with random permutations to turn arbitrary data sets into a normally distributed data.


Numerical approximations for the normal CDF and normal quantile function

The standard normal cumulative distribution function, CDF is widely used in scientific and statistical computing. The values Φ(''x'') may be approximated very accurately by a variety of methods, such as numerical integration, Taylor series, asymptotic series and Gauss's continued fraction#Of Kummer's confluent hypergeometric function, continued fractions. Different approximations are used depending on the desired level of accuracy. * give the approximation for Φ(''x'') for ''x > 0'' with the absolute error (algorith
26.2.17
: \Phi(x) = 1 - \varphi(x)\left(b_1 t + b_2 t^2 + b_3t^3 + b_4 t^4 + b_5 t^5\right) + \varepsilon(x), \qquad t = \frac, where ''ϕ''(''x'') is the standard normal PDF, and ''b''0 = 0.2316419, ''b''1 = 0.319381530, ''b''2 = −0.356563782, ''b''3 = 1.781477937, ''b''4 = −1.821255978, ''b''5 = 1.330274429. * lists some dozens of approximations – by means of rational functions, with or without exponentials – for the function. His algorithms vary in the degree of complexity and the resulting precision, with maximum absolute precision of 24 digits. An algorithm by combines Hart's algorithm 5666 with a continued fraction approximation in the tail to provide a fast computation algorithm with a 16-digit precision. * after recalling Hart68 solution is not suited for erf, gives a solution for both erf and erfc, with maximal relative error bound, via rational function, Rational Chebyshev Approximation. * suggested a simple algorithm based on the Taylor series expansion \Phi(x) = \frac12 + \varphi(x)\left( x + \frac 3 + \frac + \frac + \frac + \cdots \right) for calculating with arbitrary precision. The drawback of this algorithm is comparatively slow calculation time (for example it takes over 300 iterations to calculate the function with 16 digits of precision when ). * The GNU Scientific Library calculates values of the standard normal CDF using Hart's algorithms and approximations with Chebyshev polynomials. Shore (1982) introduced simple approximations that may be incorporated in stochastic optimization models of engineering and operations research, like reliability engineering and inventory analysis. Denoting , the simplest approximation for the quantile function is: z = \Phi^(p)=5.5556\left[1- \left( \frac p \right)^\right],\qquad p\ge 1/2 This approximation delivers for ''z'' a maximum absolute error of 0.026 (for , corresponding to ). For replace ''p'' by and change sign. Another approximation, somewhat less accurate, is the single-parameter approximation: z=-0.4115\left\, \qquad p\ge 1/2 The latter had served to derive a simple approximation for the loss integral of the normal distribution, defined by \begin L(z) & =\int_z^\infty (u-z)\varphi(u) \, du=\int_z^\infty [1-\Phi (u)] \, du \\[5pt] L(z) & \approx \begin 0.4115\left(\dfrac p \right) - z, & p<1/2, \\ \\ 0.4115\left( \dfrac p \right), & p\ge 1/2. \end \\[5pt] \text \\ L(z) & \approx \begin 0.4115\left\, & p < 1/2, \\ \\ 0.4115 \dfrac p, & p\ge 1/2. \end \end This approximation is particularly accurate for the right far-tail (maximum error of 10−3 for z≥1.4). Highly accurate approximations for the CDF, based on Response modeling methodology, Response Modeling Methodology (RMM, Shore, 2011, 2012), are shown in Shore (2005). Some more approximations can be found at: Error function#Approximation with elementary functions. In particular, small ''relative'' error on the whole domain for the CDF \Phi and the quantile function \Phi^ as well, is achieved via an explicitly invertible formula by Sergei Winitzki in 2008.


History


Development

Some authors attribute the credit for the discovery of the normal distribution to Abraham de Moivre, de Moivre, who in 1738 published in the second edition of his "''The Doctrine of Chances''" the study of the coefficients in the binomial expansion of . De Moivre proved that the middle term in this expansion has the approximate magnitude of 2^n/\sqrt, and that "If ''m'' or ''n'' be a Quantity infinitely great, then the Logarithm of the Ratio, which a Term distant from the middle by the Interval ''ℓ'', has to the middle Term, is -\frac." Although this theorem can be interpreted as the first obscure expression for the normal probability law, Stephen Stigler, Stigler points out that de Moivre himself did not interpret his results as anything more than the approximate rule for the binomial coefficients, and in particular de Moivre lacked the concept of the probability density function. In 1823 Carl Friedrich Gauss, Gauss published his monograph "''Theoria combinationis observationum erroribus minimis obnoxiae''" where among other things he introduces several important statistical concepts, such as the method of least squares, the method of maximum likelihood, and the ''normal distribution''. Gauss used ''M'', , to denote the measurements of some unknown quantity ''V'', and sought the "most probable" estimator of that quantity: the one that maximizes the probability of obtaining the observed experimental results. In his notation φΔ is the probability density function of the measurement errors of magnitude Δ. Not knowing what the function ''φ'' is, Gauss requires that his method should reduce to the well-known answer: the arithmetic mean of the measured values. Starting from these principles, Gauss demonstrates that the only law that rationalizes the choice of arithmetic mean as an estimator of the location parameter, is the normal law of errors: \varphi\mathit = \frac h \, e^, where ''h'' is "the measure of the precision of the observations". Using this normal law as a generic model for errors in the experiments, Gauss formulates what is now known as the non-linear least squares, non-linear weighted least squares method. Although Gauss was the first to suggest the normal distribution law, Pierre Simon de Laplace, Laplace made significant contributions. It was Laplace who first posed the problem of aggregating several observations in 1774, although his own solution led to the Laplacian distribution. It was Laplace who first calculated the value of the Gaussian integral, integral in 1782, providing the normalization constant for the normal distribution. Finally, it was Laplace who in 1810 proved and presented to the Academy the fundamental
central limit theorem In probability theory, the central limit theorem (CLT) establishes that, in many situations, when independent random variables are summed up, their properly normalized sum tends toward a normal distribution even if the original variables themselv ...
, which emphasized the theoretical importance of the normal distribution. It is of interest to note that in 1809 an Irish-American mathematician Robert Adrain published two insightful but flawed derivations of the normal probability law, simultaneously and independently from Gauss. His works remained largely unnoticed by the scientific community, until in 1871 they were exhumed by Cleveland Abbe, Abbe. In the middle of the 19th century James Clerk Maxwell, Maxwell demonstrated that the normal distribution is not just a convenient mathematical tool, but may also occur in natural phenomena: "The number of particles whose velocity, resolved in a certain direction, lies between ''x'' and ''x'' + ''dx'' is \operatorname \frac\; e^ \, dx


Naming

Today, the concept is usually known in English as the normal distribution or Gaussian distribution. Other less common names include Gauss distribution, Laplace-Gauss distribution, the law of error, the law of facility of errors, Laplace's second law, Gaussian law. Gauss himself apparently coined the term with reference to the "normal equations" involved in its applications, with normal having its technical meaning of orthogonal rather than "usual". However, by the end of the 19th century some authors had started using the name ''normal distribution'', where the word "normal" was used as an adjective – the term now being seen as a reflection of the fact that this distribution was seen as typical, common – and thus "normal". Charles Sanders Peirce, Peirce (one of those authors) once defined "normal" thus: "...the 'normal' is not the average (or any other kind of mean) of what actually occurs, but of what ''would'', in the long run, occur under certain circumstances." Around the turn of the 20th century Karl Pearson, Pearson popularized the term ''normal'' as a designation for this distribution. Also, it was Pearson who first wrote the distribution in terms of the standard deviation ''σ'' as in modern notation. Soon after this, in year 1915, Ronald Fisher, Fisher added the location parameter to the formula for normal distribution, expressing it in the way it is written nowadays: df = \frac e^ \, dx. The term "standard normal", which denotes the normal distribution with zero mean and unit variance came into general use around the 1950s, appearing in the popular textbooks by P. G. Hoel (1947) "''Introduction to mathematical statistics''" and A. M. Mood (1950) "''Introduction to the theory of statistics''".


See also

* Bates distribution – similar to the Irwin–Hall distribution, but rescaled back into the 0 to 1 range * Behrens–Fisher problem – the long-standing problem of testing whether two normal samples with different variances have same means; * Bhattacharyya distance – method used to separate mixtures of normal distributions * Erdős–Kac theorem – on the occurrence of the normal distribution in number theory * Full width at half maximum * Gaussian blur – convolution, which uses the normal distribution as a kernel * Modified half-normal distribution with the pdf on (0, \infty) is given as f(x)= \frac, where \Psi(\alpha,z)=_1\Psi_1\left(\begin\left(\alpha,\frac\right)\\(1,0)\end;z \right) denotes the Fox-Wright Psi function. * Normally distributed and uncorrelated does not imply independent * Ratio normal distribution * Reciprocal normal distribution * Standard normal table * Stein's lemma * Sub-Gaussian distribution * Sum of normally distributed random variables * Tweedie distribution – The normal distribution is a member of the family of Tweedie exponential dispersion models. * Wrapped normal distribution – the Normal distribution applied to a circular domain * Z-test – using the normal distribution


Notes


References


Citations


Sources

* * In particular, the entries fo
"bell-shaped and bell curve"
an

* * * * * * * * * * * * * * * * * * * * * * * * Translated by Stephen M. Stigler in ''Statistical Science'' 1 (3), 1986: . * * * * * * * * * * * * * * * * * * * * * * * * * * * *


External links

*
Normal distribution calculator
{{Authority control Normal distribution, Continuous distributions Conjugate prior distributions Exponential family distributions Stable distributions Location-scale family probability distributions]">X - \mu, ^p\right&= \sigma^p (p-1)!! \cdot \begin \sqrt & \textp\text \\ 1 & \textp\text \end \\ &= \sigma^p \cdot \frac. \end The last formula is valid also for any non-integer p>-1. When the mean \mu \ne 0, the plain and absolute moments can be expressed in terms of
confluent hypergeometric function In mathematics, a confluent hypergeometric function is a solution of a confluent hypergeometric equation, which is a degenerate form of a hypergeometric differential equation where two of the three regular singularities merge into an irregular ...
s _1F_1 and U. :\begin \operatorname\left ^p\right&= \sigma^p\cdot (-i\sqrt 2)^p U\left(-\frac, \frac, -\frac \left( \frac \mu \sigma \right)^2 \right), \\ \operatorname\left[, X, ^p \right] &= \sigma^p \cdot 2^ \frac _1F_1\left( -\frac, \frac, -\frac \left( \frac \mu \sigma \right)^2 \right). \end These expressions remain valid even if p is not an integer. See also Hermite polynomials#"Negative variance", generalized Hermite polynomials. The expectation of X conditioned on the event that X lies in an interval ,b/math> is given by :\operatorname\left \mid a= \mu - \sigma^2\frac where f and F respectively are the density and the cumulative distribution function of X. For b=\infty this is known as the
inverse Mills ratio In probability theory, the Mills ratio (or Mills's ratio) of a continuous random variable X is the function : m(x) := \frac , where f(x) is the probability density function, and :\bar(x) := \Pr x.html" ;"title=">x">>x= \int_x^ f(u)\, du is the ...
. Note that above, density f of X is used instead of standard normal density as in inverse Mills ratio, so here we have \sigma^2 instead of \sigma.


Fourier transform and characteristic function

The
Fourier transform A Fourier transform (FT) is a mathematical transform that decomposes functions into frequency components, which are represented by the output of the transform as a function of frequency. Most commonly functions of time or space are transformed, ...
of a normal density f with mean \mu and standard deviation \sigma is : \hat f(t) = \int_^\infty f(x)e^ \, dx = e^ e^ where i is the
imaginary unit The imaginary unit or unit imaginary number () is a solution to the quadratic equation x^2+1=0. Although there is no real number with this property, can be used to extend the real numbers to what are called complex numbers, using addition an ...
. If the mean \mu=0, the first factor is 1, and the Fourier transform is, apart from a constant factor, a normal density on the
frequency domain In physics, electronics, control systems engineering, and statistics, the frequency domain refers to the analysis of mathematical functions or signals with respect to frequency, rather than time. Put simply, a time-domain graph shows how a signa ...
, with mean 0 and standard deviation 1/\sigma. In particular, the standard normal distribution \varphi is an
eigenfunction In mathematics, an eigenfunction of a linear operator ''D'' defined on some function space is any non-zero function f in that space that, when acted upon by ''D'', is only multiplied by some scaling factor called an eigenvalue. As an equation, th ...
of the Fourier transform. In probability theory, the Fourier transform of the probability distribution of a real-valued random variable X is closely connected to the
characteristic function In mathematics, the term "characteristic function" can refer to any of several distinct concepts: * The indicator function of a subset, that is the function ::\mathbf_A\colon X \to \, :which for a given subset ''A'' of ''X'', has value 1 at points ...
\varphi_X(t) of that variable, which is defined as the
expected value In probability theory, the expected value (also called expectation, expectancy, mathematical expectation, mean, average, or first moment) is a generalization of the weighted average. Informally, the expected value is the arithmetic mean of a l ...
of e^, as a function of the real variable t (the
frequency Frequency is the number of occurrences of a repeating event per unit of time. It is also occasionally referred to as ''temporal frequency'' for clarity, and is distinct from ''angular frequency''. Frequency is measured in hertz (Hz) which is eq ...
parameter of the Fourier transform). This definition can be analytically extended to a complex-value variable t. The relation between both is: :\varphi_X(t) = \hat f(-t)


Moment and cumulant generating functions

The
moment generating function In probability theory and statistics, the moment-generating function of a real-valued random variable is an alternative specification of its probability distribution. Thus, it provides the basis of an alternative route to analytical results compare ...
of a real random variable X is the expected value of e^, as a function of the real parameter t. For a normal distribution with density f, mean \mu and deviation \sigma, the moment generating function exists and is equal to :M(t) = \operatorname ^= \hat f(it) = e^ e^ The
cumulant generating function In probability theory and statistics, the cumulants of a probability distribution are a set of quantities that provide an alternative to the '' moments'' of the distribution. Any two probability distributions whose moments are identical will have ...
is the logarithm of the moment generating function, namely :g(t) = \ln M(t) = \mu t + \tfrac 12 \sigma^2 t^2 Since this is a quadratic polynomial in t, only the first two
cumulant In probability theory and statistics, the cumulants of a probability distribution are a set of quantities that provide an alternative to the '' moments'' of the distribution. Any two probability distributions whose moments are identical will ha ...
s are nonzero, namely the mean \mu and the variance \sigma^2.


Stein operator and class

Within
Stein's method Stein's method is a general method in probability theory to obtain bounds on the distance between two probability distributions with respect to a probability metric. It was introduced by Charles Stein, who first published it in 1972, to obtain ...
the Stein operator and class of a random variable X \sim \mathcal(\mu, \sigma^2) are \mathcalf(x) = \sigma^2 f'(x) - (x-\mu)f(x) and \mathcal the class of all absolutely continuous functions f : \R \to \R \mbox\mathbb[, f'(X), ]< \infty.


Zero-variance limit

In the limit (mathematics), limit when \sigma tends to zero, the probability density f(x) eventually tends to zero at any x\ne \mu, but grows without limit if x = \mu, while its integral remains equal to 1. Therefore, the normal distribution cannot be defined as an ordinary
function Function or functionality may refer to: Computing * Function key, a type of key on computer keyboards * Function model, a structured representation of processes in a system * Function object or functor or functionoid, a concept of object-oriente ...
when \sigma = 0. However, one can define the normal distribution with zero variance as a
generalized function In mathematics, generalized functions are objects extending the notion of functions. There is more than one recognized theory, for example the theory of distributions. Generalized functions are especially useful in making discontinuous functions ...
; specifically, as Dirac's "delta function" \delta translated by the mean \mu, that is f(x)=\delta(x-\mu). Its CDF is then the
Heaviside step function The Heaviside step function, or the unit step function, usually denoted by or (but sometimes , or ), is a step function, named after Oliver Heaviside (1850–1925), the value of which is zero for negative arguments and one for positive argume ...
translated by the mean \mu, namely :F(x) = \begin 0 & \textx < \mu \\ 1 & \textx \geq \mu \end


Maximum entropy

Of all probability distributions over the reals with a specified mean \mu and variance \sigma^2, the normal distribution N(\mu,\sigma^2) is the one with maximum entropy. If X is a
continuous random variable In probability theory and statistics, a probability distribution is the mathematical function that gives the probabilities of occurrence of different possible outcomes for an experiment. It is a mathematical description of a random phenomenon i ...
with
probability density In probability theory, a probability density function (PDF), or density of a continuous random variable, is a function whose value at any given sample (or point) in the sample space (the set of possible values taken by the random variable) can ...
f(x), then the entropy of X is defined as : H(X) = - \int_^\infty f(x)\log f(x)\, dx where f(x)\log f(x) is understood to be zero whenever f(x)=0. This functional can be maximized, subject to the constraints that the distribution is properly normalized and has a specified variance, by using
variational calculus The calculus of variations (or Variational Calculus) is a field of mathematical analysis that uses variations, which are small changes in functions and functionals, to find maxima and minima of functionals: mappings from a set of functions t ...
. A function with two
Lagrange multipliers In mathematical optimization, the method of Lagrange multipliers is a strategy for finding the local maxima and minima of a function subject to equality constraints (i.e., subject to the condition that one or more equations have to be satisfied ex ...
is defined: : L=\int_^\infty f(x)\ln(f(x))\,dx-\lambda_0\left(1-\int_^\infty f(x)\,dx\right)-\lambda\left(\sigma^2-\int_^\infty f(x)(x-\mu)^2\,dx\right) where f(x) is, for now, regarded as some density function with mean \mu and standard deviation \sigma. At maximum entropy, a small variation \delta f(x) about f(x) will produce a variation \delta L about L which is equal to 0: : 0=\delta L=\int_^\infty \delta f(x)\left (\ln(f(x))+1+\lambda_0+\lambda(x-\mu)^2\right )\,dx Since this must hold for any small \delta f(x), the term in brackets must be zero, and solving for f(x) yields: :f(x)=e^ Using the constraint equations to solve for \lambda_0 and \lambda yields the density of the normal distribution: : f(x, \mu, \sigma)=\frace^ The entropy of a normal distribution is equal to : H(X)=\tfrac(1+\log(2\sigma^2\pi))


Other properties


Related distributions


Central limit theorem

The central limit theorem states that under certain (fairly common) conditions, the sum of many random variables will have an approximately normal distribution. More specifically, where X_1,\ldots ,X_n are
independent and identically distributed In probability theory and statistics, a collection of random variables is independent and identically distributed if each random variable has the same probability distribution as the others and all are mutually independent. This property is usua ...
random variables with the same arbitrary distribution, zero mean, and variance \sigma^2 and Z is their mean scaled by \sqrt : Z = \sqrt\left(\frac\sum_^n X_i\right) Then, as n increases, the probability distribution of Z will tend to the normal distribution with zero mean and variance \sigma^2. The theorem can be extended to variables (X_i) that are not independent and/or not identically distributed if certain constraints are placed on the degree of dependence and the moments of the distributions. Many
test statistic A test statistic is a statistic (a quantity derived from the sample) used in statistical hypothesis testing.Berger, R. L.; Casella, G. (2001). ''Statistical Inference'', Duxbury Press, Second Edition (p.374) A hypothesis test is typically specif ...
s, scores, and
estimator In statistics, an estimator is a rule for calculating an estimate of a given quantity based on observed data: thus the rule (the estimator), the quantity of interest (the estimand) and its result (the estimate) are distinguished. For example, the ...
s encountered in practice contain sums of certain random variables in 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 distributions. The central limit theorem also implies that certain distributions can be approximated by the normal distribution, for example: * The
binomial distribution In probability theory and statistics, the binomial distribution with parameters ''n'' and ''p'' is the discrete probability distribution of the number of successes in a sequence of ''n'' independent experiments, each asking a yes–no quest ...
B(n,p) is approximately normal with mean np and variance np(1-p) for large n and for p not too close to 0 or 1. * The
Poisson distribution In probability theory and statistics, the Poisson distribution is a discrete probability distribution that expresses the probability of a given number of events occurring in a fixed interval of time or space if these events occur with a known co ...
with parameter \lambda is approximately normal with mean \lambda and variance \lambda, for large values of \lambda. * The
chi-squared distribution In probability theory and statistics, the chi-squared distribution (also chi-square or \chi^2-distribution) with k degrees of freedom is the distribution of a sum of the squares of k independent standard normal random variables. The chi-squa ...
\chi^2(k) is approximately normal with mean k and variance 2k, for large k. * The
Student's t-distribution In probability and statistics, Student's ''t''-distribution (or simply the ''t''-distribution) is any member of a family of continuous probability distributions that arise when estimating the mean of a normally distributed population in sit ...
t(\nu) is approximately normal with mean 0 and variance 1 when \nu is large. Whether these approximations are sufficiently accurate depends on the purpose for which they are needed, and the rate of convergence to the normal distribution. It is typically the case that such approximations are less accurate in the tails of the distribution. A general upper bound for the approximation error in the central limit theorem is given by the
Berry–Esseen theorem In probability theory, the central limit theorem states that, under certain circumstances, the probability distribution of the scaled mean of a random sample converges to a normal distribution as the sample size increases to infinity. Under strong ...
, improvements of the approximation are given by the
Edgeworth expansion The Gram–Charlier A series (named in honor of Jørgen Pedersen Gram and Carl Charlier), and the Edgeworth series (named in honor of Francis Ysidro Edgeworth) are series that approximate a probability distribution in terms of its cumulants. The se ...
s. This theorem can also be used to justify modeling the sum of many uniform noise sources as
Gaussian noise Gaussian noise, named after Carl Friedrich Gauss, is a term from signal processing theory denoting a kind of signal noise that has a probability density function (pdf) equal to that of the normal distribution (which is also known as the Gaussia ...
. See
AWGN Additive white Gaussian noise (AWGN) is a basic noise model used in information theory to mimic the effect of many random processes that occur in nature. The modifiers denote specific characteristics: * ''Additive'' because it is added to any nois ...
.


Operations and functions of normal variables

The
probability density In probability theory, a probability density function (PDF), or density of a continuous random variable, is a function whose value at any given sample (or point) in the sample space (the set of possible values taken by the random variable) can ...
,
cumulative distribution In statistics, the frequency (or absolute frequency) of an event i is the number n_i of times the observation has occurred/recorded in an experiment or study. These frequencies are often depicted graphically or in tabular form. Types The cumul ...
, and inverse cumulative distribution of any function of one or more independent or correlated normal variables can be computed with the numerical method of ray-tracing
Matlab code
. In the following sections we look at some special cases.


Operations on a single normal variable

If X is distributed normally with mean \mu and variance \sigma^2, then * aX+b, for any real numbers a and b, is also normally distributed, with mean a\mu+b and standard deviation , a, \sigma. That is, the family of normal distributions is closed under linear transformations. * The exponential of X is distributed log-normally: . * The absolute value of X has
folded normal distribution The folded normal distribution is a probability distribution related to the normal distribution. Given a normally distributed random variable ''X'' with mean ''μ'' and variance ''σ''2, the random variable ''Y'' = , ''X'', has a folded normal d ...
: . If \mu = 0 this is known as the
half-normal distribution In probability theory and statistics, the half-normal distribution is a special case of the folded normal distribution. Let X follow an ordinary normal distribution, N(0,\sigma^2). Then, Y=, X, follows a half-normal distribution. Thus, the hal ...
. * The absolute value of normalized residuals, , ''X'' − ''μ'', /''σ'', has
chi distribution In probability theory and statistics, the chi distribution is a continuous probability distribution. It is the distribution of the positive square root of the sum of squares of a set of independent random variables each following a standard norm ...
with one degree of freedom: , X - \mu, / \sigma \sim \chi_1. * The square of ''X''/''σ'' has the
noncentral chi-squared distribution In probability theory and statistics, the noncentral chi-squared distribution (or noncentral chi-square distribution, noncentral \chi^2 distribution) is a noncentral generalization of the chi-squared distribution. It often arises in the power a ...
with one degree of freedom: X^2 / \sigma^2 \sim \chi_1^2(\mu^2 / \sigma^2). If \mu = 0, the distribution is called simply chi-squared. * The log likelihood of a normal variable x is simply the log of its
probability density function In probability theory, a probability density function (PDF), or density of a continuous random variable, is a function whose value at any given sample (or point) in the sample space (the set of possible values taken by the random variable) can ...
: \ln p(x)= -\frac \left(\frac \right)^2 -\ln \left(\sigma \sqrt \right) = -\frac z^2 -\ln \left(\sigma \sqrt \right). Since this is a scaled and shifted square of a standard normal variable, it is distributed as a scaled and shifted chi-squared variable. * The distribution of the variable ''X'' restricted to an interval 'a'', ''b''is called the
truncated normal distribution In probability and statistics, the truncated normal distribution is the probability distribution derived from that of a normally distributed random variable by bounding the random variable from either below or above (or both). The truncated no ...
. * (''X'' − ''μ'')−2 has a
Lévy distribution In probability theory and statistics, the Lévy distribution, named after Paul Lévy, is a continuous probability distribution for a non-negative random variable. In spectroscopy, this distribution, with frequency as the dependent variable, is kn ...
with location 0 and scale ''σ''−2.


= Operations on two independent normal variables

= * If X_1 and X_2 are two
independent Independent or Independents may refer to: Arts, entertainment, and media Artist groups * Independents (artist group), a group of modernist painters based in the New Hope, Pennsylvania, area of the United States during the early 1930s * Independ ...
normal random variables, with means \mu_1, \mu_2 and standard deviations \sigma_1, \sigma_2, then their sum X_1 + X_2 will also be normally distributed, roof/sup> with mean \mu_1 + \mu_2 and variance \sigma_1^2 + \sigma_2^2. * In particular, if X and Y are independent normal deviates with zero mean and variance \sigma^2, then X + Y and X - Y are also independent and normally distributed, with zero mean and variance 2\sigma^2. This is a special case of the
polarization identity In linear algebra, a branch of mathematics, the polarization identity is any one of a family of formulas that express the inner product of two vectors in terms of the norm of a normed vector space. If a norm arises from an inner product then t ...
. * If X_1, X_2 are two independent normal deviates with mean \mu and deviation \sigma, and a, b are arbitrary real numbers, then the variable X_3 = \frac + \mu is also normally distributed with mean \mu and deviation \sigma. It follows that the normal distribution is
stable A stable is a building in which livestock, especially horses, are kept. It most commonly means a building that is divided into separate stalls for individual animals and livestock. There are many different types of stables in use today; the ...
(with exponent \alpha=2).


= Operations on two independent standard normal variables

= If X_1 and X_2 are two independent standard normal random variables with mean 0 and variance 1, then * Their sum and difference is distributed normally with mean zero and variance two: X_1 \pm X_2 \sim N(0, 2). * Their product Z = X_1 X_2 follows the
product distribution A product distribution is a probability distribution constructed as the distribution of the product of random variables having two other known distributions. Given two statistically independent random variables ''X'' and ''Y'', the distribution of ...
with density function f_Z(z) = \pi^ K_0(, z, ) where K_0 is the
modified Bessel function of the second kind Bessel functions, first defined by the mathematician Daniel Bernoulli and then generalized by Friedrich Bessel, are canonical solutions of Bessel's differential equation x^2 \frac + x \frac + \left(x^2 - \alpha^2 \right)y = 0 for an arbitrary ...
. This distribution is symmetric around zero, unbounded at z = 0, and has the
characteristic function In mathematics, the term "characteristic function" can refer to any of several distinct concepts: * The indicator function of a subset, that is the function ::\mathbf_A\colon X \to \, :which for a given subset ''A'' of ''X'', has value 1 at points ...
\phi_Z(t) = (1 + t^2)^. * Their ratio follows the standard
Cauchy distribution The Cauchy distribution, named after Augustin Cauchy, is a continuous probability distribution. It is also known, especially among physicists, as the Lorentz distribution (after Hendrik Lorentz), Cauchy–Lorentz distribution, Lorentz(ian) fun ...
: X_1/ X_2 \sim \operatorname(0, 1). * Their Euclidean norm \sqrt has the
Rayleigh distribution In probability theory and statistics, the Rayleigh distribution is a continuous probability distribution for nonnegative-valued random variables. Up to rescaling, it coincides with the chi distribution with two degrees of freedom. The distribut ...
.


Operations on multiple independent normal variables

* Any linear combination of independent normal deviates is a normal deviate. * If X_1, X_2, \ldots, X_n are independent standard normal random variables, then the sum of their squares has the
chi-squared distribution In probability theory and statistics, the chi-squared distribution (also chi-square or \chi^2-distribution) with k degrees of freedom is the distribution of a sum of the squares of k independent standard normal random variables. The chi-squa ...
with n degrees of freedom X_1^2 + \cdots + X_n^2 \sim \chi_n^2. * If X_1, X_2, \ldots, X_n are independent normally distributed random variables with means \mu and variances \sigma^2, then their
sample mean The sample mean (or "empirical mean") and the sample covariance are statistics computed from a Sample (statistics), sample of data on one or more random variables. The sample mean is the average value (or mean, mean value) of a sample (statistic ...
is independent from the sample
standard deviation In statistics, the standard deviation is a measure of the amount of variation or dispersion of a set of values. A low standard deviation indicates that the values tend to be close to the mean (also called the expected value) of the set, while ...
, which can be demonstrated using Basu's theorem or
Cochran's theorem In statistics, Cochran's theorem, devised by William G. Cochran, is a theorem used to justify results relating to the probability distributions of statistics that are used in the analysis of variance. Statement Let ''U''1, ..., ''U'N'' be i.i. ...
. The ratio of these two quantities will have the
Student's t-distribution In probability and statistics, Student's ''t''-distribution (or simply the ''t''-distribution) is any member of a family of continuous probability distributions that arise when estimating the mean of a normally distributed population in sit ...
with n-1 degrees of freedom: t = \frac = \frac \sim t_. * If X_1, X_2, \ldots, X_n, Y_1, Y_2, \ldots, Y_m are independent standard normal random variables, then the ratio of their normalized sums of squares will have the with degrees of freedom: F = \frac \sim F_.


Operations on multiple correlated normal variables

* A
quadratic form In mathematics, a quadratic form is a polynomial with terms all of degree two ("form" is another name for a homogeneous polynomial). For example, :4x^2 + 2xy - 3y^2 is a quadratic form in the variables and . The coefficients usually belong to a ...
of a normal vector, i.e. a quadratic function q = \sum x_i^2 + \sum x_j + c of multiple independent or correlated normal variables, is a generalized chi-square variable.


Operations on the density function

The split normal distribution is most directly defined in terms of joining scaled sections of the density functions of different normal distributions and rescaling the density to integrate to one. The
truncated normal distribution In probability and statistics, the truncated normal distribution is the probability distribution derived from that of a normally distributed random variable by bounding the random variable from either below or above (or both). The truncated no ...
results from rescaling a section of a single density function.


Infinite divisibility and Cramér's theorem

For any positive integer \text, any normal distribution with mean \mu and variance \sigma^2 is the distribution of the sum of \text independent normal deviates, each with mean \frac and variance \frac. This property is called
infinite divisibility Infinite divisibility arises in different ways in philosophy, physics, economics, order theory (a branch of mathematics), and probability theory (also a branch of mathematics). One may speak of infinite divisibility, or the lack thereof, of matter ...
. Conversely, if X_1 and X_2 are independent random variables and their sum X_1+X_2 has a normal distribution, then both X_1 and X_2 must be normal deviates. This result is known as Cramér's decomposition theorem, and is equivalent to saying that the convolution of two distributions is normal if and only if both are normal. Cramér's theorem implies that a linear combination of independent non-Gaussian variables will never have an exactly normal distribution, although it may approach it arbitrarily closely.


Bernstein's theorem

Bernstein's theorem states that if X and Y are independent and X + Y and X - Y are also independent, then both ''X'' and ''Y'' must necessarily have normal distributions. More generally, if X_1, \ldots, X_n are independent random variables, then two distinct linear combinations \sum and \sumwill be independent if and only if all X_k are normal and \sum, where \sigma_k^2 denotes the variance of X_k.


Extensions

The notion of normal distribution, being one of the most important distributions in probability theory, has been extended far beyond the standard framework of the univariate (that is one-dimensional) case (Case 1). All these extensions are also called ''normal'' or ''Gaussian'' laws, so a certain ambiguity in names exists. * The
multivariate normal distribution In probability theory and statistics, the multivariate normal distribution, multivariate Gaussian distribution, or joint normal distribution is a generalization of the one-dimensional (univariate) normal distribution to higher dimensions. One d ...
describes the Gaussian law in the ''k''-dimensional Euclidean space. A vector is multivariate-normally distributed if any linear combination of its components has a (univariate) normal distribution. The variance of ''X'' is a ''k×k'' symmetric positive-definite matrix ''V''. The multivariate normal distribution is a special case of the
elliptical distribution In probability and statistics, an elliptical distribution is any member of a broad family of probability distributions that generalize the multivariate normal distribution. Intuitively, in the simplified two and three dimensional case, the joint di ...
s. As such, its iso-density loci in the ''k'' = 2 case are ellipses and in the case of arbitrary ''k'' are ellipsoids. * Rectified Gaussian distribution a rectified version of normal distribution with all the negative elements reset to 0 * Complex normal distribution deals with the complex normal vectors. A complex vector is said to be normal if both its real and imaginary components jointly possess a 2''k''-dimensional multivariate normal distribution. The variance-covariance structure of ''X'' is described by two matrices: the ''variance'' matrix Γ, and the ''relation'' matrix ''C''. * Matrix normal distribution describes the case of normally distributed matrices. * Gaussian processes are the normally distributed stochastic processes. These can be viewed as elements of some infinite-dimensional Hilbert space ''H'', and thus are the analogues of multivariate normal vectors for the case . A random element is said to be normal if for any constant the scalar product has a (univariate) normal distribution. The variance structure of such Gaussian random element can be described in terms of the linear ''covariance ''. Several Gaussian processes became popular enough to have their own names: ** Wiener process, Brownian motion, ** Brownian bridge, ** Ornstein–Uhlenbeck process. * Gaussian q-distribution is an abstract mathematical construction that represents a "q-analogue" of the normal distribution. * the q-Gaussian is an analogue of the Gaussian distribution, in the sense that it maximises the Tsallis entropy, and is one type of Tsallis distribution. Note that this distribution is different from the Gaussian q-distribution above. * The Kaniadakis Gaussian distribution, Kaniadakis ''κ''-Gaussian distribution is a generalization of the Gaussian distribution which arises from the Kaniadakis statistics, being one of the Kaniadakis distribution, Kaniadakis distributions. A random variable ''X'' has a two-piece normal distribution if it has a distribution : f_X( x ) = N( \mu, \sigma_1^2 ) \text x \le \mu : f_X( x ) = N( \mu, \sigma_2^2 ) \text x \ge \mu where ''μ'' is the mean and ''σ''1 and ''σ''2 are the standard deviations of the distribution to the left and right of the mean respectively. The mean, variance and third central moment of this distribution have been determined : \operatorname( X ) = \mu + \sqrt ( \sigma_2 - \sigma_1 ) : \operatorname( X ) = \left( 1 - \frac 2 \pi\right)( \sigma_2 - \sigma_1 )^2 + \sigma_1 \sigma_2 : \operatorname( X ) = \sqrt( \sigma_2 - \sigma_1 ) \left[ \left( \frac 4 \pi - 1 \right) ( \sigma_2 - \sigma_1)^2 + \sigma_1 \sigma_2 \right] where E(''X''), V(''X'') and T(''X'') are the mean, variance, and third central moment respectively. One of the main practical uses of the Gaussian law is to model the empirical distributions of many different random variables encountered in practice. In such case a possible extension would be a richer family of distributions, having more than two parameters and therefore being able to fit the empirical distribution more accurately. The examples of such extensions are: * Pearson distribution — a four-parameter family of probability distributions that extend the normal law to include different skewness and kurtosis values. * The generalized normal distribution, also known as the exponential power distribution, allows for distribution tails with thicker or thinner asymptotic behaviors.


Statistical inference


Estimation of parameters

It is often the case that we do not know the parameters of the normal distribution, but instead want to Estimation theory, estimate them. That is, having a sample (x_1, \ldots, x_n) from a normal N(\mu, \sigma^2) population we would like to learn the approximate values of parameters \mu and \sigma^2. The standard approach to this problem is the maximum likelihood method, which requires maximization of the ''log-likelihood function'': : \ln\mathcal(\mu,\sigma^2) = \sum_^n \ln f(x_i\mid\mu,\sigma^2) = -\frac\ln(2\pi) - \frac\ln\sigma^2 - \frac\sum_^n (x_i-\mu)^2. Taking derivatives with respect to \mu and \sigma^2 and solving the resulting system of first order conditions yields the ''maximum likelihood estimates'': : \hat = \overline \equiv \frac\sum_^n x_i, \qquad \hat^2 = \frac \sum_^n (x_i - \overline)^2.


Sample mean

Estimator \textstyle\hat\mu is called the ''
sample mean The sample mean (or "empirical mean") and the sample covariance are statistics computed from a Sample (statistics), sample of data on one or more random variables. The sample mean is the average value (or mean, mean value) of a sample (statistic ...
'', since it is the arithmetic mean of all observations. The statistic \textstyle\overline is complete statistic, complete and sufficient statistic, sufficient for \mu, and therefore by the Lehmann–Scheffé theorem, \textstyle\hat\mu is the uniformly minimum variance unbiased (UMVU) estimator. In finite samples it is distributed normally: : \hat\mu \sim \mathcal(\mu,\sigma^2/n). The variance of this estimator is equal to the ''μμ''-element of the inverse Fisher information matrix \textstyle\mathcal^. This implies that the estimator is efficient estimator, finite-sample efficient. Of practical importance is the fact that the standard error (statistics), standard error of \textstyle\hat\mu is proportional to \textstyle1/\sqrt, that is, if one wishes to decrease the standard error by a factor of 10, one must increase the number of points in the sample by a factor of 100. This fact is widely used in determining sample sizes for opinion polls and the number of trials in Monte Carlo simulations. From the standpoint of the asymptotic theory (statistics), asymptotic theory, \textstyle\hat\mu is consistent estimator, consistent, that is, it convergence in probability, converges in probability to \mu as n\rightarrow\infty. The estimator is also asymptotic normality, asymptotically normal, which is a simple corollary of the fact that it is normal in finite samples: : \sqrt(\hat\mu-\mu) \,\xrightarrow\, \mathcal(0,\sigma^2).


Sample variance

The estimator \textstyle\hat\sigma^2 is called the ''sample variance'', since it is the variance of the sample ((x_1, \ldots, x_n)). In practice, another estimator is often used instead of the \textstyle\hat\sigma^2. This other estimator is denoted s^2, and is also called the ''sample variance'', which represents a certain ambiguity in terminology; its square root s is called the ''sample standard deviation''. The estimator s^2 differs from \textstyle\hat\sigma^2 by having instead of ''n'' in the denominator (the so-called Bessel's correction): : s^2 = \frac \hat\sigma^2 = \frac \sum_^n (x_i - \overline)^2. The difference between s^2 and \textstyle\hat\sigma^2 becomes negligibly small for large ''n''s. In finite samples however, the motivation behind the use of s^2 is that it is an unbiased estimator of the underlying parameter \sigma^2, whereas \textstyle\hat\sigma^2 is biased. Also, by the Lehmann–Scheffé theorem the estimator s^2 is uniformly minimum variance unbiased (Minimum-variance unbiased estimator, UMVU), which makes it the "best" estimator among all unbiased ones. However it can be shown that the biased estimator \textstyle\hat\sigma^2 is "better" than the s^2 in terms of the mean squared error (MSE) criterion. In finite samples both s^2 and \textstyle\hat\sigma^2 have scaled
chi-squared distribution In probability theory and statistics, the chi-squared distribution (also chi-square or \chi^2-distribution) with k degrees of freedom is the distribution of a sum of the squares of k independent standard normal random variables. The chi-squa ...
with degrees of freedom: : s^2 \sim \frac \cdot \chi^2_, \qquad \hat\sigma^2 \sim \frac \cdot \chi^2_. The first of these expressions shows that the variance of s^2 is equal to 2\sigma^4/(n-1), which is slightly greater than the ''σσ''-element of the inverse Fisher information matrix \textstyle\mathcal^. Thus, s^2 is not an efficient estimator for \sigma^2, and moreover, since s^2 is UMVU, we can conclude that the finite-sample efficient estimator for \sigma^2 does not exist. Applying the asymptotic theory, both estimators s^2 and \textstyle\hat\sigma^2 are consistent, that is they converge in probability to \sigma^2 as the sample size n\rightarrow\infty. The two estimators are also both asymptotically normal: : \sqrt(\hat\sigma^2 - \sigma^2) \simeq \sqrt(s^2-\sigma^2) \,\xrightarrow\, \mathcal(0,2\sigma^4). In particular, both estimators are asymptotically efficient for \sigma^2.


Confidence intervals

By
Cochran's theorem In statistics, Cochran's theorem, devised by William G. Cochran, is a theorem used to justify results relating to the probability distributions of statistics that are used in the analysis of variance. Statement Let ''U''1, ..., ''U'N'' be i.i. ...
, for normal distributions the sample mean \textstyle\hat\mu and the sample variance ''s''2 are
independent Independent or Independents may refer to: Arts, entertainment, and media Artist groups * Independents (artist group), a group of modernist painters based in the New Hope, Pennsylvania, area of the United States during the early 1930s * Independ ...
, which means there can be no gain in considering their joint distribution. There is also a converse theorem: if in a sample the sample mean and sample variance are independent, then the sample must have come from the normal distribution. The independence between \textstyle\hat\mu and ''s'' can be employed to construct the so-called ''t-statistic'': : t = \frac = \frac \sim t_ This quantity ''t'' has the
Student's t-distribution In probability and statistics, Student's ''t''-distribution (or simply the ''t''-distribution) is any member of a family of continuous probability distributions that arise when estimating the mean of a normally distributed population in sit ...
with degrees of freedom, and it is an ancillary statistic (independent of the value of the parameters). Inverting the distribution of this ''t''-statistics will allow us to construct the
confidence interval In frequentist statistics, a confidence interval (CI) is a range of estimates for an unknown parameter. A confidence interval is computed at a designated ''confidence level''; the 95% confidence level is most common, but other levels, such as 9 ...
for ''μ''; similarly, inverting the ''χ''2 distribution of the statistic ''s''2 will give us the confidence interval for ''σ''2: :\mu \in \left[ \hat\mu - t_ \fracs, \hat\mu + t_ \fracs \right], :\sigma^2 \in \left[ \frac, \frac \right], where ''tk,p'' and are the ''p''th
quantile In statistics and probability, quantiles are cut points dividing the range of a probability distribution into continuous intervals with equal probabilities, or dividing the observations in a sample in the same way. There is one fewer quantile tha ...
s of the ''t''- and ''χ''2-distributions respectively. These confidence intervals are of the ''confidence level'' , meaning that the true values ''μ'' and ''σ''2 fall outside of these intervals with probability (or significance level) ''α''. In practice people usually take , resulting in the 95% confidence intervals. Approximate formulas can be derived from the asymptotic distributions of \textstyle\hat\mu and ''s''2: :\mu \in \left[ \hat\mu - , z_, \fracs, \hat\mu + , z_, \fracs \right], :\sigma^2 \in \left[ s^2 - , z_, \fracs^2, s^2 + , z_, \fracs^2 \right], The approximate formulas become valid for large values of ''n'', and are more convenient for the manual calculation since the standard normal quantiles ''z''''α''/2 do not depend on ''n''. In particular, the most popular value of , results in .


Normality tests

Normality tests assess the likelihood that the given data set comes from a normal distribution. Typically the null hypothesis ''H''0 is that the observations are distributed normally with unspecified mean ''μ'' and variance ''σ''2, versus the alternative ''Ha'' that the distribution is arbitrary. Many tests (over 40) have been devised for this problem. The more prominent of them are outlined below: Diagnostic plots are more intuitively appealing but subjective at the same time, as they rely on informal human judgement to accept or reject the null hypothesis. *
Q–Q plot In statistics, a Q–Q plot (quantile-quantile plot) is a probability plot, a List of graphical methods, graphical method for comparing two probability distributions by plotting their ''quantiles'' against each other. A point on the plot co ...
, also known as normal probability plot or rankit plot—is a plot of the sorted values from the data set against the expected values of the corresponding quantiles from the standard normal distribution. That is, it's a plot of point of the form (Φ−1(''pk''), ''x''(''k'')), where plotting points ''pk'' are equal to ''pk'' = (''k'' − ''α'')/(''n'' + 1 − 2''α'') and ''α'' is an adjustment constant, which can be anything between 0 and 1. If the null hypothesis is true, the plotted points should approximately lie on a straight line. * P–P plot – similar to the Q–Q plot, but used much less frequently. This method consists of plotting the points (Φ(''z''(''k'')), ''pk''), where \textstyle z_ = (x_-\hat\mu)/\hat\sigma. For normally distributed data this plot should lie on a 45° line between (0, 0) and (1, 1). Goodness-of-fit tests: ''Moment-based tests'': * D'Agostino's K-squared test * Jarque–Bera test * Shapiro–Wilk test: This is based on the fact that the line in the Q–Q plot has the slope of ''σ''. The test compares the least squares estimate of that slope with the value of the sample variance, and rejects the null hypothesis if these two quantities differ significantly. ''Tests based on the empirical distribution function'': * Anderson–Darling test * Lilliefors test (an adaptation of the Kolmogorov–Smirnov test)


Bayesian analysis of the normal distribution

Bayesian analysis of normally distributed data is complicated by the many different possibilities that may be considered: * Either the mean, or the variance, or neither, may be considered a fixed quantity. * When the variance is unknown, analysis may be done directly in terms of the variance, or in terms of the
precision Precision, precise or precisely may refer to: Science, and technology, and mathematics Mathematics and computing (general) * Accuracy and precision, measurement deviation from true value and its scatter * Significant figures, the number of digit ...
, the reciprocal of the variance. The reason for expressing the formulas in terms of precision is that the analysis of most cases is simplified. * Both univariate and multivariate normal distribution, multivariate cases need to be considered. * Either conjugate prior, conjugate or improper prior, improper prior distributions may be placed on the unknown variables. * An additional set of cases occurs in Bayesian linear regression, where in the basic model the data is assumed to be normally distributed, and normal priors are placed on the regression coefficients. The resulting analysis is similar to the basic cases of independent identically distributed data. The formulas for the non-linear-regression cases are summarized in the conjugate prior article.


Sum of two quadratics


= Scalar form

= The following auxiliary formula is useful for simplifying the posterior distribution, posterior update equations, which otherwise become fairly tedious. :a(x-y)^2 + b(x-z)^2 = (a + b)\left(x - \frac\right)^2 + \frac(y-z)^2 This equation rewrites the sum of two quadratics in ''x'' by expanding the squares, grouping the terms in ''x'', and completing the square. Note the following about the complex constant factors attached to some of the terms: # The factor \frac has the form of a weighted average of ''y'' and ''z''. # \frac = \frac = (a^ + b^)^. This shows that this factor can be thought of as resulting from a situation where the Multiplicative inverse, reciprocals of quantities ''a'' and ''b'' add directly, so to combine ''a'' and ''b'' themselves, it's necessary to reciprocate, add, and reciprocate the result again to get back into the original units. This is exactly the sort of operation performed by the harmonic mean, so it is not surprising that \frac is one-half the harmonic mean of ''a'' and ''b''.


= Vector form

= A similar formula can be written for the sum of two vector quadratics: If x, y, z are vectors of length ''k'', and A and B are symmetric matrix, symmetric, invertible matrices of size k\times k, then : \begin & (\mathbf-\mathbf)'\mathbf(\mathbf-\mathbf) + (\mathbf-\mathbf)' \mathbf(\mathbf-\mathbf) \\ = & (\mathbf - \mathbf)'(\mathbf+\mathbf)(\mathbf - \mathbf) + (\mathbf - \mathbf)'(\mathbf^ + \mathbf^)^(\mathbf - \mathbf) \end where :\mathbf = (\mathbf + \mathbf)^(\mathbf\mathbf + \mathbf \mathbf) Note that the form x′ A x is called a
quadratic form In mathematics, a quadratic form is a polynomial with terms all of degree two ("form" is another name for a homogeneous polynomial). For example, :4x^2 + 2xy - 3y^2 is a quadratic form in the variables and . The coefficients usually belong to a ...
and is a scalar (mathematics), scalar: :\mathbf'\mathbf\mathbf = \sum_a_ x_i x_j In other words, it sums up all possible combinations of products of pairs of elements from x, with a separate coefficient for each. In addition, since x_i x_j = x_j x_i, only the sum a_ + a_ matters for any off-diagonal elements of A, and there is no loss of generality in assuming that A is symmetric matrix, symmetric. Furthermore, if A is symmetric, then the form \mathbf'\mathbf\mathbf = \mathbf'\mathbf\mathbf.


Sum of differences from the mean

Another useful formula is as follows: \sum_^n (x_i-\mu)^2 = \sum_^n (x_i-\bar)^2 + n(\bar -\mu)^2 where \bar = \frac \sum_^n x_i.


With known variance

For a set of i.i.d. normally distributed data points X of size ''n'' where each individual point ''x'' follows x \sim \mathcal(\mu, \sigma^2) with known
variance In probability theory and statistics, variance is the expectation of the squared deviation of a random variable from its population mean or sample mean. Variance is a measure of dispersion, meaning it is a measure of how far a set of numbers ...
σ2, the conjugate prior distribution is also normally distributed. This can be shown more easily by rewriting the variance as the
precision Precision, precise or precisely may refer to: Science, and technology, and mathematics Mathematics and computing (general) * Accuracy and precision, measurement deviation from true value and its scatter * Significant figures, the number of digit ...
, i.e. using τ = 1/σ2. Then if x \sim \mathcal(\mu, 1/\tau) and \mu \sim \mathcal(\mu_0, 1/\tau_0), we proceed as follows. First, the likelihood function is (using the formula above for the sum of differences from the mean): :\begin p(\mathbf\mid\mu,\tau) &= \prod_^n \sqrt \exp\left(-\frac\tau(x_i-\mu)^2\right) \\ &= \left(\frac\right)^ \exp\left(-\frac\tau \sum_^n (x_i-\mu)^2\right) \\ &= \left(\frac\right)^ \exp\left[-\frac\tau \left(\sum_^n(x_i-\bar)^2 + n(\bar -\mu)^2\right)\right]. \end Then, we proceed as follows: :\begin p(\mu\mid\mathbf) &\propto p(\mathbf\mid\mu) p(\mu) \\ & = \left(\frac\right)^ \exp\left[-\frac\tau \left(\sum_^n(x_i-\bar)^2 + n(\bar -\mu)^2\right)\right] \sqrt \exp\left(-\frac\tau_0(\mu-\mu_0)^2\right) \\ &\propto \exp\left(-\frac\left(\tau\left(\sum_^n(x_i-\bar)^2 + n(\bar -\mu)^2\right) + \tau_0(\mu-\mu_0)^2\right)\right) \\ &\propto \exp\left(-\frac \left(n\tau(\bar-\mu)^2 + \tau_0(\mu-\mu_0)^2 \right)\right) \\ &= \exp\left(-\frac(n\tau + \tau_0)\left(\mu - \dfrac\right)^2 + \frac(\bar - \mu_0)^2\right) \\ &\propto \exp\left(-\frac(n\tau + \tau_0)\left(\mu - \dfrac\right)^2\right) \end In the above derivation, we used the formula above for the sum of two quadratics and eliminated all constant factors not involving ''μ''. The result is the kernel (statistics), kernel of a normal distribution, with mean \frac and precision n\tau + \tau_0, i.e. :p(\mu\mid\mathbf) \sim \mathcal\left(\frac, \frac\right) This can be written as a set of Bayesian update equations for the posterior parameters in terms of the prior parameters: :\begin \tau_0' &= \tau_0 + n\tau \\[5pt] \mu_0' &= \frac \\[5pt] \bar &= \frac\sum_^n x_i \end That is, to combine ''n'' data points with total precision of ''nτ'' (or equivalently, total variance of ''n''/''σ''2) and mean of values \bar, derive a new total precision simply by adding the total precision of the data to the prior total precision, and form a new mean through a ''precision-weighted average'', i.e. a weighted average of the data mean and the prior mean, each weighted by the associated total precision. This makes logical sense if the precision is thought of as indicating the certainty of the observations: In the distribution of the posterior mean, each of the input components is weighted by its certainty, and the certainty of this distribution is the sum of the individual certainties. (For the intuition of this, compare the expression "the whole is (or is not) greater than the sum of its parts". In addition, consider that the knowledge of the posterior comes from a combination of the knowledge of the prior and likelihood, so it makes sense that we are more certain of it than of either of its components.) The above formula reveals why it is more convenient to do Bayesian analysis of conjugate priors for the normal distribution in terms of the precision. The posterior precision is simply the sum of the prior and likelihood precisions, and the posterior mean is computed through a precision-weighted average, as described above. The same formulas can be written in terms of variance by reciprocating all the precisions, yielding the more ugly formulas :\begin ' &= \frac \\[5pt] \mu_0' &= \frac \\[5pt] \bar &= \frac\sum_^n x_i \end


With known mean

For a set of i.i.d. normally distributed data points X of size ''n'' where each individual point ''x'' follows x \sim \mathcal(\mu, \sigma^2) with known mean μ, the conjugate prior of the
variance In probability theory and statistics, variance is the expectation of the squared deviation of a random variable from its population mean or sample mean. Variance is a measure of dispersion, meaning it is a measure of how far a set of numbers ...
has an inverse gamma distribution or a scaled inverse chi-squared distribution. The two are equivalent 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. The prior for σ2 is as follows: :p(\sigma^2\mid\nu_0,\sigma_0^2) = \frac~\frac \propto \frac The likelihood function from above, written in terms of the variance, is: :\begin p(\mathbf\mid\mu,\sigma^2) &= \left(\frac\right)^ \exp\left[-\frac \sum_^n (x_i-\mu)^2\right] \\ &= \left(\frac\right)^ \exp\left[-\frac\right] \end where :S = \sum_^n (x_i-\mu)^2. Then: :\begin p(\sigma^2\mid\mathbf) &\propto p(\mathbf\mid\sigma^2) p(\sigma^2) \\ &= \left(\frac\right)^ \exp\left[-\frac\right] \frac~\frac \\ &\propto \left(\frac\right)^ \frac \exp\left[-\frac + \frac\right] \\ &= \frac \exp\left[-\frac\right] \end The above is also a scaled inverse chi-squared distribution where :\begin \nu_0' &= \nu_0 + n \\ \nu_0'' &= \nu_0 \sigma_0^2 + \sum_^n (x_i-\mu)^2 \end or equivalently :\begin \nu_0' &= \nu_0 + n \\ ' &= \frac \end Reparameterizing in terms of an inverse gamma distribution, the result is: :\begin \alpha' &= \alpha + \frac \\ \beta' &= \beta + \frac \end


With unknown mean and unknown variance

For a set of i.i.d. normally distributed data points X of size ''n'' where each individual point ''x'' follows x \sim \mathcal(\mu, \sigma^2) with unknown mean μ and unknown
variance In probability theory and statistics, variance is the expectation of the squared deviation of a random variable from its population mean or sample mean. Variance is a measure of dispersion, meaning it is a measure of how far a set of numbers ...
σ2, a combined (multivariate) conjugate prior is placed over the mean and variance, consisting of a normal-inverse-gamma distribution. Logically, this originates as follows: # From the analysis of the case with unknown mean but known variance, we see that the update equations involve sufficient statistics computed from the data consisting of the mean of the data points and the total variance of the data points, computed in turn from the known variance divided by the number of data points. # From the analysis of the case with unknown variance but known mean, we see that the update equations involve sufficient statistics over the data consisting of the number of data points and sum of squared deviations. # Keep in mind that the posterior update values serve as the prior distribution when further data is handled. Thus, we should logically think of our priors in terms of the sufficient statistics just described, with the same semantics kept in mind as much as possible. # To handle the case where both mean and variance are unknown, we could place independent priors over the mean and variance, with fixed estimates of the average mean, total variance, number of data points used to compute the variance prior, and sum of squared deviations. Note however that in reality, the total variance of the mean depends on the unknown variance, and the sum of squared deviations that goes into the variance prior (appears to) depend on the unknown mean. In practice, the latter dependence is relatively unimportant: Shifting the actual mean shifts the generated points by an equal amount, and on average the squared deviations will remain the same. This is not the case, however, with the total variance of the mean: As the unknown variance increases, the total variance of the mean will increase proportionately, and we would like to capture this dependence. # This suggests that we create a ''conditional prior'' of the mean on the unknown variance, with a hyperparameter specifying the mean of the pseudo-observations associated with the prior, and another parameter specifying the number of pseudo-observations. This number serves as a scaling parameter on the variance, making it possible to control the overall variance of the mean relative to the actual variance parameter. The prior for the variance also has two hyperparameters, one specifying the sum of squared deviations of the pseudo-observations associated with the prior, and another specifying once again the number of pseudo-observations. Note that each of the priors has a hyperparameter specifying the number of pseudo-observations, and in each case this controls the relative variance of that prior. These are given as two separate hyperparameters so that the variance (aka the confidence) of the two priors can be controlled separately. # This leads immediately to the normal-inverse-gamma distribution, which is the product of the two distributions just defined, with conjugate priors used (an inverse gamma distribution over the variance, and a normal distribution over the mean, ''conditional'' on the variance) and with the same four parameters just defined. The priors are normally defined as follows: :\begin p(\mu\mid\sigma^2; \mu_0, n_0) &\sim \mathcal(\mu_0,\sigma^2/n_0) \\ p(\sigma^2; \nu_0,\sigma_0^2) &\sim I\chi^2(\nu_0,\sigma_0^2) = IG(\nu_0/2, \nu_0\sigma_0^2/2) \end The update equations can be derived, and look as follows: :\begin \bar &= \frac 1 n \sum_^n x_i \\ \mu_0' &= \frac \\ n_0' &= n_0 + n \\ \nu_0' &= \nu_0 + n \\ \nu_0'' &= \nu_0 \sigma_0^2 + \sum_^n (x_i-\bar)^2 + \frac(\mu_0 - \bar)^2 \end The respective numbers of pseudo-observations add the number of actual observations to them. The new mean hyperparameter is once again a weighted average, this time weighted by the relative numbers of observations. Finally, the update for \nu_0'' is similar to the case with known mean, but in this case the sum of squared deviations is taken with respect to the observed data mean rather than the true mean, and as a result a new "interaction term" needs to be added to take care of the additional error source stemming from the deviation between prior and data mean.


Occurrence and applications

The occurrence of normal distribution in practical problems can be loosely classified into four categories: # Exactly normal distributions; # Approximately normal laws, for example when such approximation is justified by the
central limit theorem In probability theory, the central limit theorem (CLT) establishes that, in many situations, when independent random variables are summed up, their properly normalized sum tends toward a normal distribution even if the original variables themselv ...
; and # Distributions modeled as normal – the normal distribution being the distribution with Principle of maximum entropy, maximum entropy for a given mean and variance. # Regression problems – the normal distribution being found after systematic effects have been modeled sufficiently well.


Exact normality

Certain quantities in physics are distributed normally, as was first demonstrated by James Clerk Maxwell. Examples of such quantities are: * Probability density function of a ground state in a quantum harmonic oscillator. * The position of a particle that experiences diffusion. If initially the particle is located at a specific point (that is its probability distribution is the Dirac delta function), then after time ''t'' its location is described by a normal distribution with variance ''t'', which satisfies the diffusion equation \frac f(x,t) = \frac \frac f(x,t). If the initial location is given by a certain density function g(x), then the density at time ''t'' is the convolution of ''g'' and the normal PDF.


Approximate normality

''Approximately'' normal distributions occur in many situations, as explained by the
central limit theorem In probability theory, the central limit theorem (CLT) establishes that, in many situations, when independent random variables are summed up, their properly normalized sum tends toward a normal distribution even if the original variables themselv ...
. When the outcome is produced by many small effects acting ''additively and independently'', its distribution will be close to normal. The normal approximation will not be valid if the effects act multiplicatively (instead of additively), or if there is a single external influence that has a considerably larger magnitude than the rest of the effects. * In counting problems, where the central limit theorem includes a discrete-to-continuum approximation and where Infinite divisibility, infinitely divisible and Indecomposable distribution, decomposable distributions are involved, such as ** binomial distribution, Binomial random variables, associated with binary response variables; ** Poisson distribution, Poisson random variables, associated with rare events; * Thermal radiation has a Bose–Einstein statistics, Bose–Einstein distribution on very short time scales, and a normal distribution on longer timescales due to the central limit theorem.


Assumed normality

There are statistical methods to empirically test that assumption; see the above #Normality tests, Normality tests section. * In biology, the ''logarithm'' of various variables tend to have a normal distribution, that is, they tend to have a
log-normal distribution In probability theory, a log-normal (or lognormal) distribution is a continuous probability distribution of a random variable whose logarithm is normally distributed. Thus, if the random variable is log-normally distributed, then has a normal ...
(after separation on male/female subpopulations), with examples including: ** Measures of size of living tissue (length, height, skin area, weight); ** The ''length'' of ''inert'' appendages (hair, claws, nails, teeth) of biological specimens, ''in the direction of growth''; presumably the thickness of tree bark also falls under this category; ** Certain physiological measurements, such as blood pressure of adult humans. * In finance, in particular the Black–Scholes model, changes in the ''logarithm'' of exchange rates, price indices, and stock market indices are assumed normal (these variables behave like compound interest, not like simple interest, and so are multiplicative). Some mathematicians such as Benoit Mandelbrot have argued that Levy skew alpha-stable distribution, log-Levy distributions, which possesses heavy tails would be a more appropriate model, in particular for the analysis for stock market crashes. The use of the assumption of normal distribution occurring in financial models has also been criticized by Nassim Nicholas Taleb in his works. * Propagation of uncertainty, Measurement errors in physical experiments are often modeled by a normal distribution. This use of a normal distribution does not imply that one is assuming the measurement errors are normally distributed, rather using the normal distribution produces the most conservative predictions possible given only knowledge about the mean and variance of the errors. * In Standardized testing (statistics), standardized testing, results can be made to have a normal distribution by either selecting the number and difficulty of questions (as in the Intelligence quotient, IQ test) or transforming the raw test scores into "output" scores by fitting them to the normal distribution. For example, the SAT's traditional range of 200–800 is based on a normal distribution with a mean of 500 and a standard deviation of 100. * Many scores are derived from the normal distribution, including percentile ranks ("percentiles" or "quantiles"), normal curve equivalents, stanines, Standard score, z-scores, and T-scores. Additionally, some behavioral statistical procedures assume that scores are normally distributed; for example, Student's t-test, t-tests and Analysis of variance, ANOVAs. Bell curve grading assigns relative grades based on a normal distribution of scores. * In hydrology the distribution of long duration river discharge or rainfall, e.g. monthly and yearly totals, is often thought to be practically normal according to the
central limit theorem In probability theory, the central limit theorem (CLT) establishes that, in many situations, when independent random variables are summed up, their properly normalized sum tends toward a normal distribution even if the original variables themselv ...
. The blue picture, made with CumFreq, illustrates an example of fitting the normal distribution to ranked October rainfalls showing the 90% confidence belt based on the
binomial distribution In probability theory and statistics, the binomial distribution with parameters ''n'' and ''p'' is the discrete probability distribution of the number of successes in a sequence of ''n'' independent experiments, each asking a yes–no quest ...
. The rainfall data are represented by plotting positions as part of the cumulative frequency analysis.


Methodological problems and peer review

John Ioannidis argues that using normally distributed standard deviations as standards for validating research findings leave falsifiability, falsifiable predictions about phenomena that are not normally distributed untested. This includes, for example, phenomena that only appear when all necessary conditions are present and one cannot be a substitute for another in an addition-like way and phenomena that are not randomly distributed. Ioannidis argues that standard deviation-centered validation gives a false appearance of validity to hypotheses and theories where some but not all falsifiable predictions are normally distributed since the portion of falsifiable predictions that there is evidence against may and in some cases are in the non-normally distributed parts of the range of falsifiable predictions, as well as baselessly dismissing hypotheses for which none of the falsifiable predictions are normally distributed as if were they unfalsifiable when in fact they do make falsifiable predictions. It is argued by Ioannidis that many cases of mutually exclusive theories being accepted as "validated" by research journals are caused by failure of the journals to take in empirical falsifications of non-normally distributed predictions, and not because mutually exclusive theories are true, which they cannot be, although two mutually exclusive theories can both be wrong and a third one correct.


Computational methods


Generating values from normal distribution

In computer simulations, especially in applications of the Monte-Carlo method, it is often desirable to generate values that are normally distributed. The algorithms listed below all generate the standard normal deviates, since a can be generated as , where ''Z'' is standard normal. All these algorithms rely on the availability of a random number generator ''U'' capable of producing Uniform distribution (continuous), uniform random variates. * The most straightforward method is based on the probability integral transform property: if ''U'' is distributed uniformly on (0,1), then Φ−1(''U'') will have the standard normal distribution. The drawback of this method is that it relies on calculation of the
probit function In probability theory and statistics, the probit function is the quantile function associated with the standard normal distribution. It has applications in data analysis and machine learning, in particular exploratory statistical graphics and ...
Φ−1, which cannot be done analytically. Some approximate methods are described in and in the error function, erf article. Wichura gives a fast algorithm for computing this function to 16 decimal places, which is used by R programming language, R to compute random variates of the normal distribution. * Irwin–Hall distribution#Approximating a Normal distribution, An easy-to-program approximate approach that relies on the
central limit theorem In probability theory, the central limit theorem (CLT) establishes that, in many situations, when independent random variables are summed up, their properly normalized sum tends toward a normal distribution even if the original variables themselv ...
is as follows: generate 12 uniform ''U''(0,1) deviates, add them all up, and subtract 6 – the resulting random variable will have approximately standard normal distribution. In truth, the distribution will be Irwin–Hall distribution, Irwin–Hall, which is a 12-section eleventh-order polynomial approximation to the normal distribution. This random deviate will have a limited range of (−6, 6). Note that in a true normal distribution, only 0.00034% of all samples will fall outside ±6σ. * The Box–Muller transform, Box–Muller method uses two independent random numbers ''U'' and ''V'' distributed uniform distribution (continuous), uniformly on (0,1). Then the two random variables ''X'' and ''Y'' X = \sqrt \, \cos(2 \pi V) , \qquad Y = \sqrt \, \sin(2 \pi V) . will both have the standard normal distribution, and will be
independent Independent or Independents may refer to: Arts, entertainment, and media Artist groups * Independents (artist group), a group of modernist painters based in the New Hope, Pennsylvania, area of the United States during the early 1930s * Independ ...
. This formulation arises because for a bivariate normal random vector (''X'', ''Y'') the squared norm will have the
chi-squared distribution In probability theory and statistics, the chi-squared distribution (also chi-square or \chi^2-distribution) with k degrees of freedom is the distribution of a sum of the squares of k independent standard normal random variables. The chi-squa ...
with two degrees of freedom, which is an easily generated exponential distribution, exponential random variable corresponding to the quantity −2ln(''U'') in these equations; and the angle is distributed uniformly around the circle, chosen by the random variable ''V''. * The Marsaglia polar method is a modification of the Box–Muller method which does not require computation of the sine and cosine functions. In this method, ''U'' and ''V'' are drawn from the uniform (−1,1) distribution, and then is computed. If ''S'' is greater or equal to 1, then the method starts over, otherwise the two quantities X = U\sqrt, \qquad Y = V\sqrt are returned. Again, ''X'' and ''Y'' are independent, standard normal random variables. * The Ratio method is a rejection method. The algorithm proceeds as follows: ** Generate two independent uniform deviates ''U'' and ''V''; ** Compute ''X'' = (''V'' − 0.5)/''U''; ** Optional: if ''X''2 ≤ 5 − 4''e''1/4''U'' then accept ''X'' and terminate algorithm; ** Optional: if ''X''2 ≥ 4''e''−1.35/''U'' + 1.4 then reject ''X'' and start over from step 1; ** If ''X''2 ≤ −4 ln''U'' then accept ''X'', otherwise start over the algorithm. *:The two optional steps allow the evaluation of the logarithm in the last step to be avoided in most cases. These steps can be greatly improved so that the logarithm is rarely evaluated. * The ziggurat algorithm is faster than the Box–Muller transform and still exact. In about 97% of all cases it uses only two random numbers, one random integer and one random uniform, one multiplication and an if-test. Only in 3% of the cases, where the combination of those two falls outside the "core of the ziggurat" (a kind of rejection sampling using logarithms), do exponentials and more uniform random numbers have to be employed. * Integer arithmetic can be used to sample from the standard normal distribution. This method is exact in the sense that it satisfies the conditions of ''ideal approximation''; i.e., it is equivalent to sampling a real number from the standard normal distribution and rounding this to the nearest representable floating point number. * There is also some investigation into the connection between the fast Hadamard transform and the normal distribution, since the transform employs just addition and subtraction and by the central limit theorem random numbers from almost any distribution will be transformed into the normal distribution. In this regard a series of Hadamard transforms can be combined with random permutations to turn arbitrary data sets into a normally distributed data.


Numerical approximations for the normal CDF and normal quantile function

The standard normal cumulative distribution function, CDF is widely used in scientific and statistical computing. The values Φ(''x'') may be approximated very accurately by a variety of methods, such as numerical integration, Taylor series, asymptotic series and Gauss's continued fraction#Of Kummer's confluent hypergeometric function, continued fractions. Different approximations are used depending on the desired level of accuracy. * give the approximation for Φ(''x'') for ''x > 0'' with the absolute error (algorith
26.2.17
: \Phi(x) = 1 - \varphi(x)\left(b_1 t + b_2 t^2 + b_3t^3 + b_4 t^4 + b_5 t^5\right) + \varepsilon(x), \qquad t = \frac, where ''ϕ''(''x'') is the standard normal PDF, and ''b''0 = 0.2316419, ''b''1 = 0.319381530, ''b''2 = −0.356563782, ''b''3 = 1.781477937, ''b''4 = −1.821255978, ''b''5 = 1.330274429. * lists some dozens of approximations – by means of rational functions, with or without exponentials – for the function. His algorithms vary in the degree of complexity and the resulting precision, with maximum absolute precision of 24 digits. An algorithm by combines Hart's algorithm 5666 with a continued fraction approximation in the tail to provide a fast computation algorithm with a 16-digit precision. * after recalling Hart68 solution is not suited for erf, gives a solution for both erf and erfc, with maximal relative error bound, via rational function, Rational Chebyshev Approximation. * suggested a simple algorithm based on the Taylor series expansion \Phi(x) = \frac12 + \varphi(x)\left( x + \frac 3 + \frac + \frac + \frac + \cdots \right) for calculating with arbitrary precision. The drawback of this algorithm is comparatively slow calculation time (for example it takes over 300 iterations to calculate the function with 16 digits of precision when ). * The GNU Scientific Library calculates values of the standard normal CDF using Hart's algorithms and approximations with Chebyshev polynomials. Shore (1982) introduced simple approximations that may be incorporated in stochastic optimization models of engineering and operations research, like reliability engineering and inventory analysis. Denoting , the simplest approximation for the quantile function is: z = \Phi^(p)=5.5556\left[1- \left( \frac p \right)^\right],\qquad p\ge 1/2 This approximation delivers for ''z'' a maximum absolute error of 0.026 (for , corresponding to ). For replace ''p'' by and change sign. Another approximation, somewhat less accurate, is the single-parameter approximation: z=-0.4115\left\, \qquad p\ge 1/2 The latter had served to derive a simple approximation for the loss integral of the normal distribution, defined by \begin L(z) & =\int_z^\infty (u-z)\varphi(u) \, du=\int_z^\infty [1-\Phi (u)] \, du \\[5pt] L(z) & \approx \begin 0.4115\left(\dfrac p \right) - z, & p<1/2, \\ \\ 0.4115\left( \dfrac p \right), & p\ge 1/2. \end \\[5pt] \text \\ L(z) & \approx \begin 0.4115\left\, & p < 1/2, \\ \\ 0.4115 \dfrac p, & p\ge 1/2. \end \end This approximation is particularly accurate for the right far-tail (maximum error of 10−3 for z≥1.4). Highly accurate approximations for the CDF, based on Response modeling methodology, Response Modeling Methodology (RMM, Shore, 2011, 2012), are shown in Shore (2005). Some more approximations can be found at: Error function#Approximation with elementary functions. In particular, small ''relative'' error on the whole domain for the CDF \Phi and the quantile function \Phi^ as well, is achieved via an explicitly invertible formula by Sergei Winitzki in 2008.


History


Development

Some authors attribute the credit for the discovery of the normal distribution to Abraham de Moivre, de Moivre, who in 1738 published in the second edition of his "''The Doctrine of Chances''" the study of the coefficients in the binomial expansion of . De Moivre proved that the middle term in this expansion has the approximate magnitude of 2^n/\sqrt, and that "If ''m'' or ''n'' be a Quantity infinitely great, then the Logarithm of the Ratio, which a Term distant from the middle by the Interval ''ℓ'', has to the middle Term, is -\frac." Although this theorem can be interpreted as the first obscure expression for the normal probability law, Stephen Stigler, Stigler points out that de Moivre himself did not interpret his results as anything more than the approximate rule for the binomial coefficients, and in particular de Moivre lacked the concept of the probability density function. In 1823 Carl Friedrich Gauss, Gauss published his monograph "''Theoria combinationis observationum erroribus minimis obnoxiae''" where among other things he introduces several important statistical concepts, such as the method of least squares, the method of maximum likelihood, and the ''normal distribution''. Gauss used ''M'', , to denote the measurements of some unknown quantity ''V'', and sought the "most probable" estimator of that quantity: the one that maximizes the probability of obtaining the observed experimental results. In his notation φΔ is the probability density function of the measurement errors of magnitude Δ. Not knowing what the function ''φ'' is, Gauss requires that his method should reduce to the well-known answer: the arithmetic mean of the measured values. Starting from these principles, Gauss demonstrates that the only law that rationalizes the choice of arithmetic mean as an estimator of the location parameter, is the normal law of errors: \varphi\mathit = \frac h \, e^, where ''h'' is "the measure of the precision of the observations". Using this normal law as a generic model for errors in the experiments, Gauss formulates what is now known as the non-linear least squares, non-linear weighted least squares method. Although Gauss was the first to suggest the normal distribution law, Pierre Simon de Laplace, Laplace made significant contributions. It was Laplace who first posed the problem of aggregating several observations in 1774, although his own solution led to the Laplacian distribution. It was Laplace who first calculated the value of the Gaussian integral, integral in 1782, providing the normalization constant for the normal distribution. Finally, it was Laplace who in 1810 proved and presented to the Academy the fundamental
central limit theorem In probability theory, the central limit theorem (CLT) establishes that, in many situations, when independent random variables are summed up, their properly normalized sum tends toward a normal distribution even if the original variables themselv ...
, which emphasized the theoretical importance of the normal distribution. It is of interest to note that in 1809 an Irish-American mathematician Robert Adrain published two insightful but flawed derivations of the normal probability law, simultaneously and independently from Gauss. His works remained largely unnoticed by the scientific community, until in 1871 they were exhumed by Cleveland Abbe, Abbe. In the middle of the 19th century James Clerk Maxwell, Maxwell demonstrated that the normal distribution is not just a convenient mathematical tool, but may also occur in natural phenomena: "The number of particles whose velocity, resolved in a certain direction, lies between ''x'' and ''x'' + ''dx'' is \operatorname \frac\; e^ \, dx


Naming

Today, the concept is usually known in English as the normal distribution or Gaussian distribution. Other less common names include Gauss distribution, Laplace-Gauss distribution, the law of error, the law of facility of errors, Laplace's second law, Gaussian law. Gauss himself apparently coined the term with reference to the "normal equations" involved in its applications, with normal having its technical meaning of orthogonal rather than "usual". However, by the end of the 19th century some authors had started using the name ''normal distribution'', where the word "normal" was used as an adjective – the term now being seen as a reflection of the fact that this distribution was seen as typical, common – and thus "normal". Charles Sanders Peirce, Peirce (one of those authors) once defined "normal" thus: "...the 'normal' is not the average (or any other kind of mean) of what actually occurs, but of what ''would'', in the long run, occur under certain circumstances." Around the turn of the 20th century Karl Pearson, Pearson popularized the term ''normal'' as a designation for this distribution. Also, it was Pearson who first wrote the distribution in terms of the standard deviation ''σ'' as in modern notation. Soon after this, in year 1915, Ronald Fisher, Fisher added the location parameter to the formula for normal distribution, expressing it in the way it is written nowadays: df = \frac e^ \, dx. The term "standard normal", which denotes the normal distribution with zero mean and unit variance came into general use around the 1950s, appearing in the popular textbooks by P. G. Hoel (1947) "''Introduction to mathematical statistics''" and A. M. Mood (1950) "''Introduction to the theory of statistics''".


See also

* Bates distribution – similar to the Irwin–Hall distribution, but rescaled back into the 0 to 1 range * Behrens–Fisher problem – the long-standing problem of testing whether two normal samples with different variances have same means; * Bhattacharyya distance – method used to separate mixtures of normal distributions * Erdős–Kac theorem – on the occurrence of the normal distribution in number theory * Full width at half maximum * Gaussian blur – convolution, which uses the normal distribution as a kernel * Modified half-normal distribution with the pdf on (0, \infty) is given as f(x)= \frac, where \Psi(\alpha,z)=_1\Psi_1\left(\begin\left(\alpha,\frac\right)\\(1,0)\end;z \right) denotes the Fox-Wright Psi function. * Normally distributed and uncorrelated does not imply independent * Ratio normal distribution * Reciprocal normal distribution * Standard normal table * Stein's lemma * Sub-Gaussian distribution * Sum of normally distributed random variables * Tweedie distribution – The normal distribution is a member of the family of Tweedie exponential dispersion models. * Wrapped normal distribution – the Normal distribution applied to a circular domain * Z-test – using the normal distribution


Notes


References


Citations


Sources

* * In particular, the entries fo
"bell-shaped and bell curve"
an

* * * * * * * * * * * * * * * * * * * * * * * * Translated by Stephen M. Stigler in ''Statistical Science'' 1 (3), 1986: . * * * * * * * * * * * * * * * * * * * * * * * * * * * *


External links

*
Normal distribution calculator
{{Authority control Normal distribution, Continuous distributions Conjugate prior distributions Exponential family distributions Stable distributions Location-scale family probability distributions]">X, ^p \right&= \sigma^p \cdot 2^ \frac _1F_1\left( -\frac, \frac, -\frac \left( \frac \mu \sigma \right)^2 \right). \end These expressions remain valid even if p is not an integer. See also Hermite polynomials#"Negative variance", generalized Hermite polynomials. The expectation of X conditioned on the event that X lies in an interval ,b/math> is given by :\operatorname\left \mid a= \mu - \sigma^2\frac where f and F respectively are the density and the cumulative distribution function of X. For b=\infty this is known as the
inverse Mills ratio In probability theory, the Mills ratio (or Mills's ratio) of a continuous random variable X is the function : m(x) := \frac , where f(x) is the probability density function, and :\bar(x) := \Pr x.html" ;"title=">x">>x= \int_x^ f(u)\, du is the ...
. Note that above, density f of X is used instead of standard normal density as in inverse Mills ratio, so here we have \sigma^2 instead of \sigma.


Fourier transform and characteristic function

The
Fourier transform A Fourier transform (FT) is a mathematical transform that decomposes functions into frequency components, which are represented by the output of the transform as a function of frequency. Most commonly functions of time or space are transformed, ...
of a normal density f with mean \mu and standard deviation \sigma is : \hat f(t) = \int_^\infty f(x)e^ \, dx = e^ e^ where i is the
imaginary unit The imaginary unit or unit imaginary number () is a solution to the quadratic equation x^2+1=0. Although there is no real number with this property, can be used to extend the real numbers to what are called complex numbers, using addition an ...
. If the mean \mu=0, the first factor is 1, and the Fourier transform is, apart from a constant factor, a normal density on the
frequency domain In physics, electronics, control systems engineering, and statistics, the frequency domain refers to the analysis of mathematical functions or signals with respect to frequency, rather than time. Put simply, a time-domain graph shows how a signa ...
, with mean 0 and standard deviation 1/\sigma. In particular, the standard normal distribution \varphi is an
eigenfunction In mathematics, an eigenfunction of a linear operator ''D'' defined on some function space is any non-zero function f in that space that, when acted upon by ''D'', is only multiplied by some scaling factor called an eigenvalue. As an equation, th ...
of the Fourier transform. In probability theory, the Fourier transform of the probability distribution of a real-valued random variable X is closely connected to the
characteristic function In mathematics, the term "characteristic function" can refer to any of several distinct concepts: * The indicator function of a subset, that is the function ::\mathbf_A\colon X \to \, :which for a given subset ''A'' of ''X'', has value 1 at points ...
\varphi_X(t) of that variable, which is defined as the
expected value In probability theory, the expected value (also called expectation, expectancy, mathematical expectation, mean, average, or first moment) is a generalization of the weighted average. Informally, the expected value is the arithmetic mean of a l ...
of e^, as a function of the real variable t (the
frequency Frequency is the number of occurrences of a repeating event per unit of time. It is also occasionally referred to as ''temporal frequency'' for clarity, and is distinct from ''angular frequency''. Frequency is measured in hertz (Hz) which is eq ...
parameter of the Fourier transform). This definition can be analytically extended to a complex-value variable t. The relation between both is: :\varphi_X(t) = \hat f(-t)


Moment and cumulant generating functions

The
moment generating function In probability theory and statistics, the moment-generating function of a real-valued random variable is an alternative specification of its probability distribution. Thus, it provides the basis of an alternative route to analytical results compare ...
of a real random variable X is the expected value of e^, as a function of the real parameter t. For a normal distribution with density f, mean \mu and deviation \sigma, the moment generating function exists and is equal to :M(t) = \operatorname ^= \hat f(it) = e^ e^ The
cumulant generating function In probability theory and statistics, the cumulants of a probability distribution are a set of quantities that provide an alternative to the '' moments'' of the distribution. Any two probability distributions whose moments are identical will have ...
is the logarithm of the moment generating function, namely :g(t) = \ln M(t) = \mu t + \tfrac 12 \sigma^2 t^2 Since this is a quadratic polynomial in t, only the first two
cumulant In probability theory and statistics, the cumulants of a probability distribution are a set of quantities that provide an alternative to the '' moments'' of the distribution. Any two probability distributions whose moments are identical will ha ...
s are nonzero, namely the mean \mu and the variance \sigma^2.


Stein operator and class

Within
Stein's method Stein's method is a general method in probability theory to obtain bounds on the distance between two probability distributions with respect to a probability metric. It was introduced by Charles Stein, who first published it in 1972, to obtain ...
the Stein operator and class of a random variable X \sim \mathcal(\mu, \sigma^2) are \mathcalf(x) = \sigma^2 f'(x) - (x-\mu)f(x) and \mathcal the class of all absolutely continuous functions f : \R \to \R \mbox\mathbb[, f'(X), ]< \infty.


Zero-variance limit

In the limit (mathematics), limit when \sigma tends to zero, the probability density f(x) eventually tends to zero at any x\ne \mu, but grows without limit if x = \mu, while its integral remains equal to 1. Therefore, the normal distribution cannot be defined as an ordinary
function Function or functionality may refer to: Computing * Function key, a type of key on computer keyboards * Function model, a structured representation of processes in a system * Function object or functor or functionoid, a concept of object-oriente ...
when \sigma = 0. However, one can define the normal distribution with zero variance as a
generalized function In mathematics, generalized functions are objects extending the notion of functions. There is more than one recognized theory, for example the theory of distributions. Generalized functions are especially useful in making discontinuous functions ...
; specifically, as Dirac's "delta function" \delta translated by the mean \mu, that is f(x)=\delta(x-\mu). Its CDF is then the
Heaviside step function The Heaviside step function, or the unit step function, usually denoted by or (but sometimes , or ), is a step function, named after Oliver Heaviside (1850–1925), the value of which is zero for negative arguments and one for positive argume ...
translated by the mean \mu, namely :F(x) = \begin 0 & \textx < \mu \\ 1 & \textx \geq \mu \end


Maximum entropy

Of all probability distributions over the reals with a specified mean \mu and variance \sigma^2, the normal distribution N(\mu,\sigma^2) is the one with maximum entropy. If X is a
continuous random variable In probability theory and statistics, a probability distribution is the mathematical function that gives the probabilities of occurrence of different possible outcomes for an experiment. It is a mathematical description of a random phenomenon i ...
with
probability density In probability theory, a probability density function (PDF), or density of a continuous random variable, is a function whose value at any given sample (or point) in the sample space (the set of possible values taken by the random variable) can ...
f(x), then the entropy of X is defined as : H(X) = - \int_^\infty f(x)\log f(x)\, dx where f(x)\log f(x) is understood to be zero whenever f(x)=0. This functional can be maximized, subject to the constraints that the distribution is properly normalized and has a specified variance, by using
variational calculus The calculus of variations (or Variational Calculus) is a field of mathematical analysis that uses variations, which are small changes in functions and functionals, to find maxima and minima of functionals: mappings from a set of functions t ...
. A function with two
Lagrange multipliers In mathematical optimization, the method of Lagrange multipliers is a strategy for finding the local maxima and minima of a function subject to equality constraints (i.e., subject to the condition that one or more equations have to be satisfied ex ...
is defined: : L=\int_^\infty f(x)\ln(f(x))\,dx-\lambda_0\left(1-\int_^\infty f(x)\,dx\right)-\lambda\left(\sigma^2-\int_^\infty f(x)(x-\mu)^2\,dx\right) where f(x) is, for now, regarded as some density function with mean \mu and standard deviation \sigma. At maximum entropy, a small variation \delta f(x) about f(x) will produce a variation \delta L about L which is equal to 0: : 0=\delta L=\int_^\infty \delta f(x)\left (\ln(f(x))+1+\lambda_0+\lambda(x-\mu)^2\right )\,dx Since this must hold for any small \delta f(x), the term in brackets must be zero, and solving for f(x) yields: :f(x)=e^ Using the constraint equations to solve for \lambda_0 and \lambda yields the density of the normal distribution: : f(x, \mu, \sigma)=\frace^ The entropy of a normal distribution is equal to : H(X)=\tfrac(1+\log(2\sigma^2\pi))


Other properties


Related distributions


Central limit theorem

The central limit theorem states that under certain (fairly common) conditions, the sum of many random variables will have an approximately normal distribution. More specifically, where X_1,\ldots ,X_n are
independent and identically distributed In probability theory and statistics, a collection of random variables is independent and identically distributed if each random variable has the same probability distribution as the others and all are mutually independent. This property is usua ...
random variables with the same arbitrary distribution, zero mean, and variance \sigma^2 and Z is their mean scaled by \sqrt : Z = \sqrt\left(\frac\sum_^n X_i\right) Then, as n increases, the probability distribution of Z will tend to the normal distribution with zero mean and variance \sigma^2. The theorem can be extended to variables (X_i) that are not independent and/or not identically distributed if certain constraints are placed on the degree of dependence and the moments of the distributions. Many
test statistic A test statistic is a statistic (a quantity derived from the sample) used in statistical hypothesis testing.Berger, R. L.; Casella, G. (2001). ''Statistical Inference'', Duxbury Press, Second Edition (p.374) A hypothesis test is typically specif ...
s, scores, and
estimator In statistics, an estimator is a rule for calculating an estimate of a given quantity based on observed data: thus the rule (the estimator), the quantity of interest (the estimand) and its result (the estimate) are distinguished. For example, the ...
s encountered in practice contain sums of certain random variables in 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 distributions. The central limit theorem also implies that certain distributions can be approximated by the normal distribution, for example: * The
binomial distribution In probability theory and statistics, the binomial distribution with parameters ''n'' and ''p'' is the discrete probability distribution of the number of successes in a sequence of ''n'' independent experiments, each asking a yes–no quest ...
B(n,p) is approximately normal with mean np and variance np(1-p) for large n and for p not too close to 0 or 1. * The
Poisson distribution In probability theory and statistics, the Poisson distribution is a discrete probability distribution that expresses the probability of a given number of events occurring in a fixed interval of time or space if these events occur with a known co ...
with parameter \lambda is approximately normal with mean \lambda and variance \lambda, for large values of \lambda. * The
chi-squared distribution In probability theory and statistics, the chi-squared distribution (also chi-square or \chi^2-distribution) with k degrees of freedom is the distribution of a sum of the squares of k independent standard normal random variables. The chi-squa ...
\chi^2(k) is approximately normal with mean k and variance 2k, for large k. * The
Student's t-distribution In probability and statistics, Student's ''t''-distribution (or simply the ''t''-distribution) is any member of a family of continuous probability distributions that arise when estimating the mean of a normally distributed population in sit ...
t(\nu) is approximately normal with mean 0 and variance 1 when \nu is large. Whether these approximations are sufficiently accurate depends on the purpose for which they are needed, and the rate of convergence to the normal distribution. It is typically the case that such approximations are less accurate in the tails of the distribution. A general upper bound for the approximation error in the central limit theorem is given by the
Berry–Esseen theorem In probability theory, the central limit theorem states that, under certain circumstances, the probability distribution of the scaled mean of a random sample converges to a normal distribution as the sample size increases to infinity. Under strong ...
, improvements of the approximation are given by the
Edgeworth expansion The Gram–Charlier A series (named in honor of Jørgen Pedersen Gram and Carl Charlier), and the Edgeworth series (named in honor of Francis Ysidro Edgeworth) are series that approximate a probability distribution in terms of its cumulants. The se ...
s. This theorem can also be used to justify modeling the sum of many uniform noise sources as
Gaussian noise Gaussian noise, named after Carl Friedrich Gauss, is a term from signal processing theory denoting a kind of signal noise that has a probability density function (pdf) equal to that of the normal distribution (which is also known as the Gaussia ...
. See
AWGN Additive white Gaussian noise (AWGN) is a basic noise model used in information theory to mimic the effect of many random processes that occur in nature. The modifiers denote specific characteristics: * ''Additive'' because it is added to any nois ...
.


Operations and functions of normal variables

The
probability density In probability theory, a probability density function (PDF), or density of a continuous random variable, is a function whose value at any given sample (or point) in the sample space (the set of possible values taken by the random variable) can ...
,
cumulative distribution In statistics, the frequency (or absolute frequency) of an event i is the number n_i of times the observation has occurred/recorded in an experiment or study. These frequencies are often depicted graphically or in tabular form. Types The cumul ...
, and inverse cumulative distribution of any function of one or more independent or correlated normal variables can be computed with the numerical method of ray-tracing
Matlab code
. In the following sections we look at some special cases.


Operations on a single normal variable

If X is distributed normally with mean \mu and variance \sigma^2, then * aX+b, for any real numbers a and b, is also normally distributed, with mean a\mu+b and standard deviation , a, \sigma. That is, the family of normal distributions is closed under linear transformations. * The exponential of X is distributed log-normally: . * The absolute value of X has
folded normal distribution The folded normal distribution is a probability distribution related to the normal distribution. Given a normally distributed random variable ''X'' with mean ''μ'' and variance ''σ''2, the random variable ''Y'' = , ''X'', has a folded normal d ...
: . If \mu = 0 this is known as the
half-normal distribution In probability theory and statistics, the half-normal distribution is a special case of the folded normal distribution. Let X follow an ordinary normal distribution, N(0,\sigma^2). Then, Y=, X, follows a half-normal distribution. Thus, the hal ...
. * The absolute value of normalized residuals, , ''X'' − ''μ'', /''σ'', has
chi distribution In probability theory and statistics, the chi distribution is a continuous probability distribution. It is the distribution of the positive square root of the sum of squares of a set of independent random variables each following a standard norm ...
with one degree of freedom: , X - \mu, / \sigma \sim \chi_1. * The square of ''X''/''σ'' has the
noncentral chi-squared distribution In probability theory and statistics, the noncentral chi-squared distribution (or noncentral chi-square distribution, noncentral \chi^2 distribution) is a noncentral generalization of the chi-squared distribution. It often arises in the power a ...
with one degree of freedom: X^2 / \sigma^2 \sim \chi_1^2(\mu^2 / \sigma^2). If \mu = 0, the distribution is called simply chi-squared. * The log likelihood of a normal variable x is simply the log of its
probability density function In probability theory, a probability density function (PDF), or density of a continuous random variable, is a function whose value at any given sample (or point) in the sample space (the set of possible values taken by the random variable) can ...
: \ln p(x)= -\frac \left(\frac \right)^2 -\ln \left(\sigma \sqrt \right) = -\frac z^2 -\ln \left(\sigma \sqrt \right). Since this is a scaled and shifted square of a standard normal variable, it is distributed as a scaled and shifted chi-squared variable. * The distribution of the variable ''X'' restricted to an interval 'a'', ''b''is called the
truncated normal distribution In probability and statistics, the truncated normal distribution is the probability distribution derived from that of a normally distributed random variable by bounding the random variable from either below or above (or both). The truncated no ...
. * (''X'' − ''μ'')−2 has a
Lévy distribution In probability theory and statistics, the Lévy distribution, named after Paul Lévy, is a continuous probability distribution for a non-negative random variable. In spectroscopy, this distribution, with frequency as the dependent variable, is kn ...
with location 0 and scale ''σ''−2.


= Operations on two independent normal variables

= * If X_1 and X_2 are two
independent Independent or Independents may refer to: Arts, entertainment, and media Artist groups * Independents (artist group), a group of modernist painters based in the New Hope, Pennsylvania, area of the United States during the early 1930s * Independ ...
normal random variables, with means \mu_1, \mu_2 and standard deviations \sigma_1, \sigma_2, then their sum X_1 + X_2 will also be normally distributed, roof/sup> with mean \mu_1 + \mu_2 and variance \sigma_1^2 + \sigma_2^2. * In particular, if X and Y are independent normal deviates with zero mean and variance \sigma^2, then X + Y and X - Y are also independent and normally distributed, with zero mean and variance 2\sigma^2. This is a special case of the
polarization identity In linear algebra, a branch of mathematics, the polarization identity is any one of a family of formulas that express the inner product of two vectors in terms of the norm of a normed vector space. If a norm arises from an inner product then t ...
. * If X_1, X_2 are two independent normal deviates with mean \mu and deviation \sigma, and a, b are arbitrary real numbers, then the variable X_3 = \frac + \mu is also normally distributed with mean \mu and deviation \sigma. It follows that the normal distribution is
stable A stable is a building in which livestock, especially horses, are kept. It most commonly means a building that is divided into separate stalls for individual animals and livestock. There are many different types of stables in use today; the ...
(with exponent \alpha=2).


= Operations on two independent standard normal variables

= If X_1 and X_2 are two independent standard normal random variables with mean 0 and variance 1, then * Their sum and difference is distributed normally with mean zero and variance two: X_1 \pm X_2 \sim N(0, 2). * Their product Z = X_1 X_2 follows the
product distribution A product distribution is a probability distribution constructed as the distribution of the product of random variables having two other known distributions. Given two statistically independent random variables ''X'' and ''Y'', the distribution of ...
with density function f_Z(z) = \pi^ K_0(, z, ) where K_0 is the
modified Bessel function of the second kind Bessel functions, first defined by the mathematician Daniel Bernoulli and then generalized by Friedrich Bessel, are canonical solutions of Bessel's differential equation x^2 \frac + x \frac + \left(x^2 - \alpha^2 \right)y = 0 for an arbitrary ...
. This distribution is symmetric around zero, unbounded at z = 0, and has the
characteristic function In mathematics, the term "characteristic function" can refer to any of several distinct concepts: * The indicator function of a subset, that is the function ::\mathbf_A\colon X \to \, :which for a given subset ''A'' of ''X'', has value 1 at points ...
\phi_Z(t) = (1 + t^2)^. * Their ratio follows the standard
Cauchy distribution The Cauchy distribution, named after Augustin Cauchy, is a continuous probability distribution. It is also known, especially among physicists, as the Lorentz distribution (after Hendrik Lorentz), Cauchy–Lorentz distribution, Lorentz(ian) fun ...
: X_1/ X_2 \sim \operatorname(0, 1). * Their Euclidean norm \sqrt has the
Rayleigh distribution In probability theory and statistics, the Rayleigh distribution is a continuous probability distribution for nonnegative-valued random variables. Up to rescaling, it coincides with the chi distribution with two degrees of freedom. The distribut ...
.


Operations on multiple independent normal variables

* Any linear combination of independent normal deviates is a normal deviate. * If X_1, X_2, \ldots, X_n are independent standard normal random variables, then the sum of their squares has the
chi-squared distribution In probability theory and statistics, the chi-squared distribution (also chi-square or \chi^2-distribution) with k degrees of freedom is the distribution of a sum of the squares of k independent standard normal random variables. The chi-squa ...
with n degrees of freedom X_1^2 + \cdots + X_n^2 \sim \chi_n^2. * If X_1, X_2, \ldots, X_n are independent normally distributed random variables with means \mu and variances \sigma^2, then their
sample mean The sample mean (or "empirical mean") and the sample covariance are statistics computed from a Sample (statistics), sample of data on one or more random variables. The sample mean is the average value (or mean, mean value) of a sample (statistic ...
is independent from the sample
standard deviation In statistics, the standard deviation is a measure of the amount of variation or dispersion of a set of values. A low standard deviation indicates that the values tend to be close to the mean (also called the expected value) of the set, while ...
, which can be demonstrated using Basu's theorem or
Cochran's theorem In statistics, Cochran's theorem, devised by William G. Cochran, is a theorem used to justify results relating to the probability distributions of statistics that are used in the analysis of variance. Statement Let ''U''1, ..., ''U'N'' be i.i. ...
. The ratio of these two quantities will have the
Student's t-distribution In probability and statistics, Student's ''t''-distribution (or simply the ''t''-distribution) is any member of a family of continuous probability distributions that arise when estimating the mean of a normally distributed population in sit ...
with n-1 degrees of freedom: t = \frac = \frac \sim t_. * If X_1, X_2, \ldots, X_n, Y_1, Y_2, \ldots, Y_m are independent standard normal random variables, then the ratio of their normalized sums of squares will have the with degrees of freedom: F = \frac \sim F_.


Operations on multiple correlated normal variables

* A
quadratic form In mathematics, a quadratic form is a polynomial with terms all of degree two ("form" is another name for a homogeneous polynomial). For example, :4x^2 + 2xy - 3y^2 is a quadratic form in the variables and . The coefficients usually belong to a ...
of a normal vector, i.e. a quadratic function q = \sum x_i^2 + \sum x_j + c of multiple independent or correlated normal variables, is a generalized chi-square variable.


Operations on the density function

The split normal distribution is most directly defined in terms of joining scaled sections of the density functions of different normal distributions and rescaling the density to integrate to one. The
truncated normal distribution In probability and statistics, the truncated normal distribution is the probability distribution derived from that of a normally distributed random variable by bounding the random variable from either below or above (or both). The truncated no ...
results from rescaling a section of a single density function.


Infinite divisibility and Cramér's theorem

For any positive integer \text, any normal distribution with mean \mu and variance \sigma^2 is the distribution of the sum of \text independent normal deviates, each with mean \frac and variance \frac. This property is called
infinite divisibility Infinite divisibility arises in different ways in philosophy, physics, economics, order theory (a branch of mathematics), and probability theory (also a branch of mathematics). One may speak of infinite divisibility, or the lack thereof, of matter ...
. Conversely, if X_1 and X_2 are independent random variables and their sum X_1+X_2 has a normal distribution, then both X_1 and X_2 must be normal deviates. This result is known as Cramér's decomposition theorem, and is equivalent to saying that the convolution of two distributions is normal if and only if both are normal. Cramér's theorem implies that a linear combination of independent non-Gaussian variables will never have an exactly normal distribution, although it may approach it arbitrarily closely.


Bernstein's theorem

Bernstein's theorem states that if X and Y are independent and X + Y and X - Y are also independent, then both ''X'' and ''Y'' must necessarily have normal distributions. More generally, if X_1, \ldots, X_n are independent random variables, then two distinct linear combinations \sum and \sumwill be independent if and only if all X_k are normal and \sum, where \sigma_k^2 denotes the variance of X_k.


Extensions

The notion of normal distribution, being one of the most important distributions in probability theory, has been extended far beyond the standard framework of the univariate (that is one-dimensional) case (Case 1). All these extensions are also called ''normal'' or ''Gaussian'' laws, so a certain ambiguity in names exists. * The
multivariate normal distribution In probability theory and statistics, the multivariate normal distribution, multivariate Gaussian distribution, or joint normal distribution is a generalization of the one-dimensional (univariate) normal distribution to higher dimensions. One d ...
describes the Gaussian law in the ''k''-dimensional Euclidean space. A vector is multivariate-normally distributed if any linear combination of its components has a (univariate) normal distribution. The variance of ''X'' is a ''k×k'' symmetric positive-definite matrix ''V''. The multivariate normal distribution is a special case of the
elliptical distribution In probability and statistics, an elliptical distribution is any member of a broad family of probability distributions that generalize the multivariate normal distribution. Intuitively, in the simplified two and three dimensional case, the joint di ...
s. As such, its iso-density loci in the ''k'' = 2 case are ellipses and in the case of arbitrary ''k'' are ellipsoids. * Rectified Gaussian distribution a rectified version of normal distribution with all the negative elements reset to 0 * Complex normal distribution deals with the complex normal vectors. A complex vector is said to be normal if both its real and imaginary components jointly possess a 2''k''-dimensional multivariate normal distribution. The variance-covariance structure of ''X'' is described by two matrices: the ''variance'' matrix Γ, and the ''relation'' matrix ''C''. * Matrix normal distribution describes the case of normally distributed matrices. * Gaussian processes are the normally distributed stochastic processes. These can be viewed as elements of some infinite-dimensional Hilbert space ''H'', and thus are the analogues of multivariate normal vectors for the case . A random element is said to be normal if for any constant the scalar product has a (univariate) normal distribution. The variance structure of such Gaussian random element can be described in terms of the linear ''covariance ''. Several Gaussian processes became popular enough to have their own names: ** Wiener process, Brownian motion, ** Brownian bridge, ** Ornstein–Uhlenbeck process. * Gaussian q-distribution is an abstract mathematical construction that represents a "q-analogue" of the normal distribution. * the q-Gaussian is an analogue of the Gaussian distribution, in the sense that it maximises the Tsallis entropy, and is one type of Tsallis distribution. Note that this distribution is different from the Gaussian q-distribution above. * The Kaniadakis Gaussian distribution, Kaniadakis ''κ''-Gaussian distribution is a generalization of the Gaussian distribution which arises from the Kaniadakis statistics, being one of the Kaniadakis distribution, Kaniadakis distributions. A random variable ''X'' has a two-piece normal distribution if it has a distribution : f_X( x ) = N( \mu, \sigma_1^2 ) \text x \le \mu : f_X( x ) = N( \mu, \sigma_2^2 ) \text x \ge \mu where ''μ'' is the mean and ''σ''1 and ''σ''2 are the standard deviations of the distribution to the left and right of the mean respectively. The mean, variance and third central moment of this distribution have been determined : \operatorname( X ) = \mu + \sqrt ( \sigma_2 - \sigma_1 ) : \operatorname( X ) = \left( 1 - \frac 2 \pi\right)( \sigma_2 - \sigma_1 )^2 + \sigma_1 \sigma_2 : \operatorname( X ) = \sqrt( \sigma_2 - \sigma_1 ) \left[ \left( \frac 4 \pi - 1 \right) ( \sigma_2 - \sigma_1)^2 + \sigma_1 \sigma_2 \right] where E(''X''), V(''X'') and T(''X'') are the mean, variance, and third central moment respectively. One of the main practical uses of the Gaussian law is to model the empirical distributions of many different random variables encountered in practice. In such case a possible extension would be a richer family of distributions, having more than two parameters and therefore being able to fit the empirical distribution more accurately. The examples of such extensions are: * Pearson distribution — a four-parameter family of probability distributions that extend the normal law to include different skewness and kurtosis values. * The generalized normal distribution, also known as the exponential power distribution, allows for distribution tails with thicker or thinner asymptotic behaviors.


Statistical inference


Estimation of parameters

It is often the case that we do not know the parameters of the normal distribution, but instead want to Estimation theory, estimate them. That is, having a sample (x_1, \ldots, x_n) from a normal N(\mu, \sigma^2) population we would like to learn the approximate values of parameters \mu and \sigma^2. The standard approach to this problem is the maximum likelihood method, which requires maximization of the ''log-likelihood function'': : \ln\mathcal(\mu,\sigma^2) = \sum_^n \ln f(x_i\mid\mu,\sigma^2) = -\frac\ln(2\pi) - \frac\ln\sigma^2 - \frac\sum_^n (x_i-\mu)^2. Taking derivatives with respect to \mu and \sigma^2 and solving the resulting system of first order conditions yields the ''maximum likelihood estimates'': : \hat = \overline \equiv \frac\sum_^n x_i, \qquad \hat^2 = \frac \sum_^n (x_i - \overline)^2.


Sample mean

Estimator \textstyle\hat\mu is called the ''
sample mean The sample mean (or "empirical mean") and the sample covariance are statistics computed from a Sample (statistics), sample of data on one or more random variables. The sample mean is the average value (or mean, mean value) of a sample (statistic ...
'', since it is the arithmetic mean of all observations. The statistic \textstyle\overline is complete statistic, complete and sufficient statistic, sufficient for \mu, and therefore by the Lehmann–Scheffé theorem, \textstyle\hat\mu is the uniformly minimum variance unbiased (UMVU) estimator. In finite samples it is distributed normally: : \hat\mu \sim \mathcal(\mu,\sigma^2/n). The variance of this estimator is equal to the ''μμ''-element of the inverse Fisher information matrix \textstyle\mathcal^. This implies that the estimator is efficient estimator, finite-sample efficient. Of practical importance is the fact that the standard error (statistics), standard error of \textstyle\hat\mu is proportional to \textstyle1/\sqrt, that is, if one wishes to decrease the standard error by a factor of 10, one must increase the number of points in the sample by a factor of 100. This fact is widely used in determining sample sizes for opinion polls and the number of trials in Monte Carlo simulations. From the standpoint of the asymptotic theory (statistics), asymptotic theory, \textstyle\hat\mu is consistent estimator, consistent, that is, it convergence in probability, converges in probability to \mu as n\rightarrow\infty. The estimator is also asymptotic normality, asymptotically normal, which is a simple corollary of the fact that it is normal in finite samples: : \sqrt(\hat\mu-\mu) \,\xrightarrow\, \mathcal(0,\sigma^2).


Sample variance

The estimator \textstyle\hat\sigma^2 is called the ''sample variance'', since it is the variance of the sample ((x_1, \ldots, x_n)). In practice, another estimator is often used instead of the \textstyle\hat\sigma^2. This other estimator is denoted s^2, and is also called the ''sample variance'', which represents a certain ambiguity in terminology; its square root s is called the ''sample standard deviation''. The estimator s^2 differs from \textstyle\hat\sigma^2 by having instead of ''n'' in the denominator (the so-called Bessel's correction): : s^2 = \frac \hat\sigma^2 = \frac \sum_^n (x_i - \overline)^2. The difference between s^2 and \textstyle\hat\sigma^2 becomes negligibly small for large ''n''s. In finite samples however, the motivation behind the use of s^2 is that it is an unbiased estimator of the underlying parameter \sigma^2, whereas \textstyle\hat\sigma^2 is biased. Also, by the Lehmann–Scheffé theorem the estimator s^2 is uniformly minimum variance unbiased (Minimum-variance unbiased estimator, UMVU), which makes it the "best" estimator among all unbiased ones. However it can be shown that the biased estimator \textstyle\hat\sigma^2 is "better" than the s^2 in terms of the mean squared error (MSE) criterion. In finite samples both s^2 and \textstyle\hat\sigma^2 have scaled
chi-squared distribution In probability theory and statistics, the chi-squared distribution (also chi-square or \chi^2-distribution) with k degrees of freedom is the distribution of a sum of the squares of k independent standard normal random variables. The chi-squa ...
with degrees of freedom: : s^2 \sim \frac \cdot \chi^2_, \qquad \hat\sigma^2 \sim \frac \cdot \chi^2_. The first of these expressions shows that the variance of s^2 is equal to 2\sigma^4/(n-1), which is slightly greater than the ''σσ''-element of the inverse Fisher information matrix \textstyle\mathcal^. Thus, s^2 is not an efficient estimator for \sigma^2, and moreover, since s^2 is UMVU, we can conclude that the finite-sample efficient estimator for \sigma^2 does not exist. Applying the asymptotic theory, both estimators s^2 and \textstyle\hat\sigma^2 are consistent, that is they converge in probability to \sigma^2 as the sample size n\rightarrow\infty. The two estimators are also both asymptotically normal: : \sqrt(\hat\sigma^2 - \sigma^2) \simeq \sqrt(s^2-\sigma^2) \,\xrightarrow\, \mathcal(0,2\sigma^4). In particular, both estimators are asymptotically efficient for \sigma^2.


Confidence intervals

By
Cochran's theorem In statistics, Cochran's theorem, devised by William G. Cochran, is a theorem used to justify results relating to the probability distributions of statistics that are used in the analysis of variance. Statement Let ''U''1, ..., ''U'N'' be i.i. ...
, for normal distributions the sample mean \textstyle\hat\mu and the sample variance ''s''2 are
independent Independent or Independents may refer to: Arts, entertainment, and media Artist groups * Independents (artist group), a group of modernist painters based in the New Hope, Pennsylvania, area of the United States during the early 1930s * Independ ...
, which means there can be no gain in considering their joint distribution. There is also a converse theorem: if in a sample the sample mean and sample variance are independent, then the sample must have come from the normal distribution. The independence between \textstyle\hat\mu and ''s'' can be employed to construct the so-called ''t-statistic'': : t = \frac = \frac \sim t_ This quantity ''t'' has the
Student's t-distribution In probability and statistics, Student's ''t''-distribution (or simply the ''t''-distribution) is any member of a family of continuous probability distributions that arise when estimating the mean of a normally distributed population in sit ...
with degrees of freedom, and it is an ancillary statistic (independent of the value of the parameters). Inverting the distribution of this ''t''-statistics will allow us to construct the
confidence interval In frequentist statistics, a confidence interval (CI) is a range of estimates for an unknown parameter. A confidence interval is computed at a designated ''confidence level''; the 95% confidence level is most common, but other levels, such as 9 ...
for ''μ''; similarly, inverting the ''χ''2 distribution of the statistic ''s''2 will give us the confidence interval for ''σ''2: :\mu \in \left[ \hat\mu - t_ \fracs, \hat\mu + t_ \fracs \right], :\sigma^2 \in \left[ \frac, \frac \right], where ''tk,p'' and are the ''p''th
quantile In statistics and probability, quantiles are cut points dividing the range of a probability distribution into continuous intervals with equal probabilities, or dividing the observations in a sample in the same way. There is one fewer quantile tha ...
s of the ''t''- and ''χ''2-distributions respectively. These confidence intervals are of the ''confidence level'' , meaning that the true values ''μ'' and ''σ''2 fall outside of these intervals with probability (or significance level) ''α''. In practice people usually take , resulting in the 95% confidence intervals. Approximate formulas can be derived from the asymptotic distributions of \textstyle\hat\mu and ''s''2: :\mu \in \left[ \hat\mu - , z_, \fracs, \hat\mu + , z_, \fracs \right], :\sigma^2 \in \left[ s^2 - , z_, \fracs^2, s^2 + , z_, \fracs^2 \right], The approximate formulas become valid for large values of ''n'', and are more convenient for the manual calculation since the standard normal quantiles ''z''''α''/2 do not depend on ''n''. In particular, the most popular value of , results in .


Normality tests

Normality tests assess the likelihood that the given data set comes from a normal distribution. Typically the null hypothesis ''H''0 is that the observations are distributed normally with unspecified mean ''μ'' and variance ''σ''2, versus the alternative ''Ha'' that the distribution is arbitrary. Many tests (over 40) have been devised for this problem. The more prominent of them are outlined below: Diagnostic plots are more intuitively appealing but subjective at the same time, as they rely on informal human judgement to accept or reject the null hypothesis. *
Q–Q plot In statistics, a Q–Q plot (quantile-quantile plot) is a probability plot, a List of graphical methods, graphical method for comparing two probability distributions by plotting their ''quantiles'' against each other. A point on the plot co ...
, also known as normal probability plot or rankit plot—is a plot of the sorted values from the data set against the expected values of the corresponding quantiles from the standard normal distribution. That is, it's a plot of point of the form (Φ−1(''pk''), ''x''(''k'')), where plotting points ''pk'' are equal to ''pk'' = (''k'' − ''α'')/(''n'' + 1 − 2''α'') and ''α'' is an adjustment constant, which can be anything between 0 and 1. If the null hypothesis is true, the plotted points should approximately lie on a straight line. * P–P plot – similar to the Q–Q plot, but used much less frequently. This method consists of plotting the points (Φ(''z''(''k'')), ''pk''), where \textstyle z_ = (x_-\hat\mu)/\hat\sigma. For normally distributed data this plot should lie on a 45° line between (0, 0) and (1, 1). Goodness-of-fit tests: ''Moment-based tests'': * D'Agostino's K-squared test * Jarque–Bera test * Shapiro–Wilk test: This is based on the fact that the line in the Q–Q plot has the slope of ''σ''. The test compares the least squares estimate of that slope with the value of the sample variance, and rejects the null hypothesis if these two quantities differ significantly. ''Tests based on the empirical distribution function'': * Anderson–Darling test * Lilliefors test (an adaptation of the Kolmogorov–Smirnov test)


Bayesian analysis of the normal distribution

Bayesian analysis of normally distributed data is complicated by the many different possibilities that may be considered: * Either the mean, or the variance, or neither, may be considered a fixed quantity. * When the variance is unknown, analysis may be done directly in terms of the variance, or in terms of the
precision Precision, precise or precisely may refer to: Science, and technology, and mathematics Mathematics and computing (general) * Accuracy and precision, measurement deviation from true value and its scatter * Significant figures, the number of digit ...
, the reciprocal of the variance. The reason for expressing the formulas in terms of precision is that the analysis of most cases is simplified. * Both univariate and multivariate normal distribution, multivariate cases need to be considered. * Either conjugate prior, conjugate or improper prior, improper prior distributions may be placed on the unknown variables. * An additional set of cases occurs in Bayesian linear regression, where in the basic model the data is assumed to be normally distributed, and normal priors are placed on the regression coefficients. The resulting analysis is similar to the basic cases of independent identically distributed data. The formulas for the non-linear-regression cases are summarized in the conjugate prior article.


Sum of two quadratics


= Scalar form

= The following auxiliary formula is useful for simplifying the posterior distribution, posterior update equations, which otherwise become fairly tedious. :a(x-y)^2 + b(x-z)^2 = (a + b)\left(x - \frac\right)^2 + \frac(y-z)^2 This equation rewrites the sum of two quadratics in ''x'' by expanding the squares, grouping the terms in ''x'', and completing the square. Note the following about the complex constant factors attached to some of the terms: # The factor \frac has the form of a weighted average of ''y'' and ''z''. # \frac = \frac = (a^ + b^)^. This shows that this factor can be thought of as resulting from a situation where the Multiplicative inverse, reciprocals of quantities ''a'' and ''b'' add directly, so to combine ''a'' and ''b'' themselves, it's necessary to reciprocate, add, and reciprocate the result again to get back into the original units. This is exactly the sort of operation performed by the harmonic mean, so it is not surprising that \frac is one-half the harmonic mean of ''a'' and ''b''.


= Vector form

= A similar formula can be written for the sum of two vector quadratics: If x, y, z are vectors of length ''k'', and A and B are symmetric matrix, symmetric, invertible matrices of size k\times k, then : \begin & (\mathbf-\mathbf)'\mathbf(\mathbf-\mathbf) + (\mathbf-\mathbf)' \mathbf(\mathbf-\mathbf) \\ = & (\mathbf - \mathbf)'(\mathbf+\mathbf)(\mathbf - \mathbf) + (\mathbf - \mathbf)'(\mathbf^ + \mathbf^)^(\mathbf - \mathbf) \end where :\mathbf = (\mathbf + \mathbf)^(\mathbf\mathbf + \mathbf \mathbf) Note that the form x′ A x is called a
quadratic form In mathematics, a quadratic form is a polynomial with terms all of degree two ("form" is another name for a homogeneous polynomial). For example, :4x^2 + 2xy - 3y^2 is a quadratic form in the variables and . The coefficients usually belong to a ...
and is a scalar (mathematics), scalar: :\mathbf'\mathbf\mathbf = \sum_a_ x_i x_j In other words, it sums up all possible combinations of products of pairs of elements from x, with a separate coefficient for each. In addition, since x_i x_j = x_j x_i, only the sum a_ + a_ matters for any off-diagonal elements of A, and there is no loss of generality in assuming that A is symmetric matrix, symmetric. Furthermore, if A is symmetric, then the form \mathbf'\mathbf\mathbf = \mathbf'\mathbf\mathbf.


Sum of differences from the mean

Another useful formula is as follows: \sum_^n (x_i-\mu)^2 = \sum_^n (x_i-\bar)^2 + n(\bar -\mu)^2 where \bar = \frac \sum_^n x_i.


With known variance

For a set of i.i.d. normally distributed data points X of size ''n'' where each individual point ''x'' follows x \sim \mathcal(\mu, \sigma^2) with known
variance In probability theory and statistics, variance is the expectation of the squared deviation of a random variable from its population mean or sample mean. Variance is a measure of dispersion, meaning it is a measure of how far a set of numbers ...
σ2, the conjugate prior distribution is also normally distributed. This can be shown more easily by rewriting the variance as the
precision Precision, precise or precisely may refer to: Science, and technology, and mathematics Mathematics and computing (general) * Accuracy and precision, measurement deviation from true value and its scatter * Significant figures, the number of digit ...
, i.e. using τ = 1/σ2. Then if x \sim \mathcal(\mu, 1/\tau) and \mu \sim \mathcal(\mu_0, 1/\tau_0), we proceed as follows. First, the likelihood function is (using the formula above for the sum of differences from the mean): :\begin p(\mathbf\mid\mu,\tau) &= \prod_^n \sqrt \exp\left(-\frac\tau(x_i-\mu)^2\right) \\ &= \left(\frac\right)^ \exp\left(-\frac\tau \sum_^n (x_i-\mu)^2\right) \\ &= \left(\frac\right)^ \exp\left[-\frac\tau \left(\sum_^n(x_i-\bar)^2 + n(\bar -\mu)^2\right)\right]. \end Then, we proceed as follows: :\begin p(\mu\mid\mathbf) &\propto p(\mathbf\mid\mu) p(\mu) \\ & = \left(\frac\right)^ \exp\left[-\frac\tau \left(\sum_^n(x_i-\bar)^2 + n(\bar -\mu)^2\right)\right] \sqrt \exp\left(-\frac\tau_0(\mu-\mu_0)^2\right) \\ &\propto \exp\left(-\frac\left(\tau\left(\sum_^n(x_i-\bar)^2 + n(\bar -\mu)^2\right) + \tau_0(\mu-\mu_0)^2\right)\right) \\ &\propto \exp\left(-\frac \left(n\tau(\bar-\mu)^2 + \tau_0(\mu-\mu_0)^2 \right)\right) \\ &= \exp\left(-\frac(n\tau + \tau_0)\left(\mu - \dfrac\right)^2 + \frac(\bar - \mu_0)^2\right) \\ &\propto \exp\left(-\frac(n\tau + \tau_0)\left(\mu - \dfrac\right)^2\right) \end In the above derivation, we used the formula above for the sum of two quadratics and eliminated all constant factors not involving ''μ''. The result is the kernel (statistics), kernel of a normal distribution, with mean \frac and precision n\tau + \tau_0, i.e. :p(\mu\mid\mathbf) \sim \mathcal\left(\frac, \frac\right) This can be written as a set of Bayesian update equations for the posterior parameters in terms of the prior parameters: :\begin \tau_0' &= \tau_0 + n\tau \\[5pt] \mu_0' &= \frac \\[5pt] \bar &= \frac\sum_^n x_i \end That is, to combine ''n'' data points with total precision of ''nτ'' (or equivalently, total variance of ''n''/''σ''2) and mean of values \bar, derive a new total precision simply by adding the total precision of the data to the prior total precision, and form a new mean through a ''precision-weighted average'', i.e. a weighted average of the data mean and the prior mean, each weighted by the associated total precision. This makes logical sense if the precision is thought of as indicating the certainty of the observations: In the distribution of the posterior mean, each of the input components is weighted by its certainty, and the certainty of this distribution is the sum of the individual certainties. (For the intuition of this, compare the expression "the whole is (or is not) greater than the sum of its parts". In addition, consider that the knowledge of the posterior comes from a combination of the knowledge of the prior and likelihood, so it makes sense that we are more certain of it than of either of its components.) The above formula reveals why it is more convenient to do Bayesian analysis of conjugate priors for the normal distribution in terms of the precision. The posterior precision is simply the sum of the prior and likelihood precisions, and the posterior mean is computed through a precision-weighted average, as described above. The same formulas can be written in terms of variance by reciprocating all the precisions, yielding the more ugly formulas :\begin ' &= \frac \\[5pt] \mu_0' &= \frac \\[5pt] \bar &= \frac\sum_^n x_i \end


With known mean

For a set of i.i.d. normally distributed data points X of size ''n'' where each individual point ''x'' follows x \sim \mathcal(\mu, \sigma^2) with known mean μ, the conjugate prior of the
variance In probability theory and statistics, variance is the expectation of the squared deviation of a random variable from its population mean or sample mean. Variance is a measure of dispersion, meaning it is a measure of how far a set of numbers ...
has an inverse gamma distribution or a scaled inverse chi-squared distribution. The two are equivalent 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. The prior for σ2 is as follows: :p(\sigma^2\mid\nu_0,\sigma_0^2) = \frac~\frac \propto \frac The likelihood function from above, written in terms of the variance, is: :\begin p(\mathbf\mid\mu,\sigma^2) &= \left(\frac\right)^ \exp\left[-\frac \sum_^n (x_i-\mu)^2\right] \\ &= \left(\frac\right)^ \exp\left[-\frac\right] \end where :S = \sum_^n (x_i-\mu)^2. Then: :\begin p(\sigma^2\mid\mathbf) &\propto p(\mathbf\mid\sigma^2) p(\sigma^2) \\ &= \left(\frac\right)^ \exp\left[-\frac\right] \frac~\frac \\ &\propto \left(\frac\right)^ \frac \exp\left[-\frac + \frac\right] \\ &= \frac \exp\left[-\frac\right] \end The above is also a scaled inverse chi-squared distribution where :\begin \nu_0' &= \nu_0 + n \\ \nu_0'' &= \nu_0 \sigma_0^2 + \sum_^n (x_i-\mu)^2 \end or equivalently :\begin \nu_0' &= \nu_0 + n \\ ' &= \frac \end Reparameterizing in terms of an inverse gamma distribution, the result is: :\begin \alpha' &= \alpha + \frac \\ \beta' &= \beta + \frac \end


With unknown mean and unknown variance

For a set of i.i.d. normally distributed data points X of size ''n'' where each individual point ''x'' follows x \sim \mathcal(\mu, \sigma^2) with unknown mean μ and unknown
variance In probability theory and statistics, variance is the expectation of the squared deviation of a random variable from its population mean or sample mean. Variance is a measure of dispersion, meaning it is a measure of how far a set of numbers ...
σ2, a combined (multivariate) conjugate prior is placed over the mean and variance, consisting of a normal-inverse-gamma distribution. Logically, this originates as follows: # From the analysis of the case with unknown mean but known variance, we see that the update equations involve sufficient statistics computed from the data consisting of the mean of the data points and the total variance of the data points, computed in turn from the known variance divided by the number of data points. # From the analysis of the case with unknown variance but known mean, we see that the update equations involve sufficient statistics over the data consisting of the number of data points and sum of squared deviations. # Keep in mind that the posterior update values serve as the prior distribution when further data is handled. Thus, we should logically think of our priors in terms of the sufficient statistics just described, with the same semantics kept in mind as much as possible. # To handle the case where both mean and variance are unknown, we could place independent priors over the mean and variance, with fixed estimates of the average mean, total variance, number of data points used to compute the variance prior, and sum of squared deviations. Note however that in reality, the total variance of the mean depends on the unknown variance, and the sum of squared deviations that goes into the variance prior (appears to) depend on the unknown mean. In practice, the latter dependence is relatively unimportant: Shifting the actual mean shifts the generated points by an equal amount, and on average the squared deviations will remain the same. This is not the case, however, with the total variance of the mean: As the unknown variance increases, the total variance of the mean will increase proportionately, and we would like to capture this dependence. # This suggests that we create a ''conditional prior'' of the mean on the unknown variance, with a hyperparameter specifying the mean of the pseudo-observations associated with the prior, and another parameter specifying the number of pseudo-observations. This number serves as a scaling parameter on the variance, making it possible to control the overall variance of the mean relative to the actual variance parameter. The prior for the variance also has two hyperparameters, one specifying the sum of squared deviations of the pseudo-observations associated with the prior, and another specifying once again the number of pseudo-observations. Note that each of the priors has a hyperparameter specifying the number of pseudo-observations, and in each case this controls the relative variance of that prior. These are given as two separate hyperparameters so that the variance (aka the confidence) of the two priors can be controlled separately. # This leads immediately to the normal-inverse-gamma distribution, which is the product of the two distributions just defined, with conjugate priors used (an inverse gamma distribution over the variance, and a normal distribution over the mean, ''conditional'' on the variance) and with the same four parameters just defined. The priors are normally defined as follows: :\begin p(\mu\mid\sigma^2; \mu_0, n_0) &\sim \mathcal(\mu_0,\sigma^2/n_0) \\ p(\sigma^2; \nu_0,\sigma_0^2) &\sim I\chi^2(\nu_0,\sigma_0^2) = IG(\nu_0/2, \nu_0\sigma_0^2/2) \end The update equations can be derived, and look as follows: :\begin \bar &= \frac 1 n \sum_^n x_i \\ \mu_0' &= \frac \\ n_0' &= n_0 + n \\ \nu_0' &= \nu_0 + n \\ \nu_0'' &= \nu_0 \sigma_0^2 + \sum_^n (x_i-\bar)^2 + \frac(\mu_0 - \bar)^2 \end The respective numbers of pseudo-observations add the number of actual observations to them. The new mean hyperparameter is once again a weighted average, this time weighted by the relative numbers of observations. Finally, the update for \nu_0'' is similar to the case with known mean, but in this case the sum of squared deviations is taken with respect to the observed data mean rather than the true mean, and as a result a new "interaction term" needs to be added to take care of the additional error source stemming from the deviation between prior and data mean.


Occurrence and applications

The occurrence of normal distribution in practical problems can be loosely classified into four categories: # Exactly normal distributions; # Approximately normal laws, for example when such approximation is justified by the
central limit theorem In probability theory, the central limit theorem (CLT) establishes that, in many situations, when independent random variables are summed up, their properly normalized sum tends toward a normal distribution even if the original variables themselv ...
; and # Distributions modeled as normal – the normal distribution being the distribution with Principle of maximum entropy, maximum entropy for a given mean and variance. # Regression problems – the normal distribution being found after systematic effects have been modeled sufficiently well.


Exact normality

Certain quantities in physics are distributed normally, as was first demonstrated by James Clerk Maxwell. Examples of such quantities are: * Probability density function of a ground state in a quantum harmonic oscillator. * The position of a particle that experiences diffusion. If initially the particle is located at a specific point (that is its probability distribution is the Dirac delta function), then after time ''t'' its location is described by a normal distribution with variance ''t'', which satisfies the diffusion equation \frac f(x,t) = \frac \frac f(x,t). If the initial location is given by a certain density function g(x), then the density at time ''t'' is the convolution of ''g'' and the normal PDF.


Approximate normality

''Approximately'' normal distributions occur in many situations, as explained by the
central limit theorem In probability theory, the central limit theorem (CLT) establishes that, in many situations, when independent random variables are summed up, their properly normalized sum tends toward a normal distribution even if the original variables themselv ...
. When the outcome is produced by many small effects acting ''additively and independently'', its distribution will be close to normal. The normal approximation will not be valid if the effects act multiplicatively (instead of additively), or if there is a single external influence that has a considerably larger magnitude than the rest of the effects. * In counting problems, where the central limit theorem includes a discrete-to-continuum approximation and where Infinite divisibility, infinitely divisible and Indecomposable distribution, decomposable distributions are involved, such as ** binomial distribution, Binomial random variables, associated with binary response variables; ** Poisson distribution, Poisson random variables, associated with rare events; * Thermal radiation has a Bose–Einstein statistics, Bose–Einstein distribution on very short time scales, and a normal distribution on longer timescales due to the central limit theorem.


Assumed normality

There are statistical methods to empirically test that assumption; see the above #Normality tests, Normality tests section. * In biology, the ''logarithm'' of various variables tend to have a normal distribution, that is, they tend to have a
log-normal distribution In probability theory, a log-normal (or lognormal) distribution is a continuous probability distribution of a random variable whose logarithm is normally distributed. Thus, if the random variable is log-normally distributed, then has a normal ...
(after separation on male/female subpopulations), with examples including: ** Measures of size of living tissue (length, height, skin area, weight); ** The ''length'' of ''inert'' appendages (hair, claws, nails, teeth) of biological specimens, ''in the direction of growth''; presumably the thickness of tree bark also falls under this category; ** Certain physiological measurements, such as blood pressure of adult humans. * In finance, in particular the Black–Scholes model, changes in the ''logarithm'' of exchange rates, price indices, and stock market indices are assumed normal (these variables behave like compound interest, not like simple interest, and so are multiplicative). Some mathematicians such as Benoit Mandelbrot have argued that Levy skew alpha-stable distribution, log-Levy distributions, which possesses heavy tails would be a more appropriate model, in particular for the analysis for stock market crashes. The use of the assumption of normal distribution occurring in financial models has also been criticized by Nassim Nicholas Taleb in his works. * Propagation of uncertainty, Measurement errors in physical experiments are often modeled by a normal distribution. This use of a normal distribution does not imply that one is assuming the measurement errors are normally distributed, rather using the normal distribution produces the most conservative predictions possible given only knowledge about the mean and variance of the errors. * In Standardized testing (statistics), standardized testing, results can be made to have a normal distribution by either selecting the number and difficulty of questions (as in the Intelligence quotient, IQ test) or transforming the raw test scores into "output" scores by fitting them to the normal distribution. For example, the SAT's traditional range of 200–800 is based on a normal distribution with a mean of 500 and a standard deviation of 100. * Many scores are derived from the normal distribution, including percentile ranks ("percentiles" or "quantiles"), normal curve equivalents, stanines, Standard score, z-scores, and T-scores. Additionally, some behavioral statistical procedures assume that scores are normally distributed; for example, Student's t-test, t-tests and Analysis of variance, ANOVAs. Bell curve grading assigns relative grades based on a normal distribution of scores. * In hydrology the distribution of long duration river discharge or rainfall, e.g. monthly and yearly totals, is often thought to be practically normal according to the
central limit theorem In probability theory, the central limit theorem (CLT) establishes that, in many situations, when independent random variables are summed up, their properly normalized sum tends toward a normal distribution even if the original variables themselv ...
. The blue picture, made with CumFreq, illustrates an example of fitting the normal distribution to ranked October rainfalls showing the 90% confidence belt based on the
binomial distribution In probability theory and statistics, the binomial distribution with parameters ''n'' and ''p'' is the discrete probability distribution of the number of successes in a sequence of ''n'' independent experiments, each asking a yes–no quest ...
. The rainfall data are represented by plotting positions as part of the cumulative frequency analysis.


Methodological problems and peer review

John Ioannidis argues that using normally distributed standard deviations as standards for validating research findings leave falsifiability, falsifiable predictions about phenomena that are not normally distributed untested. This includes, for example, phenomena that only appear when all necessary conditions are present and one cannot be a substitute for another in an addition-like way and phenomena that are not randomly distributed. Ioannidis argues that standard deviation-centered validation gives a false appearance of validity to hypotheses and theories where some but not all falsifiable predictions are normally distributed since the portion of falsifiable predictions that there is evidence against may and in some cases are in the non-normally distributed parts of the range of falsifiable predictions, as well as baselessly dismissing hypotheses for which none of the falsifiable predictions are normally distributed as if were they unfalsifiable when in fact they do make falsifiable predictions. It is argued by Ioannidis that many cases of mutually exclusive theories being accepted as "validated" by research journals are caused by failure of the journals to take in empirical falsifications of non-normally distributed predictions, and not because mutually exclusive theories are true, which they cannot be, although two mutually exclusive theories can both be wrong and a third one correct.


Computational methods


Generating values from normal distribution

In computer simulations, especially in applications of the Monte-Carlo method, it is often desirable to generate values that are normally distributed. The algorithms listed below all generate the standard normal deviates, since a can be generated as , where ''Z'' is standard normal. All these algorithms rely on the availability of a random number generator ''U'' capable of producing Uniform distribution (continuous), uniform random variates. * The most straightforward method is based on the probability integral transform property: if ''U'' is distributed uniformly on (0,1), then Φ−1(''U'') will have the standard normal distribution. The drawback of this method is that it relies on calculation of the
probit function In probability theory and statistics, the probit function is the quantile function associated with the standard normal distribution. It has applications in data analysis and machine learning, in particular exploratory statistical graphics and ...
Φ−1, which cannot be done analytically. Some approximate methods are described in and in the error function, erf article. Wichura gives a fast algorithm for computing this function to 16 decimal places, which is used by R programming language, R to compute random variates of the normal distribution. * Irwin–Hall distribution#Approximating a Normal distribution, An easy-to-program approximate approach that relies on the
central limit theorem In probability theory, the central limit theorem (CLT) establishes that, in many situations, when independent random variables are summed up, their properly normalized sum tends toward a normal distribution even if the original variables themselv ...
is as follows: generate 12 uniform ''U''(0,1) deviates, add them all up, and subtract 6 – the resulting random variable will have approximately standard normal distribution. In truth, the distribution will be Irwin–Hall distribution, Irwin–Hall, which is a 12-section eleventh-order polynomial approximation to the normal distribution. This random deviate will have a limited range of (−6, 6). Note that in a true normal distribution, only 0.00034% of all samples will fall outside ±6σ. * The Box–Muller transform, Box–Muller method uses two independent random numbers ''U'' and ''V'' distributed uniform distribution (continuous), uniformly on (0,1). Then the two random variables ''X'' and ''Y'' X = \sqrt \, \cos(2 \pi V) , \qquad Y = \sqrt \, \sin(2 \pi V) . will both have the standard normal distribution, and will be
independent Independent or Independents may refer to: Arts, entertainment, and media Artist groups * Independents (artist group), a group of modernist painters based in the New Hope, Pennsylvania, area of the United States during the early 1930s * Independ ...
. This formulation arises because for a bivariate normal random vector (''X'', ''Y'') the squared norm will have the
chi-squared distribution In probability theory and statistics, the chi-squared distribution (also chi-square or \chi^2-distribution) with k degrees of freedom is the distribution of a sum of the squares of k independent standard normal random variables. The chi-squa ...
with two degrees of freedom, which is an easily generated exponential distribution, exponential random variable corresponding to the quantity −2ln(''U'') in these equations; and the angle is distributed uniformly around the circle, chosen by the random variable ''V''. * The Marsaglia polar method is a modification of the Box–Muller method which does not require computation of the sine and cosine functions. In this method, ''U'' and ''V'' are drawn from the uniform (−1,1) distribution, and then is computed. If ''S'' is greater or equal to 1, then the method starts over, otherwise the two quantities X = U\sqrt, \qquad Y = V\sqrt are returned. Again, ''X'' and ''Y'' are independent, standard normal random variables. * The Ratio method is a rejection method. The algorithm proceeds as follows: ** Generate two independent uniform deviates ''U'' and ''V''; ** Compute ''X'' = (''V'' − 0.5)/''U''; ** Optional: if ''X''2 ≤ 5 − 4''e''1/4''U'' then accept ''X'' and terminate algorithm; ** Optional: if ''X''2 ≥ 4''e''−1.35/''U'' + 1.4 then reject ''X'' and start over from step 1; ** If ''X''2 ≤ −4 ln''U'' then accept ''X'', otherwise start over the algorithm. *:The two optional steps allow the evaluation of the logarithm in the last step to be avoided in most cases. These steps can be greatly improved so that the logarithm is rarely evaluated. * The ziggurat algorithm is faster than the Box–Muller transform and still exact. In about 97% of all cases it uses only two random numbers, one random integer and one random uniform, one multiplication and an if-test. Only in 3% of the cases, where the combination of those two falls outside the "core of the ziggurat" (a kind of rejection sampling using logarithms), do exponentials and more uniform random numbers have to be employed. * Integer arithmetic can be used to sample from the standard normal distribution. This method is exact in the sense that it satisfies the conditions of ''ideal approximation''; i.e., it is equivalent to sampling a real number from the standard normal distribution and rounding this to the nearest representable floating point number. * There is also some investigation into the connection between the fast Hadamard transform and the normal distribution, since the transform employs just addition and subtraction and by the central limit theorem random numbers from almost any distribution will be transformed into the normal distribution. In this regard a series of Hadamard transforms can be combined with random permutations to turn arbitrary data sets into a normally distributed data.


Numerical approximations for the normal CDF and normal quantile function

The standard normal cumulative distribution function, CDF is widely used in scientific and statistical computing. The values Φ(''x'') may be approximated very accurately by a variety of methods, such as numerical integration, Taylor series, asymptotic series and Gauss's continued fraction#Of Kummer's confluent hypergeometric function, continued fractions. Different approximations are used depending on the desired level of accuracy. * give the approximation for Φ(''x'') for ''x > 0'' with the absolute error (algorith
26.2.17
: \Phi(x) = 1 - \varphi(x)\left(b_1 t + b_2 t^2 + b_3t^3 + b_4 t^4 + b_5 t^5\right) + \varepsilon(x), \qquad t = \frac, where ''ϕ''(''x'') is the standard normal PDF, and ''b''0 = 0.2316419, ''b''1 = 0.319381530, ''b''2 = −0.356563782, ''b''3 = 1.781477937, ''b''4 = −1.821255978, ''b''5 = 1.330274429. * lists some dozens of approximations – by means of rational functions, with or without exponentials – for the function. His algorithms vary in the degree of complexity and the resulting precision, with maximum absolute precision of 24 digits. An algorithm by combines Hart's algorithm 5666 with a continued fraction approximation in the tail to provide a fast computation algorithm with a 16-digit precision. * after recalling Hart68 solution is not suited for erf, gives a solution for both erf and erfc, with maximal relative error bound, via rational function, Rational Chebyshev Approximation. * suggested a simple algorithm based on the Taylor series expansion \Phi(x) = \frac12 + \varphi(x)\left( x + \frac 3 + \frac + \frac + \frac + \cdots \right) for calculating with arbitrary precision. The drawback of this algorithm is comparatively slow calculation time (for example it takes over 300 iterations to calculate the function with 16 digits of precision when ). * The GNU Scientific Library calculates values of the standard normal CDF using Hart's algorithms and approximations with Chebyshev polynomials. Shore (1982) introduced simple approximations that may be incorporated in stochastic optimization models of engineering and operations research, like reliability engineering and inventory analysis. Denoting , the simplest approximation for the quantile function is: z = \Phi^(p)=5.5556\left[1- \left( \frac p \right)^\right],\qquad p\ge 1/2 This approximation delivers for ''z'' a maximum absolute error of 0.026 (for , corresponding to ). For replace ''p'' by and change sign. Another approximation, somewhat less accurate, is the single-parameter approximation: z=-0.4115\left\, \qquad p\ge 1/2 The latter had served to derive a simple approximation for the loss integral of the normal distribution, defined by \begin L(z) & =\int_z^\infty (u-z)\varphi(u) \, du=\int_z^\infty [1-\Phi (u)] \, du \\[5pt] L(z) & \approx \begin 0.4115\left(\dfrac p \right) - z, & p<1/2, \\ \\ 0.4115\left( \dfrac p \right), & p\ge 1/2. \end \\[5pt] \text \\ L(z) & \approx \begin 0.4115\left\, & p < 1/2, \\ \\ 0.4115 \dfrac p, & p\ge 1/2. \end \end This approximation is particularly accurate for the right far-tail (maximum error of 10−3 for z≥1.4). Highly accurate approximations for the CDF, based on Response modeling methodology, Response Modeling Methodology (RMM, Shore, 2011, 2012), are shown in Shore (2005). Some more approximations can be found at: Error function#Approximation with elementary functions. In particular, small ''relative'' error on the whole domain for the CDF \Phi and the quantile function \Phi^ as well, is achieved via an explicitly invertible formula by Sergei Winitzki in 2008.


History


Development

Some authors attribute the credit for the discovery of the normal distribution to Abraham de Moivre, de Moivre, who in 1738 published in the second edition of his "''The Doctrine of Chances''" the study of the coefficients in the binomial expansion of . De Moivre proved that the middle term in this expansion has the approximate magnitude of 2^n/\sqrt, and that "If ''m'' or ''n'' be a Quantity infinitely great, then the Logarithm of the Ratio, which a Term distant from the middle by the Interval ''ℓ'', has to the middle Term, is -\frac." Although this theorem can be interpreted as the first obscure expression for the normal probability law, Stephen Stigler, Stigler points out that de Moivre himself did not interpret his results as anything more than the approximate rule for the binomial coefficients, and in particular de Moivre lacked the concept of the probability density function. In 1823 Carl Friedrich Gauss, Gauss published his monograph "''Theoria combinationis observationum erroribus minimis obnoxiae''" where among other things he introduces several important statistical concepts, such as the method of least squares, the method of maximum likelihood, and the ''normal distribution''. Gauss used ''M'', , to denote the measurements of some unknown quantity ''V'', and sought the "most probable" estimator of that quantity: the one that maximizes the probability of obtaining the observed experimental results. In his notation φΔ is the probability density function of the measurement errors of magnitude Δ. Not knowing what the function ''φ'' is, Gauss requires that his method should reduce to the well-known answer: the arithmetic mean of the measured values. Starting from these principles, Gauss demonstrates that the only law that rationalizes the choice of arithmetic mean as an estimator of the location parameter, is the normal law of errors: \varphi\mathit = \frac h \, e^, where ''h'' is "the measure of the precision of the observations". Using this normal law as a generic model for errors in the experiments, Gauss formulates what is now known as the non-linear least squares, non-linear weighted least squares method. Although Gauss was the first to suggest the normal distribution law, Pierre Simon de Laplace, Laplace made significant contributions. It was Laplace who first posed the problem of aggregating several observations in 1774, although his own solution led to the Laplacian distribution. It was Laplace who first calculated the value of the Gaussian integral, integral in 1782, providing the normalization constant for the normal distribution. Finally, it was Laplace who in 1810 proved and presented to the Academy the fundamental
central limit theorem In probability theory, the central limit theorem (CLT) establishes that, in many situations, when independent random variables are summed up, their properly normalized sum tends toward a normal distribution even if the original variables themselv ...
, which emphasized the theoretical importance of the normal distribution. It is of interest to note that in 1809 an Irish-American mathematician Robert Adrain published two insightful but flawed derivations of the normal probability law, simultaneously and independently from Gauss. His works remained largely unnoticed by the scientific community, until in 1871 they were exhumed by Cleveland Abbe, Abbe. In the middle of the 19th century James Clerk Maxwell, Maxwell demonstrated that the normal distribution is not just a convenient mathematical tool, but may also occur in natural phenomena: "The number of particles whose velocity, resolved in a certain direction, lies between ''x'' and ''x'' + ''dx'' is \operatorname \frac\; e^ \, dx


Naming

Today, the concept is usually known in English as the normal distribution or Gaussian distribution. Other less common names include Gauss distribution, Laplace-Gauss distribution, the law of error, the law of facility of errors, Laplace's second law, Gaussian law. Gauss himself apparently coined the term with reference to the "normal equations" involved in its applications, with normal having its technical meaning of orthogonal rather than "usual". However, by the end of the 19th century some authors had started using the name ''normal distribution'', where the word "normal" was used as an adjective – the term now being seen as a reflection of the fact that this distribution was seen as typical, common – and thus "normal". Charles Sanders Peirce, Peirce (one of those authors) once defined "normal" thus: "...the 'normal' is not the average (or any other kind of mean) of what actually occurs, but of what ''would'', in the long run, occur under certain circumstances." Around the turn of the 20th century Karl Pearson, Pearson popularized the term ''normal'' as a designation for this distribution. Also, it was Pearson who first wrote the distribution in terms of the standard deviation ''σ'' as in modern notation. Soon after this, in year 1915, Ronald Fisher, Fisher added the location parameter to the formula for normal distribution, expressing it in the way it is written nowadays: df = \frac e^ \, dx. The term "standard normal", which denotes the normal distribution with zero mean and unit variance came into general use around the 1950s, appearing in the popular textbooks by P. G. Hoel (1947) "''Introduction to mathematical statistics''" and A. M. Mood (1950) "''Introduction to the theory of statistics''".


See also

* Bates distribution – similar to the Irwin–Hall distribution, but rescaled back into the 0 to 1 range * Behrens–Fisher problem – the long-standing problem of testing whether two normal samples with different variances have same means; * Bhattacharyya distance – method used to separate mixtures of normal distributions * Erdős–Kac theorem – on the occurrence of the normal distribution in number theory * Full width at half maximum * Gaussian blur – convolution, which uses the normal distribution as a kernel * Modified half-normal distribution with the pdf on (0, \infty) is given as f(x)= \frac, where \Psi(\alpha,z)=_1\Psi_1\left(\begin\left(\alpha,\frac\right)\\(1,0)\end;z \right) denotes the Fox-Wright Psi function. * Normally distributed and uncorrelated does not imply independent * Ratio normal distribution * Reciprocal normal distribution * Standard normal table * Stein's lemma * Sub-Gaussian distribution * Sum of normally distributed random variables * Tweedie distribution – The normal distribution is a member of the family of Tweedie exponential dispersion models. * Wrapped normal distribution – the Normal distribution applied to a circular domain * Z-test – using the normal distribution


Notes


References


Citations


Sources

* * In particular, the entries fo
"bell-shaped and bell curve"
an

* * * * * * * * * * * * * * * * * * * * * * * * Translated by Stephen M. Stigler in ''Statistical Science'' 1 (3), 1986: . * * * * * * * * * * * * * * * * * * * * * * * * * * * *


External links

*
Normal distribution calculator
{{Authority control Normal distribution, Continuous distributions Conjugate prior distributions Exponential family distributions Stable distributions Location-scale family probability distributions]">f'(X), \infty.


Zero-variance limit

In the limit (mathematics), limit when \sigma tends to zero, the probability density f(x) eventually tends to zero at any x\ne \mu, but grows without limit if x = \mu, while its integral remains equal to 1. Therefore, the normal distribution cannot be defined as an ordinary
function Function or functionality may refer to: Computing * Function key, a type of key on computer keyboards * Function model, a structured representation of processes in a system * Function object or functor or functionoid, a concept of object-oriente ...
when \sigma = 0. However, one can define the normal distribution with zero variance as a
generalized function In mathematics, generalized functions are objects extending the notion of functions. There is more than one recognized theory, for example the theory of distributions. Generalized functions are especially useful in making discontinuous functions ...
; specifically, as Dirac's "delta function" \delta translated by the mean \mu, that is f(x)=\delta(x-\mu). Its CDF is then the
Heaviside step function The Heaviside step function, or the unit step function, usually denoted by or (but sometimes , or ), is a step function, named after Oliver Heaviside (1850–1925), the value of which is zero for negative arguments and one for positive argume ...
translated by the mean \mu, namely :F(x) = \begin 0 & \textx < \mu \\ 1 & \textx \geq \mu \end


Maximum entropy

Of all probability distributions over the reals with a specified mean \mu and variance \sigma^2, the normal distribution N(\mu,\sigma^2) is the one with maximum entropy. If X is a
continuous random variable In probability theory and statistics, a probability distribution is the mathematical function that gives the probabilities of occurrence of different possible outcomes for an experiment. It is a mathematical description of a random phenomenon i ...
with
probability density In probability theory, a probability density function (PDF), or density of a continuous random variable, is a function whose value at any given sample (or point) in the sample space (the set of possible values taken by the random variable) can ...
f(x), then the entropy of X is defined as : H(X) = - \int_^\infty f(x)\log f(x)\, dx where f(x)\log f(x) is understood to be zero whenever f(x)=0. This functional can be maximized, subject to the constraints that the distribution is properly normalized and has a specified variance, by using
variational calculus The calculus of variations (or Variational Calculus) is a field of mathematical analysis that uses variations, which are small changes in functions and functionals, to find maxima and minima of functionals: mappings from a set of functions t ...
. A function with two
Lagrange multipliers In mathematical optimization, the method of Lagrange multipliers is a strategy for finding the local maxima and minima of a function subject to equality constraints (i.e., subject to the condition that one or more equations have to be satisfied ex ...
is defined: : L=\int_^\infty f(x)\ln(f(x))\,dx-\lambda_0\left(1-\int_^\infty f(x)\,dx\right)-\lambda\left(\sigma^2-\int_^\infty f(x)(x-\mu)^2\,dx\right) where f(x) is, for now, regarded as some density function with mean \mu and standard deviation \sigma. At maximum entropy, a small variation \delta f(x) about f(x) will produce a variation \delta L about L which is equal to 0: : 0=\delta L=\int_^\infty \delta f(x)\left (\ln(f(x))+1+\lambda_0+\lambda(x-\mu)^2\right )\,dx Since this must hold for any small \delta f(x), the term in brackets must be zero, and solving for f(x) yields: :f(x)=e^ Using the constraint equations to solve for \lambda_0 and \lambda yields the density of the normal distribution: : f(x, \mu, \sigma)=\frace^ The entropy of a normal distribution is equal to : H(X)=\tfrac(1+\log(2\sigma^2\pi))


Other properties


Related distributions


Central limit theorem

The central limit theorem states that under certain (fairly common) conditions, the sum of many random variables will have an approximately normal distribution. More specifically, where X_1,\ldots ,X_n are
independent and identically distributed In probability theory and statistics, a collection of random variables is independent and identically distributed if each random variable has the same probability distribution as the others and all are mutually independent. This property is usua ...
random variables with the same arbitrary distribution, zero mean, and variance \sigma^2 and Z is their mean scaled by \sqrt : Z = \sqrt\left(\frac\sum_^n X_i\right) Then, as n increases, the probability distribution of Z will tend to the normal distribution with zero mean and variance \sigma^2. The theorem can be extended to variables (X_i) that are not independent and/or not identically distributed if certain constraints are placed on the degree of dependence and the moments of the distributions. Many
test statistic A test statistic is a statistic (a quantity derived from the sample) used in statistical hypothesis testing.Berger, R. L.; Casella, G. (2001). ''Statistical Inference'', Duxbury Press, Second Edition (p.374) A hypothesis test is typically specif ...
s, scores, and
estimator In statistics, an estimator is a rule for calculating an estimate of a given quantity based on observed data: thus the rule (the estimator), the quantity of interest (the estimand) and its result (the estimate) are distinguished. For example, the ...
s encountered in practice contain sums of certain random variables in 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 distributions. The central limit theorem also implies that certain distributions can be approximated by the normal distribution, for example: * The
binomial distribution In probability theory and statistics, the binomial distribution with parameters ''n'' and ''p'' is the discrete probability distribution of the number of successes in a sequence of ''n'' independent experiments, each asking a yes–no quest ...
B(n,p) is approximately normal with mean np and variance np(1-p) for large n and for p not too close to 0 or 1. * The
Poisson distribution In probability theory and statistics, the Poisson distribution is a discrete probability distribution that expresses the probability of a given number of events occurring in a fixed interval of time or space if these events occur with a known co ...
with parameter \lambda is approximately normal with mean \lambda and variance \lambda, for large values of \lambda. * The
chi-squared distribution In probability theory and statistics, the chi-squared distribution (also chi-square or \chi^2-distribution) with k degrees of freedom is the distribution of a sum of the squares of k independent standard normal random variables. The chi-squa ...
\chi^2(k) is approximately normal with mean k and variance 2k, for large k. * The
Student's t-distribution In probability and statistics, Student's ''t''-distribution (or simply the ''t''-distribution) is any member of a family of continuous probability distributions that arise when estimating the mean of a normally distributed population in sit ...
t(\nu) is approximately normal with mean 0 and variance 1 when \nu is large. Whether these approximations are sufficiently accurate depends on the purpose for which they are needed, and the rate of convergence to the normal distribution. It is typically the case that such approximations are less accurate in the tails of the distribution. A general upper bound for the approximation error in the central limit theorem is given by the
Berry–Esseen theorem In probability theory, the central limit theorem states that, under certain circumstances, the probability distribution of the scaled mean of a random sample converges to a normal distribution as the sample size increases to infinity. Under strong ...
, improvements of the approximation are given by the
Edgeworth expansion The Gram–Charlier A series (named in honor of Jørgen Pedersen Gram and Carl Charlier), and the Edgeworth series (named in honor of Francis Ysidro Edgeworth) are series that approximate a probability distribution in terms of its cumulants. The se ...
s. This theorem can also be used to justify modeling the sum of many uniform noise sources as
Gaussian noise Gaussian noise, named after Carl Friedrich Gauss, is a term from signal processing theory denoting a kind of signal noise that has a probability density function (pdf) equal to that of the normal distribution (which is also known as the Gaussia ...
. See
AWGN Additive white Gaussian noise (AWGN) is a basic noise model used in information theory to mimic the effect of many random processes that occur in nature. The modifiers denote specific characteristics: * ''Additive'' because it is added to any nois ...
.


Operations and functions of normal variables

The
probability density In probability theory, a probability density function (PDF), or density of a continuous random variable, is a function whose value at any given sample (or point) in the sample space (the set of possible values taken by the random variable) can ...
,
cumulative distribution In statistics, the frequency (or absolute frequency) of an event i is the number n_i of times the observation has occurred/recorded in an experiment or study. These frequencies are often depicted graphically or in tabular form. Types The cumul ...
, and inverse cumulative distribution of any function of one or more independent or correlated normal variables can be computed with the numerical method of ray-tracing
Matlab code
. In the following sections we look at some special cases.


Operations on a single normal variable

If X is distributed normally with mean \mu and variance \sigma^2, then * aX+b, for any real numbers a and b, is also normally distributed, with mean a\mu+b and standard deviation , a, \sigma. That is, the family of normal distributions is closed under linear transformations. * The exponential of X is distributed log-normally: . * The absolute value of X has
folded normal distribution The folded normal distribution is a probability distribution related to the normal distribution. Given a normally distributed random variable ''X'' with mean ''μ'' and variance ''σ''2, the random variable ''Y'' = , ''X'', has a folded normal d ...
: . If \mu = 0 this is known as the
half-normal distribution In probability theory and statistics, the half-normal distribution is a special case of the folded normal distribution. Let X follow an ordinary normal distribution, N(0,\sigma^2). Then, Y=, X, follows a half-normal distribution. Thus, the hal ...
. * The absolute value of normalized residuals, , ''X'' − ''μ'', /''σ'', has
chi distribution In probability theory and statistics, the chi distribution is a continuous probability distribution. It is the distribution of the positive square root of the sum of squares of a set of independent random variables each following a standard norm ...
with one degree of freedom: , X - \mu, / \sigma \sim \chi_1. * The square of ''X''/''σ'' has the
noncentral chi-squared distribution In probability theory and statistics, the noncentral chi-squared distribution (or noncentral chi-square distribution, noncentral \chi^2 distribution) is a noncentral generalization of the chi-squared distribution. It often arises in the power a ...
with one degree of freedom: X^2 / \sigma^2 \sim \chi_1^2(\mu^2 / \sigma^2). If \mu = 0, the distribution is called simply chi-squared. * The log likelihood of a normal variable x is simply the log of its
probability density function In probability theory, a probability density function (PDF), or density of a continuous random variable, is a function whose value at any given sample (or point) in the sample space (the set of possible values taken by the random variable) can ...
: \ln p(x)= -\frac \left(\frac \right)^2 -\ln \left(\sigma \sqrt \right) = -\frac z^2 -\ln \left(\sigma \sqrt \right). Since this is a scaled and shifted square of a standard normal variable, it is distributed as a scaled and shifted chi-squared variable. * The distribution of the variable ''X'' restricted to an interval 'a'', ''b''is called the
truncated normal distribution In probability and statistics, the truncated normal distribution is the probability distribution derived from that of a normally distributed random variable by bounding the random variable from either below or above (or both). The truncated no ...
. * (''X'' − ''μ'')−2 has a
Lévy distribution In probability theory and statistics, the Lévy distribution, named after Paul Lévy, is a continuous probability distribution for a non-negative random variable. In spectroscopy, this distribution, with frequency as the dependent variable, is kn ...
with location 0 and scale ''σ''−2.


= Operations on two independent normal variables

= * If X_1 and X_2 are two
independent Independent or Independents may refer to: Arts, entertainment, and media Artist groups * Independents (artist group), a group of modernist painters based in the New Hope, Pennsylvania, area of the United States during the early 1930s * Independ ...
normal random variables, with means \mu_1, \mu_2 and standard deviations \sigma_1, \sigma_2, then their sum X_1 + X_2 will also be normally distributed, roof/sup> with mean \mu_1 + \mu_2 and variance \sigma_1^2 + \sigma_2^2. * In particular, if X and Y are independent normal deviates with zero mean and variance \sigma^2, then X + Y and X - Y are also independent and normally distributed, with zero mean and variance 2\sigma^2. This is a special case of the
polarization identity In linear algebra, a branch of mathematics, the polarization identity is any one of a family of formulas that express the inner product of two vectors in terms of the norm of a normed vector space. If a norm arises from an inner product then t ...
. * If X_1, X_2 are two independent normal deviates with mean \mu and deviation \sigma, and a, b are arbitrary real numbers, then the variable X_3 = \frac + \mu is also normally distributed with mean \mu and deviation \sigma. It follows that the normal distribution is
stable A stable is a building in which livestock, especially horses, are kept. It most commonly means a building that is divided into separate stalls for individual animals and livestock. There are many different types of stables in use today; the ...
(with exponent \alpha=2).


= Operations on two independent standard normal variables

= If X_1 and X_2 are two independent standard normal random variables with mean 0 and variance 1, then * Their sum and difference is distributed normally with mean zero and variance two: X_1 \pm X_2 \sim N(0, 2). * Their product Z = X_1 X_2 follows the
product distribution A product distribution is a probability distribution constructed as the distribution of the product of random variables having two other known distributions. Given two statistically independent random variables ''X'' and ''Y'', the distribution of ...
with density function f_Z(z) = \pi^ K_0(, z, ) where K_0 is the
modified Bessel function of the second kind Bessel functions, first defined by the mathematician Daniel Bernoulli and then generalized by Friedrich Bessel, are canonical solutions of Bessel's differential equation x^2 \frac + x \frac + \left(x^2 - \alpha^2 \right)y = 0 for an arbitrary ...
. This distribution is symmetric around zero, unbounded at z = 0, and has the
characteristic function In mathematics, the term "characteristic function" can refer to any of several distinct concepts: * The indicator function of a subset, that is the function ::\mathbf_A\colon X \to \, :which for a given subset ''A'' of ''X'', has value 1 at points ...
\phi_Z(t) = (1 + t^2)^. * Their ratio follows the standard
Cauchy distribution The Cauchy distribution, named after Augustin Cauchy, is a continuous probability distribution. It is also known, especially among physicists, as the Lorentz distribution (after Hendrik Lorentz), Cauchy–Lorentz distribution, Lorentz(ian) fun ...
: X_1/ X_2 \sim \operatorname(0, 1). * Their Euclidean norm \sqrt has the
Rayleigh distribution In probability theory and statistics, the Rayleigh distribution is a continuous probability distribution for nonnegative-valued random variables. Up to rescaling, it coincides with the chi distribution with two degrees of freedom. The distribut ...
.


Operations on multiple independent normal variables

* Any linear combination of independent normal deviates is a normal deviate. * If X_1, X_2, \ldots, X_n are independent standard normal random variables, then the sum of their squares has the
chi-squared distribution In probability theory and statistics, the chi-squared distribution (also chi-square or \chi^2-distribution) with k degrees of freedom is the distribution of a sum of the squares of k independent standard normal random variables. The chi-squa ...
with n degrees of freedom X_1^2 + \cdots + X_n^2 \sim \chi_n^2. * If X_1, X_2, \ldots, X_n are independent normally distributed random variables with means \mu and variances \sigma^2, then their
sample mean The sample mean (or "empirical mean") and the sample covariance are statistics computed from a Sample (statistics), sample of data on one or more random variables. The sample mean is the average value (or mean, mean value) of a sample (statistic ...
is independent from the sample
standard deviation In statistics, the standard deviation is a measure of the amount of variation or dispersion of a set of values. A low standard deviation indicates that the values tend to be close to the mean (also called the expected value) of the set, while ...
, which can be demonstrated using Basu's theorem or
Cochran's theorem In statistics, Cochran's theorem, devised by William G. Cochran, is a theorem used to justify results relating to the probability distributions of statistics that are used in the analysis of variance. Statement Let ''U''1, ..., ''U'N'' be i.i. ...
. The ratio of these two quantities will have the
Student's t-distribution In probability and statistics, Student's ''t''-distribution (or simply the ''t''-distribution) is any member of a family of continuous probability distributions that arise when estimating the mean of a normally distributed population in sit ...
with n-1 degrees of freedom: t = \frac = \frac \sim t_. * If X_1, X_2, \ldots, X_n, Y_1, Y_2, \ldots, Y_m are independent standard normal random variables, then the ratio of their normalized sums of squares will have the with degrees of freedom: F = \frac \sim F_.


Operations on multiple correlated normal variables

* A
quadratic form In mathematics, a quadratic form is a polynomial with terms all of degree two ("form" is another name for a homogeneous polynomial). For example, :4x^2 + 2xy - 3y^2 is a quadratic form in the variables and . The coefficients usually belong to a ...
of a normal vector, i.e. a quadratic function q = \sum x_i^2 + \sum x_j + c of multiple independent or correlated normal variables, is a generalized chi-square variable.


Operations on the density function

The split normal distribution is most directly defined in terms of joining scaled sections of the density functions of different normal distributions and rescaling the density to integrate to one. The
truncated normal distribution In probability and statistics, the truncated normal distribution is the probability distribution derived from that of a normally distributed random variable by bounding the random variable from either below or above (or both). The truncated no ...
results from rescaling a section of a single density function.


Infinite divisibility and Cramér's theorem

For any positive integer \text, any normal distribution with mean \mu and variance \sigma^2 is the distribution of the sum of \text independent normal deviates, each with mean \frac and variance \frac. This property is called
infinite divisibility Infinite divisibility arises in different ways in philosophy, physics, economics, order theory (a branch of mathematics), and probability theory (also a branch of mathematics). One may speak of infinite divisibility, or the lack thereof, of matter ...
. Conversely, if X_1 and X_2 are independent random variables and their sum X_1+X_2 has a normal distribution, then both X_1 and X_2 must be normal deviates. This result is known as Cramér's decomposition theorem, and is equivalent to saying that the convolution of two distributions is normal if and only if both are normal. Cramér's theorem implies that a linear combination of independent non-Gaussian variables will never have an exactly normal distribution, although it may approach it arbitrarily closely.


Bernstein's theorem

Bernstein's theorem states that if X and Y are independent and X + Y and X - Y are also independent, then both ''X'' and ''Y'' must necessarily have normal distributions. More generally, if X_1, \ldots, X_n are independent random variables, then two distinct linear combinations \sum and \sumwill be independent if and only if all X_k are normal and \sum, where \sigma_k^2 denotes the variance of X_k.


Extensions

The notion of normal distribution, being one of the most important distributions in probability theory, has been extended far beyond the standard framework of the univariate (that is one-dimensional) case (Case 1). All these extensions are also called ''normal'' or ''Gaussian'' laws, so a certain ambiguity in names exists. * The
multivariate normal distribution In probability theory and statistics, the multivariate normal distribution, multivariate Gaussian distribution, or joint normal distribution is a generalization of the one-dimensional (univariate) normal distribution to higher dimensions. One d ...
describes the Gaussian law in the ''k''-dimensional Euclidean space. A vector is multivariate-normally distributed if any linear combination of its components has a (univariate) normal distribution. The variance of ''X'' is a ''k×k'' symmetric positive-definite matrix ''V''. The multivariate normal distribution is a special case of the
elliptical distribution In probability and statistics, an elliptical distribution is any member of a broad family of probability distributions that generalize the multivariate normal distribution. Intuitively, in the simplified two and three dimensional case, the joint di ...
s. As such, its iso-density loci in the ''k'' = 2 case are ellipses and in the case of arbitrary ''k'' are ellipsoids. * Rectified Gaussian distribution a rectified version of normal distribution with all the negative elements reset to 0 * Complex normal distribution deals with the complex normal vectors. A complex vector is said to be normal if both its real and imaginary components jointly possess a 2''k''-dimensional multivariate normal distribution. The variance-covariance structure of ''X'' is described by two matrices: the ''variance'' matrix Γ, and the ''relation'' matrix ''C''. * Matrix normal distribution describes the case of normally distributed matrices. * Gaussian processes are the normally distributed stochastic processes. These can be viewed as elements of some infinite-dimensional Hilbert space ''H'', and thus are the analogues of multivariate normal vectors for the case . A random element is said to be normal if for any constant the scalar product has a (univariate) normal distribution. The variance structure of such Gaussian random element can be described in terms of the linear ''covariance ''. Several Gaussian processes became popular enough to have their own names: ** Wiener process, Brownian motion, ** Brownian bridge, ** Ornstein–Uhlenbeck process. * Gaussian q-distribution is an abstract mathematical construction that represents a "q-analogue" of the normal distribution. * the q-Gaussian is an analogue of the Gaussian distribution, in the sense that it maximises the Tsallis entropy, and is one type of Tsallis distribution. Note that this distribution is different from the Gaussian q-distribution above. * The Kaniadakis Gaussian distribution, Kaniadakis ''κ''-Gaussian distribution is a generalization of the Gaussian distribution which arises from the Kaniadakis statistics, being one of the Kaniadakis distribution, Kaniadakis distributions. A random variable ''X'' has a two-piece normal distribution if it has a distribution : f_X( x ) = N( \mu, \sigma_1^2 ) \text x \le \mu : f_X( x ) = N( \mu, \sigma_2^2 ) \text x \ge \mu where ''μ'' is the mean and ''σ''1 and ''σ''2 are the standard deviations of the distribution to the left and right of the mean respectively. The mean, variance and third central moment of this distribution have been determined : \operatorname( X ) = \mu + \sqrt ( \sigma_2 - \sigma_1 ) : \operatorname( X ) = \left( 1 - \frac 2 \pi\right)( \sigma_2 - \sigma_1 )^2 + \sigma_1 \sigma_2 : \operatorname( X ) = \sqrt( \sigma_2 - \sigma_1 ) \left[ \left( \frac 4 \pi - 1 \right) ( \sigma_2 - \sigma_1)^2 + \sigma_1 \sigma_2 \right] where E(''X''), V(''X'') and T(''X'') are the mean, variance, and third central moment respectively. One of the main practical uses of the Gaussian law is to model the empirical distributions of many different random variables encountered in practice. In such case a possible extension would be a richer family of distributions, having more than two parameters and therefore being able to fit the empirical distribution more accurately. The examples of such extensions are: * Pearson distribution — a four-parameter family of probability distributions that extend the normal law to include different skewness and kurtosis values. * The generalized normal distribution, also known as the exponential power distribution, allows for distribution tails with thicker or thinner asymptotic behaviors.


Statistical inference


Estimation of parameters

It is often the case that we do not know the parameters of the normal distribution, but instead want to Estimation theory, estimate them. That is, having a sample (x_1, \ldots, x_n) from a normal N(\mu, \sigma^2) population we would like to learn the approximate values of parameters \mu and \sigma^2. The standard approach to this problem is the maximum likelihood method, which requires maximization of the ''log-likelihood function'': : \ln\mathcal(\mu,\sigma^2) = \sum_^n \ln f(x_i\mid\mu,\sigma^2) = -\frac\ln(2\pi) - \frac\ln\sigma^2 - \frac\sum_^n (x_i-\mu)^2. Taking derivatives with respect to \mu and \sigma^2 and solving the resulting system of first order conditions yields the ''maximum likelihood estimates'': : \hat = \overline \equiv \frac\sum_^n x_i, \qquad \hat^2 = \frac \sum_^n (x_i - \overline)^2.


Sample mean

Estimator \textstyle\hat\mu is called the ''
sample mean The sample mean (or "empirical mean") and the sample covariance are statistics computed from a Sample (statistics), sample of data on one or more random variables. The sample mean is the average value (or mean, mean value) of a sample (statistic ...
'', since it is the arithmetic mean of all observations. The statistic \textstyle\overline is complete statistic, complete and sufficient statistic, sufficient for \mu, and therefore by the Lehmann–Scheffé theorem, \textstyle\hat\mu is the uniformly minimum variance unbiased (UMVU) estimator. In finite samples it is distributed normally: : \hat\mu \sim \mathcal(\mu,\sigma^2/n). The variance of this estimator is equal to the ''μμ''-element of the inverse Fisher information matrix \textstyle\mathcal^. This implies that the estimator is efficient estimator, finite-sample efficient. Of practical importance is the fact that the standard error (statistics), standard error of \textstyle\hat\mu is proportional to \textstyle1/\sqrt, that is, if one wishes to decrease the standard error by a factor of 10, one must increase the number of points in the sample by a factor of 100. This fact is widely used in determining sample sizes for opinion polls and the number of trials in Monte Carlo simulations. From the standpoint of the asymptotic theory (statistics), asymptotic theory, \textstyle\hat\mu is consistent estimator, consistent, that is, it convergence in probability, converges in probability to \mu as n\rightarrow\infty. The estimator is also asymptotic normality, asymptotically normal, which is a simple corollary of the fact that it is normal in finite samples: : \sqrt(\hat\mu-\mu) \,\xrightarrow\, \mathcal(0,\sigma^2).


Sample variance

The estimator \textstyle\hat\sigma^2 is called the ''sample variance'', since it is the variance of the sample ((x_1, \ldots, x_n)). In practice, another estimator is often used instead of the \textstyle\hat\sigma^2. This other estimator is denoted s^2, and is also called the ''sample variance'', which represents a certain ambiguity in terminology; its square root s is called the ''sample standard deviation''. The estimator s^2 differs from \textstyle\hat\sigma^2 by having instead of ''n'' in the denominator (the so-called Bessel's correction): : s^2 = \frac \hat\sigma^2 = \frac \sum_^n (x_i - \overline)^2. The difference between s^2 and \textstyle\hat\sigma^2 becomes negligibly small for large ''n''s. In finite samples however, the motivation behind the use of s^2 is that it is an unbiased estimator of the underlying parameter \sigma^2, whereas \textstyle\hat\sigma^2 is biased. Also, by the Lehmann–Scheffé theorem the estimator s^2 is uniformly minimum variance unbiased (Minimum-variance unbiased estimator, UMVU), which makes it the "best" estimator among all unbiased ones. However it can be shown that the biased estimator \textstyle\hat\sigma^2 is "better" than the s^2 in terms of the mean squared error (MSE) criterion. In finite samples both s^2 and \textstyle\hat\sigma^2 have scaled
chi-squared distribution In probability theory and statistics, the chi-squared distribution (also chi-square or \chi^2-distribution) with k degrees of freedom is the distribution of a sum of the squares of k independent standard normal random variables. The chi-squa ...
with degrees of freedom: : s^2 \sim \frac \cdot \chi^2_, \qquad \hat\sigma^2 \sim \frac \cdot \chi^2_. The first of these expressions shows that the variance of s^2 is equal to 2\sigma^4/(n-1), which is slightly greater than the ''σσ''-element of the inverse Fisher information matrix \textstyle\mathcal^. Thus, s^2 is not an efficient estimator for \sigma^2, and moreover, since s^2 is UMVU, we can conclude that the finite-sample efficient estimator for \sigma^2 does not exist. Applying the asymptotic theory, both estimators s^2 and \textstyle\hat\sigma^2 are consistent, that is they converge in probability to \sigma^2 as the sample size n\rightarrow\infty. The two estimators are also both asymptotically normal: : \sqrt(\hat\sigma^2 - \sigma^2) \simeq \sqrt(s^2-\sigma^2) \,\xrightarrow\, \mathcal(0,2\sigma^4). In particular, both estimators are asymptotically efficient for \sigma^2.


Confidence intervals

By
Cochran's theorem In statistics, Cochran's theorem, devised by William G. Cochran, is a theorem used to justify results relating to the probability distributions of statistics that are used in the analysis of variance. Statement Let ''U''1, ..., ''U'N'' be i.i. ...
, for normal distributions the sample mean \textstyle\hat\mu and the sample variance ''s''2 are
independent Independent or Independents may refer to: Arts, entertainment, and media Artist groups * Independents (artist group), a group of modernist painters based in the New Hope, Pennsylvania, area of the United States during the early 1930s * Independ ...
, which means there can be no gain in considering their joint distribution. There is also a converse theorem: if in a sample the sample mean and sample variance are independent, then the sample must have come from the normal distribution. The independence between \textstyle\hat\mu and ''s'' can be employed to construct the so-called ''t-statistic'': : t = \frac = \frac \sim t_ This quantity ''t'' has the
Student's t-distribution In probability and statistics, Student's ''t''-distribution (or simply the ''t''-distribution) is any member of a family of continuous probability distributions that arise when estimating the mean of a normally distributed population in sit ...
with degrees of freedom, and it is an ancillary statistic (independent of the value of the parameters). Inverting the distribution of this ''t''-statistics will allow us to construct the
confidence interval In frequentist statistics, a confidence interval (CI) is a range of estimates for an unknown parameter. A confidence interval is computed at a designated ''confidence level''; the 95% confidence level is most common, but other levels, such as 9 ...
for ''μ''; similarly, inverting the ''χ''2 distribution of the statistic ''s''2 will give us the confidence interval for ''σ''2: :\mu \in \left[ \hat\mu - t_ \fracs, \hat\mu + t_ \fracs \right], :\sigma^2 \in \left[ \frac, \frac \right], where ''tk,p'' and are the ''p''th
quantile In statistics and probability, quantiles are cut points dividing the range of a probability distribution into continuous intervals with equal probabilities, or dividing the observations in a sample in the same way. There is one fewer quantile tha ...
s of the ''t''- and ''χ''2-distributions respectively. These confidence intervals are of the ''confidence level'' , meaning that the true values ''μ'' and ''σ''2 fall outside of these intervals with probability (or significance level) ''α''. In practice people usually take , resulting in the 95% confidence intervals. Approximate formulas can be derived from the asymptotic distributions of \textstyle\hat\mu and ''s''2: :\mu \in \left[ \hat\mu - , z_, \fracs, \hat\mu + , z_, \fracs \right], :\sigma^2 \in \left[ s^2 - , z_, \fracs^2, s^2 + , z_, \fracs^2 \right], The approximate formulas become valid for large values of ''n'', and are more convenient for the manual calculation since the standard normal quantiles ''z''''α''/2 do not depend on ''n''. In particular, the most popular value of , results in .


Normality tests

Normality tests assess the likelihood that the given data set comes from a normal distribution. Typically the null hypothesis ''H''0 is that the observations are distributed normally with unspecified mean ''μ'' and variance ''σ''2, versus the alternative ''Ha'' that the distribution is arbitrary. Many tests (over 40) have been devised for this problem. The more prominent of them are outlined below: Diagnostic plots are more intuitively appealing but subjective at the same time, as they rely on informal human judgement to accept or reject the null hypothesis. *
Q–Q plot In statistics, a Q–Q plot (quantile-quantile plot) is a probability plot, a List of graphical methods, graphical method for comparing two probability distributions by plotting their ''quantiles'' against each other. A point on the plot co ...
, also known as normal probability plot or rankit plot—is a plot of the sorted values from the data set against the expected values of the corresponding quantiles from the standard normal distribution. That is, it's a plot of point of the form (Φ−1(''pk''), ''x''(''k'')), where plotting points ''pk'' are equal to ''pk'' = (''k'' − ''α'')/(''n'' + 1 − 2''α'') and ''α'' is an adjustment constant, which can be anything between 0 and 1. If the null hypothesis is true, the plotted points should approximately lie on a straight line. * P–P plot – similar to the Q–Q plot, but used much less frequently. This method consists of plotting the points (Φ(''z''(''k'')), ''pk''), where \textstyle z_ = (x_-\hat\mu)/\hat\sigma. For normally distributed data this plot should lie on a 45° line between (0, 0) and (1, 1). Goodness-of-fit tests: ''Moment-based tests'': * D'Agostino's K-squared test * Jarque–Bera test * Shapiro–Wilk test: This is based on the fact that the line in the Q–Q plot has the slope of ''σ''. The test compares the least squares estimate of that slope with the value of the sample variance, and rejects the null hypothesis if these two quantities differ significantly. ''Tests based on the empirical distribution function'': * Anderson–Darling test * Lilliefors test (an adaptation of the Kolmogorov–Smirnov test)


Bayesian analysis of the normal distribution

Bayesian analysis of normally distributed data is complicated by the many different possibilities that may be considered: * Either the mean, or the variance, or neither, may be considered a fixed quantity. * When the variance is unknown, analysis may be done directly in terms of the variance, or in terms of the
precision Precision, precise or precisely may refer to: Science, and technology, and mathematics Mathematics and computing (general) * Accuracy and precision, measurement deviation from true value and its scatter * Significant figures, the number of digit ...
, the reciprocal of the variance. The reason for expressing the formulas in terms of precision is that the analysis of most cases is simplified. * Both univariate and multivariate normal distribution, multivariate cases need to be considered. * Either conjugate prior, conjugate or improper prior, improper prior distributions may be placed on the unknown variables. * An additional set of cases occurs in Bayesian linear regression, where in the basic model the data is assumed to be normally distributed, and normal priors are placed on the regression coefficients. The resulting analysis is similar to the basic cases of independent identically distributed data. The formulas for the non-linear-regression cases are summarized in the conjugate prior article.


Sum of two quadratics


= Scalar form

= The following auxiliary formula is useful for simplifying the posterior distribution, posterior update equations, which otherwise become fairly tedious. :a(x-y)^2 + b(x-z)^2 = (a + b)\left(x - \frac\right)^2 + \frac(y-z)^2 This equation rewrites the sum of two quadratics in ''x'' by expanding the squares, grouping the terms in ''x'', and completing the square. Note the following about the complex constant factors attached to some of the terms: # The factor \frac has the form of a weighted average of ''y'' and ''z''. # \frac = \frac = (a^ + b^)^. This shows that this factor can be thought of as resulting from a situation where the Multiplicative inverse, reciprocals of quantities ''a'' and ''b'' add directly, so to combine ''a'' and ''b'' themselves, it's necessary to reciprocate, add, and reciprocate the result again to get back into the original units. This is exactly the sort of operation performed by the harmonic mean, so it is not surprising that \frac is one-half the harmonic mean of ''a'' and ''b''.


= Vector form

= A similar formula can be written for the sum of two vector quadratics: If x, y, z are vectors of length ''k'', and A and B are symmetric matrix, symmetric, invertible matrices of size k\times k, then : \begin & (\mathbf-\mathbf)'\mathbf(\mathbf-\mathbf) + (\mathbf-\mathbf)' \mathbf(\mathbf-\mathbf) \\ = & (\mathbf - \mathbf)'(\mathbf+\mathbf)(\mathbf - \mathbf) + (\mathbf - \mathbf)'(\mathbf^ + \mathbf^)^(\mathbf - \mathbf) \end where :\mathbf = (\mathbf + \mathbf)^(\mathbf\mathbf + \mathbf \mathbf) Note that the form x′ A x is called a
quadratic form In mathematics, a quadratic form is a polynomial with terms all of degree two ("form" is another name for a homogeneous polynomial). For example, :4x^2 + 2xy - 3y^2 is a quadratic form in the variables and . The coefficients usually belong to a ...
and is a scalar (mathematics), scalar: :\mathbf'\mathbf\mathbf = \sum_a_ x_i x_j In other words, it sums up all possible combinations of products of pairs of elements from x, with a separate coefficient for each. In addition, since x_i x_j = x_j x_i, only the sum a_ + a_ matters for any off-diagonal elements of A, and there is no loss of generality in assuming that A is symmetric matrix, symmetric. Furthermore, if A is symmetric, then the form \mathbf'\mathbf\mathbf = \mathbf'\mathbf\mathbf.


Sum of differences from the mean

Another useful formula is as follows: \sum_^n (x_i-\mu)^2 = \sum_^n (x_i-\bar)^2 + n(\bar -\mu)^2 where \bar = \frac \sum_^n x_i.


With known variance

For a set of i.i.d. normally distributed data points X of size ''n'' where each individual point ''x'' follows x \sim \mathcal(\mu, \sigma^2) with known
variance In probability theory and statistics, variance is the expectation of the squared deviation of a random variable from its population mean or sample mean. Variance is a measure of dispersion, meaning it is a measure of how far a set of numbers ...
σ2, the conjugate prior distribution is also normally distributed. This can be shown more easily by rewriting the variance as the
precision Precision, precise or precisely may refer to: Science, and technology, and mathematics Mathematics and computing (general) * Accuracy and precision, measurement deviation from true value and its scatter * Significant figures, the number of digit ...
, i.e. using τ = 1/σ2. Then if x \sim \mathcal(\mu, 1/\tau) and \mu \sim \mathcal(\mu_0, 1/\tau_0), we proceed as follows. First, the likelihood function is (using the formula above for the sum of differences from the mean): :\begin p(\mathbf\mid\mu,\tau) &= \prod_^n \sqrt \exp\left(-\frac\tau(x_i-\mu)^2\right) \\ &= \left(\frac\right)^ \exp\left(-\frac\tau \sum_^n (x_i-\mu)^2\right) \\ &= \left(\frac\right)^ \exp\left[-\frac\tau \left(\sum_^n(x_i-\bar)^2 + n(\bar -\mu)^2\right)\right]. \end Then, we proceed as follows: :\begin p(\mu\mid\mathbf) &\propto p(\mathbf\mid\mu) p(\mu) \\ & = \left(\frac\right)^ \exp\left[-\frac\tau \left(\sum_^n(x_i-\bar)^2 + n(\bar -\mu)^2\right)\right] \sqrt \exp\left(-\frac\tau_0(\mu-\mu_0)^2\right) \\ &\propto \exp\left(-\frac\left(\tau\left(\sum_^n(x_i-\bar)^2 + n(\bar -\mu)^2\right) + \tau_0(\mu-\mu_0)^2\right)\right) \\ &\propto \exp\left(-\frac \left(n\tau(\bar-\mu)^2 + \tau_0(\mu-\mu_0)^2 \right)\right) \\ &= \exp\left(-\frac(n\tau + \tau_0)\left(\mu - \dfrac\right)^2 + \frac(\bar - \mu_0)^2\right) \\ &\propto \exp\left(-\frac(n\tau + \tau_0)\left(\mu - \dfrac\right)^2\right) \end In the above derivation, we used the formula above for the sum of two quadratics and eliminated all constant factors not involving ''μ''. The result is the kernel (statistics), kernel of a normal distribution, with mean \frac and precision n\tau + \tau_0, i.e. :p(\mu\mid\mathbf) \sim \mathcal\left(\frac, \frac\right) This can be written as a set of Bayesian update equations for the posterior parameters in terms of the prior parameters: :\begin \tau_0' &= \tau_0 + n\tau \\[5pt] \mu_0' &= \frac \\[5pt] \bar &= \frac\sum_^n x_i \end That is, to combine ''n'' data points with total precision of ''nτ'' (or equivalently, total variance of ''n''/''σ''2) and mean of values \bar, derive a new total precision simply by adding the total precision of the data to the prior total precision, and form a new mean through a ''precision-weighted average'', i.e. a weighted average of the data mean and the prior mean, each weighted by the associated total precision. This makes logical sense if the precision is thought of as indicating the certainty of the observations: In the distribution of the posterior mean, each of the input components is weighted by its certainty, and the certainty of this distribution is the sum of the individual certainties. (For the intuition of this, compare the expression "the whole is (or is not) greater than the sum of its parts". In addition, consider that the knowledge of the posterior comes from a combination of the knowledge of the prior and likelihood, so it makes sense that we are more certain of it than of either of its components.) The above formula reveals why it is more convenient to do Bayesian analysis of conjugate priors for the normal distribution in terms of the precision. The posterior precision is simply the sum of the prior and likelihood precisions, and the posterior mean is computed through a precision-weighted average, as described above. The same formulas can be written in terms of variance by reciprocating all the precisions, yielding the more ugly formulas :\begin ' &= \frac \\[5pt] \mu_0' &= \frac \\[5pt] \bar &= \frac\sum_^n x_i \end


With known mean

For a set of i.i.d. normally distributed data points X of size ''n'' where each individual point ''x'' follows x \sim \mathcal(\mu, \sigma^2) with known mean μ, the conjugate prior of the
variance In probability theory and statistics, variance is the expectation of the squared deviation of a random variable from its population mean or sample mean. Variance is a measure of dispersion, meaning it is a measure of how far a set of numbers ...
has an inverse gamma distribution or a scaled inverse chi-squared distribution. The two are equivalent 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. The prior for σ2 is as follows: :p(\sigma^2\mid\nu_0,\sigma_0^2) = \frac~\frac \propto \frac The likelihood function from above, written in terms of the variance, is: :\begin p(\mathbf\mid\mu,\sigma^2) &= \left(\frac\right)^ \exp\left[-\frac \sum_^n (x_i-\mu)^2\right] \\ &= \left(\frac\right)^ \exp\left[-\frac\right] \end where :S = \sum_^n (x_i-\mu)^2. Then: :\begin p(\sigma^2\mid\mathbf) &\propto p(\mathbf\mid\sigma^2) p(\sigma^2) \\ &= \left(\frac\right)^ \exp\left[-\frac\right] \frac~\frac \\ &\propto \left(\frac\right)^ \frac \exp\left[-\frac + \frac\right] \\ &= \frac \exp\left[-\frac\right] \end The above is also a scaled inverse chi-squared distribution where :\begin \nu_0' &= \nu_0 + n \\ \nu_0'' &= \nu_0 \sigma_0^2 + \sum_^n (x_i-\mu)^2 \end or equivalently :\begin \nu_0' &= \nu_0 + n \\ ' &= \frac \end Reparameterizing in terms of an inverse gamma distribution, the result is: :\begin \alpha' &= \alpha + \frac \\ \beta' &= \beta + \frac \end


With unknown mean and unknown variance

For a set of i.i.d. normally distributed data points X of size ''n'' where each individual point ''x'' follows x \sim \mathcal(\mu, \sigma^2) with unknown mean μ and unknown
variance In probability theory and statistics, variance is the expectation of the squared deviation of a random variable from its population mean or sample mean. Variance is a measure of dispersion, meaning it is a measure of how far a set of numbers ...
σ2, a combined (multivariate) conjugate prior is placed over the mean and variance, consisting of a normal-inverse-gamma distribution. Logically, this originates as follows: # From the analysis of the case with unknown mean but known variance, we see that the update equations involve sufficient statistics computed from the data consisting of the mean of the data points and the total variance of the data points, computed in turn from the known variance divided by the number of data points. # From the analysis of the case with unknown variance but known mean, we see that the update equations involve sufficient statistics over the data consisting of the number of data points and sum of squared deviations. # Keep in mind that the posterior update values serve as the prior distribution when further data is handled. Thus, we should logically think of our priors in terms of the sufficient statistics just described, with the same semantics kept in mind as much as possible. # To handle the case where both mean and variance are unknown, we could place independent priors over the mean and variance, with fixed estimates of the average mean, total variance, number of data points used to compute the variance prior, and sum of squared deviations. Note however that in reality, the total variance of the mean depends on the unknown variance, and the sum of squared deviations that goes into the variance prior (appears to) depend on the unknown mean. In practice, the latter dependence is relatively unimportant: Shifting the actual mean shifts the generated points by an equal amount, and on average the squared deviations will remain the same. This is not the case, however, with the total variance of the mean: As the unknown variance increases, the total variance of the mean will increase proportionately, and we would like to capture this dependence. # This suggests that we create a ''conditional prior'' of the mean on the unknown variance, with a hyperparameter specifying the mean of the pseudo-observations associated with the prior, and another parameter specifying the number of pseudo-observations. This number serves as a scaling parameter on the variance, making it possible to control the overall variance of the mean relative to the actual variance parameter. The prior for the variance also has two hyperparameters, one specifying the sum of squared deviations of the pseudo-observations associated with the prior, and another specifying once again the number of pseudo-observations. Note that each of the priors has a hyperparameter specifying the number of pseudo-observations, and in each case this controls the relative variance of that prior. These are given as two separate hyperparameters so that the variance (aka the confidence) of the two priors can be controlled separately. # This leads immediately to the normal-inverse-gamma distribution, which is the product of the two distributions just defined, with conjugate priors used (an inverse gamma distribution over the variance, and a normal distribution over the mean, ''conditional'' on the variance) and with the same four parameters just defined. The priors are normally defined as follows: :\begin p(\mu\mid\sigma^2; \mu_0, n_0) &\sim \mathcal(\mu_0,\sigma^2/n_0) \\ p(\sigma^2; \nu_0,\sigma_0^2) &\sim I\chi^2(\nu_0,\sigma_0^2) = IG(\nu_0/2, \nu_0\sigma_0^2/2) \end The update equations can be derived, and look as follows: :\begin \bar &= \frac 1 n \sum_^n x_i \\ \mu_0' &= \frac \\ n_0' &= n_0 + n \\ \nu_0' &= \nu_0 + n \\ \nu_0'' &= \nu_0 \sigma_0^2 + \sum_^n (x_i-\bar)^2 + \frac(\mu_0 - \bar)^2 \end The respective numbers of pseudo-observations add the number of actual observations to them. The new mean hyperparameter is once again a weighted average, this time weighted by the relative numbers of observations. Finally, the update for \nu_0'' is similar to the case with known mean, but in this case the sum of squared deviations is taken with respect to the observed data mean rather than the true mean, and as a result a new "interaction term" needs to be added to take care of the additional error source stemming from the deviation between prior and data mean.


Occurrence and applications

The occurrence of normal distribution in practical problems can be loosely classified into four categories: # Exactly normal distributions; # Approximately normal laws, for example when such approximation is justified by the
central limit theorem In probability theory, the central limit theorem (CLT) establishes that, in many situations, when independent random variables are summed up, their properly normalized sum tends toward a normal distribution even if the original variables themselv ...
; and # Distributions modeled as normal – the normal distribution being the distribution with Principle of maximum entropy, maximum entropy for a given mean and variance. # Regression problems – the normal distribution being found after systematic effects have been modeled sufficiently well.


Exact normality

Certain quantities in physics are distributed normally, as was first demonstrated by James Clerk Maxwell. Examples of such quantities are: * Probability density function of a ground state in a quantum harmonic oscillator. * The position of a particle that experiences diffusion. If initially the particle is located at a specific point (that is its probability distribution is the Dirac delta function), then after time ''t'' its location is described by a normal distribution with variance ''t'', which satisfies the diffusion equation \frac f(x,t) = \frac \frac f(x,t). If the initial location is given by a certain density function g(x), then the density at time ''t'' is the convolution of ''g'' and the normal PDF.


Approximate normality

''Approximately'' normal distributions occur in many situations, as explained by the
central limit theorem In probability theory, the central limit theorem (CLT) establishes that, in many situations, when independent random variables are summed up, their properly normalized sum tends toward a normal distribution even if the original variables themselv ...
. When the outcome is produced by many small effects acting ''additively and independently'', its distribution will be close to normal. The normal approximation will not be valid if the effects act multiplicatively (instead of additively), or if there is a single external influence that has a considerably larger magnitude than the rest of the effects. * In counting problems, where the central limit theorem includes a discrete-to-continuum approximation and where Infinite divisibility, infinitely divisible and Indecomposable distribution, decomposable distributions are involved, such as ** binomial distribution, Binomial random variables, associated with binary response variables; ** Poisson distribution, Poisson random variables, associated with rare events; * Thermal radiation has a Bose–Einstein statistics, Bose–Einstein distribution on very short time scales, and a normal distribution on longer timescales due to the central limit theorem.


Assumed normality

There are statistical methods to empirically test that assumption; see the above #Normality tests, Normality tests section. * In biology, the ''logarithm'' of various variables tend to have a normal distribution, that is, they tend to have a
log-normal distribution In probability theory, a log-normal (or lognormal) distribution is a continuous probability distribution of a random variable whose logarithm is normally distributed. Thus, if the random variable is log-normally distributed, then has a normal ...
(after separation on male/female subpopulations), with examples including: ** Measures of size of living tissue (length, height, skin area, weight); ** The ''length'' of ''inert'' appendages (hair, claws, nails, teeth) of biological specimens, ''in the direction of growth''; presumably the thickness of tree bark also falls under this category; ** Certain physiological measurements, such as blood pressure of adult humans. * In finance, in particular the Black–Scholes model, changes in the ''logarithm'' of exchange rates, price indices, and stock market indices are assumed normal (these variables behave like compound interest, not like simple interest, and so are multiplicative). Some mathematicians such as Benoit Mandelbrot have argued that Levy skew alpha-stable distribution, log-Levy distributions, which possesses heavy tails would be a more appropriate model, in particular for the analysis for stock market crashes. The use of the assumption of normal distribution occurring in financial models has also been criticized by Nassim Nicholas Taleb in his works. * Propagation of uncertainty, Measurement errors in physical experiments are often modeled by a normal distribution. This use of a normal distribution does not imply that one is assuming the measurement errors are normally distributed, rather using the normal distribution produces the most conservative predictions possible given only knowledge about the mean and variance of the errors. * In Standardized testing (statistics), standardized testing, results can be made to have a normal distribution by either selecting the number and difficulty of questions (as in the Intelligence quotient, IQ test) or transforming the raw test scores into "output" scores by fitting them to the normal distribution. For example, the SAT's traditional range of 200–800 is based on a normal distribution with a mean of 500 and a standard deviation of 100. * Many scores are derived from the normal distribution, including percentile ranks ("percentiles" or "quantiles"), normal curve equivalents, stanines, Standard score, z-scores, and T-scores. Additionally, some behavioral statistical procedures assume that scores are normally distributed; for example, Student's t-test, t-tests and Analysis of variance, ANOVAs. Bell curve grading assigns relative grades based on a normal distribution of scores. * In hydrology the distribution of long duration river discharge or rainfall, e.g. monthly and yearly totals, is often thought to be practically normal according to the
central limit theorem In probability theory, the central limit theorem (CLT) establishes that, in many situations, when independent random variables are summed up, their properly normalized sum tends toward a normal distribution even if the original variables themselv ...
. The blue picture, made with CumFreq, illustrates an example of fitting the normal distribution to ranked October rainfalls showing the 90% confidence belt based on the
binomial distribution In probability theory and statistics, the binomial distribution with parameters ''n'' and ''p'' is the discrete probability distribution of the number of successes in a sequence of ''n'' independent experiments, each asking a yes–no quest ...
. The rainfall data are represented by plotting positions as part of the cumulative frequency analysis.


Methodological problems and peer review

John Ioannidis argues that using normally distributed standard deviations as standards for validating research findings leave falsifiability, falsifiable predictions about phenomena that are not normally distributed untested. This includes, for example, phenomena that only appear when all necessary conditions are present and one cannot be a substitute for another in an addition-like way and phenomena that are not randomly distributed. Ioannidis argues that standard deviation-centered validation gives a false appearance of validity to hypotheses and theories where some but not all falsifiable predictions are normally distributed since the portion of falsifiable predictions that there is evidence against may and in some cases are in the non-normally distributed parts of the range of falsifiable predictions, as well as baselessly dismissing hypotheses for which none of the falsifiable predictions are normally distributed as if were they unfalsifiable when in fact they do make falsifiable predictions. It is argued by Ioannidis that many cases of mutually exclusive theories being accepted as "validated" by research journals are caused by failure of the journals to take in empirical falsifications of non-normally distributed predictions, and not because mutually exclusive theories are true, which they cannot be, although two mutually exclusive theories can both be wrong and a third one correct.


Computational methods


Generating values from normal distribution

In computer simulations, especially in applications of the Monte-Carlo method, it is often desirable to generate values that are normally distributed. The algorithms listed below all generate the standard normal deviates, since a can be generated as , where ''Z'' is standard normal. All these algorithms rely on the availability of a random number generator ''U'' capable of producing Uniform distribution (continuous), uniform random variates. * The most straightforward method is based on the probability integral transform property: if ''U'' is distributed uniformly on (0,1), then Φ−1(''U'') will have the standard normal distribution. The drawback of this method is that it relies on calculation of the
probit function In probability theory and statistics, the probit function is the quantile function associated with the standard normal distribution. It has applications in data analysis and machine learning, in particular exploratory statistical graphics and ...
Φ−1, which cannot be done analytically. Some approximate methods are described in and in the error function, erf article. Wichura gives a fast algorithm for computing this function to 16 decimal places, which is used by R programming language, R to compute random variates of the normal distribution. * Irwin–Hall distribution#Approximating a Normal distribution, An easy-to-program approximate approach that relies on the
central limit theorem In probability theory, the central limit theorem (CLT) establishes that, in many situations, when independent random variables are summed up, their properly normalized sum tends toward a normal distribution even if the original variables themselv ...
is as follows: generate 12 uniform ''U''(0,1) deviates, add them all up, and subtract 6 – the resulting random variable will have approximately standard normal distribution. In truth, the distribution will be Irwin–Hall distribution, Irwin–Hall, which is a 12-section eleventh-order polynomial approximation to the normal distribution. This random deviate will have a limited range of (−6, 6). Note that in a true normal distribution, only 0.00034% of all samples will fall outside ±6σ. * The Box–Muller transform, Box–Muller method uses two independent random numbers ''U'' and ''V'' distributed uniform distribution (continuous), uniformly on (0,1). Then the two random variables ''X'' and ''Y'' X = \sqrt \, \cos(2 \pi V) , \qquad Y = \sqrt \, \sin(2 \pi V) . will both have the standard normal distribution, and will be
independent Independent or Independents may refer to: Arts, entertainment, and media Artist groups * Independents (artist group), a group of modernist painters based in the New Hope, Pennsylvania, area of the United States during the early 1930s * Independ ...
. This formulation arises because for a bivariate normal random vector (''X'', ''Y'') the squared norm will have the
chi-squared distribution In probability theory and statistics, the chi-squared distribution (also chi-square or \chi^2-distribution) with k degrees of freedom is the distribution of a sum of the squares of k independent standard normal random variables. The chi-squa ...
with two degrees of freedom, which is an easily generated exponential distribution, exponential random variable corresponding to the quantity −2ln(''U'') in these equations; and the angle is distributed uniformly around the circle, chosen by the random variable ''V''. * The Marsaglia polar method is a modification of the Box–Muller method which does not require computation of the sine and cosine functions. In this method, ''U'' and ''V'' are drawn from the uniform (−1,1) distribution, and then is computed. If ''S'' is greater or equal to 1, then the method starts over, otherwise the two quantities X = U\sqrt, \qquad Y = V\sqrt are returned. Again, ''X'' and ''Y'' are independent, standard normal random variables. * The Ratio method is a rejection method. The algorithm proceeds as follows: ** Generate two independent uniform deviates ''U'' and ''V''; ** Compute ''X'' = (''V'' − 0.5)/''U''; ** Optional: if ''X''2 ≤ 5 − 4''e''1/4''U'' then accept ''X'' and terminate algorithm; ** Optional: if ''X''2 ≥ 4''e''−1.35/''U'' + 1.4 then reject ''X'' and start over from step 1; ** If ''X''2 ≤ −4 ln''U'' then accept ''X'', otherwise start over the algorithm. *:The two optional steps allow the evaluation of the logarithm in the last step to be avoided in most cases. These steps can be greatly improved so that the logarithm is rarely evaluated. * The ziggurat algorithm is faster than the Box–Muller transform and still exact. In about 97% of all cases it uses only two random numbers, one random integer and one random uniform, one multiplication and an if-test. Only in 3% of the cases, where the combination of those two falls outside the "core of the ziggurat" (a kind of rejection sampling using logarithms), do exponentials and more uniform random numbers have to be employed. * Integer arithmetic can be used to sample from the standard normal distribution. This method is exact in the sense that it satisfies the conditions of ''ideal approximation''; i.e., it is equivalent to sampling a real number from the standard normal distribution and rounding this to the nearest representable floating point number. * There is also some investigation into the connection between the fast Hadamard transform and the normal distribution, since the transform employs just addition and subtraction and by the central limit theorem random numbers from almost any distribution will be transformed into the normal distribution. In this regard a series of Hadamard transforms can be combined with random permutations to turn arbitrary data sets into a normally distributed data.


Numerical approximations for the normal CDF and normal quantile function

The standard normal cumulative distribution function, CDF is widely used in scientific and statistical computing. The values Φ(''x'') may be approximated very accurately by a variety of methods, such as numerical integration, Taylor series, asymptotic series and Gauss's continued fraction#Of Kummer's confluent hypergeometric function, continued fractions. Different approximations are used depending on the desired level of accuracy. * give the approximation for Φ(''x'') for ''x > 0'' with the absolute error (algorith
26.2.17
: \Phi(x) = 1 - \varphi(x)\left(b_1 t + b_2 t^2 + b_3t^3 + b_4 t^4 + b_5 t^5\right) + \varepsilon(x), \qquad t = \frac, where ''ϕ''(''x'') is the standard normal PDF, and ''b''0 = 0.2316419, ''b''1 = 0.319381530, ''b''2 = −0.356563782, ''b''3 = 1.781477937, ''b''4 = −1.821255978, ''b''5 = 1.330274429. * lists some dozens of approximations – by means of rational functions, with or without exponentials – for the function. His algorithms vary in the degree of complexity and the resulting precision, with maximum absolute precision of 24 digits. An algorithm by combines Hart's algorithm 5666 with a continued fraction approximation in the tail to provide a fast computation algorithm with a 16-digit precision. * after recalling Hart68 solution is not suited for erf, gives a solution for both erf and erfc, with maximal relative error bound, via rational function, Rational Chebyshev Approximation. * suggested a simple algorithm based on the Taylor series expansion \Phi(x) = \frac12 + \varphi(x)\left( x + \frac 3 + \frac + \frac + \frac + \cdots \right) for calculating with arbitrary precision. The drawback of this algorithm is comparatively slow calculation time (for example it takes over 300 iterations to calculate the function with 16 digits of precision when ). * The GNU Scientific Library calculates values of the standard normal CDF using Hart's algorithms and approximations with Chebyshev polynomials. Shore (1982) introduced simple approximations that may be incorporated in stochastic optimization models of engineering and operations research, like reliability engineering and inventory analysis. Denoting , the simplest approximation for the quantile function is: z = \Phi^(p)=5.5556\left[1- \left( \frac p \right)^\right],\qquad p\ge 1/2 This approximation delivers for ''z'' a maximum absolute error of 0.026 (for , corresponding to ). For replace ''p'' by and change sign. Another approximation, somewhat less accurate, is the single-parameter approximation: z=-0.4115\left\, \qquad p\ge 1/2 The latter had served to derive a simple approximation for the loss integral of the normal distribution, defined by \begin L(z) & =\int_z^\infty (u-z)\varphi(u) \, du=\int_z^\infty [1-\Phi (u)] \, du \\[5pt] L(z) & \approx \begin 0.4115\left(\dfrac p \right) - z, & p<1/2, \\ \\ 0.4115\left( \dfrac p \right), & p\ge 1/2. \end \\[5pt] \text \\ L(z) & \approx \begin 0.4115\left\, & p < 1/2, \\ \\ 0.4115 \dfrac p, & p\ge 1/2. \end \end This approximation is particularly accurate for the right far-tail (maximum error of 10−3 for z≥1.4). Highly accurate approximations for the CDF, based on Response modeling methodology, Response Modeling Methodology (RMM, Shore, 2011, 2012), are shown in Shore (2005). Some more approximations can be found at: Error function#Approximation with elementary functions. In particular, small ''relative'' error on the whole domain for the CDF \Phi and the quantile function \Phi^ as well, is achieved via an explicitly invertible formula by Sergei Winitzki in 2008.


History


Development

Some authors attribute the credit for the discovery of the normal distribution to Abraham de Moivre, de Moivre, who in 1738 published in the second edition of his "''The Doctrine of Chances''" the study of the coefficients in the binomial expansion of . De Moivre proved that the middle term in this expansion has the approximate magnitude of 2^n/\sqrt, and that "If ''m'' or ''n'' be a Quantity infinitely great, then the Logarithm of the Ratio, which a Term distant from the middle by the Interval ''ℓ'', has to the middle Term, is -\frac." Although this theorem can be interpreted as the first obscure expression for the normal probability law, Stephen Stigler, Stigler points out that de Moivre himself did not interpret his results as anything more than the approximate rule for the binomial coefficients, and in particular de Moivre lacked the concept of the probability density function. In 1823 Carl Friedrich Gauss, Gauss published his monograph "''Theoria combinationis observationum erroribus minimis obnoxiae''" where among other things he introduces several important statistical concepts, such as the method of least squares, the method of maximum likelihood, and the ''normal distribution''. Gauss used ''M'', , to denote the measurements of some unknown quantity ''V'', and sought the "most probable" estimator of that quantity: the one that maximizes the probability of obtaining the observed experimental results. In his notation φΔ is the probability density function of the measurement errors of magnitude Δ. Not knowing what the function ''φ'' is, Gauss requires that his method should reduce to the well-known answer: the arithmetic mean of the measured values. Starting from these principles, Gauss demonstrates that the only law that rationalizes the choice of arithmetic mean as an estimator of the location parameter, is the normal law of errors: \varphi\mathit = \frac h \, e^, where ''h'' is "the measure of the precision of the observations". Using this normal law as a generic model for errors in the experiments, Gauss formulates what is now known as the non-linear least squares, non-linear weighted least squares method. Although Gauss was the first to suggest the normal distribution law, Pierre Simon de Laplace, Laplace made significant contributions. It was Laplace who first posed the problem of aggregating several observations in 1774, although his own solution led to the Laplacian distribution. It was Laplace who first calculated the value of the Gaussian integral, integral in 1782, providing the normalization constant for the normal distribution. Finally, it was Laplace who in 1810 proved and presented to the Academy the fundamental
central limit theorem In probability theory, the central limit theorem (CLT) establishes that, in many situations, when independent random variables are summed up, their properly normalized sum tends toward a normal distribution even if the original variables themselv ...
, which emphasized the theoretical importance of the normal distribution. It is of interest to note that in 1809 an Irish-American mathematician Robert Adrain published two insightful but flawed derivations of the normal probability law, simultaneously and independently from Gauss. His works remained largely unnoticed by the scientific community, until in 1871 they were exhumed by Cleveland Abbe, Abbe. In the middle of the 19th century James Clerk Maxwell, Maxwell demonstrated that the normal distribution is not just a convenient mathematical tool, but may also occur in natural phenomena: "The number of particles whose velocity, resolved in a certain direction, lies between ''x'' and ''x'' + ''dx'' is \operatorname \frac\; e^ \, dx


Naming

Today, the concept is usually known in English as the normal distribution or Gaussian distribution. Other less common names include Gauss distribution, Laplace-Gauss distribution, the law of error, the law of facility of errors, Laplace's second law, Gaussian law. Gauss himself apparently coined the term with reference to the "normal equations" involved in its applications, with normal having its technical meaning of orthogonal rather than "usual". However, by the end of the 19th century some authors had started using the name ''normal distribution'', where the word "normal" was used as an adjective – the term now being seen as a reflection of the fact that this distribution was seen as typical, common – and thus "normal". Charles Sanders Peirce, Peirce (one of those authors) once defined "normal" thus: "...the 'normal' is not the average (or any other kind of mean) of what actually occurs, but of what ''would'', in the long run, occur under certain circumstances." Around the turn of the 20th century Karl Pearson, Pearson popularized the term ''normal'' as a designation for this distribution. Also, it was Pearson who first wrote the distribution in terms of the standard deviation ''σ'' as in modern notation. Soon after this, in year 1915, Ronald Fisher, Fisher added the location parameter to the formula for normal distribution, expressing it in the way it is written nowadays: df = \frac e^ \, dx. The term "standard normal", which denotes the normal distribution with zero mean and unit variance came into general use around the 1950s, appearing in the popular textbooks by P. G. Hoel (1947) "''Introduction to mathematical statistics''" and A. M. Mood (1950) "''Introduction to the theory of statistics''".


See also

* Bates distribution – similar to the Irwin–Hall distribution, but rescaled back into the 0 to 1 range * Behrens–Fisher problem – the long-standing problem of testing whether two normal samples with different variances have same means; * Bhattacharyya distance – method used to separate mixtures of normal distributions * Erdős–Kac theorem – on the occurrence of the normal distribution in number theory * Full width at half maximum * Gaussian blur – convolution, which uses the normal distribution as a kernel * Modified half-normal distribution with the pdf on (0, \infty) is given as f(x)= \frac, where \Psi(\alpha,z)=_1\Psi_1\left(\begin\left(\alpha,\frac\right)\\(1,0)\end;z \right) denotes the Fox-Wright Psi function. * Normally distributed and uncorrelated does not imply independent * Ratio normal distribution * Reciprocal normal distribution * Standard normal table * Stein's lemma * Sub-Gaussian distribution * Sum of normally distributed random variables * Tweedie distribution – The normal distribution is a member of the family of Tweedie exponential dispersion models. * Wrapped normal distribution – the Normal distribution applied to a circular domain * Z-test – using the normal distribution


Notes


References


Citations


Sources

* * In particular, the entries fo
"bell-shaped and bell curve"
an

* * * * * * * * * * * * * * * * * * * * * * * * Translated by Stephen M. Stigler in ''Statistical Science'' 1 (3), 1986: . * * * * * * * * * * * * * * * * * * * * * * * * * * * *


External links

*
Normal distribution calculator
{{Authority control Normal distribution, Continuous distributions Conjugate prior distributions Exponential family distributions Stable distributions Location-scale family probability distributions]">X - \mu, ^p\right&= \sigma^p (p-1)!! \cdot \begin \sqrt & \textp\text \\ 1 & \textp\text \end \\ &= \sigma^p \cdot \frac. \end The last formula is valid also for any non-integer p>-1. When the mean \mu \ne 0, the plain and absolute moments can be expressed in terms of
confluent hypergeometric function In mathematics, a confluent hypergeometric function is a solution of a confluent hypergeometric equation, which is a degenerate form of a hypergeometric differential equation where two of the three regular singularities merge into an irregular ...
s _1F_1 and U. :\begin \operatorname\left ^p\right&= \sigma^p\cdot (-i\sqrt 2)^p U\left(-\frac, \frac, -\frac \left( \frac \mu \sigma \right)^2 \right), \\ \operatorname\left[, X, ^p \right] &= \sigma^p \cdot 2^ \frac _1F_1\left( -\frac, \frac, -\frac \left( \frac \mu \sigma \right)^2 \right). \end These expressions remain valid even if p is not an integer. See also Hermite polynomials#"Negative variance", generalized Hermite polynomials. The expectation of X conditioned on the event that X lies in an interval ,b/math> is given by :\operatorname\left \mid a= \mu - \sigma^2\frac where f and F respectively are the density and the cumulative distribution function of X. For b=\infty this is known as the
inverse Mills ratio In probability theory, the Mills ratio (or Mills's ratio) of a continuous random variable X is the function : m(x) := \frac , where f(x) is the probability density function, and :\bar(x) := \Pr x.html" ;"title=">x">>x= \int_x^ f(u)\, du is the ...
. Note that above, density f of X is used instead of standard normal density as in inverse Mills ratio, so here we have \sigma^2 instead of \sigma.


Fourier transform and characteristic function

The
Fourier transform A Fourier transform (FT) is a mathematical transform that decomposes functions into frequency components, which are represented by the output of the transform as a function of frequency. Most commonly functions of time or space are transformed, ...
of a normal density f with mean \mu and standard deviation \sigma is : \hat f(t) = \int_^\infty f(x)e^ \, dx = e^ e^ where i is the
imaginary unit The imaginary unit or unit imaginary number () is a solution to the quadratic equation x^2+1=0. Although there is no real number with this property, can be used to extend the real numbers to what are called complex numbers, using addition an ...
. If the mean \mu=0, the first factor is 1, and the Fourier transform is, apart from a constant factor, a normal density on the
frequency domain In physics, electronics, control systems engineering, and statistics, the frequency domain refers to the analysis of mathematical functions or signals with respect to frequency, rather than time. Put simply, a time-domain graph shows how a signa ...
, with mean 0 and standard deviation 1/\sigma. In particular, the standard normal distribution \varphi is an
eigenfunction In mathematics, an eigenfunction of a linear operator ''D'' defined on some function space is any non-zero function f in that space that, when acted upon by ''D'', is only multiplied by some scaling factor called an eigenvalue. As an equation, th ...
of the Fourier transform. In probability theory, the Fourier transform of the probability distribution of a real-valued random variable X is closely connected to the
characteristic function In mathematics, the term "characteristic function" can refer to any of several distinct concepts: * The indicator function of a subset, that is the function ::\mathbf_A\colon X \to \, :which for a given subset ''A'' of ''X'', has value 1 at points ...
\varphi_X(t) of that variable, which is defined as the
expected value In probability theory, the expected value (also called expectation, expectancy, mathematical expectation, mean, average, or first moment) is a generalization of the weighted average. Informally, the expected value is the arithmetic mean of a l ...
of e^, as a function of the real variable t (the
frequency Frequency is the number of occurrences of a repeating event per unit of time. It is also occasionally referred to as ''temporal frequency'' for clarity, and is distinct from ''angular frequency''. Frequency is measured in hertz (Hz) which is eq ...
parameter of the Fourier transform). This definition can be analytically extended to a complex-value variable t. The relation between both is: :\varphi_X(t) = \hat f(-t)


Moment and cumulant generating functions

The
moment generating function In probability theory and statistics, the moment-generating function of a real-valued random variable is an alternative specification of its probability distribution. Thus, it provides the basis of an alternative route to analytical results compare ...
of a real random variable X is the expected value of e^, as a function of the real parameter t. For a normal distribution with density f, mean \mu and deviation \sigma, the moment generating function exists and is equal to :M(t) = \operatorname ^= \hat f(it) = e^ e^ The
cumulant generating function In probability theory and statistics, the cumulants of a probability distribution are a set of quantities that provide an alternative to the '' moments'' of the distribution. Any two probability distributions whose moments are identical will have ...
is the logarithm of the moment generating function, namely :g(t) = \ln M(t) = \mu t + \tfrac 12 \sigma^2 t^2 Since this is a quadratic polynomial in t, only the first two
cumulant In probability theory and statistics, the cumulants of a probability distribution are a set of quantities that provide an alternative to the '' moments'' of the distribution. Any two probability distributions whose moments are identical will ha ...
s are nonzero, namely the mean \mu and the variance \sigma^2.


Stein operator and class

Within
Stein's method Stein's method is a general method in probability theory to obtain bounds on the distance between two probability distributions with respect to a probability metric. It was introduced by Charles Stein, who first published it in 1972, to obtain ...
the Stein operator and class of a random variable X \sim \mathcal(\mu, \sigma^2) are \mathcalf(x) = \sigma^2 f'(x) - (x-\mu)f(x) and \mathcal the class of all absolutely continuous functions f : \R \to \R \mbox\mathbb limit (mathematics), limit when \sigma tends to zero, the probability density f(x) eventually tends to zero at any x\ne \mu, but grows without limit if x = \mu, while its integral remains equal to 1. Therefore, the normal distribution cannot be defined as an ordinary
function Function or functionality may refer to: Computing * Function key, a type of key on computer keyboards * Function model, a structured representation of processes in a system * Function object or functor or functionoid, a concept of object-oriente ...
when \sigma = 0. However, one can define the normal distribution with zero variance as a
generalized function In mathematics, generalized functions are objects extending the notion of functions. There is more than one recognized theory, for example the theory of distributions. Generalized functions are especially useful in making discontinuous functions ...
; specifically, as Dirac's "delta function" \delta translated by the mean \mu, that is f(x)=\delta(x-\mu). Its CDF is then the
Heaviside step function The Heaviside step function, or the unit step function, usually denoted by or (but sometimes , or ), is a step function, named after Oliver Heaviside (1850–1925), the value of which is zero for negative arguments and one for positive argume ...
translated by the mean \mu, namely :F(x) = \begin 0 & \textx < \mu \\ 1 & \textx \geq \mu \end


Maximum entropy

Of all probability distributions over the reals with a specified mean \mu and variance \sigma^2, the normal distribution N(\mu,\sigma^2) is the one with maximum entropy. If X is a
continuous random variable In probability theory and statistics, a probability distribution is the mathematical function that gives the probabilities of occurrence of different possible outcomes for an experiment. It is a mathematical description of a random phenomenon i ...
with
probability density In probability theory, a probability density function (PDF), or density of a continuous random variable, is a function whose value at any given sample (or point) in the sample space (the set of possible values taken by the random variable) can ...
f(x), then the entropy of X is defined as : H(X) = - \int_^\infty f(x)\log f(x)\, dx where f(x)\log f(x) is understood to be zero whenever f(x)=0. This functional can be maximized, subject to the constraints that the distribution is properly normalized and has a specified variance, by using
variational calculus The calculus of variations (or Variational Calculus) is a field of mathematical analysis that uses variations, which are small changes in functions and functionals, to find maxima and minima of functionals: mappings from a set of functions t ...
. A function with two
Lagrange multipliers In mathematical optimization, the method of Lagrange multipliers is a strategy for finding the local maxima and minima of a function subject to equality constraints (i.e., subject to the condition that one or more equations have to be satisfied ex ...
is defined: : L=\int_^\infty f(x)\ln(f(x))\,dx-\lambda_0\left(1-\int_^\infty f(x)\,dx\right)-\lambda\left(\sigma^2-\int_^\infty f(x)(x-\mu)^2\,dx\right) where f(x) is, for now, regarded as some density function with mean \mu and standard deviation \sigma. At maximum entropy, a small variation \delta f(x) about f(x) will produce a variation \delta L about L which is equal to 0: : 0=\delta L=\int_^\infty \delta f(x)\left (\ln(f(x))+1+\lambda_0+\lambda(x-\mu)^2\right )\,dx Since this must hold for any small \delta f(x), the term in brackets must be zero, and solving for f(x) yields: :f(x)=e^ Using the constraint equations to solve for \lambda_0 and \lambda yields the density of the normal distribution: : f(x, \mu, \sigma)=\frace^ The entropy of a normal distribution is equal to : H(X)=\tfrac(1+\log(2\sigma^2\pi))


Other properties


Related distributions


Central limit theorem

The central limit theorem states that under certain (fairly common) conditions, the sum of many random variables will have an approximately normal distribution. More specifically, where X_1,\ldots ,X_n are
independent and identically distributed In probability theory and statistics, a collection of random variables is independent and identically distributed if each random variable has the same probability distribution as the others and all are mutually independent. This property is usua ...
random variables with the same arbitrary distribution, zero mean, and variance \sigma^2 and Z is their mean scaled by \sqrt : Z = \sqrt\left(\frac\sum_^n X_i\right) Then, as n increases, the probability distribution of Z will tend to the normal distribution with zero mean and variance \sigma^2. The theorem can be extended to variables (X_i) that are not independent and/or not identically distributed if certain constraints are placed on the degree of dependence and the moments of the distributions. Many
test statistic A test statistic is a statistic (a quantity derived from the sample) used in statistical hypothesis testing.Berger, R. L.; Casella, G. (2001). ''Statistical Inference'', Duxbury Press, Second Edition (p.374) A hypothesis test is typically specif ...
s, scores, and
estimator In statistics, an estimator is a rule for calculating an estimate of a given quantity based on observed data: thus the rule (the estimator), the quantity of interest (the estimand) and its result (the estimate) are distinguished. For example, the ...
s encountered in practice contain sums of certain random variables in 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 distributions. The central limit theorem also implies that certain distributions can be approximated by the normal distribution, for example: * The
binomial distribution In probability theory and statistics, the binomial distribution with parameters ''n'' and ''p'' is the discrete probability distribution of the number of successes in a sequence of ''n'' independent experiments, each asking a yes–no quest ...
B(n,p) is approximately normal with mean np and variance np(1-p) for large n and for p not too close to 0 or 1. * The
Poisson distribution In probability theory and statistics, the Poisson distribution is a discrete probability distribution that expresses the probability of a given number of events occurring in a fixed interval of time or space if these events occur with a known co ...
with parameter \lambda is approximately normal with mean \lambda and variance \lambda, for large values of \lambda. * The
chi-squared distribution In probability theory and statistics, the chi-squared distribution (also chi-square or \chi^2-distribution) with k degrees of freedom is the distribution of a sum of the squares of k independent standard normal random variables. The chi-squa ...
\chi^2(k) is approximately normal with mean k and variance 2k, for large k. * The
Student's t-distribution In probability and statistics, Student's ''t''-distribution (or simply the ''t''-distribution) is any member of a family of continuous probability distributions that arise when estimating the mean of a normally distributed population in sit ...
t(\nu) is approximately normal with mean 0 and variance 1 when \nu is large. Whether these approximations are sufficiently accurate depends on the purpose for which they are needed, and the rate of convergence to the normal distribution. It is typically the case that such approximations are less accurate in the tails of the distribution. A general upper bound for the approximation error in the central limit theorem is given by the
Berry–Esseen theorem In probability theory, the central limit theorem states that, under certain circumstances, the probability distribution of the scaled mean of a random sample converges to a normal distribution as the sample size increases to infinity. Under strong ...
, improvements of the approximation are given by the
Edgeworth expansion The Gram–Charlier A series (named in honor of Jørgen Pedersen Gram and Carl Charlier), and the Edgeworth series (named in honor of Francis Ysidro Edgeworth) are series that approximate a probability distribution in terms of its cumulants. The se ...
s. This theorem can also be used to justify modeling the sum of many uniform noise sources as
Gaussian noise Gaussian noise, named after Carl Friedrich Gauss, is a term from signal processing theory denoting a kind of signal noise that has a probability density function (pdf) equal to that of the normal distribution (which is also known as the Gaussia ...
. See
AWGN Additive white Gaussian noise (AWGN) is a basic noise model used in information theory to mimic the effect of many random processes that occur in nature. The modifiers denote specific characteristics: * ''Additive'' because it is added to any nois ...
.


Operations and functions of normal variables

The
probability density In probability theory, a probability density function (PDF), or density of a continuous random variable, is a function whose value at any given sample (or point) in the sample space (the set of possible values taken by the random variable) can ...
,
cumulative distribution In statistics, the frequency (or absolute frequency) of an event i is the number n_i of times the observation has occurred/recorded in an experiment or study. These frequencies are often depicted graphically or in tabular form. Types The cumul ...
, and inverse cumulative distribution of any function of one or more independent or correlated normal variables can be computed with the numerical method of ray-tracing
Matlab code
. In the following sections we look at some special cases.


Operations on a single normal variable

If X is distributed normally with mean \mu and variance \sigma^2, then * aX+b, for any real numbers a and b, is also normally distributed, with mean a\mu+b and standard deviation , a, \sigma. That is, the family of normal distributions is closed under linear transformations. * The exponential of X is distributed log-normally: . * The absolute value of X has
folded normal distribution The folded normal distribution is a probability distribution related to the normal distribution. Given a normally distributed random variable ''X'' with mean ''μ'' and variance ''σ''2, the random variable ''Y'' = , ''X'', has a folded normal d ...
: . If \mu = 0 this is known as the
half-normal distribution In probability theory and statistics, the half-normal distribution is a special case of the folded normal distribution. Let X follow an ordinary normal distribution, N(0,\sigma^2). Then, Y=, X, follows a half-normal distribution. Thus, the hal ...
. * The absolute value of normalized residuals, , ''X'' − ''μ'', /''σ'', has
chi distribution In probability theory and statistics, the chi distribution is a continuous probability distribution. It is the distribution of the positive square root of the sum of squares of a set of independent random variables each following a standard norm ...
with one degree of freedom: , X - \mu, / \sigma \sim \chi_1. * The square of ''X''/''σ'' has the
noncentral chi-squared distribution In probability theory and statistics, the noncentral chi-squared distribution (or noncentral chi-square distribution, noncentral \chi^2 distribution) is a noncentral generalization of the chi-squared distribution. It often arises in the power a ...
with one degree of freedom: X^2 / \sigma^2 \sim \chi_1^2(\mu^2 / \sigma^2). If \mu = 0, the distribution is called simply chi-squared. * The log likelihood of a normal variable x is simply the log of its
probability density function In probability theory, a probability density function (PDF), or density of a continuous random variable, is a function whose value at any given sample (or point) in the sample space (the set of possible values taken by the random variable) can ...
: \ln p(x)= -\frac \left(\frac \right)^2 -\ln \left(\sigma \sqrt \right) = -\frac z^2 -\ln \left(\sigma \sqrt \right). Since this is a scaled and shifted square of a standard normal variable, it is distributed as a scaled and shifted chi-squared variable. * The distribution of the variable ''X'' restricted to an interval 'a'', ''b''is called the
truncated normal distribution In probability and statistics, the truncated normal distribution is the probability distribution derived from that of a normally distributed random variable by bounding the random variable from either below or above (or both). The truncated no ...
. * (''X'' − ''μ'')−2 has a
Lévy distribution In probability theory and statistics, the Lévy distribution, named after Paul Lévy, is a continuous probability distribution for a non-negative random variable. In spectroscopy, this distribution, with frequency as the dependent variable, is kn ...
with location 0 and scale ''σ''−2.


= Operations on two independent normal variables

= * If X_1 and X_2 are two
independent Independent or Independents may refer to: Arts, entertainment, and media Artist groups * Independents (artist group), a group of modernist painters based in the New Hope, Pennsylvania, area of the United States during the early 1930s * Independ ...
normal random variables, with means \mu_1, \mu_2 and standard deviations \sigma_1, \sigma_2, then their sum X_1 + X_2 will also be normally distributed, roof/sup> with mean \mu_1 + \mu_2 and variance \sigma_1^2 + \sigma_2^2. * In particular, if X and Y are independent normal deviates with zero mean and variance \sigma^2, then X + Y and X - Y are also independent and normally distributed, with zero mean and variance 2\sigma^2. This is a special case of the
polarization identity In linear algebra, a branch of mathematics, the polarization identity is any one of a family of formulas that express the inner product of two vectors in terms of the norm of a normed vector space. If a norm arises from an inner product then t ...
. * If X_1, X_2 are two independent normal deviates with mean \mu and deviation \sigma, and a, b are arbitrary real numbers, then the variable X_3 = \frac + \mu is also normally distributed with mean \mu and deviation \sigma. It follows that the normal distribution is
stable A stable is a building in which livestock, especially horses, are kept. It most commonly means a building that is divided into separate stalls for individual animals and livestock. There are many different types of stables in use today; the ...
(with exponent \alpha=2).


= Operations on two independent standard normal variables

= If X_1 and X_2 are two independent standard normal random variables with mean 0 and variance 1, then * Their sum and difference is distributed normally with mean zero and variance two: X_1 \pm X_2 \sim N(0, 2). * Their product Z = X_1 X_2 follows the
product distribution A product distribution is a probability distribution constructed as the distribution of the product of random variables having two other known distributions. Given two statistically independent random variables ''X'' and ''Y'', the distribution of ...
with density function f_Z(z) = \pi^ K_0(, z, ) where K_0 is the
modified Bessel function of the second kind Bessel functions, first defined by the mathematician Daniel Bernoulli and then generalized by Friedrich Bessel, are canonical solutions of Bessel's differential equation x^2 \frac + x \frac + \left(x^2 - \alpha^2 \right)y = 0 for an arbitrary ...
. This distribution is symmetric around zero, unbounded at z = 0, and has the
characteristic function In mathematics, the term "characteristic function" can refer to any of several distinct concepts: * The indicator function of a subset, that is the function ::\mathbf_A\colon X \to \, :which for a given subset ''A'' of ''X'', has value 1 at points ...
\phi_Z(t) = (1 + t^2)^. * Their ratio follows the standard
Cauchy distribution The Cauchy distribution, named after Augustin Cauchy, is a continuous probability distribution. It is also known, especially among physicists, as the Lorentz distribution (after Hendrik Lorentz), Cauchy–Lorentz distribution, Lorentz(ian) fun ...
: X_1/ X_2 \sim \operatorname(0, 1). * Their Euclidean norm \sqrt has the
Rayleigh distribution In probability theory and statistics, the Rayleigh distribution is a continuous probability distribution for nonnegative-valued random variables. Up to rescaling, it coincides with the chi distribution with two degrees of freedom. The distribut ...
.


Operations on multiple independent normal variables

* Any linear combination of independent normal deviates is a normal deviate. * If X_1, X_2, \ldots, X_n are independent standard normal random variables, then the sum of their squares has the
chi-squared distribution In probability theory and statistics, the chi-squared distribution (also chi-square or \chi^2-distribution) with k degrees of freedom is the distribution of a sum of the squares of k independent standard normal random variables. The chi-squa ...
with n degrees of freedom X_1^2 + \cdots + X_n^2 \sim \chi_n^2. * If X_1, X_2, \ldots, X_n are independent normally distributed random variables with means \mu and variances \sigma^2, then their
sample mean The sample mean (or "empirical mean") and the sample covariance are statistics computed from a Sample (statistics), sample of data on one or more random variables. The sample mean is the average value (or mean, mean value) of a sample (statistic ...
is independent from the sample
standard deviation In statistics, the standard deviation is a measure of the amount of variation or dispersion of a set of values. A low standard deviation indicates that the values tend to be close to the mean (also called the expected value) of the set, while ...
, which can be demonstrated using Basu's theorem or
Cochran's theorem In statistics, Cochran's theorem, devised by William G. Cochran, is a theorem used to justify results relating to the probability distributions of statistics that are used in the analysis of variance. Statement Let ''U''1, ..., ''U'N'' be i.i. ...
. The ratio of these two quantities will have the
Student's t-distribution In probability and statistics, Student's ''t''-distribution (or simply the ''t''-distribution) is any member of a family of continuous probability distributions that arise when estimating the mean of a normally distributed population in sit ...
with n-1 degrees of freedom: t = \frac = \frac \sim t_. * If X_1, X_2, \ldots, X_n, Y_1, Y_2, \ldots, Y_m are independent standard normal random variables, then the ratio of their normalized sums of squares will have the with degrees of freedom: F = \frac \sim F_.


Operations on multiple correlated normal variables

* A
quadratic form In mathematics, a quadratic form is a polynomial with terms all of degree two ("form" is another name for a homogeneous polynomial). For example, :4x^2 + 2xy - 3y^2 is a quadratic form in the variables and . The coefficients usually belong to a ...
of a normal vector, i.e. a quadratic function q = \sum x_i^2 + \sum x_j + c of multiple independent or correlated normal variables, is a generalized chi-square variable.


Operations on the density function

The split normal distribution is most directly defined in terms of joining scaled sections of the density functions of different normal distributions and rescaling the density to integrate to one. The
truncated normal distribution In probability and statistics, the truncated normal distribution is the probability distribution derived from that of a normally distributed random variable by bounding the random variable from either below or above (or both). The truncated no ...
results from rescaling a section of a single density function.


Infinite divisibility and Cramér's theorem

For any positive integer \text, any normal distribution with mean \mu and variance \sigma^2 is the distribution of the sum of \text independent normal deviates, each with mean \frac and variance \frac. This property is called
infinite divisibility Infinite divisibility arises in different ways in philosophy, physics, economics, order theory (a branch of mathematics), and probability theory (also a branch of mathematics). One may speak of infinite divisibility, or the lack thereof, of matter ...
. Conversely, if X_1 and X_2 are independent random variables and their sum X_1+X_2 has a normal distribution, then both X_1 and X_2 must be normal deviates. This result is known as Cramér's decomposition theorem, and is equivalent to saying that the convolution of two distributions is normal if and only if both are normal. Cramér's theorem implies that a linear combination of independent non-Gaussian variables will never have an exactly normal distribution, although it may approach it arbitrarily closely.


Bernstein's theorem

Bernstein's theorem states that if X and Y are independent and X + Y and X - Y are also independent, then both ''X'' and ''Y'' must necessarily have normal distributions. More generally, if X_1, \ldots, X_n are independent random variables, then two distinct linear combinations \sum and \sumwill be independent if and only if all X_k are normal and \sum, where \sigma_k^2 denotes the variance of X_k.


Extensions

The notion of normal distribution, being one of the most important distributions in probability theory, has been extended far beyond the standard framework of the univariate (that is one-dimensional) case (Case 1). All these extensions are also called ''normal'' or ''Gaussian'' laws, so a certain ambiguity in names exists. * The
multivariate normal distribution In probability theory and statistics, the multivariate normal distribution, multivariate Gaussian distribution, or joint normal distribution is a generalization of the one-dimensional (univariate) normal distribution to higher dimensions. One d ...
describes the Gaussian law in the ''k''-dimensional Euclidean space. A vector is multivariate-normally distributed if any linear combination of its components has a (univariate) normal distribution. The variance of ''X'' is a ''k×k'' symmetric positive-definite matrix ''V''. The multivariate normal distribution is a special case of the
elliptical distribution In probability and statistics, an elliptical distribution is any member of a broad family of probability distributions that generalize the multivariate normal distribution. Intuitively, in the simplified two and three dimensional case, the joint di ...
s. As such, its iso-density loci in the ''k'' = 2 case are ellipses and in the case of arbitrary ''k'' are ellipsoids. * Rectified Gaussian distribution a rectified version of normal distribution with all the negative elements reset to 0 * Complex normal distribution deals with the complex normal vectors. A complex vector is said to be normal if both its real and imaginary components jointly possess a 2''k''-dimensional multivariate normal distribution. The variance-covariance structure of ''X'' is described by two matrices: the ''variance'' matrix Γ, and the ''relation'' matrix ''C''. * Matrix normal distribution describes the case of normally distributed matrices. * Gaussian processes are the normally distributed stochastic processes. These can be viewed as elements of some infinite-dimensional Hilbert space ''H'', and thus are the analogues of multivariate normal vectors for the case . A random element is said to be normal if for any constant the scalar product has a (univariate) normal distribution. The variance structure of such Gaussian random element can be described in terms of the linear ''covariance ''. Several Gaussian processes became popular enough to have their own names: ** Wiener process, Brownian motion, ** Brownian bridge, ** Ornstein–Uhlenbeck process. * Gaussian q-distribution is an abstract mathematical construction that represents a "q-analogue" of the normal distribution. * the q-Gaussian is an analogue of the Gaussian distribution, in the sense that it maximises the Tsallis entropy, and is one type of Tsallis distribution. Note that this distribution is different from the Gaussian q-distribution above. * The Kaniadakis Gaussian distribution, Kaniadakis ''κ''-Gaussian distribution is a generalization of the Gaussian distribution which arises from the Kaniadakis statistics, being one of the Kaniadakis distribution, Kaniadakis distributions. A random variable ''X'' has a two-piece normal distribution if it has a distribution : f_X( x ) = N( \mu, \sigma_1^2 ) \text x \le \mu : f_X( x ) = N( \mu, \sigma_2^2 ) \text x \ge \mu where ''μ'' is the mean and ''σ''1 and ''σ''2 are the standard deviations of the distribution to the left and right of the mean respectively. The mean, variance and third central moment of this distribution have been determined : \operatorname( X ) = \mu + \sqrt ( \sigma_2 - \sigma_1 ) : \operatorname( X ) = \left( 1 - \frac 2 \pi\right)( \sigma_2 - \sigma_1 )^2 + \sigma_1 \sigma_2 : \operatorname( X ) = \sqrt( \sigma_2 - \sigma_1 ) \left[ \left( \frac 4 \pi - 1 \right) ( \sigma_2 - \sigma_1)^2 + \sigma_1 \sigma_2 \right] where E(''X''), V(''X'') and T(''X'') are the mean, variance, and third central moment respectively. One of the main practical uses of the Gaussian law is to model the empirical distributions of many different random variables encountered in practice. In such case a possible extension would be a richer family of distributions, having more than two parameters and therefore being able to fit the empirical distribution more accurately. The examples of such extensions are: * Pearson distribution — a four-parameter family of probability distributions that extend the normal law to include different skewness and kurtosis values. * The generalized normal distribution, also known as the exponential power distribution, allows for distribution tails with thicker or thinner asymptotic behaviors.


Statistical inference


Estimation of parameters

It is often the case that we do not know the parameters of the normal distribution, but instead want to Estimation theory, estimate them. That is, having a sample (x_1, \ldots, x_n) from a normal N(\mu, \sigma^2) population we would like to learn the approximate values of parameters \mu and \sigma^2. The standard approach to this problem is the maximum likelihood method, which requires maximization of the ''log-likelihood function'': : \ln\mathcal(\mu,\sigma^2) = \sum_^n \ln f(x_i\mid\mu,\sigma^2) = -\frac\ln(2\pi) - \frac\ln\sigma^2 - \frac\sum_^n (x_i-\mu)^2. Taking derivatives with respect to \mu and \sigma^2 and solving the resulting system of first order conditions yields the ''maximum likelihood estimates'': : \hat = \overline \equiv \frac\sum_^n x_i, \qquad \hat^2 = \frac \sum_^n (x_i - \overline)^2.


Sample mean

Estimator \textstyle\hat\mu is called the ''
sample mean The sample mean (or "empirical mean") and the sample covariance are statistics computed from a Sample (statistics), sample of data on one or more random variables. The sample mean is the average value (or mean, mean value) of a sample (statistic ...
'', since it is the arithmetic mean of all observations. The statistic \textstyle\overline is complete statistic, complete and sufficient statistic, sufficient for \mu, and therefore by the Lehmann–Scheffé theorem, \textstyle\hat\mu is the uniformly minimum variance unbiased (UMVU) estimator. In finite samples it is distributed normally: : \hat\mu \sim \mathcal(\mu,\sigma^2/n). The variance of this estimator is equal to the ''μμ''-element of the inverse Fisher information matrix \textstyle\mathcal^. This implies that the estimator is efficient estimator, finite-sample efficient. Of practical importance is the fact that the standard error (statistics), standard error of \textstyle\hat\mu is proportional to \textstyle1/\sqrt, that is, if one wishes to decrease the standard error by a factor of 10, one must increase the number of points in the sample by a factor of 100. This fact is widely used in determining sample sizes for opinion polls and the number of trials in Monte Carlo simulations. From the standpoint of the asymptotic theory (statistics), asymptotic theory, \textstyle\hat\mu is consistent estimator, consistent, that is, it convergence in probability, converges in probability to \mu as n\rightarrow\infty. The estimator is also asymptotic normality, asymptotically normal, which is a simple corollary of the fact that it is normal in finite samples: : \sqrt(\hat\mu-\mu) \,\xrightarrow\, \mathcal(0,\sigma^2).


Sample variance

The estimator \textstyle\hat\sigma^2 is called the ''sample variance'', since it is the variance of the sample ((x_1, \ldots, x_n)). In practice, another estimator is often used instead of the \textstyle\hat\sigma^2. This other estimator is denoted s^2, and is also called the ''sample variance'', which represents a certain ambiguity in terminology; its square root s is called the ''sample standard deviation''. The estimator s^2 differs from \textstyle\hat\sigma^2 by having instead of ''n'' in the denominator (the so-called Bessel's correction): : s^2 = \frac \hat\sigma^2 = \frac \sum_^n (x_i - \overline)^2. The difference between s^2 and \textstyle\hat\sigma^2 becomes negligibly small for large ''n''s. In finite samples however, the motivation behind the use of s^2 is that it is an unbiased estimator of the underlying parameter \sigma^2, whereas \textstyle\hat\sigma^2 is biased. Also, by the Lehmann–Scheffé theorem the estimator s^2 is uniformly minimum variance unbiased (Minimum-variance unbiased estimator, UMVU), which makes it the "best" estimator among all unbiased ones. However it can be shown that the biased estimator \textstyle\hat\sigma^2 is "better" than the s^2 in terms of the mean squared error (MSE) criterion. In finite samples both s^2 and \textstyle\hat\sigma^2 have scaled
chi-squared distribution In probability theory and statistics, the chi-squared distribution (also chi-square or \chi^2-distribution) with k degrees of freedom is the distribution of a sum of the squares of k independent standard normal random variables. The chi-squa ...
with degrees of freedom: : s^2 \sim \frac \cdot \chi^2_, \qquad \hat\sigma^2 \sim \frac \cdot \chi^2_. The first of these expressions shows that the variance of s^2 is equal to 2\sigma^4/(n-1), which is slightly greater than the ''σσ''-element of the inverse Fisher information matrix \textstyle\mathcal^. Thus, s^2 is not an efficient estimator for \sigma^2, and moreover, since s^2 is UMVU, we can conclude that the finite-sample efficient estimator for \sigma^2 does not exist. Applying the asymptotic theory, both estimators s^2 and \textstyle\hat\sigma^2 are consistent, that is they converge in probability to \sigma^2 as the sample size n\rightarrow\infty. The two estimators are also both asymptotically normal: : \sqrt(\hat\sigma^2 - \sigma^2) \simeq \sqrt(s^2-\sigma^2) \,\xrightarrow\, \mathcal(0,2\sigma^4). In particular, both estimators are asymptotically efficient for \sigma^2.


Confidence intervals

By
Cochran's theorem In statistics, Cochran's theorem, devised by William G. Cochran, is a theorem used to justify results relating to the probability distributions of statistics that are used in the analysis of variance. Statement Let ''U''1, ..., ''U'N'' be i.i. ...
, for normal distributions the sample mean \textstyle\hat\mu and the sample variance ''s''2 are
independent Independent or Independents may refer to: Arts, entertainment, and media Artist groups * Independents (artist group), a group of modernist painters based in the New Hope, Pennsylvania, area of the United States during the early 1930s * Independ ...
, which means there can be no gain in considering their joint distribution. There is also a converse theorem: if in a sample the sample mean and sample variance are independent, then the sample must have come from the normal distribution. The independence between \textstyle\hat\mu and ''s'' can be employed to construct the so-called ''t-statistic'': : t = \frac = \frac \sim t_ This quantity ''t'' has the
Student's t-distribution In probability and statistics, Student's ''t''-distribution (or simply the ''t''-distribution) is any member of a family of continuous probability distributions that arise when estimating the mean of a normally distributed population in sit ...
with degrees of freedom, and it is an ancillary statistic (independent of the value of the parameters). Inverting the distribution of this ''t''-statistics will allow us to construct the
confidence interval In frequentist statistics, a confidence interval (CI) is a range of estimates for an unknown parameter. A confidence interval is computed at a designated ''confidence level''; the 95% confidence level is most common, but other levels, such as 9 ...
for ''μ''; similarly, inverting the ''χ''2 distribution of the statistic ''s''2 will give us the confidence interval for ''σ''2: :\mu \in \left[ \hat\mu - t_ \fracs, \hat\mu + t_ \fracs \right], :\sigma^2 \in \left[ \frac, \frac \right], where ''tk,p'' and are the ''p''th
quantile In statistics and probability, quantiles are cut points dividing the range of a probability distribution into continuous intervals with equal probabilities, or dividing the observations in a sample in the same way. There is one fewer quantile tha ...
s of the ''t''- and ''χ''2-distributions respectively. These confidence intervals are of the ''confidence level'' , meaning that the true values ''μ'' and ''σ''2 fall outside of these intervals with probability (or significance level) ''α''. In practice people usually take , resulting in the 95% confidence intervals. Approximate formulas can be derived from the asymptotic distributions of \textstyle\hat\mu and ''s''2: :\mu \in \left[ \hat\mu - , z_, \fracs, \hat\mu + , z_, \fracs \right], :\sigma^2 \in \left[ s^2 - , z_, \fracs^2, s^2 + , z_, \fracs^2 \right], The approximate formulas become valid for large values of ''n'', and are more convenient for the manual calculation since the standard normal quantiles ''z''''α''/2 do not depend on ''n''. In particular, the most popular value of , results in .


Normality tests

Normality tests assess the likelihood that the given data set comes from a normal distribution. Typically the null hypothesis ''H''0 is that the observations are distributed normally with unspecified mean ''μ'' and variance ''σ''2, versus the alternative ''Ha'' that the distribution is arbitrary. Many tests (over 40) have been devised for this problem. The more prominent of them are outlined below: Diagnostic plots are more intuitively appealing but subjective at the same time, as they rely on informal human judgement to accept or reject the null hypothesis. *
Q–Q plot In statistics, a Q–Q plot (quantile-quantile plot) is a probability plot, a List of graphical methods, graphical method for comparing two probability distributions by plotting their ''quantiles'' against each other. A point on the plot co ...
, also known as normal probability plot or rankit plot—is a plot of the sorted values from the data set against the expected values of the corresponding quantiles from the standard normal distribution. That is, it's a plot of point of the form (Φ−1(''pk''), ''x''(''k'')), where plotting points ''pk'' are equal to ''pk'' = (''k'' − ''α'')/(''n'' + 1 − 2''α'') and ''α'' is an adjustment constant, which can be anything between 0 and 1. If the null hypothesis is true, the plotted points should approximately lie on a straight line. * P–P plot – similar to the Q–Q plot, but used much less frequently. This method consists of plotting the points (Φ(''z''(''k'')), ''pk''), where \textstyle z_ = (x_-\hat\mu)/\hat\sigma. For normally distributed data this plot should lie on a 45° line between (0, 0) and (1, 1). Goodness-of-fit tests: ''Moment-based tests'': * D'Agostino's K-squared test * Jarque–Bera test * Shapiro–Wilk test: This is based on the fact that the line in the Q–Q plot has the slope of ''σ''. The test compares the least squares estimate of that slope with the value of the sample variance, and rejects the null hypothesis if these two quantities differ significantly. ''Tests based on the empirical distribution function'': * Anderson–Darling test * Lilliefors test (an adaptation of the Kolmogorov–Smirnov test)


Bayesian analysis of the normal distribution

Bayesian analysis of normally distributed data is complicated by the many different possibilities that may be considered: * Either the mean, or the variance, or neither, may be considered a fixed quantity. * When the variance is unknown, analysis may be done directly in terms of the variance, or in terms of the
precision Precision, precise or precisely may refer to: Science, and technology, and mathematics Mathematics and computing (general) * Accuracy and precision, measurement deviation from true value and its scatter * Significant figures, the number of digit ...
, the reciprocal of the variance. The reason for expressing the formulas in terms of precision is that the analysis of most cases is simplified. * Both univariate and multivariate normal distribution, multivariate cases need to be considered. * Either conjugate prior, conjugate or improper prior, improper prior distributions may be placed on the unknown variables. * An additional set of cases occurs in Bayesian linear regression, where in the basic model the data is assumed to be normally distributed, and normal priors are placed on the regression coefficients. The resulting analysis is similar to the basic cases of independent identically distributed data. The formulas for the non-linear-regression cases are summarized in the conjugate prior article.


Sum of two quadratics


= Scalar form

= The following auxiliary formula is useful for simplifying the posterior distribution, posterior update equations, which otherwise become fairly tedious. :a(x-y)^2 + b(x-z)^2 = (a + b)\left(x - \frac\right)^2 + \frac(y-z)^2 This equation rewrites the sum of two quadratics in ''x'' by expanding the squares, grouping the terms in ''x'', and completing the square. Note the following about the complex constant factors attached to some of the terms: # The factor \frac has the form of a weighted average of ''y'' and ''z''. # \frac = \frac = (a^ + b^)^. This shows that this factor can be thought of as resulting from a situation where the Multiplicative inverse, reciprocals of quantities ''a'' and ''b'' add directly, so to combine ''a'' and ''b'' themselves, it's necessary to reciprocate, add, and reciprocate the result again to get back into the original units. This is exactly the sort of operation performed by the harmonic mean, so it is not surprising that \frac is one-half the harmonic mean of ''a'' and ''b''.


= Vector form

= A similar formula can be written for the sum of two vector quadratics: If x, y, z are vectors of length ''k'', and A and B are symmetric matrix, symmetric, invertible matrices of size k\times k, then : \begin & (\mathbf-\mathbf)'\mathbf(\mathbf-\mathbf) + (\mathbf-\mathbf)' \mathbf(\mathbf-\mathbf) \\ = & (\mathbf - \mathbf)'(\mathbf+\mathbf)(\mathbf - \mathbf) + (\mathbf - \mathbf)'(\mathbf^ + \mathbf^)^(\mathbf - \mathbf) \end where :\mathbf = (\mathbf + \mathbf)^(\mathbf\mathbf + \mathbf \mathbf) Note that the form x′ A x is called a
quadratic form In mathematics, a quadratic form is a polynomial with terms all of degree two ("form" is another name for a homogeneous polynomial). For example, :4x^2 + 2xy - 3y^2 is a quadratic form in the variables and . The coefficients usually belong to a ...
and is a scalar (mathematics), scalar: :\mathbf'\mathbf\mathbf = \sum_a_ x_i x_j In other words, it sums up all possible combinations of products of pairs of elements from x, with a separate coefficient for each. In addition, since x_i x_j = x_j x_i, only the sum a_ + a_ matters for any off-diagonal elements of A, and there is no loss of generality in assuming that A is symmetric matrix, symmetric. Furthermore, if A is symmetric, then the form \mathbf'\mathbf\mathbf = \mathbf'\mathbf\mathbf.


Sum of differences from the mean

Another useful formula is as follows: \sum_^n (x_i-\mu)^2 = \sum_^n (x_i-\bar)^2 + n(\bar -\mu)^2 where \bar = \frac \sum_^n x_i.


With known variance

For a set of i.i.d. normally distributed data points X of size ''n'' where each individual point ''x'' follows x \sim \mathcal(\mu, \sigma^2) with known
variance In probability theory and statistics, variance is the expectation of the squared deviation of a random variable from its population mean or sample mean. Variance is a measure of dispersion, meaning it is a measure of how far a set of numbers ...
σ2, the conjugate prior distribution is also normally distributed. This can be shown more easily by rewriting the variance as the
precision Precision, precise or precisely may refer to: Science, and technology, and mathematics Mathematics and computing (general) * Accuracy and precision, measurement deviation from true value and its scatter * Significant figures, the number of digit ...
, i.e. using τ = 1/σ2. Then if x \sim \mathcal(\mu, 1/\tau) and \mu \sim \mathcal(\mu_0, 1/\tau_0), we proceed as follows. First, the likelihood function is (using the formula above for the sum of differences from the mean): :\begin p(\mathbf\mid\mu,\tau) &= \prod_^n \sqrt \exp\left(-\frac\tau(x_i-\mu)^2\right) \\ &= \left(\frac\right)^ \exp\left(-\frac\tau \sum_^n (x_i-\mu)^2\right) \\ &= \left(\frac\right)^ \exp\left[-\frac\tau \left(\sum_^n(x_i-\bar)^2 + n(\bar -\mu)^2\right)\right]. \end Then, we proceed as follows: :\begin p(\mu\mid\mathbf) &\propto p(\mathbf\mid\mu) p(\mu) \\ & = \left(\frac\right)^ \exp\left[-\frac\tau \left(\sum_^n(x_i-\bar)^2 + n(\bar -\mu)^2\right)\right] \sqrt \exp\left(-\frac\tau_0(\mu-\mu_0)^2\right) \\ &\propto \exp\left(-\frac\left(\tau\left(\sum_^n(x_i-\bar)^2 + n(\bar -\mu)^2\right) + \tau_0(\mu-\mu_0)^2\right)\right) \\ &\propto \exp\left(-\frac \left(n\tau(\bar-\mu)^2 + \tau_0(\mu-\mu_0)^2 \right)\right) \\ &= \exp\left(-\frac(n\tau + \tau_0)\left(\mu - \dfrac\right)^2 + \frac(\bar - \mu_0)^2\right) \\ &\propto \exp\left(-\frac(n\tau + \tau_0)\left(\mu - \dfrac\right)^2\right) \end In the above derivation, we used the formula above for the sum of two quadratics and eliminated all constant factors not involving ''μ''. The result is the kernel (statistics), kernel of a normal distribution, with mean \frac and precision n\tau + \tau_0, i.e. :p(\mu\mid\mathbf) \sim \mathcal\left(\frac, \frac\right) This can be written as a set of Bayesian update equations for the posterior parameters in terms of the prior parameters: :\begin \tau_0' &= \tau_0 + n\tau \\[5pt] \mu_0' &= \frac \\[5pt] \bar &= \frac\sum_^n x_i \end That is, to combine ''n'' data points with total precision of ''nτ'' (or equivalently, total variance of ''n''/''σ''2) and mean of values \bar, derive a new total precision simply by adding the total precision of the data to the prior total precision, and form a new mean through a ''precision-weighted average'', i.e. a weighted average of the data mean and the prior mean, each weighted by the associated total precision. This makes logical sense if the precision is thought of as indicating the certainty of the observations: In the distribution of the posterior mean, each of the input components is weighted by its certainty, and the certainty of this distribution is the sum of the individual certainties. (For the intuition of this, compare the expression "the whole is (or is not) greater than the sum of its parts". In addition, consider that the knowledge of the posterior comes from a combination of the knowledge of the prior and likelihood, so it makes sense that we are more certain of it than of either of its components.) The above formula reveals why it is more convenient to do Bayesian analysis of conjugate priors for the normal distribution in terms of the precision. The posterior precision is simply the sum of the prior and likelihood precisions, and the posterior mean is computed through a precision-weighted average, as described above. The same formulas can be written in terms of variance by reciprocating all the precisions, yielding the more ugly formulas :\begin ' &= \frac \\[5pt] \mu_0' &= \frac \\[5pt] \bar &= \frac\sum_^n x_i \end


With known mean

For a set of i.i.d. normally distributed data points X of size ''n'' where each individual point ''x'' follows x \sim \mathcal(\mu, \sigma^2) with known mean μ, the conjugate prior of the
variance In probability theory and statistics, variance is the expectation of the squared deviation of a random variable from its population mean or sample mean. Variance is a measure of dispersion, meaning it is a measure of how far a set of numbers ...
has an inverse gamma distribution or a scaled inverse chi-squared distribution. The two are equivalent 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. The prior for σ2 is as follows: :p(\sigma^2\mid\nu_0,\sigma_0^2) = \frac~\frac \propto \frac The likelihood function from above, written in terms of the variance, is: :\begin p(\mathbf\mid\mu,\sigma^2) &= \left(\frac\right)^ \exp\left[-\frac \sum_^n (x_i-\mu)^2\right] \\ &= \left(\frac\right)^ \exp\left[-\frac\right] \end where :S = \sum_^n (x_i-\mu)^2. Then: :\begin p(\sigma^2\mid\mathbf) &\propto p(\mathbf\mid\sigma^2) p(\sigma^2) \\ &= \left(\frac\right)^ \exp\left[-\frac\right] \frac~\frac \\ &\propto \left(\frac\right)^ \frac \exp\left[-\frac + \frac\right] \\ &= \frac \exp\left[-\frac\right] \end The above is also a scaled inverse chi-squared distribution where :\begin \nu_0' &= \nu_0 + n \\ \nu_0'' &= \nu_0 \sigma_0^2 + \sum_^n (x_i-\mu)^2 \end or equivalently :\begin \nu_0' &= \nu_0 + n \\ ' &= \frac \end Reparameterizing in terms of an inverse gamma distribution, the result is: :\begin \alpha' &= \alpha + \frac \\ \beta' &= \beta + \frac \end


With unknown mean and unknown variance

For a set of i.i.d. normally distributed data points X of size ''n'' where each individual point ''x'' follows x \sim \mathcal(\mu, \sigma^2) with unknown mean μ and unknown
variance In probability theory and statistics, variance is the expectation of the squared deviation of a random variable from its population mean or sample mean. Variance is a measure of dispersion, meaning it is a measure of how far a set of numbers ...
σ2, a combined (multivariate) conjugate prior is placed over the mean and variance, consisting of a normal-inverse-gamma distribution. Logically, this originates as follows: # From the analysis of the case with unknown mean but known variance, we see that the update equations involve sufficient statistics computed from the data consisting of the mean of the data points and the total variance of the data points, computed in turn from the known variance divided by the number of data points. # From the analysis of the case with unknown variance but known mean, we see that the update equations involve sufficient statistics over the data consisting of the number of data points and sum of squared deviations. # Keep in mind that the posterior update values serve as the prior distribution when further data is handled. Thus, we should logically think of our priors in terms of the sufficient statistics just described, with the same semantics kept in mind as much as possible. # To handle the case where both mean and variance are unknown, we could place independent priors over the mean and variance, with fixed estimates of the average mean, total variance, number of data points used to compute the variance prior, and sum of squared deviations. Note however that in reality, the total variance of the mean depends on the unknown variance, and the sum of squared deviations that goes into the variance prior (appears to) depend on the unknown mean. In practice, the latter dependence is relatively unimportant: Shifting the actual mean shifts the generated points by an equal amount, and on average the squared deviations will remain the same. This is not the case, however, with the total variance of the mean: As the unknown variance increases, the total variance of the mean will increase proportionately, and we would like to capture this dependence. # This suggests that we create a ''conditional prior'' of the mean on the unknown variance, with a hyperparameter specifying the mean of the pseudo-observations associated with the prior, and another parameter specifying the number of pseudo-observations. This number serves as a scaling parameter on the variance, making it possible to control the overall variance of the mean relative to the actual variance parameter. The prior for the variance also has two hyperparameters, one specifying the sum of squared deviations of the pseudo-observations associated with the prior, and another specifying once again the number of pseudo-observations. Note that each of the priors has a hyperparameter specifying the number of pseudo-observations, and in each case this controls the relative variance of that prior. These are given as two separate hyperparameters so that the variance (aka the confidence) of the two priors can be controlled separately. # This leads immediately to the normal-inverse-gamma distribution, which is the product of the two distributions just defined, with conjugate priors used (an inverse gamma distribution over the variance, and a normal distribution over the mean, ''conditional'' on the variance) and with the same four parameters just defined. The priors are normally defined as follows: :\begin p(\mu\mid\sigma^2; \mu_0, n_0) &\sim \mathcal(\mu_0,\sigma^2/n_0) \\ p(\sigma^2; \nu_0,\sigma_0^2) &\sim I\chi^2(\nu_0,\sigma_0^2) = IG(\nu_0/2, \nu_0\sigma_0^2/2) \end The update equations can be derived, and look as follows: :\begin \bar &= \frac 1 n \sum_^n x_i \\ \mu_0' &= \frac \\ n_0' &= n_0 + n \\ \nu_0' &= \nu_0 + n \\ \nu_0'' &= \nu_0 \sigma_0^2 + \sum_^n (x_i-\bar)^2 + \frac(\mu_0 - \bar)^2 \end The respective numbers of pseudo-observations add the number of actual observations to them. The new mean hyperparameter is once again a weighted average, this time weighted by the relative numbers of observations. Finally, the update for \nu_0'' is similar to the case with known mean, but in this case the sum of squared deviations is taken with respect to the observed data mean rather than the true mean, and as a result a new "interaction term" needs to be added to take care of the additional error source stemming from the deviation between prior and data mean.


Occurrence and applications

The occurrence of normal distribution in practical problems can be loosely classified into four categories: # Exactly normal distributions; # Approximately normal laws, for example when such approximation is justified by the
central limit theorem In probability theory, the central limit theorem (CLT) establishes that, in many situations, when independent random variables are summed up, their properly normalized sum tends toward a normal distribution even if the original variables themselv ...
; and # Distributions modeled as normal – the normal distribution being the distribution with Principle of maximum entropy, maximum entropy for a given mean and variance. # Regression problems – the normal distribution being found after systematic effects have been modeled sufficiently well.


Exact normality

Certain quantities in physics are distributed normally, as was first demonstrated by James Clerk Maxwell. Examples of such quantities are: * Probability density function of a ground state in a quantum harmonic oscillator. * The position of a particle that experiences diffusion. If initially the particle is located at a specific point (that is its probability distribution is the Dirac delta function), then after time ''t'' its location is described by a normal distribution with variance ''t'', which satisfies the diffusion equation \frac f(x,t) = \frac \frac f(x,t). If the initial location is given by a certain density function g(x), then the density at time ''t'' is the convolution of ''g'' and the normal PDF.


Approximate normality

''Approximately'' normal distributions occur in many situations, as explained by the
central limit theorem In probability theory, the central limit theorem (CLT) establishes that, in many situations, when independent random variables are summed up, their properly normalized sum tends toward a normal distribution even if the original variables themselv ...
. When the outcome is produced by many small effects acting ''additively and independently'', its distribution will be close to normal. The normal approximation will not be valid if the effects act multiplicatively (instead of additively), or if there is a single external influence that has a considerably larger magnitude than the rest of the effects. * In counting problems, where the central limit theorem includes a discrete-to-continuum approximation and where Infinite divisibility, infinitely divisible and Indecomposable distribution, decomposable distributions are involved, such as ** binomial distribution, Binomial random variables, associated with binary response variables; ** Poisson distribution, Poisson random variables, associated with rare events; * Thermal radiation has a Bose–Einstein statistics, Bose–Einstein distribution on very short time scales, and a normal distribution on longer timescales due to the central limit theorem.


Assumed normality

There are statistical methods to empirically test that assumption; see the above #Normality tests, Normality tests section. * In biology, the ''logarithm'' of various variables tend to have a normal distribution, that is, they tend to have a
log-normal distribution In probability theory, a log-normal (or lognormal) distribution is a continuous probability distribution of a random variable whose logarithm is normally distributed. Thus, if the random variable is log-normally distributed, then has a normal ...
(after separation on male/female subpopulations), with examples including: ** Measures of size of living tissue (length, height, skin area, weight); ** The ''length'' of ''inert'' appendages (hair, claws, nails, teeth) of biological specimens, ''in the direction of growth''; presumably the thickness of tree bark also falls under this category; ** Certain physiological measurements, such as blood pressure of adult humans. * In finance, in particular the Black–Scholes model, changes in the ''logarithm'' of exchange rates, price indices, and stock market indices are assumed normal (these variables behave like compound interest, not like simple interest, and so are multiplicative). Some mathematicians such as Benoit Mandelbrot have argued that Levy skew alpha-stable distribution, log-Levy distributions, which possesses heavy tails would be a more appropriate model, in particular for the analysis for stock market crashes. The use of the assumption of normal distribution occurring in financial models has also been criticized by Nassim Nicholas Taleb in his works. * Propagation of uncertainty, Measurement errors in physical experiments are often modeled by a normal distribution. This use of a normal distribution does not imply that one is assuming the measurement errors are normally distributed, rather using the normal distribution produces the most conservative predictions possible given only knowledge about the mean and variance of the errors. * In Standardized testing (statistics), standardized testing, results can be made to have a normal distribution by either selecting the number and difficulty of questions (as in the Intelligence quotient, IQ test) or transforming the raw test scores into "output" scores by fitting them to the normal distribution. For example, the SAT's traditional range of 200–800 is based on a normal distribution with a mean of 500 and a standard deviation of 100. * Many scores are derived from the normal distribution, including percentile ranks ("percentiles" or "quantiles"), normal curve equivalents, stanines, Standard score, z-scores, and T-scores. Additionally, some behavioral statistical procedures assume that scores are normally distributed; for example, Student's t-test, t-tests and Analysis of variance, ANOVAs. Bell curve grading assigns relative grades based on a normal distribution of scores. * In hydrology the distribution of long duration river discharge or rainfall, e.g. monthly and yearly totals, is often thought to be practically normal according to the
central limit theorem In probability theory, the central limit theorem (CLT) establishes that, in many situations, when independent random variables are summed up, their properly normalized sum tends toward a normal distribution even if the original variables themselv ...
. The blue picture, made with CumFreq, illustrates an example of fitting the normal distribution to ranked October rainfalls showing the 90% confidence belt based on the
binomial distribution In probability theory and statistics, the binomial distribution with parameters ''n'' and ''p'' is the discrete probability distribution of the number of successes in a sequence of ''n'' independent experiments, each asking a yes–no quest ...
. The rainfall data are represented by plotting positions as part of the cumulative frequency analysis.


Methodological problems and peer review

John Ioannidis argues that using normally distributed standard deviations as standards for validating research findings leave falsifiability, falsifiable predictions about phenomena that are not normally distributed untested. This includes, for example, phenomena that only appear when all necessary conditions are present and one cannot be a substitute for another in an addition-like way and phenomena that are not randomly distributed. Ioannidis argues that standard deviation-centered validation gives a false appearance of validity to hypotheses and theories where some but not all falsifiable predictions are normally distributed since the portion of falsifiable predictions that there is evidence against may and in some cases are in the non-normally distributed parts of the range of falsifiable predictions, as well as baselessly dismissing hypotheses for which none of the falsifiable predictions are normally distributed as if were they unfalsifiable when in fact they do make falsifiable predictions. It is argued by Ioannidis that many cases of mutually exclusive theories being accepted as "validated" by research journals are caused by failure of the journals to take in empirical falsifications of non-normally distributed predictions, and not because mutually exclusive theories are true, which they cannot be, although two mutually exclusive theories can both be wrong and a third one correct.


Computational methods


Generating values from normal distribution

In computer simulations, especially in applications of the Monte-Carlo method, it is often desirable to generate values that are normally distributed. The algorithms listed below all generate the standard normal deviates, since a can be generated as , where ''Z'' is standard normal. All these algorithms rely on the availability of a random number generator ''U'' capable of producing Uniform distribution (continuous), uniform random variates. * The most straightforward method is based on the probability integral transform property: if ''U'' is distributed uniformly on (0,1), then Φ−1(''U'') will have the standard normal distribution. The drawback of this method is that it relies on calculation of the
probit function In probability theory and statistics, the probit function is the quantile function associated with the standard normal distribution. It has applications in data analysis and machine learning, in particular exploratory statistical graphics and ...
Φ−1, which cannot be done analytically. Some approximate methods are described in and in the error function, erf article. Wichura gives a fast algorithm for computing this function to 16 decimal places, which is used by R programming language, R to compute random variates of the normal distribution. * Irwin–Hall distribution#Approximating a Normal distribution, An easy-to-program approximate approach that relies on the
central limit theorem In probability theory, the central limit theorem (CLT) establishes that, in many situations, when independent random variables are summed up, their properly normalized sum tends toward a normal distribution even if the original variables themselv ...
is as follows: generate 12 uniform ''U''(0,1) deviates, add them all up, and subtract 6 – the resulting random variable will have approximately standard normal distribution. In truth, the distribution will be Irwin–Hall distribution, Irwin–Hall, which is a 12-section eleventh-order polynomial approximation to the normal distribution. This random deviate will have a limited range of (−6, 6). Note that in a true normal distribution, only 0.00034% of all samples will fall outside ±6σ. * The Box–Muller transform, Box–Muller method uses two independent random numbers ''U'' and ''V'' distributed uniform distribution (continuous), uniformly on (0,1). Then the two random variables ''X'' and ''Y'' X = \sqrt \, \cos(2 \pi V) , \qquad Y = \sqrt \, \sin(2 \pi V) . will both have the standard normal distribution, and will be
independent Independent or Independents may refer to: Arts, entertainment, and media Artist groups * Independents (artist group), a group of modernist painters based in the New Hope, Pennsylvania, area of the United States during the early 1930s * Independ ...
. This formulation arises because for a bivariate normal random vector (''X'', ''Y'') the squared norm will have the
chi-squared distribution In probability theory and statistics, the chi-squared distribution (also chi-square or \chi^2-distribution) with k degrees of freedom is the distribution of a sum of the squares of k independent standard normal random variables. The chi-squa ...
with two degrees of freedom, which is an easily generated exponential distribution, exponential random variable corresponding to the quantity −2ln(''U'') in these equations; and the angle is distributed uniformly around the circle, chosen by the random variable ''V''. * The Marsaglia polar method is a modification of the Box–Muller method which does not require computation of the sine and cosine functions. In this method, ''U'' and ''V'' are drawn from the uniform (−1,1) distribution, and then is computed. If ''S'' is greater or equal to 1, then the method starts over, otherwise the two quantities X = U\sqrt, \qquad Y = V\sqrt are returned. Again, ''X'' and ''Y'' are independent, standard normal random variables. * The Ratio method is a rejection method. The algorithm proceeds as follows: ** Generate two independent uniform deviates ''U'' and ''V''; ** Compute ''X'' = (''V'' − 0.5)/''U''; ** Optional: if ''X''2 ≤ 5 − 4''e''1/4''U'' then accept ''X'' and terminate algorithm; ** Optional: if ''X''2 ≥ 4''e''−1.35/''U'' + 1.4 then reject ''X'' and start over from step 1; ** If ''X''2 ≤ −4 ln''U'' then accept ''X'', otherwise start over the algorithm. *:The two optional steps allow the evaluation of the logarithm in the last step to be avoided in most cases. These steps can be greatly improved so that the logarithm is rarely evaluated. * The ziggurat algorithm is faster than the Box–Muller transform and still exact. In about 97% of all cases it uses only two random numbers, one random integer and one random uniform, one multiplication and an if-test. Only in 3% of the cases, where the combination of those two falls outside the "core of the ziggurat" (a kind of rejection sampling using logarithms), do exponentials and more uniform random numbers have to be employed. * Integer arithmetic can be used to sample from the standard normal distribution. This method is exact in the sense that it satisfies the conditions of ''ideal approximation''; i.e., it is equivalent to sampling a real number from the standard normal distribution and rounding this to the nearest representable floating point number. * There is also some investigation into the connection between the fast Hadamard transform and the normal distribution, since the transform employs just addition and subtraction and by the central limit theorem random numbers from almost any distribution will be transformed into the normal distribution. In this regard a series of Hadamard transforms can be combined with random permutations to turn arbitrary data sets into a normally distributed data.


Numerical approximations for the normal CDF and normal quantile function

The standard normal cumulative distribution function, CDF is widely used in scientific and statistical computing. The values Φ(''x'') may be approximated very accurately by a variety of methods, such as numerical integration, Taylor series, asymptotic series and Gauss's continued fraction#Of Kummer's confluent hypergeometric function, continued fractions. Different approximations are used depending on the desired level of accuracy. * give the approximation for Φ(''x'') for ''x > 0'' with the absolute error (algorith
26.2.17
: \Phi(x) = 1 - \varphi(x)\left(b_1 t + b_2 t^2 + b_3t^3 + b_4 t^4 + b_5 t^5\right) + \varepsilon(x), \qquad t = \frac, where ''ϕ''(''x'') is the standard normal PDF, and ''b''0 = 0.2316419, ''b''1 = 0.319381530, ''b''2 = −0.356563782, ''b''3 = 1.781477937, ''b''4 = −1.821255978, ''b''5 = 1.330274429. * lists some dozens of approximations – by means of rational functions, with or without exponentials – for the function. His algorithms vary in the degree of complexity and the resulting precision, with maximum absolute precision of 24 digits. An algorithm by combines Hart's algorithm 5666 with a continued fraction approximation in the tail to provide a fast computation algorithm with a 16-digit precision. * after recalling Hart68 solution is not suited for erf, gives a solution for both erf and erfc, with maximal relative error bound, via rational function, Rational Chebyshev Approximation. * suggested a simple algorithm based on the Taylor series expansion \Phi(x) = \frac12 + \varphi(x)\left( x + \frac 3 + \frac + \frac + \frac + \cdots \right) for calculating with arbitrary precision. The drawback of this algorithm is comparatively slow calculation time (for example it takes over 300 iterations to calculate the function with 16 digits of precision when ). * The GNU Scientific Library calculates values of the standard normal CDF using Hart's algorithms and approximations with Chebyshev polynomials. Shore (1982) introduced simple approximations that may be incorporated in stochastic optimization models of engineering and operations research, like reliability engineering and inventory analysis. Denoting , the simplest approximation for the quantile function is: z = \Phi^(p)=5.5556\left[1- \left( \frac p \right)^\right],\qquad p\ge 1/2 This approximation delivers for ''z'' a maximum absolute error of 0.026 (for , corresponding to ). For replace ''p'' by and change sign. Another approximation, somewhat less accurate, is the single-parameter approximation: z=-0.4115\left\, \qquad p\ge 1/2 The latter had served to derive a simple approximation for the loss integral of the normal distribution, defined by \begin L(z) & =\int_z^\infty (u-z)\varphi(u) \, du=\int_z^\infty [1-\Phi (u)] \, du \\[5pt] L(z) & \approx \begin 0.4115\left(\dfrac p \right) - z, & p<1/2, \\ \\ 0.4115\left( \dfrac p \right), & p\ge 1/2. \end \\[5pt] \text \\ L(z) & \approx \begin 0.4115\left\, & p < 1/2, \\ \\ 0.4115 \dfrac p, & p\ge 1/2. \end \end This approximation is particularly accurate for the right far-tail (maximum error of 10−3 for z≥1.4). Highly accurate approximations for the CDF, based on Response modeling methodology, Response Modeling Methodology (RMM, Shore, 2011, 2012), are shown in Shore (2005). Some more approximations can be found at: Error function#Approximation with elementary functions. In particular, small ''relative'' error on the whole domain for the CDF \Phi and the quantile function \Phi^ as well, is achieved via an explicitly invertible formula by Sergei Winitzki in 2008.


History


Development

Some authors attribute the credit for the discovery of the normal distribution to Abraham de Moivre, de Moivre, who in 1738 published in the second edition of his "''The Doctrine of Chances''" the study of the coefficients in the binomial expansion of . De Moivre proved that the middle term in this expansion has the approximate magnitude of 2^n/\sqrt, and that "If ''m'' or ''n'' be a Quantity infinitely great, then the Logarithm of the Ratio, which a Term distant from the middle by the Interval ''ℓ'', has to the middle Term, is -\frac." Although this theorem can be interpreted as the first obscure expression for the normal probability law, Stephen Stigler, Stigler points out that de Moivre himself did not interpret his results as anything more than the approximate rule for the binomial coefficients, and in particular de Moivre lacked the concept of the probability density function. In 1823 Carl Friedrich Gauss, Gauss published his monograph "''Theoria combinationis observationum erroribus minimis obnoxiae''" where among other things he introduces several important statistical concepts, such as the method of least squares, the method of maximum likelihood, and the ''normal distribution''. Gauss used ''M'', , to denote the measurements of some unknown quantity ''V'', and sought the "most probable" estimator of that quantity: the one that maximizes the probability of obtaining the observed experimental results. In his notation φΔ is the probability density function of the measurement errors of magnitude Δ. Not knowing what the function ''φ'' is, Gauss requires that his method should reduce to the well-known answer: the arithmetic mean of the measured values. Starting from these principles, Gauss demonstrates that the only law that rationalizes the choice of arithmetic mean as an estimator of the location parameter, is the normal law of errors: \varphi\mathit = \frac h \, e^, where ''h'' is "the measure of the precision of the observations". Using this normal law as a generic model for errors in the experiments, Gauss formulates what is now known as the non-linear least squares, non-linear weighted least squares method. Although Gauss was the first to suggest the normal distribution law, Pierre Simon de Laplace, Laplace made significant contributions. It was Laplace who first posed the problem of aggregating several observations in 1774, although his own solution led to the Laplacian distribution. It was Laplace who first calculated the value of the Gaussian integral, integral in 1782, providing the normalization constant for the normal distribution. Finally, it was Laplace who in 1810 proved and presented to the Academy the fundamental
central limit theorem In probability theory, the central limit theorem (CLT) establishes that, in many situations, when independent random variables are summed up, their properly normalized sum tends toward a normal distribution even if the original variables themselv ...
, which emphasized the theoretical importance of the normal distribution. It is of interest to note that in 1809 an Irish-American mathematician Robert Adrain published two insightful but flawed derivations of the normal probability law, simultaneously and independently from Gauss. His works remained largely unnoticed by the scientific community, until in 1871 they were exhumed by Cleveland Abbe, Abbe. In the middle of the 19th century James Clerk Maxwell, Maxwell demonstrated that the normal distribution is not just a convenient mathematical tool, but may also occur in natural phenomena: "The number of particles whose velocity, resolved in a certain direction, lies between ''x'' and ''x'' + ''dx'' is \operatorname \frac\; e^ \, dx


Naming

Today, the concept is usually known in English as the normal distribution or Gaussian distribution. Other less common names include Gauss distribution, Laplace-Gauss distribution, the law of error, the law of facility of errors, Laplace's second law, Gaussian law. Gauss himself apparently coined the term with reference to the "normal equations" involved in its applications, with normal having its technical meaning of orthogonal rather than "usual". However, by the end of the 19th century some authors had started using the name ''normal distribution'', where the word "normal" was used as an adjective – the term now being seen as a reflection of the fact that this distribution was seen as typical, common – and thus "normal". Charles Sanders Peirce, Peirce (one of those authors) once defined "normal" thus: "...the 'normal' is not the average (or any other kind of mean) of what actually occurs, but of what ''would'', in the long run, occur under certain circumstances." Around the turn of the 20th century Karl Pearson, Pearson popularized the term ''normal'' as a designation for this distribution. Also, it was Pearson who first wrote the distribution in terms of the standard deviation ''σ'' as in modern notation. Soon after this, in year 1915, Ronald Fisher, Fisher added the location parameter to the formula for normal distribution, expressing it in the way it is written nowadays: df = \frac e^ \, dx. The term "standard normal", which denotes the normal distribution with zero mean and unit variance came into general use around the 1950s, appearing in the popular textbooks by P. G. Hoel (1947) "''Introduction to mathematical statistics''" and A. M. Mood (1950) "''Introduction to the theory of statistics''".


See also

* Bates distribution – similar to the Irwin–Hall distribution, but rescaled back into the 0 to 1 range * Behrens–Fisher problem – the long-standing problem of testing whether two normal samples with different variances have same means; * Bhattacharyya distance – method used to separate mixtures of normal distributions * Erdős–Kac theorem – on the occurrence of the normal distribution in number theory * Full width at half maximum * Gaussian blur – convolution, which uses the normal distribution as a kernel * Modified half-normal distribution with the pdf on (0, \infty) is given as f(x)= \frac, where \Psi(\alpha,z)=_1\Psi_1\left(\begin\left(\alpha,\frac\right)\\(1,0)\end;z \right) denotes the Fox-Wright Psi function. * Normally distributed and uncorrelated does not imply independent * Ratio normal distribution * Reciprocal normal distribution * Standard normal table * Stein's lemma * Sub-Gaussian distribution * Sum of normally distributed random variables * Tweedie distribution – The normal distribution is a member of the family of Tweedie exponential dispersion models. * Wrapped normal distribution – the Normal distribution applied to a circular domain * Z-test – using the normal distribution


Notes


References


Citations


Sources

* * In particular, the entries fo
"bell-shaped and bell curve"
an

* * * * * * * * * * * * * * * * * * * * * * * * Translated by Stephen M. Stigler in ''Statistical Science'' 1 (3), 1986: . * * * * * * * * * * * * * * * * * * * * * * * * * * * *


External links

*
Normal distribution calculator
{{Authority control Normal distribution, Continuous distributions Conjugate prior distributions Exponential family distributions Stable distributions Location-scale family probability distributions]">X - \mu, ^p\right&= \sigma^p (p-1)!! \cdot \begin \sqrt & \textp\text \\ 1 & \textp\text \end \\ &= \sigma^p \cdot \frac. \end The last formula is valid also for any non-integer p>-1. When the mean \mu \ne 0, the plain and absolute moments can be expressed in terms of
confluent hypergeometric function In mathematics, a confluent hypergeometric function is a solution of a confluent hypergeometric equation, which is a degenerate form of a hypergeometric differential equation where two of the three regular singularities merge into an irregular ...
s _1F_1 and U. :\begin \operatorname\left ^p\right&= \sigma^p\cdot (-i\sqrt 2)^p U\left(-\frac, \frac, -\frac \left( \frac \mu \sigma \right)^2 \right), \\ \operatorname\left[, X, ^p \right] &= \sigma^p \cdot 2^ \frac _1F_1\left( -\frac, \frac, -\frac \left( \frac \mu \sigma \right)^2 \right). \end These expressions remain valid even if p is not an integer. See also Hermite polynomials#"Negative variance", generalized Hermite polynomials. The expectation of X conditioned on the event that X lies in an interval ,b/math> is given by :\operatorname\left \mid a= \mu - \sigma^2\frac where f and F respectively are the density and the cumulative distribution function of X. For b=\infty this is known as the
inverse Mills ratio In probability theory, the Mills ratio (or Mills's ratio) of a continuous random variable X is the function : m(x) := \frac , where f(x) is the probability density function, and :\bar(x) := \Pr x.html" ;"title=">x">>x= \int_x^ f(u)\, du is the ...
. Note that above, density f of X is used instead of standard normal density as in inverse Mills ratio, so here we have \sigma^2 instead of \sigma.


Fourier transform and characteristic function

The
Fourier transform A Fourier transform (FT) is a mathematical transform that decomposes functions into frequency components, which are represented by the output of the transform as a function of frequency. Most commonly functions of time or space are transformed, ...
of a normal density f with mean \mu and standard deviation \sigma is : \hat f(t) = \int_^\infty f(x)e^ \, dx = e^ e^ where i is the
imaginary unit The imaginary unit or unit imaginary number () is a solution to the quadratic equation x^2+1=0. Although there is no real number with this property, can be used to extend the real numbers to what are called complex numbers, using addition an ...
. If the mean \mu=0, the first factor is 1, and the Fourier transform is, apart from a constant factor, a normal density on the
frequency domain In physics, electronics, control systems engineering, and statistics, the frequency domain refers to the analysis of mathematical functions or signals with respect to frequency, rather than time. Put simply, a time-domain graph shows how a signa ...
, with mean 0 and standard deviation 1/\sigma. In particular, the standard normal distribution \varphi is an
eigenfunction In mathematics, an eigenfunction of a linear operator ''D'' defined on some function space is any non-zero function f in that space that, when acted upon by ''D'', is only multiplied by some scaling factor called an eigenvalue. As an equation, th ...
of the Fourier transform. In probability theory, the Fourier transform of the probability distribution of a real-valued random variable X is closely connected to the
characteristic function In mathematics, the term "characteristic function" can refer to any of several distinct concepts: * The indicator function of a subset, that is the function ::\mathbf_A\colon X \to \, :which for a given subset ''A'' of ''X'', has value 1 at points ...
\varphi_X(t) of that variable, which is defined as the
expected value In probability theory, the expected value (also called expectation, expectancy, mathematical expectation, mean, average, or first moment) is a generalization of the weighted average. Informally, the expected value is the arithmetic mean of a l ...
of e^, as a function of the real variable t (the
frequency Frequency is the number of occurrences of a repeating event per unit of time. It is also occasionally referred to as ''temporal frequency'' for clarity, and is distinct from ''angular frequency''. Frequency is measured in hertz (Hz) which is eq ...
parameter of the Fourier transform). This definition can be analytically extended to a complex-value variable t. The relation between both is: :\varphi_X(t) = \hat f(-t)


Moment and cumulant generating functions

The
moment generating function In probability theory and statistics, the moment-generating function of a real-valued random variable is an alternative specification of its probability distribution. Thus, it provides the basis of an alternative route to analytical results compare ...
of a real random variable X is the expected value of e^, as a function of the real parameter t. For a normal distribution with density f, mean \mu and deviation \sigma, the moment generating function exists and is equal to :M(t) = \operatorname ^= \hat f(it) = e^ e^ The
cumulant generating function In probability theory and statistics, the cumulants of a probability distribution are a set of quantities that provide an alternative to the '' moments'' of the distribution. Any two probability distributions whose moments are identical will have ...
is the logarithm of the moment generating function, namely :g(t) = \ln M(t) = \mu t + \tfrac 12 \sigma^2 t^2 Since this is a quadratic polynomial in t, only the first two
cumulant In probability theory and statistics, the cumulants of a probability distribution are a set of quantities that provide an alternative to the '' moments'' of the distribution. Any two probability distributions whose moments are identical will ha ...
s are nonzero, namely the mean \mu and the variance \sigma^2.


Stein operator and class

Within
Stein's method Stein's method is a general method in probability theory to obtain bounds on the distance between two probability distributions with respect to a probability metric. It was introduced by Charles Stein, who first published it in 1972, to obtain ...
the Stein operator and class of a random variable X \sim \mathcal(\mu, \sigma^2) are \mathcalf(x) = \sigma^2 f'(x) - (x-\mu)f(x) and \mathcal the class of all absolutely continuous functions f : \R \to \R \mbox\mathbb[, f'(X), ]< \infty.


Zero-variance limit

In the limit (mathematics), limit when \sigma tends to zero, the probability density f(x) eventually tends to zero at any x\ne \mu, but grows without limit if x = \mu, while its integral remains equal to 1. Therefore, the normal distribution cannot be defined as an ordinary
function Function or functionality may refer to: Computing * Function key, a type of key on computer keyboards * Function model, a structured representation of processes in a system * Function object or functor or functionoid, a concept of object-oriente ...
when \sigma = 0. However, one can define the normal distribution with zero variance as a
generalized function In mathematics, generalized functions are objects extending the notion of functions. There is more than one recognized theory, for example the theory of distributions. Generalized functions are especially useful in making discontinuous functions ...
; specifically, as Dirac's "delta function" \delta translated by the mean \mu, that is f(x)=\delta(x-\mu). Its CDF is then the
Heaviside step function The Heaviside step function, or the unit step function, usually denoted by or (but sometimes , or ), is a step function, named after Oliver Heaviside (1850–1925), the value of which is zero for negative arguments and one for positive argume ...
translated by the mean \mu, namely :F(x) = \begin 0 & \textx < \mu \\ 1 & \textx \geq \mu \end


Maximum entropy

Of all probability distributions over the reals with a specified mean \mu and variance \sigma^2, the normal distribution N(\mu,\sigma^2) is the one with maximum entropy. If X is a
continuous random variable In probability theory and statistics, a probability distribution is the mathematical function that gives the probabilities of occurrence of different possible outcomes for an experiment. It is a mathematical description of a random phenomenon i ...
with
probability density In probability theory, a probability density function (PDF), or density of a continuous random variable, is a function whose value at any given sample (or point) in the sample space (the set of possible values taken by the random variable) can ...
f(x), then the entropy of X is defined as : H(X) = - \int_^\infty f(x)\log f(x)\, dx where f(x)\log f(x) is understood to be zero whenever f(x)=0. This functional can be maximized, subject to the constraints that the distribution is properly normalized and has a specified variance, by using
variational calculus The calculus of variations (or Variational Calculus) is a field of mathematical analysis that uses variations, which are small changes in functions and functionals, to find maxima and minima of functionals: mappings from a set of functions t ...
. A function with two
Lagrange multipliers In mathematical optimization, the method of Lagrange multipliers is a strategy for finding the local maxima and minima of a function subject to equality constraints (i.e., subject to the condition that one or more equations have to be satisfied ex ...
is defined: : L=\int_^\infty f(x)\ln(f(x))\,dx-\lambda_0\left(1-\int_^\infty f(x)\,dx\right)-\lambda\left(\sigma^2-\int_^\infty f(x)(x-\mu)^2\,dx\right) where f(x) is, for now, regarded as some density function with mean \mu and standard deviation \sigma. At maximum entropy, a small variation \delta f(x) about f(x) will produce a variation \delta L about L which is equal to 0: : 0=\delta L=\int_^\infty \delta f(x)\left (\ln(f(x))+1+\lambda_0+\lambda(x-\mu)^2\right )\,dx Since this must hold for any small \delta f(x), the term in brackets must be zero, and solving for f(x) yields: :f(x)=e^ Using the constraint equations to solve for \lambda_0 and \lambda yields the density of the normal distribution: : f(x, \mu, \sigma)=\frace^ The entropy of a normal distribution is equal to : H(X)=\tfrac(1+\log(2\sigma^2\pi))


Other properties


Related distributions


Central limit theorem

The central limit theorem states that under certain (fairly common) conditions, the sum of many random variables will have an approximately normal distribution. More specifically, where X_1,\ldots ,X_n are
independent and identically distributed In probability theory and statistics, a collection of random variables is independent and identically distributed if each random variable has the same probability distribution as the others and all are mutually independent. This property is usua ...
random variables with the same arbitrary distribution, zero mean, and variance \sigma^2 and Z is their mean scaled by \sqrt : Z = \sqrt\left(\frac\sum_^n X_i\right) Then, as n increases, the probability distribution of Z will tend to the normal distribution with zero mean and variance \sigma^2. The theorem can be extended to variables (X_i) that are not independent and/or not identically distributed if certain constraints are placed on the degree of dependence and the moments of the distributions. Many
test statistic A test statistic is a statistic (a quantity derived from the sample) used in statistical hypothesis testing.Berger, R. L.; Casella, G. (2001). ''Statistical Inference'', Duxbury Press, Second Edition (p.374) A hypothesis test is typically specif ...
s, scores, and
estimator In statistics, an estimator is a rule for calculating an estimate of a given quantity based on observed data: thus the rule (the estimator), the quantity of interest (the estimand) and its result (the estimate) are distinguished. For example, the ...
s encountered in practice contain sums of certain random variables in 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 distributions. The central limit theorem also implies that certain distributions can be approximated by the normal distribution, for example: * The
binomial distribution In probability theory and statistics, the binomial distribution with parameters ''n'' and ''p'' is the discrete probability distribution of the number of successes in a sequence of ''n'' independent experiments, each asking a yes–no quest ...
B(n,p) is approximately normal with mean np and variance np(1-p) for large n and for p not too close to 0 or 1. * The
Poisson distribution In probability theory and statistics, the Poisson distribution is a discrete probability distribution that expresses the probability of a given number of events occurring in a fixed interval of time or space if these events occur with a known co ...
with parameter \lambda is approximately normal with mean \lambda and variance \lambda, for large values of \lambda. * The
chi-squared distribution In probability theory and statistics, the chi-squared distribution (also chi-square or \chi^2-distribution) with k degrees of freedom is the distribution of a sum of the squares of k independent standard normal random variables. The chi-squa ...
\chi^2(k) is approximately normal with mean k and variance 2k, for large k. * The
Student's t-distribution In probability and statistics, Student's ''t''-distribution (or simply the ''t''-distribution) is any member of a family of continuous probability distributions that arise when estimating the mean of a normally distributed population in sit ...
t(\nu) is approximately normal with mean 0 and variance 1 when \nu is large. Whether these approximations are sufficiently accurate depends on the purpose for which they are needed, and the rate of convergence to the normal distribution. It is typically the case that such approximations are less accurate in the tails of the distribution. A general upper bound for the approximation error in the central limit theorem is given by the
Berry–Esseen theorem In probability theory, the central limit theorem states that, under certain circumstances, the probability distribution of the scaled mean of a random sample converges to a normal distribution as the sample size increases to infinity. Under strong ...
, improvements of the approximation are given by the
Edgeworth expansion The Gram–Charlier A series (named in honor of Jørgen Pedersen Gram and Carl Charlier), and the Edgeworth series (named in honor of Francis Ysidro Edgeworth) are series that approximate a probability distribution in terms of its cumulants. The se ...
s. This theorem can also be used to justify modeling the sum of many uniform noise sources as
Gaussian noise Gaussian noise, named after Carl Friedrich Gauss, is a term from signal processing theory denoting a kind of signal noise that has a probability density function (pdf) equal to that of the normal distribution (which is also known as the Gaussia ...
. See
AWGN Additive white Gaussian noise (AWGN) is a basic noise model used in information theory to mimic the effect of many random processes that occur in nature. The modifiers denote specific characteristics: * ''Additive'' because it is added to any nois ...
.


Operations and functions of normal variables

The
probability density In probability theory, a probability density function (PDF), or density of a continuous random variable, is a function whose value at any given sample (or point) in the sample space (the set of possible values taken by the random variable) can ...
,
cumulative distribution In statistics, the frequency (or absolute frequency) of an event i is the number n_i of times the observation has occurred/recorded in an experiment or study. These frequencies are often depicted graphically or in tabular form. Types The cumul ...
, and inverse cumulative distribution of any function of one or more independent or correlated normal variables can be computed with the numerical method of ray-tracing
Matlab code
. In the following sections we look at some special cases.


Operations on a single normal variable

If X is distributed normally with mean \mu and variance \sigma^2, then * aX+b, for any real numbers a and b, is also normally distributed, with mean a\mu+b and standard deviation , a, \sigma. That is, the family of normal distributions is closed under linear transformations. * The exponential of X is distributed log-normally: . * The absolute value of X has
folded normal distribution The folded normal distribution is a probability distribution related to the normal distribution. Given a normally distributed random variable ''X'' with mean ''μ'' and variance ''σ''2, the random variable ''Y'' = , ''X'', has a folded normal d ...
: . If \mu = 0 this is known as the
half-normal distribution In probability theory and statistics, the half-normal distribution is a special case of the folded normal distribution. Let X follow an ordinary normal distribution, N(0,\sigma^2). Then, Y=, X, follows a half-normal distribution. Thus, the hal ...
. * The absolute value of normalized residuals, , ''X'' − ''μ'', /''σ'', has
chi distribution In probability theory and statistics, the chi distribution is a continuous probability distribution. It is the distribution of the positive square root of the sum of squares of a set of independent random variables each following a standard norm ...
with one degree of freedom: , X - \mu, / \sigma \sim \chi_1. * The square of ''X''/''σ'' has the
noncentral chi-squared distribution In probability theory and statistics, the noncentral chi-squared distribution (or noncentral chi-square distribution, noncentral \chi^2 distribution) is a noncentral generalization of the chi-squared distribution. It often arises in the power a ...
with one degree of freedom: X^2 / \sigma^2 \sim \chi_1^2(\mu^2 / \sigma^2). If \mu = 0, the distribution is called simply chi-squared. * The log likelihood of a normal variable x is simply the log of its
probability density function In probability theory, a probability density function (PDF), or density of a continuous random variable, is a function whose value at any given sample (or point) in the sample space (the set of possible values taken by the random variable) can ...
: \ln p(x)= -\frac \left(\frac \right)^2 -\ln \left(\sigma \sqrt \right) = -\frac z^2 -\ln \left(\sigma \sqrt \right). Since this is a scaled and shifted square of a standard normal variable, it is distributed as a scaled and shifted chi-squared variable. * The distribution of the variable ''X'' restricted to an interval 'a'', ''b''is called the
truncated normal distribution In probability and statistics, the truncated normal distribution is the probability distribution derived from that of a normally distributed random variable by bounding the random variable from either below or above (or both). The truncated no ...
. * (''X'' − ''μ'')−2 has a
Lévy distribution In probability theory and statistics, the Lévy distribution, named after Paul Lévy, is a continuous probability distribution for a non-negative random variable. In spectroscopy, this distribution, with frequency as the dependent variable, is kn ...
with location 0 and scale ''σ''−2.


= Operations on two independent normal variables

= * If X_1 and X_2 are two
independent Independent or Independents may refer to: Arts, entertainment, and media Artist groups * Independents (artist group), a group of modernist painters based in the New Hope, Pennsylvania, area of the United States during the early 1930s * Independ ...
normal random variables, with means \mu_1, \mu_2 and standard deviations \sigma_1, \sigma_2, then their sum X_1 + X_2 will also be normally distributed, roof/sup> with mean \mu_1 + \mu_2 and variance \sigma_1^2 + \sigma_2^2. * In particular, if X and Y are independent normal deviates with zero mean and variance \sigma^2, then X + Y and X - Y are also independent and normally distributed, with zero mean and variance 2\sigma^2. This is a special case of the
polarization identity In linear algebra, a branch of mathematics, the polarization identity is any one of a family of formulas that express the inner product of two vectors in terms of the norm of a normed vector space. If a norm arises from an inner product then t ...
. * If X_1, X_2 are two independent normal deviates with mean \mu and deviation \sigma, and a, b are arbitrary real numbers, then the variable X_3 = \frac + \mu is also normally distributed with mean \mu and deviation \sigma. It follows that the normal distribution is
stable A stable is a building in which livestock, especially horses, are kept. It most commonly means a building that is divided into separate stalls for individual animals and livestock. There are many different types of stables in use today; the ...
(with exponent \alpha=2).


= Operations on two independent standard normal variables

= If X_1 and X_2 are two independent standard normal random variables with mean 0 and variance 1, then * Their sum and difference is distributed normally with mean zero and variance two: X_1 \pm X_2 \sim N(0, 2). * Their product Z = X_1 X_2 follows the
product distribution A product distribution is a probability distribution constructed as the distribution of the product of random variables having two other known distributions. Given two statistically independent random variables ''X'' and ''Y'', the distribution of ...
with density function f_Z(z) = \pi^ K_0(, z, ) where K_0 is the
modified Bessel function of the second kind Bessel functions, first defined by the mathematician Daniel Bernoulli and then generalized by Friedrich Bessel, are canonical solutions of Bessel's differential equation x^2 \frac + x \frac + \left(x^2 - \alpha^2 \right)y = 0 for an arbitrary ...
. This distribution is symmetric around zero, unbounded at z = 0, and has the
characteristic function In mathematics, the term "characteristic function" can refer to any of several distinct concepts: * The indicator function of a subset, that is the function ::\mathbf_A\colon X \to \, :which for a given subset ''A'' of ''X'', has value 1 at points ...
\phi_Z(t) = (1 + t^2)^. * Their ratio follows the standard
Cauchy distribution The Cauchy distribution, named after Augustin Cauchy, is a continuous probability distribution. It is also known, especially among physicists, as the Lorentz distribution (after Hendrik Lorentz), Cauchy–Lorentz distribution, Lorentz(ian) fun ...
: X_1/ X_2 \sim \operatorname(0, 1). * Their Euclidean norm \sqrt has the
Rayleigh distribution In probability theory and statistics, the Rayleigh distribution is a continuous probability distribution for nonnegative-valued random variables. Up to rescaling, it coincides with the chi distribution with two degrees of freedom. The distribut ...
.


Operations on multiple independent normal variables

* Any linear combination of independent normal deviates is a normal deviate. * If X_1, X_2, \ldots, X_n are independent standard normal random variables, then the sum of their squares has the
chi-squared distribution In probability theory and statistics, the chi-squared distribution (also chi-square or \chi^2-distribution) with k degrees of freedom is the distribution of a sum of the squares of k independent standard normal random variables. The chi-squa ...
with n degrees of freedom X_1^2 + \cdots + X_n^2 \sim \chi_n^2. * If X_1, X_2, \ldots, X_n are independent normally distributed random variables with means \mu and variances \sigma^2, then their
sample mean The sample mean (or "empirical mean") and the sample covariance are statistics computed from a Sample (statistics), sample of data on one or more random variables. The sample mean is the average value (or mean, mean value) of a sample (statistic ...
is independent from the sample
standard deviation In statistics, the standard deviation is a measure of the amount of variation or dispersion of a set of values. A low standard deviation indicates that the values tend to be close to the mean (also called the expected value) of the set, while ...
, which can be demonstrated using Basu's theorem or
Cochran's theorem In statistics, Cochran's theorem, devised by William G. Cochran, is a theorem used to justify results relating to the probability distributions of statistics that are used in the analysis of variance. Statement Let ''U''1, ..., ''U'N'' be i.i. ...
. The ratio of these two quantities will have the
Student's t-distribution In probability and statistics, Student's ''t''-distribution (or simply the ''t''-distribution) is any member of a family of continuous probability distributions that arise when estimating the mean of a normally distributed population in sit ...
with n-1 degrees of freedom: t = \frac = \frac \sim t_. * If X_1, X_2, \ldots, X_n, Y_1, Y_2, \ldots, Y_m are independent standard normal random variables, then the ratio of their normalized sums of squares will have the with degrees of freedom: F = \frac \sim F_.


Operations on multiple correlated normal variables

* A
quadratic form In mathematics, a quadratic form is a polynomial with terms all of degree two ("form" is another name for a homogeneous polynomial). For example, :4x^2 + 2xy - 3y^2 is a quadratic form in the variables and . The coefficients usually belong to a ...
of a normal vector, i.e. a quadratic function q = \sum x_i^2 + \sum x_j + c of multiple independent or correlated normal variables, is a generalized chi-square variable.


Operations on the density function

The split normal distribution is most directly defined in terms of joining scaled sections of the density functions of different normal distributions and rescaling the density to integrate to one. The
truncated normal distribution In probability and statistics, the truncated normal distribution is the probability distribution derived from that of a normally distributed random variable by bounding the random variable from either below or above (or both). The truncated no ...
results from rescaling a section of a single density function.


Infinite divisibility and Cramér's theorem

For any positive integer \text, any normal distribution with mean \mu and variance \sigma^2 is the distribution of the sum of \text independent normal deviates, each with mean \frac and variance \frac. This property is called
infinite divisibility Infinite divisibility arises in different ways in philosophy, physics, economics, order theory (a branch of mathematics), and probability theory (also a branch of mathematics). One may speak of infinite divisibility, or the lack thereof, of matter ...
. Conversely, if X_1 and X_2 are independent random variables and their sum X_1+X_2 has a normal distribution, then both X_1 and X_2 must be normal deviates. This result is known as Cramér's decomposition theorem, and is equivalent to saying that the convolution of two distributions is normal if and only if both are normal. Cramér's theorem implies that a linear combination of independent non-Gaussian variables will never have an exactly normal distribution, although it may approach it arbitrarily closely.


Bernstein's theorem

Bernstein's theorem states that if X and Y are independent and X + Y and X - Y are also independent, then both ''X'' and ''Y'' must necessarily have normal distributions. More generally, if X_1, \ldots, X_n are independent random variables, then two distinct linear combinations \sum and \sumwill be independent if and only if all X_k are normal and \sum, where \sigma_k^2 denotes the variance of X_k.


Extensions

The notion of normal distribution, being one of the most important distributions in probability theory, has been extended far beyond the standard framework of the univariate (that is one-dimensional) case (Case 1). All these extensions are also called ''normal'' or ''Gaussian'' laws, so a certain ambiguity in names exists. * The
multivariate normal distribution In probability theory and statistics, the multivariate normal distribution, multivariate Gaussian distribution, or joint normal distribution is a generalization of the one-dimensional (univariate) normal distribution to higher dimensions. One d ...
describes the Gaussian law in the ''k''-dimensional Euclidean space. A vector is multivariate-normally distributed if any linear combination of its components has a (univariate) normal distribution. The variance of ''X'' is a ''k×k'' symmetric positive-definite matrix ''V''. The multivariate normal distribution is a special case of the
elliptical distribution In probability and statistics, an elliptical distribution is any member of a broad family of probability distributions that generalize the multivariate normal distribution. Intuitively, in the simplified two and three dimensional case, the joint di ...
s. As such, its iso-density loci in the ''k'' = 2 case are ellipses and in the case of arbitrary ''k'' are ellipsoids. * Rectified Gaussian distribution a rectified version of normal distribution with all the negative elements reset to 0 * Complex normal distribution deals with the complex normal vectors. A complex vector is said to be normal if both its real and imaginary components jointly possess a 2''k''-dimensional multivariate normal distribution. The variance-covariance structure of ''X'' is described by two matrices: the ''variance'' matrix Γ, and the ''relation'' matrix ''C''. * Matrix normal distribution describes the case of normally distributed matrices. * Gaussian processes are the normally distributed stochastic processes. These can be viewed as elements of some infinite-dimensional Hilbert space ''H'', and thus are the analogues of multivariate normal vectors for the case . A random element is said to be normal if for any constant the scalar product has a (univariate) normal distribution. The variance structure of such Gaussian random element can be described in terms of the linear ''covariance ''. Several Gaussian processes became popular enough to have their own names: ** Wiener process, Brownian motion, ** Brownian bridge, ** Ornstein–Uhlenbeck process. * Gaussian q-distribution is an abstract mathematical construction that represents a "q-analogue" of the normal distribution. * the q-Gaussian is an analogue of the Gaussian distribution, in the sense that it maximises the Tsallis entropy, and is one type of Tsallis distribution. Note that this distribution is different from the Gaussian q-distribution above. * The Kaniadakis Gaussian distribution, Kaniadakis ''κ''-Gaussian distribution is a generalization of the Gaussian distribution which arises from the Kaniadakis statistics, being one of the Kaniadakis distribution, Kaniadakis distributions. A random variable ''X'' has a two-piece normal distribution if it has a distribution : f_X( x ) = N( \mu, \sigma_1^2 ) \text x \le \mu : f_X( x ) = N( \mu, \sigma_2^2 ) \text x \ge \mu where ''μ'' is the mean and ''σ''1 and ''σ''2 are the standard deviations of the distribution to the left and right of the mean respectively. The mean, variance and third central moment of this distribution have been determined : \operatorname( X ) = \mu + \sqrt ( \sigma_2 - \sigma_1 ) : \operatorname( X ) = \left( 1 - \frac 2 \pi\right)( \sigma_2 - \sigma_1 )^2 + \sigma_1 \sigma_2 : \operatorname( X ) = \sqrt( \sigma_2 - \sigma_1 ) \left[ \left( \frac 4 \pi - 1 \right) ( \sigma_2 - \sigma_1)^2 + \sigma_1 \sigma_2 \right] where E(''X''), V(''X'') and T(''X'') are the mean, variance, and third central moment respectively. One of the main practical uses of the Gaussian law is to model the empirical distributions of many different random variables encountered in practice. In such case a possible extension would be a richer family of distributions, having more than two parameters and therefore being able to fit the empirical distribution more accurately. The examples of such extensions are: * Pearson distribution — a four-parameter family of probability distributions that extend the normal law to include different skewness and kurtosis values. * The generalized normal distribution, also known as the exponential power distribution, allows for distribution tails with thicker or thinner asymptotic behaviors.


Statistical inference


Estimation of parameters

It is often the case that we do not know the parameters of the normal distribution, but instead want to Estimation theory, estimate them. That is, having a sample (x_1, \ldots, x_n) from a normal N(\mu, \sigma^2) population we would like to learn the approximate values of parameters \mu and \sigma^2. The standard approach to this problem is the maximum likelihood method, which requires maximization of the ''log-likelihood function'': : \ln\mathcal(\mu,\sigma^2) = \sum_^n \ln f(x_i\mid\mu,\sigma^2) = -\frac\ln(2\pi) - \frac\ln\sigma^2 - \frac\sum_^n (x_i-\mu)^2. Taking derivatives with respect to \mu and \sigma^2 and solving the resulting system of first order conditions yields the ''maximum likelihood estimates'': : \hat = \overline \equiv \frac\sum_^n x_i, \qquad \hat^2 = \frac \sum_^n (x_i - \overline)^2.


Sample mean

Estimator \textstyle\hat\mu is called the ''
sample mean The sample mean (or "empirical mean") and the sample covariance are statistics computed from a Sample (statistics), sample of data on one or more random variables. The sample mean is the average value (or mean, mean value) of a sample (statistic ...
'', since it is the arithmetic mean of all observations. The statistic \textstyle\overline is complete statistic, complete and sufficient statistic, sufficient for \mu, and therefore by the Lehmann–Scheffé theorem, \textstyle\hat\mu is the uniformly minimum variance unbiased (UMVU) estimator. In finite samples it is distributed normally: : \hat\mu \sim \mathcal(\mu,\sigma^2/n). The variance of this estimator is equal to the ''μμ''-element of the inverse Fisher information matrix \textstyle\mathcal^. This implies that the estimator is efficient estimator, finite-sample efficient. Of practical importance is the fact that the standard error (statistics), standard error of \textstyle\hat\mu is proportional to \textstyle1/\sqrt, that is, if one wishes to decrease the standard error by a factor of 10, one must increase the number of points in the sample by a factor of 100. This fact is widely used in determining sample sizes for opinion polls and the number of trials in Monte Carlo simulations. From the standpoint of the asymptotic theory (statistics), asymptotic theory, \textstyle\hat\mu is consistent estimator, consistent, that is, it convergence in probability, converges in probability to \mu as n\rightarrow\infty. The estimator is also asymptotic normality, asymptotically normal, which is a simple corollary of the fact that it is normal in finite samples: : \sqrt(\hat\mu-\mu) \,\xrightarrow\, \mathcal(0,\sigma^2).


Sample variance

The estimator \textstyle\hat\sigma^2 is called the ''sample variance'', since it is the variance of the sample ((x_1, \ldots, x_n)). In practice, another estimator is often used instead of the \textstyle\hat\sigma^2. This other estimator is denoted s^2, and is also called the ''sample variance'', which represents a certain ambiguity in terminology; its square root s is called the ''sample standard deviation''. The estimator s^2 differs from \textstyle\hat\sigma^2 by having instead of ''n'' in the denominator (the so-called Bessel's correction): : s^2 = \frac \hat\sigma^2 = \frac \sum_^n (x_i - \overline)^2. The difference between s^2 and \textstyle\hat\sigma^2 becomes negligibly small for large ''n''s. In finite samples however, the motivation behind the use of s^2 is that it is an unbiased estimator of the underlying parameter \sigma^2, whereas \textstyle\hat\sigma^2 is biased. Also, by the Lehmann–Scheffé theorem the estimator s^2 is uniformly minimum variance unbiased (Minimum-variance unbiased estimator, UMVU), which makes it the "best" estimator among all unbiased ones. However it can be shown that the biased estimator \textstyle\hat\sigma^2 is "better" than the s^2 in terms of the mean squared error (MSE) criterion. In finite samples both s^2 and \textstyle\hat\sigma^2 have scaled
chi-squared distribution In probability theory and statistics, the chi-squared distribution (also chi-square or \chi^2-distribution) with k degrees of freedom is the distribution of a sum of the squares of k independent standard normal random variables. The chi-squa ...
with degrees of freedom: : s^2 \sim \frac \cdot \chi^2_, \qquad \hat\sigma^2 \sim \frac \cdot \chi^2_. The first of these expressions shows that the variance of s^2 is equal to 2\sigma^4/(n-1), which is slightly greater than the ''σσ''-element of the inverse Fisher information matrix \textstyle\mathcal^. Thus, s^2 is not an efficient estimator for \sigma^2, and moreover, since s^2 is UMVU, we can conclude that the finite-sample efficient estimator for \sigma^2 does not exist. Applying the asymptotic theory, both estimators s^2 and \textstyle\hat\sigma^2 are consistent, that is they converge in probability to \sigma^2 as the sample size n\rightarrow\infty. The two estimators are also both asymptotically normal: : \sqrt(\hat\sigma^2 - \sigma^2) \simeq \sqrt(s^2-\sigma^2) \,\xrightarrow\, \mathcal(0,2\sigma^4). In particular, both estimators are asymptotically efficient for \sigma^2.


Confidence intervals

By
Cochran's theorem In statistics, Cochran's theorem, devised by William G. Cochran, is a theorem used to justify results relating to the probability distributions of statistics that are used in the analysis of variance. Statement Let ''U''1, ..., ''U'N'' be i.i. ...
, for normal distributions the sample mean \textstyle\hat\mu and the sample variance ''s''2 are
independent Independent or Independents may refer to: Arts, entertainment, and media Artist groups * Independents (artist group), a group of modernist painters based in the New Hope, Pennsylvania, area of the United States during the early 1930s * Independ ...
, which means there can be no gain in considering their joint distribution. There is also a converse theorem: if in a sample the sample mean and sample variance are independent, then the sample must have come from the normal distribution. The independence between \textstyle\hat\mu and ''s'' can be employed to construct the so-called ''t-statistic'': : t = \frac = \frac \sim t_ This quantity ''t'' has the
Student's t-distribution In probability and statistics, Student's ''t''-distribution (or simply the ''t''-distribution) is any member of a family of continuous probability distributions that arise when estimating the mean of a normally distributed population in sit ...
with degrees of freedom, and it is an ancillary statistic (independent of the value of the parameters). Inverting the distribution of this ''t''-statistics will allow us to construct the
confidence interval In frequentist statistics, a confidence interval (CI) is a range of estimates for an unknown parameter. A confidence interval is computed at a designated ''confidence level''; the 95% confidence level is most common, but other levels, such as 9 ...
for ''μ''; similarly, inverting the ''χ''2 distribution of the statistic ''s''2 will give us the confidence interval for ''σ''2: :\mu \in \left[ \hat\mu - t_ \fracs, \hat\mu + t_ \fracs \right], :\sigma^2 \in \left[ \frac, \frac \right], where ''tk,p'' and are the ''p''th
quantile In statistics and probability, quantiles are cut points dividing the range of a probability distribution into continuous intervals with equal probabilities, or dividing the observations in a sample in the same way. There is one fewer quantile tha ...
s of the ''t''- and ''χ''2-distributions respectively. These confidence intervals are of the ''confidence level'' , meaning that the true values ''μ'' and ''σ''2 fall outside of these intervals with probability (or significance level) ''α''. In practice people usually take , resulting in the 95% confidence intervals. Approximate formulas can be derived from the asymptotic distributions of \textstyle\hat\mu and ''s''2: :\mu \in \left[ \hat\mu - , z_, \fracs, \hat\mu + , z_, \fracs \right], :\sigma^2 \in \left[ s^2 - , z_, \fracs^2, s^2 + , z_, \fracs^2 \right], The approximate formulas become valid for large values of ''n'', and are more convenient for the manual calculation since the standard normal quantiles ''z''''α''/2 do not depend on ''n''. In particular, the most popular value of , results in .


Normality tests

Normality tests assess the likelihood that the given data set comes from a normal distribution. Typically the null hypothesis ''H''0 is that the observations are distributed normally with unspecified mean ''μ'' and variance ''σ''2, versus the alternative ''Ha'' that the distribution is arbitrary. Many tests (over 40) have been devised for this problem. The more prominent of them are outlined below: Diagnostic plots are more intuitively appealing but subjective at the same time, as they rely on informal human judgement to accept or reject the null hypothesis. *
Q–Q plot In statistics, a Q–Q plot (quantile-quantile plot) is a probability plot, a List of graphical methods, graphical method for comparing two probability distributions by plotting their ''quantiles'' against each other. A point on the plot co ...
, also known as normal probability plot or rankit plot—is a plot of the sorted values from the data set against the expected values of the corresponding quantiles from the standard normal distribution. That is, it's a plot of point of the form (Φ−1(''pk''), ''x''(''k'')), where plotting points ''pk'' are equal to ''pk'' = (''k'' − ''α'')/(''n'' + 1 − 2''α'') and ''α'' is an adjustment constant, which can be anything between 0 and 1. If the null hypothesis is true, the plotted points should approximately lie on a straight line. * P–P plot – similar to the Q–Q plot, but used much less frequently. This method consists of plotting the points (Φ(''z''(''k'')), ''pk''), where \textstyle z_ = (x_-\hat\mu)/\hat\sigma. For normally distributed data this plot should lie on a 45° line between (0, 0) and (1, 1). Goodness-of-fit tests: ''Moment-based tests'': * D'Agostino's K-squared test * Jarque–Bera test * Shapiro–Wilk test: This is based on the fact that the line in the Q–Q plot has the slope of ''σ''. The test compares the least squares estimate of that slope with the value of the sample variance, and rejects the null hypothesis if these two quantities differ significantly. ''Tests based on the empirical distribution function'': * Anderson–Darling test * Lilliefors test (an adaptation of the Kolmogorov–Smirnov test)


Bayesian analysis of the normal distribution

Bayesian analysis of normally distributed data is complicated by the many different possibilities that may be considered: * Either the mean, or the variance, or neither, may be considered a fixed quantity. * When the variance is unknown, analysis may be done directly in terms of the variance, or in terms of the
precision Precision, precise or precisely may refer to: Science, and technology, and mathematics Mathematics and computing (general) * Accuracy and precision, measurement deviation from true value and its scatter * Significant figures, the number of digit ...
, the reciprocal of the variance. The reason for expressing the formulas in terms of precision is that the analysis of most cases is simplified. * Both univariate and multivariate normal distribution, multivariate cases need to be considered. * Either conjugate prior, conjugate or improper prior, improper prior distributions may be placed on the unknown variables. * An additional set of cases occurs in Bayesian linear regression, where in the basic model the data is assumed to be normally distributed, and normal priors are placed on the regression coefficients. The resulting analysis is similar to the basic cases of independent identically distributed data. The formulas for the non-linear-regression cases are summarized in the conjugate prior article.


Sum of two quadratics


= Scalar form

= The following auxiliary formula is useful for simplifying the posterior distribution, posterior update equations, which otherwise become fairly tedious. :a(x-y)^2 + b(x-z)^2 = (a + b)\left(x - \frac\right)^2 + \frac(y-z)^2 This equation rewrites the sum of two quadratics in ''x'' by expanding the squares, grouping the terms in ''x'', and completing the square. Note the following about the complex constant factors attached to some of the terms: # The factor \frac has the form of a weighted average of ''y'' and ''z''. # \frac = \frac = (a^ + b^)^. This shows that this factor can be thought of as resulting from a situation where the Multiplicative inverse, reciprocals of quantities ''a'' and ''b'' add directly, so to combine ''a'' and ''b'' themselves, it's necessary to reciprocate, add, and reciprocate the result again to get back into the original units. This is exactly the sort of operation performed by the harmonic mean, so it is not surprising that \frac is one-half the harmonic mean of ''a'' and ''b''.


= Vector form

= A similar formula can be written for the sum of two vector quadratics: If x, y, z are vectors of length ''k'', and A and B are symmetric matrix, symmetric, invertible matrices of size k\times k, then : \begin & (\mathbf-\mathbf)'\mathbf(\mathbf-\mathbf) + (\mathbf-\mathbf)' \mathbf(\mathbf-\mathbf) \\ = & (\mathbf - \mathbf)'(\mathbf+\mathbf)(\mathbf - \mathbf) + (\mathbf - \mathbf)'(\mathbf^ + \mathbf^)^(\mathbf - \mathbf) \end where :\mathbf = (\mathbf + \mathbf)^(\mathbf\mathbf + \mathbf \mathbf) Note that the form x′ A x is called a
quadratic form In mathematics, a quadratic form is a polynomial with terms all of degree two ("form" is another name for a homogeneous polynomial). For example, :4x^2 + 2xy - 3y^2 is a quadratic form in the variables and . The coefficients usually belong to a ...
and is a scalar (mathematics), scalar: :\mathbf'\mathbf\mathbf = \sum_a_ x_i x_j In other words, it sums up all possible combinations of products of pairs of elements from x, with a separate coefficient for each. In addition, since x_i x_j = x_j x_i, only the sum a_ + a_ matters for any off-diagonal elements of A, and there is no loss of generality in assuming that A is symmetric matrix, symmetric. Furthermore, if A is symmetric, then the form \mathbf'\mathbf\mathbf = \mathbf'\mathbf\mathbf.


Sum of differences from the mean

Another useful formula is as follows: \sum_^n (x_i-\mu)^2 = \sum_^n (x_i-\bar)^2 + n(\bar -\mu)^2 where \bar = \frac \sum_^n x_i.


With known variance

For a set of i.i.d. normally distributed data points X of size ''n'' where each individual point ''x'' follows x \sim \mathcal(\mu, \sigma^2) with known
variance In probability theory and statistics, variance is the expectation of the squared deviation of a random variable from its population mean or sample mean. Variance is a measure of dispersion, meaning it is a measure of how far a set of numbers ...
σ2, the conjugate prior distribution is also normally distributed. This can be shown more easily by rewriting the variance as the
precision Precision, precise or precisely may refer to: Science, and technology, and mathematics Mathematics and computing (general) * Accuracy and precision, measurement deviation from true value and its scatter * Significant figures, the number of digit ...
, i.e. using τ = 1/σ2. Then if x \sim \mathcal(\mu, 1/\tau) and \mu \sim \mathcal(\mu_0, 1/\tau_0), we proceed as follows. First, the likelihood function is (using the formula above for the sum of differences from the mean): :\begin p(\mathbf\mid\mu,\tau) &= \prod_^n \sqrt \exp\left(-\frac\tau(x_i-\mu)^2\right) \\ &= \left(\frac\right)^ \exp\left(-\frac\tau \sum_^n (x_i-\mu)^2\right) \\ &= \left(\frac\right)^ \exp\left[-\frac\tau \left(\sum_^n(x_i-\bar)^2 + n(\bar -\mu)^2\right)\right]. \end Then, we proceed as follows: :\begin p(\mu\mid\mathbf) &\propto p(\mathbf\mid\mu) p(\mu) \\ & = \left(\frac\right)^ \exp\left[-\frac\tau \left(\sum_^n(x_i-\bar)^2 + n(\bar -\mu)^2\right)\right] \sqrt \exp\left(-\frac\tau_0(\mu-\mu_0)^2\right) \\ &\propto \exp\left(-\frac\left(\tau\left(\sum_^n(x_i-\bar)^2 + n(\bar -\mu)^2\right) + \tau_0(\mu-\mu_0)^2\right)\right) \\ &\propto \exp\left(-\frac \left(n\tau(\bar-\mu)^2 + \tau_0(\mu-\mu_0)^2 \right)\right) \\ &= \exp\left(-\frac(n\tau + \tau_0)\left(\mu - \dfrac\right)^2 + \frac(\bar - \mu_0)^2\right) \\ &\propto \exp\left(-\frac(n\tau + \tau_0)\left(\mu - \dfrac\right)^2\right) \end In the above derivation, we used the formula above for the sum of two quadratics and eliminated all constant factors not involving ''μ''. The result is the kernel (statistics), kernel of a normal distribution, with mean \frac and precision n\tau + \tau_0, i.e. :p(\mu\mid\mathbf) \sim \mathcal\left(\frac, \frac\right) This can be written as a set of Bayesian update equations for the posterior parameters in terms of the prior parameters: :\begin \tau_0' &= \tau_0 + n\tau \\[5pt] \mu_0' &= \frac \\[5pt] \bar &= \frac\sum_^n x_i \end That is, to combine ''n'' data points with total precision of ''nτ'' (or equivalently, total variance of ''n''/''σ''2) and mean of values \bar, derive a new total precision simply by adding the total precision of the data to the prior total precision, and form a new mean through a ''precision-weighted average'', i.e. a weighted average of the data mean and the prior mean, each weighted by the associated total precision. This makes logical sense if the precision is thought of as indicating the certainty of the observations: In the distribution of the posterior mean, each of the input components is weighted by its certainty, and the certainty of this distribution is the sum of the individual certainties. (For the intuition of this, compare the expression "the whole is (or is not) greater than the sum of its parts". In addition, consider that the knowledge of the posterior comes from a combination of the knowledge of the prior and likelihood, so it makes sense that we are more certain of it than of either of its components.) The above formula reveals why it is more convenient to do Bayesian analysis of conjugate priors for the normal distribution in terms of the precision. The posterior precision is simply the sum of the prior and likelihood precisions, and the posterior mean is computed through a precision-weighted average, as described above. The same formulas can be written in terms of variance by reciprocating all the precisions, yielding the more ugly formulas :\begin ' &= \frac \\[5pt] \mu_0' &= \frac \\[5pt] \bar &= \frac\sum_^n x_i \end


With known mean

For a set of i.i.d. normally distributed data points X of size ''n'' where each individual point ''x'' follows x \sim \mathcal(\mu, \sigma^2) with known mean μ, the conjugate prior of the
variance In probability theory and statistics, variance is the expectation of the squared deviation of a random variable from its population mean or sample mean. Variance is a measure of dispersion, meaning it is a measure of how far a set of numbers ...
has an inverse gamma distribution or a scaled inverse chi-squared distribution. The two are equivalent 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. The prior for σ2 is as follows: :p(\sigma^2\mid\nu_0,\sigma_0^2) = \frac~\frac \propto \frac The likelihood function from above, written in terms of the variance, is: :\begin p(\mathbf\mid\mu,\sigma^2) &= \left(\frac\right)^ \exp\left[-\frac \sum_^n (x_i-\mu)^2\right] \\ &= \left(\frac\right)^ \exp\left[-\frac\right] \end where :S = \sum_^n (x_i-\mu)^2. Then: :\begin p(\sigma^2\mid\mathbf) &\propto p(\mathbf\mid\sigma^2) p(\sigma^2) \\ &= \left(\frac\right)^ \exp\left[-\frac\right] \frac~\frac \\ &\propto \left(\frac\right)^ \frac \exp\left[-\frac + \frac\right] \\ &= \frac \exp\left[-\frac\right] \end The above is also a scaled inverse chi-squared distribution where :\begin \nu_0' &= \nu_0 + n \\ \nu_0'' &= \nu_0 \sigma_0^2 + \sum_^n (x_i-\mu)^2 \end or equivalently :\begin \nu_0' &= \nu_0 + n \\ ' &= \frac \end Reparameterizing in terms of an inverse gamma distribution, the result is: :\begin \alpha' &= \alpha + \frac \\ \beta' &= \beta + \frac \end


With unknown mean and unknown variance

For a set of i.i.d. normally distributed data points X of size ''n'' where each individual point ''x'' follows x \sim \mathcal(\mu, \sigma^2) with unknown mean μ and unknown
variance In probability theory and statistics, variance is the expectation of the squared deviation of a random variable from its population mean or sample mean. Variance is a measure of dispersion, meaning it is a measure of how far a set of numbers ...
σ2, a combined (multivariate) conjugate prior is placed over the mean and variance, consisting of a normal-inverse-gamma distribution. Logically, this originates as follows: # From the analysis of the case with unknown mean but known variance, we see that the update equations involve sufficient statistics computed from the data consisting of the mean of the data points and the total variance of the data points, computed in turn from the known variance divided by the number of data points. # From the analysis of the case with unknown variance but known mean, we see that the update equations involve sufficient statistics over the data consisting of the number of data points and sum of squared deviations. # Keep in mind that the posterior update values serve as the prior distribution when further data is handled. Thus, we should logically think of our priors in terms of the sufficient statistics just described, with the same semantics kept in mind as much as possible. # To handle the case where both mean and variance are unknown, we could place independent priors over the mean and variance, with fixed estimates of the average mean, total variance, number of data points used to compute the variance prior, and sum of squared deviations. Note however that in reality, the total variance of the mean depends on the unknown variance, and the sum of squared deviations that goes into the variance prior (appears to) depend on the unknown mean. In practice, the latter dependence is relatively unimportant: Shifting the actual mean shifts the generated points by an equal amount, and on average the squared deviations will remain the same. This is not the case, however, with the total variance of the mean: As the unknown variance increases, the total variance of the mean will increase proportionately, and we would like to capture this dependence. # This suggests that we create a ''conditional prior'' of the mean on the unknown variance, with a hyperparameter specifying the mean of the pseudo-observations associated with the prior, and another parameter specifying the number of pseudo-observations. This number serves as a scaling parameter on the variance, making it possible to control the overall variance of the mean relative to the actual variance parameter. The prior for the variance also has two hyperparameters, one specifying the sum of squared deviations of the pseudo-observations associated with the prior, and another specifying once again the number of pseudo-observations. Note that each of the priors has a hyperparameter specifying the number of pseudo-observations, and in each case this controls the relative variance of that prior. These are given as two separate hyperparameters so that the variance (aka the confidence) of the two priors can be controlled separately. # This leads immediately to the normal-inverse-gamma distribution, which is the product of the two distributions just defined, with conjugate priors used (an inverse gamma distribution over the variance, and a normal distribution over the mean, ''conditional'' on the variance) and with the same four parameters just defined. The priors are normally defined as follows: :\begin p(\mu\mid\sigma^2; \mu_0, n_0) &\sim \mathcal(\mu_0,\sigma^2/n_0) \\ p(\sigma^2; \nu_0,\sigma_0^2) &\sim I\chi^2(\nu_0,\sigma_0^2) = IG(\nu_0/2, \nu_0\sigma_0^2/2) \end The update equations can be derived, and look as follows: :\begin \bar &= \frac 1 n \sum_^n x_i \\ \mu_0' &= \frac \\ n_0' &= n_0 + n \\ \nu_0' &= \nu_0 + n \\ \nu_0'' &= \nu_0 \sigma_0^2 + \sum_^n (x_i-\bar)^2 + \frac(\mu_0 - \bar)^2 \end The respective numbers of pseudo-observations add the number of actual observations to them. The new mean hyperparameter is once again a weighted average, this time weighted by the relative numbers of observations. Finally, the update for \nu_0'' is similar to the case with known mean, but in this case the sum of squared deviations is taken with respect to the observed data mean rather than the true mean, and as a result a new "interaction term" needs to be added to take care of the additional error source stemming from the deviation between prior and data mean.


Occurrence and applications

The occurrence of normal distribution in practical problems can be loosely classified into four categories: # Exactly normal distributions; # Approximately normal laws, for example when such approximation is justified by the
central limit theorem In probability theory, the central limit theorem (CLT) establishes that, in many situations, when independent random variables are summed up, their properly normalized sum tends toward a normal distribution even if the original variables themselv ...
; and # Distributions modeled as normal – the normal distribution being the distribution with Principle of maximum entropy, maximum entropy for a given mean and variance. # Regression problems – the normal distribution being found after systematic effects have been modeled sufficiently well.


Exact normality

Certain quantities in physics are distributed normally, as was first demonstrated by James Clerk Maxwell. Examples of such quantities are: * Probability density function of a ground state in a quantum harmonic oscillator. * The position of a particle that experiences diffusion. If initially the particle is located at a specific point (that is its probability distribution is the Dirac delta function), then after time ''t'' its location is described by a normal distribution with variance ''t'', which satisfies the diffusion equation \frac f(x,t) = \frac \frac f(x,t). If the initial location is given by a certain density function g(x), then the density at time ''t'' is the convolution of ''g'' and the normal PDF.


Approximate normality

''Approximately'' normal distributions occur in many situations, as explained by the
central limit theorem In probability theory, the central limit theorem (CLT) establishes that, in many situations, when independent random variables are summed up, their properly normalized sum tends toward a normal distribution even if the original variables themselv ...
. When the outcome is produced by many small effects acting ''additively and independently'', its distribution will be close to normal. The normal approximation will not be valid if the effects act multiplicatively (instead of additively), or if there is a single external influence that has a considerably larger magnitude than the rest of the effects. * In counting problems, where the central limit theorem includes a discrete-to-continuum approximation and where Infinite divisibility, infinitely divisible and Indecomposable distribution, decomposable distributions are involved, such as ** binomial distribution, Binomial random variables, associated with binary response variables; ** Poisson distribution, Poisson random variables, associated with rare events; * Thermal radiation has a Bose–Einstein statistics, Bose–Einstein distribution on very short time scales, and a normal distribution on longer timescales due to the central limit theorem.


Assumed normality

There are statistical methods to empirically test that assumption; see the above #Normality tests, Normality tests section. * In biology, the ''logarithm'' of various variables tend to have a normal distribution, that is, they tend to have a
log-normal distribution In probability theory, a log-normal (or lognormal) distribution is a continuous probability distribution of a random variable whose logarithm is normally distributed. Thus, if the random variable is log-normally distributed, then has a normal ...
(after separation on male/female subpopulations), with examples including: ** Measures of size of living tissue (length, height, skin area, weight); ** The ''length'' of ''inert'' appendages (hair, claws, nails, teeth) of biological specimens, ''in the direction of growth''; presumably the thickness of tree bark also falls under this category; ** Certain physiological measurements, such as blood pressure of adult humans. * In finance, in particular the Black–Scholes model, changes in the ''logarithm'' of exchange rates, price indices, and stock market indices are assumed normal (these variables behave like compound interest, not like simple interest, and so are multiplicative). Some mathematicians such as Benoit Mandelbrot have argued that Levy skew alpha-stable distribution, log-Levy distributions, which possesses heavy tails would be a more appropriate model, in particular for the analysis for stock market crashes. The use of the assumption of normal distribution occurring in financial models has also been criticized by Nassim Nicholas Taleb in his works. * Propagation of uncertainty, Measurement errors in physical experiments are often modeled by a normal distribution. This use of a normal distribution does not imply that one is assuming the measurement errors are normally distributed, rather using the normal distribution produces the most conservative predictions possible given only knowledge about the mean and variance of the errors. * In Standardized testing (statistics), standardized testing, results can be made to have a normal distribution by either selecting the number and difficulty of questions (as in the Intelligence quotient, IQ test) or transforming the raw test scores into "output" scores by fitting them to the normal distribution. For example, the SAT's traditional range of 200–800 is based on a normal distribution with a mean of 500 and a standard deviation of 100. * Many scores are derived from the normal distribution, including percentile ranks ("percentiles" or "quantiles"), normal curve equivalents, stanines, Standard score, z-scores, and T-scores. Additionally, some behavioral statistical procedures assume that scores are normally distributed; for example, Student's t-test, t-tests and Analysis of variance, ANOVAs. Bell curve grading assigns relative grades based on a normal distribution of scores. * In hydrology the distribution of long duration river discharge or rainfall, e.g. monthly and yearly totals, is often thought to be practically normal according to the
central limit theorem In probability theory, the central limit theorem (CLT) establishes that, in many situations, when independent random variables are summed up, their properly normalized sum tends toward a normal distribution even if the original variables themselv ...
. The blue picture, made with CumFreq, illustrates an example of fitting the normal distribution to ranked October rainfalls showing the 90% confidence belt based on the
binomial distribution In probability theory and statistics, the binomial distribution with parameters ''n'' and ''p'' is the discrete probability distribution of the number of successes in a sequence of ''n'' independent experiments, each asking a yes–no quest ...
. The rainfall data are represented by plotting positions as part of the cumulative frequency analysis.


Methodological problems and peer review

John Ioannidis argues that using normally distributed standard deviations as standards for validating research findings leave falsifiability, falsifiable predictions about phenomena that are not normally distributed untested. This includes, for example, phenomena that only appear when all necessary conditions are present and one cannot be a substitute for another in an addition-like way and phenomena that are not randomly distributed. Ioannidis argues that standard deviation-centered validation gives a false appearance of validity to hypotheses and theories where some but not all falsifiable predictions are normally distributed since the portion of falsifiable predictions that there is evidence against may and in some cases are in the non-normally distributed parts of the range of falsifiable predictions, as well as baselessly dismissing hypotheses for which none of the falsifiable predictions are normally distributed as if were they unfalsifiable when in fact they do make falsifiable predictions. It is argued by Ioannidis that many cases of mutually exclusive theories being accepted as "validated" by research journals are caused by failure of the journals to take in empirical falsifications of non-normally distributed predictions, and not because mutually exclusive theories are true, which they cannot be, although two mutually exclusive theories can both be wrong and a third one correct.


Computational methods


Generating values from normal distribution

In computer simulations, especially in applications of the Monte-Carlo method, it is often desirable to generate values that are normally distributed. The algorithms listed below all generate the standard normal deviates, since a can be generated as , where ''Z'' is standard normal. All these algorithms rely on the availability of a random number generator ''U'' capable of producing Uniform distribution (continuous), uniform random variates. * The most straightforward method is based on the probability integral transform property: if ''U'' is distributed uniformly on (0,1), then Φ−1(''U'') will have the standard normal distribution. The drawback of this method is that it relies on calculation of the
probit function In probability theory and statistics, the probit function is the quantile function associated with the standard normal distribution. It has applications in data analysis and machine learning, in particular exploratory statistical graphics and ...
Φ−1, which cannot be done analytically. Some approximate methods are described in and in the error function, erf article. Wichura gives a fast algorithm for computing this function to 16 decimal places, which is used by R programming language, R to compute random variates of the normal distribution. * Irwin–Hall distribution#Approximating a Normal distribution, An easy-to-program approximate approach that relies on the
central limit theorem In probability theory, the central limit theorem (CLT) establishes that, in many situations, when independent random variables are summed up, their properly normalized sum tends toward a normal distribution even if the original variables themselv ...
is as follows: generate 12 uniform ''U''(0,1) deviates, add them all up, and subtract 6 – the resulting random variable will have approximately standard normal distribution. In truth, the distribution will be Irwin–Hall distribution, Irwin–Hall, which is a 12-section eleventh-order polynomial approximation to the normal distribution. This random deviate will have a limited range of (−6, 6). Note that in a true normal distribution, only 0.00034% of all samples will fall outside ±6σ. * The Box–Muller transform, Box–Muller method uses two independent random numbers ''U'' and ''V'' distributed uniform distribution (continuous), uniformly on (0,1). Then the two random variables ''X'' and ''Y'' X = \sqrt \, \cos(2 \pi V) , \qquad Y = \sqrt \, \sin(2 \pi V) . will both have the standard normal distribution, and will be
independent Independent or Independents may refer to: Arts, entertainment, and media Artist groups * Independents (artist group), a group of modernist painters based in the New Hope, Pennsylvania, area of the United States during the early 1930s * Independ ...
. This formulation arises because for a bivariate normal random vector (''X'', ''Y'') the squared norm will have the
chi-squared distribution In probability theory and statistics, the chi-squared distribution (also chi-square or \chi^2-distribution) with k degrees of freedom is the distribution of a sum of the squares of k independent standard normal random variables. The chi-squa ...
with two degrees of freedom, which is an easily generated exponential distribution, exponential random variable corresponding to the quantity −2ln(''U'') in these equations; and the angle is distributed uniformly around the circle, chosen by the random variable ''V''. * The Marsaglia polar method is a modification of the Box–Muller method which does not require computation of the sine and cosine functions. In this method, ''U'' and ''V'' are drawn from the uniform (−1,1) distribution, and then is computed. If ''S'' is greater or equal to 1, then the method starts over, otherwise the two quantities X = U\sqrt, \qquad Y = V\sqrt are returned. Again, ''X'' and ''Y'' are independent, standard normal random variables. * The Ratio method is a rejection method. The algorithm proceeds as follows: ** Generate two independent uniform deviates ''U'' and ''V''; ** Compute ''X'' = (''V'' − 0.5)/''U''; ** Optional: if ''X''2 ≤ 5 − 4''e''1/4''U'' then accept ''X'' and terminate algorithm; ** Optional: if ''X''2 ≥ 4''e''−1.35/''U'' + 1.4 then reject ''X'' and start over from step 1; ** If ''X''2 ≤ −4 ln''U'' then accept ''X'', otherwise start over the algorithm. *:The two optional steps allow the evaluation of the logarithm in the last step to be avoided in most cases. These steps can be greatly improved so that the logarithm is rarely evaluated. * The ziggurat algorithm is faster than the Box–Muller transform and still exact. In about 97% of all cases it uses only two random numbers, one random integer and one random uniform, one multiplication and an if-test. Only in 3% of the cases, where the combination of those two falls outside the "core of the ziggurat" (a kind of rejection sampling using logarithms), do exponentials and more uniform random numbers have to be employed. * Integer arithmetic can be used to sample from the standard normal distribution. This method is exact in the sense that it satisfies the conditions of ''ideal approximation''; i.e., it is equivalent to sampling a real number from the standard normal distribution and rounding this to the nearest representable floating point number. * There is also some investigation into the connection between the fast Hadamard transform and the normal distribution, since the transform employs just addition and subtraction and by the central limit theorem random numbers from almost any distribution will be transformed into the normal distribution. In this regard a series of Hadamard transforms can be combined with random permutations to turn arbitrary data sets into a normally distributed data.


Numerical approximations for the normal CDF and normal quantile function

The standard normal cumulative distribution function, CDF is widely used in scientific and statistical computing. The values Φ(''x'') may be approximated very accurately by a variety of methods, such as numerical integration, Taylor series, asymptotic series and Gauss's continued fraction#Of Kummer's confluent hypergeometric function, continued fractions. Different approximations are used depending on the desired level of accuracy. * give the approximation for Φ(''x'') for ''x > 0'' with the absolute error (algorith
26.2.17
: \Phi(x) = 1 - \varphi(x)\left(b_1 t + b_2 t^2 + b_3t^3 + b_4 t^4 + b_5 t^5\right) + \varepsilon(x), \qquad t = \frac, where ''ϕ''(''x'') is the standard normal PDF, and ''b''0 = 0.2316419, ''b''1 = 0.319381530, ''b''2 = −0.356563782, ''b''3 = 1.781477937, ''b''4 = −1.821255978, ''b''5 = 1.330274429. * lists some dozens of approximations – by means of rational functions, with or without exponentials – for the function. His algorithms vary in the degree of complexity and the resulting precision, with maximum absolute precision of 24 digits. An algorithm by combines Hart's algorithm 5666 with a continued fraction approximation in the tail to provide a fast computation algorithm with a 16-digit precision. * after recalling Hart68 solution is not suited for erf, gives a solution for both erf and erfc, with maximal relative error bound, via rational function, Rational Chebyshev Approximation. * suggested a simple algorithm based on the Taylor series expansion \Phi(x) = \frac12 + \varphi(x)\left( x + \frac 3 + \frac + \frac + \frac + \cdots \right) for calculating with arbitrary precision. The drawback of this algorithm is comparatively slow calculation time (for example it takes over 300 iterations to calculate the function with 16 digits of precision when ). * The GNU Scientific Library calculates values of the standard normal CDF using Hart's algorithms and approximations with Chebyshev polynomials. Shore (1982) introduced simple approximations that may be incorporated in stochastic optimization models of engineering and operations research, like reliability engineering and inventory analysis. Denoting , the simplest approximation for the quantile function is: z = \Phi^(p)=5.5556\left[1- \left( \frac p \right)^\right],\qquad p\ge 1/2 This approximation delivers for ''z'' a maximum absolute error of 0.026 (for , corresponding to ). For replace ''p'' by and change sign. Another approximation, somewhat less accurate, is the single-parameter approximation: z=-0.4115\left\, \qquad p\ge 1/2 The latter had served to derive a simple approximation for the loss integral of the normal distribution, defined by \begin L(z) & =\int_z^\infty (u-z)\varphi(u) \, du=\int_z^\infty [1-\Phi (u)] \, du \\[5pt] L(z) & \approx \begin 0.4115\left(\dfrac p \right) - z, & p<1/2, \\ \\ 0.4115\left( \dfrac p \right), & p\ge 1/2. \end \\[5pt] \text \\ L(z) & \approx \begin 0.4115\left\, & p < 1/2, \\ \\ 0.4115 \dfrac p, & p\ge 1/2. \end \end This approximation is particularly accurate for the right far-tail (maximum error of 10−3 for z≥1.4). Highly accurate approximations for the CDF, based on Response modeling methodology, Response Modeling Methodology (RMM, Shore, 2011, 2012), are shown in Shore (2005). Some more approximations can be found at: Error function#Approximation with elementary functions. In particular, small ''relative'' error on the whole domain for the CDF \Phi and the quantile function \Phi^ as well, is achieved via an explicitly invertible formula by Sergei Winitzki in 2008.


History


Development

Some authors attribute the credit for the discovery of the normal distribution to Abraham de Moivre, de Moivre, who in 1738 published in the second edition of his "''The Doctrine of Chances''" the study of the coefficients in the binomial expansion of . De Moivre proved that the middle term in this expansion has the approximate magnitude of 2^n/\sqrt, and that "If ''m'' or ''n'' be a Quantity infinitely great, then the Logarithm of the Ratio, which a Term distant from the middle by the Interval ''ℓ'', has to the middle Term, is -\frac." Although this theorem can be interpreted as the first obscure expression for the normal probability law, Stephen Stigler, Stigler points out that de Moivre himself did not interpret his results as anything more than the approximate rule for the binomial coefficients, and in particular de Moivre lacked the concept of the probability density function. In 1823 Carl Friedrich Gauss, Gauss published his monograph "''Theoria combinationis observationum erroribus minimis obnoxiae''" where among other things he introduces several important statistical concepts, such as the method of least squares, the method of maximum likelihood, and the ''normal distribution''. Gauss used ''M'', , to denote the measurements of some unknown quantity ''V'', and sought the "most probable" estimator of that quantity: the one that maximizes the probability of obtaining the observed experimental results. In his notation φΔ is the probability density function of the measurement errors of magnitude Δ. Not knowing what the function ''φ'' is, Gauss requires that his method should reduce to the well-known answer: the arithmetic mean of the measured values. Starting from these principles, Gauss demonstrates that the only law that rationalizes the choice of arithmetic mean as an estimator of the location parameter, is the normal law of errors: \varphi\mathit = \frac h \, e^, where ''h'' is "the measure of the precision of the observations". Using this normal law as a generic model for errors in the experiments, Gauss formulates what is now known as the non-linear least squares, non-linear weighted least squares method. Although Gauss was the first to suggest the normal distribution law, Pierre Simon de Laplace, Laplace made significant contributions. It was Laplace who first posed the problem of aggregating several observations in 1774, although his own solution led to the Laplacian distribution. It was Laplace who first calculated the value of the Gaussian integral, integral in 1782, providing the normalization constant for the normal distribution. Finally, it was Laplace who in 1810 proved and presented to the Academy the fundamental
central limit theorem In probability theory, the central limit theorem (CLT) establishes that, in many situations, when independent random variables are summed up, their properly normalized sum tends toward a normal distribution even if the original variables themselv ...
, which emphasized the theoretical importance of the normal distribution. It is of interest to note that in 1809 an Irish-American mathematician Robert Adrain published two insightful but flawed derivations of the normal probability law, simultaneously and independently from Gauss. His works remained largely unnoticed by the scientific community, until in 1871 they were exhumed by Cleveland Abbe, Abbe. In the middle of the 19th century James Clerk Maxwell, Maxwell demonstrated that the normal distribution is not just a convenient mathematical tool, but may also occur in natural phenomena: "The number of particles whose velocity, resolved in a certain direction, lies between ''x'' and ''x'' + ''dx'' is \operatorname \frac\; e^ \, dx


Naming

Today, the concept is usually known in English as the normal distribution or Gaussian distribution. Other less common names include Gauss distribution, Laplace-Gauss distribution, the law of error, the law of facility of errors, Laplace's second law, Gaussian law. Gauss himself apparently coined the term with reference to the "normal equations" involved in its applications, with normal having its technical meaning of orthogonal rather than "usual". However, by the end of the 19th century some authors had started using the name ''normal distribution'', where the word "normal" was used as an adjective – the term now being seen as a reflection of the fact that this distribution was seen as typical, common – and thus "normal". Charles Sanders Peirce, Peirce (one of those authors) once defined "normal" thus: "...the 'normal' is not the average (or any other kind of mean) of what actually occurs, but of what ''would'', in the long run, occur under certain circumstances." Around the turn of the 20th century Karl Pearson, Pearson popularized the term ''normal'' as a designation for this distribution. Also, it was Pearson who first wrote the distribution in terms of the standard deviation ''σ'' as in modern notation. Soon after this, in year 1915, Ronald Fisher, Fisher added the location parameter to the formula for normal distribution, expressing it in the way it is written nowadays: df = \frac e^ \, dx. The term "standard normal", which denotes the normal distribution with zero mean and unit variance came into general use around the 1950s, appearing in the popular textbooks by P. G. Hoel (1947) "''Introduction to mathematical statistics''" and A. M. Mood (1950) "''Introduction to the theory of statistics''".


See also

* Bates distribution – similar to the Irwin–Hall distribution, but rescaled back into the 0 to 1 range * Behrens–Fisher problem – the long-standing problem of testing whether two normal samples with different variances have same means; * Bhattacharyya distance – method used to separate mixtures of normal distributions * Erdős–Kac theorem – on the occurrence of the normal distribution in number theory * Full width at half maximum * Gaussian blur – convolution, which uses the normal distribution as a kernel * Modified half-normal distribution with the pdf on (0, \infty) is given as f(x)= \frac, where \Psi(\alpha,z)=_1\Psi_1\left(\begin\left(\alpha,\frac\right)\\(1,0)\end;z \right) denotes the Fox-Wright Psi function. * Normally distributed and uncorrelated does not imply independent * Ratio normal distribution * Reciprocal normal distribution * Standard normal table * Stein's lemma * Sub-Gaussian distribution * Sum of normally distributed random variables * Tweedie distribution – The normal distribution is a member of the family of Tweedie exponential dispersion models. * Wrapped normal distribution – the Normal distribution applied to a circular domain * Z-test – using the normal distribution


Notes


References


Citations


Sources

* * In particular, the entries fo
"bell-shaped and bell curve"
an

* * * * * * * * * * * * * * * * * * * * * * * * Translated by Stephen M. Stigler in ''Statistical Science'' 1 (3), 1986: . * * * * * * * * * * * * * * * * * * * * * * * * * * * *


External links

*
Normal distribution calculator
{{Authority control Normal distribution, Continuous distributions Conjugate prior distributions Exponential family distributions Stable distributions Location-scale family probability distributions]">X, ^p \right&= \sigma^p \cdot 2^ \frac _1F_1\left( -\frac, \frac, -\frac \left( \frac \mu \sigma \right)^2 \right). \end These expressions remain valid even if p is not an integer. See also Hermite polynomials#"Negative variance", generalized Hermite polynomials. The expectation of X conditioned on the event that X lies in an interval ,b/math> is given by :\operatorname\left \mid a= \mu - \sigma^2\frac where f and F respectively are the density and the cumulative distribution function of X. For b=\infty this is known as the
inverse Mills ratio In probability theory, the Mills ratio (or Mills's ratio) of a continuous random variable X is the function : m(x) := \frac , where f(x) is the probability density function, and :\bar(x) := \Pr x.html" ;"title=">x">>x= \int_x^ f(u)\, du is the ...
. Note that above, density f of X is used instead of standard normal density as in inverse Mills ratio, so here we have \sigma^2 instead of \sigma.


Fourier transform and characteristic function

The
Fourier transform A Fourier transform (FT) is a mathematical transform that decomposes functions into frequency components, which are represented by the output of the transform as a function of frequency. Most commonly functions of time or space are transformed, ...
of a normal density f with mean \mu and standard deviation \sigma is : \hat f(t) = \int_^\infty f(x)e^ \, dx = e^ e^ where i is the
imaginary unit The imaginary unit or unit imaginary number () is a solution to the quadratic equation x^2+1=0. Although there is no real number with this property, can be used to extend the real numbers to what are called complex numbers, using addition an ...
. If the mean \mu=0, the first factor is 1, and the Fourier transform is, apart from a constant factor, a normal density on the
frequency domain In physics, electronics, control systems engineering, and statistics, the frequency domain refers to the analysis of mathematical functions or signals with respect to frequency, rather than time. Put simply, a time-domain graph shows how a signa ...
, with mean 0 and standard deviation 1/\sigma. In particular, the standard normal distribution \varphi is an
eigenfunction In mathematics, an eigenfunction of a linear operator ''D'' defined on some function space is any non-zero function f in that space that, when acted upon by ''D'', is only multiplied by some scaling factor called an eigenvalue. As an equation, th ...
of the Fourier transform. In probability theory, the Fourier transform of the probability distribution of a real-valued random variable X is closely connected to the
characteristic function In mathematics, the term "characteristic function" can refer to any of several distinct concepts: * The indicator function of a subset, that is the function ::\mathbf_A\colon X \to \, :which for a given subset ''A'' of ''X'', has value 1 at points ...
\varphi_X(t) of that variable, which is defined as the
expected value In probability theory, the expected value (also called expectation, expectancy, mathematical expectation, mean, average, or first moment) is a generalization of the weighted average. Informally, the expected value is the arithmetic mean of a l ...
of e^, as a function of the real variable t (the
frequency Frequency is the number of occurrences of a repeating event per unit of time. It is also occasionally referred to as ''temporal frequency'' for clarity, and is distinct from ''angular frequency''. Frequency is measured in hertz (Hz) which is eq ...
parameter of the Fourier transform). This definition can be analytically extended to a complex-value variable t. The relation between both is: :\varphi_X(t) = \hat f(-t)


Moment and cumulant generating functions

The
moment generating function In probability theory and statistics, the moment-generating function of a real-valued random variable is an alternative specification of its probability distribution. Thus, it provides the basis of an alternative route to analytical results compare ...
of a real random variable X is the expected value of e^, as a function of the real parameter t. For a normal distribution with density f, mean \mu and deviation \sigma, the moment generating function exists and is equal to :M(t) = \operatorname ^= \hat f(it) = e^ e^ The
cumulant generating function In probability theory and statistics, the cumulants of a probability distribution are a set of quantities that provide an alternative to the '' moments'' of the distribution. Any two probability distributions whose moments are identical will have ...
is the logarithm of the moment generating function, namely :g(t) = \ln M(t) = \mu t + \tfrac 12 \sigma^2 t^2 Since this is a quadratic polynomial in t, only the first two
cumulant In probability theory and statistics, the cumulants of a probability distribution are a set of quantities that provide an alternative to the '' moments'' of the distribution. Any two probability distributions whose moments are identical will ha ...
s are nonzero, namely the mean \mu and the variance \sigma^2.


Stein operator and class

Within
Stein's method Stein's method is a general method in probability theory to obtain bounds on the distance between two probability distributions with respect to a probability metric. It was introduced by Charles Stein, who first published it in 1972, to obtain ...
the Stein operator and class of a random variable X \sim \mathcal(\mu, \sigma^2) are \mathcalf(x) = \sigma^2 f'(x) - (x-\mu)f(x) and \mathcal the class of all absolutely continuous functions f : \R \to \R \mbox\mathbb[, f'(X), ]< \infty.


Zero-variance limit

In the limit (mathematics), limit when \sigma tends to zero, the probability density f(x) eventually tends to zero at any x\ne \mu, but grows without limit if x = \mu, while its integral remains equal to 1. Therefore, the normal distribution cannot be defined as an ordinary
function Function or functionality may refer to: Computing * Function key, a type of key on computer keyboards * Function model, a structured representation of processes in a system * Function object or functor or functionoid, a concept of object-oriente ...
when \sigma = 0. However, one can define the normal distribution with zero variance as a
generalized function In mathematics, generalized functions are objects extending the notion of functions. There is more than one recognized theory, for example the theory of distributions. Generalized functions are especially useful in making discontinuous functions ...
; specifically, as Dirac's "delta function" \delta translated by the mean \mu, that is f(x)=\delta(x-\mu). Its CDF is then the
Heaviside step function The Heaviside step function, or the unit step function, usually denoted by or (but sometimes , or ), is a step function, named after Oliver Heaviside (1850–1925), the value of which is zero for negative arguments and one for positive argume ...
translated by the mean \mu, namely :F(x) = \begin 0 & \textx < \mu \\ 1 & \textx \geq \mu \end


Maximum entropy

Of all probability distributions over the reals with a specified mean \mu and variance \sigma^2, the normal distribution N(\mu,\sigma^2) is the one with maximum entropy. If X is a
continuous random variable In probability theory and statistics, a probability distribution is the mathematical function that gives the probabilities of occurrence of different possible outcomes for an experiment. It is a mathematical description of a random phenomenon i ...
with
probability density In probability theory, a probability density function (PDF), or density of a continuous random variable, is a function whose value at any given sample (or point) in the sample space (the set of possible values taken by the random variable) can ...
f(x), then the entropy of X is defined as : H(X) = - \int_^\infty f(x)\log f(x)\, dx where f(x)\log f(x) is understood to be zero whenever f(x)=0. This functional can be maximized, subject to the constraints that the distribution is properly normalized and has a specified variance, by using
variational calculus The calculus of variations (or Variational Calculus) is a field of mathematical analysis that uses variations, which are small changes in functions and functionals, to find maxima and minima of functionals: mappings from a set of functions t ...
. A function with two
Lagrange multipliers In mathematical optimization, the method of Lagrange multipliers is a strategy for finding the local maxima and minima of a function subject to equality constraints (i.e., subject to the condition that one or more equations have to be satisfied ex ...
is defined: : L=\int_^\infty f(x)\ln(f(x))\,dx-\lambda_0\left(1-\int_^\infty f(x)\,dx\right)-\lambda\left(\sigma^2-\int_^\infty f(x)(x-\mu)^2\,dx\right) where f(x) is, for now, regarded as some density function with mean \mu and standard deviation \sigma. At maximum entropy, a small variation \delta f(x) about f(x) will produce a variation \delta L about L which is equal to 0: : 0=\delta L=\int_^\infty \delta f(x)\left (\ln(f(x))+1+\lambda_0+\lambda(x-\mu)^2\right )\,dx Since this must hold for any small \delta f(x), the term in brackets must be zero, and solving for f(x) yields: :f(x)=e^ Using the constraint equations to solve for \lambda_0 and \lambda yields the density of the normal distribution: : f(x, \mu, \sigma)=\frace^ The entropy of a normal distribution is equal to : H(X)=\tfrac(1+\log(2\sigma^2\pi))


Other properties


Related distributions


Central limit theorem

The central limit theorem states that under certain (fairly common) conditions, the sum of many random variables will have an approximately normal distribution. More specifically, where X_1,\ldots ,X_n are
independent and identically distributed In probability theory and statistics, a collection of random variables is independent and identically distributed if each random variable has the same probability distribution as the others and all are mutually independent. This property is usua ...
random variables with the same arbitrary distribution, zero mean, and variance \sigma^2 and Z is their mean scaled by \sqrt : Z = \sqrt\left(\frac\sum_^n X_i\right) Then, as n increases, the probability distribution of Z will tend to the normal distribution with zero mean and variance \sigma^2. The theorem can be extended to variables (X_i) that are not independent and/or not identically distributed if certain constraints are placed on the degree of dependence and the moments of the distributions. Many
test statistic A test statistic is a statistic (a quantity derived from the sample) used in statistical hypothesis testing.Berger, R. L.; Casella, G. (2001). ''Statistical Inference'', Duxbury Press, Second Edition (p.374) A hypothesis test is typically specif ...
s, scores, and
estimator In statistics, an estimator is a rule for calculating an estimate of a given quantity based on observed data: thus the rule (the estimator), the quantity of interest (the estimand) and its result (the estimate) are distinguished. For example, the ...
s encountered in practice contain sums of certain random variables in 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 distributions. The central limit theorem also implies that certain distributions can be approximated by the normal distribution, for example: * The
binomial distribution In probability theory and statistics, the binomial distribution with parameters ''n'' and ''p'' is the discrete probability distribution of the number of successes in a sequence of ''n'' independent experiments, each asking a yes–no quest ...
B(n,p) is approximately normal with mean np and variance np(1-p) for large n and for p not too close to 0 or 1. * The
Poisson distribution In probability theory and statistics, the Poisson distribution is a discrete probability distribution that expresses the probability of a given number of events occurring in a fixed interval of time or space if these events occur with a known co ...
with parameter \lambda is approximately normal with mean \lambda and variance \lambda, for large values of \lambda. * The
chi-squared distribution In probability theory and statistics, the chi-squared distribution (also chi-square or \chi^2-distribution) with k degrees of freedom is the distribution of a sum of the squares of k independent standard normal random variables. The chi-squa ...
\chi^2(k) is approximately normal with mean k and variance 2k, for large k. * The
Student's t-distribution In probability and statistics, Student's ''t''-distribution (or simply the ''t''-distribution) is any member of a family of continuous probability distributions that arise when estimating the mean of a normally distributed population in sit ...
t(\nu) is approximately normal with mean 0 and variance 1 when \nu is large. Whether these approximations are sufficiently accurate depends on the purpose for which they are needed, and the rate of convergence to the normal distribution. It is typically the case that such approximations are less accurate in the tails of the distribution. A general upper bound for the approximation error in the central limit theorem is given by the
Berry–Esseen theorem In probability theory, the central limit theorem states that, under certain circumstances, the probability distribution of the scaled mean of a random sample converges to a normal distribution as the sample size increases to infinity. Under strong ...
, improvements of the approximation are given by the
Edgeworth expansion The Gram–Charlier A series (named in honor of Jørgen Pedersen Gram and Carl Charlier), and the Edgeworth series (named in honor of Francis Ysidro Edgeworth) are series that approximate a probability distribution in terms of its cumulants. The se ...
s. This theorem can also be used to justify modeling the sum of many uniform noise sources as
Gaussian noise Gaussian noise, named after Carl Friedrich Gauss, is a term from signal processing theory denoting a kind of signal noise that has a probability density function (pdf) equal to that of the normal distribution (which is also known as the Gaussia ...
. See
AWGN Additive white Gaussian noise (AWGN) is a basic noise model used in information theory to mimic the effect of many random processes that occur in nature. The modifiers denote specific characteristics: * ''Additive'' because it is added to any nois ...
.


Operations and functions of normal variables

The
probability density In probability theory, a probability density function (PDF), or density of a continuous random variable, is a function whose value at any given sample (or point) in the sample space (the set of possible values taken by the random variable) can ...
,
cumulative distribution In statistics, the frequency (or absolute frequency) of an event i is the number n_i of times the observation has occurred/recorded in an experiment or study. These frequencies are often depicted graphically or in tabular form. Types The cumul ...
, and inverse cumulative distribution of any function of one or more independent or correlated normal variables can be computed with the numerical method of ray-tracing
Matlab code
. In the following sections we look at some special cases.


Operations on a single normal variable

If X is distributed normally with mean \mu and variance \sigma^2, then * aX+b, for any real numbers a and b, is also normally distributed, with mean a\mu+b and standard deviation , a, \sigma. That is, the family of normal distributions is closed under linear transformations. * The exponential of X is distributed log-normally: . * The absolute value of X has
folded normal distribution The folded normal distribution is a probability distribution related to the normal distribution. Given a normally distributed random variable ''X'' with mean ''μ'' and variance ''σ''2, the random variable ''Y'' = , ''X'', has a folded normal d ...
: . If \mu = 0 this is known as the
half-normal distribution In probability theory and statistics, the half-normal distribution is a special case of the folded normal distribution. Let X follow an ordinary normal distribution, N(0,\sigma^2). Then, Y=, X, follows a half-normal distribution. Thus, the hal ...
. * The absolute value of normalized residuals, , ''X'' − ''μ'', /''σ'', has
chi distribution In probability theory and statistics, the chi distribution is a continuous probability distribution. It is the distribution of the positive square root of the sum of squares of a set of independent random variables each following a standard norm ...
with one degree of freedom: , X - \mu, / \sigma \sim \chi_1. * The square of ''X''/''σ'' has the
noncentral chi-squared distribution In probability theory and statistics, the noncentral chi-squared distribution (or noncentral chi-square distribution, noncentral \chi^2 distribution) is a noncentral generalization of the chi-squared distribution. It often arises in the power a ...
with one degree of freedom: X^2 / \sigma^2 \sim \chi_1^2(\mu^2 / \sigma^2). If \mu = 0, the distribution is called simply chi-squared. * The log likelihood of a normal variable x is simply the log of its
probability density function In probability theory, a probability density function (PDF), or density of a continuous random variable, is a function whose value at any given sample (or point) in the sample space (the set of possible values taken by the random variable) can ...
: \ln p(x)= -\frac \left(\frac \right)^2 -\ln \left(\sigma \sqrt \right) = -\frac z^2 -\ln \left(\sigma \sqrt \right). Since this is a scaled and shifted square of a standard normal variable, it is distributed as a scaled and shifted chi-squared variable. * The distribution of the variable ''X'' restricted to an interval 'a'', ''b''is called the
truncated normal distribution In probability and statistics, the truncated normal distribution is the probability distribution derived from that of a normally distributed random variable by bounding the random variable from either below or above (or both). The truncated no ...
. * (''X'' − ''μ'')−2 has a
Lévy distribution In probability theory and statistics, the Lévy distribution, named after Paul Lévy, is a continuous probability distribution for a non-negative random variable. In spectroscopy, this distribution, with frequency as the dependent variable, is kn ...
with location 0 and scale ''σ''−2.


= Operations on two independent normal variables

= * If X_1 and X_2 are two
independent Independent or Independents may refer to: Arts, entertainment, and media Artist groups * Independents (artist group), a group of modernist painters based in the New Hope, Pennsylvania, area of the United States during the early 1930s * Independ ...
normal random variables, with means \mu_1, \mu_2 and standard deviations \sigma_1, \sigma_2, then their sum X_1 + X_2 will also be normally distributed, roof/sup> with mean \mu_1 + \mu_2 and variance \sigma_1^2 + \sigma_2^2. * In particular, if X and Y are independent normal deviates with zero mean and variance \sigma^2, then X + Y and X - Y are also independent and normally distributed, with zero mean and variance 2\sigma^2. This is a special case of the
polarization identity In linear algebra, a branch of mathematics, the polarization identity is any one of a family of formulas that express the inner product of two vectors in terms of the norm of a normed vector space. If a norm arises from an inner product then t ...
. * If X_1, X_2 are two independent normal deviates with mean \mu and deviation \sigma, and a, b are arbitrary real numbers, then the variable X_3 = \frac + \mu is also normally distributed with mean \mu and deviation \sigma. It follows that the normal distribution is
stable A stable is a building in which livestock, especially horses, are kept. It most commonly means a building that is divided into separate stalls for individual animals and livestock. There are many different types of stables in use today; the ...
(with exponent \alpha=2).


= Operations on two independent standard normal variables

= If X_1 and X_2 are two independent standard normal random variables with mean 0 and variance 1, then * Their sum and difference is distributed normally with mean zero and variance two: X_1 \pm X_2 \sim N(0, 2). * Their product Z = X_1 X_2 follows the
product distribution A product distribution is a probability distribution constructed as the distribution of the product of random variables having two other known distributions. Given two statistically independent random variables ''X'' and ''Y'', the distribution of ...
with density function f_Z(z) = \pi^ K_0(, z, ) where K_0 is the
modified Bessel function of the second kind Bessel functions, first defined by the mathematician Daniel Bernoulli and then generalized by Friedrich Bessel, are canonical solutions of Bessel's differential equation x^2 \frac + x \frac + \left(x^2 - \alpha^2 \right)y = 0 for an arbitrary ...
. This distribution is symmetric around zero, unbounded at z = 0, and has the
characteristic function In mathematics, the term "characteristic function" can refer to any of several distinct concepts: * The indicator function of a subset, that is the function ::\mathbf_A\colon X \to \, :which for a given subset ''A'' of ''X'', has value 1 at points ...
\phi_Z(t) = (1 + t^2)^. * Their ratio follows the standard
Cauchy distribution The Cauchy distribution, named after Augustin Cauchy, is a continuous probability distribution. It is also known, especially among physicists, as the Lorentz distribution (after Hendrik Lorentz), Cauchy–Lorentz distribution, Lorentz(ian) fun ...
: X_1/ X_2 \sim \operatorname(0, 1). * Their Euclidean norm \sqrt has the
Rayleigh distribution In probability theory and statistics, the Rayleigh distribution is a continuous probability distribution for nonnegative-valued random variables. Up to rescaling, it coincides with the chi distribution with two degrees of freedom. The distribut ...
.


Operations on multiple independent normal variables

* Any linear combination of independent normal deviates is a normal deviate. * If X_1, X_2, \ldots, X_n are independent standard normal random variables, then the sum of their squares has the
chi-squared distribution In probability theory and statistics, the chi-squared distribution (also chi-square or \chi^2-distribution) with k degrees of freedom is the distribution of a sum of the squares of k independent standard normal random variables. The chi-squa ...
with n degrees of freedom X_1^2 + \cdots + X_n^2 \sim \chi_n^2. * If X_1, X_2, \ldots, X_n are independent normally distributed random variables with means \mu and variances \sigma^2, then their
sample mean The sample mean (or "empirical mean") and the sample covariance are statistics computed from a Sample (statistics), sample of data on one or more random variables. The sample mean is the average value (or mean, mean value) of a sample (statistic ...
is independent from the sample
standard deviation In statistics, the standard deviation is a measure of the amount of variation or dispersion of a set of values. A low standard deviation indicates that the values tend to be close to the mean (also called the expected value) of the set, while ...
, which can be demonstrated using Basu's theorem or
Cochran's theorem In statistics, Cochran's theorem, devised by William G. Cochran, is a theorem used to justify results relating to the probability distributions of statistics that are used in the analysis of variance. Statement Let ''U''1, ..., ''U'N'' be i.i. ...
. The ratio of these two quantities will have the
Student's t-distribution In probability and statistics, Student's ''t''-distribution (or simply the ''t''-distribution) is any member of a family of continuous probability distributions that arise when estimating the mean of a normally distributed population in sit ...
with n-1 degrees of freedom: t = \frac = \frac \sim t_. * If X_1, X_2, \ldots, X_n, Y_1, Y_2, \ldots, Y_m are independent standard normal random variables, then the ratio of their normalized sums of squares will have the with degrees of freedom: F = \frac \sim F_.


Operations on multiple correlated normal variables

* A
quadratic form In mathematics, a quadratic form is a polynomial with terms all of degree two ("form" is another name for a homogeneous polynomial). For example, :4x^2 + 2xy - 3y^2 is a quadratic form in the variables and . The coefficients usually belong to a ...
of a normal vector, i.e. a quadratic function q = \sum x_i^2 + \sum x_j + c of multiple independent or correlated normal variables, is a generalized chi-square variable.


Operations on the density function

The split normal distribution is most directly defined in terms of joining scaled sections of the density functions of different normal distributions and rescaling the density to integrate to one. The
truncated normal distribution In probability and statistics, the truncated normal distribution is the probability distribution derived from that of a normally distributed random variable by bounding the random variable from either below or above (or both). The truncated no ...
results from rescaling a section of a single density function.


Infinite divisibility and Cramér's theorem

For any positive integer \text, any normal distribution with mean \mu and variance \sigma^2 is the distribution of the sum of \text independent normal deviates, each with mean \frac and variance \frac. This property is called
infinite divisibility Infinite divisibility arises in different ways in philosophy, physics, economics, order theory (a branch of mathematics), and probability theory (also a branch of mathematics). One may speak of infinite divisibility, or the lack thereof, of matter ...
. Conversely, if X_1 and X_2 are independent random variables and their sum X_1+X_2 has a normal distribution, then both X_1 and X_2 must be normal deviates. This result is known as Cramér's decomposition theorem, and is equivalent to saying that the convolution of two distributions is normal if and only if both are normal. Cramér's theorem implies that a linear combination of independent non-Gaussian variables will never have an exactly normal distribution, although it may approach it arbitrarily closely.


Bernstein's theorem

Bernstein's theorem states that if X and Y are independent and X + Y and X - Y are also independent, then both ''X'' and ''Y'' must necessarily have normal distributions. More generally, if X_1, \ldots, X_n are independent random variables, then two distinct linear combinations \sum and \sumwill be independent if and only if all X_k are normal and \sum, where \sigma_k^2 denotes the variance of X_k.


Extensions

The notion of normal distribution, being one of the most important distributions in probability theory, has been extended far beyond the standard framework of the univariate (that is one-dimensional) case (Case 1). All these extensions are also called ''normal'' or ''Gaussian'' laws, so a certain ambiguity in names exists. * The
multivariate normal distribution In probability theory and statistics, the multivariate normal distribution, multivariate Gaussian distribution, or joint normal distribution is a generalization of the one-dimensional (univariate) normal distribution to higher dimensions. One d ...
describes the Gaussian law in the ''k''-dimensional Euclidean space. A vector is multivariate-normally distributed if any linear combination of its components has a (univariate) normal distribution. The variance of ''X'' is a ''k×k'' symmetric positive-definite matrix ''V''. The multivariate normal distribution is a special case of the
elliptical distribution In probability and statistics, an elliptical distribution is any member of a broad family of probability distributions that generalize the multivariate normal distribution. Intuitively, in the simplified two and three dimensional case, the joint di ...
s. As such, its iso-density loci in the ''k'' = 2 case are ellipses and in the case of arbitrary ''k'' are ellipsoids. * Rectified Gaussian distribution a rectified version of normal distribution with all the negative elements reset to 0 * Complex normal distribution deals with the complex normal vectors. A complex vector is said to be normal if both its real and imaginary components jointly possess a 2''k''-dimensional multivariate normal distribution. The variance-covariance structure of ''X'' is described by two matrices: the ''variance'' matrix Γ, and the ''relation'' matrix ''C''. * Matrix normal distribution describes the case of normally distributed matrices. * Gaussian processes are the normally distributed stochastic processes. These can be viewed as elements of some infinite-dimensional Hilbert space ''H'', and thus are the analogues of multivariate normal vectors for the case . A random element is said to be normal if for any constant the scalar product has a (univariate) normal distribution. The variance structure of such Gaussian random element can be described in terms of the linear ''covariance ''. Several Gaussian processes became popular enough to have their own names: ** Wiener process, Brownian motion, ** Brownian bridge, ** Ornstein–Uhlenbeck process. * Gaussian q-distribution is an abstract mathematical construction that represents a "q-analogue" of the normal distribution. * the q-Gaussian is an analogue of the Gaussian distribution, in the sense that it maximises the Tsallis entropy, and is one type of Tsallis distribution. Note that this distribution is different from the Gaussian q-distribution above. * The Kaniadakis Gaussian distribution, Kaniadakis ''κ''-Gaussian distribution is a generalization of the Gaussian distribution which arises from the Kaniadakis statistics, being one of the Kaniadakis distribution, Kaniadakis distributions. A random variable ''X'' has a two-piece normal distribution if it has a distribution : f_X( x ) = N( \mu, \sigma_1^2 ) \text x \le \mu : f_X( x ) = N( \mu, \sigma_2^2 ) \text x \ge \mu where ''μ'' is the mean and ''σ''1 and ''σ''2 are the standard deviations of the distribution to the left and right of the mean respectively. The mean, variance and third central moment of this distribution have been determined : \operatorname( X ) = \mu + \sqrt ( \sigma_2 - \sigma_1 ) : \operatorname( X ) = \left( 1 - \frac 2 \pi\right)( \sigma_2 - \sigma_1 )^2 + \sigma_1 \sigma_2 : \operatorname( X ) = \sqrt( \sigma_2 - \sigma_1 ) \left[ \left( \frac 4 \pi - 1 \right) ( \sigma_2 - \sigma_1)^2 + \sigma_1 \sigma_2 \right] where E(''X''), V(''X'') and T(''X'') are the mean, variance, and third central moment respectively. One of the main practical uses of the Gaussian law is to model the empirical distributions of many different random variables encountered in practice. In such case a possible extension would be a richer family of distributions, having more than two parameters and therefore being able to fit the empirical distribution more accurately. The examples of such extensions are: * Pearson distribution — a four-parameter family of probability distributions that extend the normal law to include different skewness and kurtosis values. * The generalized normal distribution, also known as the exponential power distribution, allows for distribution tails with thicker or thinner asymptotic behaviors.


Statistical inference


Estimation of parameters

It is often the case that we do not know the parameters of the normal distribution, but instead want to Estimation theory, estimate them. That is, having a sample (x_1, \ldots, x_n) from a normal N(\mu, \sigma^2) population we would like to learn the approximate values of parameters \mu and \sigma^2. The standard approach to this problem is the maximum likelihood method, which requires maximization of the ''log-likelihood function'': : \ln\mathcal(\mu,\sigma^2) = \sum_^n \ln f(x_i\mid\mu,\sigma^2) = -\frac\ln(2\pi) - \frac\ln\sigma^2 - \frac\sum_^n (x_i-\mu)^2. Taking derivatives with respect to \mu and \sigma^2 and solving the resulting system of first order conditions yields the ''maximum likelihood estimates'': : \hat = \overline \equiv \frac\sum_^n x_i, \qquad \hat^2 = \frac \sum_^n (x_i - \overline)^2.


Sample mean

Estimator \textstyle\hat\mu is called the ''
sample mean The sample mean (or "empirical mean") and the sample covariance are statistics computed from a Sample (statistics), sample of data on one or more random variables. The sample mean is the average value (or mean, mean value) of a sample (statistic ...
'', since it is the arithmetic mean of all observations. The statistic \textstyle\overline is complete statistic, complete and sufficient statistic, sufficient for \mu, and therefore by the Lehmann–Scheffé theorem, \textstyle\hat\mu is the uniformly minimum variance unbiased (UMVU) estimator. In finite samples it is distributed normally: : \hat\mu \sim \mathcal(\mu,\sigma^2/n). The variance of this estimator is equal to the ''μμ''-element of the inverse Fisher information matrix \textstyle\mathcal^. This implies that the estimator is efficient estimator, finite-sample efficient. Of practical importance is the fact that the standard error (statistics), standard error of \textstyle\hat\mu is proportional to \textstyle1/\sqrt, that is, if one wishes to decrease the standard error by a factor of 10, one must increase the number of points in the sample by a factor of 100. This fact is widely used in determining sample sizes for opinion polls and the number of trials in Monte Carlo simulations. From the standpoint of the asymptotic theory (statistics), asymptotic theory, \textstyle\hat\mu is consistent estimator, consistent, that is, it convergence in probability, converges in probability to \mu as n\rightarrow\infty. The estimator is also asymptotic normality, asymptotically normal, which is a simple corollary of the fact that it is normal in finite samples: : \sqrt(\hat\mu-\mu) \,\xrightarrow\, \mathcal(0,\sigma^2).


Sample variance

The estimator \textstyle\hat\sigma^2 is called the ''sample variance'', since it is the variance of the sample ((x_1, \ldots, x_n)). In practice, another estimator is often used instead of the \textstyle\hat\sigma^2. This other estimator is denoted s^2, and is also called the ''sample variance'', which represents a certain ambiguity in terminology; its square root s is called the ''sample standard deviation''. The estimator s^2 differs from \textstyle\hat\sigma^2 by having instead of ''n'' in the denominator (the so-called Bessel's correction): : s^2 = \frac \hat\sigma^2 = \frac \sum_^n (x_i - \overline)^2. The difference between s^2 and \textstyle\hat\sigma^2 becomes negligibly small for large ''n''s. In finite samples however, the motivation behind the use of s^2 is that it is an unbiased estimator of the underlying parameter \sigma^2, whereas \textstyle\hat\sigma^2 is biased. Also, by the Lehmann–Scheffé theorem the estimator s^2 is uniformly minimum variance unbiased (Minimum-variance unbiased estimator, UMVU), which makes it the "best" estimator among all unbiased ones. However it can be shown that the biased estimator \textstyle\hat\sigma^2 is "better" than the s^2 in terms of the mean squared error (MSE) criterion. In finite samples both s^2 and \textstyle\hat\sigma^2 have scaled
chi-squared distribution In probability theory and statistics, the chi-squared distribution (also chi-square or \chi^2-distribution) with k degrees of freedom is the distribution of a sum of the squares of k independent standard normal random variables. The chi-squa ...
with degrees of freedom: : s^2 \sim \frac \cdot \chi^2_, \qquad \hat\sigma^2 \sim \frac \cdot \chi^2_. The first of these expressions shows that the variance of s^2 is equal to 2\sigma^4/(n-1), which is slightly greater than the ''σσ''-element of the inverse Fisher information matrix \textstyle\mathcal^. Thus, s^2 is not an efficient estimator for \sigma^2, and moreover, since s^2 is UMVU, we can conclude that the finite-sample efficient estimator for \sigma^2 does not exist. Applying the asymptotic theory, both estimators s^2 and \textstyle\hat\sigma^2 are consistent, that is they converge in probability to \sigma^2 as the sample size n\rightarrow\infty. The two estimators are also both asymptotically normal: : \sqrt(\hat\sigma^2 - \sigma^2) \simeq \sqrt(s^2-\sigma^2) \,\xrightarrow\, \mathcal(0,2\sigma^4). In particular, both estimators are asymptotically efficient for \sigma^2.


Confidence intervals

By
Cochran's theorem In statistics, Cochran's theorem, devised by William G. Cochran, is a theorem used to justify results relating to the probability distributions of statistics that are used in the analysis of variance. Statement Let ''U''1, ..., ''U'N'' be i.i. ...
, for normal distributions the sample mean \textstyle\hat\mu and the sample variance ''s''2 are
independent Independent or Independents may refer to: Arts, entertainment, and media Artist groups * Independents (artist group), a group of modernist painters based in the New Hope, Pennsylvania, area of the United States during the early 1930s * Independ ...
, which means there can be no gain in considering their joint distribution. There is also a converse theorem: if in a sample the sample mean and sample variance are independent, then the sample must have come from the normal distribution. The independence between \textstyle\hat\mu and ''s'' can be employed to construct the so-called ''t-statistic'': : t = \frac = \frac \sim t_ This quantity ''t'' has the
Student's t-distribution In probability and statistics, Student's ''t''-distribution (or simply the ''t''-distribution) is any member of a family of continuous probability distributions that arise when estimating the mean of a normally distributed population in sit ...
with degrees of freedom, and it is an ancillary statistic (independent of the value of the parameters). Inverting the distribution of this ''t''-statistics will allow us to construct the
confidence interval In frequentist statistics, a confidence interval (CI) is a range of estimates for an unknown parameter. A confidence interval is computed at a designated ''confidence level''; the 95% confidence level is most common, but other levels, such as 9 ...
for ''μ''; similarly, inverting the ''χ''2 distribution of the statistic ''s''2 will give us the confidence interval for ''σ''2: :\mu \in \left[ \hat\mu - t_ \fracs, \hat\mu + t_ \fracs \right], :\sigma^2 \in \left[ \frac, \frac \right], where ''tk,p'' and are the ''p''th
quantile In statistics and probability, quantiles are cut points dividing the range of a probability distribution into continuous intervals with equal probabilities, or dividing the observations in a sample in the same way. There is one fewer quantile tha ...
s of the ''t''- and ''χ''2-distributions respectively. These confidence intervals are of the ''confidence level'' , meaning that the true values ''μ'' and ''σ''2 fall outside of these intervals with probability (or significance level) ''α''. In practice people usually take , resulting in the 95% confidence intervals. Approximate formulas can be derived from the asymptotic distributions of \textstyle\hat\mu and ''s''2: :\mu \in \left[ \hat\mu - , z_, \fracs, \hat\mu + , z_, \fracs \right], :\sigma^2 \in \left[ s^2 - , z_, \fracs^2, s^2 + , z_, \fracs^2 \right], The approximate formulas become valid for large values of ''n'', and are more convenient for the manual calculation since the standard normal quantiles ''z''''α''/2 do not depend on ''n''. In particular, the most popular value of , results in .


Normality tests

Normality tests assess the likelihood that the given data set comes from a normal distribution. Typically the null hypothesis ''H''0 is that the observations are distributed normally with unspecified mean ''μ'' and variance ''σ''2, versus the alternative ''Ha'' that the distribution is arbitrary. Many tests (over 40) have been devised for this problem. The more prominent of them are outlined below: Diagnostic plots are more intuitively appealing but subjective at the same time, as they rely on informal human judgement to accept or reject the null hypothesis. *
Q–Q plot In statistics, a Q–Q plot (quantile-quantile plot) is a probability plot, a List of graphical methods, graphical method for comparing two probability distributions by plotting their ''quantiles'' against each other. A point on the plot co ...
, also known as normal probability plot or rankit plot—is a plot of the sorted values from the data set against the expected values of the corresponding quantiles from the standard normal distribution. That is, it's a plot of point of the form (Φ−1(''pk''), ''x''(''k'')), where plotting points ''pk'' are equal to ''pk'' = (''k'' − ''α'')/(''n'' + 1 − 2''α'') and ''α'' is an adjustment constant, which can be anything between 0 and 1. If the null hypothesis is true, the plotted points should approximately lie on a straight line. * P–P plot – similar to the Q–Q plot, but used much less frequently. This method consists of plotting the points (Φ(''z''(''k'')), ''pk''), where \textstyle z_ = (x_-\hat\mu)/\hat\sigma. For normally distributed data this plot should lie on a 45° line between (0, 0) and (1, 1). Goodness-of-fit tests: ''Moment-based tests'': * D'Agostino's K-squared test * Jarque–Bera test * Shapiro–Wilk test: This is based on the fact that the line in the Q–Q plot has the slope of ''σ''. The test compares the least squares estimate of that slope with the value of the sample variance, and rejects the null hypothesis if these two quantities differ significantly. ''Tests based on the empirical distribution function'': * Anderson–Darling test * Lilliefors test (an adaptation of the Kolmogorov–Smirnov test)


Bayesian analysis of the normal distribution

Bayesian analysis of normally distributed data is complicated by the many different possibilities that may be considered: * Either the mean, or the variance, or neither, may be considered a fixed quantity. * When the variance is unknown, analysis may be done directly in terms of the variance, or in terms of the
precision Precision, precise or precisely may refer to: Science, and technology, and mathematics Mathematics and computing (general) * Accuracy and precision, measurement deviation from true value and its scatter * Significant figures, the number of digit ...
, the reciprocal of the variance. The reason for expressing the formulas in terms of precision is that the analysis of most cases is simplified. * Both univariate and multivariate normal distribution, multivariate cases need to be considered. * Either conjugate prior, conjugate or improper prior, improper prior distributions may be placed on the unknown variables. * An additional set of cases occurs in Bayesian linear regression, where in the basic model the data is assumed to be normally distributed, and normal priors are placed on the regression coefficients. The resulting analysis is similar to the basic cases of independent identically distributed data. The formulas for the non-linear-regression cases are summarized in the conjugate prior article.


Sum of two quadratics


= Scalar form

= The following auxiliary formula is useful for simplifying the posterior distribution, posterior update equations, which otherwise become fairly tedious. :a(x-y)^2 + b(x-z)^2 = (a + b)\left(x - \frac\right)^2 + \frac(y-z)^2 This equation rewrites the sum of two quadratics in ''x'' by expanding the squares, grouping the terms in ''x'', and completing the square. Note the following about the complex constant factors attached to some of the terms: # The factor \frac has the form of a weighted average of ''y'' and ''z''. # \frac = \frac = (a^ + b^)^. This shows that this factor can be thought of as resulting from a situation where the Multiplicative inverse, reciprocals of quantities ''a'' and ''b'' add directly, so to combine ''a'' and ''b'' themselves, it's necessary to reciprocate, add, and reciprocate the result again to get back into the original units. This is exactly the sort of operation performed by the harmonic mean, so it is not surprising that \frac is one-half the harmonic mean of ''a'' and ''b''.


= Vector form

= A similar formula can be written for the sum of two vector quadratics: If x, y, z are vectors of length ''k'', and A and B are symmetric matrix, symmetric, invertible matrices of size k\times k, then : \begin & (\mathbf-\mathbf)'\mathbf(\mathbf-\mathbf) + (\mathbf-\mathbf)' \mathbf(\mathbf-\mathbf) \\ = & (\mathbf - \mathbf)'(\mathbf+\mathbf)(\mathbf - \mathbf) + (\mathbf - \mathbf)'(\mathbf^ + \mathbf^)^(\mathbf - \mathbf) \end where :\mathbf = (\mathbf + \mathbf)^(\mathbf\mathbf + \mathbf \mathbf) Note that the form x′ A x is called a
quadratic form In mathematics, a quadratic form is a polynomial with terms all of degree two ("form" is another name for a homogeneous polynomial). For example, :4x^2 + 2xy - 3y^2 is a quadratic form in the variables and . The coefficients usually belong to a ...
and is a scalar (mathematics), scalar: :\mathbf'\mathbf\mathbf = \sum_a_ x_i x_j In other words, it sums up all possible combinations of products of pairs of elements from x, with a separate coefficient for each. In addition, since x_i x_j = x_j x_i, only the sum a_ + a_ matters for any off-diagonal elements of A, and there is no loss of generality in assuming that A is symmetric matrix, symmetric. Furthermore, if A is symmetric, then the form \mathbf'\mathbf\mathbf = \mathbf'\mathbf\mathbf.


Sum of differences from the mean

Another useful formula is as follows: \sum_^n (x_i-\mu)^2 = \sum_^n (x_i-\bar)^2 + n(\bar -\mu)^2 where \bar = \frac \sum_^n x_i.


With known variance

For a set of i.i.d. normally distributed data points X of size ''n'' where each individual point ''x'' follows x \sim \mathcal(\mu, \sigma^2) with known
variance In probability theory and statistics, variance is the expectation of the squared deviation of a random variable from its population mean or sample mean. Variance is a measure of dispersion, meaning it is a measure of how far a set of numbers ...
σ2, the conjugate prior distribution is also normally distributed. This can be shown more easily by rewriting the variance as the
precision Precision, precise or precisely may refer to: Science, and technology, and mathematics Mathematics and computing (general) * Accuracy and precision, measurement deviation from true value and its scatter * Significant figures, the number of digit ...
, i.e. using τ = 1/σ2. Then if x \sim \mathcal(\mu, 1/\tau) and \mu \sim \mathcal(\mu_0, 1/\tau_0), we proceed as follows. First, the likelihood function is (using the formula above for the sum of differences from the mean): :\begin p(\mathbf\mid\mu,\tau) &= \prod_^n \sqrt \exp\left(-\frac\tau(x_i-\mu)^2\right) \\ &= \left(\frac\right)^ \exp\left(-\frac\tau \sum_^n (x_i-\mu)^2\right) \\ &= \left(\frac\right)^ \exp\left[-\frac\tau \left(\sum_^n(x_i-\bar)^2 + n(\bar -\mu)^2\right)\right]. \end Then, we proceed as follows: :\begin p(\mu\mid\mathbf) &\propto p(\mathbf\mid\mu) p(\mu) \\ & = \left(\frac\right)^ \exp\left[-\frac\tau \left(\sum_^n(x_i-\bar)^2 + n(\bar -\mu)^2\right)\right] \sqrt \exp\left(-\frac\tau_0(\mu-\mu_0)^2\right) \\ &\propto \exp\left(-\frac\left(\tau\left(\sum_^n(x_i-\bar)^2 + n(\bar -\mu)^2\right) + \tau_0(\mu-\mu_0)^2\right)\right) \\ &\propto \exp\left(-\frac \left(n\tau(\bar-\mu)^2 + \tau_0(\mu-\mu_0)^2 \right)\right) \\ &= \exp\left(-\frac(n\tau + \tau_0)\left(\mu - \dfrac\right)^2 + \frac(\bar - \mu_0)^2\right) \\ &\propto \exp\left(-\frac(n\tau + \tau_0)\left(\mu - \dfrac\right)^2\right) \end In the above derivation, we used the formula above for the sum of two quadratics and eliminated all constant factors not involving ''μ''. The result is the kernel (statistics), kernel of a normal distribution, with mean \frac and precision n\tau + \tau_0, i.e. :p(\mu\mid\mathbf) \sim \mathcal\left(\frac, \frac\right) This can be written as a set of Bayesian update equations for the posterior parameters in terms of the prior parameters: :\begin \tau_0' &= \tau_0 + n\tau \\[5pt] \mu_0' &= \frac \\[5pt] \bar &= \frac\sum_^n x_i \end That is, to combine ''n'' data points with total precision of ''nτ'' (or equivalently, total variance of ''n''/''σ''2) and mean of values \bar, derive a new total precision simply by adding the total precision of the data to the prior total precision, and form a new mean through a ''precision-weighted average'', i.e. a weighted average of the data mean and the prior mean, each weighted by the associated total precision. This makes logical sense if the precision is thought of as indicating the certainty of the observations: In the distribution of the posterior mean, each of the input components is weighted by its certainty, and the certainty of this distribution is the sum of the individual certainties. (For the intuition of this, compare the expression "the whole is (or is not) greater than the sum of its parts". In addition, consider that the knowledge of the posterior comes from a combination of the knowledge of the prior and likelihood, so it makes sense that we are more certain of it than of either of its components.) The above formula reveals why it is more convenient to do Bayesian analysis of conjugate priors for the normal distribution in terms of the precision. The posterior precision is simply the sum of the prior and likelihood precisions, and the posterior mean is computed through a precision-weighted average, as described above. The same formulas can be written in terms of variance by reciprocating all the precisions, yielding the more ugly formulas :\begin ' &= \frac \\[5pt] \mu_0' &= \frac \\[5pt] \bar &= \frac\sum_^n x_i \end


With known mean

For a set of i.i.d. normally distributed data points X of size ''n'' where each individual point ''x'' follows x \sim \mathcal(\mu, \sigma^2) with known mean μ, the conjugate prior of the
variance In probability theory and statistics, variance is the expectation of the squared deviation of a random variable from its population mean or sample mean. Variance is a measure of dispersion, meaning it is a measure of how far a set of numbers ...
has an inverse gamma distribution or a scaled inverse chi-squared distribution. The two are equivalent 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. The prior for σ2 is as follows: :p(\sigma^2\mid\nu_0,\sigma_0^2) = \frac~\frac \propto \frac The likelihood function from above, written in terms of the variance, is: :\begin p(\mathbf\mid\mu,\sigma^2) &= \left(\frac\right)^ \exp\left[-\frac \sum_^n (x_i-\mu)^2\right] \\ &= \left(\frac\right)^ \exp\left[-\frac\right] \end where :S = \sum_^n (x_i-\mu)^2. Then: :\begin p(\sigma^2\mid\mathbf) &\propto p(\mathbf\mid\sigma^2) p(\sigma^2) \\ &= \left(\frac\right)^ \exp\left[-\frac\right] \frac~\frac \\ &\propto \left(\frac\right)^ \frac \exp\left[-\frac + \frac\right] \\ &= \frac \exp\left[-\frac\right] \end The above is also a scaled inverse chi-squared distribution where :\begin \nu_0' &= \nu_0 + n \\ \nu_0'' &= \nu_0 \sigma_0^2 + \sum_^n (x_i-\mu)^2 \end or equivalently :\begin \nu_0' &= \nu_0 + n \\ ' &= \frac \end Reparameterizing in terms of an inverse gamma distribution, the result is: :\begin \alpha' &= \alpha + \frac \\ \beta' &= \beta + \frac \end


With unknown mean and unknown variance

For a set of i.i.d. normally distributed data points X of size ''n'' where each individual point ''x'' follows x \sim \mathcal(\mu, \sigma^2) with unknown mean μ and unknown
variance In probability theory and statistics, variance is the expectation of the squared deviation of a random variable from its population mean or sample mean. Variance is a measure of dispersion, meaning it is a measure of how far a set of numbers ...
σ2, a combined (multivariate) conjugate prior is placed over the mean and variance, consisting of a normal-inverse-gamma distribution. Logically, this originates as follows: # From the analysis of the case with unknown mean but known variance, we see that the update equations involve sufficient statistics computed from the data consisting of the mean of the data points and the total variance of the data points, computed in turn from the known variance divided by the number of data points. # From the analysis of the case with unknown variance but known mean, we see that the update equations involve sufficient statistics over the data consisting of the number of data points and sum of squared deviations. # Keep in mind that the posterior update values serve as the prior distribution when further data is handled. Thus, we should logically think of our priors in terms of the sufficient statistics just described, with the same semantics kept in mind as much as possible. # To handle the case where both mean and variance are unknown, we could place independent priors over the mean and variance, with fixed estimates of the average mean, total variance, number of data points used to compute the variance prior, and sum of squared deviations. Note however that in reality, the total variance of the mean depends on the unknown variance, and the sum of squared deviations that goes into the variance prior (appears to) depend on the unknown mean. In practice, the latter dependence is relatively unimportant: Shifting the actual mean shifts the generated points by an equal amount, and on average the squared deviations will remain the same. This is not the case, however, with the total variance of the mean: As the unknown variance increases, the total variance of the mean will increase proportionately, and we would like to capture this dependence. # This suggests that we create a ''conditional prior'' of the mean on the unknown variance, with a hyperparameter specifying the mean of the pseudo-observations associated with the prior, and another parameter specifying the number of pseudo-observations. This number serves as a scaling parameter on the variance, making it possible to control the overall variance of the mean relative to the actual variance parameter. The prior for the variance also has two hyperparameters, one specifying the sum of squared deviations of the pseudo-observations associated with the prior, and another specifying once again the number of pseudo-observations. Note that each of the priors has a hyperparameter specifying the number of pseudo-observations, and in each case this controls the relative variance of that prior. These are given as two separate hyperparameters so that the variance (aka the confidence) of the two priors can be controlled separately. # This leads immediately to the normal-inverse-gamma distribution, which is the product of the two distributions just defined, with conjugate priors used (an inverse gamma distribution over the variance, and a normal distribution over the mean, ''conditional'' on the variance) and with the same four parameters just defined. The priors are normally defined as follows: :\begin p(\mu\mid\sigma^2; \mu_0, n_0) &\sim \mathcal(\mu_0,\sigma^2/n_0) \\ p(\sigma^2; \nu_0,\sigma_0^2) &\sim I\chi^2(\nu_0,\sigma_0^2) = IG(\nu_0/2, \nu_0\sigma_0^2/2) \end The update equations can be derived, and look as follows: :\begin \bar &= \frac 1 n \sum_^n x_i \\ \mu_0' &= \frac \\ n_0' &= n_0 + n \\ \nu_0' &= \nu_0 + n \\ \nu_0'' &= \nu_0 \sigma_0^2 + \sum_^n (x_i-\bar)^2 + \frac(\mu_0 - \bar)^2 \end The respective numbers of pseudo-observations add the number of actual observations to them. The new mean hyperparameter is once again a weighted average, this time weighted by the relative numbers of observations. Finally, the update for \nu_0'' is similar to the case with known mean, but in this case the sum of squared deviations is taken with respect to the observed data mean rather than the true mean, and as a result a new "interaction term" needs to be added to take care of the additional error source stemming from the deviation between prior and data mean.


Occurrence and applications

The occurrence of normal distribution in practical problems can be loosely classified into four categories: # Exactly normal distributions; # Approximately normal laws, for example when such approximation is justified by the
central limit theorem In probability theory, the central limit theorem (CLT) establishes that, in many situations, when independent random variables are summed up, their properly normalized sum tends toward a normal distribution even if the original variables themselv ...
; and # Distributions modeled as normal – the normal distribution being the distribution with Principle of maximum entropy, maximum entropy for a given mean and variance. # Regression problems – the normal distribution being found after systematic effects have been modeled sufficiently well.


Exact normality

Certain quantities in physics are distributed normally, as was first demonstrated by James Clerk Maxwell. Examples of such quantities are: * Probability density function of a ground state in a quantum harmonic oscillator. * The position of a particle that experiences diffusion. If initially the particle is located at a specific point (that is its probability distribution is the Dirac delta function), then after time ''t'' its location is described by a normal distribution with variance ''t'', which satisfies the diffusion equation \frac f(x,t) = \frac \frac f(x,t). If the initial location is given by a certain density function g(x), then the density at time ''t'' is the convolution of ''g'' and the normal PDF.


Approximate normality

''Approximately'' normal distributions occur in many situations, as explained by the
central limit theorem In probability theory, the central limit theorem (CLT) establishes that, in many situations, when independent random variables are summed up, their properly normalized sum tends toward a normal distribution even if the original variables themselv ...
. When the outcome is produced by many small effects acting ''additively and independently'', its distribution will be close to normal. The normal approximation will not be valid if the effects act multiplicatively (instead of additively), or if there is a single external influence that has a considerably larger magnitude than the rest of the effects. * In counting problems, where the central limit theorem includes a discrete-to-continuum approximation and where Infinite divisibility, infinitely divisible and Indecomposable distribution, decomposable distributions are involved, such as ** binomial distribution, Binomial random variables, associated with binary response variables; ** Poisson distribution, Poisson random variables, associated with rare events; * Thermal radiation has a Bose–Einstein statistics, Bose–Einstein distribution on very short time scales, and a normal distribution on longer timescales due to the central limit theorem.


Assumed normality

There are statistical methods to empirically test that assumption; see the above #Normality tests, Normality tests section. * In biology, the ''logarithm'' of various variables tend to have a normal distribution, that is, they tend to have a
log-normal distribution In probability theory, a log-normal (or lognormal) distribution is a continuous probability distribution of a random variable whose logarithm is normally distributed. Thus, if the random variable is log-normally distributed, then has a normal ...
(after separation on male/female subpopulations), with examples including: ** Measures of size of living tissue (length, height, skin area, weight); ** The ''length'' of ''inert'' appendages (hair, claws, nails, teeth) of biological specimens, ''in the direction of growth''; presumably the thickness of tree bark also falls under this category; ** Certain physiological measurements, such as blood pressure of adult humans. * In finance, in particular the Black–Scholes model, changes in the ''logarithm'' of exchange rates, price indices, and stock market indices are assumed normal (these variables behave like compound interest, not like simple interest, and so are multiplicative). Some mathematicians such as Benoit Mandelbrot have argued that Levy skew alpha-stable distribution, log-Levy distributions, which possesses heavy tails would be a more appropriate model, in particular for the analysis for stock market crashes. The use of the assumption of normal distribution occurring in financial models has also been criticized by Nassim Nicholas Taleb in his works. * Propagation of uncertainty, Measurement errors in physical experiments are often modeled by a normal distribution. This use of a normal distribution does not imply that one is assuming the measurement errors are normally distributed, rather using the normal distribution produces the most conservative predictions possible given only knowledge about the mean and variance of the errors. * In Standardized testing (statistics), standardized testing, results can be made to have a normal distribution by either selecting the number and difficulty of questions (as in the Intelligence quotient, IQ test) or transforming the raw test scores into "output" scores by fitting them to the normal distribution. For example, the SAT's traditional range of 200–800 is based on a normal distribution with a mean of 500 and a standard deviation of 100. * Many scores are derived from the normal distribution, including percentile ranks ("percentiles" or "quantiles"), normal curve equivalents, stanines, Standard score, z-scores, and T-scores. Additionally, some behavioral statistical procedures assume that scores are normally distributed; for example, Student's t-test, t-tests and Analysis of variance, ANOVAs. Bell curve grading assigns relative grades based on a normal distribution of scores. * In hydrology the distribution of long duration river discharge or rainfall, e.g. monthly and yearly totals, is often thought to be practically normal according to the
central limit theorem In probability theory, the central limit theorem (CLT) establishes that, in many situations, when independent random variables are summed up, their properly normalized sum tends toward a normal distribution even if the original variables themselv ...
. The blue picture, made with CumFreq, illustrates an example of fitting the normal distribution to ranked October rainfalls showing the 90% confidence belt based on the
binomial distribution In probability theory and statistics, the binomial distribution with parameters ''n'' and ''p'' is the discrete probability distribution of the number of successes in a sequence of ''n'' independent experiments, each asking a yes–no quest ...
. The rainfall data are represented by plotting positions as part of the cumulative frequency analysis.


Methodological problems and peer review

John Ioannidis argues that using normally distributed standard deviations as standards for validating research findings leave falsifiability, falsifiable predictions about phenomena that are not normally distributed untested. This includes, for example, phenomena that only appear when all necessary conditions are present and one cannot be a substitute for another in an addition-like way and phenomena that are not randomly distributed. Ioannidis argues that standard deviation-centered validation gives a false appearance of validity to hypotheses and theories where some but not all falsifiable predictions are normally distributed since the portion of falsifiable predictions that there is evidence against may and in some cases are in the non-normally distributed parts of the range of falsifiable predictions, as well as baselessly dismissing hypotheses for which none of the falsifiable predictions are normally distributed as if were they unfalsifiable when in fact they do make falsifiable predictions. It is argued by Ioannidis that many cases of mutually exclusive theories being accepted as "validated" by research journals are caused by failure of the journals to take in empirical falsifications of non-normally distributed predictions, and not because mutually exclusive theories are true, which they cannot be, although two mutually exclusive theories can both be wrong and a third one correct.


Computational methods


Generating values from normal distribution

In computer simulations, especially in applications of the Monte-Carlo method, it is often desirable to generate values that are normally distributed. The algorithms listed below all generate the standard normal deviates, since a can be generated as , where ''Z'' is standard normal. All these algorithms rely on the availability of a random number generator ''U'' capable of producing Uniform distribution (continuous), uniform random variates. * The most straightforward method is based on the probability integral transform property: if ''U'' is distributed uniformly on (0,1), then Φ−1(''U'') will have the standard normal distribution. The drawback of this method is that it relies on calculation of the
probit function In probability theory and statistics, the probit function is the quantile function associated with the standard normal distribution. It has applications in data analysis and machine learning, in particular exploratory statistical graphics and ...
Φ−1, which cannot be done analytically. Some approximate methods are described in and in the error function, erf article. Wichura gives a fast algorithm for computing this function to 16 decimal places, which is used by R programming language, R to compute random variates of the normal distribution. * Irwin–Hall distribution#Approximating a Normal distribution, An easy-to-program approximate approach that relies on the
central limit theorem In probability theory, the central limit theorem (CLT) establishes that, in many situations, when independent random variables are summed up, their properly normalized sum tends toward a normal distribution even if the original variables themselv ...
is as follows: generate 12 uniform ''U''(0,1) deviates, add them all up, and subtract 6 – the resulting random variable will have approximately standard normal distribution. In truth, the distribution will be Irwin–Hall distribution, Irwin–Hall, which is a 12-section eleventh-order polynomial approximation to the normal distribution. This random deviate will have a limited range of (−6, 6). Note that in a true normal distribution, only 0.00034% of all samples will fall outside ±6σ. * The Box–Muller transform, Box–Muller method uses two independent random numbers ''U'' and ''V'' distributed uniform distribution (continuous), uniformly on (0,1). Then the two random variables ''X'' and ''Y'' X = \sqrt \, \cos(2 \pi V) , \qquad Y = \sqrt \, \sin(2 \pi V) . will both have the standard normal distribution, and will be
independent Independent or Independents may refer to: Arts, entertainment, and media Artist groups * Independents (artist group), a group of modernist painters based in the New Hope, Pennsylvania, area of the United States during the early 1930s * Independ ...
. This formulation arises because for a bivariate normal random vector (''X'', ''Y'') the squared norm will have the
chi-squared distribution In probability theory and statistics, the chi-squared distribution (also chi-square or \chi^2-distribution) with k degrees of freedom is the distribution of a sum of the squares of k independent standard normal random variables. The chi-squa ...
with two degrees of freedom, which is an easily generated exponential distribution, exponential random variable corresponding to the quantity −2ln(''U'') in these equations; and the angle is distributed uniformly around the circle, chosen by the random variable ''V''. * The Marsaglia polar method is a modification of the Box–Muller method which does not require computation of the sine and cosine functions. In this method, ''U'' and ''V'' are drawn from the uniform (−1,1) distribution, and then is computed. If ''S'' is greater or equal to 1, then the method starts over, otherwise the two quantities X = U\sqrt, \qquad Y = V\sqrt are returned. Again, ''X'' and ''Y'' are independent, standard normal random variables. * The Ratio method is a rejection method. The algorithm proceeds as follows: ** Generate two independent uniform deviates ''U'' and ''V''; ** Compute ''X'' = (''V'' − 0.5)/''U''; ** Optional: if ''X''2 ≤ 5 − 4''e''1/4''U'' then accept ''X'' and terminate algorithm; ** Optional: if ''X''2 ≥ 4''e''−1.35/''U'' + 1.4 then reject ''X'' and start over from step 1; ** If ''X''2 ≤ −4 ln''U'' then accept ''X'', otherwise start over the algorithm. *:The two optional steps allow the evaluation of the logarithm in the last step to be avoided in most cases. These steps can be greatly improved so that the logarithm is rarely evaluated. * The ziggurat algorithm is faster than the Box–Muller transform and still exact. In about 97% of all cases it uses only two random numbers, one random integer and one random uniform, one multiplication and an if-test. Only in 3% of the cases, where the combination of those two falls outside the "core of the ziggurat" (a kind of rejection sampling using logarithms), do exponentials and more uniform random numbers have to be employed. * Integer arithmetic can be used to sample from the standard normal distribution. This method is exact in the sense that it satisfies the conditions of ''ideal approximation''; i.e., it is equivalent to sampling a real number from the standard normal distribution and rounding this to the nearest representable floating point number. * There is also some investigation into the connection between the fast Hadamard transform and the normal distribution, since the transform employs just addition and subtraction and by the central limit theorem random numbers from almost any distribution will be transformed into the normal distribution. In this regard a series of Hadamard transforms can be combined with random permutations to turn arbitrary data sets into a normally distributed data.


Numerical approximations for the normal CDF and normal quantile function

The standard normal cumulative distribution function, CDF is widely used in scientific and statistical computing. The values Φ(''x'') may be approximated very accurately by a variety of methods, such as numerical integration, Taylor series, asymptotic series and Gauss's continued fraction#Of Kummer's confluent hypergeometric function, continued fractions. Different approximations are used depending on the desired level of accuracy. * give the approximation for Φ(''x'') for ''x > 0'' with the absolute error (algorith
26.2.17
: \Phi(x) = 1 - \varphi(x)\left(b_1 t + b_2 t^2 + b_3t^3 + b_4 t^4 + b_5 t^5\right) + \varepsilon(x), \qquad t = \frac, where ''ϕ''(''x'') is the standard normal PDF, and ''b''0 = 0.2316419, ''b''1 = 0.319381530, ''b''2 = −0.356563782, ''b''3 = 1.781477937, ''b''4 = −1.821255978, ''b''5 = 1.330274429. * lists some dozens of approximations – by means of rational functions, with or without exponentials – for the function. His algorithms vary in the degree of complexity and the resulting precision, with maximum absolute precision of 24 digits. An algorithm by combines Hart's algorithm 5666 with a continued fraction approximation in the tail to provide a fast computation algorithm with a 16-digit precision. * after recalling Hart68 solution is not suited for erf, gives a solution for both erf and erfc, with maximal relative error bound, via rational function, Rational Chebyshev Approximation. * suggested a simple algorithm based on the Taylor series expansion \Phi(x) = \frac12 + \varphi(x)\left( x + \frac 3 + \frac + \frac + \frac + \cdots \right) for calculating with arbitrary precision. The drawback of this algorithm is comparatively slow calculation time (for example it takes over 300 iterations to calculate the function with 16 digits of precision when ). * The GNU Scientific Library calculates values of the standard normal CDF using Hart's algorithms and approximations with Chebyshev polynomials. Shore (1982) introduced simple approximations that may be incorporated in stochastic optimization models of engineering and operations research, like reliability engineering and inventory analysis. Denoting , the simplest approximation for the quantile function is: z = \Phi^(p)=5.5556\left[1- \left( \frac p \right)^\right],\qquad p\ge 1/2 This approximation delivers for ''z'' a maximum absolute error of 0.026 (for , corresponding to ). For replace ''p'' by and change sign. Another approximation, somewhat less accurate, is the single-parameter approximation: z=-0.4115\left\, \qquad p\ge 1/2 The latter had served to derive a simple approximation for the loss integral of the normal distribution, defined by \begin L(z) & =\int_z^\infty (u-z)\varphi(u) \, du=\int_z^\infty [1-\Phi (u)] \, du \\[5pt] L(z) & \approx \begin 0.4115\left(\dfrac p \right) - z, & p<1/2, \\ \\ 0.4115\left( \dfrac p \right), & p\ge 1/2. \end \\[5pt] \text \\ L(z) & \approx \begin 0.4115\left\, & p < 1/2, \\ \\ 0.4115 \dfrac p, & p\ge 1/2. \end \end This approximation is particularly accurate for the right far-tail (maximum error of 10−3 for z≥1.4). Highly accurate approximations for the CDF, based on Response modeling methodology, Response Modeling Methodology (RMM, Shore, 2011, 2012), are shown in Shore (2005). Some more approximations can be found at: Error function#Approximation with elementary functions. In particular, small ''relative'' error on the whole domain for the CDF \Phi and the quantile function \Phi^ as well, is achieved via an explicitly invertible formula by Sergei Winitzki in 2008.


History


Development

Some authors attribute the credit for the discovery of the normal distribution to Abraham de Moivre, de Moivre, who in 1738 published in the second edition of his "''The Doctrine of Chances''" the study of the coefficients in the binomial expansion of . De Moivre proved that the middle term in this expansion has the approximate magnitude of 2^n/\sqrt, and that "If ''m'' or ''n'' be a Quantity infinitely great, then the Logarithm of the Ratio, which a Term distant from the middle by the Interval ''ℓ'', has to the middle Term, is -\frac." Although this theorem can be interpreted as the first obscure expression for the normal probability law, Stephen Stigler, Stigler points out that de Moivre himself did not interpret his results as anything more than the approximate rule for the binomial coefficients, and in particular de Moivre lacked the concept of the probability density function. In 1823 Carl Friedrich Gauss, Gauss published his monograph "''Theoria combinationis observationum erroribus minimis obnoxiae''" where among other things he introduces several important statistical concepts, such as the method of least squares, the method of maximum likelihood, and the ''normal distribution''. Gauss used ''M'', , to denote the measurements of some unknown quantity ''V'', and sought the "most probable" estimator of that quantity: the one that maximizes the probability of obtaining the observed experimental results. In his notation φΔ is the probability density function of the measurement errors of magnitude Δ. Not knowing what the function ''φ'' is, Gauss requires that his method should reduce to the well-known answer: the arithmetic mean of the measured values. Starting from these principles, Gauss demonstrates that the only law that rationalizes the choice of arithmetic mean as an estimator of the location parameter, is the normal law of errors: \varphi\mathit = \frac h \, e^, where ''h'' is "the measure of the precision of the observations". Using this normal law as a generic model for errors in the experiments, Gauss formulates what is now known as the non-linear least squares, non-linear weighted least squares method. Although Gauss was the first to suggest the normal distribution law, Pierre Simon de Laplace, Laplace made significant contributions. It was Laplace who first posed the problem of aggregating several observations in 1774, although his own solution led to the Laplacian distribution. It was Laplace who first calculated the value of the Gaussian integral, integral in 1782, providing the normalization constant for the normal distribution. Finally, it was Laplace who in 1810 proved and presented to the Academy the fundamental
central limit theorem In probability theory, the central limit theorem (CLT) establishes that, in many situations, when independent random variables are summed up, their properly normalized sum tends toward a normal distribution even if the original variables themselv ...
, which emphasized the theoretical importance of the normal distribution. It is of interest to note that in 1809 an Irish-American mathematician Robert Adrain published two insightful but flawed derivations of the normal probability law, simultaneously and independently from Gauss. His works remained largely unnoticed by the scientific community, until in 1871 they were exhumed by Cleveland Abbe, Abbe. In the middle of the 19th century James Clerk Maxwell, Maxwell demonstrated that the normal distribution is not just a convenient mathematical tool, but may also occur in natural phenomena: "The number of particles whose velocity, resolved in a certain direction, lies between ''x'' and ''x'' + ''dx'' is \operatorname \frac\; e^ \, dx


Naming

Today, the concept is usually known in English as the normal distribution or Gaussian distribution. Other less common names include Gauss distribution, Laplace-Gauss distribution, the law of error, the law of facility of errors, Laplace's second law, Gaussian law. Gauss himself apparently coined the term with reference to the "normal equations" involved in its applications, with normal having its technical meaning of orthogonal rather than "usual". However, by the end of the 19th century some authors had started using the name ''normal distribution'', where the word "normal" was used as an adjective – the term now being seen as a reflection of the fact that this distribution was seen as typical, common – and thus "normal". Charles Sanders Peirce, Peirce (one of those authors) once defined "normal" thus: "...the 'normal' is not the average (or any other kind of mean) of what actually occurs, but of what ''would'', in the long run, occur under certain circumstances." Around the turn of the 20th century Karl Pearson, Pearson popularized the term ''normal'' as a designation for this distribution. Also, it was Pearson who first wrote the distribution in terms of the standard deviation ''σ'' as in modern notation. Soon after this, in year 1915, Ronald Fisher, Fisher added the location parameter to the formula for normal distribution, expressing it in the way it is written nowadays: df = \frac e^ \, dx. The term "standard normal", which denotes the normal distribution with zero mean and unit variance came into general use around the 1950s, appearing in the popular textbooks by P. G. Hoel (1947) "''Introduction to mathematical statistics''" and A. M. Mood (1950) "''Introduction to the theory of statistics''".


See also

* Bates distribution – similar to the Irwin–Hall distribution, but rescaled back into the 0 to 1 range * Behrens–Fisher problem – the long-standing problem of testing whether two normal samples with different variances have same means; * Bhattacharyya distance – method used to separate mixtures of normal distributions * Erdős–Kac theorem – on the occurrence of the normal distribution in number theory * Full width at half maximum * Gaussian blur – convolution, which uses the normal distribution as a kernel * Modified half-normal distribution with the pdf on (0, \infty) is given as f(x)= \frac, where \Psi(\alpha,z)=_1\Psi_1\left(\begin\left(\alpha,\frac\right)\\(1,0)\end;z \right) denotes the Fox-Wright Psi function. * Normally distributed and uncorrelated does not imply independent * Ratio normal distribution * Reciprocal normal distribution * Standard normal table * Stein's lemma * Sub-Gaussian distribution * Sum of normally distributed random variables * Tweedie distribution – The normal distribution is a member of the family of Tweedie exponential dispersion models. * Wrapped normal distribution – the Normal distribution applied to a circular domain * Z-test – using the normal distribution


Notes


References


Citations


Sources

* * In particular, the entries fo
"bell-shaped and bell curve"
an

* * * * * * * * * * * * * * * * * * * * * * * * Translated by Stephen M. Stigler in ''Statistical Science'' 1 (3), 1986: . * * * * * * * * * * * * * * * * * * * * * * * * * * * *


External links

*
Normal distribution calculator
{{Authority control Normal distribution, Continuous distributions Conjugate prior distributions Exponential family distributions Stable distributions Location-scale family probability distributions]">X - \mu, ^p\right&= \sigma^p (p-1)!! \cdot \begin \sqrt & \textp\text \\ 1 & \textp\text \end \\ &= \sigma^p \cdot \frac. \end The last formula is valid also for any non-integer p>-1. When the mean \mu \ne 0, the plain and absolute moments can be expressed in terms of
confluent hypergeometric function In mathematics, a confluent hypergeometric function is a solution of a confluent hypergeometric equation, which is a degenerate form of a hypergeometric differential equation where two of the three regular singularities merge into an irregular ...
s _1F_1 and U. :\begin \operatorname\left ^p\right&= \sigma^p\cdot (-i\sqrt 2)^p U\left(-\frac, \frac, -\frac \left( \frac \mu \sigma \right)^2 \right), \\ \operatorname\left Hermite polynomials#"Negative variance", generalized Hermite polynomials. The expectation of X conditioned on the event that X lies in an interval ,b/math> is given by :\operatorname\left \mid a= \mu - \sigma^2\frac where f and F respectively are the density and the cumulative distribution function of X. For b=\infty this is known as the
inverse Mills ratio In probability theory, the Mills ratio (or Mills's ratio) of a continuous random variable X is the function : m(x) := \frac , where f(x) is the probability density function, and :\bar(x) := \Pr x.html" ;"title=">x">>x= \int_x^ f(u)\, du is the ...
. Note that above, density f of X is used instead of standard normal density as in inverse Mills ratio, so here we have \sigma^2 instead of \sigma.


Fourier transform and characteristic function

The
Fourier transform A Fourier transform (FT) is a mathematical transform that decomposes functions into frequency components, which are represented by the output of the transform as a function of frequency. Most commonly functions of time or space are transformed, ...
of a normal density f with mean \mu and standard deviation \sigma is : \hat f(t) = \int_^\infty f(x)e^ \, dx = e^ e^ where i is the
imaginary unit The imaginary unit or unit imaginary number () is a solution to the quadratic equation x^2+1=0. Although there is no real number with this property, can be used to extend the real numbers to what are called complex numbers, using addition an ...
. If the mean \mu=0, the first factor is 1, and the Fourier transform is, apart from a constant factor, a normal density on the
frequency domain In physics, electronics, control systems engineering, and statistics, the frequency domain refers to the analysis of mathematical functions or signals with respect to frequency, rather than time. Put simply, a time-domain graph shows how a signa ...
, with mean 0 and standard deviation 1/\sigma. In particular, the standard normal distribution \varphi is an
eigenfunction In mathematics, an eigenfunction of a linear operator ''D'' defined on some function space is any non-zero function f in that space that, when acted upon by ''D'', is only multiplied by some scaling factor called an eigenvalue. As an equation, th ...
of the Fourier transform. In probability theory, the Fourier transform of the probability distribution of a real-valued random variable X is closely connected to the
characteristic function In mathematics, the term "characteristic function" can refer to any of several distinct concepts: * The indicator function of a subset, that is the function ::\mathbf_A\colon X \to \, :which for a given subset ''A'' of ''X'', has value 1 at points ...
\varphi_X(t) of that variable, which is defined as the
expected value In probability theory, the expected value (also called expectation, expectancy, mathematical expectation, mean, average, or first moment) is a generalization of the weighted average. Informally, the expected value is the arithmetic mean of a l ...
of e^, as a function of the real variable t (the
frequency Frequency is the number of occurrences of a repeating event per unit of time. It is also occasionally referred to as ''temporal frequency'' for clarity, and is distinct from ''angular frequency''. Frequency is measured in hertz (Hz) which is eq ...
parameter of the Fourier transform). This definition can be analytically extended to a complex-value variable t. The relation between both is: :\varphi_X(t) = \hat f(-t)


Moment and cumulant generating functions

The
moment generating function In probability theory and statistics, the moment-generating function of a real-valued random variable is an alternative specification of its probability distribution. Thus, it provides the basis of an alternative route to analytical results compare ...
of a real random variable X is the expected value of e^, as a function of the real parameter t. For a normal distribution with density f, mean \mu and deviation \sigma, the moment generating function exists and is equal to :M(t) = \operatorname ^= \hat f(it) = e^ e^ The
cumulant generating function In probability theory and statistics, the cumulants of a probability distribution are a set of quantities that provide an alternative to the '' moments'' of the distribution. Any two probability distributions whose moments are identical will have ...
is the logarithm of the moment generating function, namely :g(t) = \ln M(t) = \mu t + \tfrac 12 \sigma^2 t^2 Since this is a quadratic polynomial in t, only the first two
cumulant In probability theory and statistics, the cumulants of a probability distribution are a set of quantities that provide an alternative to the '' moments'' of the distribution. Any two probability distributions whose moments are identical will ha ...
s are nonzero, namely the mean \mu and the variance \sigma^2.


Stein operator and class

Within
Stein's method Stein's method is a general method in probability theory to obtain bounds on the distance between two probability distributions with respect to a probability metric. It was introduced by Charles Stein, who first published it in 1972, to obtain ...
the Stein operator and class of a random variable X \sim \mathcal(\mu, \sigma^2) are \mathcalf(x) = \sigma^2 f'(x) - (x-\mu)f(x) and \mathcal the class of all absolutely continuous functions f : \R \to \R \mbox\mathbb[, f'(X), ]< \infty.


Zero-variance limit

In the limit (mathematics), limit when \sigma tends to zero, the probability density f(x) eventually tends to zero at any x\ne \mu, but grows without limit if x = \mu, while its integral remains equal to 1. Therefore, the normal distribution cannot be defined as an ordinary
function Function or functionality may refer to: Computing * Function key, a type of key on computer keyboards * Function model, a structured representation of processes in a system * Function object or functor or functionoid, a concept of object-oriente ...
when \sigma = 0. However, one can define the normal distribution with zero variance as a
generalized function In mathematics, generalized functions are objects extending the notion of functions. There is more than one recognized theory, for example the theory of distributions. Generalized functions are especially useful in making discontinuous functions ...
; specifically, as Dirac's "delta function" \delta translated by the mean \mu, that is f(x)=\delta(x-\mu). Its CDF is then the
Heaviside step function The Heaviside step function, or the unit step function, usually denoted by or (but sometimes , or ), is a step function, named after Oliver Heaviside (1850–1925), the value of which is zero for negative arguments and one for positive argume ...
translated by the mean \mu, namely :F(x) = \begin 0 & \textx < \mu \\ 1 & \textx \geq \mu \end


Maximum entropy

Of all probability distributions over the reals with a specified mean \mu and variance \sigma^2, the normal distribution N(\mu,\sigma^2) is the one with maximum entropy. If X is a
continuous random variable In probability theory and statistics, a probability distribution is the mathematical function that gives the probabilities of occurrence of different possible outcomes for an experiment. It is a mathematical description of a random phenomenon i ...
with
probability density In probability theory, a probability density function (PDF), or density of a continuous random variable, is a function whose value at any given sample (or point) in the sample space (the set of possible values taken by the random variable) can ...
f(x), then the entropy of X is defined as : H(X) = - \int_^\infty f(x)\log f(x)\, dx where f(x)\log f(x) is understood to be zero whenever f(x)=0. This functional can be maximized, subject to the constraints that the distribution is properly normalized and has a specified variance, by using
variational calculus The calculus of variations (or Variational Calculus) is a field of mathematical analysis that uses variations, which are small changes in functions and functionals, to find maxima and minima of functionals: mappings from a set of functions t ...
. A function with two
Lagrange multipliers In mathematical optimization, the method of Lagrange multipliers is a strategy for finding the local maxima and minima of a function subject to equality constraints (i.e., subject to the condition that one or more equations have to be satisfied ex ...
is defined: : L=\int_^\infty f(x)\ln(f(x))\,dx-\lambda_0\left(1-\int_^\infty f(x)\,dx\right)-\lambda\left(\sigma^2-\int_^\infty f(x)(x-\mu)^2\,dx\right) where f(x) is, for now, regarded as some density function with mean \mu and standard deviation \sigma. At maximum entropy, a small variation \delta f(x) about f(x) will produce a variation \delta L about L which is equal to 0: : 0=\delta L=\int_^\infty \delta f(x)\left (\ln(f(x))+1+\lambda_0+\lambda(x-\mu)^2\right )\,dx Since this must hold for any small \delta f(x), the term in brackets must be zero, and solving for f(x) yields: :f(x)=e^ Using the constraint equations to solve for \lambda_0 and \lambda yields the density of the normal distribution: : f(x, \mu, \sigma)=\frace^ The entropy of a normal distribution is equal to : H(X)=\tfrac(1+\log(2\sigma^2\pi))


Other properties


Related distributions


Central limit theorem

The central limit theorem states that under certain (fairly common) conditions, the sum of many random variables will have an approximately normal distribution. More specifically, where X_1,\ldots ,X_n are
independent and identically distributed In probability theory and statistics, a collection of random variables is independent and identically distributed if each random variable has the same probability distribution as the others and all are mutually independent. This property is usua ...
random variables with the same arbitrary distribution, zero mean, and variance \sigma^2 and Z is their mean scaled by \sqrt : Z = \sqrt\left(\frac\sum_^n X_i\right) Then, as n increases, the probability distribution of Z will tend to the normal distribution with zero mean and variance \sigma^2. The theorem can be extended to variables (X_i) that are not independent and/or not identically distributed if certain constraints are placed on the degree of dependence and the moments of the distributions. Many
test statistic A test statistic is a statistic (a quantity derived from the sample) used in statistical hypothesis testing.Berger, R. L.; Casella, G. (2001). ''Statistical Inference'', Duxbury Press, Second Edition (p.374) A hypothesis test is typically specif ...
s, scores, and
estimator In statistics, an estimator is a rule for calculating an estimate of a given quantity based on observed data: thus the rule (the estimator), the quantity of interest (the estimand) and its result (the estimate) are distinguished. For example, the ...
s encountered in practice contain sums of certain random variables in 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 distributions. The central limit theorem also implies that certain distributions can be approximated by the normal distribution, for example: * The
binomial distribution In probability theory and statistics, the binomial distribution with parameters ''n'' and ''p'' is the discrete probability distribution of the number of successes in a sequence of ''n'' independent experiments, each asking a yes–no quest ...
B(n,p) is approximately normal with mean np and variance np(1-p) for large n and for p not too close to 0 or 1. * The
Poisson distribution In probability theory and statistics, the Poisson distribution is a discrete probability distribution that expresses the probability of a given number of events occurring in a fixed interval of time or space if these events occur with a known co ...
with parameter \lambda is approximately normal with mean \lambda and variance \lambda, for large values of \lambda. * The
chi-squared distribution In probability theory and statistics, the chi-squared distribution (also chi-square or \chi^2-distribution) with k degrees of freedom is the distribution of a sum of the squares of k independent standard normal random variables. The chi-squa ...
\chi^2(k) is approximately normal with mean k and variance 2k, for large k. * The
Student's t-distribution In probability and statistics, Student's ''t''-distribution (or simply the ''t''-distribution) is any member of a family of continuous probability distributions that arise when estimating the mean of a normally distributed population in sit ...
t(\nu) is approximately normal with mean 0 and variance 1 when \nu is large. Whether these approximations are sufficiently accurate depends on the purpose for which they are needed, and the rate of convergence to the normal distribution. It is typically the case that such approximations are less accurate in the tails of the distribution. A general upper bound for the approximation error in the central limit theorem is given by the
Berry–Esseen theorem In probability theory, the central limit theorem states that, under certain circumstances, the probability distribution of the scaled mean of a random sample converges to a normal distribution as the sample size increases to infinity. Under strong ...
, improvements of the approximation are given by the
Edgeworth expansion The Gram–Charlier A series (named in honor of Jørgen Pedersen Gram and Carl Charlier), and the Edgeworth series (named in honor of Francis Ysidro Edgeworth) are series that approximate a probability distribution in terms of its cumulants. The se ...
s. This theorem can also be used to justify modeling the sum of many uniform noise sources as
Gaussian noise Gaussian noise, named after Carl Friedrich Gauss, is a term from signal processing theory denoting a kind of signal noise that has a probability density function (pdf) equal to that of the normal distribution (which is also known as the Gaussia ...
. See
AWGN Additive white Gaussian noise (AWGN) is a basic noise model used in information theory to mimic the effect of many random processes that occur in nature. The modifiers denote specific characteristics: * ''Additive'' because it is added to any nois ...
.


Operations and functions of normal variables

The
probability density In probability theory, a probability density function (PDF), or density of a continuous random variable, is a function whose value at any given sample (or point) in the sample space (the set of possible values taken by the random variable) can ...
,
cumulative distribution In statistics, the frequency (or absolute frequency) of an event i is the number n_i of times the observation has occurred/recorded in an experiment or study. These frequencies are often depicted graphically or in tabular form. Types The cumul ...
, and inverse cumulative distribution of any function of one or more independent or correlated normal variables can be computed with the numerical method of ray-tracing
Matlab code
. In the following sections we look at some special cases.


Operations on a single normal variable

If X is distributed normally with mean \mu and variance \sigma^2, then * aX+b, for any real numbers a and b, is also normally distributed, with mean a\mu+b and standard deviation , a, \sigma. That is, the family of normal distributions is closed under linear transformations. * The exponential of X is distributed log-normally: . * The absolute value of X has
folded normal distribution The folded normal distribution is a probability distribution related to the normal distribution. Given a normally distributed random variable ''X'' with mean ''μ'' and variance ''σ''2, the random variable ''Y'' = , ''X'', has a folded normal d ...
: . If \mu = 0 this is known as the
half-normal distribution In probability theory and statistics, the half-normal distribution is a special case of the folded normal distribution. Let X follow an ordinary normal distribution, N(0,\sigma^2). Then, Y=, X, follows a half-normal distribution. Thus, the hal ...
. * The absolute value of normalized residuals, , ''X'' − ''μ'', /''σ'', has
chi distribution In probability theory and statistics, the chi distribution is a continuous probability distribution. It is the distribution of the positive square root of the sum of squares of a set of independent random variables each following a standard norm ...
with one degree of freedom: , X - \mu, / \sigma \sim \chi_1. * The square of ''X''/''σ'' has the
noncentral chi-squared distribution In probability theory and statistics, the noncentral chi-squared distribution (or noncentral chi-square distribution, noncentral \chi^2 distribution) is a noncentral generalization of the chi-squared distribution. It often arises in the power a ...
with one degree of freedom: X^2 / \sigma^2 \sim \chi_1^2(\mu^2 / \sigma^2). If \mu = 0, the distribution is called simply chi-squared. * The log likelihood of a normal variable x is simply the log of its
probability density function In probability theory, a probability density function (PDF), or density of a continuous random variable, is a function whose value at any given sample (or point) in the sample space (the set of possible values taken by the random variable) can ...
: \ln p(x)= -\frac \left(\frac \right)^2 -\ln \left(\sigma \sqrt \right) = -\frac z^2 -\ln \left(\sigma \sqrt \right). Since this is a scaled and shifted square of a standard normal variable, it is distributed as a scaled and shifted chi-squared variable. * The distribution of the variable ''X'' restricted to an interval 'a'', ''b''is called the
truncated normal distribution In probability and statistics, the truncated normal distribution is the probability distribution derived from that of a normally distributed random variable by bounding the random variable from either below or above (or both). The truncated no ...
. * (''X'' − ''μ'')−2 has a
Lévy distribution In probability theory and statistics, the Lévy distribution, named after Paul Lévy, is a continuous probability distribution for a non-negative random variable. In spectroscopy, this distribution, with frequency as the dependent variable, is kn ...
with location 0 and scale ''σ''−2.


= Operations on two independent normal variables

= * If X_1 and X_2 are two
independent Independent or Independents may refer to: Arts, entertainment, and media Artist groups * Independents (artist group), a group of modernist painters based in the New Hope, Pennsylvania, area of the United States during the early 1930s * Independ ...
normal random variables, with means \mu_1, \mu_2 and standard deviations \sigma_1, \sigma_2, then their sum X_1 + X_2 will also be normally distributed, roof/sup> with mean \mu_1 + \mu_2 and variance \sigma_1^2 + \sigma_2^2. * In particular, if X and Y are independent normal deviates with zero mean and variance \sigma^2, then X + Y and X - Y are also independent and normally distributed, with zero mean and variance 2\sigma^2. This is a special case of the
polarization identity In linear algebra, a branch of mathematics, the polarization identity is any one of a family of formulas that express the inner product of two vectors in terms of the norm of a normed vector space. If a norm arises from an inner product then t ...
. * If X_1, X_2 are two independent normal deviates with mean \mu and deviation \sigma, and a, b are arbitrary real numbers, then the variable X_3 = \frac + \mu is also normally distributed with mean \mu and deviation \sigma. It follows that the normal distribution is
stable A stable is a building in which livestock, especially horses, are kept. It most commonly means a building that is divided into separate stalls for individual animals and livestock. There are many different types of stables in use today; the ...
(with exponent \alpha=2).


= Operations on two independent standard normal variables

= If X_1 and X_2 are two independent standard normal random variables with mean 0 and variance 1, then * Their sum and difference is distributed normally with mean zero and variance two: X_1 \pm X_2 \sim N(0, 2). * Their product Z = X_1 X_2 follows the
product distribution A product distribution is a probability distribution constructed as the distribution of the product of random variables having two other known distributions. Given two statistically independent random variables ''X'' and ''Y'', the distribution of ...
with density function f_Z(z) = \pi^ K_0(, z, ) where K_0 is the
modified Bessel function of the second kind Bessel functions, first defined by the mathematician Daniel Bernoulli and then generalized by Friedrich Bessel, are canonical solutions of Bessel's differential equation x^2 \frac + x \frac + \left(x^2 - \alpha^2 \right)y = 0 for an arbitrary ...
. This distribution is symmetric around zero, unbounded at z = 0, and has the
characteristic function In mathematics, the term "characteristic function" can refer to any of several distinct concepts: * The indicator function of a subset, that is the function ::\mathbf_A\colon X \to \, :which for a given subset ''A'' of ''X'', has value 1 at points ...
\phi_Z(t) = (1 + t^2)^. * Their ratio follows the standard
Cauchy distribution The Cauchy distribution, named after Augustin Cauchy, is a continuous probability distribution. It is also known, especially among physicists, as the Lorentz distribution (after Hendrik Lorentz), Cauchy–Lorentz distribution, Lorentz(ian) fun ...
: X_1/ X_2 \sim \operatorname(0, 1). * Their Euclidean norm \sqrt has the
Rayleigh distribution In probability theory and statistics, the Rayleigh distribution is a continuous probability distribution for nonnegative-valued random variables. Up to rescaling, it coincides with the chi distribution with two degrees of freedom. The distribut ...
.


Operations on multiple independent normal variables

* Any linear combination of independent normal deviates is a normal deviate. * If X_1, X_2, \ldots, X_n are independent standard normal random variables, then the sum of their squares has the
chi-squared distribution In probability theory and statistics, the chi-squared distribution (also chi-square or \chi^2-distribution) with k degrees of freedom is the distribution of a sum of the squares of k independent standard normal random variables. The chi-squa ...
with n degrees of freedom X_1^2 + \cdots + X_n^2 \sim \chi_n^2. * If X_1, X_2, \ldots, X_n are independent normally distributed random variables with means \mu and variances \sigma^2, then their
sample mean The sample mean (or "empirical mean") and the sample covariance are statistics computed from a Sample (statistics), sample of data on one or more random variables. The sample mean is the average value (or mean, mean value) of a sample (statistic ...
is independent from the sample
standard deviation In statistics, the standard deviation is a measure of the amount of variation or dispersion of a set of values. A low standard deviation indicates that the values tend to be close to the mean (also called the expected value) of the set, while ...
, which can be demonstrated using Basu's theorem or
Cochran's theorem In statistics, Cochran's theorem, devised by William G. Cochran, is a theorem used to justify results relating to the probability distributions of statistics that are used in the analysis of variance. Statement Let ''U''1, ..., ''U'N'' be i.i. ...
. The ratio of these two quantities will have the
Student's t-distribution In probability and statistics, Student's ''t''-distribution (or simply the ''t''-distribution) is any member of a family of continuous probability distributions that arise when estimating the mean of a normally distributed population in sit ...
with n-1 degrees of freedom: t = \frac = \frac \sim t_. * If X_1, X_2, \ldots, X_n, Y_1, Y_2, \ldots, Y_m are independent standard normal random variables, then the ratio of their normalized sums of squares will have the with degrees of freedom: F = \frac \sim F_.


Operations on multiple correlated normal variables

* A
quadratic form In mathematics, a quadratic form is a polynomial with terms all of degree two ("form" is another name for a homogeneous polynomial). For example, :4x^2 + 2xy - 3y^2 is a quadratic form in the variables and . The coefficients usually belong to a ...
of a normal vector, i.e. a quadratic function q = \sum x_i^2 + \sum x_j + c of multiple independent or correlated normal variables, is a generalized chi-square variable.


Operations on the density function

The split normal distribution is most directly defined in terms of joining scaled sections of the density functions of different normal distributions and rescaling the density to integrate to one. The
truncated normal distribution In probability and statistics, the truncated normal distribution is the probability distribution derived from that of a normally distributed random variable by bounding the random variable from either below or above (or both). The truncated no ...
results from rescaling a section of a single density function.


Infinite divisibility and Cramér's theorem

For any positive integer \text, any normal distribution with mean \mu and variance \sigma^2 is the distribution of the sum of \text independent normal deviates, each with mean \frac and variance \frac. This property is called
infinite divisibility Infinite divisibility arises in different ways in philosophy, physics, economics, order theory (a branch of mathematics), and probability theory (also a branch of mathematics). One may speak of infinite divisibility, or the lack thereof, of matter ...
. Conversely, if X_1 and X_2 are independent random variables and their sum X_1+X_2 has a normal distribution, then both X_1 and X_2 must be normal deviates. This result is known as Cramér's decomposition theorem, and is equivalent to saying that the convolution of two distributions is normal if and only if both are normal. Cramér's theorem implies that a linear combination of independent non-Gaussian variables will never have an exactly normal distribution, although it may approach it arbitrarily closely.


Bernstein's theorem

Bernstein's theorem states that if X and Y are independent and X + Y and X - Y are also independent, then both ''X'' and ''Y'' must necessarily have normal distributions. More generally, if X_1, \ldots, X_n are independent random variables, then two distinct linear combinations \sum and \sumwill be independent if and only if all X_k are normal and \sum, where \sigma_k^2 denotes the variance of X_k.


Extensions

The notion of normal distribution, being one of the most important distributions in probability theory, has been extended far beyond the standard framework of the univariate (that is one-dimensional) case (Case 1). All these extensions are also called ''normal'' or ''Gaussian'' laws, so a certain ambiguity in names exists. * The
multivariate normal distribution In probability theory and statistics, the multivariate normal distribution, multivariate Gaussian distribution, or joint normal distribution is a generalization of the one-dimensional (univariate) normal distribution to higher dimensions. One d ...
describes the Gaussian law in the ''k''-dimensional Euclidean space. A vector is multivariate-normally distributed if any linear combination of its components has a (univariate) normal distribution. The variance of ''X'' is a ''k×k'' symmetric positive-definite matrix ''V''. The multivariate normal distribution is a special case of the
elliptical distribution In probability and statistics, an elliptical distribution is any member of a broad family of probability distributions that generalize the multivariate normal distribution. Intuitively, in the simplified two and three dimensional case, the joint di ...
s. As such, its iso-density loci in the ''k'' = 2 case are ellipses and in the case of arbitrary ''k'' are ellipsoids. * Rectified Gaussian distribution a rectified version of normal distribution with all the negative elements reset to 0 * Complex normal distribution deals with the complex normal vectors. A complex vector is said to be normal if both its real and imaginary components jointly possess a 2''k''-dimensional multivariate normal distribution. The variance-covariance structure of ''X'' is described by two matrices: the ''variance'' matrix Γ, and the ''relation'' matrix ''C''. * Matrix normal distribution describes the case of normally distributed matrices. * Gaussian processes are the normally distributed stochastic processes. These can be viewed as elements of some infinite-dimensional Hilbert space ''H'', and thus are the analogues of multivariate normal vectors for the case . A random element is said to be normal if for any constant the scalar product has a (univariate) normal distribution. The variance structure of such Gaussian random element can be described in terms of the linear ''covariance ''. Several Gaussian processes became popular enough to have their own names: ** Wiener process, Brownian motion, ** Brownian bridge, ** Ornstein–Uhlenbeck process. * Gaussian q-distribution is an abstract mathematical construction that represents a "q-analogue" of the normal distribution. * the q-Gaussian is an analogue of the Gaussian distribution, in the sense that it maximises the Tsallis entropy, and is one type of Tsallis distribution. Note that this distribution is different from the Gaussian q-distribution above. * The Kaniadakis Gaussian distribution, Kaniadakis ''κ''-Gaussian distribution is a generalization of the Gaussian distribution which arises from the Kaniadakis statistics, being one of the Kaniadakis distribution, Kaniadakis distributions. A random variable ''X'' has a two-piece normal distribution if it has a distribution : f_X( x ) = N( \mu, \sigma_1^2 ) \text x \le \mu : f_X( x ) = N( \mu, \sigma_2^2 ) \text x \ge \mu where ''μ'' is the mean and ''σ''1 and ''σ''2 are the standard deviations of the distribution to the left and right of the mean respectively. The mean, variance and third central moment of this distribution have been determined : \operatorname( X ) = \mu + \sqrt ( \sigma_2 - \sigma_1 ) : \operatorname( X ) = \left( 1 - \frac 2 \pi\right)( \sigma_2 - \sigma_1 )^2 + \sigma_1 \sigma_2 : \operatorname( X ) = \sqrt( \sigma_2 - \sigma_1 ) \left[ \left( \frac 4 \pi - 1 \right) ( \sigma_2 - \sigma_1)^2 + \sigma_1 \sigma_2 \right] where E(''X''), V(''X'') and T(''X'') are the mean, variance, and third central moment respectively. One of the main practical uses of the Gaussian law is to model the empirical distributions of many different random variables encountered in practice. In such case a possible extension would be a richer family of distributions, having more than two parameters and therefore being able to fit the empirical distribution more accurately. The examples of such extensions are: * Pearson distribution — a four-parameter family of probability distributions that extend the normal law to include different skewness and kurtosis values. * The generalized normal distribution, also known as the exponential power distribution, allows for distribution tails with thicker or thinner asymptotic behaviors.


Statistical inference


Estimation of parameters

It is often the case that we do not know the parameters of the normal distribution, but instead want to Estimation theory, estimate them. That is, having a sample (x_1, \ldots, x_n) from a normal N(\mu, \sigma^2) population we would like to learn the approximate values of parameters \mu and \sigma^2. The standard approach to this problem is the maximum likelihood method, which requires maximization of the ''log-likelihood function'': : \ln\mathcal(\mu,\sigma^2) = \sum_^n \ln f(x_i\mid\mu,\sigma^2) = -\frac\ln(2\pi) - \frac\ln\sigma^2 - \frac\sum_^n (x_i-\mu)^2. Taking derivatives with respect to \mu and \sigma^2 and solving the resulting system of first order conditions yields the ''maximum likelihood estimates'': : \hat = \overline \equiv \frac\sum_^n x_i, \qquad \hat^2 = \frac \sum_^n (x_i - \overline)^2.


Sample mean

Estimator \textstyle\hat\mu is called the ''
sample mean The sample mean (or "empirical mean") and the sample covariance are statistics computed from a Sample (statistics), sample of data on one or more random variables. The sample mean is the average value (or mean, mean value) of a sample (statistic ...
'', since it is the arithmetic mean of all observations. The statistic \textstyle\overline is complete statistic, complete and sufficient statistic, sufficient for \mu, and therefore by the Lehmann–Scheffé theorem, \textstyle\hat\mu is the uniformly minimum variance unbiased (UMVU) estimator. In finite samples it is distributed normally: : \hat\mu \sim \mathcal(\mu,\sigma^2/n). The variance of this estimator is equal to the ''μμ''-element of the inverse Fisher information matrix \textstyle\mathcal^. This implies that the estimator is efficient estimator, finite-sample efficient. Of practical importance is the fact that the standard error (statistics), standard error of \textstyle\hat\mu is proportional to \textstyle1/\sqrt, that is, if one wishes to decrease the standard error by a factor of 10, one must increase the number of points in the sample by a factor of 100. This fact is widely used in determining sample sizes for opinion polls and the number of trials in Monte Carlo simulations. From the standpoint of the asymptotic theory (statistics), asymptotic theory, \textstyle\hat\mu is consistent estimator, consistent, that is, it convergence in probability, converges in probability to \mu as n\rightarrow\infty. The estimator is also asymptotic normality, asymptotically normal, which is a simple corollary of the fact that it is normal in finite samples: : \sqrt(\hat\mu-\mu) \,\xrightarrow\, \mathcal(0,\sigma^2).


Sample variance

The estimator \textstyle\hat\sigma^2 is called the ''sample variance'', since it is the variance of the sample ((x_1, \ldots, x_n)). In practice, another estimator is often used instead of the \textstyle\hat\sigma^2. This other estimator is denoted s^2, and is also called the ''sample variance'', which represents a certain ambiguity in terminology; its square root s is called the ''sample standard deviation''. The estimator s^2 differs from \textstyle\hat\sigma^2 by having instead of ''n'' in the denominator (the so-called Bessel's correction): : s^2 = \frac \hat\sigma^2 = \frac \sum_^n (x_i - \overline)^2. The difference between s^2 and \textstyle\hat\sigma^2 becomes negligibly small for large ''n''s. In finite samples however, the motivation behind the use of s^2 is that it is an unbiased estimator of the underlying parameter \sigma^2, whereas \textstyle\hat\sigma^2 is biased. Also, by the Lehmann–Scheffé theorem the estimator s^2 is uniformly minimum variance unbiased (Minimum-variance unbiased estimator, UMVU), which makes it the "best" estimator among all unbiased ones. However it can be shown that the biased estimator \textstyle\hat\sigma^2 is "better" than the s^2 in terms of the mean squared error (MSE) criterion. In finite samples both s^2 and \textstyle\hat\sigma^2 have scaled
chi-squared distribution In probability theory and statistics, the chi-squared distribution (also chi-square or \chi^2-distribution) with k degrees of freedom is the distribution of a sum of the squares of k independent standard normal random variables. The chi-squa ...
with degrees of freedom: : s^2 \sim \frac \cdot \chi^2_, \qquad \hat\sigma^2 \sim \frac \cdot \chi^2_. The first of these expressions shows that the variance of s^2 is equal to 2\sigma^4/(n-1), which is slightly greater than the ''σσ''-element of the inverse Fisher information matrix \textstyle\mathcal^. Thus, s^2 is not an efficient estimator for \sigma^2, and moreover, since s^2 is UMVU, we can conclude that the finite-sample efficient estimator for \sigma^2 does not exist. Applying the asymptotic theory, both estimators s^2 and \textstyle\hat\sigma^2 are consistent, that is they converge in probability to \sigma^2 as the sample size n\rightarrow\infty. The two estimators are also both asymptotically normal: : \sqrt(\hat\sigma^2 - \sigma^2) \simeq \sqrt(s^2-\sigma^2) \,\xrightarrow\, \mathcal(0,2\sigma^4). In particular, both estimators are asymptotically efficient for \sigma^2.


Confidence intervals

By
Cochran's theorem In statistics, Cochran's theorem, devised by William G. Cochran, is a theorem used to justify results relating to the probability distributions of statistics that are used in the analysis of variance. Statement Let ''U''1, ..., ''U'N'' be i.i. ...
, for normal distributions the sample mean \textstyle\hat\mu and the sample variance ''s''2 are
independent Independent or Independents may refer to: Arts, entertainment, and media Artist groups * Independents (artist group), a group of modernist painters based in the New Hope, Pennsylvania, area of the United States during the early 1930s * Independ ...
, which means there can be no gain in considering their joint distribution. There is also a converse theorem: if in a sample the sample mean and sample variance are independent, then the sample must have come from the normal distribution. The independence between \textstyle\hat\mu and ''s'' can be employed to construct the so-called ''t-statistic'': : t = \frac = \frac \sim t_ This quantity ''t'' has the
Student's t-distribution In probability and statistics, Student's ''t''-distribution (or simply the ''t''-distribution) is any member of a family of continuous probability distributions that arise when estimating the mean of a normally distributed population in sit ...
with degrees of freedom, and it is an ancillary statistic (independent of the value of the parameters). Inverting the distribution of this ''t''-statistics will allow us to construct the
confidence interval In frequentist statistics, a confidence interval (CI) is a range of estimates for an unknown parameter. A confidence interval is computed at a designated ''confidence level''; the 95% confidence level is most common, but other levels, such as 9 ...
for ''μ''; similarly, inverting the ''χ''2 distribution of the statistic ''s''2 will give us the confidence interval for ''σ''2: :\mu \in \left[ \hat\mu - t_ \fracs, \hat\mu + t_ \fracs \right], :\sigma^2 \in \left[ \frac, \frac \right], where ''tk,p'' and are the ''p''th
quantile In statistics and probability, quantiles are cut points dividing the range of a probability distribution into continuous intervals with equal probabilities, or dividing the observations in a sample in the same way. There is one fewer quantile tha ...
s of the ''t''- and ''χ''2-distributions respectively. These confidence intervals are of the ''confidence level'' , meaning that the true values ''μ'' and ''σ''2 fall outside of these intervals with probability (or significance level) ''α''. In practice people usually take , resulting in the 95% confidence intervals. Approximate formulas can be derived from the asymptotic distributions of \textstyle\hat\mu and ''s''2: :\mu \in \left[ \hat\mu - , z_, \fracs, \hat\mu + , z_, \fracs \right], :\sigma^2 \in \left[ s^2 - , z_, \fracs^2, s^2 + , z_, \fracs^2 \right], The approximate formulas become valid for large values of ''n'', and are more convenient for the manual calculation since the standard normal quantiles ''z''''α''/2 do not depend on ''n''. In particular, the most popular value of , results in .


Normality tests

Normality tests assess the likelihood that the given data set comes from a normal distribution. Typically the null hypothesis ''H''0 is that the observations are distributed normally with unspecified mean ''μ'' and variance ''σ''2, versus the alternative ''Ha'' that the distribution is arbitrary. Many tests (over 40) have been devised for this problem. The more prominent of them are outlined below: Diagnostic plots are more intuitively appealing but subjective at the same time, as they rely on informal human judgement to accept or reject the null hypothesis. *
Q–Q plot In statistics, a Q–Q plot (quantile-quantile plot) is a probability plot, a List of graphical methods, graphical method for comparing two probability distributions by plotting their ''quantiles'' against each other. A point on the plot co ...
, also known as normal probability plot or rankit plot—is a plot of the sorted values from the data set against the expected values of the corresponding quantiles from the standard normal distribution. That is, it's a plot of point of the form (Φ−1(''pk''), ''x''(''k'')), where plotting points ''pk'' are equal to ''pk'' = (''k'' − ''α'')/(''n'' + 1 − 2''α'') and ''α'' is an adjustment constant, which can be anything between 0 and 1. If the null hypothesis is true, the plotted points should approximately lie on a straight line. * P–P plot – similar to the Q–Q plot, but used much less frequently. This method consists of plotting the points (Φ(''z''(''k'')), ''pk''), where \textstyle z_ = (x_-\hat\mu)/\hat\sigma. For normally distributed data this plot should lie on a 45° line between (0, 0) and (1, 1). Goodness-of-fit tests: ''Moment-based tests'': * D'Agostino's K-squared test * Jarque–Bera test * Shapiro–Wilk test: This is based on the fact that the line in the Q–Q plot has the slope of ''σ''. The test compares the least squares estimate of that slope with the value of the sample variance, and rejects the null hypothesis if these two quantities differ significantly. ''Tests based on the empirical distribution function'': * Anderson–Darling test * Lilliefors test (an adaptation of the Kolmogorov–Smirnov test)


Bayesian analysis of the normal distribution

Bayesian analysis of normally distributed data is complicated by the many different possibilities that may be considered: * Either the mean, or the variance, or neither, may be considered a fixed quantity. * When the variance is unknown, analysis may be done directly in terms of the variance, or in terms of the
precision Precision, precise or precisely may refer to: Science, and technology, and mathematics Mathematics and computing (general) * Accuracy and precision, measurement deviation from true value and its scatter * Significant figures, the number of digit ...
, the reciprocal of the variance. The reason for expressing the formulas in terms of precision is that the analysis of most cases is simplified. * Both univariate and multivariate normal distribution, multivariate cases need to be considered. * Either conjugate prior, conjugate or improper prior, improper prior distributions may be placed on the unknown variables. * An additional set of cases occurs in Bayesian linear regression, where in the basic model the data is assumed to be normally distributed, and normal priors are placed on the regression coefficients. The resulting analysis is similar to the basic cases of independent identically distributed data. The formulas for the non-linear-regression cases are summarized in the conjugate prior article.


Sum of two quadratics


= Scalar form

= The following auxiliary formula is useful for simplifying the posterior distribution, posterior update equations, which otherwise become fairly tedious. :a(x-y)^2 + b(x-z)^2 = (a + b)\left(x - \frac\right)^2 + \frac(y-z)^2 This equation rewrites the sum of two quadratics in ''x'' by expanding the squares, grouping the terms in ''x'', and completing the square. Note the following about the complex constant factors attached to some of the terms: # The factor \frac has the form of a weighted average of ''y'' and ''z''. # \frac = \frac = (a^ + b^)^. This shows that this factor can be thought of as resulting from a situation where the Multiplicative inverse, reciprocals of quantities ''a'' and ''b'' add directly, so to combine ''a'' and ''b'' themselves, it's necessary to reciprocate, add, and reciprocate the result again to get back into the original units. This is exactly the sort of operation performed by the harmonic mean, so it is not surprising that \frac is one-half the harmonic mean of ''a'' and ''b''.


= Vector form

= A similar formula can be written for the sum of two vector quadratics: If x, y, z are vectors of length ''k'', and A and B are symmetric matrix, symmetric, invertible matrices of size k\times k, then : \begin & (\mathbf-\mathbf)'\mathbf(\mathbf-\mathbf) + (\mathbf-\mathbf)' \mathbf(\mathbf-\mathbf) \\ = & (\mathbf - \mathbf)'(\mathbf+\mathbf)(\mathbf - \mathbf) + (\mathbf - \mathbf)'(\mathbf^ + \mathbf^)^(\mathbf - \mathbf) \end where :\mathbf = (\mathbf + \mathbf)^(\mathbf\mathbf + \mathbf \mathbf) Note that the form x′ A x is called a
quadratic form In mathematics, a quadratic form is a polynomial with terms all of degree two ("form" is another name for a homogeneous polynomial). For example, :4x^2 + 2xy - 3y^2 is a quadratic form in the variables and . The coefficients usually belong to a ...
and is a scalar (mathematics), scalar: :\mathbf'\mathbf\mathbf = \sum_a_ x_i x_j In other words, it sums up all possible combinations of products of pairs of elements from x, with a separate coefficient for each. In addition, since x_i x_j = x_j x_i, only the sum a_ + a_ matters for any off-diagonal elements of A, and there is no loss of generality in assuming that A is symmetric matrix, symmetric. Furthermore, if A is symmetric, then the form \mathbf'\mathbf\mathbf = \mathbf'\mathbf\mathbf.


Sum of differences from the mean

Another useful formula is as follows: \sum_^n (x_i-\mu)^2 = \sum_^n (x_i-\bar)^2 + n(\bar -\mu)^2 where \bar = \frac \sum_^n x_i.


With known variance

For a set of i.i.d. normally distributed data points X of size ''n'' where each individual point ''x'' follows x \sim \mathcal(\mu, \sigma^2) with known
variance In probability theory and statistics, variance is the expectation of the squared deviation of a random variable from its population mean or sample mean. Variance is a measure of dispersion, meaning it is a measure of how far a set of numbers ...
σ2, the conjugate prior distribution is also normally distributed. This can be shown more easily by rewriting the variance as the
precision Precision, precise or precisely may refer to: Science, and technology, and mathematics Mathematics and computing (general) * Accuracy and precision, measurement deviation from true value and its scatter * Significant figures, the number of digit ...
, i.e. using τ = 1/σ2. Then if x \sim \mathcal(\mu, 1/\tau) and \mu \sim \mathcal(\mu_0, 1/\tau_0), we proceed as follows. First, the likelihood function is (using the formula above for the sum of differences from the mean): :\begin p(\mathbf\mid\mu,\tau) &= \prod_^n \sqrt \exp\left(-\frac\tau(x_i-\mu)^2\right) \\ &= \left(\frac\right)^ \exp\left(-\frac\tau \sum_^n (x_i-\mu)^2\right) \\ &= \left(\frac\right)^ \exp\left[-\frac\tau \left(\sum_^n(x_i-\bar)^2 + n(\bar -\mu)^2\right)\right]. \end Then, we proceed as follows: :\begin p(\mu\mid\mathbf) &\propto p(\mathbf\mid\mu) p(\mu) \\ & = \left(\frac\right)^ \exp\left[-\frac\tau \left(\sum_^n(x_i-\bar)^2 + n(\bar -\mu)^2\right)\right] \sqrt \exp\left(-\frac\tau_0(\mu-\mu_0)^2\right) \\ &\propto \exp\left(-\frac\left(\tau\left(\sum_^n(x_i-\bar)^2 + n(\bar -\mu)^2\right) + \tau_0(\mu-\mu_0)^2\right)\right) \\ &\propto \exp\left(-\frac \left(n\tau(\bar-\mu)^2 + \tau_0(\mu-\mu_0)^2 \right)\right) \\ &= \exp\left(-\frac(n\tau + \tau_0)\left(\mu - \dfrac\right)^2 + \frac(\bar - \mu_0)^2\right) \\ &\propto \exp\left(-\frac(n\tau + \tau_0)\left(\mu - \dfrac\right)^2\right) \end In the above derivation, we used the formula above for the sum of two quadratics and eliminated all constant factors not involving ''μ''. The result is the kernel (statistics), kernel of a normal distribution, with mean \frac and precision n\tau + \tau_0, i.e. :p(\mu\mid\mathbf) \sim \mathcal\left(\frac, \frac\right) This can be written as a set of Bayesian update equations for the posterior parameters in terms of the prior parameters: :\begin \tau_0' &= \tau_0 + n\tau \\[5pt] \mu_0' &= \frac \\[5pt] \bar &= \frac\sum_^n x_i \end That is, to combine ''n'' data points with total precision of ''nτ'' (or equivalently, total variance of ''n''/''σ''2) and mean of values \bar, derive a new total precision simply by adding the total precision of the data to the prior total precision, and form a new mean through a ''precision-weighted average'', i.e. a weighted average of the data mean and the prior mean, each weighted by the associated total precision. This makes logical sense if the precision is thought of as indicating the certainty of the observations: In the distribution of the posterior mean, each of the input components is weighted by its certainty, and the certainty of this distribution is the sum of the individual certainties. (For the intuition of this, compare the expression "the whole is (or is not) greater than the sum of its parts". In addition, consider that the knowledge of the posterior comes from a combination of the knowledge of the prior and likelihood, so it makes sense that we are more certain of it than of either of its components.) The above formula reveals why it is more convenient to do Bayesian analysis of conjugate priors for the normal distribution in terms of the precision. The posterior precision is simply the sum of the prior and likelihood precisions, and the posterior mean is computed through a precision-weighted average, as described above. The same formulas can be written in terms of variance by reciprocating all the precisions, yielding the more ugly formulas :\begin ' &= \frac \\[5pt] \mu_0' &= \frac \\[5pt] \bar &= \frac\sum_^n x_i \end


With known mean

For a set of i.i.d. normally distributed data points X of size ''n'' where each individual point ''x'' follows x \sim \mathcal(\mu, \sigma^2) with known mean μ, the conjugate prior of the
variance In probability theory and statistics, variance is the expectation of the squared deviation of a random variable from its population mean or sample mean. Variance is a measure of dispersion, meaning it is a measure of how far a set of numbers ...
has an inverse gamma distribution or a scaled inverse chi-squared distribution. The two are equivalent 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. The prior for σ2 is as follows: :p(\sigma^2\mid\nu_0,\sigma_0^2) = \frac~\frac \propto \frac The likelihood function from above, written in terms of the variance, is: :\begin p(\mathbf\mid\mu,\sigma^2) &= \left(\frac\right)^ \exp\left[-\frac \sum_^n (x_i-\mu)^2\right] \\ &= \left(\frac\right)^ \exp\left[-\frac\right] \end where :S = \sum_^n (x_i-\mu)^2. Then: :\begin p(\sigma^2\mid\mathbf) &\propto p(\mathbf\mid\sigma^2) p(\sigma^2) \\ &= \left(\frac\right)^ \exp\left[-\frac\right] \frac~\frac \\ &\propto \left(\frac\right)^ \frac \exp\left[-\frac + \frac\right] \\ &= \frac \exp\left[-\frac\right] \end The above is also a scaled inverse chi-squared distribution where :\begin \nu_0' &= \nu_0 + n \\ \nu_0'' &= \nu_0 \sigma_0^2 + \sum_^n (x_i-\mu)^2 \end or equivalently :\begin \nu_0' &= \nu_0 + n \\ ' &= \frac \end Reparameterizing in terms of an inverse gamma distribution, the result is: :\begin \alpha' &= \alpha + \frac \\ \beta' &= \beta + \frac \end


With unknown mean and unknown variance

For a set of i.i.d. normally distributed data points X of size ''n'' where each individual point ''x'' follows x \sim \mathcal(\mu, \sigma^2) with unknown mean μ and unknown
variance In probability theory and statistics, variance is the expectation of the squared deviation of a random variable from its population mean or sample mean. Variance is a measure of dispersion, meaning it is a measure of how far a set of numbers ...
σ2, a combined (multivariate) conjugate prior is placed over the mean and variance, consisting of a normal-inverse-gamma distribution. Logically, this originates as follows: # From the analysis of the case with unknown mean but known variance, we see that the update equations involve sufficient statistics computed from the data consisting of the mean of the data points and the total variance of the data points, computed in turn from the known variance divided by the number of data points. # From the analysis of the case with unknown variance but known mean, we see that the update equations involve sufficient statistics over the data consisting of the number of data points and sum of squared deviations. # Keep in mind that the posterior update values serve as the prior distribution when further data is handled. Thus, we should logically think of our priors in terms of the sufficient statistics just described, with the same semantics kept in mind as much as possible. # To handle the case where both mean and variance are unknown, we could place independent priors over the mean and variance, with fixed estimates of the average mean, total variance, number of data points used to compute the variance prior, and sum of squared deviations. Note however that in reality, the total variance of the mean depends on the unknown variance, and the sum of squared deviations that goes into the variance prior (appears to) depend on the unknown mean. In practice, the latter dependence is relatively unimportant: Shifting the actual mean shifts the generated points by an equal amount, and on average the squared deviations will remain the same. This is not the case, however, with the total variance of the mean: As the unknown variance increases, the total variance of the mean will increase proportionately, and we would like to capture this dependence. # This suggests that we create a ''conditional prior'' of the mean on the unknown variance, with a hyperparameter specifying the mean of the pseudo-observations associated with the prior, and another parameter specifying the number of pseudo-observations. This number serves as a scaling parameter on the variance, making it possible to control the overall variance of the mean relative to the actual variance parameter. The prior for the variance also has two hyperparameters, one specifying the sum of squared deviations of the pseudo-observations associated with the prior, and another specifying once again the number of pseudo-observations. Note that each of the priors has a hyperparameter specifying the number of pseudo-observations, and in each case this controls the relative variance of that prior. These are given as two separate hyperparameters so that the variance (aka the confidence) of the two priors can be controlled separately. # This leads immediately to the normal-inverse-gamma distribution, which is the product of the two distributions just defined, with conjugate priors used (an inverse gamma distribution over the variance, and a normal distribution over the mean, ''conditional'' on the variance) and with the same four parameters just defined. The priors are normally defined as follows: :\begin p(\mu\mid\sigma^2; \mu_0, n_0) &\sim \mathcal(\mu_0,\sigma^2/n_0) \\ p(\sigma^2; \nu_0,\sigma_0^2) &\sim I\chi^2(\nu_0,\sigma_0^2) = IG(\nu_0/2, \nu_0\sigma_0^2/2) \end The update equations can be derived, and look as follows: :\begin \bar &= \frac 1 n \sum_^n x_i \\ \mu_0' &= \frac \\ n_0' &= n_0 + n \\ \nu_0' &= \nu_0 + n \\ \nu_0'' &= \nu_0 \sigma_0^2 + \sum_^n (x_i-\bar)^2 + \frac(\mu_0 - \bar)^2 \end The respective numbers of pseudo-observations add the number of actual observations to them. The new mean hyperparameter is once again a weighted average, this time weighted by the relative numbers of observations. Finally, the update for \nu_0'' is similar to the case with known mean, but in this case the sum of squared deviations is taken with respect to the observed data mean rather than the true mean, and as a result a new "interaction term" needs to be added to take care of the additional error source stemming from the deviation between prior and data mean.


Occurrence and applications

The occurrence of normal distribution in practical problems can be loosely classified into four categories: # Exactly normal distributions; # Approximately normal laws, for example when such approximation is justified by the
central limit theorem In probability theory, the central limit theorem (CLT) establishes that, in many situations, when independent random variables are summed up, their properly normalized sum tends toward a normal distribution even if the original variables themselv ...
; and # Distributions modeled as normal – the normal distribution being the distribution with Principle of maximum entropy, maximum entropy for a given mean and variance. # Regression problems – the normal distribution being found after systematic effects have been modeled sufficiently well.


Exact normality

Certain quantities in physics are distributed normally, as was first demonstrated by James Clerk Maxwell. Examples of such quantities are: * Probability density function of a ground state in a quantum harmonic oscillator. * The position of a particle that experiences diffusion. If initially the particle is located at a specific point (that is its probability distribution is the Dirac delta function), then after time ''t'' its location is described by a normal distribution with variance ''t'', which satisfies the diffusion equation \frac f(x,t) = \frac \frac f(x,t). If the initial location is given by a certain density function g(x), then the density at time ''t'' is the convolution of ''g'' and the normal PDF.


Approximate normality

''Approximately'' normal distributions occur in many situations, as explained by the
central limit theorem In probability theory, the central limit theorem (CLT) establishes that, in many situations, when independent random variables are summed up, their properly normalized sum tends toward a normal distribution even if the original variables themselv ...
. When the outcome is produced by many small effects acting ''additively and independently'', its distribution will be close to normal. The normal approximation will not be valid if the effects act multiplicatively (instead of additively), or if there is a single external influence that has a considerably larger magnitude than the rest of the effects. * In counting problems, where the central limit theorem includes a discrete-to-continuum approximation and where Infinite divisibility, infinitely divisible and Indecomposable distribution, decomposable distributions are involved, such as ** binomial distribution, Binomial random variables, associated with binary response variables; ** Poisson distribution, Poisson random variables, associated with rare events; * Thermal radiation has a Bose–Einstein statistics, Bose–Einstein distribution on very short time scales, and a normal distribution on longer timescales due to the central limit theorem.


Assumed normality

There are statistical methods to empirically test that assumption; see the above #Normality tests, Normality tests section. * In biology, the ''logarithm'' of various variables tend to have a normal distribution, that is, they tend to have a
log-normal distribution In probability theory, a log-normal (or lognormal) distribution is a continuous probability distribution of a random variable whose logarithm is normally distributed. Thus, if the random variable is log-normally distributed, then has a normal ...
(after separation on male/female subpopulations), with examples including: ** Measures of size of living tissue (length, height, skin area, weight); ** The ''length'' of ''inert'' appendages (hair, claws, nails, teeth) of biological specimens, ''in the direction of growth''; presumably the thickness of tree bark also falls under this category; ** Certain physiological measurements, such as blood pressure of adult humans. * In finance, in particular the Black–Scholes model, changes in the ''logarithm'' of exchange rates, price indices, and stock market indices are assumed normal (these variables behave like compound interest, not like simple interest, and so are multiplicative). Some mathematicians such as Benoit Mandelbrot have argued that Levy skew alpha-stable distribution, log-Levy distributions, which possesses heavy tails would be a more appropriate model, in particular for the analysis for stock market crashes. The use of the assumption of normal distribution occurring in financial models has also been criticized by Nassim Nicholas Taleb in his works. * Propagation of uncertainty, Measurement errors in physical experiments are often modeled by a normal distribution. This use of a normal distribution does not imply that one is assuming the measurement errors are normally distributed, rather using the normal distribution produces the most conservative predictions possible given only knowledge about the mean and variance of the errors. * In Standardized testing (statistics), standardized testing, results can be made to have a normal distribution by either selecting the number and difficulty of questions (as in the Intelligence quotient, IQ test) or transforming the raw test scores into "output" scores by fitting them to the normal distribution. For example, the SAT's traditional range of 200–800 is based on a normal distribution with a mean of 500 and a standard deviation of 100. * Many scores are derived from the normal distribution, including percentile ranks ("percentiles" or "quantiles"), normal curve equivalents, stanines, Standard score, z-scores, and T-scores. Additionally, some behavioral statistical procedures assume that scores are normally distributed; for example, Student's t-test, t-tests and Analysis of variance, ANOVAs. Bell curve grading assigns relative grades based on a normal distribution of scores. * In hydrology the distribution of long duration river discharge or rainfall, e.g. monthly and yearly totals, is often thought to be practically normal according to the
central limit theorem In probability theory, the central limit theorem (CLT) establishes that, in many situations, when independent random variables are summed up, their properly normalized sum tends toward a normal distribution even if the original variables themselv ...
. The blue picture, made with CumFreq, illustrates an example of fitting the normal distribution to ranked October rainfalls showing the 90% confidence belt based on the
binomial distribution In probability theory and statistics, the binomial distribution with parameters ''n'' and ''p'' is the discrete probability distribution of the number of successes in a sequence of ''n'' independent experiments, each asking a yes–no quest ...
. The rainfall data are represented by plotting positions as part of the cumulative frequency analysis.


Methodological problems and peer review

John Ioannidis argues that using normally distributed standard deviations as standards for validating research findings leave falsifiability, falsifiable predictions about phenomena that are not normally distributed untested. This includes, for example, phenomena that only appear when all necessary conditions are present and one cannot be a substitute for another in an addition-like way and phenomena that are not randomly distributed. Ioannidis argues that standard deviation-centered validation gives a false appearance of validity to hypotheses and theories where some but not all falsifiable predictions are normally distributed since the portion of falsifiable predictions that there is evidence against may and in some cases are in the non-normally distributed parts of the range of falsifiable predictions, as well as baselessly dismissing hypotheses for which none of the falsifiable predictions are normally distributed as if were they unfalsifiable when in fact they do make falsifiable predictions. It is argued by Ioannidis that many cases of mutually exclusive theories being accepted as "validated" by research journals are caused by failure of the journals to take in empirical falsifications of non-normally distributed predictions, and not because mutually exclusive theories are true, which they cannot be, although two mutually exclusive theories can both be wrong and a third one correct.


Computational methods


Generating values from normal distribution

In computer simulations, especially in applications of the Monte-Carlo method, it is often desirable to generate values that are normally distributed. The algorithms listed below all generate the standard normal deviates, since a can be generated as , where ''Z'' is standard normal. All these algorithms rely on the availability of a random number generator ''U'' capable of producing Uniform distribution (continuous), uniform random variates. * The most straightforward method is based on the probability integral transform property: if ''U'' is distributed uniformly on (0,1), then Φ−1(''U'') will have the standard normal distribution. The drawback of this method is that it relies on calculation of the
probit function In probability theory and statistics, the probit function is the quantile function associated with the standard normal distribution. It has applications in data analysis and machine learning, in particular exploratory statistical graphics and ...
Φ−1, which cannot be done analytically. Some approximate methods are described in and in the error function, erf article. Wichura gives a fast algorithm for computing this function to 16 decimal places, which is used by R programming language, R to compute random variates of the normal distribution. * Irwin–Hall distribution#Approximating a Normal distribution, An easy-to-program approximate approach that relies on the
central limit theorem In probability theory, the central limit theorem (CLT) establishes that, in many situations, when independent random variables are summed up, their properly normalized sum tends toward a normal distribution even if the original variables themselv ...
is as follows: generate 12 uniform ''U''(0,1) deviates, add them all up, and subtract 6 – the resulting random variable will have approximately standard normal distribution. In truth, the distribution will be Irwin–Hall distribution, Irwin–Hall, which is a 12-section eleventh-order polynomial approximation to the normal distribution. This random deviate will have a limited range of (−6, 6). Note that in a true normal distribution, only 0.00034% of all samples will fall outside ±6σ. * The Box–Muller transform, Box–Muller method uses two independent random numbers ''U'' and ''V'' distributed uniform distribution (continuous), uniformly on (0,1). Then the two random variables ''X'' and ''Y'' X = \sqrt \, \cos(2 \pi V) , \qquad Y = \sqrt \, \sin(2 \pi V) . will both have the standard normal distribution, and will be
independent Independent or Independents may refer to: Arts, entertainment, and media Artist groups * Independents (artist group), a group of modernist painters based in the New Hope, Pennsylvania, area of the United States during the early 1930s * Independ ...
. This formulation arises because for a bivariate normal random vector (''X'', ''Y'') the squared norm will have the
chi-squared distribution In probability theory and statistics, the chi-squared distribution (also chi-square or \chi^2-distribution) with k degrees of freedom is the distribution of a sum of the squares of k independent standard normal random variables. The chi-squa ...
with two degrees of freedom, which is an easily generated exponential distribution, exponential random variable corresponding to the quantity −2ln(''U'') in these equations; and the angle is distributed uniformly around the circle, chosen by the random variable ''V''. * The Marsaglia polar method is a modification of the Box–Muller method which does not require computation of the sine and cosine functions. In this method, ''U'' and ''V'' are drawn from the uniform (−1,1) distribution, and then is computed. If ''S'' is greater or equal to 1, then the method starts over, otherwise the two quantities X = U\sqrt, \qquad Y = V\sqrt are returned. Again, ''X'' and ''Y'' are independent, standard normal random variables. * The Ratio method is a rejection method. The algorithm proceeds as follows: ** Generate two independent uniform deviates ''U'' and ''V''; ** Compute ''X'' = (''V'' − 0.5)/''U''; ** Optional: if ''X''2 ≤ 5 − 4''e''1/4''U'' then accept ''X'' and terminate algorithm; ** Optional: if ''X''2 ≥ 4''e''−1.35/''U'' + 1.4 then reject ''X'' and start over from step 1; ** If ''X''2 ≤ −4 ln''U'' then accept ''X'', otherwise start over the algorithm. *:The two optional steps allow the evaluation of the logarithm in the last step to be avoided in most cases. These steps can be greatly improved so that the logarithm is rarely evaluated. * The ziggurat algorithm is faster than the Box–Muller transform and still exact. In about 97% of all cases it uses only two random numbers, one random integer and one random uniform, one multiplication and an if-test. Only in 3% of the cases, where the combination of those two falls outside the "core of the ziggurat" (a kind of rejection sampling using logarithms), do exponentials and more uniform random numbers have to be employed. * Integer arithmetic can be used to sample from the standard normal distribution. This method is exact in the sense that it satisfies the conditions of ''ideal approximation''; i.e., it is equivalent to sampling a real number from the standard normal distribution and rounding this to the nearest representable floating point number. * There is also some investigation into the connection between the fast Hadamard transform and the normal distribution, since the transform employs just addition and subtraction and by the central limit theorem random numbers from almost any distribution will be transformed into the normal distribution. In this regard a series of Hadamard transforms can be combined with random permutations to turn arbitrary data sets into a normally distributed data.


Numerical approximations for the normal CDF and normal quantile function

The standard normal cumulative distribution function, CDF is widely used in scientific and statistical computing. The values Φ(''x'') may be approximated very accurately by a variety of methods, such as numerical integration, Taylor series, asymptotic series and Gauss's continued fraction#Of Kummer's confluent hypergeometric function, continued fractions. Different approximations are used depending on the desired level of accuracy. * give the approximation for Φ(''x'') for ''x > 0'' with the absolute error (algorith
26.2.17
: \Phi(x) = 1 - \varphi(x)\left(b_1 t + b_2 t^2 + b_3t^3 + b_4 t^4 + b_5 t^5\right) + \varepsilon(x), \qquad t = \frac, where ''ϕ''(''x'') is the standard normal PDF, and ''b''0 = 0.2316419, ''b''1 = 0.319381530, ''b''2 = −0.356563782, ''b''3 = 1.781477937, ''b''4 = −1.821255978, ''b''5 = 1.330274429. * lists some dozens of approximations – by means of rational functions, with or without exponentials – for the function. His algorithms vary in the degree of complexity and the resulting precision, with maximum absolute precision of 24 digits. An algorithm by combines Hart's algorithm 5666 with a continued fraction approximation in the tail to provide a fast computation algorithm with a 16-digit precision. * after recalling Hart68 solution is not suited for erf, gives a solution for both erf and erfc, with maximal relative error bound, via rational function, Rational Chebyshev Approximation. * suggested a simple algorithm based on the Taylor series expansion \Phi(x) = \frac12 + \varphi(x)\left( x + \frac 3 + \frac + \frac + \frac + \cdots \right) for calculating with arbitrary precision. The drawback of this algorithm is comparatively slow calculation time (for example it takes over 300 iterations to calculate the function with 16 digits of precision when ). * The GNU Scientific Library calculates values of the standard normal CDF using Hart's algorithms and approximations with Chebyshev polynomials. Shore (1982) introduced simple approximations that may be incorporated in stochastic optimization models of engineering and operations research, like reliability engineering and inventory analysis. Denoting , the simplest approximation for the quantile function is: z = \Phi^(p)=5.5556\left[1- \left( \frac p \right)^\right],\qquad p\ge 1/2 This approximation delivers for ''z'' a maximum absolute error of 0.026 (for , corresponding to ). For replace ''p'' by and change sign. Another approximation, somewhat less accurate, is the single-parameter approximation: z=-0.4115\left\, \qquad p\ge 1/2 The latter had served to derive a simple approximation for the loss integral of the normal distribution, defined by \begin L(z) & =\int_z^\infty (u-z)\varphi(u) \, du=\int_z^\infty [1-\Phi (u)] \, du \\[5pt] L(z) & \approx \begin 0.4115\left(\dfrac p \right) - z, & p<1/2, \\ \\ 0.4115\left( \dfrac p \right), & p\ge 1/2. \end \\[5pt] \text \\ L(z) & \approx \begin 0.4115\left\, & p < 1/2, \\ \\ 0.4115 \dfrac p, & p\ge 1/2. \end \end This approximation is particularly accurate for the right far-tail (maximum error of 10−3 for z≥1.4). Highly accurate approximations for the CDF, based on Response modeling methodology, Response Modeling Methodology (RMM, Shore, 2011, 2012), are shown in Shore (2005). Some more approximations can be found at: Error function#Approximation with elementary functions. In particular, small ''relative'' error on the whole domain for the CDF \Phi and the quantile function \Phi^ as well, is achieved via an explicitly invertible formula by Sergei Winitzki in 2008.


History


Development

Some authors attribute the credit for the discovery of the normal distribution to Abraham de Moivre, de Moivre, who in 1738 published in the second edition of his "''The Doctrine of Chances''" the study of the coefficients in the binomial expansion of . De Moivre proved that the middle term in this expansion has the approximate magnitude of 2^n/\sqrt, and that "If ''m'' or ''n'' be a Quantity infinitely great, then the Logarithm of the Ratio, which a Term distant from the middle by the Interval ''ℓ'', has to the middle Term, is -\frac." Although this theorem can be interpreted as the first obscure expression for the normal probability law, Stephen Stigler, Stigler points out that de Moivre himself did not interpret his results as anything more than the approximate rule for the binomial coefficients, and in particular de Moivre lacked the concept of the probability density function. In 1823 Carl Friedrich Gauss, Gauss published his monograph "''Theoria combinationis observationum erroribus minimis obnoxiae''" where among other things he introduces several important statistical concepts, such as the method of least squares, the method of maximum likelihood, and the ''normal distribution''. Gauss used ''M'', , to denote the measurements of some unknown quantity ''V'', and sought the "most probable" estimator of that quantity: the one that maximizes the probability of obtaining the observed experimental results. In his notation φΔ is the probability density function of the measurement errors of magnitude Δ. Not knowing what the function ''φ'' is, Gauss requires that his method should reduce to the well-known answer: the arithmetic mean of the measured values. Starting from these principles, Gauss demonstrates that the only law that rationalizes the choice of arithmetic mean as an estimator of the location parameter, is the normal law of errors: \varphi\mathit = \frac h \, e^, where ''h'' is "the measure of the precision of the observations". Using this normal law as a generic model for errors in the experiments, Gauss formulates what is now known as the non-linear least squares, non-linear weighted least squares method. Although Gauss was the first to suggest the normal distribution law, Pierre Simon de Laplace, Laplace made significant contributions. It was Laplace who first posed the problem of aggregating several observations in 1774, although his own solution led to the Laplacian distribution. It was Laplace who first calculated the value of the Gaussian integral, integral in 1782, providing the normalization constant for the normal distribution. Finally, it was Laplace who in 1810 proved and presented to the Academy the fundamental
central limit theorem In probability theory, the central limit theorem (CLT) establishes that, in many situations, when independent random variables are summed up, their properly normalized sum tends toward a normal distribution even if the original variables themselv ...
, which emphasized the theoretical importance of the normal distribution. It is of interest to note that in 1809 an Irish-American mathematician Robert Adrain published two insightful but flawed derivations of the normal probability law, simultaneously and independently from Gauss. His works remained largely unnoticed by the scientific community, until in 1871 they were exhumed by Cleveland Abbe, Abbe. In the middle of the 19th century James Clerk Maxwell, Maxwell demonstrated that the normal distribution is not just a convenient mathematical tool, but may also occur in natural phenomena: "The number of particles whose velocity, resolved in a certain direction, lies between ''x'' and ''x'' + ''dx'' is \operatorname \frac\; e^ \, dx


Naming

Today, the concept is usually known in English as the normal distribution or Gaussian distribution. Other less common names include Gauss distribution, Laplace-Gauss distribution, the law of error, the law of facility of errors, Laplace's second law, Gaussian law. Gauss himself apparently coined the term with reference to the "normal equations" involved in its applications, with normal having its technical meaning of orthogonal rather than "usual". However, by the end of the 19th century some authors had started using the name ''normal distribution'', where the word "normal" was used as an adjective – the term now being seen as a reflection of the fact that this distribution was seen as typical, common – and thus "normal". Charles Sanders Peirce, Peirce (one of those authors) once defined "normal" thus: "...the 'normal' is not the average (or any other kind of mean) of what actually occurs, but of what ''would'', in the long run, occur under certain circumstances." Around the turn of the 20th century Karl Pearson, Pearson popularized the term ''normal'' as a designation for this distribution. Also, it was Pearson who first wrote the distribution in terms of the standard deviation ''σ'' as in modern notation. Soon after this, in year 1915, Ronald Fisher, Fisher added the location parameter to the formula for normal distribution, expressing it in the way it is written nowadays: df = \frac e^ \, dx. The term "standard normal", which denotes the normal distribution with zero mean and unit variance came into general use around the 1950s, appearing in the popular textbooks by P. G. Hoel (1947) "''Introduction to mathematical statistics''" and A. M. Mood (1950) "''Introduction to the theory of statistics''".


See also

* Bates distribution – similar to the Irwin–Hall distribution, but rescaled back into the 0 to 1 range * Behrens–Fisher problem – the long-standing problem of testing whether two normal samples with different variances have same means; * Bhattacharyya distance – method used to separate mixtures of normal distributions * Erdős–Kac theorem – on the occurrence of the normal distribution in number theory * Full width at half maximum * Gaussian blur – convolution, which uses the normal distribution as a kernel * Modified half-normal distribution with the pdf on (0, \infty) is given as f(x)= \frac, where \Psi(\alpha,z)=_1\Psi_1\left(\begin\left(\alpha,\frac\right)\\(1,0)\end;z \right) denotes the Fox-Wright Psi function. * Normally distributed and uncorrelated does not imply independent * Ratio normal distribution * Reciprocal normal distribution * Standard normal table * Stein's lemma * Sub-Gaussian distribution * Sum of normally distributed random variables * Tweedie distribution – The normal distribution is a member of the family of Tweedie exponential dispersion models. * Wrapped normal distribution – the Normal distribution applied to a circular domain * Z-test – using the normal distribution


Notes


References


Citations


Sources

* * In particular, the entries fo
"bell-shaped and bell curve"
an

* * * * * * * * * * * * * * * * * * * * * * * * Translated by Stephen M. Stigler in ''Statistical Science'' 1 (3), 1986: . * * * * * * * * * * * * * * * * * * * * * * * * * * * *


External links

*
Normal distribution calculator
{{Authority control Normal distribution, Continuous distributions Conjugate prior distributions Exponential family distributions Stable distributions Location-scale family probability distributions]">X - \mu, ^p\right&= \sigma^p (p-1)!! \cdot \begin \sqrt & \textp\text \\ 1 & \textp\text \end \\ &= \sigma^p \cdot \frac. \end The last formula is valid also for any non-integer p>-1. When the mean \mu \ne 0, the plain and absolute moments can be expressed in terms of
confluent hypergeometric function In mathematics, a confluent hypergeometric function is a solution of a confluent hypergeometric equation, which is a degenerate form of a hypergeometric differential equation where two of the three regular singularities merge into an irregular ...
s _1F_1 and U. :\begin \operatorname\left ^p\right&= \sigma^p\cdot (-i\sqrt 2)^p U\left(-\frac, \frac, -\frac \left( \frac \mu \sigma \right)^2 \right), \\ \operatorname\left[, X, ^p \right] &= \sigma^p \cdot 2^ \frac _1F_1\left( -\frac, \frac, -\frac \left( \frac \mu \sigma \right)^2 \right). \end These expressions remain valid even if p is not an integer. See also Hermite polynomials#"Negative variance", generalized Hermite polynomials. The expectation of X conditioned on the event that X lies in an interval ,b/math> is given by :\operatorname\left \mid a= \mu - \sigma^2\frac where f and F respectively are the density and the cumulative distribution function of X. For b=\infty this is known as the
inverse Mills ratio In probability theory, the Mills ratio (or Mills's ratio) of a continuous random variable X is the function : m(x) := \frac , where f(x) is the probability density function, and :\bar(x) := \Pr x.html" ;"title=">x">>x= \int_x^ f(u)\, du is the ...
. Note that above, density f of X is used instead of standard normal density as in inverse Mills ratio, so here we have \sigma^2 instead of \sigma.


Fourier transform and characteristic function

The
Fourier transform A Fourier transform (FT) is a mathematical transform that decomposes functions into frequency components, which are represented by the output of the transform as a function of frequency. Most commonly functions of time or space are transformed, ...
of a normal density f with mean \mu and standard deviation \sigma is : \hat f(t) = \int_^\infty f(x)e^ \, dx = e^ e^ where i is the
imaginary unit The imaginary unit or unit imaginary number () is a solution to the quadratic equation x^2+1=0. Although there is no real number with this property, can be used to extend the real numbers to what are called complex numbers, using addition an ...
. If the mean \mu=0, the first factor is 1, and the Fourier transform is, apart from a constant factor, a normal density on the
frequency domain In physics, electronics, control systems engineering, and statistics, the frequency domain refers to the analysis of mathematical functions or signals with respect to frequency, rather than time. Put simply, a time-domain graph shows how a signa ...
, with mean 0 and standard deviation 1/\sigma. In particular, the standard normal distribution \varphi is an
eigenfunction In mathematics, an eigenfunction of a linear operator ''D'' defined on some function space is any non-zero function f in that space that, when acted upon by ''D'', is only multiplied by some scaling factor called an eigenvalue. As an equation, th ...
of the Fourier transform. In probability theory, the Fourier transform of the probability distribution of a real-valued random variable X is closely connected to the
characteristic function In mathematics, the term "characteristic function" can refer to any of several distinct concepts: * The indicator function of a subset, that is the function ::\mathbf_A\colon X \to \, :which for a given subset ''A'' of ''X'', has value 1 at points ...
\varphi_X(t) of that variable, which is defined as the
expected value In probability theory, the expected value (also called expectation, expectancy, mathematical expectation, mean, average, or first moment) is a generalization of the weighted average. Informally, the expected value is the arithmetic mean of a l ...
of e^, as a function of the real variable t (the
frequency Frequency is the number of occurrences of a repeating event per unit of time. It is also occasionally referred to as ''temporal frequency'' for clarity, and is distinct from ''angular frequency''. Frequency is measured in hertz (Hz) which is eq ...
parameter of the Fourier transform). This definition can be analytically extended to a complex-value variable t. The relation between both is: :\varphi_X(t) = \hat f(-t)


Moment and cumulant generating functions

The
moment generating function In probability theory and statistics, the moment-generating function of a real-valued random variable is an alternative specification of its probability distribution. Thus, it provides the basis of an alternative route to analytical results compare ...
of a real random variable X is the expected value of e^, as a function of the real parameter t. For a normal distribution with density f, mean \mu and deviation \sigma, the moment generating function exists and is equal to :M(t) = \operatorname ^= \hat f(it) = e^ e^ The
cumulant generating function In probability theory and statistics, the cumulants of a probability distribution are a set of quantities that provide an alternative to the '' moments'' of the distribution. Any two probability distributions whose moments are identical will have ...
is the logarithm of the moment generating function, namely :g(t) = \ln M(t) = \mu t + \tfrac 12 \sigma^2 t^2 Since this is a quadratic polynomial in t, only the first two
cumulant In probability theory and statistics, the cumulants of a probability distribution are a set of quantities that provide an alternative to the '' moments'' of the distribution. Any two probability distributions whose moments are identical will ha ...
s are nonzero, namely the mean \mu and the variance \sigma^2.


Stein operator and class

Within
Stein's method Stein's method is a general method in probability theory to obtain bounds on the distance between two probability distributions with respect to a probability metric. It was introduced by Charles Stein, who first published it in 1972, to obtain ...
the Stein operator and class of a random variable X \sim \mathcal(\mu, \sigma^2) are \mathcalf(x) = \sigma^2 f'(x) - (x-\mu)f(x) and \mathcal the class of all absolutely continuous functions f : \R \to \R \mbox\mathbb[, f'(X), ]< \infty.


Zero-variance limit

In the limit (mathematics), limit when \sigma tends to zero, the probability density f(x) eventually tends to zero at any x\ne \mu, but grows without limit if x = \mu, while its integral remains equal to 1. Therefore, the normal distribution cannot be defined as an ordinary
function Function or functionality may refer to: Computing * Function key, a type of key on computer keyboards * Function model, a structured representation of processes in a system * Function object or functor or functionoid, a concept of object-oriente ...
when \sigma = 0. However, one can define the normal distribution with zero variance as a
generalized function In mathematics, generalized functions are objects extending the notion of functions. There is more than one recognized theory, for example the theory of distributions. Generalized functions are especially useful in making discontinuous functions ...
; specifically, as Dirac's "delta function" \delta translated by the mean \mu, that is f(x)=\delta(x-\mu). Its CDF is then the
Heaviside step function The Heaviside step function, or the unit step function, usually denoted by or (but sometimes , or ), is a step function, named after Oliver Heaviside (1850–1925), the value of which is zero for negative arguments and one for positive argume ...
translated by the mean \mu, namely :F(x) = \begin 0 & \textx < \mu \\ 1 & \textx \geq \mu \end


Maximum entropy

Of all probability distributions over the reals with a specified mean \mu and variance \sigma^2, the normal distribution N(\mu,\sigma^2) is the one with maximum entropy. If X is a
continuous random variable In probability theory and statistics, a probability distribution is the mathematical function that gives the probabilities of occurrence of different possible outcomes for an experiment. It is a mathematical description of a random phenomenon i ...
with
probability density In probability theory, a probability density function (PDF), or density of a continuous random variable, is a function whose value at any given sample (or point) in the sample space (the set of possible values taken by the random variable) can ...
f(x), then the entropy of X is defined as : H(X) = - \int_^\infty f(x)\log f(x)\, dx where f(x)\log f(x) is understood to be zero whenever f(x)=0. This functional can be maximized, subject to the constraints that the distribution is properly normalized and has a specified variance, by using
variational calculus The calculus of variations (or Variational Calculus) is a field of mathematical analysis that uses variations, which are small changes in functions and functionals, to find maxima and minima of functionals: mappings from a set of functions t ...
. A function with two
Lagrange multipliers In mathematical optimization, the method of Lagrange multipliers is a strategy for finding the local maxima and minima of a function subject to equality constraints (i.e., subject to the condition that one or more equations have to be satisfied ex ...
is defined: : L=\int_^\infty f(x)\ln(f(x))\,dx-\lambda_0\left(1-\int_^\infty f(x)\,dx\right)-\lambda\left(\sigma^2-\int_^\infty f(x)(x-\mu)^2\,dx\right) where f(x) is, for now, regarded as some density function with mean \mu and standard deviation \sigma. At maximum entropy, a small variation \delta f(x) about f(x) will produce a variation \delta L about L which is equal to 0: : 0=\delta L=\int_^\infty \delta f(x)\left (\ln(f(x))+1+\lambda_0+\lambda(x-\mu)^2\right )\,dx Since this must hold for any small \delta f(x), the term in brackets must be zero, and solving for f(x) yields: :f(x)=e^ Using the constraint equations to solve for \lambda_0 and \lambda yields the density of the normal distribution: : f(x, \mu, \sigma)=\frace^ The entropy of a normal distribution is equal to : H(X)=\tfrac(1+\log(2\sigma^2\pi))


Other properties


Related distributions


Central limit theorem

The central limit theorem states that under certain (fairly common) conditions, the sum of many random variables will have an approximately normal distribution. More specifically, where X_1,\ldots ,X_n are
independent and identically distributed In probability theory and statistics, a collection of random variables is independent and identically distributed if each random variable has the same probability distribution as the others and all are mutually independent. This property is usua ...
random variables with the same arbitrary distribution, zero mean, and variance \sigma^2 and Z is their mean scaled by \sqrt : Z = \sqrt\left(\frac\sum_^n X_i\right) Then, as n increases, the probability distribution of Z will tend to the normal distribution with zero mean and variance \sigma^2. The theorem can be extended to variables (X_i) that are not independent and/or not identically distributed if certain constraints are placed on the degree of dependence and the moments of the distributions. Many
test statistic A test statistic is a statistic (a quantity derived from the sample) used in statistical hypothesis testing.Berger, R. L.; Casella, G. (2001). ''Statistical Inference'', Duxbury Press, Second Edition (p.374) A hypothesis test is typically specif ...
s, scores, and
estimator In statistics, an estimator is a rule for calculating an estimate of a given quantity based on observed data: thus the rule (the estimator), the quantity of interest (the estimand) and its result (the estimate) are distinguished. For example, the ...
s encountered in practice contain sums of certain random variables in 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 distributions. The central limit theorem also implies that certain distributions can be approximated by the normal distribution, for example: * The
binomial distribution In probability theory and statistics, the binomial distribution with parameters ''n'' and ''p'' is the discrete probability distribution of the number of successes in a sequence of ''n'' independent experiments, each asking a yes–no quest ...
B(n,p) is approximately normal with mean np and variance np(1-p) for large n and for p not too close to 0 or 1. * The
Poisson distribution In probability theory and statistics, the Poisson distribution is a discrete probability distribution that expresses the probability of a given number of events occurring in a fixed interval of time or space if these events occur with a known co ...
with parameter \lambda is approximately normal with mean \lambda and variance \lambda, for large values of \lambda. * The
chi-squared distribution In probability theory and statistics, the chi-squared distribution (also chi-square or \chi^2-distribution) with k degrees of freedom is the distribution of a sum of the squares of k independent standard normal random variables. The chi-squa ...
\chi^2(k) is approximately normal with mean k and variance 2k, for large k. * The
Student's t-distribution In probability and statistics, Student's ''t''-distribution (or simply the ''t''-distribution) is any member of a family of continuous probability distributions that arise when estimating the mean of a normally distributed population in sit ...
t(\nu) is approximately normal with mean 0 and variance 1 when \nu is large. Whether these approximations are sufficiently accurate depends on the purpose for which they are needed, and the rate of convergence to the normal distribution. It is typically the case that such approximations are less accurate in the tails of the distribution. A general upper bound for the approximation error in the central limit theorem is given by the
Berry–Esseen theorem In probability theory, the central limit theorem states that, under certain circumstances, the probability distribution of the scaled mean of a random sample converges to a normal distribution as the sample size increases to infinity. Under strong ...
, improvements of the approximation are given by the
Edgeworth expansion The Gram–Charlier A series (named in honor of Jørgen Pedersen Gram and Carl Charlier), and the Edgeworth series (named in honor of Francis Ysidro Edgeworth) are series that approximate a probability distribution in terms of its cumulants. The se ...
s. This theorem can also be used to justify modeling the sum of many uniform noise sources as
Gaussian noise Gaussian noise, named after Carl Friedrich Gauss, is a term from signal processing theory denoting a kind of signal noise that has a probability density function (pdf) equal to that of the normal distribution (which is also known as the Gaussia ...
. See
AWGN Additive white Gaussian noise (AWGN) is a basic noise model used in information theory to mimic the effect of many random processes that occur in nature. The modifiers denote specific characteristics: * ''Additive'' because it is added to any nois ...
.


Operations and functions of normal variables

The
probability density In probability theory, a probability density function (PDF), or density of a continuous random variable, is a function whose value at any given sample (or point) in the sample space (the set of possible values taken by the random variable) can ...
,
cumulative distribution In statistics, the frequency (or absolute frequency) of an event i is the number n_i of times the observation has occurred/recorded in an experiment or study. These frequencies are often depicted graphically or in tabular form. Types The cumul ...
, and inverse cumulative distribution of any function of one or more independent or correlated normal variables can be computed with the numerical method of ray-tracing
Matlab code
. In the following sections we look at some special cases.


Operations on a single normal variable

If X is distributed normally with mean \mu and variance \sigma^2, then * aX+b, for any real numbers a and b, is also normally distributed, with mean a\mu+b and standard deviation , a, \sigma. That is, the family of normal distributions is closed under linear transformations. * The exponential of X is distributed log-normally: . * The absolute value of X has
folded normal distribution The folded normal distribution is a probability distribution related to the normal distribution. Given a normally distributed random variable ''X'' with mean ''μ'' and variance ''σ''2, the random variable ''Y'' = , ''X'', has a folded normal d ...
: . If \mu = 0 this is known as the
half-normal distribution In probability theory and statistics, the half-normal distribution is a special case of the folded normal distribution. Let X follow an ordinary normal distribution, N(0,\sigma^2). Then, Y=, X, follows a half-normal distribution. Thus, the hal ...
. * The absolute value of normalized residuals, , ''X'' − ''μ'', /''σ'', has
chi distribution In probability theory and statistics, the chi distribution is a continuous probability distribution. It is the distribution of the positive square root of the sum of squares of a set of independent random variables each following a standard norm ...
with one degree of freedom: , X - \mu, / \sigma \sim \chi_1. * The square of ''X''/''σ'' has the
noncentral chi-squared distribution In probability theory and statistics, the noncentral chi-squared distribution (or noncentral chi-square distribution, noncentral \chi^2 distribution) is a noncentral generalization of the chi-squared distribution. It often arises in the power a ...
with one degree of freedom: X^2 / \sigma^2 \sim \chi_1^2(\mu^2 / \sigma^2). If \mu = 0, the distribution is called simply chi-squared. * The log likelihood of a normal variable x is simply the log of its
probability density function In probability theory, a probability density function (PDF), or density of a continuous random variable, is a function whose value at any given sample (or point) in the sample space (the set of possible values taken by the random variable) can ...
: \ln p(x)= -\frac \left(\frac \right)^2 -\ln \left(\sigma \sqrt \right) = -\frac z^2 -\ln \left(\sigma \sqrt \right). Since this is a scaled and shifted square of a standard normal variable, it is distributed as a scaled and shifted chi-squared variable. * The distribution of the variable ''X'' restricted to an interval 'a'', ''b''is called the
truncated normal distribution In probability and statistics, the truncated normal distribution is the probability distribution derived from that of a normally distributed random variable by bounding the random variable from either below or above (or both). The truncated no ...
. * (''X'' − ''μ'')−2 has a
Lévy distribution In probability theory and statistics, the Lévy distribution, named after Paul Lévy, is a continuous probability distribution for a non-negative random variable. In spectroscopy, this distribution, with frequency as the dependent variable, is kn ...
with location 0 and scale ''σ''−2.


= Operations on two independent normal variables

= * If X_1 and X_2 are two
independent Independent or Independents may refer to: Arts, entertainment, and media Artist groups * Independents (artist group), a group of modernist painters based in the New Hope, Pennsylvania, area of the United States during the early 1930s * Independ ...
normal random variables, with means \mu_1, \mu_2 and standard deviations \sigma_1, \sigma_2, then their sum X_1 + X_2 will also be normally distributed, roof/sup> with mean \mu_1 + \mu_2 and variance \sigma_1^2 + \sigma_2^2. * In particular, if X and Y are independent normal deviates with zero mean and variance \sigma^2, then X + Y and X - Y are also independent and normally distributed, with zero mean and variance 2\sigma^2. This is a special case of the
polarization identity In linear algebra, a branch of mathematics, the polarization identity is any one of a family of formulas that express the inner product of two vectors in terms of the norm of a normed vector space. If a norm arises from an inner product then t ...
. * If X_1, X_2 are two independent normal deviates with mean \mu and deviation \sigma, and a, b are arbitrary real numbers, then the variable X_3 = \frac + \mu is also normally distributed with mean \mu and deviation \sigma. It follows that the normal distribution is
stable A stable is a building in which livestock, especially horses, are kept. It most commonly means a building that is divided into separate stalls for individual animals and livestock. There are many different types of stables in use today; the ...
(with exponent \alpha=2).


= Operations on two independent standard normal variables

= If X_1 and X_2 are two independent standard normal random variables with mean 0 and variance 1, then * Their sum and difference is distributed normally with mean zero and variance two: X_1 \pm X_2 \sim N(0, 2). * Their product Z = X_1 X_2 follows the
product distribution A product distribution is a probability distribution constructed as the distribution of the product of random variables having two other known distributions. Given two statistically independent random variables ''X'' and ''Y'', the distribution of ...
with density function f_Z(z) = \pi^ K_0(, z, ) where K_0 is the
modified Bessel function of the second kind Bessel functions, first defined by the mathematician Daniel Bernoulli and then generalized by Friedrich Bessel, are canonical solutions of Bessel's differential equation x^2 \frac + x \frac + \left(x^2 - \alpha^2 \right)y = 0 for an arbitrary ...
. This distribution is symmetric around zero, unbounded at z = 0, and has the
characteristic function In mathematics, the term "characteristic function" can refer to any of several distinct concepts: * The indicator function of a subset, that is the function ::\mathbf_A\colon X \to \, :which for a given subset ''A'' of ''X'', has value 1 at points ...
\phi_Z(t) = (1 + t^2)^. * Their ratio follows the standard
Cauchy distribution The Cauchy distribution, named after Augustin Cauchy, is a continuous probability distribution. It is also known, especially among physicists, as the Lorentz distribution (after Hendrik Lorentz), Cauchy–Lorentz distribution, Lorentz(ian) fun ...
: X_1/ X_2 \sim \operatorname(0, 1). * Their Euclidean norm \sqrt has the
Rayleigh distribution In probability theory and statistics, the Rayleigh distribution is a continuous probability distribution for nonnegative-valued random variables. Up to rescaling, it coincides with the chi distribution with two degrees of freedom. The distribut ...
.


Operations on multiple independent normal variables

* Any linear combination of independent normal deviates is a normal deviate. * If X_1, X_2, \ldots, X_n are independent standard normal random variables, then the sum of their squares has the
chi-squared distribution In probability theory and statistics, the chi-squared distribution (also chi-square or \chi^2-distribution) with k degrees of freedom is the distribution of a sum of the squares of k independent standard normal random variables. The chi-squa ...
with n degrees of freedom X_1^2 + \cdots + X_n^2 \sim \chi_n^2. * If X_1, X_2, \ldots, X_n are independent normally distributed random variables with means \mu and variances \sigma^2, then their
sample mean The sample mean (or "empirical mean") and the sample covariance are statistics computed from a Sample (statistics), sample of data on one or more random variables. The sample mean is the average value (or mean, mean value) of a sample (statistic ...
is independent from the sample
standard deviation In statistics, the standard deviation is a measure of the amount of variation or dispersion of a set of values. A low standard deviation indicates that the values tend to be close to the mean (also called the expected value) of the set, while ...
, which can be demonstrated using Basu's theorem or
Cochran's theorem In statistics, Cochran's theorem, devised by William G. Cochran, is a theorem used to justify results relating to the probability distributions of statistics that are used in the analysis of variance. Statement Let ''U''1, ..., ''U'N'' be i.i. ...
. The ratio of these two quantities will have the
Student's t-distribution In probability and statistics, Student's ''t''-distribution (or simply the ''t''-distribution) is any member of a family of continuous probability distributions that arise when estimating the mean of a normally distributed population in sit ...
with n-1 degrees of freedom: t = \frac = \frac \sim t_. * If X_1, X_2, \ldots, X_n, Y_1, Y_2, \ldots, Y_m are independent standard normal random variables, then the ratio of their normalized sums of squares will have the with degrees of freedom: F = \frac \sim F_.


Operations on multiple correlated normal variables

* A
quadratic form In mathematics, a quadratic form is a polynomial with terms all of degree two ("form" is another name for a homogeneous polynomial). For example, :4x^2 + 2xy - 3y^2 is a quadratic form in the variables and . The coefficients usually belong to a ...
of a normal vector, i.e. a quadratic function q = \sum x_i^2 + \sum x_j + c of multiple independent or correlated normal variables, is a generalized chi-square variable.


Operations on the density function

The split normal distribution is most directly defined in terms of joining scaled sections of the density functions of different normal distributions and rescaling the density to integrate to one. The
truncated normal distribution In probability and statistics, the truncated normal distribution is the probability distribution derived from that of a normally distributed random variable by bounding the random variable from either below or above (or both). The truncated no ...
results from rescaling a section of a single density function.


Infinite divisibility and Cramér's theorem

For any positive integer \text, any normal distribution with mean \mu and variance \sigma^2 is the distribution of the sum of \text independent normal deviates, each with mean \frac and variance \frac. This property is called
infinite divisibility Infinite divisibility arises in different ways in philosophy, physics, economics, order theory (a branch of mathematics), and probability theory (also a branch of mathematics). One may speak of infinite divisibility, or the lack thereof, of matter ...
. Conversely, if X_1 and X_2 are independent random variables and their sum X_1+X_2 has a normal distribution, then both X_1 and X_2 must be normal deviates. This result is known as Cramér's decomposition theorem, and is equivalent to saying that the convolution of two distributions is normal if and only if both are normal. Cramér's theorem implies that a linear combination of independent non-Gaussian variables will never have an exactly normal distribution, although it may approach it arbitrarily closely.


Bernstein's theorem

Bernstein's theorem states that if X and Y are independent and X + Y and X - Y are also independent, then both ''X'' and ''Y'' must necessarily have normal distributions. More generally, if X_1, \ldots, X_n are independent random variables, then two distinct linear combinations \sum and \sumwill be independent if and only if all X_k are normal and \sum, where \sigma_k^2 denotes the variance of X_k.


Extensions

The notion of normal distribution, being one of the most important distributions in probability theory, has been extended far beyond the standard framework of the univariate (that is one-dimensional) case (Case 1). All these extensions are also called ''normal'' or ''Gaussian'' laws, so a certain ambiguity in names exists. * The
multivariate normal distribution In probability theory and statistics, the multivariate normal distribution, multivariate Gaussian distribution, or joint normal distribution is a generalization of the one-dimensional (univariate) normal distribution to higher dimensions. One d ...
describes the Gaussian law in the ''k''-dimensional Euclidean space. A vector is multivariate-normally distributed if any linear combination of its components has a (univariate) normal distribution. The variance of ''X'' is a ''k×k'' symmetric positive-definite matrix ''V''. The multivariate normal distribution is a special case of the
elliptical distribution In probability and statistics, an elliptical distribution is any member of a broad family of probability distributions that generalize the multivariate normal distribution. Intuitively, in the simplified two and three dimensional case, the joint di ...
s. As such, its iso-density loci in the ''k'' = 2 case are ellipses and in the case of arbitrary ''k'' are ellipsoids. * Rectified Gaussian distribution a rectified version of normal distribution with all the negative elements reset to 0 * Complex normal distribution deals with the complex normal vectors. A complex vector is said to be normal if both its real and imaginary components jointly possess a 2''k''-dimensional multivariate normal distribution. The variance-covariance structure of ''X'' is described by two matrices: the ''variance'' matrix Γ, and the ''relation'' matrix ''C''. * Matrix normal distribution describes the case of normally distributed matrices. * Gaussian processes are the normally distributed stochastic processes. These can be viewed as elements of some infinite-dimensional Hilbert space ''H'', and thus are the analogues of multivariate normal vectors for the case . A random element is said to be normal if for any constant the scalar product has a (univariate) normal distribution. The variance structure of such Gaussian random element can be described in terms of the linear ''covariance ''. Several Gaussian processes became popular enough to have their own names: ** Wiener process, Brownian motion, ** Brownian bridge, ** Ornstein–Uhlenbeck process. * Gaussian q-distribution is an abstract mathematical construction that represents a "q-analogue" of the normal distribution. * the q-Gaussian is an analogue of the Gaussian distribution, in the sense that it maximises the Tsallis entropy, and is one type of Tsallis distribution. Note that this distribution is different from the Gaussian q-distribution above. * The Kaniadakis Gaussian distribution, Kaniadakis ''κ''-Gaussian distribution is a generalization of the Gaussian distribution which arises from the Kaniadakis statistics, being one of the Kaniadakis distribution, Kaniadakis distributions. A random variable ''X'' has a two-piece normal distribution if it has a distribution : f_X( x ) = N( \mu, \sigma_1^2 ) \text x \le \mu : f_X( x ) = N( \mu, \sigma_2^2 ) \text x \ge \mu where ''μ'' is the mean and ''σ''1 and ''σ''2 are the standard deviations of the distribution to the left and right of the mean respectively. The mean, variance and third central moment of this distribution have been determined : \operatorname( X ) = \mu + \sqrt ( \sigma_2 - \sigma_1 ) : \operatorname( X ) = \left( 1 - \frac 2 \pi\right)( \sigma_2 - \sigma_1 )^2 + \sigma_1 \sigma_2 : \operatorname( X ) = \sqrt( \sigma_2 - \sigma_1 ) \left[ \left( \frac 4 \pi - 1 \right) ( \sigma_2 - \sigma_1)^2 + \sigma_1 \sigma_2 \right] where E(''X''), V(''X'') and T(''X'') are the mean, variance, and third central moment respectively. One of the main practical uses of the Gaussian law is to model the empirical distributions of many different random variables encountered in practice. In such case a possible extension would be a richer family of distributions, having more than two parameters and therefore being able to fit the empirical distribution more accurately. The examples of such extensions are: * Pearson distribution — a four-parameter family of probability distributions that extend the normal law to include different skewness and kurtosis values. * The generalized normal distribution, also known as the exponential power distribution, allows for distribution tails with thicker or thinner asymptotic behaviors.


Statistical inference


Estimation of parameters

It is often the case that we do not know the parameters of the normal distribution, but instead want to Estimation theory, estimate them. That is, having a sample (x_1, \ldots, x_n) from a normal N(\mu, \sigma^2) population we would like to learn the approximate values of parameters \mu and \sigma^2. The standard approach to this problem is the maximum likelihood method, which requires maximization of the ''log-likelihood function'': : \ln\mathcal(\mu,\sigma^2) = \sum_^n \ln f(x_i\mid\mu,\sigma^2) = -\frac\ln(2\pi) - \frac\ln\sigma^2 - \frac\sum_^n (x_i-\mu)^2. Taking derivatives with respect to \mu and \sigma^2 and solving the resulting system of first order conditions yields the ''maximum likelihood estimates'': : \hat = \overline \equiv \frac\sum_^n x_i, \qquad \hat^2 = \frac \sum_^n (x_i - \overline)^2.


Sample mean

Estimator \textstyle\hat\mu is called the ''
sample mean The sample mean (or "empirical mean") and the sample covariance are statistics computed from a Sample (statistics), sample of data on one or more random variables. The sample mean is the average value (or mean, mean value) of a sample (statistic ...
'', since it is the arithmetic mean of all observations. The statistic \textstyle\overline is complete statistic, complete and sufficient statistic, sufficient for \mu, and therefore by the Lehmann–Scheffé theorem, \textstyle\hat\mu is the uniformly minimum variance unbiased (UMVU) estimator. In finite samples it is distributed normally: : \hat\mu \sim \mathcal(\mu,\sigma^2/n). The variance of this estimator is equal to the ''μμ''-element of the inverse Fisher information matrix \textstyle\mathcal^. This implies that the estimator is efficient estimator, finite-sample efficient. Of practical importance is the fact that the standard error (statistics), standard error of \textstyle\hat\mu is proportional to \textstyle1/\sqrt, that is, if one wishes to decrease the standard error by a factor of 10, one must increase the number of points in the sample by a factor of 100. This fact is widely used in determining sample sizes for opinion polls and the number of trials in Monte Carlo simulations. From the standpoint of the asymptotic theory (statistics), asymptotic theory, \textstyle\hat\mu is consistent estimator, consistent, that is, it convergence in probability, converges in probability to \mu as n\rightarrow\infty. The estimator is also asymptotic normality, asymptotically normal, which is a simple corollary of the fact that it is normal in finite samples: : \sqrt(\hat\mu-\mu) \,\xrightarrow\, \mathcal(0,\sigma^2).


Sample variance

The estimator \textstyle\hat\sigma^2 is called the ''sample variance'', since it is the variance of the sample ((x_1, \ldots, x_n)). In practice, another estimator is often used instead of the \textstyle\hat\sigma^2. This other estimator is denoted s^2, and is also called the ''sample variance'', which represents a certain ambiguity in terminology; its square root s is called the ''sample standard deviation''. The estimator s^2 differs from \textstyle\hat\sigma^2 by having instead of ''n'' in the denominator (the so-called Bessel's correction): : s^2 = \frac \hat\sigma^2 = \frac \sum_^n (x_i - \overline)^2. The difference between s^2 and \textstyle\hat\sigma^2 becomes negligibly small for large ''n''s. In finite samples however, the motivation behind the use of s^2 is that it is an unbiased estimator of the underlying parameter \sigma^2, whereas \textstyle\hat\sigma^2 is biased. Also, by the Lehmann–Scheffé theorem the estimator s^2 is uniformly minimum variance unbiased (Minimum-variance unbiased estimator, UMVU), which makes it the "best" estimator among all unbiased ones. However it can be shown that the biased estimator \textstyle\hat\sigma^2 is "better" than the s^2 in terms of the mean squared error (MSE) criterion. In finite samples both s^2 and \textstyle\hat\sigma^2 have scaled
chi-squared distribution In probability theory and statistics, the chi-squared distribution (also chi-square or \chi^2-distribution) with k degrees of freedom is the distribution of a sum of the squares of k independent standard normal random variables. The chi-squa ...
with degrees of freedom: : s^2 \sim \frac \cdot \chi^2_, \qquad \hat\sigma^2 \sim \frac \cdot \chi^2_. The first of these expressions shows that the variance of s^2 is equal to 2\sigma^4/(n-1), which is slightly greater than the ''σσ''-element of the inverse Fisher information matrix \textstyle\mathcal^. Thus, s^2 is not an efficient estimator for \sigma^2, and moreover, since s^2 is UMVU, we can conclude that the finite-sample efficient estimator for \sigma^2 does not exist. Applying the asymptotic theory, both estimators s^2 and \textstyle\hat\sigma^2 are consistent, that is they converge in probability to \sigma^2 as the sample size n\rightarrow\infty. The two estimators are also both asymptotically normal: : \sqrt(\hat\sigma^2 - \sigma^2) \simeq \sqrt(s^2-\sigma^2) \,\xrightarrow\, \mathcal(0,2\sigma^4). In particular, both estimators are asymptotically efficient for \sigma^2.


Confidence intervals

By
Cochran's theorem In statistics, Cochran's theorem, devised by William G. Cochran, is a theorem used to justify results relating to the probability distributions of statistics that are used in the analysis of variance. Statement Let ''U''1, ..., ''U'N'' be i.i. ...
, for normal distributions the sample mean \textstyle\hat\mu and the sample variance ''s''2 are
independent Independent or Independents may refer to: Arts, entertainment, and media Artist groups * Independents (artist group), a group of modernist painters based in the New Hope, Pennsylvania, area of the United States during the early 1930s * Independ ...
, which means there can be no gain in considering their joint distribution. There is also a converse theorem: if in a sample the sample mean and sample variance are independent, then the sample must have come from the normal distribution. The independence between \textstyle\hat\mu and ''s'' can be employed to construct the so-called ''t-statistic'': : t = \frac = \frac \sim t_ This quantity ''t'' has the
Student's t-distribution In probability and statistics, Student's ''t''-distribution (or simply the ''t''-distribution) is any member of a family of continuous probability distributions that arise when estimating the mean of a normally distributed population in sit ...
with degrees of freedom, and it is an ancillary statistic (independent of the value of the parameters). Inverting the distribution of this ''t''-statistics will allow us to construct the
confidence interval In frequentist statistics, a confidence interval (CI) is a range of estimates for an unknown parameter. A confidence interval is computed at a designated ''confidence level''; the 95% confidence level is most common, but other levels, such as 9 ...
for ''μ''; similarly, inverting the ''χ''2 distribution of the statistic ''s''2 will give us the confidence interval for ''σ''2: :\mu \in \left[ \hat\mu - t_ \fracs, \hat\mu + t_ \fracs \right], :\sigma^2 \in \left[ \frac, \frac \right], where ''tk,p'' and are the ''p''th
quantile In statistics and probability, quantiles are cut points dividing the range of a probability distribution into continuous intervals with equal probabilities, or dividing the observations in a sample in the same way. There is one fewer quantile tha ...
s of the ''t''- and ''χ''2-distributions respectively. These confidence intervals are of the ''confidence level'' , meaning that the true values ''μ'' and ''σ''2 fall outside of these intervals with probability (or significance level) ''α''. In practice people usually take , resulting in the 95% confidence intervals. Approximate formulas can be derived from the asymptotic distributions of \textstyle\hat\mu and ''s''2: :\mu \in \left[ \hat\mu - , z_, \fracs, \hat\mu + , z_, \fracs \right], :\sigma^2 \in \left[ s^2 - , z_, \fracs^2, s^2 + , z_, \fracs^2 \right], The approximate formulas become valid for large values of ''n'', and are more convenient for the manual calculation since the standard normal quantiles ''z''''α''/2 do not depend on ''n''. In particular, the most popular value of , results in .


Normality tests

Normality tests assess the likelihood that the given data set comes from a normal distribution. Typically the null hypothesis ''H''0 is that the observations are distributed normally with unspecified mean ''μ'' and variance ''σ''2, versus the alternative ''Ha'' that the distribution is arbitrary. Many tests (over 40) have been devised for this problem. The more prominent of them are outlined below: Diagnostic plots are more intuitively appealing but subjective at the same time, as they rely on informal human judgement to accept or reject the null hypothesis. *
Q–Q plot In statistics, a Q–Q plot (quantile-quantile plot) is a probability plot, a List of graphical methods, graphical method for comparing two probability distributions by plotting their ''quantiles'' against each other. A point on the plot co ...
, also known as normal probability plot or rankit plot—is a plot of the sorted values from the data set against the expected values of the corresponding quantiles from the standard normal distribution. That is, it's a plot of point of the form (Φ−1(''pk''), ''x''(''k'')), where plotting points ''pk'' are equal to ''pk'' = (''k'' − ''α'')/(''n'' + 1 − 2''α'') and ''α'' is an adjustment constant, which can be anything between 0 and 1. If the null hypothesis is true, the plotted points should approximately lie on a straight line. * P–P plot – similar to the Q–Q plot, but used much less frequently. This method consists of plotting the points (Φ(''z''(''k'')), ''pk''), where \textstyle z_ = (x_-\hat\mu)/\hat\sigma. For normally distributed data this plot should lie on a 45° line between (0, 0) and (1, 1). Goodness-of-fit tests: ''Moment-based tests'': * D'Agostino's K-squared test * Jarque–Bera test * Shapiro–Wilk test: This is based on the fact that the line in the Q–Q plot has the slope of ''σ''. The test compares the least squares estimate of that slope with the value of the sample variance, and rejects the null hypothesis if these two quantities differ significantly. ''Tests based on the empirical distribution function'': * Anderson–Darling test * Lilliefors test (an adaptation of the Kolmogorov–Smirnov test)


Bayesian analysis of the normal distribution

Bayesian analysis of normally distributed data is complicated by the many different possibilities that may be considered: * Either the mean, or the variance, or neither, may be considered a fixed quantity. * When the variance is unknown, analysis may be done directly in terms of the variance, or in terms of the
precision Precision, precise or precisely may refer to: Science, and technology, and mathematics Mathematics and computing (general) * Accuracy and precision, measurement deviation from true value and its scatter * Significant figures, the number of digit ...
, the reciprocal of the variance. The reason for expressing the formulas in terms of precision is that the analysis of most cases is simplified. * Both univariate and multivariate normal distribution, multivariate cases need to be considered. * Either conjugate prior, conjugate or improper prior, improper prior distributions may be placed on the unknown variables. * An additional set of cases occurs in Bayesian linear regression, where in the basic model the data is assumed to be normally distributed, and normal priors are placed on the regression coefficients. The resulting analysis is similar to the basic cases of independent identically distributed data. The formulas for the non-linear-regression cases are summarized in the conjugate prior article.


Sum of two quadratics


= Scalar form

= The following auxiliary formula is useful for simplifying the posterior distribution, posterior update equations, which otherwise become fairly tedious. :a(x-y)^2 + b(x-z)^2 = (a + b)\left(x - \frac\right)^2 + \frac(y-z)^2 This equation rewrites the sum of two quadratics in ''x'' by expanding the squares, grouping the terms in ''x'', and completing the square. Note the following about the complex constant factors attached to some of the terms: # The factor \frac has the form of a weighted average of ''y'' and ''z''. # \frac = \frac = (a^ + b^)^. This shows that this factor can be thought of as resulting from a situation where the Multiplicative inverse, reciprocals of quantities ''a'' and ''b'' add directly, so to combine ''a'' and ''b'' themselves, it's necessary to reciprocate, add, and reciprocate the result again to get back into the original units. This is exactly the sort of operation performed by the harmonic mean, so it is not surprising that \frac is one-half the harmonic mean of ''a'' and ''b''.


= Vector form

= A similar formula can be written for the sum of two vector quadratics: If x, y, z are vectors of length ''k'', and A and B are symmetric matrix, symmetric, invertible matrices of size k\times k, then : \begin & (\mathbf-\mathbf)'\mathbf(\mathbf-\mathbf) + (\mathbf-\mathbf)' \mathbf(\mathbf-\mathbf) \\ = & (\mathbf - \mathbf)'(\mathbf+\mathbf)(\mathbf - \mathbf) + (\mathbf - \mathbf)'(\mathbf^ + \mathbf^)^(\mathbf - \mathbf) \end where :\mathbf = (\mathbf + \mathbf)^(\mathbf\mathbf + \mathbf \mathbf) Note that the form x′ A x is called a
quadratic form In mathematics, a quadratic form is a polynomial with terms all of degree two ("form" is another name for a homogeneous polynomial). For example, :4x^2 + 2xy - 3y^2 is a quadratic form in the variables and . The coefficients usually belong to a ...
and is a scalar (mathematics), scalar: :\mathbf'\mathbf\mathbf = \sum_a_ x_i x_j In other words, it sums up all possible combinations of products of pairs of elements from x, with a separate coefficient for each. In addition, since x_i x_j = x_j x_i, only the sum a_ + a_ matters for any off-diagonal elements of A, and there is no loss of generality in assuming that A is symmetric matrix, symmetric. Furthermore, if A is symmetric, then the form \mathbf'\mathbf\mathbf = \mathbf'\mathbf\mathbf.


Sum of differences from the mean

Another useful formula is as follows: \sum_^n (x_i-\mu)^2 = \sum_^n (x_i-\bar)^2 + n(\bar -\mu)^2 where \bar = \frac \sum_^n x_i.


With known variance

For a set of i.i.d. normally distributed data points X of size ''n'' where each individual point ''x'' follows x \sim \mathcal(\mu, \sigma^2) with known
variance In probability theory and statistics, variance is the expectation of the squared deviation of a random variable from its population mean or sample mean. Variance is a measure of dispersion, meaning it is a measure of how far a set of numbers ...
σ2, the conjugate prior distribution is also normally distributed. This can be shown more easily by rewriting the variance as the
precision Precision, precise or precisely may refer to: Science, and technology, and mathematics Mathematics and computing (general) * Accuracy and precision, measurement deviation from true value and its scatter * Significant figures, the number of digit ...
, i.e. using τ = 1/σ2. Then if x \sim \mathcal(\mu, 1/\tau) and \mu \sim \mathcal(\mu_0, 1/\tau_0), we proceed as follows. First, the likelihood function is (using the formula above for the sum of differences from the mean): :\begin p(\mathbf\mid\mu,\tau) &= \prod_^n \sqrt \exp\left(-\frac\tau(x_i-\mu)^2\right) \\ &= \left(\frac\right)^ \exp\left(-\frac\tau \sum_^n (x_i-\mu)^2\right) \\ &= \left(\frac\right)^ \exp\left[-\frac\tau \left(\sum_^n(x_i-\bar)^2 + n(\bar -\mu)^2\right)\right]. \end Then, we proceed as follows: :\begin p(\mu\mid\mathbf) &\propto p(\mathbf\mid\mu) p(\mu) \\ & = \left(\frac\right)^ \exp\left[-\frac\tau \left(\sum_^n(x_i-\bar)^2 + n(\bar -\mu)^2\right)\right] \sqrt \exp\left(-\frac\tau_0(\mu-\mu_0)^2\right) \\ &\propto \exp\left(-\frac\left(\tau\left(\sum_^n(x_i-\bar)^2 + n(\bar -\mu)^2\right) + \tau_0(\mu-\mu_0)^2\right)\right) \\ &\propto \exp\left(-\frac \left(n\tau(\bar-\mu)^2 + \tau_0(\mu-\mu_0)^2 \right)\right) \\ &= \exp\left(-\frac(n\tau + \tau_0)\left(\mu - \dfrac\right)^2 + \frac(\bar - \mu_0)^2\right) \\ &\propto \exp\left(-\frac(n\tau + \tau_0)\left(\mu - \dfrac\right)^2\right) \end In the above derivation, we used the formula above for the sum of two quadratics and eliminated all constant factors not involving ''μ''. The result is the kernel (statistics), kernel of a normal distribution, with mean \frac and precision n\tau + \tau_0, i.e. :p(\mu\mid\mathbf) \sim \mathcal\left(\frac, \frac\right) This can be written as a set of Bayesian update equations for the posterior parameters in terms of the prior parameters: :\begin \tau_0' &= \tau_0 + n\tau \\[5pt] \mu_0' &= \frac \\[5pt] \bar &= \frac\sum_^n x_i \end That is, to combine ''n'' data points with total precision of ''nτ'' (or equivalently, total variance of ''n''/''σ''2) and mean of values \bar, derive a new total precision simply by adding the total precision of the data to the prior total precision, and form a new mean through a ''precision-weighted average'', i.e. a weighted average of the data mean and the prior mean, each weighted by the associated total precision. This makes logical sense if the precision is thought of as indicating the certainty of the observations: In the distribution of the posterior mean, each of the input components is weighted by its certainty, and the certainty of this distribution is the sum of the individual certainties. (For the intuition of this, compare the expression "the whole is (or is not) greater than the sum of its parts". In addition, consider that the knowledge of the posterior comes from a combination of the knowledge of the prior and likelihood, so it makes sense that we are more certain of it than of either of its components.) The above formula reveals why it is more convenient to do Bayesian analysis of conjugate priors for the normal distribution in terms of the precision. The posterior precision is simply the sum of the prior and likelihood precisions, and the posterior mean is computed through a precision-weighted average, as described above. The same formulas can be written in terms of variance by reciprocating all the precisions, yielding the more ugly formulas :\begin ' &= \frac \\[5pt] \mu_0' &= \frac \\[5pt] \bar &= \frac\sum_^n x_i \end


With known mean

For a set of i.i.d. normally distributed data points X of size ''n'' where each individual point ''x'' follows x \sim \mathcal(\mu, \sigma^2) with known mean μ, the conjugate prior of the
variance In probability theory and statistics, variance is the expectation of the squared deviation of a random variable from its population mean or sample mean. Variance is a measure of dispersion, meaning it is a measure of how far a set of numbers ...
has an inverse gamma distribution or a scaled inverse chi-squared distribution. The two are equivalent 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. The prior for σ2 is as follows: :p(\sigma^2\mid\nu_0,\sigma_0^2) = \frac~\frac \propto \frac The likelihood function from above, written in terms of the variance, is: :\begin p(\mathbf\mid\mu,\sigma^2) &= \left(\frac\right)^ \exp\left[-\frac \sum_^n (x_i-\mu)^2\right] \\ &= \left(\frac\right)^ \exp\left[-\frac\right] \end where :S = \sum_^n (x_i-\mu)^2. Then: :\begin p(\sigma^2\mid\mathbf) &\propto p(\mathbf\mid\sigma^2) p(\sigma^2) \\ &= \left(\frac\right)^ \exp\left[-\frac\right] \frac~\frac \\ &\propto \left(\frac\right)^ \frac \exp\left[-\frac + \frac\right] \\ &= \frac \exp\left[-\frac\right] \end The above is also a scaled inverse chi-squared distribution where :\begin \nu_0' &= \nu_0 + n \\ \nu_0'' &= \nu_0 \sigma_0^2 + \sum_^n (x_i-\mu)^2 \end or equivalently :\begin \nu_0' &= \nu_0 + n \\ ' &= \frac \end Reparameterizing in terms of an inverse gamma distribution, the result is: :\begin \alpha' &= \alpha + \frac \\ \beta' &= \beta + \frac \end


With unknown mean and unknown variance

For a set of i.i.d. normally distributed data points X of size ''n'' where each individual point ''x'' follows x \sim \mathcal(\mu, \sigma^2) with unknown mean μ and unknown
variance In probability theory and statistics, variance is the expectation of the squared deviation of a random variable from its population mean or sample mean. Variance is a measure of dispersion, meaning it is a measure of how far a set of numbers ...
σ2, a combined (multivariate) conjugate prior is placed over the mean and variance, consisting of a normal-inverse-gamma distribution. Logically, this originates as follows: # From the analysis of the case with unknown mean but known variance, we see that the update equations involve sufficient statistics computed from the data consisting of the mean of the data points and the total variance of the data points, computed in turn from the known variance divided by the number of data points. # From the analysis of the case with unknown variance but known mean, we see that the update equations involve sufficient statistics over the data consisting of the number of data points and sum of squared deviations. # Keep in mind that the posterior update values serve as the prior distribution when further data is handled. Thus, we should logically think of our priors in terms of the sufficient statistics just described, with the same semantics kept in mind as much as possible. # To handle the case where both mean and variance are unknown, we could place independent priors over the mean and variance, with fixed estimates of the average mean, total variance, number of data points used to compute the variance prior, and sum of squared deviations. Note however that in reality, the total variance of the mean depends on the unknown variance, and the sum of squared deviations that goes into the variance prior (appears to) depend on the unknown mean. In practice, the latter dependence is relatively unimportant: Shifting the actual mean shifts the generated points by an equal amount, and on average the squared deviations will remain the same. This is not the case, however, with the total variance of the mean: As the unknown variance increases, the total variance of the mean will increase proportionately, and we would like to capture this dependence. # This suggests that we create a ''conditional prior'' of the mean on the unknown variance, with a hyperparameter specifying the mean of the pseudo-observations associated with the prior, and another parameter specifying the number of pseudo-observations. This number serves as a scaling parameter on the variance, making it possible to control the overall variance of the mean relative to the actual variance parameter. The prior for the variance also has two hyperparameters, one specifying the sum of squared deviations of the pseudo-observations associated with the prior, and another specifying once again the number of pseudo-observations. Note that each of the priors has a hyperparameter specifying the number of pseudo-observations, and in each case this controls the relative variance of that prior. These are given as two separate hyperparameters so that the variance (aka the confidence) of the two priors can be controlled separately. # This leads immediately to the normal-inverse-gamma distribution, which is the product of the two distributions just defined, with conjugate priors used (an inverse gamma distribution over the variance, and a normal distribution over the mean, ''conditional'' on the variance) and with the same four parameters just defined. The priors are normally defined as follows: :\begin p(\mu\mid\sigma^2; \mu_0, n_0) &\sim \mathcal(\mu_0,\sigma^2/n_0) \\ p(\sigma^2; \nu_0,\sigma_0^2) &\sim I\chi^2(\nu_0,\sigma_0^2) = IG(\nu_0/2, \nu_0\sigma_0^2/2) \end The update equations can be derived, and look as follows: :\begin \bar &= \frac 1 n \sum_^n x_i \\ \mu_0' &= \frac \\ n_0' &= n_0 + n \\ \nu_0' &= \nu_0 + n \\ \nu_0'' &= \nu_0 \sigma_0^2 + \sum_^n (x_i-\bar)^2 + \frac(\mu_0 - \bar)^2 \end The respective numbers of pseudo-observations add the number of actual observations to them. The new mean hyperparameter is once again a weighted average, this time weighted by the relative numbers of observations. Finally, the update for \nu_0'' is similar to the case with known mean, but in this case the sum of squared deviations is taken with respect to the observed data mean rather than the true mean, and as a result a new "interaction term" needs to be added to take care of the additional error source stemming from the deviation between prior and data mean.


Occurrence and applications

The occurrence of normal distribution in practical problems can be loosely classified into four categories: # Exactly normal distributions; # Approximately normal laws, for example when such approximation is justified by the
central limit theorem In probability theory, the central limit theorem (CLT) establishes that, in many situations, when independent random variables are summed up, their properly normalized sum tends toward a normal distribution even if the original variables themselv ...
; and # Distributions modeled as normal – the normal distribution being the distribution with Principle of maximum entropy, maximum entropy for a given mean and variance. # Regression problems – the normal distribution being found after systematic effects have been modeled sufficiently well.


Exact normality

Certain quantities in physics are distributed normally, as was first demonstrated by James Clerk Maxwell. Examples of such quantities are: * Probability density function of a ground state in a quantum harmonic oscillator. * The position of a particle that experiences diffusion. If initially the particle is located at a specific point (that is its probability distribution is the Dirac delta function), then after time ''t'' its location is described by a normal distribution with variance ''t'', which satisfies the diffusion equation \frac f(x,t) = \frac \frac f(x,t). If the initial location is given by a certain density function g(x), then the density at time ''t'' is the convolution of ''g'' and the normal PDF.


Approximate normality

''Approximately'' normal distributions occur in many situations, as explained by the
central limit theorem In probability theory, the central limit theorem (CLT) establishes that, in many situations, when independent random variables are summed up, their properly normalized sum tends toward a normal distribution even if the original variables themselv ...
. When the outcome is produced by many small effects acting ''additively and independently'', its distribution will be close to normal. The normal approximation will not be valid if the effects act multiplicatively (instead of additively), or if there is a single external influence that has a considerably larger magnitude than the rest of the effects. * In counting problems, where the central limit theorem includes a discrete-to-continuum approximation and where Infinite divisibility, infinitely divisible and Indecomposable distribution, decomposable distributions are involved, such as ** binomial distribution, Binomial random variables, associated with binary response variables; ** Poisson distribution, Poisson random variables, associated with rare events; * Thermal radiation has a Bose–Einstein statistics, Bose–Einstein distribution on very short time scales, and a normal distribution on longer timescales due to the central limit theorem.


Assumed normality

There are statistical methods to empirically test that assumption; see the above #Normality tests, Normality tests section. * In biology, the ''logarithm'' of various variables tend to have a normal distribution, that is, they tend to have a
log-normal distribution In probability theory, a log-normal (or lognormal) distribution is a continuous probability distribution of a random variable whose logarithm is normally distributed. Thus, if the random variable is log-normally distributed, then has a normal ...
(after separation on male/female subpopulations), with examples including: ** Measures of size of living tissue (length, height, skin area, weight); ** The ''length'' of ''inert'' appendages (hair, claws, nails, teeth) of biological specimens, ''in the direction of growth''; presumably the thickness of tree bark also falls under this category; ** Certain physiological measurements, such as blood pressure of adult humans. * In finance, in particular the Black–Scholes model, changes in the ''logarithm'' of exchange rates, price indices, and stock market indices are assumed normal (these variables behave like compound interest, not like simple interest, and so are multiplicative). Some mathematicians such as Benoit Mandelbrot have argued that Levy skew alpha-stable distribution, log-Levy distributions, which possesses heavy tails would be a more appropriate model, in particular for the analysis for stock market crashes. The use of the assumption of normal distribution occurring in financial models has also been criticized by Nassim Nicholas Taleb in his works. * Propagation of uncertainty, Measurement errors in physical experiments are often modeled by a normal distribution. This use of a normal distribution does not imply that one is assuming the measurement errors are normally distributed, rather using the normal distribution produces the most conservative predictions possible given only knowledge about the mean and variance of the errors. * In Standardized testing (statistics), standardized testing, results can be made to have a normal distribution by either selecting the number and difficulty of questions (as in the Intelligence quotient, IQ test) or transforming the raw test scores into "output" scores by fitting them to the normal distribution. For example, the SAT's traditional range of 200–800 is based on a normal distribution with a mean of 500 and a standard deviation of 100. * Many scores are derived from the normal distribution, including percentile ranks ("percentiles" or "quantiles"), normal curve equivalents, stanines, Standard score, z-scores, and T-scores. Additionally, some behavioral statistical procedures assume that scores are normally distributed; for example, Student's t-test, t-tests and Analysis of variance, ANOVAs. Bell curve grading assigns relative grades based on a normal distribution of scores. * In hydrology the distribution of long duration river discharge or rainfall, e.g. monthly and yearly totals, is often thought to be practically normal according to the
central limit theorem In probability theory, the central limit theorem (CLT) establishes that, in many situations, when independent random variables are summed up, their properly normalized sum tends toward a normal distribution even if the original variables themselv ...
. The blue picture, made with CumFreq, illustrates an example of fitting the normal distribution to ranked October rainfalls showing the 90% confidence belt based on the
binomial distribution In probability theory and statistics, the binomial distribution with parameters ''n'' and ''p'' is the discrete probability distribution of the number of successes in a sequence of ''n'' independent experiments, each asking a yes–no quest ...
. The rainfall data are represented by plotting positions as part of the cumulative frequency analysis.


Methodological problems and peer review

John Ioannidis argues that using normally distributed standard deviations as standards for validating research findings leave falsifiability, falsifiable predictions about phenomena that are not normally distributed untested. This includes, for example, phenomena that only appear when all necessary conditions are present and one cannot be a substitute for another in an addition-like way and phenomena that are not randomly distributed. Ioannidis argues that standard deviation-centered validation gives a false appearance of validity to hypotheses and theories where some but not all falsifiable predictions are normally distributed since the portion of falsifiable predictions that there is evidence against may and in some cases are in the non-normally distributed parts of the range of falsifiable predictions, as well as baselessly dismissing hypotheses for which none of the falsifiable predictions are normally distributed as if were they unfalsifiable when in fact they do make falsifiable predictions. It is argued by Ioannidis that many cases of mutually exclusive theories being accepted as "validated" by research journals are caused by failure of the journals to take in empirical falsifications of non-normally distributed predictions, and not because mutually exclusive theories are true, which they cannot be, although two mutually exclusive theories can both be wrong and a third one correct.


Computational methods


Generating values from normal distribution

In computer simulations, especially in applications of the Monte-Carlo method, it is often desirable to generate values that are normally distributed. The algorithms listed below all generate the standard normal deviates, since a can be generated as , where ''Z'' is standard normal. All these algorithms rely on the availability of a random number generator ''U'' capable of producing Uniform distribution (continuous), uniform random variates. * The most straightforward method is based on the probability integral transform property: if ''U'' is distributed uniformly on (0,1), then Φ−1(''U'') will have the standard normal distribution. The drawback of this method is that it relies on calculation of the
probit function In probability theory and statistics, the probit function is the quantile function associated with the standard normal distribution. It has applications in data analysis and machine learning, in particular exploratory statistical graphics and ...
Φ−1, which cannot be done analytically. Some approximate methods are described in and in the error function, erf article. Wichura gives a fast algorithm for computing this function to 16 decimal places, which is used by R programming language, R to compute random variates of the normal distribution. * Irwin–Hall distribution#Approximating a Normal distribution, An easy-to-program approximate approach that relies on the
central limit theorem In probability theory, the central limit theorem (CLT) establishes that, in many situations, when independent random variables are summed up, their properly normalized sum tends toward a normal distribution even if the original variables themselv ...
is as follows: generate 12 uniform ''U''(0,1) deviates, add them all up, and subtract 6 – the resulting random variable will have approximately standard normal distribution. In truth, the distribution will be Irwin–Hall distribution, Irwin–Hall, which is a 12-section eleventh-order polynomial approximation to the normal distribution. This random deviate will have a limited range of (−6, 6). Note that in a true normal distribution, only 0.00034% of all samples will fall outside ±6σ. * The Box–Muller transform, Box–Muller method uses two independent random numbers ''U'' and ''V'' distributed uniform distribution (continuous), uniformly on (0,1). Then the two random variables ''X'' and ''Y'' X = \sqrt \, \cos(2 \pi V) , \qquad Y = \sqrt \, \sin(2 \pi V) . will both have the standard normal distribution, and will be
independent Independent or Independents may refer to: Arts, entertainment, and media Artist groups * Independents (artist group), a group of modernist painters based in the New Hope, Pennsylvania, area of the United States during the early 1930s * Independ ...
. This formulation arises because for a bivariate normal random vector (''X'', ''Y'') the squared norm will have the
chi-squared distribution In probability theory and statistics, the chi-squared distribution (also chi-square or \chi^2-distribution) with k degrees of freedom is the distribution of a sum of the squares of k independent standard normal random variables. The chi-squa ...
with two degrees of freedom, which is an easily generated exponential distribution, exponential random variable corresponding to the quantity −2ln(''U'') in these equations; and the angle is distributed uniformly around the circle, chosen by the random variable ''V''. * The Marsaglia polar method is a modification of the Box–Muller method which does not require computation of the sine and cosine functions. In this method, ''U'' and ''V'' are drawn from the uniform (−1,1) distribution, and then is computed. If ''S'' is greater or equal to 1, then the method starts over, otherwise the two quantities X = U\sqrt, \qquad Y = V\sqrt are returned. Again, ''X'' and ''Y'' are independent, standard normal random variables. * The Ratio method is a rejection method. The algorithm proceeds as follows: ** Generate two independent uniform deviates ''U'' and ''V''; ** Compute ''X'' = (''V'' − 0.5)/''U''; ** Optional: if ''X''2 ≤ 5 − 4''e''1/4''U'' then accept ''X'' and terminate algorithm; ** Optional: if ''X''2 ≥ 4''e''−1.35/''U'' + 1.4 then reject ''X'' and start over from step 1; ** If ''X''2 ≤ −4 ln''U'' then accept ''X'', otherwise start over the algorithm. *:The two optional steps allow the evaluation of the logarithm in the last step to be avoided in most cases. These steps can be greatly improved so that the logarithm is rarely evaluated. * The ziggurat algorithm is faster than the Box–Muller transform and still exact. In about 97% of all cases it uses only two random numbers, one random integer and one random uniform, one multiplication and an if-test. Only in 3% of the cases, where the combination of those two falls outside the "core of the ziggurat" (a kind of rejection sampling using logarithms), do exponentials and more uniform random numbers have to be employed. * Integer arithmetic can be used to sample from the standard normal distribution. This method is exact in the sense that it satisfies the conditions of ''ideal approximation''; i.e., it is equivalent to sampling a real number from the standard normal distribution and rounding this to the nearest representable floating point number. * There is also some investigation into the connection between the fast Hadamard transform and the normal distribution, since the transform employs just addition and subtraction and by the central limit theorem random numbers from almost any distribution will be transformed into the normal distribution. In this regard a series of Hadamard transforms can be combined with random permutations to turn arbitrary data sets into a normally distributed data.


Numerical approximations for the normal CDF and normal quantile function

The standard normal cumulative distribution function, CDF is widely used in scientific and statistical computing. The values Φ(''x'') may be approximated very accurately by a variety of methods, such as numerical integration, Taylor series, asymptotic series and Gauss's continued fraction#Of Kummer's confluent hypergeometric function, continued fractions. Different approximations are used depending on the desired level of accuracy. * give the approximation for Φ(''x'') for ''x > 0'' with the absolute error (algorith
26.2.17
: \Phi(x) = 1 - \varphi(x)\left(b_1 t + b_2 t^2 + b_3t^3 + b_4 t^4 + b_5 t^5\right) + \varepsilon(x), \qquad t = \frac, where ''ϕ''(''x'') is the standard normal PDF, and ''b''0 = 0.2316419, ''b''1 = 0.319381530, ''b''2 = −0.356563782, ''b''3 = 1.781477937, ''b''4 = −1.821255978, ''b''5 = 1.330274429. * lists some dozens of approximations – by means of rational functions, with or without exponentials – for the function. His algorithms vary in the degree of complexity and the resulting precision, with maximum absolute precision of 24 digits. An algorithm by combines Hart's algorithm 5666 with a continued fraction approximation in the tail to provide a fast computation algorithm with a 16-digit precision. * after recalling Hart68 solution is not suited for erf, gives a solution for both erf and erfc, with maximal relative error bound, via rational function, Rational Chebyshev Approximation. * suggested a simple algorithm based on the Taylor series expansion \Phi(x) = \frac12 + \varphi(x)\left( x + \frac 3 + \frac + \frac + \frac + \cdots \right) for calculating with arbitrary precision. The drawback of this algorithm is comparatively slow calculation time (for example it takes over 300 iterations to calculate the function with 16 digits of precision when ). * The GNU Scientific Library calculates values of the standard normal CDF using Hart's algorithms and approximations with Chebyshev polynomials. Shore (1982) introduced simple approximations that may be incorporated in stochastic optimization models of engineering and operations research, like reliability engineering and inventory analysis. Denoting , the simplest approximation for the quantile function is: z = \Phi^(p)=5.5556\left[1- \left( \frac p \right)^\right],\qquad p\ge 1/2 This approximation delivers for ''z'' a maximum absolute error of 0.026 (for , corresponding to ). For replace ''p'' by and change sign. Another approximation, somewhat less accurate, is the single-parameter approximation: z=-0.4115\left\, \qquad p\ge 1/2 The latter had served to derive a simple approximation for the loss integral of the normal distribution, defined by \begin L(z) & =\int_z^\infty (u-z)\varphi(u) \, du=\int_z^\infty [1-\Phi (u)] \, du \\[5pt] L(z) & \approx \begin 0.4115\left(\dfrac p \right) - z, & p<1/2, \\ \\ 0.4115\left( \dfrac p \right), & p\ge 1/2. \end \\[5pt] \text \\ L(z) & \approx \begin 0.4115\left\, & p < 1/2, \\ \\ 0.4115 \dfrac p, & p\ge 1/2. \end \end This approximation is particularly accurate for the right far-tail (maximum error of 10−3 for z≥1.4). Highly accurate approximations for the CDF, based on Response modeling methodology, Response Modeling Methodology (RMM, Shore, 2011, 2012), are shown in Shore (2005). Some more approximations can be found at: Error function#Approximation with elementary functions. In particular, small ''relative'' error on the whole domain for the CDF \Phi and the quantile function \Phi^ as well, is achieved via an explicitly invertible formula by Sergei Winitzki in 2008.


History


Development

Some authors attribute the credit for the discovery of the normal distribution to Abraham de Moivre, de Moivre, who in 1738 published in the second edition of his "''The Doctrine of Chances''" the study of the coefficients in the binomial expansion of . De Moivre proved that the middle term in this expansion has the approximate magnitude of 2^n/\sqrt, and that "If ''m'' or ''n'' be a Quantity infinitely great, then the Logarithm of the Ratio, which a Term distant from the middle by the Interval ''ℓ'', has to the middle Term, is -\frac." Although this theorem can be interpreted as the first obscure expression for the normal probability law, Stephen Stigler, Stigler points out that de Moivre himself did not interpret his results as anything more than the approximate rule for the binomial coefficients, and in particular de Moivre lacked the concept of the probability density function. In 1823 Carl Friedrich Gauss, Gauss published his monograph "''Theoria combinationis observationum erroribus minimis obnoxiae''" where among other things he introduces several important statistical concepts, such as the method of least squares, the method of maximum likelihood, and the ''normal distribution''. Gauss used ''M'', , to denote the measurements of some unknown quantity ''V'', and sought the "most probable" estimator of that quantity: the one that maximizes the probability of obtaining the observed experimental results. In his notation φΔ is the probability density function of the measurement errors of magnitude Δ. Not knowing what the function ''φ'' is, Gauss requires that his method should reduce to the well-known answer: the arithmetic mean of the measured values. Starting from these principles, Gauss demonstrates that the only law that rationalizes the choice of arithmetic mean as an estimator of the location parameter, is the normal law of errors: \varphi\mathit = \frac h \, e^, where ''h'' is "the measure of the precision of the observations". Using this normal law as a generic model for errors in the experiments, Gauss formulates what is now known as the non-linear least squares, non-linear weighted least squares method. Although Gauss was the first to suggest the normal distribution law, Pierre Simon de Laplace, Laplace made significant contributions. It was Laplace who first posed the problem of aggregating several observations in 1774, although his own solution led to the Laplacian distribution. It was Laplace who first calculated the value of the Gaussian integral, integral in 1782, providing the normalization constant for the normal distribution. Finally, it was Laplace who in 1810 proved and presented to the Academy the fundamental
central limit theorem In probability theory, the central limit theorem (CLT) establishes that, in many situations, when independent random variables are summed up, their properly normalized sum tends toward a normal distribution even if the original variables themselv ...
, which emphasized the theoretical importance of the normal distribution. It is of interest to note that in 1809 an Irish-American mathematician Robert Adrain published two insightful but flawed derivations of the normal probability law, simultaneously and independently from Gauss. His works remained largely unnoticed by the scientific community, until in 1871 they were exhumed by Cleveland Abbe, Abbe. In the middle of the 19th century James Clerk Maxwell, Maxwell demonstrated that the normal distribution is not just a convenient mathematical tool, but may also occur in natural phenomena: "The number of particles whose velocity, resolved in a certain direction, lies between ''x'' and ''x'' + ''dx'' is \operatorname \frac\; e^ \, dx


Naming

Today, the concept is usually known in English as the normal distribution or Gaussian distribution. Other less common names include Gauss distribution, Laplace-Gauss distribution, the law of error, the law of facility of errors, Laplace's second law, Gaussian law. Gauss himself apparently coined the term with reference to the "normal equations" involved in its applications, with normal having its technical meaning of orthogonal rather than "usual". However, by the end of the 19th century some authors had started using the name ''normal distribution'', where the word "normal" was used as an adjective – the term now being seen as a reflection of the fact that this distribution was seen as typical, common – and thus "normal". Charles Sanders Peirce, Peirce (one of those authors) once defined "normal" thus: "...the 'normal' is not the average (or any other kind of mean) of what actually occurs, but of what ''would'', in the long run, occur under certain circumstances." Around the turn of the 20th century Karl Pearson, Pearson popularized the term ''normal'' as a designation for this distribution. Also, it was Pearson who first wrote the distribution in terms of the standard deviation ''σ'' as in modern notation. Soon after this, in year 1915, Ronald Fisher, Fisher added the location parameter to the formula for normal distribution, expressing it in the way it is written nowadays: df = \frac e^ \, dx. The term "standard normal", which denotes the normal distribution with zero mean and unit variance came into general use around the 1950s, appearing in the popular textbooks by P. G. Hoel (1947) "''Introduction to mathematical statistics''" and A. M. Mood (1950) "''Introduction to the theory of statistics''".


See also

* Bates distribution – similar to the Irwin–Hall distribution, but rescaled back into the 0 to 1 range * Behrens–Fisher problem – the long-standing problem of testing whether two normal samples with different variances have same means; * Bhattacharyya distance – method used to separate mixtures of normal distributions * Erdős–Kac theorem – on the occurrence of the normal distribution in number theory * Full width at half maximum * Gaussian blur – convolution, which uses the normal distribution as a kernel * Modified half-normal distribution with the pdf on (0, \infty) is given as f(x)= \frac, where \Psi(\alpha,z)=_1\Psi_1\left(\begin\left(\alpha,\frac\right)\\(1,0)\end;z \right) denotes the Fox-Wright Psi function. * Normally distributed and uncorrelated does not imply independent * Ratio normal distribution * Reciprocal normal distribution * Standard normal table * Stein's lemma * Sub-Gaussian distribution * Sum of normally distributed random variables * Tweedie distribution – The normal distribution is a member of the family of Tweedie exponential dispersion models. * Wrapped normal distribution – the Normal distribution applied to a circular domain * Z-test – using the normal distribution


Notes


References


Citations


Sources

* * In particular, the entries fo
"bell-shaped and bell curve"
an

* * * * * * * * * * * * * * * * * * * * * * * * Translated by Stephen M. Stigler in ''Statistical Science'' 1 (3), 1986: . * * * * * * * * * * * * * * * * * * * * * * * * * * * *


External links

*
Normal distribution calculator
{{Authority control Normal distribution, Continuous distributions Conjugate prior distributions Exponential family distributions Stable distributions Location-scale family probability distributions]">X, ^p \right&= \sigma^p \cdot 2^ \frac _1F_1\left( -\frac, \frac, -\frac \left( \frac \mu \sigma \right)^2 \right). \end These expressions remain valid even if p is not an integer. See also Hermite polynomials#"Negative variance", generalized Hermite polynomials. The expectation of X conditioned on the event that X lies in an interval ,b/math> is given by :\operatorname\left \mid a= \mu - \sigma^2\frac where f and F respectively are the density and the cumulative distribution function of X. For b=\infty this is known as the
inverse Mills ratio In probability theory, the Mills ratio (or Mills's ratio) of a continuous random variable X is the function : m(x) := \frac , where f(x) is the probability density function, and :\bar(x) := \Pr x.html" ;"title=">x">>x= \int_x^ f(u)\, du is the ...
. Note that above, density f of X is used instead of standard normal density as in inverse Mills ratio, so here we have \sigma^2 instead of \sigma.


Fourier transform and characteristic function

The
Fourier transform A Fourier transform (FT) is a mathematical transform that decomposes functions into frequency components, which are represented by the output of the transform as a function of frequency. Most commonly functions of time or space are transformed, ...
of a normal density f with mean \mu and standard deviation \sigma is : \hat f(t) = \int_^\infty f(x)e^ \, dx = e^ e^ where i is the
imaginary unit The imaginary unit or unit imaginary number () is a solution to the quadratic equation x^2+1=0. Although there is no real number with this property, can be used to extend the real numbers to what are called complex numbers, using addition an ...
. If the mean \mu=0, the first factor is 1, and the Fourier transform is, apart from a constant factor, a normal density on the
frequency domain In physics, electronics, control systems engineering, and statistics, the frequency domain refers to the analysis of mathematical functions or signals with respect to frequency, rather than time. Put simply, a time-domain graph shows how a signa ...
, with mean 0 and standard deviation 1/\sigma. In particular, the standard normal distribution \varphi is an
eigenfunction In mathematics, an eigenfunction of a linear operator ''D'' defined on some function space is any non-zero function f in that space that, when acted upon by ''D'', is only multiplied by some scaling factor called an eigenvalue. As an equation, th ...
of the Fourier transform. In probability theory, the Fourier transform of the probability distribution of a real-valued random variable X is closely connected to the
characteristic function In mathematics, the term "characteristic function" can refer to any of several distinct concepts: * The indicator function of a subset, that is the function ::\mathbf_A\colon X \to \, :which for a given subset ''A'' of ''X'', has value 1 at points ...
\varphi_X(t) of that variable, which is defined as the
expected value In probability theory, the expected value (also called expectation, expectancy, mathematical expectation, mean, average, or first moment) is a generalization of the weighted average. Informally, the expected value is the arithmetic mean of a l ...
of e^, as a function of the real variable t (the
frequency Frequency is the number of occurrences of a repeating event per unit of time. It is also occasionally referred to as ''temporal frequency'' for clarity, and is distinct from ''angular frequency''. Frequency is measured in hertz (Hz) which is eq ...
parameter of the Fourier transform). This definition can be analytically extended to a complex-value variable t. The relation between both is: :\varphi_X(t) = \hat f(-t)


Moment and cumulant generating functions

The
moment generating function In probability theory and statistics, the moment-generating function of a real-valued random variable is an alternative specification of its probability distribution. Thus, it provides the basis of an alternative route to analytical results compare ...
of a real random variable X is the expected value of e^, as a function of the real parameter t. For a normal distribution with density f, mean \mu and deviation \sigma, the moment generating function exists and is equal to :M(t) = \operatorname ^= \hat f(it) = e^ e^ The
cumulant generating function In probability theory and statistics, the cumulants of a probability distribution are a set of quantities that provide an alternative to the '' moments'' of the distribution. Any two probability distributions whose moments are identical will have ...
is the logarithm of the moment generating function, namely :g(t) = \ln M(t) = \mu t + \tfrac 12 \sigma^2 t^2 Since this is a quadratic polynomial in t, only the first two
cumulant In probability theory and statistics, the cumulants of a probability distribution are a set of quantities that provide an alternative to the '' moments'' of the distribution. Any two probability distributions whose moments are identical will ha ...
s are nonzero, namely the mean \mu and the variance \sigma^2.


Stein operator and class

Within
Stein's method Stein's method is a general method in probability theory to obtain bounds on the distance between two probability distributions with respect to a probability metric. It was introduced by Charles Stein, who first published it in 1972, to obtain ...
the Stein operator and class of a random variable X \sim \mathcal(\mu, \sigma^2) are \mathcalf(x) = \sigma^2 f'(x) - (x-\mu)f(x) and \mathcal the class of all absolutely continuous functions f : \R \to \R \mbox\mathbb[, f'(X), ]< \infty.


Zero-variance limit

In the limit (mathematics), limit when \sigma tends to zero, the probability density f(x) eventually tends to zero at any x\ne \mu, but grows without limit if x = \mu, while its integral remains equal to 1. Therefore, the normal distribution cannot be defined as an ordinary
function Function or functionality may refer to: Computing * Function key, a type of key on computer keyboards * Function model, a structured representation of processes in a system * Function object or functor or functionoid, a concept of object-oriente ...
when \sigma = 0. However, one can define the normal distribution with zero variance as a
generalized function In mathematics, generalized functions are objects extending the notion of functions. There is more than one recognized theory, for example the theory of distributions. Generalized functions are especially useful in making discontinuous functions ...
; specifically, as Dirac's "delta function" \delta translated by the mean \mu, that is f(x)=\delta(x-\mu). Its CDF is then the
Heaviside step function The Heaviside step function, or the unit step function, usually denoted by or (but sometimes , or ), is a step function, named after Oliver Heaviside (1850–1925), the value of which is zero for negative arguments and one for positive argume ...
translated by the mean \mu, namely :F(x) = \begin 0 & \textx < \mu \\ 1 & \textx \geq \mu \end


Maximum entropy

Of all probability distributions over the reals with a specified mean \mu and variance \sigma^2, the normal distribution N(\mu,\sigma^2) is the one with maximum entropy. If X is a
continuous random variable In probability theory and statistics, a probability distribution is the mathematical function that gives the probabilities of occurrence of different possible outcomes for an experiment. It is a mathematical description of a random phenomenon i ...
with
probability density In probability theory, a probability density function (PDF), or density of a continuous random variable, is a function whose value at any given sample (or point) in the sample space (the set of possible values taken by the random variable) can ...
f(x), then the entropy of X is defined as : H(X) = - \int_^\infty f(x)\log f(x)\, dx where f(x)\log f(x) is understood to be zero whenever f(x)=0. This functional can be maximized, subject to the constraints that the distribution is properly normalized and has a specified variance, by using
variational calculus The calculus of variations (or Variational Calculus) is a field of mathematical analysis that uses variations, which are small changes in functions and functionals, to find maxima and minima of functionals: mappings from a set of functions t ...
. A function with two
Lagrange multipliers In mathematical optimization, the method of Lagrange multipliers is a strategy for finding the local maxima and minima of a function subject to equality constraints (i.e., subject to the condition that one or more equations have to be satisfied ex ...
is defined: : L=\int_^\infty f(x)\ln(f(x))\,dx-\lambda_0\left(1-\int_^\infty f(x)\,dx\right)-\lambda\left(\sigma^2-\int_^\infty f(x)(x-\mu)^2\,dx\right) where f(x) is, for now, regarded as some density function with mean \mu and standard deviation \sigma. At maximum entropy, a small variation \delta f(x) about f(x) will produce a variation \delta L about L which is equal to 0: : 0=\delta L=\int_^\infty \delta f(x)\left (\ln(f(x))+1+\lambda_0+\lambda(x-\mu)^2\right )\,dx Since this must hold for any small \delta f(x), the term in brackets must be zero, and solving for f(x) yields: :f(x)=e^ Using the constraint equations to solve for \lambda_0 and \lambda yields the density of the normal distribution: : f(x, \mu, \sigma)=\frace^ The entropy of a normal distribution is equal to : H(X)=\tfrac(1+\log(2\sigma^2\pi))


Other properties


Related distributions


Central limit theorem

The central limit theorem states that under certain (fairly common) conditions, the sum of many random variables will have an approximately normal distribution. More specifically, where X_1,\ldots ,X_n are
independent and identically distributed In probability theory and statistics, a collection of random variables is independent and identically distributed if each random variable has the same probability distribution as the others and all are mutually independent. This property is usua ...
random variables with the same arbitrary distribution, zero mean, and variance \sigma^2 and Z is their mean scaled by \sqrt : Z = \sqrt\left(\frac\sum_^n X_i\right) Then, as n increases, the probability distribution of Z will tend to the normal distribution with zero mean and variance \sigma^2. The theorem can be extended to variables (X_i) that are not independent and/or not identically distributed if certain constraints are placed on the degree of dependence and the moments of the distributions. Many
test statistic A test statistic is a statistic (a quantity derived from the sample) used in statistical hypothesis testing.Berger, R. L.; Casella, G. (2001). ''Statistical Inference'', Duxbury Press, Second Edition (p.374) A hypothesis test is typically specif ...
s, scores, and
estimator In statistics, an estimator is a rule for calculating an estimate of a given quantity based on observed data: thus the rule (the estimator), the quantity of interest (the estimand) and its result (the estimate) are distinguished. For example, the ...
s encountered in practice contain sums of certain random variables in 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 distributions. The central limit theorem also implies that certain distributions can be approximated by the normal distribution, for example: * The
binomial distribution In probability theory and statistics, the binomial distribution with parameters ''n'' and ''p'' is the discrete probability distribution of the number of successes in a sequence of ''n'' independent experiments, each asking a yes–no quest ...
B(n,p) is approximately normal with mean np and variance np(1-p) for large n and for p not too close to 0 or 1. * The
Poisson distribution In probability theory and statistics, the Poisson distribution is a discrete probability distribution that expresses the probability of a given number of events occurring in a fixed interval of time or space if these events occur with a known co ...
with parameter \lambda is approximately normal with mean \lambda and variance \lambda, for large values of \lambda. * The
chi-squared distribution In probability theory and statistics, the chi-squared distribution (also chi-square or \chi^2-distribution) with k degrees of freedom is the distribution of a sum of the squares of k independent standard normal random variables. The chi-squa ...
\chi^2(k) is approximately normal with mean k and variance 2k, for large k. * The
Student's t-distribution In probability and statistics, Student's ''t''-distribution (or simply the ''t''-distribution) is any member of a family of continuous probability distributions that arise when estimating the mean of a normally distributed population in sit ...
t(\nu) is approximately normal with mean 0 and variance 1 when \nu is large. Whether these approximations are sufficiently accurate depends on the purpose for which they are needed, and the rate of convergence to the normal distribution. It is typically the case that such approximations are less accurate in the tails of the distribution. A general upper bound for the approximation error in the central limit theorem is given by the
Berry–Esseen theorem In probability theory, the central limit theorem states that, under certain circumstances, the probability distribution of the scaled mean of a random sample converges to a normal distribution as the sample size increases to infinity. Under strong ...
, improvements of the approximation are given by the
Edgeworth expansion The Gram–Charlier A series (named in honor of Jørgen Pedersen Gram and Carl Charlier), and the Edgeworth series (named in honor of Francis Ysidro Edgeworth) are series that approximate a probability distribution in terms of its cumulants. The se ...
s. This theorem can also be used to justify modeling the sum of many uniform noise sources as
Gaussian noise Gaussian noise, named after Carl Friedrich Gauss, is a term from signal processing theory denoting a kind of signal noise that has a probability density function (pdf) equal to that of the normal distribution (which is also known as the Gaussia ...
. See
AWGN Additive white Gaussian noise (AWGN) is a basic noise model used in information theory to mimic the effect of many random processes that occur in nature. The modifiers denote specific characteristics: * ''Additive'' because it is added to any nois ...
.


Operations and functions of normal variables

The
probability density In probability theory, a probability density function (PDF), or density of a continuous random variable, is a function whose value at any given sample (or point) in the sample space (the set of possible values taken by the random variable) can ...
,
cumulative distribution In statistics, the frequency (or absolute frequency) of an event i is the number n_i of times the observation has occurred/recorded in an experiment or study. These frequencies are often depicted graphically or in tabular form. Types The cumul ...
, and inverse cumulative distribution of any function of one or more independent or correlated normal variables can be computed with the numerical method of ray-tracing
Matlab code
. In the following sections we look at some special cases.


Operations on a single normal variable

If X is distributed normally with mean \mu and variance \sigma^2, then * aX+b, for any real numbers a and b, is also normally distributed, with mean a\mu+b and standard deviation , a, \sigma. That is, the family of normal distributions is closed under linear transformations. * The exponential of X is distributed log-normally: . * The absolute value of X has
folded normal distribution The folded normal distribution is a probability distribution related to the normal distribution. Given a normally distributed random variable ''X'' with mean ''μ'' and variance ''σ''2, the random variable ''Y'' = , ''X'', has a folded normal d ...
: . If \mu = 0 this is known as the
half-normal distribution In probability theory and statistics, the half-normal distribution is a special case of the folded normal distribution. Let X follow an ordinary normal distribution, N(0,\sigma^2). Then, Y=, X, follows a half-normal distribution. Thus, the hal ...
. * The absolute value of normalized residuals, , ''X'' − ''μ'', /''σ'', has
chi distribution In probability theory and statistics, the chi distribution is a continuous probability distribution. It is the distribution of the positive square root of the sum of squares of a set of independent random variables each following a standard norm ...
with one degree of freedom: , X - \mu, / \sigma \sim \chi_1. * The square of ''X''/''σ'' has the
noncentral chi-squared distribution In probability theory and statistics, the noncentral chi-squared distribution (or noncentral chi-square distribution, noncentral \chi^2 distribution) is a noncentral generalization of the chi-squared distribution. It often arises in the power a ...
with one degree of freedom: X^2 / \sigma^2 \sim \chi_1^2(\mu^2 / \sigma^2). If \mu = 0, the distribution is called simply chi-squared. * The log likelihood of a normal variable x is simply the log of its
probability density function In probability theory, a probability density function (PDF), or density of a continuous random variable, is a function whose value at any given sample (or point) in the sample space (the set of possible values taken by the random variable) can ...
: \ln p(x)= -\frac \left(\frac \right)^2 -\ln \left(\sigma \sqrt \right) = -\frac z^2 -\ln \left(\sigma \sqrt \right). Since this is a scaled and shifted square of a standard normal variable, it is distributed as a scaled and shifted chi-squared variable. * The distribution of the variable ''X'' restricted to an interval 'a'', ''b''is called the
truncated normal distribution In probability and statistics, the truncated normal distribution is the probability distribution derived from that of a normally distributed random variable by bounding the random variable from either below or above (or both). The truncated no ...
. * (''X'' − ''μ'')−2 has a
Lévy distribution In probability theory and statistics, the Lévy distribution, named after Paul Lévy, is a continuous probability distribution for a non-negative random variable. In spectroscopy, this distribution, with frequency as the dependent variable, is kn ...
with location 0 and scale ''σ''−2.


= Operations on two independent normal variables

= * If X_1 and X_2 are two
independent Independent or Independents may refer to: Arts, entertainment, and media Artist groups * Independents (artist group), a group of modernist painters based in the New Hope, Pennsylvania, area of the United States during the early 1930s * Independ ...
normal random variables, with means \mu_1, \mu_2 and standard deviations \sigma_1, \sigma_2, then their sum X_1 + X_2 will also be normally distributed, roof/sup> with mean \mu_1 + \mu_2 and variance \sigma_1^2 + \sigma_2^2. * In particular, if X and Y are independent normal deviates with zero mean and variance \sigma^2, then X + Y and X - Y are also independent and normally distributed, with zero mean and variance 2\sigma^2. This is a special case of the
polarization identity In linear algebra, a branch of mathematics, the polarization identity is any one of a family of formulas that express the inner product of two vectors in terms of the norm of a normed vector space. If a norm arises from an inner product then t ...
. * If X_1, X_2 are two independent normal deviates with mean \mu and deviation \sigma, and a, b are arbitrary real numbers, then the variable X_3 = \frac + \mu is also normally distributed with mean \mu and deviation \sigma. It follows that the normal distribution is
stable A stable is a building in which livestock, especially horses, are kept. It most commonly means a building that is divided into separate stalls for individual animals and livestock. There are many different types of stables in use today; the ...
(with exponent \alpha=2).


= Operations on two independent standard normal variables

= If X_1 and X_2 are two independent standard normal random variables with mean 0 and variance 1, then * Their sum and difference is distributed normally with mean zero and variance two: X_1 \pm X_2 \sim N(0, 2). * Their product Z = X_1 X_2 follows the
product distribution A product distribution is a probability distribution constructed as the distribution of the product of random variables having two other known distributions. Given two statistically independent random variables ''X'' and ''Y'', the distribution of ...
with density function f_Z(z) = \pi^ K_0(, z, ) where K_0 is the
modified Bessel function of the second kind Bessel functions, first defined by the mathematician Daniel Bernoulli and then generalized by Friedrich Bessel, are canonical solutions of Bessel's differential equation x^2 \frac + x \frac + \left(x^2 - \alpha^2 \right)y = 0 for an arbitrary ...
. This distribution is symmetric around zero, unbounded at z = 0, and has the
characteristic function In mathematics, the term "characteristic function" can refer to any of several distinct concepts: * The indicator function of a subset, that is the function ::\mathbf_A\colon X \to \, :which for a given subset ''A'' of ''X'', has value 1 at points ...
\phi_Z(t) = (1 + t^2)^. * Their ratio follows the standard
Cauchy distribution The Cauchy distribution, named after Augustin Cauchy, is a continuous probability distribution. It is also known, especially among physicists, as the Lorentz distribution (after Hendrik Lorentz), Cauchy–Lorentz distribution, Lorentz(ian) fun ...
: X_1/ X_2 \sim \operatorname(0, 1). * Their Euclidean norm \sqrt has the
Rayleigh distribution In probability theory and statistics, the Rayleigh distribution is a continuous probability distribution for nonnegative-valued random variables. Up to rescaling, it coincides with the chi distribution with two degrees of freedom. The distribut ...
.


Operations on multiple independent normal variables

* Any linear combination of independent normal deviates is a normal deviate. * If X_1, X_2, \ldots, X_n are independent standard normal random variables, then the sum of their squares has the
chi-squared distribution In probability theory and statistics, the chi-squared distribution (also chi-square or \chi^2-distribution) with k degrees of freedom is the distribution of a sum of the squares of k independent standard normal random variables. The chi-squa ...
with n degrees of freedom X_1^2 + \cdots + X_n^2 \sim \chi_n^2. * If X_1, X_2, \ldots, X_n are independent normally distributed random variables with means \mu and variances \sigma^2, then their
sample mean The sample mean (or "empirical mean") and the sample covariance are statistics computed from a Sample (statistics), sample of data on one or more random variables. The sample mean is the average value (or mean, mean value) of a sample (statistic ...
is independent from the sample
standard deviation In statistics, the standard deviation is a measure of the amount of variation or dispersion of a set of values. A low standard deviation indicates that the values tend to be close to the mean (also called the expected value) of the set, while ...
, which can be demonstrated using Basu's theorem or
Cochran's theorem In statistics, Cochran's theorem, devised by William G. Cochran, is a theorem used to justify results relating to the probability distributions of statistics that are used in the analysis of variance. Statement Let ''U''1, ..., ''U'N'' be i.i. ...
. The ratio of these two quantities will have the
Student's t-distribution In probability and statistics, Student's ''t''-distribution (or simply the ''t''-distribution) is any member of a family of continuous probability distributions that arise when estimating the mean of a normally distributed population in sit ...
with n-1 degrees of freedom: t = \frac = \frac \sim t_. * If X_1, X_2, \ldots, X_n, Y_1, Y_2, \ldots, Y_m are independent standard normal random variables, then the ratio of their normalized sums of squares will have the with degrees of freedom: F = \frac \sim F_.


Operations on multiple correlated normal variables

* A
quadratic form In mathematics, a quadratic form is a polynomial with terms all of degree two ("form" is another name for a homogeneous polynomial). For example, :4x^2 + 2xy - 3y^2 is a quadratic form in the variables and . The coefficients usually belong to a ...
of a normal vector, i.e. a quadratic function q = \sum x_i^2 + \sum x_j + c of multiple independent or correlated normal variables, is a generalized chi-square variable.


Operations on the density function

The split normal distribution is most directly defined in terms of joining scaled sections of the density functions of different normal distributions and rescaling the density to integrate to one. The
truncated normal distribution In probability and statistics, the truncated normal distribution is the probability distribution derived from that of a normally distributed random variable by bounding the random variable from either below or above (or both). The truncated no ...
results from rescaling a section of a single density function.


Infinite divisibility and Cramér's theorem

For any positive integer \text, any normal distribution with mean \mu and variance \sigma^2 is the distribution of the sum of \text independent normal deviates, each with mean \frac and variance \frac. This property is called
infinite divisibility Infinite divisibility arises in different ways in philosophy, physics, economics, order theory (a branch of mathematics), and probability theory (also a branch of mathematics). One may speak of infinite divisibility, or the lack thereof, of matter ...
. Conversely, if X_1 and X_2 are independent random variables and their sum X_1+X_2 has a normal distribution, then both X_1 and X_2 must be normal deviates. This result is known as Cramér's decomposition theorem, and is equivalent to saying that the convolution of two distributions is normal if and only if both are normal. Cramér's theorem implies that a linear combination of independent non-Gaussian variables will never have an exactly normal distribution, although it may approach it arbitrarily closely.


Bernstein's theorem

Bernstein's theorem states that if X and Y are independent and X + Y and X - Y are also independent, then both ''X'' and ''Y'' must necessarily have normal distributions. More generally, if X_1, \ldots, X_n are independent random variables, then two distinct linear combinations \sum and \sumwill be independent if and only if all X_k are normal and \sum, where \sigma_k^2 denotes the variance of X_k.


Extensions

The notion of normal distribution, being one of the most important distributions in probability theory, has been extended far beyond the standard framework of the univariate (that is one-dimensional) case (Case 1). All these extensions are also called ''normal'' or ''Gaussian'' laws, so a certain ambiguity in names exists. * The
multivariate normal distribution In probability theory and statistics, the multivariate normal distribution, multivariate Gaussian distribution, or joint normal distribution is a generalization of the one-dimensional (univariate) normal distribution to higher dimensions. One d ...
describes the Gaussian law in the ''k''-dimensional Euclidean space. A vector is multivariate-normally distributed if any linear combination of its components has a (univariate) normal distribution. The variance of ''X'' is a ''k×k'' symmetric positive-definite matrix ''V''. The multivariate normal distribution is a special case of the
elliptical distribution In probability and statistics, an elliptical distribution is any member of a broad family of probability distributions that generalize the multivariate normal distribution. Intuitively, in the simplified two and three dimensional case, the joint di ...
s. As such, its iso-density loci in the ''k'' = 2 case are ellipses and in the case of arbitrary ''k'' are ellipsoids. * Rectified Gaussian distribution a rectified version of normal distribution with all the negative elements reset to 0 * Complex normal distribution deals with the complex normal vectors. A complex vector is said to be normal if both its real and imaginary components jointly possess a 2''k''-dimensional multivariate normal distribution. The variance-covariance structure of ''X'' is described by two matrices: the ''variance'' matrix Γ, and the ''relation'' matrix ''C''. * Matrix normal distribution describes the case of normally distributed matrices. * Gaussian processes are the normally distributed stochastic processes. These can be viewed as elements of some infinite-dimensional Hilbert space ''H'', and thus are the analogues of multivariate normal vectors for the case . A random element is said to be normal if for any constant the scalar product has a (univariate) normal distribution. The variance structure of such Gaussian random element can be described in terms of the linear ''covariance ''. Several Gaussian processes became popular enough to have their own names: ** Wiener process, Brownian motion, ** Brownian bridge, ** Ornstein–Uhlenbeck process. * Gaussian q-distribution is an abstract mathematical construction that represents a "q-analogue" of the normal distribution. * the q-Gaussian is an analogue of the Gaussian distribution, in the sense that it maximises the Tsallis entropy, and is one type of Tsallis distribution. Note that this distribution is different from the Gaussian q-distribution above. * The Kaniadakis Gaussian distribution, Kaniadakis ''κ''-Gaussian distribution is a generalization of the Gaussian distribution which arises from the Kaniadakis statistics, being one of the Kaniadakis distribution, Kaniadakis distributions. A random variable ''X'' has a two-piece normal distribution if it has a distribution : f_X( x ) = N( \mu, \sigma_1^2 ) \text x \le \mu : f_X( x ) = N( \mu, \sigma_2^2 ) \text x \ge \mu where ''μ'' is the mean and ''σ''1 and ''σ''2 are the standard deviations of the distribution to the left and right of the mean respectively. The mean, variance and third central moment of this distribution have been determined : \operatorname( X ) = \mu + \sqrt ( \sigma_2 - \sigma_1 ) : \operatorname( X ) = \left( 1 - \frac 2 \pi\right)( \sigma_2 - \sigma_1 )^2 + \sigma_1 \sigma_2 : \operatorname( X ) = \sqrt( \sigma_2 - \sigma_1 ) \left[ \left( \frac 4 \pi - 1 \right) ( \sigma_2 - \sigma_1)^2 + \sigma_1 \sigma_2 \right] where E(''X''), V(''X'') and T(''X'') are the mean, variance, and third central moment respectively. One of the main practical uses of the Gaussian law is to model the empirical distributions of many different random variables encountered in practice. In such case a possible extension would be a richer family of distributions, having more than two parameters and therefore being able to fit the empirical distribution more accurately. The examples of such extensions are: * Pearson distribution — a four-parameter family of probability distributions that extend the normal law to include different skewness and kurtosis values. * The generalized normal distribution, also known as the exponential power distribution, allows for distribution tails with thicker or thinner asymptotic behaviors.


Statistical inference


Estimation of parameters

It is often the case that we do not know the parameters of the normal distribution, but instead want to Estimation theory, estimate them. That is, having a sample (x_1, \ldots, x_n) from a normal N(\mu, \sigma^2) population we would like to learn the approximate values of parameters \mu and \sigma^2. The standard approach to this problem is the maximum likelihood method, which requires maximization of the ''log-likelihood function'': : \ln\mathcal(\mu,\sigma^2) = \sum_^n \ln f(x_i\mid\mu,\sigma^2) = -\frac\ln(2\pi) - \frac\ln\sigma^2 - \frac\sum_^n (x_i-\mu)^2. Taking derivatives with respect to \mu and \sigma^2 and solving the resulting system of first order conditions yields the ''maximum likelihood estimates'': : \hat = \overline \equiv \frac\sum_^n x_i, \qquad \hat^2 = \frac \sum_^n (x_i - \overline)^2.


Sample mean

Estimator \textstyle\hat\mu is called the ''
sample mean The sample mean (or "empirical mean") and the sample covariance are statistics computed from a Sample (statistics), sample of data on one or more random variables. The sample mean is the average value (or mean, mean value) of a sample (statistic ...
'', since it is the arithmetic mean of all observations. The statistic \textstyle\overline is complete statistic, complete and sufficient statistic, sufficient for \mu, and therefore by the Lehmann–Scheffé theorem, \textstyle\hat\mu is the uniformly minimum variance unbiased (UMVU) estimator. In finite samples it is distributed normally: : \hat\mu \sim \mathcal(\mu,\sigma^2/n). The variance of this estimator is equal to the ''μμ''-element of the inverse Fisher information matrix \textstyle\mathcal^. This implies that the estimator is efficient estimator, finite-sample efficient. Of practical importance is the fact that the standard error (statistics), standard error of \textstyle\hat\mu is proportional to \textstyle1/\sqrt, that is, if one wishes to decrease the standard error by a factor of 10, one must increase the number of points in the sample by a factor of 100. This fact is widely used in determining sample sizes for opinion polls and the number of trials in Monte Carlo simulations. From the standpoint of the asymptotic theory (statistics), asymptotic theory, \textstyle\hat\mu is consistent estimator, consistent, that is, it convergence in probability, converges in probability to \mu as n\rightarrow\infty. The estimator is also asymptotic normality, asymptotically normal, which is a simple corollary of the fact that it is normal in finite samples: : \sqrt(\hat\mu-\mu) \,\xrightarrow\, \mathcal(0,\sigma^2).


Sample variance

The estimator \textstyle\hat\sigma^2 is called the ''sample variance'', since it is the variance of the sample ((x_1, \ldots, x_n)). In practice, another estimator is often used instead of the \textstyle\hat\sigma^2. This other estimator is denoted s^2, and is also called the ''sample variance'', which represents a certain ambiguity in terminology; its square root s is called the ''sample standard deviation''. The estimator s^2 differs from \textstyle\hat\sigma^2 by having instead of ''n'' in the denominator (the so-called Bessel's correction): : s^2 = \frac \hat\sigma^2 = \frac \sum_^n (x_i - \overline)^2. The difference between s^2 and \textstyle\hat\sigma^2 becomes negligibly small for large ''n''s. In finite samples however, the motivation behind the use of s^2 is that it is an unbiased estimator of the underlying parameter \sigma^2, whereas \textstyle\hat\sigma^2 is biased. Also, by the Lehmann–Scheffé theorem the estimator s^2 is uniformly minimum variance unbiased (Minimum-variance unbiased estimator, UMVU), which makes it the "best" estimator among all unbiased ones. However it can be shown that the biased estimator \textstyle\hat\sigma^2 is "better" than the s^2 in terms of the mean squared error (MSE) criterion. In finite samples both s^2 and \textstyle\hat\sigma^2 have scaled
chi-squared distribution In probability theory and statistics, the chi-squared distribution (also chi-square or \chi^2-distribution) with k degrees of freedom is the distribution of a sum of the squares of k independent standard normal random variables. The chi-squa ...
with degrees of freedom: : s^2 \sim \frac \cdot \chi^2_, \qquad \hat\sigma^2 \sim \frac \cdot \chi^2_. The first of these expressions shows that the variance of s^2 is equal to 2\sigma^4/(n-1), which is slightly greater than the ''σσ''-element of the inverse Fisher information matrix \textstyle\mathcal^. Thus, s^2 is not an efficient estimator for \sigma^2, and moreover, since s^2 is UMVU, we can conclude that the finite-sample efficient estimator for \sigma^2 does not exist. Applying the asymptotic theory, both estimators s^2 and \textstyle\hat\sigma^2 are consistent, that is they converge in probability to \sigma^2 as the sample size n\rightarrow\infty. The two estimators are also both asymptotically normal: : \sqrt(\hat\sigma^2 - \sigma^2) \simeq \sqrt(s^2-\sigma^2) \,\xrightarrow\, \mathcal(0,2\sigma^4). In particular, both estimators are asymptotically efficient for \sigma^2.


Confidence intervals

By
Cochran's theorem In statistics, Cochran's theorem, devised by William G. Cochran, is a theorem used to justify results relating to the probability distributions of statistics that are used in the analysis of variance. Statement Let ''U''1, ..., ''U'N'' be i.i. ...
, for normal distributions the sample mean \textstyle\hat\mu and the sample variance ''s''2 are
independent Independent or Independents may refer to: Arts, entertainment, and media Artist groups * Independents (artist group), a group of modernist painters based in the New Hope, Pennsylvania, area of the United States during the early 1930s * Independ ...
, which means there can be no gain in considering their joint distribution. There is also a converse theorem: if in a sample the sample mean and sample variance are independent, then the sample must have come from the normal distribution. The independence between \textstyle\hat\mu and ''s'' can be employed to construct the so-called ''t-statistic'': : t = \frac = \frac \sim t_ This quantity ''t'' has the
Student's t-distribution In probability and statistics, Student's ''t''-distribution (or simply the ''t''-distribution) is any member of a family of continuous probability distributions that arise when estimating the mean of a normally distributed population in sit ...
with degrees of freedom, and it is an ancillary statistic (independent of the value of the parameters). Inverting the distribution of this ''t''-statistics will allow us to construct the
confidence interval In frequentist statistics, a confidence interval (CI) is a range of estimates for an unknown parameter. A confidence interval is computed at a designated ''confidence level''; the 95% confidence level is most common, but other levels, such as 9 ...
for ''μ''; similarly, inverting the ''χ''2 distribution of the statistic ''s''2 will give us the confidence interval for ''σ''2: :\mu \in \left[ \hat\mu - t_ \fracs, \hat\mu + t_ \fracs \right], :\sigma^2 \in \left[ \frac, \frac \right], where ''tk,p'' and are the ''p''th
quantile In statistics and probability, quantiles are cut points dividing the range of a probability distribution into continuous intervals with equal probabilities, or dividing the observations in a sample in the same way. There is one fewer quantile tha ...
s of the ''t''- and ''χ''2-distributions respectively. These confidence intervals are of the ''confidence level'' , meaning that the true values ''μ'' and ''σ''2 fall outside of these intervals with probability (or significance level) ''α''. In practice people usually take , resulting in the 95% confidence intervals. Approximate formulas can be derived from the asymptotic distributions of \textstyle\hat\mu and ''s''2: :\mu \in \left[ \hat\mu - , z_, \fracs, \hat\mu + , z_, \fracs \right], :\sigma^2 \in \left[ s^2 - , z_, \fracs^2, s^2 + , z_, \fracs^2 \right], The approximate formulas become valid for large values of ''n'', and are more convenient for the manual calculation since the standard normal quantiles ''z''''α''/2 do not depend on ''n''. In particular, the most popular value of , results in .


Normality tests

Normality tests assess the likelihood that the given data set comes from a normal distribution. Typically the null hypothesis ''H''0 is that the observations are distributed normally with unspecified mean ''μ'' and variance ''σ''2, versus the alternative ''Ha'' that the distribution is arbitrary. Many tests (over 40) have been devised for this problem. The more prominent of them are outlined below: Diagnostic plots are more intuitively appealing but subjective at the same time, as they rely on informal human judgement to accept or reject the null hypothesis. *
Q–Q plot In statistics, a Q–Q plot (quantile-quantile plot) is a probability plot, a List of graphical methods, graphical method for comparing two probability distributions by plotting their ''quantiles'' against each other. A point on the plot co ...
, also known as normal probability plot or rankit plot—is a plot of the sorted values from the data set against the expected values of the corresponding quantiles from the standard normal distribution. That is, it's a plot of point of the form (Φ−1(''pk''), ''x''(''k'')), where plotting points ''pk'' are equal to ''pk'' = (''k'' − ''α'')/(''n'' + 1 − 2''α'') and ''α'' is an adjustment constant, which can be anything between 0 and 1. If the null hypothesis is true, the plotted points should approximately lie on a straight line. * P–P plot – similar to the Q–Q plot, but used much less frequently. This method consists of plotting the points (Φ(''z''(''k'')), ''pk''), where \textstyle z_ = (x_-\hat\mu)/\hat\sigma. For normally distributed data this plot should lie on a 45° line between (0, 0) and (1, 1). Goodness-of-fit tests: ''Moment-based tests'': * D'Agostino's K-squared test * Jarque–Bera test * Shapiro–Wilk test: This is based on the fact that the line in the Q–Q plot has the slope of ''σ''. The test compares the least squares estimate of that slope with the value of the sample variance, and rejects the null hypothesis if these two quantities differ significantly. ''Tests based on the empirical distribution function'': * Anderson–Darling test * Lilliefors test (an adaptation of the Kolmogorov–Smirnov test)


Bayesian analysis of the normal distribution

Bayesian analysis of normally distributed data is complicated by the many different possibilities that may be considered: * Either the mean, or the variance, or neither, may be considered a fixed quantity. * When the variance is unknown, analysis may be done directly in terms of the variance, or in terms of the
precision Precision, precise or precisely may refer to: Science, and technology, and mathematics Mathematics and computing (general) * Accuracy and precision, measurement deviation from true value and its scatter * Significant figures, the number of digit ...
, the reciprocal of the variance. The reason for expressing the formulas in terms of precision is that the analysis of most cases is simplified. * Both univariate and multivariate normal distribution, multivariate cases need to be considered. * Either conjugate prior, conjugate or improper prior, improper prior distributions may be placed on the unknown variables. * An additional set of cases occurs in Bayesian linear regression, where in the basic model the data is assumed to be normally distributed, and normal priors are placed on the regression coefficients. The resulting analysis is similar to the basic cases of independent identically distributed data. The formulas for the non-linear-regression cases are summarized in the conjugate prior article.


Sum of two quadratics


= Scalar form

= The following auxiliary formula is useful for simplifying the posterior distribution, posterior update equations, which otherwise become fairly tedious. :a(x-y)^2 + b(x-z)^2 = (a + b)\left(x - \frac\right)^2 + \frac(y-z)^2 This equation rewrites the sum of two quadratics in ''x'' by expanding the squares, grouping the terms in ''x'', and completing the square. Note the following about the complex constant factors attached to some of the terms: # The factor \frac has the form of a weighted average of ''y'' and ''z''. # \frac = \frac = (a^ + b^)^. This shows that this factor can be thought of as resulting from a situation where the Multiplicative inverse, reciprocals of quantities ''a'' and ''b'' add directly, so to combine ''a'' and ''b'' themselves, it's necessary to reciprocate, add, and reciprocate the result again to get back into the original units. This is exactly the sort of operation performed by the harmonic mean, so it is not surprising that \frac is one-half the harmonic mean of ''a'' and ''b''.


= Vector form

= A similar formula can be written for the sum of two vector quadratics: If x, y, z are vectors of length ''k'', and A and B are symmetric matrix, symmetric, invertible matrices of size k\times k, then : \begin & (\mathbf-\mathbf)'\mathbf(\mathbf-\mathbf) + (\mathbf-\mathbf)' \mathbf(\mathbf-\mathbf) \\ = & (\mathbf - \mathbf)'(\mathbf+\mathbf)(\mathbf - \mathbf) + (\mathbf - \mathbf)'(\mathbf^ + \mathbf^)^(\mathbf - \mathbf) \end where :\mathbf = (\mathbf + \mathbf)^(\mathbf\mathbf + \mathbf \mathbf) Note that the form x′ A x is called a
quadratic form In mathematics, a quadratic form is a polynomial with terms all of degree two ("form" is another name for a homogeneous polynomial). For example, :4x^2 + 2xy - 3y^2 is a quadratic form in the variables and . The coefficients usually belong to a ...
and is a scalar (mathematics), scalar: :\mathbf'\mathbf\mathbf = \sum_a_ x_i x_j In other words, it sums up all possible combinations of products of pairs of elements from x, with a separate coefficient for each. In addition, since x_i x_j = x_j x_i, only the sum a_ + a_ matters for any off-diagonal elements of A, and there is no loss of generality in assuming that A is symmetric matrix, symmetric. Furthermore, if A is symmetric, then the form \mathbf'\mathbf\mathbf = \mathbf'\mathbf\mathbf.


Sum of differences from the mean

Another useful formula is as follows: \sum_^n (x_i-\mu)^2 = \sum_^n (x_i-\bar)^2 + n(\bar -\mu)^2 where \bar = \frac \sum_^n x_i.


With known variance

For a set of i.i.d. normally distributed data points X of size ''n'' where each individual point ''x'' follows x \sim \mathcal(\mu, \sigma^2) with known
variance In probability theory and statistics, variance is the expectation of the squared deviation of a random variable from its population mean or sample mean. Variance is a measure of dispersion, meaning it is a measure of how far a set of numbers ...
σ2, the conjugate prior distribution is also normally distributed. This can be shown more easily by rewriting the variance as the
precision Precision, precise or precisely may refer to: Science, and technology, and mathematics Mathematics and computing (general) * Accuracy and precision, measurement deviation from true value and its scatter * Significant figures, the number of digit ...
, i.e. using τ = 1/σ2. Then if x \sim \mathcal(\mu, 1/\tau) and \mu \sim \mathcal(\mu_0, 1/\tau_0), we proceed as follows. First, the likelihood function is (using the formula above for the sum of differences from the mean): :\begin p(\mathbf\mid\mu,\tau) &= \prod_^n \sqrt \exp\left(-\frac\tau(x_i-\mu)^2\right) \\ &= \left(\frac\right)^ \exp\left(-\frac\tau \sum_^n (x_i-\mu)^2\right) \\ &= \left(\frac\right)^ \exp\left[-\frac\tau \left(\sum_^n(x_i-\bar)^2 + n(\bar -\mu)^2\right)\right]. \end Then, we proceed as follows: :\begin p(\mu\mid\mathbf) &\propto p(\mathbf\mid\mu) p(\mu) \\ & = \left(\frac\right)^ \exp\left[-\frac\tau \left(\sum_^n(x_i-\bar)^2 + n(\bar -\mu)^2\right)\right] \sqrt \exp\left(-\frac\tau_0(\mu-\mu_0)^2\right) \\ &\propto \exp\left(-\frac\left(\tau\left(\sum_^n(x_i-\bar)^2 + n(\bar -\mu)^2\right) + \tau_0(\mu-\mu_0)^2\right)\right) \\ &\propto \exp\left(-\frac \left(n\tau(\bar-\mu)^2 + \tau_0(\mu-\mu_0)^2 \right)\right) \\ &= \exp\left(-\frac(n\tau + \tau_0)\left(\mu - \dfrac\right)^2 + \frac(\bar - \mu_0)^2\right) \\ &\propto \exp\left(-\frac(n\tau + \tau_0)\left(\mu - \dfrac\right)^2\right) \end In the above derivation, we used the formula above for the sum of two quadratics and eliminated all constant factors not involving ''μ''. The result is the kernel (statistics), kernel of a normal distribution, with mean \frac and precision n\tau + \tau_0, i.e. :p(\mu\mid\mathbf) \sim \mathcal\left(\frac, \frac\right) This can be written as a set of Bayesian update equations for the posterior parameters in terms of the prior parameters: :\begin \tau_0' &= \tau_0 + n\tau \\[5pt] \mu_0' &= \frac \\[5pt] \bar &= \frac\sum_^n x_i \end That is, to combine ''n'' data points with total precision of ''nτ'' (or equivalently, total variance of ''n''/''σ''2) and mean of values \bar, derive a new total precision simply by adding the total precision of the data to the prior total precision, and form a new mean through a ''precision-weighted average'', i.e. a weighted average of the data mean and the prior mean, each weighted by the associated total precision. This makes logical sense if the precision is thought of as indicating the certainty of the observations: In the distribution of the posterior mean, each of the input components is weighted by its certainty, and the certainty of this distribution is the sum of the individual certainties. (For the intuition of this, compare the expression "the whole is (or is not) greater than the sum of its parts". In addition, consider that the knowledge of the posterior comes from a combination of the knowledge of the prior and likelihood, so it makes sense that we are more certain of it than of either of its components.) The above formula reveals why it is more convenient to do Bayesian analysis of conjugate priors for the normal distribution in terms of the precision. The posterior precision is simply the sum of the prior and likelihood precisions, and the posterior mean is computed through a precision-weighted average, as described above. The same formulas can be written in terms of variance by reciprocating all the precisions, yielding the more ugly formulas :\begin ' &= \frac \\[5pt] \mu_0' &= \frac \\[5pt] \bar &= \frac\sum_^n x_i \end


With known mean

For a set of i.i.d. normally distributed data points X of size ''n'' where each individual point ''x'' follows x \sim \mathcal(\mu, \sigma^2) with known mean μ, the conjugate prior of the
variance In probability theory and statistics, variance is the expectation of the squared deviation of a random variable from its population mean or sample mean. Variance is a measure of dispersion, meaning it is a measure of how far a set of numbers ...
has an inverse gamma distribution or a scaled inverse chi-squared distribution. The two are equivalent 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. The prior for σ2 is as follows: :p(\sigma^2\mid\nu_0,\sigma_0^2) = \frac~\frac \propto \frac The likelihood function from above, written in terms of the variance, is: :\begin p(\mathbf\mid\mu,\sigma^2) &= \left(\frac\right)^ \exp\left[-\frac \sum_^n (x_i-\mu)^2\right] \\ &= \left(\frac\right)^ \exp\left[-\frac\right] \end where :S = \sum_^n (x_i-\mu)^2. Then: :\begin p(\sigma^2\mid\mathbf) &\propto p(\mathbf\mid\sigma^2) p(\sigma^2) \\ &= \left(\frac\right)^ \exp\left[-\frac\right] \frac~\frac \\ &\propto \left(\frac\right)^ \frac \exp\left[-\frac + \frac\right] \\ &= \frac \exp\left[-\frac\right] \end The above is also a scaled inverse chi-squared distribution where :\begin \nu_0' &= \nu_0 + n \\ \nu_0'' &= \nu_0 \sigma_0^2 + \sum_^n (x_i-\mu)^2 \end or equivalently :\begin \nu_0' &= \nu_0 + n \\ ' &= \frac \end Reparameterizing in terms of an inverse gamma distribution, the result is: :\begin \alpha' &= \alpha + \frac \\ \beta' &= \beta + \frac \end


With unknown mean and unknown variance

For a set of i.i.d. normally distributed data points X of size ''n'' where each individual point ''x'' follows x \sim \mathcal(\mu, \sigma^2) with unknown mean μ and unknown
variance In probability theory and statistics, variance is the expectation of the squared deviation of a random variable from its population mean or sample mean. Variance is a measure of dispersion, meaning it is a measure of how far a set of numbers ...
σ2, a combined (multivariate) conjugate prior is placed over the mean and variance, consisting of a normal-inverse-gamma distribution. Logically, this originates as follows: # From the analysis of the case with unknown mean but known variance, we see that the update equations involve sufficient statistics computed from the data consisting of the mean of the data points and the total variance of the data points, computed in turn from the known variance divided by the number of data points. # From the analysis of the case with unknown variance but known mean, we see that the update equations involve sufficient statistics over the data consisting of the number of data points and sum of squared deviations. # Keep in mind that the posterior update values serve as the prior distribution when further data is handled. Thus, we should logically think of our priors in terms of the sufficient statistics just described, with the same semantics kept in mind as much as possible. # To handle the case where both mean and variance are unknown, we could place independent priors over the mean and variance, with fixed estimates of the average mean, total variance, number of data points used to compute the variance prior, and sum of squared deviations. Note however that in reality, the total variance of the mean depends on the unknown variance, and the sum of squared deviations that goes into the variance prior (appears to) depend on the unknown mean. In practice, the latter dependence is relatively unimportant: Shifting the actual mean shifts the generated points by an equal amount, and on average the squared deviations will remain the same. This is not the case, however, with the total variance of the mean: As the unknown variance increases, the total variance of the mean will increase proportionately, and we would like to capture this dependence. # This suggests that we create a ''conditional prior'' of the mean on the unknown variance, with a hyperparameter specifying the mean of the pseudo-observations associated with the prior, and another parameter specifying the number of pseudo-observations. This number serves as a scaling parameter on the variance, making it possible to control the overall variance of the mean relative to the actual variance parameter. The prior for the variance also has two hyperparameters, one specifying the sum of squared deviations of the pseudo-observations associated with the prior, and another specifying once again the number of pseudo-observations. Note that each of the priors has a hyperparameter specifying the number of pseudo-observations, and in each case this controls the relative variance of that prior. These are given as two separate hyperparameters so that the variance (aka the confidence) of the two priors can be controlled separately. # This leads immediately to the normal-inverse-gamma distribution, which is the product of the two distributions just defined, with conjugate priors used (an inverse gamma distribution over the variance, and a normal distribution over the mean, ''conditional'' on the variance) and with the same four parameters just defined. The priors are normally defined as follows: :\begin p(\mu\mid\sigma^2; \mu_0, n_0) &\sim \mathcal(\mu_0,\sigma^2/n_0) \\ p(\sigma^2; \nu_0,\sigma_0^2) &\sim I\chi^2(\nu_0,\sigma_0^2) = IG(\nu_0/2, \nu_0\sigma_0^2/2) \end The update equations can be derived, and look as follows: :\begin \bar &= \frac 1 n \sum_^n x_i \\ \mu_0' &= \frac \\ n_0' &= n_0 + n \\ \nu_0' &= \nu_0 + n \\ \nu_0'' &= \nu_0 \sigma_0^2 + \sum_^n (x_i-\bar)^2 + \frac(\mu_0 - \bar)^2 \end The respective numbers of pseudo-observations add the number of actual observations to them. The new mean hyperparameter is once again a weighted average, this time weighted by the relative numbers of observations. Finally, the update for \nu_0'' is similar to the case with known mean, but in this case the sum of squared deviations is taken with respect to the observed data mean rather than the true mean, and as a result a new "interaction term" needs to be added to take care of the additional error source stemming from the deviation between prior and data mean.


Occurrence and applications

The occurrence of normal distribution in practical problems can be loosely classified into four categories: # Exactly normal distributions; # Approximately normal laws, for example when such approximation is justified by the
central limit theorem In probability theory, the central limit theorem (CLT) establishes that, in many situations, when independent random variables are summed up, their properly normalized sum tends toward a normal distribution even if the original variables themselv ...
; and # Distributions modeled as normal – the normal distribution being the distribution with Principle of maximum entropy, maximum entropy for a given mean and variance. # Regression problems – the normal distribution being found after systematic effects have been modeled sufficiently well.


Exact normality

Certain quantities in physics are distributed normally, as was first demonstrated by James Clerk Maxwell. Examples of such quantities are: * Probability density function of a ground state in a quantum harmonic oscillator. * The position of a particle that experiences diffusion. If initially the particle is located at a specific point (that is its probability distribution is the Dirac delta function), then after time ''t'' its location is described by a normal distribution with variance ''t'', which satisfies the diffusion equation \frac f(x,t) = \frac \frac f(x,t). If the initial location is given by a certain density function g(x), then the density at time ''t'' is the convolution of ''g'' and the normal PDF.


Approximate normality

''Approximately'' normal distributions occur in many situations, as explained by the
central limit theorem In probability theory, the central limit theorem (CLT) establishes that, in many situations, when independent random variables are summed up, their properly normalized sum tends toward a normal distribution even if the original variables themselv ...
. When the outcome is produced by many small effects acting ''additively and independently'', its distribution will be close to normal. The normal approximation will not be valid if the effects act multiplicatively (instead of additively), or if there is a single external influence that has a considerably larger magnitude than the rest of the effects. * In counting problems, where the central limit theorem includes a discrete-to-continuum approximation and where Infinite divisibility, infinitely divisible and Indecomposable distribution, decomposable distributions are involved, such as ** binomial distribution, Binomial random variables, associated with binary response variables; ** Poisson distribution, Poisson random variables, associated with rare events; * Thermal radiation has a Bose–Einstein statistics, Bose–Einstein distribution on very short time scales, and a normal distribution on longer timescales due to the central limit theorem.


Assumed normality

There are statistical methods to empirically test that assumption; see the above #Normality tests, Normality tests section. * In biology, the ''logarithm'' of various variables tend to have a normal distribution, that is, they tend to have a
log-normal distribution In probability theory, a log-normal (or lognormal) distribution is a continuous probability distribution of a random variable whose logarithm is normally distributed. Thus, if the random variable is log-normally distributed, then has a normal ...
(after separation on male/female subpopulations), with examples including: ** Measures of size of living tissue (length, height, skin area, weight); ** The ''length'' of ''inert'' appendages (hair, claws, nails, teeth) of biological specimens, ''in the direction of growth''; presumably the thickness of tree bark also falls under this category; ** Certain physiological measurements, such as blood pressure of adult humans. * In finance, in particular the Black–Scholes model, changes in the ''logarithm'' of exchange rates, price indices, and stock market indices are assumed normal (these variables behave like compound interest, not like simple interest, and so are multiplicative). Some mathematicians such as Benoit Mandelbrot have argued that Levy skew alpha-stable distribution, log-Levy distributions, which possesses heavy tails would be a more appropriate model, in particular for the analysis for stock market crashes. The use of the assumption of normal distribution occurring in financial models has also been criticized by Nassim Nicholas Taleb in his works. * Propagation of uncertainty, Measurement errors in physical experiments are often modeled by a normal distribution. This use of a normal distribution does not imply that one is assuming the measurement errors are normally distributed, rather using the normal distribution produces the most conservative predictions possible given only knowledge about the mean and variance of the errors. * In Standardized testing (statistics), standardized testing, results can be made to have a normal distribution by either selecting the number and difficulty of questions (as in the Intelligence quotient, IQ test) or transforming the raw test scores into "output" scores by fitting them to the normal distribution. For example, the SAT's traditional range of 200–800 is based on a normal distribution with a mean of 500 and a standard deviation of 100. * Many scores are derived from the normal distribution, including percentile ranks ("percentiles" or "quantiles"), normal curve equivalents, stanines, Standard score, z-scores, and T-scores. Additionally, some behavioral statistical procedures assume that scores are normally distributed; for example, Student's t-test, t-tests and Analysis of variance, ANOVAs. Bell curve grading assigns relative grades based on a normal distribution of scores. * In hydrology the distribution of long duration river discharge or rainfall, e.g. monthly and yearly totals, is often thought to be practically normal according to the
central limit theorem In probability theory, the central limit theorem (CLT) establishes that, in many situations, when independent random variables are summed up, their properly normalized sum tends toward a normal distribution even if the original variables themselv ...
. The blue picture, made with CumFreq, illustrates an example of fitting the normal distribution to ranked October rainfalls showing the 90% confidence belt based on the
binomial distribution In probability theory and statistics, the binomial distribution with parameters ''n'' and ''p'' is the discrete probability distribution of the number of successes in a sequence of ''n'' independent experiments, each asking a yes–no quest ...
. The rainfall data are represented by plotting positions as part of the cumulative frequency analysis.


Methodological problems and peer review

John Ioannidis argues that using normally distributed standard deviations as standards for validating research findings leave falsifiability, falsifiable predictions about phenomena that are not normally distributed untested. This includes, for example, phenomena that only appear when all necessary conditions are present and one cannot be a substitute for another in an addition-like way and phenomena that are not randomly distributed. Ioannidis argues that standard deviation-centered validation gives a false appearance of validity to hypotheses and theories where some but not all falsifiable predictions are normally distributed since the portion of falsifiable predictions that there is evidence against may and in some cases are in the non-normally distributed parts of the range of falsifiable predictions, as well as baselessly dismissing hypotheses for which none of the falsifiable predictions are normally distributed as if were they unfalsifiable when in fact they do make falsifiable predictions. It is argued by Ioannidis that many cases of mutually exclusive theories being accepted as "validated" by research journals are caused by failure of the journals to take in empirical falsifications of non-normally distributed predictions, and not because mutually exclusive theories are true, which they cannot be, although two mutually exclusive theories can both be wrong and a third one correct.


Computational methods


Generating values from normal distribution

In computer simulations, especially in applications of the Monte-Carlo method, it is often desirable to generate values that are normally distributed. The algorithms listed below all generate the standard normal deviates, since a can be generated as , where ''Z'' is standard normal. All these algorithms rely on the availability of a random number generator ''U'' capable of producing Uniform distribution (continuous), uniform random variates. * The most straightforward method is based on the probability integral transform property: if ''U'' is distributed uniformly on (0,1), then Φ−1(''U'') will have the standard normal distribution. The drawback of this method is that it relies on calculation of the
probit function In probability theory and statistics, the probit function is the quantile function associated with the standard normal distribution. It has applications in data analysis and machine learning, in particular exploratory statistical graphics and ...
Φ−1, which cannot be done analytically. Some approximate methods are described in and in the error function, erf article. Wichura gives a fast algorithm for computing this function to 16 decimal places, which is used by R programming language, R to compute random variates of the normal distribution. * Irwin–Hall distribution#Approximating a Normal distribution, An easy-to-program approximate approach that relies on the
central limit theorem In probability theory, the central limit theorem (CLT) establishes that, in many situations, when independent random variables are summed up, their properly normalized sum tends toward a normal distribution even if the original variables themselv ...
is as follows: generate 12 uniform ''U''(0,1) deviates, add them all up, and subtract 6 – the resulting random variable will have approximately standard normal distribution. In truth, the distribution will be Irwin–Hall distribution, Irwin–Hall, which is a 12-section eleventh-order polynomial approximation to the normal distribution. This random deviate will have a limited range of (−6, 6). Note that in a true normal distribution, only 0.00034% of all samples will fall outside ±6σ. * The Box–Muller transform, Box–Muller method uses two independent random numbers ''U'' and ''V'' distributed uniform distribution (continuous), uniformly on (0,1). Then the two random variables ''X'' and ''Y'' X = \sqrt \, \cos(2 \pi V) , \qquad Y = \sqrt \, \sin(2 \pi V) . will both have the standard normal distribution, and will be
independent Independent or Independents may refer to: Arts, entertainment, and media Artist groups * Independents (artist group), a group of modernist painters based in the New Hope, Pennsylvania, area of the United States during the early 1930s * Independ ...
. This formulation arises because for a bivariate normal random vector (''X'', ''Y'') the squared norm will have the
chi-squared distribution In probability theory and statistics, the chi-squared distribution (also chi-square or \chi^2-distribution) with k degrees of freedom is the distribution of a sum of the squares of k independent standard normal random variables. The chi-squa ...
with two degrees of freedom, which is an easily generated exponential distribution, exponential random variable corresponding to the quantity −2ln(''U'') in these equations; and the angle is distributed uniformly around the circle, chosen by the random variable ''V''. * The Marsaglia polar method is a modification of the Box–Muller method which does not require computation of the sine and cosine functions. In this method, ''U'' and ''V'' are drawn from the uniform (−1,1) distribution, and then is computed. If ''S'' is greater or equal to 1, then the method starts over, otherwise the two quantities X = U\sqrt, \qquad Y = V\sqrt are returned. Again, ''X'' and ''Y'' are independent, standard normal random variables. * The Ratio method is a rejection method. The algorithm proceeds as follows: ** Generate two independent uniform deviates ''U'' and ''V''; ** Compute ''X'' = (''V'' − 0.5)/''U''; ** Optional: if ''X''2 ≤ 5 − 4''e''1/4''U'' then accept ''X'' and terminate algorithm; ** Optional: if ''X''2 ≥ 4''e''−1.35/''U'' + 1.4 then reject ''X'' and start over from step 1; ** If ''X''2 ≤ −4 ln''U'' then accept ''X'', otherwise start over the algorithm. *:The two optional steps allow the evaluation of the logarithm in the last step to be avoided in most cases. These steps can be greatly improved so that the logarithm is rarely evaluated. * The ziggurat algorithm is faster than the Box–Muller transform and still exact. In about 97% of all cases it uses only two random numbers, one random integer and one random uniform, one multiplication and an if-test. Only in 3% of the cases, where the combination of those two falls outside the "core of the ziggurat" (a kind of rejection sampling using logarithms), do exponentials and more uniform random numbers have to be employed. * Integer arithmetic can be used to sample from the standard normal distribution. This method is exact in the sense that it satisfies the conditions of ''ideal approximation''; i.e., it is equivalent to sampling a real number from the standard normal distribution and rounding this to the nearest representable floating point number. * There is also some investigation into the connection between the fast Hadamard transform and the normal distribution, since the transform employs just addition and subtraction and by the central limit theorem random numbers from almost any distribution will be transformed into the normal distribution. In this regard a series of Hadamard transforms can be combined with random permutations to turn arbitrary data sets into a normally distributed data.


Numerical approximations for the normal CDF and normal quantile function

The standard normal cumulative distribution function, CDF is widely used in scientific and statistical computing. The values Φ(''x'') may be approximated very accurately by a variety of methods, such as numerical integration, Taylor series, asymptotic series and Gauss's continued fraction#Of Kummer's confluent hypergeometric function, continued fractions. Different approximations are used depending on the desired level of accuracy. * give the approximation for Φ(''x'') for ''x > 0'' with the absolute error (algorith
26.2.17
: \Phi(x) = 1 - \varphi(x)\left(b_1 t + b_2 t^2 + b_3t^3 + b_4 t^4 + b_5 t^5\right) + \varepsilon(x), \qquad t = \frac, where ''ϕ''(''x'') is the standard normal PDF, and ''b''0 = 0.2316419, ''b''1 = 0.319381530, ''b''2 = −0.356563782, ''b''3 = 1.781477937, ''b''4 = −1.821255978, ''b''5 = 1.330274429. * lists some dozens of approximations – by means of rational functions, with or without exponentials – for the function. His algorithms vary in the degree of complexity and the resulting precision, with maximum absolute precision of 24 digits. An algorithm by combines Hart's algorithm 5666 with a continued fraction approximation in the tail to provide a fast computation algorithm with a 16-digit precision. * after recalling Hart68 solution is not suited for erf, gives a solution for both erf and erfc, with maximal relative error bound, via rational function, Rational Chebyshev Approximation. * suggested a simple algorithm based on the Taylor series expansion \Phi(x) = \frac12 + \varphi(x)\left( x + \frac 3 + \frac + \frac + \frac + \cdots \right) for calculating with arbitrary precision. The drawback of this algorithm is comparatively slow calculation time (for example it takes over 300 iterations to calculate the function with 16 digits of precision when ). * The GNU Scientific Library calculates values of the standard normal CDF using Hart's algorithms and approximations with Chebyshev polynomials. Shore (1982) introduced simple approximations that may be incorporated in stochastic optimization models of engineering and operations research, like reliability engineering and inventory analysis. Denoting , the simplest approximation for the quantile function is: z = \Phi^(p)=5.5556\left[1- \left( \frac p \right)^\right],\qquad p\ge 1/2 This approximation delivers for ''z'' a maximum absolute error of 0.026 (for , corresponding to ). For replace ''p'' by and change sign. Another approximation, somewhat less accurate, is the single-parameter approximation: z=-0.4115\left\, \qquad p\ge 1/2 The latter had served to derive a simple approximation for the loss integral of the normal distribution, defined by \begin L(z) & =\int_z^\infty (u-z)\varphi(u) \, du=\int_z^\infty [1-\Phi (u)] \, du \\[5pt] L(z) & \approx \begin 0.4115\left(\dfrac p \right) - z, & p<1/2, \\ \\ 0.4115\left( \dfrac p \right), & p\ge 1/2. \end \\[5pt] \text \\ L(z) & \approx \begin 0.4115\left\, & p < 1/2, \\ \\ 0.4115 \dfrac p, & p\ge 1/2. \end \end This approximation is particularly accurate for the right far-tail (maximum error of 10−3 for z≥1.4). Highly accurate approximations for the CDF, based on Response modeling methodology, Response Modeling Methodology (RMM, Shore, 2011, 2012), are shown in Shore (2005). Some more approximations can be found at: Error function#Approximation with elementary functions. In particular, small ''relative'' error on the whole domain for the CDF \Phi and the quantile function \Phi^ as well, is achieved via an explicitly invertible formula by Sergei Winitzki in 2008.


History


Development

Some authors attribute the credit for the discovery of the normal distribution to Abraham de Moivre, de Moivre, who in 1738 published in the second edition of his "''The Doctrine of Chances''" the study of the coefficients in the binomial expansion of . De Moivre proved that the middle term in this expansion has the approximate magnitude of 2^n/\sqrt, and that "If ''m'' or ''n'' be a Quantity infinitely great, then the Logarithm of the Ratio, which a Term distant from the middle by the Interval ''ℓ'', has to the middle Term, is -\frac." Although this theorem can be interpreted as the first obscure expression for the normal probability law, Stephen Stigler, Stigler points out that de Moivre himself did not interpret his results as anything more than the approximate rule for the binomial coefficients, and in particular de Moivre lacked the concept of the probability density function. In 1823 Carl Friedrich Gauss, Gauss published his monograph "''Theoria combinationis observationum erroribus minimis obnoxiae''" where among other things he introduces several important statistical concepts, such as the method of least squares, the method of maximum likelihood, and the ''normal distribution''. Gauss used ''M'', , to denote the measurements of some unknown quantity ''V'', and sought the "most probable" estimator of that quantity: the one that maximizes the probability of obtaining the observed experimental results. In his notation φΔ is the probability density function of the measurement errors of magnitude Δ. Not knowing what the function ''φ'' is, Gauss requires that his method should reduce to the well-known answer: the arithmetic mean of the measured values. Starting from these principles, Gauss demonstrates that the only law that rationalizes the choice of arithmetic mean as an estimator of the location parameter, is the normal law of errors: \varphi\mathit = \frac h \, e^, where ''h'' is "the measure of the precision of the observations". Using this normal law as a generic model for errors in the experiments, Gauss formulates what is now known as the non-linear least squares, non-linear weighted least squares method. Although Gauss was the first to suggest the normal distribution law, Pierre Simon de Laplace, Laplace made significant contributions. It was Laplace who first posed the problem of aggregating several observations in 1774, although his own solution led to the Laplacian distribution. It was Laplace who first calculated the value of the Gaussian integral, integral in 1782, providing the normalization constant for the normal distribution. Finally, it was Laplace who in 1810 proved and presented to the Academy the fundamental
central limit theorem In probability theory, the central limit theorem (CLT) establishes that, in many situations, when independent random variables are summed up, their properly normalized sum tends toward a normal distribution even if the original variables themselv ...
, which emphasized the theoretical importance of the normal distribution. It is of interest to note that in 1809 an Irish-American mathematician Robert Adrain published two insightful but flawed derivations of the normal probability law, simultaneously and independently from Gauss. His works remained largely unnoticed by the scientific community, until in 1871 they were exhumed by Cleveland Abbe, Abbe. In the middle of the 19th century James Clerk Maxwell, Maxwell demonstrated that the normal distribution is not just a convenient mathematical tool, but may also occur in natural phenomena: "The number of particles whose velocity, resolved in a certain direction, lies between ''x'' and ''x'' + ''dx'' is \operatorname \frac\; e^ \, dx


Naming

Today, the concept is usually known in English as the normal distribution or Gaussian distribution. Other less common names include Gauss distribution, Laplace-Gauss distribution, the law of error, the law of facility of errors, Laplace's second law, Gaussian law. Gauss himself apparently coined the term with reference to the "normal equations" involved in its applications, with normal having its technical meaning of orthogonal rather than "usual". However, by the end of the 19th century some authors had started using the name ''normal distribution'', where the word "normal" was used as an adjective – the term now being seen as a reflection of the fact that this distribution was seen as typical, common – and thus "normal". Charles Sanders Peirce, Peirce (one of those authors) once defined "normal" thus: "...the 'normal' is not the average (or any other kind of mean) of what actually occurs, but of what ''would'', in the long run, occur under certain circumstances." Around the turn of the 20th century Karl Pearson, Pearson popularized the term ''normal'' as a designation for this distribution. Also, it was Pearson who first wrote the distribution in terms of the standard deviation ''σ'' as in modern notation. Soon after this, in year 1915, Ronald Fisher, Fisher added the location parameter to the formula for normal distribution, expressing it in the way it is written nowadays: df = \frac e^ \, dx. The term "standard normal", which denotes the normal distribution with zero mean and unit variance came into general use around the 1950s, appearing in the popular textbooks by P. G. Hoel (1947) "''Introduction to mathematical statistics''" and A. M. Mood (1950) "''Introduction to the theory of statistics''".


See also

* Bates distribution – similar to the Irwin–Hall distribution, but rescaled back into the 0 to 1 range * Behrens–Fisher problem – the long-standing problem of testing whether two normal samples with different variances have same means; * Bhattacharyya distance – method used to separate mixtures of normal distributions * Erdős–Kac theorem – on the occurrence of the normal distribution in number theory * Full width at half maximum * Gaussian blur – convolution, which uses the normal distribution as a kernel * Modified half-normal distribution with the pdf on (0, \infty) is given as f(x)= \frac, where \Psi(\alpha,z)=_1\Psi_1\left(\begin\left(\alpha,\frac\right)\\(1,0)\end;z \right) denotes the Fox-Wright Psi function. * Normally distributed and uncorrelated does not imply independent * Ratio normal distribution * Reciprocal normal distribution * Standard normal table * Stein's lemma * Sub-Gaussian distribution * Sum of normally distributed random variables * Tweedie distribution – The normal distribution is a member of the family of Tweedie exponential dispersion models. * Wrapped normal distribution – the Normal distribution applied to a circular domain * Z-test – using the normal distribution


Notes


References


Citations


Sources

* * In particular, the entries fo
"bell-shaped and bell curve"
an

* * * * * * * * * * * * * * * * * * * * * * * * Translated by Stephen M. Stigler in ''Statistical Science'' 1 (3), 1986: . * * * * * * * * * * * * * * * * * * * * * * * * * * * *


External links

*
Normal distribution calculator
{{Authority control Normal distribution, Continuous distributions Conjugate prior distributions Exponential family distributions Stable distributions Location-scale family probability distributions]">f'(X), \infty.


Zero-variance limit

In the limit (mathematics), limit when \sigma tends to zero, the probability density f(x) eventually tends to zero at any x\ne \mu, but grows without limit if x = \mu, while its integral remains equal to 1. Therefore, the normal distribution cannot be defined as an ordinary
function Function or functionality may refer to: Computing * Function key, a type of key on computer keyboards * Function model, a structured representation of processes in a system * Function object or functor or functionoid, a concept of object-oriente ...
when \sigma = 0. However, one can define the normal distribution with zero variance as a
generalized function In mathematics, generalized functions are objects extending the notion of functions. There is more than one recognized theory, for example the theory of distributions. Generalized functions are especially useful in making discontinuous functions ...
; specifically, as Dirac's "delta function" \delta translated by the mean \mu, that is f(x)=\delta(x-\mu). Its CDF is then the
Heaviside step function The Heaviside step function, or the unit step function, usually denoted by or (but sometimes , or ), is a step function, named after Oliver Heaviside (1850–1925), the value of which is zero for negative arguments and one for positive argume ...
translated by the mean \mu, namely :F(x) = \begin 0 & \textx < \mu \\ 1 & \textx \geq \mu \end


Maximum entropy

Of all probability distributions over the reals with a specified mean \mu and variance \sigma^2, the normal distribution N(\mu,\sigma^2) is the one with maximum entropy. If X is a
continuous random variable In probability theory and statistics, a probability distribution is the mathematical function that gives the probabilities of occurrence of different possible outcomes for an experiment. It is a mathematical description of a random phenomenon i ...
with
probability density In probability theory, a probability density function (PDF), or density of a continuous random variable, is a function whose value at any given sample (or point) in the sample space (the set of possible values taken by the random variable) can ...
f(x), then the entropy of X is defined as : H(X) = - \int_^\infty f(x)\log f(x)\, dx where f(x)\log f(x) is understood to be zero whenever f(x)=0. This functional can be maximized, subject to the constraints that the distribution is properly normalized and has a specified variance, by using
variational calculus The calculus of variations (or Variational Calculus) is a field of mathematical analysis that uses variations, which are small changes in functions and functionals, to find maxima and minima of functionals: mappings from a set of functions t ...
. A function with two
Lagrange multipliers In mathematical optimization, the method of Lagrange multipliers is a strategy for finding the local maxima and minima of a function subject to equality constraints (i.e., subject to the condition that one or more equations have to be satisfied ex ...
is defined: : L=\int_^\infty f(x)\ln(f(x))\,dx-\lambda_0\left(1-\int_^\infty f(x)\,dx\right)-\lambda\left(\sigma^2-\int_^\infty f(x)(x-\mu)^2\,dx\right) where f(x) is, for now, regarded as some density function with mean \mu and standard deviation \sigma. At maximum entropy, a small variation \delta f(x) about f(x) will produce a variation \delta L about L which is equal to 0: : 0=\delta L=\int_^\infty \delta f(x)\left (\ln(f(x))+1+\lambda_0+\lambda(x-\mu)^2\right )\,dx Since this must hold for any small \delta f(x), the term in brackets must be zero, and solving for f(x) yields: :f(x)=e^ Using the constraint equations to solve for \lambda_0 and \lambda yields the density of the normal distribution: : f(x, \mu, \sigma)=\frace^ The entropy of a normal distribution is equal to : H(X)=\tfrac(1+\log(2\sigma^2\pi))


Other properties


Related distributions


Central limit theorem

The central limit theorem states that under certain (fairly common) conditions, the sum of many random variables will have an approximately normal distribution. More specifically, where X_1,\ldots ,X_n are
independent and identically distributed In probability theory and statistics, a collection of random variables is independent and identically distributed if each random variable has the same probability distribution as the others and all are mutually independent. This property is usua ...
random variables with the same arbitrary distribution, zero mean, and variance \sigma^2 and Z is their mean scaled by \sqrt : Z = \sqrt\left(\frac\sum_^n X_i\right) Then, as n increases, the probability distribution of Z will tend to the normal distribution with zero mean and variance \sigma^2. The theorem can be extended to variables (X_i) that are not independent and/or not identically distributed if certain constraints are placed on the degree of dependence and the moments of the distributions. Many
test statistic A test statistic is a statistic (a quantity derived from the sample) used in statistical hypothesis testing.Berger, R. L.; Casella, G. (2001). ''Statistical Inference'', Duxbury Press, Second Edition (p.374) A hypothesis test is typically specif ...
s, scores, and
estimator In statistics, an estimator is a rule for calculating an estimate of a given quantity based on observed data: thus the rule (the estimator), the quantity of interest (the estimand) and its result (the estimate) are distinguished. For example, the ...
s encountered in practice contain sums of certain random variables in 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 distributions. The central limit theorem also implies that certain distributions can be approximated by the normal distribution, for example: * The
binomial distribution In probability theory and statistics, the binomial distribution with parameters ''n'' and ''p'' is the discrete probability distribution of the number of successes in a sequence of ''n'' independent experiments, each asking a yes–no quest ...
B(n,p) is approximately normal with mean np and variance np(1-p) for large n and for p not too close to 0 or 1. * The
Poisson distribution In probability theory and statistics, the Poisson distribution is a discrete probability distribution that expresses the probability of a given number of events occurring in a fixed interval of time or space if these events occur with a known co ...
with parameter \lambda is approximately normal with mean \lambda and variance \lambda, for large values of \lambda. * The
chi-squared distribution In probability theory and statistics, the chi-squared distribution (also chi-square or \chi^2-distribution) with k degrees of freedom is the distribution of a sum of the squares of k independent standard normal random variables. The chi-squa ...
\chi^2(k) is approximately normal with mean k and variance 2k, for large k. * The
Student's t-distribution In probability and statistics, Student's ''t''-distribution (or simply the ''t''-distribution) is any member of a family of continuous probability distributions that arise when estimating the mean of a normally distributed population in sit ...
t(\nu) is approximately normal with mean 0 and variance 1 when \nu is large. Whether these approximations are sufficiently accurate depends on the purpose for which they are needed, and the rate of convergence to the normal distribution. It is typically the case that such approximations are less accurate in the tails of the distribution. A general upper bound for the approximation error in the central limit theorem is given by the
Berry–Esseen theorem In probability theory, the central limit theorem states that, under certain circumstances, the probability distribution of the scaled mean of a random sample converges to a normal distribution as the sample size increases to infinity. Under strong ...
, improvements of the approximation are given by the
Edgeworth expansion The Gram–Charlier A series (named in honor of Jørgen Pedersen Gram and Carl Charlier), and the Edgeworth series (named in honor of Francis Ysidro Edgeworth) are series that approximate a probability distribution in terms of its cumulants. The se ...
s. This theorem can also be used to justify modeling the sum of many uniform noise sources as
Gaussian noise Gaussian noise, named after Carl Friedrich Gauss, is a term from signal processing theory denoting a kind of signal noise that has a probability density function (pdf) equal to that of the normal distribution (which is also known as the Gaussia ...
. See
AWGN Additive white Gaussian noise (AWGN) is a basic noise model used in information theory to mimic the effect of many random processes that occur in nature. The modifiers denote specific characteristics: * ''Additive'' because it is added to any nois ...
.


Operations and functions of normal variables

The
probability density In probability theory, a probability density function (PDF), or density of a continuous random variable, is a function whose value at any given sample (or point) in the sample space (the set of possible values taken by the random variable) can ...
,
cumulative distribution In statistics, the frequency (or absolute frequency) of an event i is the number n_i of times the observation has occurred/recorded in an experiment or study. These frequencies are often depicted graphically or in tabular form. Types The cumul ...
, and inverse cumulative distribution of any function of one or more independent or correlated normal variables can be computed with the numerical method of ray-tracing
Matlab code
. In the following sections we look at some special cases.


Operations on a single normal variable

If X is distributed normally with mean \mu and variance \sigma^2, then * aX+b, for any real numbers a and b, is also normally distributed, with mean a\mu+b and standard deviation , a, \sigma. That is, the family of normal distributions is closed under linear transformations. * The exponential of X is distributed log-normally: . * The absolute value of X has
folded normal distribution The folded normal distribution is a probability distribution related to the normal distribution. Given a normally distributed random variable ''X'' with mean ''μ'' and variance ''σ''2, the random variable ''Y'' = , ''X'', has a folded normal d ...
: . If \mu = 0 this is known as the
half-normal distribution In probability theory and statistics, the half-normal distribution is a special case of the folded normal distribution. Let X follow an ordinary normal distribution, N(0,\sigma^2). Then, Y=, X, follows a half-normal distribution. Thus, the hal ...
. * The absolute value of normalized residuals, , ''X'' − ''μ'', /''σ'', has
chi distribution In probability theory and statistics, the chi distribution is a continuous probability distribution. It is the distribution of the positive square root of the sum of squares of a set of independent random variables each following a standard norm ...
with one degree of freedom: , X - \mu, / \sigma \sim \chi_1. * The square of ''X''/''σ'' has the
noncentral chi-squared distribution In probability theory and statistics, the noncentral chi-squared distribution (or noncentral chi-square distribution, noncentral \chi^2 distribution) is a noncentral generalization of the chi-squared distribution. It often arises in the power a ...
with one degree of freedom: X^2 / \sigma^2 \sim \chi_1^2(\mu^2 / \sigma^2). If \mu = 0, the distribution is called simply chi-squared. * The log likelihood of a normal variable x is simply the log of its
probability density function In probability theory, a probability density function (PDF), or density of a continuous random variable, is a function whose value at any given sample (or point) in the sample space (the set of possible values taken by the random variable) can ...
: \ln p(x)= -\frac \left(\frac \right)^2 -\ln \left(\sigma \sqrt \right) = -\frac z^2 -\ln \left(\sigma \sqrt \right). Since this is a scaled and shifted square of a standard normal variable, it is distributed as a scaled and shifted chi-squared variable. * The distribution of the variable ''X'' restricted to an interval 'a'', ''b''is called the
truncated normal distribution In probability and statistics, the truncated normal distribution is the probability distribution derived from that of a normally distributed random variable by bounding the random variable from either below or above (or both). The truncated no ...
. * (''X'' − ''μ'')−2 has a
Lévy distribution In probability theory and statistics, the Lévy distribution, named after Paul Lévy, is a continuous probability distribution for a non-negative random variable. In spectroscopy, this distribution, with frequency as the dependent variable, is kn ...
with location 0 and scale ''σ''−2.


= Operations on two independent normal variables

= * If X_1 and X_2 are two
independent Independent or Independents may refer to: Arts, entertainment, and media Artist groups * Independents (artist group), a group of modernist painters based in the New Hope, Pennsylvania, area of the United States during the early 1930s * Independ ...
normal random variables, with means \mu_1, \mu_2 and standard deviations \sigma_1, \sigma_2, then their sum X_1 + X_2 will also be normally distributed, roof/sup> with mean \mu_1 + \mu_2 and variance \sigma_1^2 + \sigma_2^2. * In particular, if X and Y are independent normal deviates with zero mean and variance \sigma^2, then X + Y and X - Y are also independent and normally distributed, with zero mean and variance 2\sigma^2. This is a special case of the
polarization identity In linear algebra, a branch of mathematics, the polarization identity is any one of a family of formulas that express the inner product of two vectors in terms of the norm of a normed vector space. If a norm arises from an inner product then t ...
. * If X_1, X_2 are two independent normal deviates with mean \mu and deviation \sigma, and a, b are arbitrary real numbers, then the variable X_3 = \frac + \mu is also normally distributed with mean \mu and deviation \sigma. It follows that the normal distribution is
stable A stable is a building in which livestock, especially horses, are kept. It most commonly means a building that is divided into separate stalls for individual animals and livestock. There are many different types of stables in use today; the ...
(with exponent \alpha=2).


= Operations on two independent standard normal variables

= If X_1 and X_2 are two independent standard normal random variables with mean 0 and variance 1, then * Their sum and difference is distributed normally with mean zero and variance two: X_1 \pm X_2 \sim N(0, 2). * Their product Z = X_1 X_2 follows the
product distribution A product distribution is a probability distribution constructed as the distribution of the product of random variables having two other known distributions. Given two statistically independent random variables ''X'' and ''Y'', the distribution of ...
with density function f_Z(z) = \pi^ K_0(, z, ) where K_0 is the
modified Bessel function of the second kind Bessel functions, first defined by the mathematician Daniel Bernoulli and then generalized by Friedrich Bessel, are canonical solutions of Bessel's differential equation x^2 \frac + x \frac + \left(x^2 - \alpha^2 \right)y = 0 for an arbitrary ...
. This distribution is symmetric around zero, unbounded at z = 0, and has the
characteristic function In mathematics, the term "characteristic function" can refer to any of several distinct concepts: * The indicator function of a subset, that is the function ::\mathbf_A\colon X \to \, :which for a given subset ''A'' of ''X'', has value 1 at points ...
\phi_Z(t) = (1 + t^2)^. * Their ratio follows the standard
Cauchy distribution The Cauchy distribution, named after Augustin Cauchy, is a continuous probability distribution. It is also known, especially among physicists, as the Lorentz distribution (after Hendrik Lorentz), Cauchy–Lorentz distribution, Lorentz(ian) fun ...
: X_1/ X_2 \sim \operatorname(0, 1). * Their Euclidean norm \sqrt has the
Rayleigh distribution In probability theory and statistics, the Rayleigh distribution is a continuous probability distribution for nonnegative-valued random variables. Up to rescaling, it coincides with the chi distribution with two degrees of freedom. The distribut ...
.


Operations on multiple independent normal variables

* Any linear combination of independent normal deviates is a normal deviate. * If X_1, X_2, \ldots, X_n are independent standard normal random variables, then the sum of their squares has the
chi-squared distribution In probability theory and statistics, the chi-squared distribution (also chi-square or \chi^2-distribution) with k degrees of freedom is the distribution of a sum of the squares of k independent standard normal random variables. The chi-squa ...
with n degrees of freedom X_1^2 + \cdots + X_n^2 \sim \chi_n^2. * If X_1, X_2, \ldots, X_n are independent normally distributed random variables with means \mu and variances \sigma^2, then their
sample mean The sample mean (or "empirical mean") and the sample covariance are statistics computed from a Sample (statistics), sample of data on one or more random variables. The sample mean is the average value (or mean, mean value) of a sample (statistic ...
is independent from the sample
standard deviation In statistics, the standard deviation is a measure of the amount of variation or dispersion of a set of values. A low standard deviation indicates that the values tend to be close to the mean (also called the expected value) of the set, while ...
, which can be demonstrated using Basu's theorem or
Cochran's theorem In statistics, Cochran's theorem, devised by William G. Cochran, is a theorem used to justify results relating to the probability distributions of statistics that are used in the analysis of variance. Statement Let ''U''1, ..., ''U'N'' be i.i. ...
. The ratio of these two quantities will have the
Student's t-distribution In probability and statistics, Student's ''t''-distribution (or simply the ''t''-distribution) is any member of a family of continuous probability distributions that arise when estimating the mean of a normally distributed population in sit ...
with n-1 degrees of freedom: t = \frac = \frac \sim t_. * If X_1, X_2, \ldots, X_n, Y_1, Y_2, \ldots, Y_m are independent standard normal random variables, then the ratio of their normalized sums of squares will have the with degrees of freedom: F = \frac \sim F_.


Operations on multiple correlated normal variables

* A
quadratic form In mathematics, a quadratic form is a polynomial with terms all of degree two ("form" is another name for a homogeneous polynomial). For example, :4x^2 + 2xy - 3y^2 is a quadratic form in the variables and . The coefficients usually belong to a ...
of a normal vector, i.e. a quadratic function q = \sum x_i^2 + \sum x_j + c of multiple independent or correlated normal variables, is a generalized chi-square variable.


Operations on the density function

The split normal distribution is most directly defined in terms of joining scaled sections of the density functions of different normal distributions and rescaling the density to integrate to one. The
truncated normal distribution In probability and statistics, the truncated normal distribution is the probability distribution derived from that of a normally distributed random variable by bounding the random variable from either below or above (or both). The truncated no ...
results from rescaling a section of a single density function.


Infinite divisibility and Cramér's theorem

For any positive integer \text, any normal distribution with mean \mu and variance \sigma^2 is the distribution of the sum of \text independent normal deviates, each with mean \frac and variance \frac. This property is called
infinite divisibility Infinite divisibility arises in different ways in philosophy, physics, economics, order theory (a branch of mathematics), and probability theory (also a branch of mathematics). One may speak of infinite divisibility, or the lack thereof, of matter ...
. Conversely, if X_1 and X_2 are independent random variables and their sum X_1+X_2 has a normal distribution, then both X_1 and X_2 must be normal deviates. This result is known as Cramér's decomposition theorem, and is equivalent to saying that the convolution of two distributions is normal if and only if both are normal. Cramér's theorem implies that a linear combination of independent non-Gaussian variables will never have an exactly normal distribution, although it may approach it arbitrarily closely.


Bernstein's theorem

Bernstein's theorem states that if X and Y are independent and X + Y and X - Y are also independent, then both ''X'' and ''Y'' must necessarily have normal distributions. More generally, if X_1, \ldots, X_n are independent random variables, then two distinct linear combinations \sum and \sumwill be independent if and only if all X_k are normal and \sum, where \sigma_k^2 denotes the variance of X_k.


Extensions

The notion of normal distribution, being one of the most important distributions in probability theory, has been extended far beyond the standard framework of the univariate (that is one-dimensional) case (Case 1). All these extensions are also called ''normal'' or ''Gaussian'' laws, so a certain ambiguity in names exists. * The
multivariate normal distribution In probability theory and statistics, the multivariate normal distribution, multivariate Gaussian distribution, or joint normal distribution is a generalization of the one-dimensional (univariate) normal distribution to higher dimensions. One d ...
describes the Gaussian law in the ''k''-dimensional Euclidean space. A vector is multivariate-normally distributed if any linear combination of its components has a (univariate) normal distribution. The variance of ''X'' is a ''k×k'' symmetric positive-definite matrix ''V''. The multivariate normal distribution is a special case of the
elliptical distribution In probability and statistics, an elliptical distribution is any member of a broad family of probability distributions that generalize the multivariate normal distribution. Intuitively, in the simplified two and three dimensional case, the joint di ...
s. As such, its iso-density loci in the ''k'' = 2 case are ellipses and in the case of arbitrary ''k'' are ellipsoids. * Rectified Gaussian distribution a rectified version of normal distribution with all the negative elements reset to 0 * Complex normal distribution deals with the complex normal vectors. A complex vector is said to be normal if both its real and imaginary components jointly possess a 2''k''-dimensional multivariate normal distribution. The variance-covariance structure of ''X'' is described by two matrices: the ''variance'' matrix Γ, and the ''relation'' matrix ''C''. * Matrix normal distribution describes the case of normally distributed matrices. * Gaussian processes are the normally distributed stochastic processes. These can be viewed as elements of some infinite-dimensional Hilbert space ''H'', and thus are the analogues of multivariate normal vectors for the case . A random element is said to be normal if for any constant the scalar product has a (univariate) normal distribution. The variance structure of such Gaussian random element can be described in terms of the linear ''covariance ''. Several Gaussian processes became popular enough to have their own names: ** Wiener process, Brownian motion, ** Brownian bridge, ** Ornstein–Uhlenbeck process. * Gaussian q-distribution is an abstract mathematical construction that represents a "q-analogue" of the normal distribution. * the q-Gaussian is an analogue of the Gaussian distribution, in the sense that it maximises the Tsallis entropy, and is one type of Tsallis distribution. Note that this distribution is different from the Gaussian q-distribution above. * The Kaniadakis Gaussian distribution, Kaniadakis ''κ''-Gaussian distribution is a generalization of the Gaussian distribution which arises from the Kaniadakis statistics, being one of the Kaniadakis distribution, Kaniadakis distributions. A random variable ''X'' has a two-piece normal distribution if it has a distribution : f_X( x ) = N( \mu, \sigma_1^2 ) \text x \le \mu : f_X( x ) = N( \mu, \sigma_2^2 ) \text x \ge \mu where ''μ'' is the mean and ''σ''1 and ''σ''2 are the standard deviations of the distribution to the left and right of the mean respectively. The mean, variance and third central moment of this distribution have been determined : \operatorname( X ) = \mu + \sqrt ( \sigma_2 - \sigma_1 ) : \operatorname( X ) = \left( 1 - \frac 2 \pi\right)( \sigma_2 - \sigma_1 )^2 + \sigma_1 \sigma_2 : \operatorname( X ) = \sqrt( \sigma_2 - \sigma_1 ) \left[ \left( \frac 4 \pi - 1 \right) ( \sigma_2 - \sigma_1)^2 + \sigma_1 \sigma_2 \right] where E(''X''), V(''X'') and T(''X'') are the mean, variance, and third central moment respectively. One of the main practical uses of the Gaussian law is to model the empirical distributions of many different random variables encountered in practice. In such case a possible extension would be a richer family of distributions, having more than two parameters and therefore being able to fit the empirical distribution more accurately. The examples of such extensions are: * Pearson distribution — a four-parameter family of probability distributions that extend the normal law to include different skewness and kurtosis values. * The generalized normal distribution, also known as the exponential power distribution, allows for distribution tails with thicker or thinner asymptotic behaviors.


Statistical inference


Estimation of parameters

It is often the case that we do not know the parameters of the normal distribution, but instead want to Estimation theory, estimate them. That is, having a sample (x_1, \ldots, x_n) from a normal N(\mu, \sigma^2) population we would like to learn the approximate values of parameters \mu and \sigma^2. The standard approach to this problem is the maximum likelihood method, which requires maximization of the ''log-likelihood function'': : \ln\mathcal(\mu,\sigma^2) = \sum_^n \ln f(x_i\mid\mu,\sigma^2) = -\frac\ln(2\pi) - \frac\ln\sigma^2 - \frac\sum_^n (x_i-\mu)^2. Taking derivatives with respect to \mu and \sigma^2 and solving the resulting system of first order conditions yields the ''maximum likelihood estimates'': : \hat = \overline \equiv \frac\sum_^n x_i, \qquad \hat^2 = \frac \sum_^n (x_i - \overline)^2.


Sample mean

Estimator \textstyle\hat\mu is called the ''
sample mean The sample mean (or "empirical mean") and the sample covariance are statistics computed from a Sample (statistics), sample of data on one or more random variables. The sample mean is the average value (or mean, mean value) of a sample (statistic ...
'', since it is the arithmetic mean of all observations. The statistic \textstyle\overline is complete statistic, complete and sufficient statistic, sufficient for \mu, and therefore by the Lehmann–Scheffé theorem, \textstyle\hat\mu is the uniformly minimum variance unbiased (UMVU) estimator. In finite samples it is distributed normally: : \hat\mu \sim \mathcal(\mu,\sigma^2/n). The variance of this estimator is equal to the ''μμ''-element of the inverse Fisher information matrix \textstyle\mathcal^. This implies that the estimator is efficient estimator, finite-sample efficient. Of practical importance is the fact that the standard error (statistics), standard error of \textstyle\hat\mu is proportional to \textstyle1/\sqrt, that is, if one wishes to decrease the standard error by a factor of 10, one must increase the number of points in the sample by a factor of 100. This fact is widely used in determining sample sizes for opinion polls and the number of trials in Monte Carlo simulations. From the standpoint of the asymptotic theory (statistics), asymptotic theory, \textstyle\hat\mu is consistent estimator, consistent, that is, it convergence in probability, converges in probability to \mu as n\rightarrow\infty. The estimator is also asymptotic normality, asymptotically normal, which is a simple corollary of the fact that it is normal in finite samples: : \sqrt(\hat\mu-\mu) \,\xrightarrow\, \mathcal(0,\sigma^2).


Sample variance

The estimator \textstyle\hat\sigma^2 is called the ''sample variance'', since it is the variance of the sample ((x_1, \ldots, x_n)). In practice, another estimator is often used instead of the \textstyle\hat\sigma^2. This other estimator is denoted s^2, and is also called the ''sample variance'', which represents a certain ambiguity in terminology; its square root s is called the ''sample standard deviation''. The estimator s^2 differs from \textstyle\hat\sigma^2 by having instead of ''n'' in the denominator (the so-called Bessel's correction): : s^2 = \frac \hat\sigma^2 = \frac \sum_^n (x_i - \overline)^2. The difference between s^2 and \textstyle\hat\sigma^2 becomes negligibly small for large ''n''s. In finite samples however, the motivation behind the use of s^2 is that it is an unbiased estimator of the underlying parameter \sigma^2, whereas \textstyle\hat\sigma^2 is biased. Also, by the Lehmann–Scheffé theorem the estimator s^2 is uniformly minimum variance unbiased (Minimum-variance unbiased estimator, UMVU), which makes it the "best" estimator among all unbiased ones. However it can be shown that the biased estimator \textstyle\hat\sigma^2 is "better" than the s^2 in terms of the mean squared error (MSE) criterion. In finite samples both s^2 and \textstyle\hat\sigma^2 have scaled
chi-squared distribution In probability theory and statistics, the chi-squared distribution (also chi-square or \chi^2-distribution) with k degrees of freedom is the distribution of a sum of the squares of k independent standard normal random variables. The chi-squa ...
with degrees of freedom: : s^2 \sim \frac \cdot \chi^2_, \qquad \hat\sigma^2 \sim \frac \cdot \chi^2_. The first of these expressions shows that the variance of s^2 is equal to 2\sigma^4/(n-1), which is slightly greater than the ''σσ''-element of the inverse Fisher information matrix \textstyle\mathcal^. Thus, s^2 is not an efficient estimator for \sigma^2, and moreover, since s^2 is UMVU, we can conclude that the finite-sample efficient estimator for \sigma^2 does not exist. Applying the asymptotic theory, both estimators s^2 and \textstyle\hat\sigma^2 are consistent, that is they converge in probability to \sigma^2 as the sample size n\rightarrow\infty. The two estimators are also both asymptotically normal: : \sqrt(\hat\sigma^2 - \sigma^2) \simeq \sqrt(s^2-\sigma^2) \,\xrightarrow\, \mathcal(0,2\sigma^4). In particular, both estimators are asymptotically efficient for \sigma^2.


Confidence intervals

By
Cochran's theorem In statistics, Cochran's theorem, devised by William G. Cochran, is a theorem used to justify results relating to the probability distributions of statistics that are used in the analysis of variance. Statement Let ''U''1, ..., ''U'N'' be i.i. ...
, for normal distributions the sample mean \textstyle\hat\mu and the sample variance ''s''2 are
independent Independent or Independents may refer to: Arts, entertainment, and media Artist groups * Independents (artist group), a group of modernist painters based in the New Hope, Pennsylvania, area of the United States during the early 1930s * Independ ...
, which means there can be no gain in considering their joint distribution. There is also a converse theorem: if in a sample the sample mean and sample variance are independent, then the sample must have come from the normal distribution. The independence between \textstyle\hat\mu and ''s'' can be employed to construct the so-called ''t-statistic'': : t = \frac = \frac \sim t_ This quantity ''t'' has the
Student's t-distribution In probability and statistics, Student's ''t''-distribution (or simply the ''t''-distribution) is any member of a family of continuous probability distributions that arise when estimating the mean of a normally distributed population in sit ...
with degrees of freedom, and it is an ancillary statistic (independent of the value of the parameters). Inverting the distribution of this ''t''-statistics will allow us to construct the
confidence interval In frequentist statistics, a confidence interval (CI) is a range of estimates for an unknown parameter. A confidence interval is computed at a designated ''confidence level''; the 95% confidence level is most common, but other levels, such as 9 ...
for ''μ''; similarly, inverting the ''χ''2 distribution of the statistic ''s''2 will give us the confidence interval for ''σ''2: :\mu \in \left[ \hat\mu - t_ \fracs, \hat\mu + t_ \fracs \right], :\sigma^2 \in \left[ \frac, \frac \right], where ''tk,p'' and are the ''p''th
quantile In statistics and probability, quantiles are cut points dividing the range of a probability distribution into continuous intervals with equal probabilities, or dividing the observations in a sample in the same way. There is one fewer quantile tha ...
s of the ''t''- and ''χ''2-distributions respectively. These confidence intervals are of the ''confidence level'' , meaning that the true values ''μ'' and ''σ''2 fall outside of these intervals with probability (or significance level) ''α''. In practice people usually take , resulting in the 95% confidence intervals. Approximate formulas can be derived from the asymptotic distributions of \textstyle\hat\mu and ''s''2: :\mu \in \left[ \hat\mu - , z_, \fracs, \hat\mu + , z_, \fracs \right], :\sigma^2 \in \left[ s^2 - , z_, \fracs^2, s^2 + , z_, \fracs^2 \right], The approximate formulas become valid for large values of ''n'', and are more convenient for the manual calculation since the standard normal quantiles ''z''''α''/2 do not depend on ''n''. In particular, the most popular value of , results in .


Normality tests

Normality tests assess the likelihood that the given data set comes from a normal distribution. Typically the null hypothesis ''H''0 is that the observations are distributed normally with unspecified mean ''μ'' and variance ''σ''2, versus the alternative ''Ha'' that the distribution is arbitrary. Many tests (over 40) have been devised for this problem. The more prominent of them are outlined below: Diagnostic plots are more intuitively appealing but subjective at the same time, as they rely on informal human judgement to accept or reject the null hypothesis. *
Q–Q plot In statistics, a Q–Q plot (quantile-quantile plot) is a probability plot, a List of graphical methods, graphical method for comparing two probability distributions by plotting their ''quantiles'' against each other. A point on the plot co ...
, also known as normal probability plot or rankit plot—is a plot of the sorted values from the data set against the expected values of the corresponding quantiles from the standard normal distribution. That is, it's a plot of point of the form (Φ−1(''pk''), ''x''(''k'')), where plotting points ''pk'' are equal to ''pk'' = (''k'' − ''α'')/(''n'' + 1 − 2''α'') and ''α'' is an adjustment constant, which can be anything between 0 and 1. If the null hypothesis is true, the plotted points should approximately lie on a straight line. * P–P plot – similar to the Q–Q plot, but used much less frequently. This method consists of plotting the points (Φ(''z''(''k'')), ''pk''), where \textstyle z_ = (x_-\hat\mu)/\hat\sigma. For normally distributed data this plot should lie on a 45° line between (0, 0) and (1, 1). Goodness-of-fit tests: ''Moment-based tests'': * D'Agostino's K-squared test * Jarque–Bera test * Shapiro–Wilk test: This is based on the fact that the line in the Q–Q plot has the slope of ''σ''. The test compares the least squares estimate of that slope with the value of the sample variance, and rejects the null hypothesis if these two quantities differ significantly. ''Tests based on the empirical distribution function'': * Anderson–Darling test * Lilliefors test (an adaptation of the Kolmogorov–Smirnov test)


Bayesian analysis of the normal distribution

Bayesian analysis of normally distributed data is complicated by the many different possibilities that may be considered: * Either the mean, or the variance, or neither, may be considered a fixed quantity. * When the variance is unknown, analysis may be done directly in terms of the variance, or in terms of the
precision Precision, precise or precisely may refer to: Science, and technology, and mathematics Mathematics and computing (general) * Accuracy and precision, measurement deviation from true value and its scatter * Significant figures, the number of digit ...
, the reciprocal of the variance. The reason for expressing the formulas in terms of precision is that the analysis of most cases is simplified. * Both univariate and multivariate normal distribution, multivariate cases need to be considered. * Either conjugate prior, conjugate or improper prior, improper prior distributions may be placed on the unknown variables. * An additional set of cases occurs in Bayesian linear regression, where in the basic model the data is assumed to be normally distributed, and normal priors are placed on the regression coefficients. The resulting analysis is similar to the basic cases of independent identically distributed data. The formulas for the non-linear-regression cases are summarized in the conjugate prior article.


Sum of two quadratics


= Scalar form

= The following auxiliary formula is useful for simplifying the posterior distribution, posterior update equations, which otherwise become fairly tedious. :a(x-y)^2 + b(x-z)^2 = (a + b)\left(x - \frac\right)^2 + \frac(y-z)^2 This equation rewrites the sum of two quadratics in ''x'' by expanding the squares, grouping the terms in ''x'', and completing the square. Note the following about the complex constant factors attached to some of the terms: # The factor \frac has the form of a weighted average of ''y'' and ''z''. # \frac = \frac = (a^ + b^)^. This shows that this factor can be thought of as resulting from a situation where the Multiplicative inverse, reciprocals of quantities ''a'' and ''b'' add directly, so to combine ''a'' and ''b'' themselves, it's necessary to reciprocate, add, and reciprocate the result again to get back into the original units. This is exactly the sort of operation performed by the harmonic mean, so it is not surprising that \frac is one-half the harmonic mean of ''a'' and ''b''.


= Vector form

= A similar formula can be written for the sum of two vector quadratics: If x, y, z are vectors of length ''k'', and A and B are symmetric matrix, symmetric, invertible matrices of size k\times k, then : \begin & (\mathbf-\mathbf)'\mathbf(\mathbf-\mathbf) + (\mathbf-\mathbf)' \mathbf(\mathbf-\mathbf) \\ = & (\mathbf - \mathbf)'(\mathbf+\mathbf)(\mathbf - \mathbf) + (\mathbf - \mathbf)'(\mathbf^ + \mathbf^)^(\mathbf - \mathbf) \end where :\mathbf = (\mathbf + \mathbf)^(\mathbf\mathbf + \mathbf \mathbf) Note that the form x′ A x is called a
quadratic form In mathematics, a quadratic form is a polynomial with terms all of degree two ("form" is another name for a homogeneous polynomial). For example, :4x^2 + 2xy - 3y^2 is a quadratic form in the variables and . The coefficients usually belong to a ...
and is a scalar (mathematics), scalar: :\mathbf'\mathbf\mathbf = \sum_a_ x_i x_j In other words, it sums up all possible combinations of products of pairs of elements from x, with a separate coefficient for each. In addition, since x_i x_j = x_j x_i, only the sum a_ + a_ matters for any off-diagonal elements of A, and there is no loss of generality in assuming that A is symmetric matrix, symmetric. Furthermore, if A is symmetric, then the form \mathbf'\mathbf\mathbf = \mathbf'\mathbf\mathbf.


Sum of differences from the mean

Another useful formula is as follows: \sum_^n (x_i-\mu)^2 = \sum_^n (x_i-\bar)^2 + n(\bar -\mu)^2 where \bar = \frac \sum_^n x_i.


With known variance

For a set of i.i.d. normally distributed data points X of size ''n'' where each individual point ''x'' follows x \sim \mathcal(\mu, \sigma^2) with known
variance In probability theory and statistics, variance is the expectation of the squared deviation of a random variable from its population mean or sample mean. Variance is a measure of dispersion, meaning it is a measure of how far a set of numbers ...
σ2, the conjugate prior distribution is also normally distributed. This can be shown more easily by rewriting the variance as the
precision Precision, precise or precisely may refer to: Science, and technology, and mathematics Mathematics and computing (general) * Accuracy and precision, measurement deviation from true value and its scatter * Significant figures, the number of digit ...
, i.e. using τ = 1/σ2. Then if x \sim \mathcal(\mu, 1/\tau) and \mu \sim \mathcal(\mu_0, 1/\tau_0), we proceed as follows. First, the likelihood function is (using the formula above for the sum of differences from the mean): :\begin p(\mathbf\mid\mu,\tau) &= \prod_^n \sqrt \exp\left(-\frac\tau(x_i-\mu)^2\right) \\ &= \left(\frac\right)^ \exp\left(-\frac\tau \sum_^n (x_i-\mu)^2\right) \\ &= \left(\frac\right)^ \exp\left[-\frac\tau \left(\sum_^n(x_i-\bar)^2 + n(\bar -\mu)^2\right)\right]. \end Then, we proceed as follows: :\begin p(\mu\mid\mathbf) &\propto p(\mathbf\mid\mu) p(\mu) \\ & = \left(\frac\right)^ \exp\left[-\frac\tau \left(\sum_^n(x_i-\bar)^2 + n(\bar -\mu)^2\right)\right] \sqrt \exp\left(-\frac\tau_0(\mu-\mu_0)^2\right) \\ &\propto \exp\left(-\frac\left(\tau\left(\sum_^n(x_i-\bar)^2 + n(\bar -\mu)^2\right) + \tau_0(\mu-\mu_0)^2\right)\right) \\ &\propto \exp\left(-\frac \left(n\tau(\bar-\mu)^2 + \tau_0(\mu-\mu_0)^2 \right)\right) \\ &= \exp\left(-\frac(n\tau + \tau_0)\left(\mu - \dfrac\right)^2 + \frac(\bar - \mu_0)^2\right) \\ &\propto \exp\left(-\frac(n\tau + \tau_0)\left(\mu - \dfrac\right)^2\right) \end In the above derivation, we used the formula above for the sum of two quadratics and eliminated all constant factors not involving ''μ''. The result is the kernel (statistics), kernel of a normal distribution, with mean \frac and precision n\tau + \tau_0, i.e. :p(\mu\mid\mathbf) \sim \mathcal\left(\frac, \frac\right) This can be written as a set of Bayesian update equations for the posterior parameters in terms of the prior parameters: :\begin \tau_0' &= \tau_0 + n\tau \\[5pt] \mu_0' &= \frac \\[5pt] \bar &= \frac\sum_^n x_i \end That is, to combine ''n'' data points with total precision of ''nτ'' (or equivalently, total variance of ''n''/''σ''2) and mean of values \bar, derive a new total precision simply by adding the total precision of the data to the prior total precision, and form a new mean through a ''precision-weighted average'', i.e. a weighted average of the data mean and the prior mean, each weighted by the associated total precision. This makes logical sense if the precision is thought of as indicating the certainty of the observations: In the distribution of the posterior mean, each of the input components is weighted by its certainty, and the certainty of this distribution is the sum of the individual certainties. (For the intuition of this, compare the expression "the whole is (or is not) greater than the sum of its parts". In addition, consider that the knowledge of the posterior comes from a combination of the knowledge of the prior and likelihood, so it makes sense that we are more certain of it than of either of its components.) The above formula reveals why it is more convenient to do Bayesian analysis of conjugate priors for the normal distribution in terms of the precision. The posterior precision is simply the sum of the prior and likelihood precisions, and the posterior mean is computed through a precision-weighted average, as described above. The same formulas can be written in terms of variance by reciprocating all the precisions, yielding the more ugly formulas :\begin ' &= \frac \\[5pt] \mu_0' &= \frac \\[5pt] \bar &= \frac\sum_^n x_i \end


With known mean

For a set of i.i.d. normally distributed data points X of size ''n'' where each individual point ''x'' follows x \sim \mathcal(\mu, \sigma^2) with known mean μ, the conjugate prior of the
variance In probability theory and statistics, variance is the expectation of the squared deviation of a random variable from its population mean or sample mean. Variance is a measure of dispersion, meaning it is a measure of how far a set of numbers ...
has an inverse gamma distribution or a scaled inverse chi-squared distribution. The two are equivalent 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. The prior for σ2 is as follows: :p(\sigma^2\mid\nu_0,\sigma_0^2) = \frac~\frac \propto \frac The likelihood function from above, written in terms of the variance, is: :\begin p(\mathbf\mid\mu,\sigma^2) &= \left(\frac\right)^ \exp\left[-\frac \sum_^n (x_i-\mu)^2\right] \\ &= \left(\frac\right)^ \exp\left[-\frac\right] \end where :S = \sum_^n (x_i-\mu)^2. Then: :\begin p(\sigma^2\mid\mathbf) &\propto p(\mathbf\mid\sigma^2) p(\sigma^2) \\ &= \left(\frac\right)^ \exp\left[-\frac\right] \frac~\frac \\ &\propto \left(\frac\right)^ \frac \exp\left[-\frac + \frac\right] \\ &= \frac \exp\left[-\frac\right] \end The above is also a scaled inverse chi-squared distribution where :\begin \nu_0' &= \nu_0 + n \\ \nu_0'' &= \nu_0 \sigma_0^2 + \sum_^n (x_i-\mu)^2 \end or equivalently :\begin \nu_0' &= \nu_0 + n \\ ' &= \frac \end Reparameterizing in terms of an inverse gamma distribution, the result is: :\begin \alpha' &= \alpha + \frac \\ \beta' &= \beta + \frac \end


With unknown mean and unknown variance

For a set of i.i.d. normally distributed data points X of size ''n'' where each individual point ''x'' follows x \sim \mathcal(\mu, \sigma^2) with unknown mean μ and unknown
variance In probability theory and statistics, variance is the expectation of the squared deviation of a random variable from its population mean or sample mean. Variance is a measure of dispersion, meaning it is a measure of how far a set of numbers ...
σ2, a combined (multivariate) conjugate prior is placed over the mean and variance, consisting of a normal-inverse-gamma distribution. Logically, this originates as follows: # From the analysis of the case with unknown mean but known variance, we see that the update equations involve sufficient statistics computed from the data consisting of the mean of the data points and the total variance of the data points, computed in turn from the known variance divided by the number of data points. # From the analysis of the case with unknown variance but known mean, we see that the update equations involve sufficient statistics over the data consisting of the number of data points and sum of squared deviations. # Keep in mind that the posterior update values serve as the prior distribution when further data is handled. Thus, we should logically think of our priors in terms of the sufficient statistics just described, with the same semantics kept in mind as much as possible. # To handle the case where both mean and variance are unknown, we could place independent priors over the mean and variance, with fixed estimates of the average mean, total variance, number of data points used to compute the variance prior, and sum of squared deviations. Note however that in reality, the total variance of the mean depends on the unknown variance, and the sum of squared deviations that goes into the variance prior (appears to) depend on the unknown mean. In practice, the latter dependence is relatively unimportant: Shifting the actual mean shifts the generated points by an equal amount, and on average the squared deviations will remain the same. This is not the case, however, with the total variance of the mean: As the unknown variance increases, the total variance of the mean will increase proportionately, and we would like to capture this dependence. # This suggests that we create a ''conditional prior'' of the mean on the unknown variance, with a hyperparameter specifying the mean of the pseudo-observations associated with the prior, and another parameter specifying the number of pseudo-observations. This number serves as a scaling parameter on the variance, making it possible to control the overall variance of the mean relative to the actual variance parameter. The prior for the variance also has two hyperparameters, one specifying the sum of squared deviations of the pseudo-observations associated with the prior, and another specifying once again the number of pseudo-observations. Note that each of the priors has a hyperparameter specifying the number of pseudo-observations, and in each case this controls the relative variance of that prior. These are given as two separate hyperparameters so that the variance (aka the confidence) of the two priors can be controlled separately. # This leads immediately to the normal-inverse-gamma distribution, which is the product of the two distributions just defined, with conjugate priors used (an inverse gamma distribution over the variance, and a normal distribution over the mean, ''conditional'' on the variance) and with the same four parameters just defined. The priors are normally defined as follows: :\begin p(\mu\mid\sigma^2; \mu_0, n_0) &\sim \mathcal(\mu_0,\sigma^2/n_0) \\ p(\sigma^2; \nu_0,\sigma_0^2) &\sim I\chi^2(\nu_0,\sigma_0^2) = IG(\nu_0/2, \nu_0\sigma_0^2/2) \end The update equations can be derived, and look as follows: :\begin \bar &= \frac 1 n \sum_^n x_i \\ \mu_0' &= \frac \\ n_0' &= n_0 + n \\ \nu_0' &= \nu_0 + n \\ \nu_0'' &= \nu_0 \sigma_0^2 + \sum_^n (x_i-\bar)^2 + \frac(\mu_0 - \bar)^2 \end The respective numbers of pseudo-observations add the number of actual observations to them. The new mean hyperparameter is once again a weighted average, this time weighted by the relative numbers of observations. Finally, the update for \nu_0'' is similar to the case with known mean, but in this case the sum of squared deviations is taken with respect to the observed data mean rather than the true mean, and as a result a new "interaction term" needs to be added to take care of the additional error source stemming from the deviation between prior and data mean.


Occurrence and applications

The occurrence of normal distribution in practical problems can be loosely classified into four categories: # Exactly normal distributions; # Approximately normal laws, for example when such approximation is justified by the
central limit theorem In probability theory, the central limit theorem (CLT) establishes that, in many situations, when independent random variables are summed up, their properly normalized sum tends toward a normal distribution even if the original variables themselv ...
; and # Distributions modeled as normal – the normal distribution being the distribution with Principle of maximum entropy, maximum entropy for a given mean and variance. # Regression problems – the normal distribution being found after systematic effects have been modeled sufficiently well.


Exact normality

Certain quantities in physics are distributed normally, as was first demonstrated by James Clerk Maxwell. Examples of such quantities are: * Probability density function of a ground state in a quantum harmonic oscillator. * The position of a particle that experiences diffusion. If initially the particle is located at a specific point (that is its probability distribution is the Dirac delta function), then after time ''t'' its location is described by a normal distribution with variance ''t'', which satisfies the diffusion equation \frac f(x,t) = \frac \frac f(x,t). If the initial location is given by a certain density function g(x), then the density at time ''t'' is the convolution of ''g'' and the normal PDF.


Approximate normality

''Approximately'' normal distributions occur in many situations, as explained by the
central limit theorem In probability theory, the central limit theorem (CLT) establishes that, in many situations, when independent random variables are summed up, their properly normalized sum tends toward a normal distribution even if the original variables themselv ...
. When the outcome is produced by many small effects acting ''additively and independently'', its distribution will be close to normal. The normal approximation will not be valid if the effects act multiplicatively (instead of additively), or if there is a single external influence that has a considerably larger magnitude than the rest of the effects. * In counting problems, where the central limit theorem includes a discrete-to-continuum approximation and where Infinite divisibility, infinitely divisible and Indecomposable distribution, decomposable distributions are involved, such as ** binomial distribution, Binomial random variables, associated with binary response variables; ** Poisson distribution, Poisson random variables, associated with rare events; * Thermal radiation has a Bose–Einstein statistics, Bose–Einstein distribution on very short time scales, and a normal distribution on longer timescales due to the central limit theorem.


Assumed normality

There are statistical methods to empirically test that assumption; see the above #Normality tests, Normality tests section. * In biology, the ''logarithm'' of various variables tend to have a normal distribution, that is, they tend to have a
log-normal distribution In probability theory, a log-normal (or lognormal) distribution is a continuous probability distribution of a random variable whose logarithm is normally distributed. Thus, if the random variable is log-normally distributed, then has a normal ...
(after separation on male/female subpopulations), with examples including: ** Measures of size of living tissue (length, height, skin area, weight); ** The ''length'' of ''inert'' appendages (hair, claws, nails, teeth) of biological specimens, ''in the direction of growth''; presumably the thickness of tree bark also falls under this category; ** Certain physiological measurements, such as blood pressure of adult humans. * In finance, in particular the Black–Scholes model, changes in the ''logarithm'' of exchange rates, price indices, and stock market indices are assumed normal (these variables behave like compound interest, not like simple interest, and so are multiplicative). Some mathematicians such as Benoit Mandelbrot have argued that Levy skew alpha-stable distribution, log-Levy distributions, which possesses heavy tails would be a more appropriate model, in particular for the analysis for stock market crashes. The use of the assumption of normal distribution occurring in financial models has also been criticized by Nassim Nicholas Taleb in his works. * Propagation of uncertainty, Measurement errors in physical experiments are often modeled by a normal distribution. This use of a normal distribution does not imply that one is assuming the measurement errors are normally distributed, rather using the normal distribution produces the most conservative predictions possible given only knowledge about the mean and variance of the errors. * In Standardized testing (statistics), standardized testing, results can be made to have a normal distribution by either selecting the number and difficulty of questions (as in the Intelligence quotient, IQ test) or transforming the raw test scores into "output" scores by fitting them to the normal distribution. For example, the SAT's traditional range of 200–800 is based on a normal distribution with a mean of 500 and a standard deviation of 100. * Many scores are derived from the normal distribution, including percentile ranks ("percentiles" or "quantiles"), normal curve equivalents, stanines, Standard score, z-scores, and T-scores. Additionally, some behavioral statistical procedures assume that scores are normally distributed; for example, Student's t-test, t-tests and Analysis of variance, ANOVAs. Bell curve grading assigns relative grades based on a normal distribution of scores. * In hydrology the distribution of long duration river discharge or rainfall, e.g. monthly and yearly totals, is often thought to be practically normal according to the
central limit theorem In probability theory, the central limit theorem (CLT) establishes that, in many situations, when independent random variables are summed up, their properly normalized sum tends toward a normal distribution even if the original variables themselv ...
. The blue picture, made with CumFreq, illustrates an example of fitting the normal distribution to ranked October rainfalls showing the 90% confidence belt based on the
binomial distribution In probability theory and statistics, the binomial distribution with parameters ''n'' and ''p'' is the discrete probability distribution of the number of successes in a sequence of ''n'' independent experiments, each asking a yes–no quest ...
. The rainfall data are represented by plotting positions as part of the cumulative frequency analysis.


Methodological problems and peer review

John Ioannidis argues that using normally distributed standard deviations as standards for validating research findings leave falsifiability, falsifiable predictions about phenomena that are not normally distributed untested. This includes, for example, phenomena that only appear when all necessary conditions are present and one cannot be a substitute for another in an addition-like way and phenomena that are not randomly distributed. Ioannidis argues that standard deviation-centered validation gives a false appearance of validity to hypotheses and theories where some but not all falsifiable predictions are normally distributed since the portion of falsifiable predictions that there is evidence against may and in some cases are in the non-normally distributed parts of the range of falsifiable predictions, as well as baselessly dismissing hypotheses for which none of the falsifiable predictions are normally distributed as if were they unfalsifiable when in fact they do make falsifiable predictions. It is argued by Ioannidis that many cases of mutually exclusive theories being accepted as "validated" by research journals are caused by failure of the journals to take in empirical falsifications of non-normally distributed predictions, and not because mutually exclusive theories are true, which they cannot be, although two mutually exclusive theories can both be wrong and a third one correct.


Computational methods


Generating values from normal distribution

In computer simulations, especially in applications of the Monte-Carlo method, it is often desirable to generate values that are normally distributed. The algorithms listed below all generate the standard normal deviates, since a can be generated as , where ''Z'' is standard normal. All these algorithms rely on the availability of a random number generator ''U'' capable of producing Uniform distribution (continuous), uniform random variates. * The most straightforward method is based on the probability integral transform property: if ''U'' is distributed uniformly on (0,1), then Φ−1(''U'') will have the standard normal distribution. The drawback of this method is that it relies on calculation of the
probit function In probability theory and statistics, the probit function is the quantile function associated with the standard normal distribution. It has applications in data analysis and machine learning, in particular exploratory statistical graphics and ...
Φ−1, which cannot be done analytically. Some approximate methods are described in and in the error function, erf article. Wichura gives a fast algorithm for computing this function to 16 decimal places, which is used by R programming language, R to compute random variates of the normal distribution. * Irwin–Hall distribution#Approximating a Normal distribution, An easy-to-program approximate approach that relies on the
central limit theorem In probability theory, the central limit theorem (CLT) establishes that, in many situations, when independent random variables are summed up, their properly normalized sum tends toward a normal distribution even if the original variables themselv ...
is as follows: generate 12 uniform ''U''(0,1) deviates, add them all up, and subtract 6 – the resulting random variable will have approximately standard normal distribution. In truth, the distribution will be Irwin–Hall distribution, Irwin–Hall, which is a 12-section eleventh-order polynomial approximation to the normal distribution. This random deviate will have a limited range of (−6, 6). Note that in a true normal distribution, only 0.00034% of all samples will fall outside ±6σ. * The Box–Muller transform, Box–Muller method uses two independent random numbers ''U'' and ''V'' distributed uniform distribution (continuous), uniformly on (0,1). Then the two random variables ''X'' and ''Y'' X = \sqrt \, \cos(2 \pi V) , \qquad Y = \sqrt \, \sin(2 \pi V) . will both have the standard normal distribution, and will be
independent Independent or Independents may refer to: Arts, entertainment, and media Artist groups * Independents (artist group), a group of modernist painters based in the New Hope, Pennsylvania, area of the United States during the early 1930s * Independ ...
. This formulation arises because for a bivariate normal random vector (''X'', ''Y'') the squared norm will have the
chi-squared distribution In probability theory and statistics, the chi-squared distribution (also chi-square or \chi^2-distribution) with k degrees of freedom is the distribution of a sum of the squares of k independent standard normal random variables. The chi-squa ...
with two degrees of freedom, which is an easily generated exponential distribution, exponential random variable corresponding to the quantity −2ln(''U'') in these equations; and the angle is distributed uniformly around the circle, chosen by the random variable ''V''. * The Marsaglia polar method is a modification of the Box–Muller method which does not require computation of the sine and cosine functions. In this method, ''U'' and ''V'' are drawn from the uniform (−1,1) distribution, and then is computed. If ''S'' is greater or equal to 1, then the method starts over, otherwise the two quantities X = U\sqrt, \qquad Y = V\sqrt are returned. Again, ''X'' and ''Y'' are independent, standard normal random variables. * The Ratio method is a rejection method. The algorithm proceeds as follows: ** Generate two independent uniform deviates ''U'' and ''V''; ** Compute ''X'' = (''V'' − 0.5)/''U''; ** Optional: if ''X''2 ≤ 5 − 4''e''1/4''U'' then accept ''X'' and terminate algorithm; ** Optional: if ''X''2 ≥ 4''e''−1.35/''U'' + 1.4 then reject ''X'' and start over from step 1; ** If ''X''2 ≤ −4 ln''U'' then accept ''X'', otherwise start over the algorithm. *:The two optional steps allow the evaluation of the logarithm in the last step to be avoided in most cases. These steps can be greatly improved so that the logarithm is rarely evaluated. * The ziggurat algorithm is faster than the Box–Muller transform and still exact. In about 97% of all cases it uses only two random numbers, one random integer and one random uniform, one multiplication and an if-test. Only in 3% of the cases, where the combination of those two falls outside the "core of the ziggurat" (a kind of rejection sampling using logarithms), do exponentials and more uniform random numbers have to be employed. * Integer arithmetic can be used to sample from the standard normal distribution. This method is exact in the sense that it satisfies the conditions of ''ideal approximation''; i.e., it is equivalent to sampling a real number from the standard normal distribution and rounding this to the nearest representable floating point number. * There is also some investigation into the connection between the fast Hadamard transform and the normal distribution, since the transform employs just addition and subtraction and by the central limit theorem random numbers from almost any distribution will be transformed into the normal distribution. In this regard a series of Hadamard transforms can be combined with random permutations to turn arbitrary data sets into a normally distributed data.


Numerical approximations for the normal CDF and normal quantile function

The standard normal cumulative distribution function, CDF is widely used in scientific and statistical computing. The values Φ(''x'') may be approximated very accurately by a variety of methods, such as numerical integration, Taylor series, asymptotic series and Gauss's continued fraction#Of Kummer's confluent hypergeometric function, continued fractions. Different approximations are used depending on the desired level of accuracy. * give the approximation for Φ(''x'') for ''x > 0'' with the absolute error (algorith
26.2.17
: \Phi(x) = 1 - \varphi(x)\left(b_1 t + b_2 t^2 + b_3t^3 + b_4 t^4 + b_5 t^5\right) + \varepsilon(x), \qquad t = \frac, where ''ϕ''(''x'') is the standard normal PDF, and ''b''0 = 0.2316419, ''b''1 = 0.319381530, ''b''2 = −0.356563782, ''b''3 = 1.781477937, ''b''4 = −1.821255978, ''b''5 = 1.330274429. * lists some dozens of approximations – by means of rational functions, with or without exponentials – for the function. His algorithms vary in the degree of complexity and the resulting precision, with maximum absolute precision of 24 digits. An algorithm by combines Hart's algorithm 5666 with a continued fraction approximation in the tail to provide a fast computation algorithm with a 16-digit precision. * after recalling Hart68 solution is not suited for erf, gives a solution for both erf and erfc, with maximal relative error bound, via rational function, Rational Chebyshev Approximation. * suggested a simple algorithm based on the Taylor series expansion \Phi(x) = \frac12 + \varphi(x)\left( x + \frac 3 + \frac + \frac + \frac + \cdots \right) for calculating with arbitrary precision. The drawback of this algorithm is comparatively slow calculation time (for example it takes over 300 iterations to calculate the function with 16 digits of precision when ). * The GNU Scientific Library calculates values of the standard normal CDF using Hart's algorithms and approximations with Chebyshev polynomials. Shore (1982) introduced simple approximations that may be incorporated in stochastic optimization models of engineering and operations research, like reliability engineering and inventory analysis. Denoting , the simplest approximation for the quantile function is: z = \Phi^(p)=5.5556\left[1- \left( \frac p \right)^\right],\qquad p\ge 1/2 This approximation delivers for ''z'' a maximum absolute error of 0.026 (for , corresponding to ). For replace ''p'' by and change sign. Another approximation, somewhat less accurate, is the single-parameter approximation: z=-0.4115\left\, \qquad p\ge 1/2 The latter had served to derive a simple approximation for the loss integral of the normal distribution, defined by \begin L(z) & =\int_z^\infty (u-z)\varphi(u) \, du=\int_z^\infty [1-\Phi (u)] \, du \\[5pt] L(z) & \approx \begin 0.4115\left(\dfrac p \right) - z, & p<1/2, \\ \\ 0.4115\left( \dfrac p \right), & p\ge 1/2. \end \\[5pt] \text \\ L(z) & \approx \begin 0.4115\left\, & p < 1/2, \\ \\ 0.4115 \dfrac p, & p\ge 1/2. \end \end This approximation is particularly accurate for the right far-tail (maximum error of 10−3 for z≥1.4). Highly accurate approximations for the CDF, based on Response modeling methodology, Response Modeling Methodology (RMM, Shore, 2011, 2012), are shown in Shore (2005). Some more approximations can be found at: Error function#Approximation with elementary functions. In particular, small ''relative'' error on the whole domain for the CDF \Phi and the quantile function \Phi^ as well, is achieved via an explicitly invertible formula by Sergei Winitzki in 2008.


History


Development

Some authors attribute the credit for the discovery of the normal distribution to Abraham de Moivre, de Moivre, who in 1738 published in the second edition of his "''The Doctrine of Chances''" the study of the coefficients in the binomial expansion of . De Moivre proved that the middle term in this expansion has the approximate magnitude of 2^n/\sqrt, and that "If ''m'' or ''n'' be a Quantity infinitely great, then the Logarithm of the Ratio, which a Term distant from the middle by the Interval ''ℓ'', has to the middle Term, is -\frac." Although this theorem can be interpreted as the first obscure expression for the normal probability law, Stephen Stigler, Stigler points out that de Moivre himself did not interpret his results as anything more than the approximate rule for the binomial coefficients, and in particular de Moivre lacked the concept of the probability density function. In 1823 Carl Friedrich Gauss, Gauss published his monograph "''Theoria combinationis observationum erroribus minimis obnoxiae''" where among other things he introduces several important statistical concepts, such as the method of least squares, the method of maximum likelihood, and the ''normal distribution''. Gauss used ''M'', , to denote the measurements of some unknown quantity ''V'', and sought the "most probable" estimator of that quantity: the one that maximizes the probability of obtaining the observed experimental results. In his notation φΔ is the probability density function of the measurement errors of magnitude Δ. Not knowing what the function ''φ'' is, Gauss requires that his method should reduce to the well-known answer: the arithmetic mean of the measured values. Starting from these principles, Gauss demonstrates that the only law that rationalizes the choice of arithmetic mean as an estimator of the location parameter, is the normal law of errors: \varphi\mathit = \frac h \, e^, where ''h'' is "the measure of the precision of the observations". Using this normal law as a generic model for errors in the experiments, Gauss formulates what is now known as the non-linear least squares, non-linear weighted least squares method. Although Gauss was the first to suggest the normal distribution law, Pierre Simon de Laplace, Laplace made significant contributions. It was Laplace who first posed the problem of aggregating several observations in 1774, although his own solution led to the Laplacian distribution. It was Laplace who first calculated the value of the Gaussian integral, integral in 1782, providing the normalization constant for the normal distribution. Finally, it was Laplace who in 1810 proved and presented to the Academy the fundamental
central limit theorem In probability theory, the central limit theorem (CLT) establishes that, in many situations, when independent random variables are summed up, their properly normalized sum tends toward a normal distribution even if the original variables themselv ...
, which emphasized the theoretical importance of the normal distribution. It is of interest to note that in 1809 an Irish-American mathematician Robert Adrain published two insightful but flawed derivations of the normal probability law, simultaneously and independently from Gauss. His works remained largely unnoticed by the scientific community, until in 1871 they were exhumed by Cleveland Abbe, Abbe. In the middle of the 19th century James Clerk Maxwell, Maxwell demonstrated that the normal distribution is not just a convenient mathematical tool, but may also occur in natural phenomena: "The number of particles whose velocity, resolved in a certain direction, lies between ''x'' and ''x'' + ''dx'' is \operatorname \frac\; e^ \, dx


Naming

Today, the concept is usually known in English as the normal distribution or Gaussian distribution. Other less common names include Gauss distribution, Laplace-Gauss distribution, the law of error, the law of facility of errors, Laplace's second law, Gaussian law. Gauss himself apparently coined the term with reference to the "normal equations" involved in its applications, with normal having its technical meaning of orthogonal rather than "usual". However, by the end of the 19th century some authors had started using the name ''normal distribution'', where the word "normal" was used as an adjective – the term now being seen as a reflection of the fact that this distribution was seen as typical, common – and thus "normal". Charles Sanders Peirce, Peirce (one of those authors) once defined "normal" thus: "...the 'normal' is not the average (or any other kind of mean) of what actually occurs, but of what ''would'', in the long run, occur under certain circumstances." Around the turn of the 20th century Karl Pearson, Pearson popularized the term ''normal'' as a designation for this distribution. Also, it was Pearson who first wrote the distribution in terms of the standard deviation ''σ'' as in modern notation. Soon after this, in year 1915, Ronald Fisher, Fisher added the location parameter to the formula for normal distribution, expressing it in the way it is written nowadays: df = \frac e^ \, dx. The term "standard normal", which denotes the normal distribution with zero mean and unit variance came into general use around the 1950s, appearing in the popular textbooks by P. G. Hoel (1947) "''Introduction to mathematical statistics''" and A. M. Mood (1950) "''Introduction to the theory of statistics''".


See also

* Bates distribution – similar to the Irwin–Hall distribution, but rescaled back into the 0 to 1 range * Behrens–Fisher problem – the long-standing problem of testing whether two normal samples with different variances have same means; * Bhattacharyya distance – method used to separate mixtures of normal distributions * Erdős–Kac theorem – on the occurrence of the normal distribution in number theory * Full width at half maximum * Gaussian blur – convolution, which uses the normal distribution as a kernel * Modified half-normal distribution with the pdf on (0, \infty) is given as f(x)= \frac, where \Psi(\alpha,z)=_1\Psi_1\left(\begin\left(\alpha,\frac\right)\\(1,0)\end;z \right) denotes the Fox-Wright Psi function. * Normally distributed and uncorrelated does not imply independent * Ratio normal distribution * Reciprocal normal distribution * Standard normal table * Stein's lemma * Sub-Gaussian distribution * Sum of normally distributed random variables * Tweedie distribution – The normal distribution is a member of the family of Tweedie exponential dispersion models. * Wrapped normal distribution – the Normal distribution applied to a circular domain * Z-test – using the normal distribution


Notes


References


Citations


Sources

* * In particular, the entries fo
"bell-shaped and bell curve"
an

* * * * * * * * * * * * * * * * * * * * * * * * Translated by Stephen M. Stigler in ''Statistical Science'' 1 (3), 1986: . * * * * * * * * * * * * * * * * * * * * * * * * * * * *


External links

*
Normal distribution calculator
{{Authority control Normal distribution, Continuous distributions Conjugate prior distributions Exponential family distributions Stable distributions Location-scale family probability distributions]">X, ^p \right&= \sigma^p \cdot 2^ \frac _1F_1\left( -\frac, \frac, -\frac \left( \frac \mu \sigma \right)^2 \right). \end These expressions remain valid even if p is not an integer. See also Hermite polynomials#"Negative variance", generalized Hermite polynomials. The expectation of X conditioned on the event that X lies in an interval ,b/math> is given by :\operatorname\left \mid a= \mu - \sigma^2\frac where f and F respectively are the density and the cumulative distribution function of X. For b=\infty this is known as the
inverse Mills ratio In probability theory, the Mills ratio (or Mills's ratio) of a continuous random variable X is the function : m(x) := \frac , where f(x) is the probability density function, and :\bar(x) := \Pr x.html" ;"title=">x">>x= \int_x^ f(u)\, du is the ...
. Note that above, density f of X is used instead of standard normal density as in inverse Mills ratio, so here we have \sigma^2 instead of \sigma.


Fourier transform and characteristic function

The
Fourier transform A Fourier transform (FT) is a mathematical transform that decomposes functions into frequency components, which are represented by the output of the transform as a function of frequency. Most commonly functions of time or space are transformed, ...
of a normal density f with mean \mu and standard deviation \sigma is : \hat f(t) = \int_^\infty f(x)e^ \, dx = e^ e^ where i is the
imaginary unit The imaginary unit or unit imaginary number () is a solution to the quadratic equation x^2+1=0. Although there is no real number with this property, can be used to extend the real numbers to what are called complex numbers, using addition an ...
. If the mean \mu=0, the first factor is 1, and the Fourier transform is, apart from a constant factor, a normal density on the
frequency domain In physics, electronics, control systems engineering, and statistics, the frequency domain refers to the analysis of mathematical functions or signals with respect to frequency, rather than time. Put simply, a time-domain graph shows how a signa ...
, with mean 0 and standard deviation 1/\sigma. In particular, the standard normal distribution \varphi is an
eigenfunction In mathematics, an eigenfunction of a linear operator ''D'' defined on some function space is any non-zero function f in that space that, when acted upon by ''D'', is only multiplied by some scaling factor called an eigenvalue. As an equation, th ...
of the Fourier transform. In probability theory, the Fourier transform of the probability distribution of a real-valued random variable X is closely connected to the
characteristic function In mathematics, the term "characteristic function" can refer to any of several distinct concepts: * The indicator function of a subset, that is the function ::\mathbf_A\colon X \to \, :which for a given subset ''A'' of ''X'', has value 1 at points ...
\varphi_X(t) of that variable, which is defined as the
expected value In probability theory, the expected value (also called expectation, expectancy, mathematical expectation, mean, average, or first moment) is a generalization of the weighted average. Informally, the expected value is the arithmetic mean of a l ...
of e^, as a function of the real variable t (the
frequency Frequency is the number of occurrences of a repeating event per unit of time. It is also occasionally referred to as ''temporal frequency'' for clarity, and is distinct from ''angular frequency''. Frequency is measured in hertz (Hz) which is eq ...
parameter of the Fourier transform). This definition can be analytically extended to a complex-value variable t. The relation between both is: :\varphi_X(t) = \hat f(-t)


Moment and cumulant generating functions

The
moment generating function In probability theory and statistics, the moment-generating function of a real-valued random variable is an alternative specification of its probability distribution. Thus, it provides the basis of an alternative route to analytical results compare ...
of a real random variable X is the expected value of e^, as a function of the real parameter t. For a normal distribution with density f, mean \mu and deviation \sigma, the moment generating function exists and is equal to :M(t) = \operatorname ^= \hat f(it) = e^ e^ The
cumulant generating function In probability theory and statistics, the cumulants of a probability distribution are a set of quantities that provide an alternative to the '' moments'' of the distribution. Any two probability distributions whose moments are identical will have ...
is the logarithm of the moment generating function, namely :g(t) = \ln M(t) = \mu t + \tfrac 12 \sigma^2 t^2 Since this is a quadratic polynomial in t, only the first two
cumulant In probability theory and statistics, the cumulants of a probability distribution are a set of quantities that provide an alternative to the '' moments'' of the distribution. Any two probability distributions whose moments are identical will ha ...
s are nonzero, namely the mean \mu and the variance \sigma^2.


Stein operator and class

Within
Stein's method Stein's method is a general method in probability theory to obtain bounds on the distance between two probability distributions with respect to a probability metric. It was introduced by Charles Stein, who first published it in 1972, to obtain ...
the Stein operator and class of a random variable X \sim \mathcal(\mu, \sigma^2) are \mathcalf(x) = \sigma^2 f'(x) - (x-\mu)f(x) and \mathcal the class of all absolutely continuous functions f : \R \to \R \mbox\mathbb limit (mathematics), limit when \sigma tends to zero, the probability density f(x) eventually tends to zero at any x\ne \mu, but grows without limit if x = \mu, while its integral remains equal to 1. Therefore, the normal distribution cannot be defined as an ordinary
function Function or functionality may refer to: Computing * Function key, a type of key on computer keyboards * Function model, a structured representation of processes in a system * Function object or functor or functionoid, a concept of object-oriente ...
when \sigma = 0. However, one can define the normal distribution with zero variance as a
generalized function In mathematics, generalized functions are objects extending the notion of functions. There is more than one recognized theory, for example the theory of distributions. Generalized functions are especially useful in making discontinuous functions ...
; specifically, as Dirac's "delta function" \delta translated by the mean \mu, that is f(x)=\delta(x-\mu). Its CDF is then the
Heaviside step function The Heaviside step function, or the unit step function, usually denoted by or (but sometimes , or ), is a step function, named after Oliver Heaviside (1850–1925), the value of which is zero for negative arguments and one for positive argume ...
translated by the mean \mu, namely :F(x) = \begin 0 & \textx < \mu \\ 1 & \textx \geq \mu \end


Maximum entropy

Of all probability distributions over the reals with a specified mean \mu and variance \sigma^2, the normal distribution N(\mu,\sigma^2) is the one with maximum entropy. If X is a
continuous random variable In probability theory and statistics, a probability distribution is the mathematical function that gives the probabilities of occurrence of different possible outcomes for an experiment. It is a mathematical description of a random phenomenon i ...
with
probability density In probability theory, a probability density function (PDF), or density of a continuous random variable, is a function whose value at any given sample (or point) in the sample space (the set of possible values taken by the random variable) can ...
f(x), then the entropy of X is defined as : H(X) = - \int_^\infty f(x)\log f(x)\, dx where f(x)\log f(x) is understood to be zero whenever f(x)=0. This functional can be maximized, subject to the constraints that the distribution is properly normalized and has a specified variance, by using
variational calculus The calculus of variations (or Variational Calculus) is a field of mathematical analysis that uses variations, which are small changes in functions and functionals, to find maxima and minima of functionals: mappings from a set of functions t ...
. A function with two
Lagrange multipliers In mathematical optimization, the method of Lagrange multipliers is a strategy for finding the local maxima and minima of a function subject to equality constraints (i.e., subject to the condition that one or more equations have to be satisfied ex ...
is defined: : L=\int_^\infty f(x)\ln(f(x))\,dx-\lambda_0\left(1-\int_^\infty f(x)\,dx\right)-\lambda\left(\sigma^2-\int_^\infty f(x)(x-\mu)^2\,dx\right) where f(x) is, for now, regarded as some density function with mean \mu and standard deviation \sigma. At maximum entropy, a small variation \delta f(x) about f(x) will produce a variation \delta L about L which is equal to 0: : 0=\delta L=\int_^\infty \delta f(x)\left (\ln(f(x))+1+\lambda_0+\lambda(x-\mu)^2\right )\,dx Since this must hold for any small \delta f(x), the term in brackets must be zero, and solving for f(x) yields: :f(x)=e^ Using the constraint equations to solve for \lambda_0 and \lambda yields the density of the normal distribution: : f(x, \mu, \sigma)=\frace^ The entropy of a normal distribution is equal to : H(X)=\tfrac(1+\log(2\sigma^2\pi))


Other properties


Related distributions


Central limit theorem

The central limit theorem states that under certain (fairly common) conditions, the sum of many random variables will have an approximately normal distribution. More specifically, where X_1,\ldots ,X_n are
independent and identically distributed In probability theory and statistics, a collection of random variables is independent and identically distributed if each random variable has the same probability distribution as the others and all are mutually independent. This property is usua ...
random variables with the same arbitrary distribution, zero mean, and variance \sigma^2 and Z is their mean scaled by \sqrt : Z = \sqrt\left(\frac\sum_^n X_i\right) Then, as n increases, the probability distribution of Z will tend to the normal distribution with zero mean and variance \sigma^2. The theorem can be extended to variables (X_i) that are not independent and/or not identically distributed if certain constraints are placed on the degree of dependence and the moments of the distributions. Many
test statistic A test statistic is a statistic (a quantity derived from the sample) used in statistical hypothesis testing.Berger, R. L.; Casella, G. (2001). ''Statistical Inference'', Duxbury Press, Second Edition (p.374) A hypothesis test is typically specif ...
s, scores, and
estimator In statistics, an estimator is a rule for calculating an estimate of a given quantity based on observed data: thus the rule (the estimator), the quantity of interest (the estimand) and its result (the estimate) are distinguished. For example, the ...
s encountered in practice contain sums of certain random variables in 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 distributions. The central limit theorem also implies that certain distributions can be approximated by the normal distribution, for example: * The
binomial distribution In probability theory and statistics, the binomial distribution with parameters ''n'' and ''p'' is the discrete probability distribution of the number of successes in a sequence of ''n'' independent experiments, each asking a yes–no quest ...
B(n,p) is approximately normal with mean np and variance np(1-p) for large n and for p not too close to 0 or 1. * The
Poisson distribution In probability theory and statistics, the Poisson distribution is a discrete probability distribution that expresses the probability of a given number of events occurring in a fixed interval of time or space if these events occur with a known co ...
with parameter \lambda is approximately normal with mean \lambda and variance \lambda, for large values of \lambda. * The
chi-squared distribution In probability theory and statistics, the chi-squared distribution (also chi-square or \chi^2-distribution) with k degrees of freedom is the distribution of a sum of the squares of k independent standard normal random variables. The chi-squa ...
\chi^2(k) is approximately normal with mean k and variance 2k, for large k. * The
Student's t-distribution In probability and statistics, Student's ''t''-distribution (or simply the ''t''-distribution) is any member of a family of continuous probability distributions that arise when estimating the mean of a normally distributed population in sit ...
t(\nu) is approximately normal with mean 0 and variance 1 when \nu is large. Whether these approximations are sufficiently accurate depends on the purpose for which they are needed, and the rate of convergence to the normal distribution. It is typically the case that such approximations are less accurate in the tails of the distribution. A general upper bound for the approximation error in the central limit theorem is given by the
Berry–Esseen theorem In probability theory, the central limit theorem states that, under certain circumstances, the probability distribution of the scaled mean of a random sample converges to a normal distribution as the sample size increases to infinity. Under strong ...
, improvements of the approximation are given by the
Edgeworth expansion The Gram–Charlier A series (named in honor of Jørgen Pedersen Gram and Carl Charlier), and the Edgeworth series (named in honor of Francis Ysidro Edgeworth) are series that approximate a probability distribution in terms of its cumulants. The se ...
s. This theorem can also be used to justify modeling the sum of many uniform noise sources as
Gaussian noise Gaussian noise, named after Carl Friedrich Gauss, is a term from signal processing theory denoting a kind of signal noise that has a probability density function (pdf) equal to that of the normal distribution (which is also known as the Gaussia ...
. See
AWGN Additive white Gaussian noise (AWGN) is a basic noise model used in information theory to mimic the effect of many random processes that occur in nature. The modifiers denote specific characteristics: * ''Additive'' because it is added to any nois ...
.


Operations and functions of normal variables

The
probability density In probability theory, a probability density function (PDF), or density of a continuous random variable, is a function whose value at any given sample (or point) in the sample space (the set of possible values taken by the random variable) can ...
,
cumulative distribution In statistics, the frequency (or absolute frequency) of an event i is the number n_i of times the observation has occurred/recorded in an experiment or study. These frequencies are often depicted graphically or in tabular form. Types The cumul ...
, and inverse cumulative distribution of any function of one or more independent or correlated normal variables can be computed with the numerical method of ray-tracing
Matlab code
. In the following sections we look at some special cases.


Operations on a single normal variable

If X is distributed normally with mean \mu and variance \sigma^2, then * aX+b, for any real numbers a and b, is also normally distributed, with mean a\mu+b and standard deviation , a, \sigma. That is, the family of normal distributions is closed under linear transformations. * The exponential of X is distributed log-normally: . * The absolute value of X has
folded normal distribution The folded normal distribution is a probability distribution related to the normal distribution. Given a normally distributed random variable ''X'' with mean ''μ'' and variance ''σ''2, the random variable ''Y'' = , ''X'', has a folded normal d ...
: . If \mu = 0 this is known as the
half-normal distribution In probability theory and statistics, the half-normal distribution is a special case of the folded normal distribution. Let X follow an ordinary normal distribution, N(0,\sigma^2). Then, Y=, X, follows a half-normal distribution. Thus, the hal ...
. * The absolute value of normalized residuals, , ''X'' − ''μ'', /''σ'', has
chi distribution In probability theory and statistics, the chi distribution is a continuous probability distribution. It is the distribution of the positive square root of the sum of squares of a set of independent random variables each following a standard norm ...
with one degree of freedom: , X - \mu, / \sigma \sim \chi_1. * The square of ''X''/''σ'' has the
noncentral chi-squared distribution In probability theory and statistics, the noncentral chi-squared distribution (or noncentral chi-square distribution, noncentral \chi^2 distribution) is a noncentral generalization of the chi-squared distribution. It often arises in the power a ...
with one degree of freedom: X^2 / \sigma^2 \sim \chi_1^2(\mu^2 / \sigma^2). If \mu = 0, the distribution is called simply chi-squared. * The log likelihood of a normal variable x is simply the log of its
probability density function In probability theory, a probability density function (PDF), or density of a continuous random variable, is a function whose value at any given sample (or point) in the sample space (the set of possible values taken by the random variable) can ...
: \ln p(x)= -\frac \left(\frac \right)^2 -\ln \left(\sigma \sqrt \right) = -\frac z^2 -\ln \left(\sigma \sqrt \right). Since this is a scaled and shifted square of a standard normal variable, it is distributed as a scaled and shifted chi-squared variable. * The distribution of the variable ''X'' restricted to an interval 'a'', ''b''is called the
truncated normal distribution In probability and statistics, the truncated normal distribution is the probability distribution derived from that of a normally distributed random variable by bounding the random variable from either below or above (or both). The truncated no ...
. * (''X'' − ''μ'')−2 has a
Lévy distribution In probability theory and statistics, the Lévy distribution, named after Paul Lévy, is a continuous probability distribution for a non-negative random variable. In spectroscopy, this distribution, with frequency as the dependent variable, is kn ...
with location 0 and scale ''σ''−2.


= Operations on two independent normal variables

= * If X_1 and X_2 are two
independent Independent or Independents may refer to: Arts, entertainment, and media Artist groups * Independents (artist group), a group of modernist painters based in the New Hope, Pennsylvania, area of the United States during the early 1930s * Independ ...
normal random variables, with means \mu_1, \mu_2 and standard deviations \sigma_1, \sigma_2, then their sum X_1 + X_2 will also be normally distributed, roof/sup> with mean \mu_1 + \mu_2 and variance \sigma_1^2 + \sigma_2^2. * In particular, if X and Y are independent normal deviates with zero mean and variance \sigma^2, then X + Y and X - Y are also independent and normally distributed, with zero mean and variance 2\sigma^2. This is a special case of the
polarization identity In linear algebra, a branch of mathematics, the polarization identity is any one of a family of formulas that express the inner product of two vectors in terms of the norm of a normed vector space. If a norm arises from an inner product then t ...
. * If X_1, X_2 are two independent normal deviates with mean \mu and deviation \sigma, and a, b are arbitrary real numbers, then the variable X_3 = \frac + \mu is also normally distributed with mean \mu and deviation \sigma. It follows that the normal distribution is
stable A stable is a building in which livestock, especially horses, are kept. It most commonly means a building that is divided into separate stalls for individual animals and livestock. There are many different types of stables in use today; the ...
(with exponent \alpha=2).


= Operations on two independent standard normal variables

= If X_1 and X_2 are two independent standard normal random variables with mean 0 and variance 1, then * Their sum and difference is distributed normally with mean zero and variance two: X_1 \pm X_2 \sim N(0, 2). * Their product Z = X_1 X_2 follows the
product distribution A product distribution is a probability distribution constructed as the distribution of the product of random variables having two other known distributions. Given two statistically independent random variables ''X'' and ''Y'', the distribution of ...
with density function f_Z(z) = \pi^ K_0(, z, ) where K_0 is the
modified Bessel function of the second kind Bessel functions, first defined by the mathematician Daniel Bernoulli and then generalized by Friedrich Bessel, are canonical solutions of Bessel's differential equation x^2 \frac + x \frac + \left(x^2 - \alpha^2 \right)y = 0 for an arbitrary ...
. This distribution is symmetric around zero, unbounded at z = 0, and has the
characteristic function In mathematics, the term "characteristic function" can refer to any of several distinct concepts: * The indicator function of a subset, that is the function ::\mathbf_A\colon X \to \, :which for a given subset ''A'' of ''X'', has value 1 at points ...
\phi_Z(t) = (1 + t^2)^. * Their ratio follows the standard
Cauchy distribution The Cauchy distribution, named after Augustin Cauchy, is a continuous probability distribution. It is also known, especially among physicists, as the Lorentz distribution (after Hendrik Lorentz), Cauchy–Lorentz distribution, Lorentz(ian) fun ...
: X_1/ X_2 \sim \operatorname(0, 1). * Their Euclidean norm \sqrt has the
Rayleigh distribution In probability theory and statistics, the Rayleigh distribution is a continuous probability distribution for nonnegative-valued random variables. Up to rescaling, it coincides with the chi distribution with two degrees of freedom. The distribut ...
.


Operations on multiple independent normal variables

* Any linear combination of independent normal deviates is a normal deviate. * If X_1, X_2, \ldots, X_n are independent standard normal random variables, then the sum of their squares has the
chi-squared distribution In probability theory and statistics, the chi-squared distribution (also chi-square or \chi^2-distribution) with k degrees of freedom is the distribution of a sum of the squares of k independent standard normal random variables. The chi-squa ...
with n degrees of freedom X_1^2 + \cdots + X_n^2 \sim \chi_n^2. * If X_1, X_2, \ldots, X_n are independent normally distributed random variables with means \mu and variances \sigma^2, then their
sample mean The sample mean (or "empirical mean") and the sample covariance are statistics computed from a Sample (statistics), sample of data on one or more random variables. The sample mean is the average value (or mean, mean value) of a sample (statistic ...
is independent from the sample
standard deviation In statistics, the standard deviation is a measure of the amount of variation or dispersion of a set of values. A low standard deviation indicates that the values tend to be close to the mean (also called the expected value) of the set, while ...
, which can be demonstrated using Basu's theorem or
Cochran's theorem In statistics, Cochran's theorem, devised by William G. Cochran, is a theorem used to justify results relating to the probability distributions of statistics that are used in the analysis of variance. Statement Let ''U''1, ..., ''U'N'' be i.i. ...
. The ratio of these two quantities will have the
Student's t-distribution In probability and statistics, Student's ''t''-distribution (or simply the ''t''-distribution) is any member of a family of continuous probability distributions that arise when estimating the mean of a normally distributed population in sit ...
with n-1 degrees of freedom: t = \frac = \frac \sim t_. * If X_1, X_2, \ldots, X_n, Y_1, Y_2, \ldots, Y_m are independent standard normal random variables, then the ratio of their normalized sums of squares will have the with degrees of freedom: F = \frac \sim F_.


Operations on multiple correlated normal variables

* A
quadratic form In mathematics, a quadratic form is a polynomial with terms all of degree two ("form" is another name for a homogeneous polynomial). For example, :4x^2 + 2xy - 3y^2 is a quadratic form in the variables and . The coefficients usually belong to a ...
of a normal vector, i.e. a quadratic function q = \sum x_i^2 + \sum x_j + c of multiple independent or correlated normal variables, is a generalized chi-square variable.


Operations on the density function

The split normal distribution is most directly defined in terms of joining scaled sections of the density functions of different normal distributions and rescaling the density to integrate to one. The
truncated normal distribution In probability and statistics, the truncated normal distribution is the probability distribution derived from that of a normally distributed random variable by bounding the random variable from either below or above (or both). The truncated no ...
results from rescaling a section of a single density function.


Infinite divisibility and Cramér's theorem

For any positive integer \text, any normal distribution with mean \mu and variance \sigma^2 is the distribution of the sum of \text independent normal deviates, each with mean \frac and variance \frac. This property is called
infinite divisibility Infinite divisibility arises in different ways in philosophy, physics, economics, order theory (a branch of mathematics), and probability theory (also a branch of mathematics). One may speak of infinite divisibility, or the lack thereof, of matter ...
. Conversely, if X_1 and X_2 are independent random variables and their sum X_1+X_2 has a normal distribution, then both X_1 and X_2 must be normal deviates. This result is known as Cramér's decomposition theorem, and is equivalent to saying that the convolution of two distributions is normal if and only if both are normal. Cramér's theorem implies that a linear combination of independent non-Gaussian variables will never have an exactly normal distribution, although it may approach it arbitrarily closely.


Bernstein's theorem

Bernstein's theorem states that if X and Y are independent and X + Y and X - Y are also independent, then both ''X'' and ''Y'' must necessarily have normal distributions. More generally, if X_1, \ldots, X_n are independent random variables, then two distinct linear combinations \sum and \sumwill be independent if and only if all X_k are normal and \sum, where \sigma_k^2 denotes the variance of X_k.


Extensions

The notion of normal distribution, being one of the most important distributions in probability theory, has been extended far beyond the standard framework of the univariate (that is one-dimensional) case (Case 1). All these extensions are also called ''normal'' or ''Gaussian'' laws, so a certain ambiguity in names exists. * The
multivariate normal distribution In probability theory and statistics, the multivariate normal distribution, multivariate Gaussian distribution, or joint normal distribution is a generalization of the one-dimensional (univariate) normal distribution to higher dimensions. One d ...
describes the Gaussian law in the ''k''-dimensional Euclidean space. A vector is multivariate-normally distributed if any linear combination of its components has a (univariate) normal distribution. The variance of ''X'' is a ''k×k'' symmetric positive-definite matrix ''V''. The multivariate normal distribution is a special case of the
elliptical distribution In probability and statistics, an elliptical distribution is any member of a broad family of probability distributions that generalize the multivariate normal distribution. Intuitively, in the simplified two and three dimensional case, the joint di ...
s. As such, its iso-density loci in the ''k'' = 2 case are ellipses and in the case of arbitrary ''k'' are ellipsoids. * Rectified Gaussian distribution a rectified version of normal distribution with all the negative elements reset to 0 * Complex normal distribution deals with the complex normal vectors. A complex vector is said to be normal if both its real and imaginary components jointly possess a 2''k''-dimensional multivariate normal distribution. The variance-covariance structure of ''X'' is described by two matrices: the ''variance'' matrix Γ, and the ''relation'' matrix ''C''. * Matrix normal distribution describes the case of normally distributed matrices. * Gaussian processes are the normally distributed stochastic processes. These can be viewed as elements of some infinite-dimensional Hilbert space ''H'', and thus are the analogues of multivariate normal vectors for the case . A random element is said to be normal if for any constant the scalar product has a (univariate) normal distribution. The variance structure of such Gaussian random element can be described in terms of the linear ''covariance ''. Several Gaussian processes became popular enough to have their own names: ** Wiener process, Brownian motion, ** Brownian bridge, ** Ornstein–Uhlenbeck process. * Gaussian q-distribution is an abstract mathematical construction that represents a "q-analogue" of the normal distribution. * the q-Gaussian is an analogue of the Gaussian distribution, in the sense that it maximises the Tsallis entropy, and is one type of Tsallis distribution. Note that this distribution is different from the Gaussian q-distribution above. * The Kaniadakis Gaussian distribution, Kaniadakis ''κ''-Gaussian distribution is a generalization of the Gaussian distribution which arises from the Kaniadakis statistics, being one of the Kaniadakis distribution, Kaniadakis distributions. A random variable ''X'' has a two-piece normal distribution if it has a distribution : f_X( x ) = N( \mu, \sigma_1^2 ) \text x \le \mu : f_X( x ) = N( \mu, \sigma_2^2 ) \text x \ge \mu where ''μ'' is the mean and ''σ''1 and ''σ''2 are the standard deviations of the distribution to the left and right of the mean respectively. The mean, variance and third central moment of this distribution have been determined : \operatorname( X ) = \mu + \sqrt ( \sigma_2 - \sigma_1 ) : \operatorname( X ) = \left( 1 - \frac 2 \pi\right)( \sigma_2 - \sigma_1 )^2 + \sigma_1 \sigma_2 : \operatorname( X ) = \sqrt( \sigma_2 - \sigma_1 ) \left[ \left( \frac 4 \pi - 1 \right) ( \sigma_2 - \sigma_1)^2 + \sigma_1 \sigma_2 \right] where E(''X''), V(''X'') and T(''X'') are the mean, variance, and third central moment respectively. One of the main practical uses of the Gaussian law is to model the empirical distributions of many different random variables encountered in practice. In such case a possible extension would be a richer family of distributions, having more than two parameters and therefore being able to fit the empirical distribution more accurately. The examples of such extensions are: * Pearson distribution — a four-parameter family of probability distributions that extend the normal law to include different skewness and kurtosis values. * The generalized normal distribution, also known as the exponential power distribution, allows for distribution tails with thicker or thinner asymptotic behaviors.


Statistical inference


Estimation of parameters

It is often the case that we do not know the parameters of the normal distribution, but instead want to Estimation theory, estimate them. That is, having a sample (x_1, \ldots, x_n) from a normal N(\mu, \sigma^2) population we would like to learn the approximate values of parameters \mu and \sigma^2. The standard approach to this problem is the maximum likelihood method, which requires maximization of the ''log-likelihood function'': : \ln\mathcal(\mu,\sigma^2) = \sum_^n \ln f(x_i\mid\mu,\sigma^2) = -\frac\ln(2\pi) - \frac\ln\sigma^2 - \frac\sum_^n (x_i-\mu)^2. Taking derivatives with respect to \mu and \sigma^2 and solving the resulting system of first order conditions yields the ''maximum likelihood estimates'': : \hat = \overline \equiv \frac\sum_^n x_i, \qquad \hat^2 = \frac \sum_^n (x_i - \overline)^2.


Sample mean

Estimator \textstyle\hat\mu is called the ''
sample mean The sample mean (or "empirical mean") and the sample covariance are statistics computed from a Sample (statistics), sample of data on one or more random variables. The sample mean is the average value (or mean, mean value) of a sample (statistic ...
'', since it is the arithmetic mean of all observations. The statistic \textstyle\overline is complete statistic, complete and sufficient statistic, sufficient for \mu, and therefore by the Lehmann–Scheffé theorem, \textstyle\hat\mu is the uniformly minimum variance unbiased (UMVU) estimator. In finite samples it is distributed normally: : \hat\mu \sim \mathcal(\mu,\sigma^2/n). The variance of this estimator is equal to the ''μμ''-element of the inverse Fisher information matrix \textstyle\mathcal^. This implies that the estimator is efficient estimator, finite-sample efficient. Of practical importance is the fact that the standard error (statistics), standard error of \textstyle\hat\mu is proportional to \textstyle1/\sqrt, that is, if one wishes to decrease the standard error by a factor of 10, one must increase the number of points in the sample by a factor of 100. This fact is widely used in determining sample sizes for opinion polls and the number of trials in Monte Carlo simulations. From the standpoint of the asymptotic theory (statistics), asymptotic theory, \textstyle\hat\mu is consistent estimator, consistent, that is, it convergence in probability, converges in probability to \mu as n\rightarrow\infty. The estimator is also asymptotic normality, asymptotically normal, which is a simple corollary of the fact that it is normal in finite samples: : \sqrt(\hat\mu-\mu) \,\xrightarrow\, \mathcal(0,\sigma^2).


Sample variance

The estimator \textstyle\hat\sigma^2 is called the ''sample variance'', since it is the variance of the sample ((x_1, \ldots, x_n)). In practice, another estimator is often used instead of the \textstyle\hat\sigma^2. This other estimator is denoted s^2, and is also called the ''sample variance'', which represents a certain ambiguity in terminology; its square root s is called the ''sample standard deviation''. The estimator s^2 differs from \textstyle\hat\sigma^2 by having instead of ''n'' in the denominator (the so-called Bessel's correction): : s^2 = \frac \hat\sigma^2 = \frac \sum_^n (x_i - \overline)^2. The difference between s^2 and \textstyle\hat\sigma^2 becomes negligibly small for large ''n''s. In finite samples however, the motivation behind the use of s^2 is that it is an unbiased estimator of the underlying parameter \sigma^2, whereas \textstyle\hat\sigma^2 is biased. Also, by the Lehmann–Scheffé theorem the estimator s^2 is uniformly minimum variance unbiased (Minimum-variance unbiased estimator, UMVU), which makes it the "best" estimator among all unbiased ones. However it can be shown that the biased estimator \textstyle\hat\sigma^2 is "better" than the s^2 in terms of the mean squared error (MSE) criterion. In finite samples both s^2 and \textstyle\hat\sigma^2 have scaled
chi-squared distribution In probability theory and statistics, the chi-squared distribution (also chi-square or \chi^2-distribution) with k degrees of freedom is the distribution of a sum of the squares of k independent standard normal random variables. The chi-squa ...
with degrees of freedom: : s^2 \sim \frac \cdot \chi^2_, \qquad \hat\sigma^2 \sim \frac \cdot \chi^2_. The first of these expressions shows that the variance of s^2 is equal to 2\sigma^4/(n-1), which is slightly greater than the ''σσ''-element of the inverse Fisher information matrix \textstyle\mathcal^. Thus, s^2 is not an efficient estimator for \sigma^2, and moreover, since s^2 is UMVU, we can conclude that the finite-sample efficient estimator for \sigma^2 does not exist. Applying the asymptotic theory, both estimators s^2 and \textstyle\hat\sigma^2 are consistent, that is they converge in probability to \sigma^2 as the sample size n\rightarrow\infty. The two estimators are also both asymptotically normal: : \sqrt(\hat\sigma^2 - \sigma^2) \simeq \sqrt(s^2-\sigma^2) \,\xrightarrow\, \mathcal(0,2\sigma^4). In particular, both estimators are asymptotically efficient for \sigma^2.


Confidence intervals

By
Cochran's theorem In statistics, Cochran's theorem, devised by William G. Cochran, is a theorem used to justify results relating to the probability distributions of statistics that are used in the analysis of variance. Statement Let ''U''1, ..., ''U'N'' be i.i. ...
, for normal distributions the sample mean \textstyle\hat\mu and the sample variance ''s''2 are
independent Independent or Independents may refer to: Arts, entertainment, and media Artist groups * Independents (artist group), a group of modernist painters based in the New Hope, Pennsylvania, area of the United States during the early 1930s * Independ ...
, which means there can be no gain in considering their joint distribution. There is also a converse theorem: if in a sample the sample mean and sample variance are independent, then the sample must have come from the normal distribution. The independence between \textstyle\hat\mu and ''s'' can be employed to construct the so-called ''t-statistic'': : t = \frac = \frac \sim t_ This quantity ''t'' has the
Student's t-distribution In probability and statistics, Student's ''t''-distribution (or simply the ''t''-distribution) is any member of a family of continuous probability distributions that arise when estimating the mean of a normally distributed population in sit ...
with degrees of freedom, and it is an ancillary statistic (independent of the value of the parameters). Inverting the distribution of this ''t''-statistics will allow us to construct the
confidence interval In frequentist statistics, a confidence interval (CI) is a range of estimates for an unknown parameter. A confidence interval is computed at a designated ''confidence level''; the 95% confidence level is most common, but other levels, such as 9 ...
for ''μ''; similarly, inverting the ''χ''2 distribution of the statistic ''s''2 will give us the confidence interval for ''σ''2: :\mu \in \left[ \hat\mu - t_ \fracs, \hat\mu + t_ \fracs \right], :\sigma^2 \in \left[ \frac, \frac \right], where ''tk,p'' and are the ''p''th
quantile In statistics and probability, quantiles are cut points dividing the range of a probability distribution into continuous intervals with equal probabilities, or dividing the observations in a sample in the same way. There is one fewer quantile tha ...
s of the ''t''- and ''χ''2-distributions respectively. These confidence intervals are of the ''confidence level'' , meaning that the true values ''μ'' and ''σ''2 fall outside of these intervals with probability (or significance level) ''α''. In practice people usually take , resulting in the 95% confidence intervals. Approximate formulas can be derived from the asymptotic distributions of \textstyle\hat\mu and ''s''2: :\mu \in \left[ \hat\mu - , z_, \fracs, \hat\mu + , z_, \fracs \right], :\sigma^2 \in \left[ s^2 - , z_, \fracs^2, s^2 + , z_, \fracs^2 \right], The approximate formulas become valid for large values of ''n'', and are more convenient for the manual calculation since the standard normal quantiles ''z''''α''/2 do not depend on ''n''. In particular, the most popular value of , results in .


Normality tests

Normality tests assess the likelihood that the given data set comes from a normal distribution. Typically the null hypothesis ''H''0 is that the observations are distributed normally with unspecified mean ''μ'' and variance ''σ''2, versus the alternative ''Ha'' that the distribution is arbitrary. Many tests (over 40) have been devised for this problem. The more prominent of them are outlined below: Diagnostic plots are more intuitively appealing but subjective at the same time, as they rely on informal human judgement to accept or reject the null hypothesis. *
Q–Q plot In statistics, a Q–Q plot (quantile-quantile plot) is a probability plot, a List of graphical methods, graphical method for comparing two probability distributions by plotting their ''quantiles'' against each other. A point on the plot co ...
, also known as normal probability plot or rankit plot—is a plot of the sorted values from the data set against the expected values of the corresponding quantiles from the standard normal distribution. That is, it's a plot of point of the form (Φ−1(''pk''), ''x''(''k'')), where plotting points ''pk'' are equal to ''pk'' = (''k'' − ''α'')/(''n'' + 1 − 2''α'') and ''α'' is an adjustment constant, which can be anything between 0 and 1. If the null hypothesis is true, the plotted points should approximately lie on a straight line. * P–P plot – similar to the Q–Q plot, but used much less frequently. This method consists of plotting the points (Φ(''z''(''k'')), ''pk''), where \textstyle z_ = (x_-\hat\mu)/\hat\sigma. For normally distributed data this plot should lie on a 45° line between (0, 0) and (1, 1). Goodness-of-fit tests: ''Moment-based tests'': * D'Agostino's K-squared test * Jarque–Bera test * Shapiro–Wilk test: This is based on the fact that the line in the Q–Q plot has the slope of ''σ''. The test compares the least squares estimate of that slope with the value of the sample variance, and rejects the null hypothesis if these two quantities differ significantly. ''Tests based on the empirical distribution function'': * Anderson–Darling test * Lilliefors test (an adaptation of the Kolmogorov–Smirnov test)


Bayesian analysis of the normal distribution

Bayesian analysis of normally distributed data is complicated by the many different possibilities that may be considered: * Either the mean, or the variance, or neither, may be considered a fixed quantity. * When the variance is unknown, analysis may be done directly in terms of the variance, or in terms of the
precision Precision, precise or precisely may refer to: Science, and technology, and mathematics Mathematics and computing (general) * Accuracy and precision, measurement deviation from true value and its scatter * Significant figures, the number of digit ...
, the reciprocal of the variance. The reason for expressing the formulas in terms of precision is that the analysis of most cases is simplified. * Both univariate and multivariate normal distribution, multivariate cases need to be considered. * Either conjugate prior, conjugate or improper prior, improper prior distributions may be placed on the unknown variables. * An additional set of cases occurs in Bayesian linear regression, where in the basic model the data is assumed to be normally distributed, and normal priors are placed on the regression coefficients. The resulting analysis is similar to the basic cases of independent identically distributed data. The formulas for the non-linear-regression cases are summarized in the conjugate prior article.


Sum of two quadratics


= Scalar form

= The following auxiliary formula is useful for simplifying the posterior distribution, posterior update equations, which otherwise become fairly tedious. :a(x-y)^2 + b(x-z)^2 = (a + b)\left(x - \frac\right)^2 + \frac(y-z)^2 This equation rewrites the sum of two quadratics in ''x'' by expanding the squares, grouping the terms in ''x'', and completing the square. Note the following about the complex constant factors attached to some of the terms: # The factor \frac has the form of a weighted average of ''y'' and ''z''. # \frac = \frac = (a^ + b^)^. This shows that this factor can be thought of as resulting from a situation where the Multiplicative inverse, reciprocals of quantities ''a'' and ''b'' add directly, so to combine ''a'' and ''b'' themselves, it's necessary to reciprocate, add, and reciprocate the result again to get back into the original units. This is exactly the sort of operation performed by the harmonic mean, so it is not surprising that \frac is one-half the harmonic mean of ''a'' and ''b''.


= Vector form

= A similar formula can be written for the sum of two vector quadratics: If x, y, z are vectors of length ''k'', and A and B are symmetric matrix, symmetric, invertible matrices of size k\times k, then : \begin & (\mathbf-\mathbf)'\mathbf(\mathbf-\mathbf) + (\mathbf-\mathbf)' \mathbf(\mathbf-\mathbf) \\ = & (\mathbf - \mathbf)'(\mathbf+\mathbf)(\mathbf - \mathbf) + (\mathbf - \mathbf)'(\mathbf^ + \mathbf^)^(\mathbf - \mathbf) \end where :\mathbf = (\mathbf + \mathbf)^(\mathbf\mathbf + \mathbf \mathbf) Note that the form x′ A x is called a
quadratic form In mathematics, a quadratic form is a polynomial with terms all of degree two ("form" is another name for a homogeneous polynomial). For example, :4x^2 + 2xy - 3y^2 is a quadratic form in the variables and . The coefficients usually belong to a ...
and is a scalar (mathematics), scalar: :\mathbf'\mathbf\mathbf = \sum_a_ x_i x_j In other words, it sums up all possible combinations of products of pairs of elements from x, with a separate coefficient for each. In addition, since x_i x_j = x_j x_i, only the sum a_ + a_ matters for any off-diagonal elements of A, and there is no loss of generality in assuming that A is symmetric matrix, symmetric. Furthermore, if A is symmetric, then the form \mathbf'\mathbf\mathbf = \mathbf'\mathbf\mathbf.


Sum of differences from the mean

Another useful formula is as follows: \sum_^n (x_i-\mu)^2 = \sum_^n (x_i-\bar)^2 + n(\bar -\mu)^2 where \bar = \frac \sum_^n x_i.


With known variance

For a set of i.i.d. normally distributed data points X of size ''n'' where each individual point ''x'' follows x \sim \mathcal(\mu, \sigma^2) with known
variance In probability theory and statistics, variance is the expectation of the squared deviation of a random variable from its population mean or sample mean. Variance is a measure of dispersion, meaning it is a measure of how far a set of numbers ...
σ2, the conjugate prior distribution is also normally distributed. This can be shown more easily by rewriting the variance as the
precision Precision, precise or precisely may refer to: Science, and technology, and mathematics Mathematics and computing (general) * Accuracy and precision, measurement deviation from true value and its scatter * Significant figures, the number of digit ...
, i.e. using τ = 1/σ2. Then if x \sim \mathcal(\mu, 1/\tau) and \mu \sim \mathcal(\mu_0, 1/\tau_0), we proceed as follows. First, the likelihood function is (using the formula above for the sum of differences from the mean): :\begin p(\mathbf\mid\mu,\tau) &= \prod_^n \sqrt \exp\left(-\frac\tau(x_i-\mu)^2\right) \\ &= \left(\frac\right)^ \exp\left(-\frac\tau \sum_^n (x_i-\mu)^2\right) \\ &= \left(\frac\right)^ \exp\left[-\frac\tau \left(\sum_^n(x_i-\bar)^2 + n(\bar -\mu)^2\right)\right]. \end Then, we proceed as follows: :\begin p(\mu\mid\mathbf) &\propto p(\mathbf\mid\mu) p(\mu) \\ & = \left(\frac\right)^ \exp\left[-\frac\tau \left(\sum_^n(x_i-\bar)^2 + n(\bar -\mu)^2\right)\right] \sqrt \exp\left(-\frac\tau_0(\mu-\mu_0)^2\right) \\ &\propto \exp\left(-\frac\left(\tau\left(\sum_^n(x_i-\bar)^2 + n(\bar -\mu)^2\right) + \tau_0(\mu-\mu_0)^2\right)\right) \\ &\propto \exp\left(-\frac \left(n\tau(\bar-\mu)^2 + \tau_0(\mu-\mu_0)^2 \right)\right) \\ &= \exp\left(-\frac(n\tau + \tau_0)\left(\mu - \dfrac\right)^2 + \frac(\bar - \mu_0)^2\right) \\ &\propto \exp\left(-\frac(n\tau + \tau_0)\left(\mu - \dfrac\right)^2\right) \end In the above derivation, we used the formula above for the sum of two quadratics and eliminated all constant factors not involving ''μ''. The result is the kernel (statistics), kernel of a normal distribution, with mean \frac and precision n\tau + \tau_0, i.e. :p(\mu\mid\mathbf) \sim \mathcal\left(\frac, \frac\right) This can be written as a set of Bayesian update equations for the posterior parameters in terms of the prior parameters: :\begin \tau_0' &= \tau_0 + n\tau \\[5pt] \mu_0' &= \frac \\[5pt] \bar &= \frac\sum_^n x_i \end That is, to combine ''n'' data points with total precision of ''nτ'' (or equivalently, total variance of ''n''/''σ''2) and mean of values \bar, derive a new total precision simply by adding the total precision of the data to the prior total precision, and form a new mean through a ''precision-weighted average'', i.e. a weighted average of the data mean and the prior mean, each weighted by the associated total precision. This makes logical sense if the precision is thought of as indicating the certainty of the observations: In the distribution of the posterior mean, each of the input components is weighted by its certainty, and the certainty of this distribution is the sum of the individual certainties. (For the intuition of this, compare the expression "the whole is (or is not) greater than the sum of its parts". In addition, consider that the knowledge of the posterior comes from a combination of the knowledge of the prior and likelihood, so it makes sense that we are more certain of it than of either of its components.) The above formula reveals why it is more convenient to do Bayesian analysis of conjugate priors for the normal distribution in terms of the precision. The posterior precision is simply the sum of the prior and likelihood precisions, and the posterior mean is computed through a precision-weighted average, as described above. The same formulas can be written in terms of variance by reciprocating all the precisions, yielding the more ugly formulas :\begin ' &= \frac \\[5pt] \mu_0' &= \frac \\[5pt] \bar &= \frac\sum_^n x_i \end


With known mean

For a set of i.i.d. normally distributed data points X of size ''n'' where each individual point ''x'' follows x \sim \mathcal(\mu, \sigma^2) with known mean μ, the conjugate prior of the
variance In probability theory and statistics, variance is the expectation of the squared deviation of a random variable from its population mean or sample mean. Variance is a measure of dispersion, meaning it is a measure of how far a set of numbers ...
has an inverse gamma distribution or a scaled inverse chi-squared distribution. The two are equivalent 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. The prior for σ2 is as follows: :p(\sigma^2\mid\nu_0,\sigma_0^2) = \frac~\frac \propto \frac The likelihood function from above, written in terms of the variance, is: :\begin p(\mathbf\mid\mu,\sigma^2) &= \left(\frac\right)^ \exp\left[-\frac \sum_^n (x_i-\mu)^2\right] \\ &= \left(\frac\right)^ \exp\left[-\frac\right] \end where :S = \sum_^n (x_i-\mu)^2. Then: :\begin p(\sigma^2\mid\mathbf) &\propto p(\mathbf\mid\sigma^2) p(\sigma^2) \\ &= \left(\frac\right)^ \exp\left[-\frac\right] \frac~\frac \\ &\propto \left(\frac\right)^ \frac \exp\left[-\frac + \frac\right] \\ &= \frac \exp\left[-\frac\right] \end The above is also a scaled inverse chi-squared distribution where :\begin \nu_0' &= \nu_0 + n \\ \nu_0'' &= \nu_0 \sigma_0^2 + \sum_^n (x_i-\mu)^2 \end or equivalently :\begin \nu_0' &= \nu_0 + n \\ ' &= \frac \end Reparameterizing in terms of an inverse gamma distribution, the result is: :\begin \alpha' &= \alpha + \frac \\ \beta' &= \beta + \frac \end


With unknown mean and unknown variance

For a set of i.i.d. normally distributed data points X of size ''n'' where each individual point ''x'' follows x \sim \mathcal(\mu, \sigma^2) with unknown mean μ and unknown
variance In probability theory and statistics, variance is the expectation of the squared deviation of a random variable from its population mean or sample mean. Variance is a measure of dispersion, meaning it is a measure of how far a set of numbers ...
σ2, a combined (multivariate) conjugate prior is placed over the mean and variance, consisting of a normal-inverse-gamma distribution. Logically, this originates as follows: # From the analysis of the case with unknown mean but known variance, we see that the update equations involve sufficient statistics computed from the data consisting of the mean of the data points and the total variance of the data points, computed in turn from the known variance divided by the number of data points. # From the analysis of the case with unknown variance but known mean, we see that the update equations involve sufficient statistics over the data consisting of the number of data points and sum of squared deviations. # Keep in mind that the posterior update values serve as the prior distribution when further data is handled. Thus, we should logically think of our priors in terms of the sufficient statistics just described, with the same semantics kept in mind as much as possible. # To handle the case where both mean and variance are unknown, we could place independent priors over the mean and variance, with fixed estimates of the average mean, total variance, number of data points used to compute the variance prior, and sum of squared deviations. Note however that in reality, the total variance of the mean depends on the unknown variance, and the sum of squared deviations that goes into the variance prior (appears to) depend on the unknown mean. In practice, the latter dependence is relatively unimportant: Shifting the actual mean shifts the generated points by an equal amount, and on average the squared deviations will remain the same. This is not the case, however, with the total variance of the mean: As the unknown variance increases, the total variance of the mean will increase proportionately, and we would like to capture this dependence. # This suggests that we create a ''conditional prior'' of the mean on the unknown variance, with a hyperparameter specifying the mean of the pseudo-observations associated with the prior, and another parameter specifying the number of pseudo-observations. This number serves as a scaling parameter on the variance, making it possible to control the overall variance of the mean relative to the actual variance parameter. The prior for the variance also has two hyperparameters, one specifying the sum of squared deviations of the pseudo-observations associated with the prior, and another specifying once again the number of pseudo-observations. Note that each of the priors has a hyperparameter specifying the number of pseudo-observations, and in each case this controls the relative variance of that prior. These are given as two separate hyperparameters so that the variance (aka the confidence) of the two priors can be controlled separately. # This leads immediately to the normal-inverse-gamma distribution, which is the product of the two distributions just defined, with conjugate priors used (an inverse gamma distribution over the variance, and a normal distribution over the mean, ''conditional'' on the variance) and with the same four parameters just defined. The priors are normally defined as follows: :\begin p(\mu\mid\sigma^2; \mu_0, n_0) &\sim \mathcal(\mu_0,\sigma^2/n_0) \\ p(\sigma^2; \nu_0,\sigma_0^2) &\sim I\chi^2(\nu_0,\sigma_0^2) = IG(\nu_0/2, \nu_0\sigma_0^2/2) \end The update equations can be derived, and look as follows: :\begin \bar &= \frac 1 n \sum_^n x_i \\ \mu_0' &= \frac \\ n_0' &= n_0 + n \\ \nu_0' &= \nu_0 + n \\ \nu_0'' &= \nu_0 \sigma_0^2 + \sum_^n (x_i-\bar)^2 + \frac(\mu_0 - \bar)^2 \end The respective numbers of pseudo-observations add the number of actual observations to them. The new mean hyperparameter is once again a weighted average, this time weighted by the relative numbers of observations. Finally, the update for \nu_0'' is similar to the case with known mean, but in this case the sum of squared deviations is taken with respect to the observed data mean rather than the true mean, and as a result a new "interaction term" needs to be added to take care of the additional error source stemming from the deviation between prior and data mean.


Occurrence and applications

The occurrence of normal distribution in practical problems can be loosely classified into four categories: # Exactly normal distributions; # Approximately normal laws, for example when such approximation is justified by the
central limit theorem In probability theory, the central limit theorem (CLT) establishes that, in many situations, when independent random variables are summed up, their properly normalized sum tends toward a normal distribution even if the original variables themselv ...
; and # Distributions modeled as normal – the normal distribution being the distribution with Principle of maximum entropy, maximum entropy for a given mean and variance. # Regression problems – the normal distribution being found after systematic effects have been modeled sufficiently well.


Exact normality

Certain quantities in physics are distributed normally, as was first demonstrated by James Clerk Maxwell. Examples of such quantities are: * Probability density function of a ground state in a quantum harmonic oscillator. * The position of a particle that experiences diffusion. If initially the particle is located at a specific point (that is its probability distribution is the Dirac delta function), then after time ''t'' its location is described by a normal distribution with variance ''t'', which satisfies the diffusion equation \frac f(x,t) = \frac \frac f(x,t). If the initial location is given by a certain density function g(x), then the density at time ''t'' is the convolution of ''g'' and the normal PDF.


Approximate normality

''Approximately'' normal distributions occur in many situations, as explained by the
central limit theorem In probability theory, the central limit theorem (CLT) establishes that, in many situations, when independent random variables are summed up, their properly normalized sum tends toward a normal distribution even if the original variables themselv ...
. When the outcome is produced by many small effects acting ''additively and independently'', its distribution will be close to normal. The normal approximation will not be valid if the effects act multiplicatively (instead of additively), or if there is a single external influence that has a considerably larger magnitude than the rest of the effects. * In counting problems, where the central limit theorem includes a discrete-to-continuum approximation and where Infinite divisibility, infinitely divisible and Indecomposable distribution, decomposable distributions are involved, such as ** binomial distribution, Binomial random variables, associated with binary response variables; ** Poisson distribution, Poisson random variables, associated with rare events; * Thermal radiation has a Bose–Einstein statistics, Bose–Einstein distribution on very short time scales, and a normal distribution on longer timescales due to the central limit theorem.


Assumed normality

There are statistical methods to empirically test that assumption; see the above #Normality tests, Normality tests section. * In biology, the ''logarithm'' of various variables tend to have a normal distribution, that is, they tend to have a
log-normal distribution In probability theory, a log-normal (or lognormal) distribution is a continuous probability distribution of a random variable whose logarithm is normally distributed. Thus, if the random variable is log-normally distributed, then has a normal ...
(after separation on male/female subpopulations), with examples including: ** Measures of size of living tissue (length, height, skin area, weight); ** The ''length'' of ''inert'' appendages (hair, claws, nails, teeth) of biological specimens, ''in the direction of growth''; presumably the thickness of tree bark also falls under this category; ** Certain physiological measurements, such as blood pressure of adult humans. * In finance, in particular the Black–Scholes model, changes in the ''logarithm'' of exchange rates, price indices, and stock market indices are assumed normal (these variables behave like compound interest, not like simple interest, and so are multiplicative). Some mathematicians such as Benoit Mandelbrot have argued that Levy skew alpha-stable distribution, log-Levy distributions, which possesses heavy tails would be a more appropriate model, in particular for the analysis for stock market crashes. The use of the assumption of normal distribution occurring in financial models has also been criticized by Nassim Nicholas Taleb in his works. * Propagation of uncertainty, Measurement errors in physical experiments are often modeled by a normal distribution. This use of a normal distribution does not imply that one is assuming the measurement errors are normally distributed, rather using the normal distribution produces the most conservative predictions possible given only knowledge about the mean and variance of the errors. * In Standardized testing (statistics), standardized testing, results can be made to have a normal distribution by either selecting the number and difficulty of questions (as in the Intelligence quotient, IQ test) or transforming the raw test scores into "output" scores by fitting them to the normal distribution. For example, the SAT's traditional range of 200–800 is based on a normal distribution with a mean of 500 and a standard deviation of 100. * Many scores are derived from the normal distribution, including percentile ranks ("percentiles" or "quantiles"), normal curve equivalents, stanines, Standard score, z-scores, and T-scores. Additionally, some behavioral statistical procedures assume that scores are normally distributed; for example, Student's t-test, t-tests and Analysis of variance, ANOVAs. Bell curve grading assigns relative grades based on a normal distribution of scores. * In hydrology the distribution of long duration river discharge or rainfall, e.g. monthly and yearly totals, is often thought to be practically normal according to the
central limit theorem In probability theory, the central limit theorem (CLT) establishes that, in many situations, when independent random variables are summed up, their properly normalized sum tends toward a normal distribution even if the original variables themselv ...
. The blue picture, made with CumFreq, illustrates an example of fitting the normal distribution to ranked October rainfalls showing the 90% confidence belt based on the
binomial distribution In probability theory and statistics, the binomial distribution with parameters ''n'' and ''p'' is the discrete probability distribution of the number of successes in a sequence of ''n'' independent experiments, each asking a yes–no quest ...
. The rainfall data are represented by plotting positions as part of the cumulative frequency analysis.


Methodological problems and peer review

John Ioannidis argues that using normally distributed standard deviations as standards for validating research findings leave falsifiability, falsifiable predictions about phenomena that are not normally distributed untested. This includes, for example, phenomena that only appear when all necessary conditions are present and one cannot be a substitute for another in an addition-like way and phenomena that are not randomly distributed. Ioannidis argues that standard deviation-centered validation gives a false appearance of validity to hypotheses and theories where some but not all falsifiable predictions are normally distributed since the portion of falsifiable predictions that there is evidence against may and in some cases are in the non-normally distributed parts of the range of falsifiable predictions, as well as baselessly dismissing hypotheses for which none of the falsifiable predictions are normally distributed as if were they unfalsifiable when in fact they do make falsifiable predictions. It is argued by Ioannidis that many cases of mutually exclusive theories being accepted as "validated" by research journals are caused by failure of the journals to take in empirical falsifications of non-normally distributed predictions, and not because mutually exclusive theories are true, which they cannot be, although two mutually exclusive theories can both be wrong and a third one correct.


Computational methods


Generating values from normal distribution

In computer simulations, especially in applications of the Monte-Carlo method, it is often desirable to generate values that are normally distributed. The algorithms listed below all generate the standard normal deviates, since a can be generated as , where ''Z'' is standard normal. All these algorithms rely on the availability of a random number generator ''U'' capable of producing Uniform distribution (continuous), uniform random variates. * The most straightforward method is based on the probability integral transform property: if ''U'' is distributed uniformly on (0,1), then Φ−1(''U'') will have the standard normal distribution. The drawback of this method is that it relies on calculation of the
probit function In probability theory and statistics, the probit function is the quantile function associated with the standard normal distribution. It has applications in data analysis and machine learning, in particular exploratory statistical graphics and ...
Φ−1, which cannot be done analytically. Some approximate methods are described in and in the error function, erf article. Wichura gives a fast algorithm for computing this function to 16 decimal places, which is used by R programming language, R to compute random variates of the normal distribution. * Irwin–Hall distribution#Approximating a Normal distribution, An easy-to-program approximate approach that relies on the
central limit theorem In probability theory, the central limit theorem (CLT) establishes that, in many situations, when independent random variables are summed up, their properly normalized sum tends toward a normal distribution even if the original variables themselv ...
is as follows: generate 12 uniform ''U''(0,1) deviates, add them all up, and subtract 6 – the resulting random variable will have approximately standard normal distribution. In truth, the distribution will be Irwin–Hall distribution, Irwin–Hall, which is a 12-section eleventh-order polynomial approximation to the normal distribution. This random deviate will have a limited range of (−6, 6). Note that in a true normal distribution, only 0.00034% of all samples will fall outside ±6σ. * The Box–Muller transform, Box–Muller method uses two independent random numbers ''U'' and ''V'' distributed uniform distribution (continuous), uniformly on (0,1). Then the two random variables ''X'' and ''Y'' X = \sqrt \, \cos(2 \pi V) , \qquad Y = \sqrt \, \sin(2 \pi V) . will both have the standard normal distribution, and will be
independent Independent or Independents may refer to: Arts, entertainment, and media Artist groups * Independents (artist group), a group of modernist painters based in the New Hope, Pennsylvania, area of the United States during the early 1930s * Independ ...
. This formulation arises because for a bivariate normal random vector (''X'', ''Y'') the squared norm will have the
chi-squared distribution In probability theory and statistics, the chi-squared distribution (also chi-square or \chi^2-distribution) with k degrees of freedom is the distribution of a sum of the squares of k independent standard normal random variables. The chi-squa ...
with two degrees of freedom, which is an easily generated exponential distribution, exponential random variable corresponding to the quantity −2ln(''U'') in these equations; and the angle is distributed uniformly around the circle, chosen by the random variable ''V''. * The Marsaglia polar method is a modification of the Box–Muller method which does not require computation of the sine and cosine functions. In this method, ''U'' and ''V'' are drawn from the uniform (−1,1) distribution, and then is computed. If ''S'' is greater or equal to 1, then the method starts over, otherwise the two quantities X = U\sqrt, \qquad Y = V\sqrt are returned. Again, ''X'' and ''Y'' are independent, standard normal random variables. * The Ratio method is a rejection method. The algorithm proceeds as follows: ** Generate two independent uniform deviates ''U'' and ''V''; ** Compute ''X'' = (''V'' − 0.5)/''U''; ** Optional: if ''X''2 ≤ 5 − 4''e''1/4''U'' then accept ''X'' and terminate algorithm; ** Optional: if ''X''2 ≥ 4''e''−1.35/''U'' + 1.4 then reject ''X'' and start over from step 1; ** If ''X''2 ≤ −4 ln''U'' then accept ''X'', otherwise start over the algorithm. *:The two optional steps allow the evaluation of the logarithm in the last step to be avoided in most cases. These steps can be greatly improved so that the logarithm is rarely evaluated. * The ziggurat algorithm is faster than the Box–Muller transform and still exact. In about 97% of all cases it uses only two random numbers, one random integer and one random uniform, one multiplication and an if-test. Only in 3% of the cases, where the combination of those two falls outside the "core of the ziggurat" (a kind of rejection sampling using logarithms), do exponentials and more uniform random numbers have to be employed. * Integer arithmetic can be used to sample from the standard normal distribution. This method is exact in the sense that it satisfies the conditions of ''ideal approximation''; i.e., it is equivalent to sampling a real number from the standard normal distribution and rounding this to the nearest representable floating point number. * There is also some investigation into the connection between the fast Hadamard transform and the normal distribution, since the transform employs just addition and subtraction and by the central limit theorem random numbers from almost any distribution will be transformed into the normal distribution. In this regard a series of Hadamard transforms can be combined with random permutations to turn arbitrary data sets into a normally distributed data.


Numerical approximations for the normal CDF and normal quantile function

The standard normal cumulative distribution function, CDF is widely used in scientific and statistical computing. The values Φ(''x'') may be approximated very accurately by a variety of methods, such as numerical integration, Taylor series, asymptotic series and Gauss's continued fraction#Of Kummer's confluent hypergeometric function, continued fractions. Different approximations are used depending on the desired level of accuracy. * give the approximation for Φ(''x'') for ''x > 0'' with the absolute error (algorith
26.2.17
: \Phi(x) = 1 - \varphi(x)\left(b_1 t + b_2 t^2 + b_3t^3 + b_4 t^4 + b_5 t^5\right) + \varepsilon(x), \qquad t = \frac, where ''ϕ''(''x'') is the standard normal PDF, and ''b''0 = 0.2316419, ''b''1 = 0.319381530, ''b''2 = −0.356563782, ''b''3 = 1.781477937, ''b''4 = −1.821255978, ''b''5 = 1.330274429. * lists some dozens of approximations – by means of rational functions, with or without exponentials – for the function. His algorithms vary in the degree of complexity and the resulting precision, with maximum absolute precision of 24 digits. An algorithm by combines Hart's algorithm 5666 with a continued fraction approximation in the tail to provide a fast computation algorithm with a 16-digit precision. * after recalling Hart68 solution is not suited for erf, gives a solution for both erf and erfc, with maximal relative error bound, via rational function, Rational Chebyshev Approximation. * suggested a simple algorithm based on the Taylor series expansion \Phi(x) = \frac12 + \varphi(x)\left( x + \frac 3 + \frac + \frac + \frac + \cdots \right) for calculating with arbitrary precision. The drawback of this algorithm is comparatively slow calculation time (for example it takes over 300 iterations to calculate the function with 16 digits of precision when ). * The GNU Scientific Library calculates values of the standard normal CDF using Hart's algorithms and approximations with Chebyshev polynomials. Shore (1982) introduced simple approximations that may be incorporated in stochastic optimization models of engineering and operations research, like reliability engineering and inventory analysis. Denoting , the simplest approximation for the quantile function is: z = \Phi^(p)=5.5556\left[1- \left( \frac p \right)^\right],\qquad p\ge 1/2 This approximation delivers for ''z'' a maximum absolute error of 0.026 (for , corresponding to ). For replace ''p'' by and change sign. Another approximation, somewhat less accurate, is the single-parameter approximation: z=-0.4115\left\, \qquad p\ge 1/2 The latter had served to derive a simple approximation for the loss integral of the normal distribution, defined by \begin L(z) & =\int_z^\infty (u-z)\varphi(u) \, du=\int_z^\infty [1-\Phi (u)] \, du \\[5pt] L(z) & \approx \begin 0.4115\left(\dfrac p \right) - z, & p<1/2, \\ \\ 0.4115\left( \dfrac p \right), & p\ge 1/2. \end \\[5pt] \text \\ L(z) & \approx \begin 0.4115\left\, & p < 1/2, \\ \\ 0.4115 \dfrac p, & p\ge 1/2. \end \end This approximation is particularly accurate for the right far-tail (maximum error of 10−3 for z≥1.4). Highly accurate approximations for the CDF, based on Response modeling methodology, Response Modeling Methodology (RMM, Shore, 2011, 2012), are shown in Shore (2005). Some more approximations can be found at: Error function#Approximation with elementary functions. In particular, small ''relative'' error on the whole domain for the CDF \Phi and the quantile function \Phi^ as well, is achieved via an explicitly invertible formula by Sergei Winitzki in 2008.


History


Development

Some authors attribute the credit for the discovery of the normal distribution to Abraham de Moivre, de Moivre, who in 1738 published in the second edition of his "''The Doctrine of Chances''" the study of the coefficients in the binomial expansion of . De Moivre proved that the middle term in this expansion has the approximate magnitude of 2^n/\sqrt, and that "If ''m'' or ''n'' be a Quantity infinitely great, then the Logarithm of the Ratio, which a Term distant from the middle by the Interval ''ℓ'', has to the middle Term, is -\frac." Although this theorem can be interpreted as the first obscure expression for the normal probability law, Stephen Stigler, Stigler points out that de Moivre himself did not interpret his results as anything more than the approximate rule for the binomial coefficients, and in particular de Moivre lacked the concept of the probability density function. In 1823 Carl Friedrich Gauss, Gauss published his monograph "''Theoria combinationis observationum erroribus minimis obnoxiae''" where among other things he introduces several important statistical concepts, such as the method of least squares, the method of maximum likelihood, and the ''normal distribution''. Gauss used ''M'', , to denote the measurements of some unknown quantity ''V'', and sought the "most probable" estimator of that quantity: the one that maximizes the probability of obtaining the observed experimental results. In his notation φΔ is the probability density function of the measurement errors of magnitude Δ. Not knowing what the function ''φ'' is, Gauss requires that his method should reduce to the well-known answer: the arithmetic mean of the measured values. Starting from these principles, Gauss demonstrates that the only law that rationalizes the choice of arithmetic mean as an estimator of the location parameter, is the normal law of errors: \varphi\mathit = \frac h \, e^, where ''h'' is "the measure of the precision of the observations". Using this normal law as a generic model for errors in the experiments, Gauss formulates what is now known as the non-linear least squares, non-linear weighted least squares method. Although Gauss was the first to suggest the normal distribution law, Pierre Simon de Laplace, Laplace made significant contributions. It was Laplace who first posed the problem of aggregating several observations in 1774, although his own solution led to the Laplacian distribution. It was Laplace who first calculated the value of the Gaussian integral, integral in 1782, providing the normalization constant for the normal distribution. Finally, it was Laplace who in 1810 proved and presented to the Academy the fundamental
central limit theorem In probability theory, the central limit theorem (CLT) establishes that, in many situations, when independent random variables are summed up, their properly normalized sum tends toward a normal distribution even if the original variables themselv ...
, which emphasized the theoretical importance of the normal distribution. It is of interest to note that in 1809 an Irish-American mathematician Robert Adrain published two insightful but flawed derivations of the normal probability law, simultaneously and independently from Gauss. His works remained largely unnoticed by the scientific community, until in 1871 they were exhumed by Cleveland Abbe, Abbe. In the middle of the 19th century James Clerk Maxwell, Maxwell demonstrated that the normal distribution is not just a convenient mathematical tool, but may also occur in natural phenomena: "The number of particles whose velocity, resolved in a certain direction, lies between ''x'' and ''x'' + ''dx'' is \operatorname \frac\; e^ \, dx


Naming

Today, the concept is usually known in English as the normal distribution or Gaussian distribution. Other less common names include Gauss distribution, Laplace-Gauss distribution, the law of error, the law of facility of errors, Laplace's second law, Gaussian law. Gauss himself apparently coined the term with reference to the "normal equations" involved in its applications, with normal having its technical meaning of orthogonal rather than "usual". However, by the end of the 19th century some authors had started using the name ''normal distribution'', where the word "normal" was used as an adjective – the term now being seen as a reflection of the fact that this distribution was seen as typical, common – and thus "normal". Charles Sanders Peirce, Peirce (one of those authors) once defined "normal" thus: "...the 'normal' is not the average (or any other kind of mean) of what actually occurs, but of what ''would'', in the long run, occur under certain circumstances." Around the turn of the 20th century Karl Pearson, Pearson popularized the term ''normal'' as a designation for this distribution. Also, it was Pearson who first wrote the distribution in terms of the standard deviation ''σ'' as in modern notation. Soon after this, in year 1915, Ronald Fisher, Fisher added the location parameter to the formula for normal distribution, expressing it in the way it is written nowadays: df = \frac e^ \, dx. The term "standard normal", which denotes the normal distribution with zero mean and unit variance came into general use around the 1950s, appearing in the popular textbooks by P. G. Hoel (1947) "''Introduction to mathematical statistics''" and A. M. Mood (1950) "''Introduction to the theory of statistics''".


See also

* Bates distribution – similar to the Irwin–Hall distribution, but rescaled back into the 0 to 1 range * Behrens–Fisher problem – the long-standing problem of testing whether two normal samples with different variances have same means; * Bhattacharyya distance – method used to separate mixtures of normal distributions * Erdős–Kac theorem – on the occurrence of the normal distribution in number theory * Full width at half maximum * Gaussian blur – convolution, which uses the normal distribution as a kernel * Modified half-normal distribution with the pdf on (0, \infty) is given as f(x)= \frac, where \Psi(\alpha,z)=_1\Psi_1\left(\begin\left(\alpha,\frac\right)\\(1,0)\end;z \right) denotes the Fox-Wright Psi function. * Normally distributed and uncorrelated does not imply independent * Ratio normal distribution * Reciprocal normal distribution * Standard normal table * Stein's lemma * Sub-Gaussian distribution * Sum of normally distributed random variables * Tweedie distribution – The normal distribution is a member of the family of Tweedie exponential dispersion models. * Wrapped normal distribution – the Normal distribution applied to a circular domain * Z-test – using the normal distribution


Notes


References


Citations


Sources

* * In particular, the entries fo
"bell-shaped and bell curve"
an

* * * * * * * * * * * * * * * * * * * * * * * * Translated by Stephen M. Stigler in ''Statistical Science'' 1 (3), 1986: . * * * * * * * * * * * * * * * * * * * * * * * * * * * *


External links

*
Normal distribution calculator
{{Authority control Normal distribution, Continuous distributions Conjugate prior distributions Exponential family distributions Stable distributions Location-scale family probability distributions]">X - \mu, ^p\right&= \sigma^p (p-1)!! \cdot \begin \sqrt & \textp\text \\ 1 & \textp\text \end \\ &= \sigma^p \cdot \frac. \end The last formula is valid also for any non-integer p>-1. When the mean \mu \ne 0, the plain and absolute moments can be expressed in terms of
confluent hypergeometric function In mathematics, a confluent hypergeometric function is a solution of a confluent hypergeometric equation, which is a degenerate form of a hypergeometric differential equation where two of the three regular singularities merge into an irregular ...
s _1F_1 and U. :\begin \operatorname\left ^p\right&= \sigma^p\cdot (-i\sqrt 2)^p U\left(-\frac, \frac, -\frac \left( \frac \mu \sigma \right)^2 \right), \\ \operatorname\left[, X, ^p \right] &= \sigma^p \cdot 2^ \frac _1F_1\left( -\frac, \frac, -\frac \left( \frac \mu \sigma \right)^2 \right). \end These expressions remain valid even if p is not an integer. See also Hermite polynomials#"Negative variance", generalized Hermite polynomials. The expectation of X conditioned on the event that X lies in an interval ,b/math> is given by :\operatorname\left \mid a= \mu - \sigma^2\frac where f and F respectively are the density and the cumulative distribution function of X. For b=\infty this is known as the
inverse Mills ratio In probability theory, the Mills ratio (or Mills's ratio) of a continuous random variable X is the function : m(x) := \frac , where f(x) is the probability density function, and :\bar(x) := \Pr x.html" ;"title=">x">>x= \int_x^ f(u)\, du is the ...
. Note that above, density f of X is used instead of standard normal density as in inverse Mills ratio, so here we have \sigma^2 instead of \sigma.


Fourier transform and characteristic function

The
Fourier transform A Fourier transform (FT) is a mathematical transform that decomposes functions into frequency components, which are represented by the output of the transform as a function of frequency. Most commonly functions of time or space are transformed, ...
of a normal density f with mean \mu and standard deviation \sigma is : \hat f(t) = \int_^\infty f(x)e^ \, dx = e^ e^ where i is the
imaginary unit The imaginary unit or unit imaginary number () is a solution to the quadratic equation x^2+1=0. Although there is no real number with this property, can be used to extend the real numbers to what are called complex numbers, using addition an ...
. If the mean \mu=0, the first factor is 1, and the Fourier transform is, apart from a constant factor, a normal density on the
frequency domain In physics, electronics, control systems engineering, and statistics, the frequency domain refers to the analysis of mathematical functions or signals with respect to frequency, rather than time. Put simply, a time-domain graph shows how a signa ...
, with mean 0 and standard deviation 1/\sigma. In particular, the standard normal distribution \varphi is an
eigenfunction In mathematics, an eigenfunction of a linear operator ''D'' defined on some function space is any non-zero function f in that space that, when acted upon by ''D'', is only multiplied by some scaling factor called an eigenvalue. As an equation, th ...
of the Fourier transform. In probability theory, the Fourier transform of the probability distribution of a real-valued random variable X is closely connected to the
characteristic function In mathematics, the term "characteristic function" can refer to any of several distinct concepts: * The indicator function of a subset, that is the function ::\mathbf_A\colon X \to \, :which for a given subset ''A'' of ''X'', has value 1 at points ...
\varphi_X(t) of that variable, which is defined as the
expected value In probability theory, the expected value (also called expectation, expectancy, mathematical expectation, mean, average, or first moment) is a generalization of the weighted average. Informally, the expected value is the arithmetic mean of a l ...
of e^, as a function of the real variable t (the
frequency Frequency is the number of occurrences of a repeating event per unit of time. It is also occasionally referred to as ''temporal frequency'' for clarity, and is distinct from ''angular frequency''. Frequency is measured in hertz (Hz) which is eq ...
parameter of the Fourier transform). This definition can be analytically extended to a complex-value variable t. The relation between both is: :\varphi_X(t) = \hat f(-t)


Moment and cumulant generating functions

The
moment generating function In probability theory and statistics, the moment-generating function of a real-valued random variable is an alternative specification of its probability distribution. Thus, it provides the basis of an alternative route to analytical results compare ...
of a real random variable X is the expected value of e^, as a function of the real parameter t. For a normal distribution with density f, mean \mu and deviation \sigma, the moment generating function exists and is equal to :M(t) = \operatorname ^= \hat f(it) = e^ e^ The
cumulant generating function In probability theory and statistics, the cumulants of a probability distribution are a set of quantities that provide an alternative to the '' moments'' of the distribution. Any two probability distributions whose moments are identical will have ...
is the logarithm of the moment generating function, namely :g(t) = \ln M(t) = \mu t + \tfrac 12 \sigma^2 t^2 Since this is a quadratic polynomial in t, only the first two
cumulant In probability theory and statistics, the cumulants of a probability distribution are a set of quantities that provide an alternative to the '' moments'' of the distribution. Any two probability distributions whose moments are identical will ha ...
s are nonzero, namely the mean \mu and the variance \sigma^2.


Stein operator and class

Within
Stein's method Stein's method is a general method in probability theory to obtain bounds on the distance between two probability distributions with respect to a probability metric. It was introduced by Charles Stein, who first published it in 1972, to obtain ...
the Stein operator and class of a random variable X \sim \mathcal(\mu, \sigma^2) are \mathcalf(x) = \sigma^2 f'(x) - (x-\mu)f(x) and \mathcal the class of all absolutely continuous functions f : \R \to \R \mbox\mathbb[, f'(X), ]< \infty.


Zero-variance limit

In the limit (mathematics), limit when \sigma tends to zero, the probability density f(x) eventually tends to zero at any x\ne \mu, but grows without limit if x = \mu, while its integral remains equal to 1. Therefore, the normal distribution cannot be defined as an ordinary
function Function or functionality may refer to: Computing * Function key, a type of key on computer keyboards * Function model, a structured representation of processes in a system * Function object or functor or functionoid, a concept of object-oriente ...
when \sigma = 0. However, one can define the normal distribution with zero variance as a
generalized function In mathematics, generalized functions are objects extending the notion of functions. There is more than one recognized theory, for example the theory of distributions. Generalized functions are especially useful in making discontinuous functions ...
; specifically, as Dirac's "delta function" \delta translated by the mean \mu, that is f(x)=\delta(x-\mu). Its CDF is then the
Heaviside step function The Heaviside step function, or the unit step function, usually denoted by or (but sometimes , or ), is a step function, named after Oliver Heaviside (1850–1925), the value of which is zero for negative arguments and one for positive argume ...
translated by the mean \mu, namely :F(x) = \begin 0 & \textx < \mu \\ 1 & \textx \geq \mu \end


Maximum entropy

Of all probability distributions over the reals with a specified mean \mu and variance \sigma^2, the normal distribution N(\mu,\sigma^2) is the one with maximum entropy. If X is a
continuous random variable In probability theory and statistics, a probability distribution is the mathematical function that gives the probabilities of occurrence of different possible outcomes for an experiment. It is a mathematical description of a random phenomenon i ...
with
probability density In probability theory, a probability density function (PDF), or density of a continuous random variable, is a function whose value at any given sample (or point) in the sample space (the set of possible values taken by the random variable) can ...
f(x), then the entropy of X is defined as : H(X) = - \int_^\infty f(x)\log f(x)\, dx where f(x)\log f(x) is understood to be zero whenever f(x)=0. This functional can be maximized, subject to the constraints that the distribution is properly normalized and has a specified variance, by using
variational calculus The calculus of variations (or Variational Calculus) is a field of mathematical analysis that uses variations, which are small changes in functions and functionals, to find maxima and minima of functionals: mappings from a set of functions t ...
. A function with two
Lagrange multipliers In mathematical optimization, the method of Lagrange multipliers is a strategy for finding the local maxima and minima of a function subject to equality constraints (i.e., subject to the condition that one or more equations have to be satisfied ex ...
is defined: : L=\int_^\infty f(x)\ln(f(x))\,dx-\lambda_0\left(1-\int_^\infty f(x)\,dx\right)-\lambda\left(\sigma^2-\int_^\infty f(x)(x-\mu)^2\,dx\right) where f(x) is, for now, regarded as some density function with mean \mu and standard deviation \sigma. At maximum entropy, a small variation \delta f(x) about f(x) will produce a variation \delta L about L which is equal to 0: : 0=\delta L=\int_^\infty \delta f(x)\left (\ln(f(x))+1+\lambda_0+\lambda(x-\mu)^2\right )\,dx Since this must hold for any small \delta f(x), the term in brackets must be zero, and solving for f(x) yields: :f(x)=e^ Using the constraint equations to solve for \lambda_0 and \lambda yields the density of the normal distribution: : f(x, \mu, \sigma)=\frace^ The entropy of a normal distribution is equal to : H(X)=\tfrac(1+\log(2\sigma^2\pi))


Other properties


Related distributions


Central limit theorem

The central limit theorem states that under certain (fairly common) conditions, the sum of many random variables will have an approximately normal distribution. More specifically, where X_1,\ldots ,X_n are
independent and identically distributed In probability theory and statistics, a collection of random variables is independent and identically distributed if each random variable has the same probability distribution as the others and all are mutually independent. This property is usua ...
random variables with the same arbitrary distribution, zero mean, and variance \sigma^2 and Z is their mean scaled by \sqrt : Z = \sqrt\left(\frac\sum_^n X_i\right) Then, as n increases, the probability distribution of Z will tend to the normal distribution with zero mean and variance \sigma^2. The theorem can be extended to variables (X_i) that are not independent and/or not identically distributed if certain constraints are placed on the degree of dependence and the moments of the distributions. Many
test statistic A test statistic is a statistic (a quantity derived from the sample) used in statistical hypothesis testing.Berger, R. L.; Casella, G. (2001). ''Statistical Inference'', Duxbury Press, Second Edition (p.374) A hypothesis test is typically specif ...
s, scores, and
estimator In statistics, an estimator is a rule for calculating an estimate of a given quantity based on observed data: thus the rule (the estimator), the quantity of interest (the estimand) and its result (the estimate) are distinguished. For example, the ...
s encountered in practice contain sums of certain random variables in 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 distributions. The central limit theorem also implies that certain distributions can be approximated by the normal distribution, for example: * The
binomial distribution In probability theory and statistics, the binomial distribution with parameters ''n'' and ''p'' is the discrete probability distribution of the number of successes in a sequence of ''n'' independent experiments, each asking a yes–no quest ...
B(n,p) is approximately normal with mean np and variance np(1-p) for large n and for p not too close to 0 or 1. * The
Poisson distribution In probability theory and statistics, the Poisson distribution is a discrete probability distribution that expresses the probability of a given number of events occurring in a fixed interval of time or space if these events occur with a known co ...
with parameter \lambda is approximately normal with mean \lambda and variance \lambda, for large values of \lambda. * The
chi-squared distribution In probability theory and statistics, the chi-squared distribution (also chi-square or \chi^2-distribution) with k degrees of freedom is the distribution of a sum of the squares of k independent standard normal random variables. The chi-squa ...
\chi^2(k) is approximately normal with mean k and variance 2k, for large k. * The
Student's t-distribution In probability and statistics, Student's ''t''-distribution (or simply the ''t''-distribution) is any member of a family of continuous probability distributions that arise when estimating the mean of a normally distributed population in sit ...
t(\nu) is approximately normal with mean 0 and variance 1 when \nu is large. Whether these approximations are sufficiently accurate depends on the purpose for which they are needed, and the rate of convergence to the normal distribution. It is typically the case that such approximations are less accurate in the tails of the distribution. A general upper bound for the approximation error in the central limit theorem is given by the
Berry–Esseen theorem In probability theory, the central limit theorem states that, under certain circumstances, the probability distribution of the scaled mean of a random sample converges to a normal distribution as the sample size increases to infinity. Under strong ...
, improvements of the approximation are given by the
Edgeworth expansion The Gram–Charlier A series (named in honor of Jørgen Pedersen Gram and Carl Charlier), and the Edgeworth series (named in honor of Francis Ysidro Edgeworth) are series that approximate a probability distribution in terms of its cumulants. The se ...
s. This theorem can also be used to justify modeling the sum of many uniform noise sources as
Gaussian noise Gaussian noise, named after Carl Friedrich Gauss, is a term from signal processing theory denoting a kind of signal noise that has a probability density function (pdf) equal to that of the normal distribution (which is also known as the Gaussia ...
. See
AWGN Additive white Gaussian noise (AWGN) is a basic noise model used in information theory to mimic the effect of many random processes that occur in nature. The modifiers denote specific characteristics: * ''Additive'' because it is added to any nois ...
.


Operations and functions of normal variables

The
probability density In probability theory, a probability density function (PDF), or density of a continuous random variable, is a function whose value at any given sample (or point) in the sample space (the set of possible values taken by the random variable) can ...
,
cumulative distribution In statistics, the frequency (or absolute frequency) of an event i is the number n_i of times the observation has occurred/recorded in an experiment or study. These frequencies are often depicted graphically or in tabular form. Types The cumul ...
, and inverse cumulative distribution of any function of one or more independent or correlated normal variables can be computed with the numerical method of ray-tracing
Matlab code
. In the following sections we look at some special cases.


Operations on a single normal variable

If X is distributed normally with mean \mu and variance \sigma^2, then * aX+b, for any real numbers a and b, is also normally distributed, with mean a\mu+b and standard deviation , a, \sigma. That is, the family of normal distributions is closed under linear transformations. * The exponential of X is distributed log-normally: . * The absolute value of X has
folded normal distribution The folded normal distribution is a probability distribution related to the normal distribution. Given a normally distributed random variable ''X'' with mean ''μ'' and variance ''σ''2, the random variable ''Y'' = , ''X'', has a folded normal d ...
: . If \mu = 0 this is known as the
half-normal distribution In probability theory and statistics, the half-normal distribution is a special case of the folded normal distribution. Let X follow an ordinary normal distribution, N(0,\sigma^2). Then, Y=, X, follows a half-normal distribution. Thus, the hal ...
. * The absolute value of normalized residuals, , ''X'' − ''μ'', /''σ'', has
chi distribution In probability theory and statistics, the chi distribution is a continuous probability distribution. It is the distribution of the positive square root of the sum of squares of a set of independent random variables each following a standard norm ...
with one degree of freedom: , X - \mu, / \sigma \sim \chi_1. * The square of ''X''/''σ'' has the
noncentral chi-squared distribution In probability theory and statistics, the noncentral chi-squared distribution (or noncentral chi-square distribution, noncentral \chi^2 distribution) is a noncentral generalization of the chi-squared distribution. It often arises in the power a ...
with one degree of freedom: X^2 / \sigma^2 \sim \chi_1^2(\mu^2 / \sigma^2). If \mu = 0, the distribution is called simply chi-squared. * The log likelihood of a normal variable x is simply the log of its
probability density function In probability theory, a probability density function (PDF), or density of a continuous random variable, is a function whose value at any given sample (or point) in the sample space (the set of possible values taken by the random variable) can ...
: \ln p(x)= -\frac \left(\frac \right)^2 -\ln \left(\sigma \sqrt \right) = -\frac z^2 -\ln \left(\sigma \sqrt \right). Since this is a scaled and shifted square of a standard normal variable, it is distributed as a scaled and shifted chi-squared variable. * The distribution of the variable ''X'' restricted to an interval 'a'', ''b''is called the
truncated normal distribution In probability and statistics, the truncated normal distribution is the probability distribution derived from that of a normally distributed random variable by bounding the random variable from either below or above (or both). The truncated no ...
. * (''X'' − ''μ'')−2 has a
Lévy distribution In probability theory and statistics, the Lévy distribution, named after Paul Lévy, is a continuous probability distribution for a non-negative random variable. In spectroscopy, this distribution, with frequency as the dependent variable, is kn ...
with location 0 and scale ''σ''−2.


= Operations on two independent normal variables

= * If X_1 and X_2 are two
independent Independent or Independents may refer to: Arts, entertainment, and media Artist groups * Independents (artist group), a group of modernist painters based in the New Hope, Pennsylvania, area of the United States during the early 1930s * Independ ...
normal random variables, with means \mu_1, \mu_2 and standard deviations \sigma_1, \sigma_2, then their sum X_1 + X_2 will also be normally distributed, roof/sup> with mean \mu_1 + \mu_2 and variance \sigma_1^2 + \sigma_2^2. * In particular, if X and Y are independent normal deviates with zero mean and variance \sigma^2, then X + Y and X - Y are also independent and normally distributed, with zero mean and variance 2\sigma^2. This is a special case of the
polarization identity In linear algebra, a branch of mathematics, the polarization identity is any one of a family of formulas that express the inner product of two vectors in terms of the norm of a normed vector space. If a norm arises from an inner product then t ...
. * If X_1, X_2 are two independent normal deviates with mean \mu and deviation \sigma, and a, b are arbitrary real numbers, then the variable X_3 = \frac + \mu is also normally distributed with mean \mu and deviation \sigma. It follows that the normal distribution is
stable A stable is a building in which livestock, especially horses, are kept. It most commonly means a building that is divided into separate stalls for individual animals and livestock. There are many different types of stables in use today; the ...
(with exponent \alpha=2).


= Operations on two independent standard normal variables

= If X_1 and X_2 are two independent standard normal random variables with mean 0 and variance 1, then * Their sum and difference is distributed normally with mean zero and variance two: X_1 \pm X_2 \sim N(0, 2). * Their product Z = X_1 X_2 follows the
product distribution A product distribution is a probability distribution constructed as the distribution of the product of random variables having two other known distributions. Given two statistically independent random variables ''X'' and ''Y'', the distribution of ...
with density function f_Z(z) = \pi^ K_0(, z, ) where K_0 is the
modified Bessel function of the second kind Bessel functions, first defined by the mathematician Daniel Bernoulli and then generalized by Friedrich Bessel, are canonical solutions of Bessel's differential equation x^2 \frac + x \frac + \left(x^2 - \alpha^2 \right)y = 0 for an arbitrary ...
. This distribution is symmetric around zero, unbounded at z = 0, and has the
characteristic function In mathematics, the term "characteristic function" can refer to any of several distinct concepts: * The indicator function of a subset, that is the function ::\mathbf_A\colon X \to \, :which for a given subset ''A'' of ''X'', has value 1 at points ...
\phi_Z(t) = (1 + t^2)^. * Their ratio follows the standard
Cauchy distribution The Cauchy distribution, named after Augustin Cauchy, is a continuous probability distribution. It is also known, especially among physicists, as the Lorentz distribution (after Hendrik Lorentz), Cauchy–Lorentz distribution, Lorentz(ian) fun ...
: X_1/ X_2 \sim \operatorname(0, 1). * Their Euclidean norm \sqrt has the
Rayleigh distribution In probability theory and statistics, the Rayleigh distribution is a continuous probability distribution for nonnegative-valued random variables. Up to rescaling, it coincides with the chi distribution with two degrees of freedom. The distribut ...
.


Operations on multiple independent normal variables

* Any linear combination of independent normal deviates is a normal deviate. * If X_1, X_2, \ldots, X_n are independent standard normal random variables, then the sum of their squares has the
chi-squared distribution In probability theory and statistics, the chi-squared distribution (also chi-square or \chi^2-distribution) with k degrees of freedom is the distribution of a sum of the squares of k independent standard normal random variables. The chi-squa ...
with n degrees of freedom X_1^2 + \cdots + X_n^2 \sim \chi_n^2. * If X_1, X_2, \ldots, X_n are independent normally distributed random variables with means \mu and variances \sigma^2, then their
sample mean The sample mean (or "empirical mean") and the sample covariance are statistics computed from a Sample (statistics), sample of data on one or more random variables. The sample mean is the average value (or mean, mean value) of a sample (statistic ...
is independent from the sample
standard deviation In statistics, the standard deviation is a measure of the amount of variation or dispersion of a set of values. A low standard deviation indicates that the values tend to be close to the mean (also called the expected value) of the set, while ...
, which can be demonstrated using Basu's theorem or
Cochran's theorem In statistics, Cochran's theorem, devised by William G. Cochran, is a theorem used to justify results relating to the probability distributions of statistics that are used in the analysis of variance. Statement Let ''U''1, ..., ''U'N'' be i.i. ...
. The ratio of these two quantities will have the
Student's t-distribution In probability and statistics, Student's ''t''-distribution (or simply the ''t''-distribution) is any member of a family of continuous probability distributions that arise when estimating the mean of a normally distributed population in sit ...
with n-1 degrees of freedom: t = \frac = \frac \sim t_. * If X_1, X_2, \ldots, X_n, Y_1, Y_2, \ldots, Y_m are independent standard normal random variables, then the ratio of their normalized sums of squares will have the with degrees of freedom: F = \frac \sim F_.


Operations on multiple correlated normal variables

* A
quadratic form In mathematics, a quadratic form is a polynomial with terms all of degree two ("form" is another name for a homogeneous polynomial). For example, :4x^2 + 2xy - 3y^2 is a quadratic form in the variables and . The coefficients usually belong to a ...
of a normal vector, i.e. a quadratic function q = \sum x_i^2 + \sum x_j + c of multiple independent or correlated normal variables, is a generalized chi-square variable.


Operations on the density function

The split normal distribution is most directly defined in terms of joining scaled sections of the density functions of different normal distributions and rescaling the density to integrate to one. The
truncated normal distribution In probability and statistics, the truncated normal distribution is the probability distribution derived from that of a normally distributed random variable by bounding the random variable from either below or above (or both). The truncated no ...
results from rescaling a section of a single density function.


Infinite divisibility and Cramér's theorem

For any positive integer \text, any normal distribution with mean \mu and variance \sigma^2 is the distribution of the sum of \text independent normal deviates, each with mean \frac and variance \frac. This property is called
infinite divisibility Infinite divisibility arises in different ways in philosophy, physics, economics, order theory (a branch of mathematics), and probability theory (also a branch of mathematics). One may speak of infinite divisibility, or the lack thereof, of matter ...
. Conversely, if X_1 and X_2 are independent random variables and their sum X_1+X_2 has a normal distribution, then both X_1 and X_2 must be normal deviates. This result is known as Cramér's decomposition theorem, and is equivalent to saying that the convolution of two distributions is normal if and only if both are normal. Cramér's theorem implies that a linear combination of independent non-Gaussian variables will never have an exactly normal distribution, although it may approach it arbitrarily closely.


Bernstein's theorem

Bernstein's theorem states that if X and Y are independent and X + Y and X - Y are also independent, then both ''X'' and ''Y'' must necessarily have normal distributions. More generally, if X_1, \ldots, X_n are independent random variables, then two distinct linear combinations \sum and \sumwill be independent if and only if all X_k are normal and \sum, where \sigma_k^2 denotes the variance of X_k.


Extensions

The notion of normal distribution, being one of the most important distributions in probability theory, has been extended far beyond the standard framework of the univariate (that is one-dimensional) case (Case 1). All these extensions are also called ''normal'' or ''Gaussian'' laws, so a certain ambiguity in names exists. * The
multivariate normal distribution In probability theory and statistics, the multivariate normal distribution, multivariate Gaussian distribution, or joint normal distribution is a generalization of the one-dimensional (univariate) normal distribution to higher dimensions. One d ...
describes the Gaussian law in the ''k''-dimensional Euclidean space. A vector is multivariate-normally distributed if any linear combination of its components has a (univariate) normal distribution. The variance of ''X'' is a ''k×k'' symmetric positive-definite matrix ''V''. The multivariate normal distribution is a special case of the
elliptical distribution In probability and statistics, an elliptical distribution is any member of a broad family of probability distributions that generalize the multivariate normal distribution. Intuitively, in the simplified two and three dimensional case, the joint di ...
s. As such, its iso-density loci in the ''k'' = 2 case are ellipses and in the case of arbitrary ''k'' are ellipsoids. * Rectified Gaussian distribution a rectified version of normal distribution with all the negative elements reset to 0 * Complex normal distribution deals with the complex normal vectors. A complex vector is said to be normal if both its real and imaginary components jointly possess a 2''k''-dimensional multivariate normal distribution. The variance-covariance structure of ''X'' is described by two matrices: the ''variance'' matrix Γ, and the ''relation'' matrix ''C''. * Matrix normal distribution describes the case of normally distributed matrices. * Gaussian processes are the normally distributed stochastic processes. These can be viewed as elements of some infinite-dimensional Hilbert space ''H'', and thus are the analogues of multivariate normal vectors for the case . A random element is said to be normal if for any constant the scalar product has a (univariate) normal distribution. The variance structure of such Gaussian random element can be described in terms of the linear ''covariance ''. Several Gaussian processes became popular enough to have their own names: ** Wiener process, Brownian motion, ** Brownian bridge, ** Ornstein–Uhlenbeck process. * Gaussian q-distribution is an abstract mathematical construction that represents a "q-analogue" of the normal distribution. * the q-Gaussian is an analogue of the Gaussian distribution, in the sense that it maximises the Tsallis entropy, and is one type of Tsallis distribution. Note that this distribution is different from the Gaussian q-distribution above. * The Kaniadakis Gaussian distribution, Kaniadakis ''κ''-Gaussian distribution is a generalization of the Gaussian distribution which arises from the Kaniadakis statistics, being one of the Kaniadakis distribution, Kaniadakis distributions. A random variable ''X'' has a two-piece normal distribution if it has a distribution : f_X( x ) = N( \mu, \sigma_1^2 ) \text x \le \mu : f_X( x ) = N( \mu, \sigma_2^2 ) \text x \ge \mu where ''μ'' is the mean and ''σ''1 and ''σ''2 are the standard deviations of the distribution to the left and right of the mean respectively. The mean, variance and third central moment of this distribution have been determined : \operatorname( X ) = \mu + \sqrt ( \sigma_2 - \sigma_1 ) : \operatorname( X ) = \left( 1 - \frac 2 \pi\right)( \sigma_2 - \sigma_1 )^2 + \sigma_1 \sigma_2 : \operatorname( X ) = \sqrt( \sigma_2 - \sigma_1 ) \left[ \left( \frac 4 \pi - 1 \right) ( \sigma_2 - \sigma_1)^2 + \sigma_1 \sigma_2 \right] where E(''X''), V(''X'') and T(''X'') are the mean, variance, and third central moment respectively. One of the main practical uses of the Gaussian law is to model the empirical distributions of many different random variables encountered in practice. In such case a possible extension would be a richer family of distributions, having more than two parameters and therefore being able to fit the empirical distribution more accurately. The examples of such extensions are: * Pearson distribution — a four-parameter family of probability distributions that extend the normal law to include different skewness and kurtosis values. * The generalized normal distribution, also known as the exponential power distribution, allows for distribution tails with thicker or thinner asymptotic behaviors.


Statistical inference


Estimation of parameters

It is often the case that we do not know the parameters of the normal distribution, but instead want to Estimation theory, estimate them. That is, having a sample (x_1, \ldots, x_n) from a normal N(\mu, \sigma^2) population we would like to learn the approximate values of parameters \mu and \sigma^2. The standard approach to this problem is the maximum likelihood method, which requires maximization of the ''log-likelihood function'': : \ln\mathcal(\mu,\sigma^2) = \sum_^n \ln f(x_i\mid\mu,\sigma^2) = -\frac\ln(2\pi) - \frac\ln\sigma^2 - \frac\sum_^n (x_i-\mu)^2. Taking derivatives with respect to \mu and \sigma^2 and solving the resulting system of first order conditions yields the ''maximum likelihood estimates'': : \hat = \overline \equiv \frac\sum_^n x_i, \qquad \hat^2 = \frac \sum_^n (x_i - \overline)^2.


Sample mean

Estimator \textstyle\hat\mu is called the ''
sample mean The sample mean (or "empirical mean") and the sample covariance are statistics computed from a Sample (statistics), sample of data on one or more random variables. The sample mean is the average value (or mean, mean value) of a sample (statistic ...
'', since it is the arithmetic mean of all observations. The statistic \textstyle\overline is complete statistic, complete and sufficient statistic, sufficient for \mu, and therefore by the Lehmann–Scheffé theorem, \textstyle\hat\mu is the uniformly minimum variance unbiased (UMVU) estimator. In finite samples it is distributed normally: : \hat\mu \sim \mathcal(\mu,\sigma^2/n). The variance of this estimator is equal to the ''μμ''-element of the inverse Fisher information matrix \textstyle\mathcal^. This implies that the estimator is efficient estimator, finite-sample efficient. Of practical importance is the fact that the standard error (statistics), standard error of \textstyle\hat\mu is proportional to \textstyle1/\sqrt, that is, if one wishes to decrease the standard error by a factor of 10, one must increase the number of points in the sample by a factor of 100. This fact is widely used in determining sample sizes for opinion polls and the number of trials in Monte Carlo simulations. From the standpoint of the asymptotic theory (statistics), asymptotic theory, \textstyle\hat\mu is consistent estimator, consistent, that is, it convergence in probability, converges in probability to \mu as n\rightarrow\infty. The estimator is also asymptotic normality, asymptotically normal, which is a simple corollary of the fact that it is normal in finite samples: : \sqrt(\hat\mu-\mu) \,\xrightarrow\, \mathcal(0,\sigma^2).


Sample variance

The estimator \textstyle\hat\sigma^2 is called the ''sample variance'', since it is the variance of the sample ((x_1, \ldots, x_n)). In practice, another estimator is often used instead of the \textstyle\hat\sigma^2. This other estimator is denoted s^2, and is also called the ''sample variance'', which represents a certain ambiguity in terminology; its square root s is called the ''sample standard deviation''. The estimator s^2 differs from \textstyle\hat\sigma^2 by having instead of ''n'' in the denominator (the so-called Bessel's correction): : s^2 = \frac \hat\sigma^2 = \frac \sum_^n (x_i - \overline)^2. The difference between s^2 and \textstyle\hat\sigma^2 becomes negligibly small for large ''n''s. In finite samples however, the motivation behind the use of s^2 is that it is an unbiased estimator of the underlying parameter \sigma^2, whereas \textstyle\hat\sigma^2 is biased. Also, by the Lehmann–Scheffé theorem the estimator s^2 is uniformly minimum variance unbiased (Minimum-variance unbiased estimator, UMVU), which makes it the "best" estimator among all unbiased ones. However it can be shown that the biased estimator \textstyle\hat\sigma^2 is "better" than the s^2 in terms of the mean squared error (MSE) criterion. In finite samples both s^2 and \textstyle\hat\sigma^2 have scaled
chi-squared distribution In probability theory and statistics, the chi-squared distribution (also chi-square or \chi^2-distribution) with k degrees of freedom is the distribution of a sum of the squares of k independent standard normal random variables. The chi-squa ...
with degrees of freedom: : s^2 \sim \frac \cdot \chi^2_, \qquad \hat\sigma^2 \sim \frac \cdot \chi^2_. The first of these expressions shows that the variance of s^2 is equal to 2\sigma^4/(n-1), which is slightly greater than the ''σσ''-element of the inverse Fisher information matrix \textstyle\mathcal^. Thus, s^2 is not an efficient estimator for \sigma^2, and moreover, since s^2 is UMVU, we can conclude that the finite-sample efficient estimator for \sigma^2 does not exist. Applying the asymptotic theory, both estimators s^2 and \textstyle\hat\sigma^2 are consistent, that is they converge in probability to \sigma^2 as the sample size n\rightarrow\infty. The two estimators are also both asymptotically normal: : \sqrt(\hat\sigma^2 - \sigma^2) \simeq \sqrt(s^2-\sigma^2) \,\xrightarrow\, \mathcal(0,2\sigma^4). In particular, both estimators are asymptotically efficient for \sigma^2.


Confidence intervals

By
Cochran's theorem In statistics, Cochran's theorem, devised by William G. Cochran, is a theorem used to justify results relating to the probability distributions of statistics that are used in the analysis of variance. Statement Let ''U''1, ..., ''U'N'' be i.i. ...
, for normal distributions the sample mean \textstyle\hat\mu and the sample variance ''s''2 are
independent Independent or Independents may refer to: Arts, entertainment, and media Artist groups * Independents (artist group), a group of modernist painters based in the New Hope, Pennsylvania, area of the United States during the early 1930s * Independ ...
, which means there can be no gain in considering their joint distribution. There is also a converse theorem: if in a sample the sample mean and sample variance are independent, then the sample must have come from the normal distribution. The independence between \textstyle\hat\mu and ''s'' can be employed to construct the so-called ''t-statistic'': : t = \frac = \frac \sim t_ This quantity ''t'' has the
Student's t-distribution In probability and statistics, Student's ''t''-distribution (or simply the ''t''-distribution) is any member of a family of continuous probability distributions that arise when estimating the mean of a normally distributed population in sit ...
with degrees of freedom, and it is an ancillary statistic (independent of the value of the parameters). Inverting the distribution of this ''t''-statistics will allow us to construct the
confidence interval In frequentist statistics, a confidence interval (CI) is a range of estimates for an unknown parameter. A confidence interval is computed at a designated ''confidence level''; the 95% confidence level is most common, but other levels, such as 9 ...
for ''μ''; similarly, inverting the ''χ''2 distribution of the statistic ''s''2 will give us the confidence interval for ''σ''2: :\mu \in \left[ \hat\mu - t_ \fracs, \hat\mu + t_ \fracs \right], :\sigma^2 \in \left[ \frac, \frac \right], where ''tk,p'' and are the ''p''th
quantile In statistics and probability, quantiles are cut points dividing the range of a probability distribution into continuous intervals with equal probabilities, or dividing the observations in a sample in the same way. There is one fewer quantile tha ...
s of the ''t''- and ''χ''2-distributions respectively. These confidence intervals are of the ''confidence level'' , meaning that the true values ''μ'' and ''σ''2 fall outside of these intervals with probability (or significance level) ''α''. In practice people usually take , resulting in the 95% confidence intervals. Approximate formulas can be derived from the asymptotic distributions of \textstyle\hat\mu and ''s''2: :\mu \in \left[ \hat\mu - , z_, \fracs, \hat\mu + , z_, \fracs \right], :\sigma^2 \in \left[ s^2 - , z_, \fracs^2, s^2 + , z_, \fracs^2 \right], The approximate formulas become valid for large values of ''n'', and are more convenient for the manual calculation since the standard normal quantiles ''z''''α''/2 do not depend on ''n''. In particular, the most popular value of , results in .


Normality tests

Normality tests assess the likelihood that the given data set comes from a normal distribution. Typically the null hypothesis ''H''0 is that the observations are distributed normally with unspecified mean ''μ'' and variance ''σ''2, versus the alternative ''Ha'' that the distribution is arbitrary. Many tests (over 40) have been devised for this problem. The more prominent of them are outlined below: Diagnostic plots are more intuitively appealing but subjective at the same time, as they rely on informal human judgement to accept or reject the null hypothesis. *
Q–Q plot In statistics, a Q–Q plot (quantile-quantile plot) is a probability plot, a List of graphical methods, graphical method for comparing two probability distributions by plotting their ''quantiles'' against each other. A point on the plot co ...
, also known as normal probability plot or rankit plot—is a plot of the sorted values from the data set against the expected values of the corresponding quantiles from the standard normal distribution. That is, it's a plot of point of the form (Φ−1(''pk''), ''x''(''k'')), where plotting points ''pk'' are equal to ''pk'' = (''k'' − ''α'')/(''n'' + 1 − 2''α'') and ''α'' is an adjustment constant, which can be anything between 0 and 1. If the null hypothesis is true, the plotted points should approximately lie on a straight line. * P–P plot – similar to the Q–Q plot, but used much less frequently. This method consists of plotting the points (Φ(''z''(''k'')), ''pk''), where \textstyle z_ = (x_-\hat\mu)/\hat\sigma. For normally distributed data this plot should lie on a 45° line between (0, 0) and (1, 1). Goodness-of-fit tests: ''Moment-based tests'': * D'Agostino's K-squared test * Jarque–Bera test * Shapiro–Wilk test: This is based on the fact that the line in the Q–Q plot has the slope of ''σ''. The test compares the least squares estimate of that slope with the value of the sample variance, and rejects the null hypothesis if these two quantities differ significantly. ''Tests based on the empirical distribution function'': * Anderson–Darling test * Lilliefors test (an adaptation of the Kolmogorov–Smirnov test)


Bayesian analysis of the normal distribution

Bayesian analysis of normally distributed data is complicated by the many different possibilities that may be considered: * Either the mean, or the variance, or neither, may be considered a fixed quantity. * When the variance is unknown, analysis may be done directly in terms of the variance, or in terms of the
precision Precision, precise or precisely may refer to: Science, and technology, and mathematics Mathematics and computing (general) * Accuracy and precision, measurement deviation from true value and its scatter * Significant figures, the number of digit ...
, the reciprocal of the variance. The reason for expressing the formulas in terms of precision is that the analysis of most cases is simplified. * Both univariate and multivariate normal distribution, multivariate cases need to be considered. * Either conjugate prior, conjugate or improper prior, improper prior distributions may be placed on the unknown variables. * An additional set of cases occurs in Bayesian linear regression, where in the basic model the data is assumed to be normally distributed, and normal priors are placed on the regression coefficients. The resulting analysis is similar to the basic cases of independent identically distributed data. The formulas for the non-linear-regression cases are summarized in the conjugate prior article.


Sum of two quadratics


= Scalar form

= The following auxiliary formula is useful for simplifying the posterior distribution, posterior update equations, which otherwise become fairly tedious. :a(x-y)^2 + b(x-z)^2 = (a + b)\left(x - \frac\right)^2 + \frac(y-z)^2 This equation rewrites the sum of two quadratics in ''x'' by expanding the squares, grouping the terms in ''x'', and completing the square. Note the following about the complex constant factors attached to some of the terms: # The factor \frac has the form of a weighted average of ''y'' and ''z''. # \frac = \frac = (a^ + b^)^. This shows that this factor can be thought of as resulting from a situation where the Multiplicative inverse, reciprocals of quantities ''a'' and ''b'' add directly, so to combine ''a'' and ''b'' themselves, it's necessary to reciprocate, add, and reciprocate the result again to get back into the original units. This is exactly the sort of operation performed by the harmonic mean, so it is not surprising that \frac is one-half the harmonic mean of ''a'' and ''b''.


= Vector form

= A similar formula can be written for the sum of two vector quadratics: If x, y, z are vectors of length ''k'', and A and B are symmetric matrix, symmetric, invertible matrices of size k\times k, then : \begin & (\mathbf-\mathbf)'\mathbf(\mathbf-\mathbf) + (\mathbf-\mathbf)' \mathbf(\mathbf-\mathbf) \\ = & (\mathbf - \mathbf)'(\mathbf+\mathbf)(\mathbf - \mathbf) + (\mathbf - \mathbf)'(\mathbf^ + \mathbf^)^(\mathbf - \mathbf) \end where :\mathbf = (\mathbf + \mathbf)^(\mathbf\mathbf + \mathbf \mathbf) Note that the form x′ A x is called a
quadratic form In mathematics, a quadratic form is a polynomial with terms all of degree two ("form" is another name for a homogeneous polynomial). For example, :4x^2 + 2xy - 3y^2 is a quadratic form in the variables and . The coefficients usually belong to a ...
and is a scalar (mathematics), scalar: :\mathbf'\mathbf\mathbf = \sum_a_ x_i x_j In other words, it sums up all possible combinations of products of pairs of elements from x, with a separate coefficient for each. In addition, since x_i x_j = x_j x_i, only the sum a_ + a_ matters for any off-diagonal elements of A, and there is no loss of generality in assuming that A is symmetric matrix, symmetric. Furthermore, if A is symmetric, then the form \mathbf'\mathbf\mathbf = \mathbf'\mathbf\mathbf.


Sum of differences from the mean

Another useful formula is as follows: \sum_^n (x_i-\mu)^2 = \sum_^n (x_i-\bar)^2 + n(\bar -\mu)^2 where \bar = \frac \sum_^n x_i.


With known variance

For a set of i.i.d. normally distributed data points X of size ''n'' where each individual point ''x'' follows x \sim \mathcal(\mu, \sigma^2) with known
variance In probability theory and statistics, variance is the expectation of the squared deviation of a random variable from its population mean or sample mean. Variance is a measure of dispersion, meaning it is a measure of how far a set of numbers ...
σ2, the conjugate prior distribution is also normally distributed. This can be shown more easily by rewriting the variance as the
precision Precision, precise or precisely may refer to: Science, and technology, and mathematics Mathematics and computing (general) * Accuracy and precision, measurement deviation from true value and its scatter * Significant figures, the number of digit ...
, i.e. using τ = 1/σ2. Then if x \sim \mathcal(\mu, 1/\tau) and \mu \sim \mathcal(\mu_0, 1/\tau_0), we proceed as follows. First, the likelihood function is (using the formula above for the sum of differences from the mean): :\begin p(\mathbf\mid\mu,\tau) &= \prod_^n \sqrt \exp\left(-\frac\tau(x_i-\mu)^2\right) \\ &= \left(\frac\right)^ \exp\left(-\frac\tau \sum_^n (x_i-\mu)^2\right) \\ &= \left(\frac\right)^ \exp\left[-\frac\tau \left(\sum_^n(x_i-\bar)^2 + n(\bar -\mu)^2\right)\right]. \end Then, we proceed as follows: :\begin p(\mu\mid\mathbf) &\propto p(\mathbf\mid\mu) p(\mu) \\ & = \left(\frac\right)^ \exp\left[-\frac\tau \left(\sum_^n(x_i-\bar)^2 + n(\bar -\mu)^2\right)\right] \sqrt \exp\left(-\frac\tau_0(\mu-\mu_0)^2\right) \\ &\propto \exp\left(-\frac\left(\tau\left(\sum_^n(x_i-\bar)^2 + n(\bar -\mu)^2\right) + \tau_0(\mu-\mu_0)^2\right)\right) \\ &\propto \exp\left(-\frac \left(n\tau(\bar-\mu)^2 + \tau_0(\mu-\mu_0)^2 \right)\right) \\ &= \exp\left(-\frac(n\tau + \tau_0)\left(\mu - \dfrac\right)^2 + \frac(\bar - \mu_0)^2\right) \\ &\propto \exp\left(-\frac(n\tau + \tau_0)\left(\mu - \dfrac\right)^2\right) \end In the above derivation, we used the formula above for the sum of two quadratics and eliminated all constant factors not involving ''μ''. The result is the kernel (statistics), kernel of a normal distribution, with mean \frac and precision n\tau + \tau_0, i.e. :p(\mu\mid\mathbf) \sim \mathcal\left(\frac, \frac\right) This can be written as a set of Bayesian update equations for the posterior parameters in terms of the prior parameters: :\begin \tau_0' &= \tau_0 + n\tau \\[5pt] \mu_0' &= \frac \\[5pt] \bar &= \frac\sum_^n x_i \end That is, to combine ''n'' data points with total precision of ''nτ'' (or equivalently, total variance of ''n''/''σ''2) and mean of values \bar, derive a new total precision simply by adding the total precision of the data to the prior total precision, and form a new mean through a ''precision-weighted average'', i.e. a weighted average of the data mean and the prior mean, each weighted by the associated total precision. This makes logical sense if the precision is thought of as indicating the certainty of the observations: In the distribution of the posterior mean, each of the input components is weighted by its certainty, and the certainty of this distribution is the sum of the individual certainties. (For the intuition of this, compare the expression "the whole is (or is not) greater than the sum of its parts". In addition, consider that the knowledge of the posterior comes from a combination of the knowledge of the prior and likelihood, so it makes sense that we are more certain of it than of either of its components.) The above formula reveals why it is more convenient to do Bayesian analysis of conjugate priors for the normal distribution in terms of the precision. The posterior precision is simply the sum of the prior and likelihood precisions, and the posterior mean is computed through a precision-weighted average, as described above. The same formulas can be written in terms of variance by reciprocating all the precisions, yielding the more ugly formulas :\begin ' &= \frac \\[5pt] \mu_0' &= \frac \\[5pt] \bar &= \frac\sum_^n x_i \end


With known mean

For a set of i.i.d. normally distributed data points X of size ''n'' where each individual point ''x'' follows x \sim \mathcal(\mu, \sigma^2) with known mean μ, the conjugate prior of the
variance In probability theory and statistics, variance is the expectation of the squared deviation of a random variable from its population mean or sample mean. Variance is a measure of dispersion, meaning it is a measure of how far a set of numbers ...
has an inverse gamma distribution or a scaled inverse chi-squared distribution. The two are equivalent 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. The prior for σ2 is as follows: :p(\sigma^2\mid\nu_0,\sigma_0^2) = \frac~\frac \propto \frac The likelihood function from above, written in terms of the variance, is: :\begin p(\mathbf\mid\mu,\sigma^2) &= \left(\frac\right)^ \exp\left[-\frac \sum_^n (x_i-\mu)^2\right] \\ &= \left(\frac\right)^ \exp\left[-\frac\right] \end where :S = \sum_^n (x_i-\mu)^2. Then: :\begin p(\sigma^2\mid\mathbf) &\propto p(\mathbf\mid\sigma^2) p(\sigma^2) \\ &= \left(\frac\right)^ \exp\left[-\frac\right] \frac~\frac \\ &\propto \left(\frac\right)^ \frac \exp\left[-\frac + \frac\right] \\ &= \frac \exp\left[-\frac\right] \end The above is also a scaled inverse chi-squared distribution where :\begin \nu_0' &= \nu_0 + n \\ \nu_0'' &= \nu_0 \sigma_0^2 + \sum_^n (x_i-\mu)^2 \end or equivalently :\begin \nu_0' &= \nu_0 + n \\ ' &= \frac \end Reparameterizing in terms of an inverse gamma distribution, the result is: :\begin \alpha' &= \alpha + \frac \\ \beta' &= \beta + \frac \end


With unknown mean and unknown variance

For a set of i.i.d. normally distributed data points X of size ''n'' where each individual point ''x'' follows x \sim \mathcal(\mu, \sigma^2) with unknown mean μ and unknown
variance In probability theory and statistics, variance is the expectation of the squared deviation of a random variable from its population mean or sample mean. Variance is a measure of dispersion, meaning it is a measure of how far a set of numbers ...
σ2, a combined (multivariate) conjugate prior is placed over the mean and variance, consisting of a normal-inverse-gamma distribution. Logically, this originates as follows: # From the analysis of the case with unknown mean but known variance, we see that the update equations involve sufficient statistics computed from the data consisting of the mean of the data points and the total variance of the data points, computed in turn from the known variance divided by the number of data points. # From the analysis of the case with unknown variance but known mean, we see that the update equations involve sufficient statistics over the data consisting of the number of data points and sum of squared deviations. # Keep in mind that the posterior update values serve as the prior distribution when further data is handled. Thus, we should logically think of our priors in terms of the sufficient statistics just described, with the same semantics kept in mind as much as possible. # To handle the case where both mean and variance are unknown, we could place independent priors over the mean and variance, with fixed estimates of the average mean, total variance, number of data points used to compute the variance prior, and sum of squared deviations. Note however that in reality, the total variance of the mean depends on the unknown variance, and the sum of squared deviations that goes into the variance prior (appears to) depend on the unknown mean. In practice, the latter dependence is relatively unimportant: Shifting the actual mean shifts the generated points by an equal amount, and on average the squared deviations will remain the same. This is not the case, however, with the total variance of the mean: As the unknown variance increases, the total variance of the mean will increase proportionately, and we would like to capture this dependence. # This suggests that we create a ''conditional prior'' of the mean on the unknown variance, with a hyperparameter specifying the mean of the pseudo-observations associated with the prior, and another parameter specifying the number of pseudo-observations. This number serves as a scaling parameter on the variance, making it possible to control the overall variance of the mean relative to the actual variance parameter. The prior for the variance also has two hyperparameters, one specifying the sum of squared deviations of the pseudo-observations associated with the prior, and another specifying once again the number of pseudo-observations. Note that each of the priors has a hyperparameter specifying the number of pseudo-observations, and in each case this controls the relative variance of that prior. These are given as two separate hyperparameters so that the variance (aka the confidence) of the two priors can be controlled separately. # This leads immediately to the normal-inverse-gamma distribution, which is the product of the two distributions just defined, with conjugate priors used (an inverse gamma distribution over the variance, and a normal distribution over the mean, ''conditional'' on the variance) and with the same four parameters just defined. The priors are normally defined as follows: :\begin p(\mu\mid\sigma^2; \mu_0, n_0) &\sim \mathcal(\mu_0,\sigma^2/n_0) \\ p(\sigma^2; \nu_0,\sigma_0^2) &\sim I\chi^2(\nu_0,\sigma_0^2) = IG(\nu_0/2, \nu_0\sigma_0^2/2) \end The update equations can be derived, and look as follows: :\begin \bar &= \frac 1 n \sum_^n x_i \\ \mu_0' &= \frac \\ n_0' &= n_0 + n \\ \nu_0' &= \nu_0 + n \\ \nu_0'' &= \nu_0 \sigma_0^2 + \sum_^n (x_i-\bar)^2 + \frac(\mu_0 - \bar)^2 \end The respective numbers of pseudo-observations add the number of actual observations to them. The new mean hyperparameter is once again a weighted average, this time weighted by the relative numbers of observations. Finally, the update for \nu_0'' is similar to the case with known mean, but in this case the sum of squared deviations is taken with respect to the observed data mean rather than the true mean, and as a result a new "interaction term" needs to be added to take care of the additional error source stemming from the deviation between prior and data mean.


Occurrence and applications

The occurrence of normal distribution in practical problems can be loosely classified into four categories: # Exactly normal distributions; # Approximately normal laws, for example when such approximation is justified by the
central limit theorem In probability theory, the central limit theorem (CLT) establishes that, in many situations, when independent random variables are summed up, their properly normalized sum tends toward a normal distribution even if the original variables themselv ...
; and # Distributions modeled as normal – the normal distribution being the distribution with Principle of maximum entropy, maximum entropy for a given mean and variance. # Regression problems – the normal distribution being found after systematic effects have been modeled sufficiently well.


Exact normality

Certain quantities in physics are distributed normally, as was first demonstrated by James Clerk Maxwell. Examples of such quantities are: * Probability density function of a ground state in a quantum harmonic oscillator. * The position of a particle that experiences diffusion. If initially the particle is located at a specific point (that is its probability distribution is the Dirac delta function), then after time ''t'' its location is described by a normal distribution with variance ''t'', which satisfies the diffusion equation \frac f(x,t) = \frac \frac f(x,t). If the initial location is given by a certain density function g(x), then the density at time ''t'' is the convolution of ''g'' and the normal PDF.


Approximate normality

''Approximately'' normal distributions occur in many situations, as explained by the
central limit theorem In probability theory, the central limit theorem (CLT) establishes that, in many situations, when independent random variables are summed up, their properly normalized sum tends toward a normal distribution even if the original variables themselv ...
. When the outcome is produced by many small effects acting ''additively and independently'', its distribution will be close to normal. The normal approximation will not be valid if the effects act multiplicatively (instead of additively), or if there is a single external influence that has a considerably larger magnitude than the rest of the effects. * In counting problems, where the central limit theorem includes a discrete-to-continuum approximation and where Infinite divisibility, infinitely divisible and Indecomposable distribution, decomposable distributions are involved, such as ** binomial distribution, Binomial random variables, associated with binary response variables; ** Poisson distribution, Poisson random variables, associated with rare events; * Thermal radiation has a Bose–Einstein statistics, Bose–Einstein distribution on very short time scales, and a normal distribution on longer timescales due to the central limit theorem.


Assumed normality

There are statistical methods to empirically test that assumption; see the above #Normality tests, Normality tests section. * In biology, the ''logarithm'' of various variables tend to have a normal distribution, that is, they tend to have a
log-normal distribution In probability theory, a log-normal (or lognormal) distribution is a continuous probability distribution of a random variable whose logarithm is normally distributed. Thus, if the random variable is log-normally distributed, then has a normal ...
(after separation on male/female subpopulations), with examples including: ** Measures of size of living tissue (length, height, skin area, weight); ** The ''length'' of ''inert'' appendages (hair, claws, nails, teeth) of biological specimens, ''in the direction of growth''; presumably the thickness of tree bark also falls under this category; ** Certain physiological measurements, such as blood pressure of adult humans. * In finance, in particular the Black–Scholes model, changes in the ''logarithm'' of exchange rates, price indices, and stock market indices are assumed normal (these variables behave like compound interest, not like simple interest, and so are multiplicative). Some mathematicians such as Benoit Mandelbrot have argued that Levy skew alpha-stable distribution, log-Levy distributions, which possesses heavy tails would be a more appropriate model, in particular for the analysis for stock market crashes. The use of the assumption of normal distribution occurring in financial models has also been criticized by Nassim Nicholas Taleb in his works. * Propagation of uncertainty, Measurement errors in physical experiments are often modeled by a normal distribution. This use of a normal distribution does not imply that one is assuming the measurement errors are normally distributed, rather using the normal distribution produces the most conservative predictions possible given only knowledge about the mean and variance of the errors. * In Standardized testing (statistics), standardized testing, results can be made to have a normal distribution by either selecting the number and difficulty of questions (as in the Intelligence quotient, IQ test) or transforming the raw test scores into "output" scores by fitting them to the normal distribution. For example, the SAT's traditional range of 200–800 is based on a normal distribution with a mean of 500 and a standard deviation of 100. * Many scores are derived from the normal distribution, including percentile ranks ("percentiles" or "quantiles"), normal curve equivalents, stanines, Standard score, z-scores, and T-scores. Additionally, some behavioral statistical procedures assume that scores are normally distributed; for example, Student's t-test, t-tests and Analysis of variance, ANOVAs. Bell curve grading assigns relative grades based on a normal distribution of scores. * In hydrology the distribution of long duration river discharge or rainfall, e.g. monthly and yearly totals, is often thought to be practically normal according to the
central limit theorem In probability theory, the central limit theorem (CLT) establishes that, in many situations, when independent random variables are summed up, their properly normalized sum tends toward a normal distribution even if the original variables themselv ...
. The blue picture, made with CumFreq, illustrates an example of fitting the normal distribution to ranked October rainfalls showing the 90% confidence belt based on the
binomial distribution In probability theory and statistics, the binomial distribution with parameters ''n'' and ''p'' is the discrete probability distribution of the number of successes in a sequence of ''n'' independent experiments, each asking a yes–no quest ...
. The rainfall data are represented by plotting positions as part of the cumulative frequency analysis.


Methodological problems and peer review

John Ioannidis argues that using normally distributed standard deviations as standards for validating research findings leave falsifiability, falsifiable predictions about phenomena that are not normally distributed untested. This includes, for example, phenomena that only appear when all necessary conditions are present and one cannot be a substitute for another in an addition-like way and phenomena that are not randomly distributed. Ioannidis argues that standard deviation-centered validation gives a false appearance of validity to hypotheses and theories where some but not all falsifiable predictions are normally distributed since the portion of falsifiable predictions that there is evidence against may and in some cases are in the non-normally distributed parts of the range of falsifiable predictions, as well as baselessly dismissing hypotheses for which none of the falsifiable predictions are normally distributed as if were they unfalsifiable when in fact they do make falsifiable predictions. It is argued by Ioannidis that many cases of mutually exclusive theories being accepted as "validated" by research journals are caused by failure of the journals to take in empirical falsifications of non-normally distributed predictions, and not because mutually exclusive theories are true, which they cannot be, although two mutually exclusive theories can both be wrong and a third one correct.


Computational methods


Generating values from normal distribution

In computer simulations, especially in applications of the Monte-Carlo method, it is often desirable to generate values that are normally distributed. The algorithms listed below all generate the standard normal deviates, since a can be generated as , where ''Z'' is standard normal. All these algorithms rely on the availability of a random number generator ''U'' capable of producing Uniform distribution (continuous), uniform random variates. * The most straightforward method is based on the probability integral transform property: if ''U'' is distributed uniformly on (0,1), then Φ−1(''U'') will have the standard normal distribution. The drawback of this method is that it relies on calculation of the
probit function In probability theory and statistics, the probit function is the quantile function associated with the standard normal distribution. It has applications in data analysis and machine learning, in particular exploratory statistical graphics and ...
Φ−1, which cannot be done analytically. Some approximate methods are described in and in the error function, erf article. Wichura gives a fast algorithm for computing this function to 16 decimal places, which is used by R programming language, R to compute random variates of the normal distribution. * Irwin–Hall distribution#Approximating a Normal distribution, An easy-to-program approximate approach that relies on the
central limit theorem In probability theory, the central limit theorem (CLT) establishes that, in many situations, when independent random variables are summed up, their properly normalized sum tends toward a normal distribution even if the original variables themselv ...
is as follows: generate 12 uniform ''U''(0,1) deviates, add them all up, and subtract 6 – the resulting random variable will have approximately standard normal distribution. In truth, the distribution will be Irwin–Hall distribution, Irwin–Hall, which is a 12-section eleventh-order polynomial approximation to the normal distribution. This random deviate will have a limited range of (−6, 6). Note that in a true normal distribution, only 0.00034% of all samples will fall outside ±6σ. * The Box–Muller transform, Box–Muller method uses two independent random numbers ''U'' and ''V'' distributed uniform distribution (continuous), uniformly on (0,1). Then the two random variables ''X'' and ''Y'' X = \sqrt \, \cos(2 \pi V) , \qquad Y = \sqrt \, \sin(2 \pi V) . will both have the standard normal distribution, and will be
independent Independent or Independents may refer to: Arts, entertainment, and media Artist groups * Independents (artist group), a group of modernist painters based in the New Hope, Pennsylvania, area of the United States during the early 1930s * Independ ...
. This formulation arises because for a bivariate normal random vector (''X'', ''Y'') the squared norm will have the
chi-squared distribution In probability theory and statistics, the chi-squared distribution (also chi-square or \chi^2-distribution) with k degrees of freedom is the distribution of a sum of the squares of k independent standard normal random variables. The chi-squa ...
with two degrees of freedom, which is an easily generated exponential distribution, exponential random variable corresponding to the quantity −2ln(''U'') in these equations; and the angle is distributed uniformly around the circle, chosen by the random variable ''V''. * The Marsaglia polar method is a modification of the Box–Muller method which does not require computation of the sine and cosine functions. In this method, ''U'' and ''V'' are drawn from the uniform (−1,1) distribution, and then is computed. If ''S'' is greater or equal to 1, then the method starts over, otherwise the two quantities X = U\sqrt, \qquad Y = V\sqrt are returned. Again, ''X'' and ''Y'' are independent, standard normal random variables. * The Ratio method is a rejection method. The algorithm proceeds as follows: ** Generate two independent uniform deviates ''U'' and ''V''; ** Compute ''X'' = (''V'' − 0.5)/''U''; ** Optional: if ''X''2 ≤ 5 − 4''e''1/4''U'' then accept ''X'' and terminate algorithm; ** Optional: if ''X''2 ≥ 4''e''−1.35/''U'' + 1.4 then reject ''X'' and start over from step 1; ** If ''X''2 ≤ −4 ln''U'' then accept ''X'', otherwise start over the algorithm. *:The two optional steps allow the evaluation of the logarithm in the last step to be avoided in most cases. These steps can be greatly improved so that the logarithm is rarely evaluated. * The ziggurat algorithm is faster than the Box–Muller transform and still exact. In about 97% of all cases it uses only two random numbers, one random integer and one random uniform, one multiplication and an if-test. Only in 3% of the cases, where the combination of those two falls outside the "core of the ziggurat" (a kind of rejection sampling using logarithms), do exponentials and more uniform random numbers have to be employed. * Integer arithmetic can be used to sample from the standard normal distribution. This method is exact in the sense that it satisfies the conditions of ''ideal approximation''; i.e., it is equivalent to sampling a real number from the standard normal distribution and rounding this to the nearest representable floating point number. * There is also some investigation into the connection between the fast Hadamard transform and the normal distribution, since the transform employs just addition and subtraction and by the central limit theorem random numbers from almost any distribution will be transformed into the normal distribution. In this regard a series of Hadamard transforms can be combined with random permutations to turn arbitrary data sets into a normally distributed data.


Numerical approximations for the normal CDF and normal quantile function

The standard normal cumulative distribution function, CDF is widely used in scientific and statistical computing. The values Φ(''x'') may be approximated very accurately by a variety of methods, such as numerical integration, Taylor series, asymptotic series and Gauss's continued fraction#Of Kummer's confluent hypergeometric function, continued fractions. Different approximations are used depending on the desired level of accuracy. * give the approximation for Φ(''x'') for ''x > 0'' with the absolute error (algorith
26.2.17
: \Phi(x) = 1 - \varphi(x)\left(b_1 t + b_2 t^2 + b_3t^3 + b_4 t^4 + b_5 t^5\right) + \varepsilon(x), \qquad t = \frac, where ''ϕ''(''x'') is the standard normal PDF, and ''b''0 = 0.2316419, ''b''1 = 0.319381530, ''b''2 = −0.356563782, ''b''3 = 1.781477937, ''b''4 = −1.821255978, ''b''5 = 1.330274429. * lists some dozens of approximations – by means of rational functions, with or without exponentials – for the function. His algorithms vary in the degree of complexity and the resulting precision, with maximum absolute precision of 24 digits. An algorithm by combines Hart's algorithm 5666 with a continued fraction approximation in the tail to provide a fast computation algorithm with a 16-digit precision. * after recalling Hart68 solution is not suited for erf, gives a solution for both erf and erfc, with maximal relative error bound, via rational function, Rational Chebyshev Approximation. * suggested a simple algorithm based on the Taylor series expansion \Phi(x) = \frac12 + \varphi(x)\left( x + \frac 3 + \frac + \frac + \frac + \cdots \right) for calculating with arbitrary precision. The drawback of this algorithm is comparatively slow calculation time (for example it takes over 300 iterations to calculate the function with 16 digits of precision when ). * The GNU Scientific Library calculates values of the standard normal CDF using Hart's algorithms and approximations with Chebyshev polynomials. Shore (1982) introduced simple approximations that may be incorporated in stochastic optimization models of engineering and operations research, like reliability engineering and inventory analysis. Denoting , the simplest approximation for the quantile function is: z = \Phi^(p)=5.5556\left[1- \left( \frac p \right)^\right],\qquad p\ge 1/2 This approximation delivers for ''z'' a maximum absolute error of 0.026 (for , corresponding to ). For replace ''p'' by and change sign. Another approximation, somewhat less accurate, is the single-parameter approximation: z=-0.4115\left\, \qquad p\ge 1/2 The latter had served to derive a simple approximation for the loss integral of the normal distribution, defined by \begin L(z) & =\int_z^\infty (u-z)\varphi(u) \, du=\int_z^\infty [1-\Phi (u)] \, du \\[5pt] L(z) & \approx \begin 0.4115\left(\dfrac p \right) - z, & p<1/2, \\ \\ 0.4115\left( \dfrac p \right), & p\ge 1/2. \end \\[5pt] \text \\ L(z) & \approx \begin 0.4115\left\, & p < 1/2, \\ \\ 0.4115 \dfrac p, & p\ge 1/2. \end \end This approximation is particularly accurate for the right far-tail (maximum error of 10−3 for z≥1.4). Highly accurate approximations for the CDF, based on Response modeling methodology, Response Modeling Methodology (RMM, Shore, 2011, 2012), are shown in Shore (2005). Some more approximations can be found at: Error function#Approximation with elementary functions. In particular, small ''relative'' error on the whole domain for the CDF \Phi and the quantile function \Phi^ as well, is achieved via an explicitly invertible formula by Sergei Winitzki in 2008.


History


Development

Some authors attribute the credit for the discovery of the normal distribution to Abraham de Moivre, de Moivre, who in 1738 published in the second edition of his "''The Doctrine of Chances''" the study of the coefficients in the binomial expansion of . De Moivre proved that the middle term in this expansion has the approximate magnitude of 2^n/\sqrt, and that "If ''m'' or ''n'' be a Quantity infinitely great, then the Logarithm of the Ratio, which a Term distant from the middle by the Interval ''ℓ'', has to the middle Term, is -\frac." Although this theorem can be interpreted as the first obscure expression for the normal probability law, Stephen Stigler, Stigler points out that de Moivre himself did not interpret his results as anything more than the approximate rule for the binomial coefficients, and in particular de Moivre lacked the concept of the probability density function. In 1823 Carl Friedrich Gauss, Gauss published his monograph "''Theoria combinationis observationum erroribus minimis obnoxiae''" where among other things he introduces several important statistical concepts, such as the method of least squares, the method of maximum likelihood, and the ''normal distribution''. Gauss used ''M'', , to denote the measurements of some unknown quantity ''V'', and sought the "most probable" estimator of that quantity: the one that maximizes the probability of obtaining the observed experimental results. In his notation φΔ is the probability density function of the measurement errors of magnitude Δ. Not knowing what the function ''φ'' is, Gauss requires that his method should reduce to the well-known answer: the arithmetic mean of the measured values. Starting from these principles, Gauss demonstrates that the only law that rationalizes the choice of arithmetic mean as an estimator of the location parameter, is the normal law of errors: \varphi\mathit = \frac h \, e^, where ''h'' is "the measure of the precision of the observations". Using this normal law as a generic model for errors in the experiments, Gauss formulates what is now known as the non-linear least squares, non-linear weighted least squares method. Although Gauss was the first to suggest the normal distribution law, Pierre Simon de Laplace, Laplace made significant contributions. It was Laplace who first posed the problem of aggregating several observations in 1774, although his own solution led to the Laplacian distribution. It was Laplace who first calculated the value of the Gaussian integral, integral in 1782, providing the normalization constant for the normal distribution. Finally, it was Laplace who in 1810 proved and presented to the Academy the fundamental
central limit theorem In probability theory, the central limit theorem (CLT) establishes that, in many situations, when independent random variables are summed up, their properly normalized sum tends toward a normal distribution even if the original variables themselv ...
, which emphasized the theoretical importance of the normal distribution. It is of interest to note that in 1809 an Irish-American mathematician Robert Adrain published two insightful but flawed derivations of the normal probability law, simultaneously and independently from Gauss. His works remained largely unnoticed by the scientific community, until in 1871 they were exhumed by Cleveland Abbe, Abbe. In the middle of the 19th century James Clerk Maxwell, Maxwell demonstrated that the normal distribution is not just a convenient mathematical tool, but may also occur in natural phenomena: "The number of particles whose velocity, resolved in a certain direction, lies between ''x'' and ''x'' + ''dx'' is \operatorname \frac\; e^ \, dx


Naming

Today, the concept is usually known in English as the normal distribution or Gaussian distribution. Other less common names include Gauss distribution, Laplace-Gauss distribution, the law of error, the law of facility of errors, Laplace's second law, Gaussian law. Gauss himself apparently coined the term with reference to the "normal equations" involved in its applications, with normal having its technical meaning of orthogonal rather than "usual". However, by the end of the 19th century some authors had started using the name ''normal distribution'', where the word "normal" was used as an adjective – the term now being seen as a reflection of the fact that this distribution was seen as typical, common – and thus "normal". Charles Sanders Peirce, Peirce (one of those authors) once defined "normal" thus: "...the 'normal' is not the average (or any other kind of mean) of what actually occurs, but of what ''would'', in the long run, occur under certain circumstances." Around the turn of the 20th century Karl Pearson, Pearson popularized the term ''normal'' as a designation for this distribution. Also, it was Pearson who first wrote the distribution in terms of the standard deviation ''σ'' as in modern notation. Soon after this, in year 1915, Ronald Fisher, Fisher added the location parameter to the formula for normal distribution, expressing it in the way it is written nowadays: df = \frac e^ \, dx. The term "standard normal", which denotes the normal distribution with zero mean and unit variance came into general use around the 1950s, appearing in the popular textbooks by P. G. Hoel (1947) "''Introduction to mathematical statistics''" and A. M. Mood (1950) "''Introduction to the theory of statistics''".


See also

* Bates distribution – similar to the Irwin–Hall distribution, but rescaled back into the 0 to 1 range * Behrens–Fisher problem – the long-standing problem of testing whether two normal samples with different variances have same means; * Bhattacharyya distance – method used to separate mixtures of normal distributions * Erdős–Kac theorem – on the occurrence of the normal distribution in number theory * Full width at half maximum * Gaussian blur – convolution, which uses the normal distribution as a kernel * Modified half-normal distribution with the pdf on (0, \infty) is given as f(x)= \frac, where \Psi(\alpha,z)=_1\Psi_1\left(\begin\left(\alpha,\frac\right)\\(1,0)\end;z \right) denotes the Fox-Wright Psi function. * Normally distributed and uncorrelated does not imply independent * Ratio normal distribution * Reciprocal normal distribution * Standard normal table * Stein's lemma * Sub-Gaussian distribution * Sum of normally distributed random variables * Tweedie distribution – The normal distribution is a member of the family of Tweedie exponential dispersion models. * Wrapped normal distribution – the Normal distribution applied to a circular domain * Z-test – using the normal distribution


Notes


References


Citations


Sources

* * In particular, the entries fo
"bell-shaped and bell curve"
an

* * * * * * * * * * * * * * * * * * * * * * * * Translated by Stephen M. Stigler in ''Statistical Science'' 1 (3), 1986: . * * * * * * * * * * * * * * * * * * * * * * * * * * * *


External links

*
Normal distribution calculator
{{Authority control Normal distribution, Continuous distributions Conjugate prior distributions Exponential family distributions Stable distributions Location-scale family probability distributions]">X, ^p \right&= \sigma^p \cdot 2^ \frac _1F_1\left( -\frac, \frac, -\frac \left( \frac \mu \sigma \right)^2 \right). \end These expressions remain valid even if p is not an integer. See also Hermite polynomials#"Negative variance", generalized Hermite polynomials. The expectation of X conditioned on the event that X lies in an interval ,b/math> is given by :\operatorname\left \mid a= \mu - \sigma^2\frac where f and F respectively are the density and the cumulative distribution function of X. For b=\infty this is known as the
inverse Mills ratio In probability theory, the Mills ratio (or Mills's ratio) of a continuous random variable X is the function : m(x) := \frac , where f(x) is the probability density function, and :\bar(x) := \Pr x.html" ;"title=">x">>x= \int_x^ f(u)\, du is the ...
. Note that above, density f of X is used instead of standard normal density as in inverse Mills ratio, so here we have \sigma^2 instead of \sigma.


Fourier transform and characteristic function

The
Fourier transform A Fourier transform (FT) is a mathematical transform that decomposes functions into frequency components, which are represented by the output of the transform as a function of frequency. Most commonly functions of time or space are transformed, ...
of a normal density f with mean \mu and standard deviation \sigma is : \hat f(t) = \int_^\infty f(x)e^ \, dx = e^ e^ where i is the
imaginary unit The imaginary unit or unit imaginary number () is a solution to the quadratic equation x^2+1=0. Although there is no real number with this property, can be used to extend the real numbers to what are called complex numbers, using addition an ...
. If the mean \mu=0, the first factor is 1, and the Fourier transform is, apart from a constant factor, a normal density on the
frequency domain In physics, electronics, control systems engineering, and statistics, the frequency domain refers to the analysis of mathematical functions or signals with respect to frequency, rather than time. Put simply, a time-domain graph shows how a signa ...
, with mean 0 and standard deviation 1/\sigma. In particular, the standard normal distribution \varphi is an
eigenfunction In mathematics, an eigenfunction of a linear operator ''D'' defined on some function space is any non-zero function f in that space that, when acted upon by ''D'', is only multiplied by some scaling factor called an eigenvalue. As an equation, th ...
of the Fourier transform. In probability theory, the Fourier transform of the probability distribution of a real-valued random variable X is closely connected to the
characteristic function In mathematics, the term "characteristic function" can refer to any of several distinct concepts: * The indicator function of a subset, that is the function ::\mathbf_A\colon X \to \, :which for a given subset ''A'' of ''X'', has value 1 at points ...
\varphi_X(t) of that variable, which is defined as the
expected value In probability theory, the expected value (also called expectation, expectancy, mathematical expectation, mean, average, or first moment) is a generalization of the weighted average. Informally, the expected value is the arithmetic mean of a l ...
of e^, as a function of the real variable t (the
frequency Frequency is the number of occurrences of a repeating event per unit of time. It is also occasionally referred to as ''temporal frequency'' for clarity, and is distinct from ''angular frequency''. Frequency is measured in hertz (Hz) which is eq ...
parameter of the Fourier transform). This definition can be analytically extended to a complex-value variable t. The relation between both is: :\varphi_X(t) = \hat f(-t)


Moment and cumulant generating functions

The
moment generating function In probability theory and statistics, the moment-generating function of a real-valued random variable is an alternative specification of its probability distribution. Thus, it provides the basis of an alternative route to analytical results compare ...
of a real random variable X is the expected value of e^, as a function of the real parameter t. For a normal distribution with density f, mean \mu and deviation \sigma, the moment generating function exists and is equal to :M(t) = \operatorname ^= \hat f(it) = e^ e^ The
cumulant generating function In probability theory and statistics, the cumulants of a probability distribution are a set of quantities that provide an alternative to the '' moments'' of the distribution. Any two probability distributions whose moments are identical will have ...
is the logarithm of the moment generating function, namely :g(t) = \ln M(t) = \mu t + \tfrac 12 \sigma^2 t^2 Since this is a quadratic polynomial in t, only the first two
cumulant In probability theory and statistics, the cumulants of a probability distribution are a set of quantities that provide an alternative to the '' moments'' of the distribution. Any two probability distributions whose moments are identical will ha ...
s are nonzero, namely the mean \mu and the variance \sigma^2.


Stein operator and class

Within
Stein's method Stein's method is a general method in probability theory to obtain bounds on the distance between two probability distributions with respect to a probability metric. It was introduced by Charles Stein, who first published it in 1972, to obtain ...
the Stein operator and class of a random variable X \sim \mathcal(\mu, \sigma^2) are \mathcalf(x) = \sigma^2 f'(x) - (x-\mu)f(x) and \mathcal the class of all absolutely continuous functions f : \R \to \R \mbox\mathbb[, f'(X), ]< \infty.


Zero-variance limit

In the limit (mathematics), limit when \sigma tends to zero, the probability density f(x) eventually tends to zero at any x\ne \mu, but grows without limit if x = \mu, while its integral remains equal to 1. Therefore, the normal distribution cannot be defined as an ordinary
function Function or functionality may refer to: Computing * Function key, a type of key on computer keyboards * Function model, a structured representation of processes in a system * Function object or functor or functionoid, a concept of object-oriente ...
when \sigma = 0. However, one can define the normal distribution with zero variance as a
generalized function In mathematics, generalized functions are objects extending the notion of functions. There is more than one recognized theory, for example the theory of distributions. Generalized functions are especially useful in making discontinuous functions ...
; specifically, as Dirac's "delta function" \delta translated by the mean \mu, that is f(x)=\delta(x-\mu). Its CDF is then the
Heaviside step function The Heaviside step function, or the unit step function, usually denoted by or (but sometimes , or ), is a step function, named after Oliver Heaviside (1850–1925), the value of which is zero for negative arguments and one for positive argume ...
translated by the mean \mu, namely :F(x) = \begin 0 & \textx < \mu \\ 1 & \textx \geq \mu \end


Maximum entropy

Of all probability distributions over the reals with a specified mean \mu and variance \sigma^2, the normal distribution N(\mu,\sigma^2) is the one with maximum entropy. If X is a
continuous random variable In probability theory and statistics, a probability distribution is the mathematical function that gives the probabilities of occurrence of different possible outcomes for an experiment. It is a mathematical description of a random phenomenon i ...
with
probability density In probability theory, a probability density function (PDF), or density of a continuous random variable, is a function whose value at any given sample (or point) in the sample space (the set of possible values taken by the random variable) can ...
f(x), then the entropy of X is defined as : H(X) = - \int_^\infty f(x)\log f(x)\, dx where f(x)\log f(x) is understood to be zero whenever f(x)=0. This functional can be maximized, subject to the constraints that the distribution is properly normalized and has a specified variance, by using
variational calculus The calculus of variations (or Variational Calculus) is a field of mathematical analysis that uses variations, which are small changes in functions and functionals, to find maxima and minima of functionals: mappings from a set of functions t ...
. A function with two
Lagrange multipliers In mathematical optimization, the method of Lagrange multipliers is a strategy for finding the local maxima and minima of a function subject to equality constraints (i.e., subject to the condition that one or more equations have to be satisfied ex ...
is defined: : L=\int_^\infty f(x)\ln(f(x))\,dx-\lambda_0\left(1-\int_^\infty f(x)\,dx\right)-\lambda\left(\sigma^2-\int_^\infty f(x)(x-\mu)^2\,dx\right) where f(x) is, for now, regarded as some density function with mean \mu and standard deviation \sigma. At maximum entropy, a small variation \delta f(x) about f(x) will produce a variation \delta L about L which is equal to 0: : 0=\delta L=\int_^\infty \delta f(x)\left (\ln(f(x))+1+\lambda_0+\lambda(x-\mu)^2\right )\,dx Since this must hold for any small \delta f(x), the term in brackets must be zero, and solving for f(x) yields: :f(x)=e^ Using the constraint equations to solve for \lambda_0 and \lambda yields the density of the normal distribution: : f(x, \mu, \sigma)=\frace^ The entropy of a normal distribution is equal to : H(X)=\tfrac(1+\log(2\sigma^2\pi))


Other properties


Related distributions


Central limit theorem

The central limit theorem states that under certain (fairly common) conditions, the sum of many random variables will have an approximately normal distribution. More specifically, where X_1,\ldots ,X_n are
independent and identically distributed In probability theory and statistics, a collection of random variables is independent and identically distributed if each random variable has the same probability distribution as the others and all are mutually independent. This property is usua ...
random variables with the same arbitrary distribution, zero mean, and variance \sigma^2 and Z is their mean scaled by \sqrt : Z = \sqrt\left(\frac\sum_^n X_i\right) Then, as n increases, the probability distribution of Z will tend to the normal distribution with zero mean and variance \sigma^2. The theorem can be extended to variables (X_i) that are not independent and/or not identically distributed if certain constraints are placed on the degree of dependence and the moments of the distributions. Many
test statistic A test statistic is a statistic (a quantity derived from the sample) used in statistical hypothesis testing.Berger, R. L.; Casella, G. (2001). ''Statistical Inference'', Duxbury Press, Second Edition (p.374) A hypothesis test is typically specif ...
s, scores, and
estimator In statistics, an estimator is a rule for calculating an estimate of a given quantity based on observed data: thus the rule (the estimator), the quantity of interest (the estimand) and its result (the estimate) are distinguished. For example, the ...
s encountered in practice contain sums of certain random variables in 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 distributions. The central limit theorem also implies that certain distributions can be approximated by the normal distribution, for example: * The
binomial distribution In probability theory and statistics, the binomial distribution with parameters ''n'' and ''p'' is the discrete probability distribution of the number of successes in a sequence of ''n'' independent experiments, each asking a yes–no quest ...
B(n,p) is approximately normal with mean np and variance np(1-p) for large n and for p not too close to 0 or 1. * The
Poisson distribution In probability theory and statistics, the Poisson distribution is a discrete probability distribution that expresses the probability of a given number of events occurring in a fixed interval of time or space if these events occur with a known co ...
with parameter \lambda is approximately normal with mean \lambda and variance \lambda, for large values of \lambda. * The
chi-squared distribution In probability theory and statistics, the chi-squared distribution (also chi-square or \chi^2-distribution) with k degrees of freedom is the distribution of a sum of the squares of k independent standard normal random variables. The chi-squa ...
\chi^2(k) is approximately normal with mean k and variance 2k, for large k. * The
Student's t-distribution In probability and statistics, Student's ''t''-distribution (or simply the ''t''-distribution) is any member of a family of continuous probability distributions that arise when estimating the mean of a normally distributed population in sit ...
t(\nu) is approximately normal with mean 0 and variance 1 when \nu is large. Whether these approximations are sufficiently accurate depends on the purpose for which they are needed, and the rate of convergence to the normal distribution. It is typically the case that such approximations are less accurate in the tails of the distribution. A general upper bound for the approximation error in the central limit theorem is given by the
Berry–Esseen theorem In probability theory, the central limit theorem states that, under certain circumstances, the probability distribution of the scaled mean of a random sample converges to a normal distribution as the sample size increases to infinity. Under strong ...
, improvements of the approximation are given by the
Edgeworth expansion The Gram–Charlier A series (named in honor of Jørgen Pedersen Gram and Carl Charlier), and the Edgeworth series (named in honor of Francis Ysidro Edgeworth) are series that approximate a probability distribution in terms of its cumulants. The se ...
s. This theorem can also be used to justify modeling the sum of many uniform noise sources as
Gaussian noise Gaussian noise, named after Carl Friedrich Gauss, is a term from signal processing theory denoting a kind of signal noise that has a probability density function (pdf) equal to that of the normal distribution (which is also known as the Gaussia ...
. See
AWGN Additive white Gaussian noise (AWGN) is a basic noise model used in information theory to mimic the effect of many random processes that occur in nature. The modifiers denote specific characteristics: * ''Additive'' because it is added to any nois ...
.


Operations and functions of normal variables

The
probability density In probability theory, a probability density function (PDF), or density of a continuous random variable, is a function whose value at any given sample (or point) in the sample space (the set of possible values taken by the random variable) can ...
,
cumulative distribution In statistics, the frequency (or absolute frequency) of an event i is the number n_i of times the observation has occurred/recorded in an experiment or study. These frequencies are often depicted graphically or in tabular form. Types The cumul ...
, and inverse cumulative distribution of any function of one or more independent or correlated normal variables can be computed with the numerical method of ray-tracing
Matlab code
. In the following sections we look at some special cases.


Operations on a single normal variable

If X is distributed normally with mean \mu and variance \sigma^2, then * aX+b, for any real numbers a and b, is also normally distributed, with mean a\mu+b and standard deviation , a, \sigma. That is, the family of normal distributions is closed under linear transformations. * The exponential of X is distributed log-normally: . * The absolute value of X has
folded normal distribution The folded normal distribution is a probability distribution related to the normal distribution. Given a normally distributed random variable ''X'' with mean ''μ'' and variance ''σ''2, the random variable ''Y'' = , ''X'', has a folded normal d ...
: . If \mu = 0 this is known as the
half-normal distribution In probability theory and statistics, the half-normal distribution is a special case of the folded normal distribution. Let X follow an ordinary normal distribution, N(0,\sigma^2). Then, Y=, X, follows a half-normal distribution. Thus, the hal ...
. * The absolute value of normalized residuals, , ''X'' − ''μ'', /''σ'', has
chi distribution In probability theory and statistics, the chi distribution is a continuous probability distribution. It is the distribution of the positive square root of the sum of squares of a set of independent random variables each following a standard norm ...
with one degree of freedom: , X - \mu, / \sigma \sim \chi_1. * The square of ''X''/''σ'' has the
noncentral chi-squared distribution In probability theory and statistics, the noncentral chi-squared distribution (or noncentral chi-square distribution, noncentral \chi^2 distribution) is a noncentral generalization of the chi-squared distribution. It often arises in the power a ...
with one degree of freedom: X^2 / \sigma^2 \sim \chi_1^2(\mu^2 / \sigma^2). If \mu = 0, the distribution is called simply chi-squared. * The log likelihood of a normal variable x is simply the log of its
probability density function In probability theory, a probability density function (PDF), or density of a continuous random variable, is a function whose value at any given sample (or point) in the sample space (the set of possible values taken by the random variable) can ...
: \ln p(x)= -\frac \left(\frac \right)^2 -\ln \left(\sigma \sqrt \right) = -\frac z^2 -\ln \left(\sigma \sqrt \right). Since this is a scaled and shifted square of a standard normal variable, it is distributed as a scaled and shifted chi-squared variable. * The distribution of the variable ''X'' restricted to an interval 'a'', ''b''is called the
truncated normal distribution In probability and statistics, the truncated normal distribution is the probability distribution derived from that of a normally distributed random variable by bounding the random variable from either below or above (or both). The truncated no ...
. * (''X'' − ''μ'')−2 has a
Lévy distribution In probability theory and statistics, the Lévy distribution, named after Paul Lévy, is a continuous probability distribution for a non-negative random variable. In spectroscopy, this distribution, with frequency as the dependent variable, is kn ...
with location 0 and scale ''σ''−2.


= Operations on two independent normal variables

= * If X_1 and X_2 are two
independent Independent or Independents may refer to: Arts, entertainment, and media Artist groups * Independents (artist group), a group of modernist painters based in the New Hope, Pennsylvania, area of the United States during the early 1930s * Independ ...
normal random variables, with means \mu_1, \mu_2 and standard deviations \sigma_1, \sigma_2, then their sum X_1 + X_2 will also be normally distributed, roof/sup> with mean \mu_1 + \mu_2 and variance \sigma_1^2 + \sigma_2^2. * In particular, if X and Y are independent normal deviates with zero mean and variance \sigma^2, then X + Y and X - Y are also independent and normally distributed, with zero mean and variance 2\sigma^2. This is a special case of the
polarization identity In linear algebra, a branch of mathematics, the polarization identity is any one of a family of formulas that express the inner product of two vectors in terms of the norm of a normed vector space. If a norm arises from an inner product then t ...
. * If X_1, X_2 are two independent normal deviates with mean \mu and deviation \sigma, and a, b are arbitrary real numbers, then the variable X_3 = \frac + \mu is also normally distributed with mean \mu and deviation \sigma. It follows that the normal distribution is
stable A stable is a building in which livestock, especially horses, are kept. It most commonly means a building that is divided into separate stalls for individual animals and livestock. There are many different types of stables in use today; the ...
(with exponent \alpha=2).


= Operations on two independent standard normal variables

= If X_1 and X_2 are two independent standard normal random variables with mean 0 and variance 1, then * Their sum and difference is distributed normally with mean zero and variance two: X_1 \pm X_2 \sim N(0, 2). * Their product Z = X_1 X_2 follows the
product distribution A product distribution is a probability distribution constructed as the distribution of the product of random variables having two other known distributions. Given two statistically independent random variables ''X'' and ''Y'', the distribution of ...
with density function f_Z(z) = \pi^ K_0(, z, ) where K_0 is the
modified Bessel function of the second kind Bessel functions, first defined by the mathematician Daniel Bernoulli and then generalized by Friedrich Bessel, are canonical solutions of Bessel's differential equation x^2 \frac + x \frac + \left(x^2 - \alpha^2 \right)y = 0 for an arbitrary ...
. This distribution is symmetric around zero, unbounded at z = 0, and has the
characteristic function In mathematics, the term "characteristic function" can refer to any of several distinct concepts: * The indicator function of a subset, that is the function ::\mathbf_A\colon X \to \, :which for a given subset ''A'' of ''X'', has value 1 at points ...
\phi_Z(t) = (1 + t^2)^. * Their ratio follows the standard
Cauchy distribution The Cauchy distribution, named after Augustin Cauchy, is a continuous probability distribution. It is also known, especially among physicists, as the Lorentz distribution (after Hendrik Lorentz), Cauchy–Lorentz distribution, Lorentz(ian) fun ...
: X_1/ X_2 \sim \operatorname(0, 1). * Their Euclidean norm \sqrt has the
Rayleigh distribution In probability theory and statistics, the Rayleigh distribution is a continuous probability distribution for nonnegative-valued random variables. Up to rescaling, it coincides with the chi distribution with two degrees of freedom. The distribut ...
.


Operations on multiple independent normal variables

* Any linear combination of independent normal deviates is a normal deviate. * If X_1, X_2, \ldots, X_n are independent standard normal random variables, then the sum of their squares has the
chi-squared distribution In probability theory and statistics, the chi-squared distribution (also chi-square or \chi^2-distribution) with k degrees of freedom is the distribution of a sum of the squares of k independent standard normal random variables. The chi-squa ...
with n degrees of freedom X_1^2 + \cdots + X_n^2 \sim \chi_n^2. * If X_1, X_2, \ldots, X_n are independent normally distributed random variables with means \mu and variances \sigma^2, then their
sample mean The sample mean (or "empirical mean") and the sample covariance are statistics computed from a Sample (statistics), sample of data on one or more random variables. The sample mean is the average value (or mean, mean value) of a sample (statistic ...
is independent from the sample
standard deviation In statistics, the standard deviation is a measure of the amount of variation or dispersion of a set of values. A low standard deviation indicates that the values tend to be close to the mean (also called the expected value) of the set, while ...
, which can be demonstrated using Basu's theorem or
Cochran's theorem In statistics, Cochran's theorem, devised by William G. Cochran, is a theorem used to justify results relating to the probability distributions of statistics that are used in the analysis of variance. Statement Let ''U''1, ..., ''U'N'' be i.i. ...
. The ratio of these two quantities will have the
Student's t-distribution In probability and statistics, Student's ''t''-distribution (or simply the ''t''-distribution) is any member of a family of continuous probability distributions that arise when estimating the mean of a normally distributed population in sit ...
with n-1 degrees of freedom: t = \frac = \frac \sim t_. * If X_1, X_2, \ldots, X_n, Y_1, Y_2, \ldots, Y_m are independent standard normal random variables, then the ratio of their normalized sums of squares will have the with degrees of freedom: F = \frac \sim F_.


Operations on multiple correlated normal variables

* A
quadratic form In mathematics, a quadratic form is a polynomial with terms all of degree two ("form" is another name for a homogeneous polynomial). For example, :4x^2 + 2xy - 3y^2 is a quadratic form in the variables and . The coefficients usually belong to a ...
of a normal vector, i.e. a quadratic function q = \sum x_i^2 + \sum x_j + c of multiple independent or correlated normal variables, is a generalized chi-square variable.


Operations on the density function

The split normal distribution is most directly defined in terms of joining scaled sections of the density functions of different normal distributions and rescaling the density to integrate to one. The
truncated normal distribution In probability and statistics, the truncated normal distribution is the probability distribution derived from that of a normally distributed random variable by bounding the random variable from either below or above (or both). The truncated no ...
results from rescaling a section of a single density function.


Infinite divisibility and Cramér's theorem

For any positive integer \text, any normal distribution with mean \mu and variance \sigma^2 is the distribution of the sum of \text independent normal deviates, each with mean \frac and variance \frac. This property is called
infinite divisibility Infinite divisibility arises in different ways in philosophy, physics, economics, order theory (a branch of mathematics), and probability theory (also a branch of mathematics). One may speak of infinite divisibility, or the lack thereof, of matter ...
. Conversely, if X_1 and X_2 are independent random variables and their sum X_1+X_2 has a normal distribution, then both X_1 and X_2 must be normal deviates. This result is known as Cramér's decomposition theorem, and is equivalent to saying that the convolution of two distributions is normal if and only if both are normal. Cramér's theorem implies that a linear combination of independent non-Gaussian variables will never have an exactly normal distribution, although it may approach it arbitrarily closely.


Bernstein's theorem

Bernstein's theorem states that if X and Y are independent and X + Y and X - Y are also independent, then both ''X'' and ''Y'' must necessarily have normal distributions. More generally, if X_1, \ldots, X_n are independent random variables, then two distinct linear combinations \sum and \sumwill be independent if and only if all X_k are normal and \sum, where \sigma_k^2 denotes the variance of X_k.


Extensions

The notion of normal distribution, being one of the most important distributions in probability theory, has been extended far beyond the standard framework of the univariate (that is one-dimensional) case (Case 1). All these extensions are also called ''normal'' or ''Gaussian'' laws, so a certain ambiguity in names exists. * The
multivariate normal distribution In probability theory and statistics, the multivariate normal distribution, multivariate Gaussian distribution, or joint normal distribution is a generalization of the one-dimensional (univariate) normal distribution to higher dimensions. One d ...
describes the Gaussian law in the ''k''-dimensional Euclidean space. A vector is multivariate-normally distributed if any linear combination of its components has a (univariate) normal distribution. The variance of ''X'' is a ''k×k'' symmetric positive-definite matrix ''V''. The multivariate normal distribution is a special case of the
elliptical distribution In probability and statistics, an elliptical distribution is any member of a broad family of probability distributions that generalize the multivariate normal distribution. Intuitively, in the simplified two and three dimensional case, the joint di ...
s. As such, its iso-density loci in the ''k'' = 2 case are ellipses and in the case of arbitrary ''k'' are ellipsoids. * Rectified Gaussian distribution a rectified version of normal distribution with all the negative elements reset to 0 * Complex normal distribution deals with the complex normal vectors. A complex vector is said to be normal if both its real and imaginary components jointly possess a 2''k''-dimensional multivariate normal distribution. The variance-covariance structure of ''X'' is described by two matrices: the ''variance'' matrix Γ, and the ''relation'' matrix ''C''. * Matrix normal distribution describes the case of normally distributed matrices. * Gaussian processes are the normally distributed stochastic processes. These can be viewed as elements of some infinite-dimensional Hilbert space ''H'', and thus are the analogues of multivariate normal vectors for the case . A random element is said to be normal if for any constant the scalar product has a (univariate) normal distribution. The variance structure of such Gaussian random element can be described in terms of the linear ''covariance ''. Several Gaussian processes became popular enough to have their own names: ** Wiener process, Brownian motion, ** Brownian bridge, ** Ornstein–Uhlenbeck process. * Gaussian q-distribution is an abstract mathematical construction that represents a "q-analogue" of the normal distribution. * the q-Gaussian is an analogue of the Gaussian distribution, in the sense that it maximises the Tsallis entropy, and is one type of Tsallis distribution. Note that this distribution is different from the Gaussian q-distribution above. * The Kaniadakis Gaussian distribution, Kaniadakis ''κ''-Gaussian distribution is a generalization of the Gaussian distribution which arises from the Kaniadakis statistics, being one of the Kaniadakis distribution, Kaniadakis distributions. A random variable ''X'' has a two-piece normal distribution if it has a distribution : f_X( x ) = N( \mu, \sigma_1^2 ) \text x \le \mu : f_X( x ) = N( \mu, \sigma_2^2 ) \text x \ge \mu where ''μ'' is the mean and ''σ''1 and ''σ''2 are the standard deviations of the distribution to the left and right of the mean respectively. The mean, variance and third central moment of this distribution have been determined : \operatorname( X ) = \mu + \sqrt ( \sigma_2 - \sigma_1 ) : \operatorname( X ) = \left( 1 - \frac 2 \pi\right)( \sigma_2 - \sigma_1 )^2 + \sigma_1 \sigma_2 : \operatorname( X ) = \sqrt( \sigma_2 - \sigma_1 ) \left[ \left( \frac 4 \pi - 1 \right) ( \sigma_2 - \sigma_1)^2 + \sigma_1 \sigma_2 \right] where E(''X''), V(''X'') and T(''X'') are the mean, variance, and third central moment respectively. One of the main practical uses of the Gaussian law is to model the empirical distributions of many different random variables encountered in practice. In such case a possible extension would be a richer family of distributions, having more than two parameters and therefore being able to fit the empirical distribution more accurately. The examples of such extensions are: * Pearson distribution — a four-parameter family of probability distributions that extend the normal law to include different skewness and kurtosis values. * The generalized normal distribution, also known as the exponential power distribution, allows for distribution tails with thicker or thinner asymptotic behaviors.


Statistical inference


Estimation of parameters

It is often the case that we do not know the parameters of the normal distribution, but instead want to Estimation theory, estimate them. That is, having a sample (x_1, \ldots, x_n) from a normal N(\mu, \sigma^2) population we would like to learn the approximate values of parameters \mu and \sigma^2. The standard approach to this problem is the maximum likelihood method, which requires maximization of the ''log-likelihood function'': : \ln\mathcal(\mu,\sigma^2) = \sum_^n \ln f(x_i\mid\mu,\sigma^2) = -\frac\ln(2\pi) - \frac\ln\sigma^2 - \frac\sum_^n (x_i-\mu)^2. Taking derivatives with respect to \mu and \sigma^2 and solving the resulting system of first order conditions yields the ''maximum likelihood estimates'': : \hat = \overline \equiv \frac\sum_^n x_i, \qquad \hat^2 = \frac \sum_^n (x_i - \overline)^2.


Sample mean

Estimator \textstyle\hat\mu is called the ''
sample mean The sample mean (or "empirical mean") and the sample covariance are statistics computed from a Sample (statistics), sample of data on one or more random variables. The sample mean is the average value (or mean, mean value) of a sample (statistic ...
'', since it is the arithmetic mean of all observations. The statistic \textstyle\overline is complete statistic, complete and sufficient statistic, sufficient for \mu, and therefore by the Lehmann–Scheffé theorem, \textstyle\hat\mu is the uniformly minimum variance unbiased (UMVU) estimator. In finite samples it is distributed normally: : \hat\mu \sim \mathcal(\mu,\sigma^2/n). The variance of this estimator is equal to the ''μμ''-element of the inverse Fisher information matrix \textstyle\mathcal^. This implies that the estimator is efficient estimator, finite-sample efficient. Of practical importance is the fact that the standard error (statistics), standard error of \textstyle\hat\mu is proportional to \textstyle1/\sqrt, that is, if one wishes to decrease the standard error by a factor of 10, one must increase the number of points in the sample by a factor of 100. This fact is widely used in determining sample sizes for opinion polls and the number of trials in Monte Carlo simulations. From the standpoint of the asymptotic theory (statistics), asymptotic theory, \textstyle\hat\mu is consistent estimator, consistent, that is, it convergence in probability, converges in probability to \mu as n\rightarrow\infty. The estimator is also asymptotic normality, asymptotically normal, which is a simple corollary of the fact that it is normal in finite samples: : \sqrt(\hat\mu-\mu) \,\xrightarrow\, \mathcal(0,\sigma^2).


Sample variance

The estimator \textstyle\hat\sigma^2 is called the ''sample variance'', since it is the variance of the sample ((x_1, \ldots, x_n)). In practice, another estimator is often used instead of the \textstyle\hat\sigma^2. This other estimator is denoted s^2, and is also called the ''sample variance'', which represents a certain ambiguity in terminology; its square root s is called the ''sample standard deviation''. The estimator s^2 differs from \textstyle\hat\sigma^2 by having instead of ''n'' in the denominator (the so-called Bessel's correction): : s^2 = \frac \hat\sigma^2 = \frac \sum_^n (x_i - \overline)^2. The difference between s^2 and \textstyle\hat\sigma^2 becomes negligibly small for large ''n''s. In finite samples however, the motivation behind the use of s^2 is that it is an unbiased estimator of the underlying parameter \sigma^2, whereas \textstyle\hat\sigma^2 is biased. Also, by the Lehmann–Scheffé theorem the estimator s^2 is uniformly minimum variance unbiased (Minimum-variance unbiased estimator, UMVU), which makes it the "best" estimator among all unbiased ones. However it can be shown that the biased estimator \textstyle\hat\sigma^2 is "better" than the s^2 in terms of the mean squared error (MSE) criterion. In finite samples both s^2 and \textstyle\hat\sigma^2 have scaled
chi-squared distribution In probability theory and statistics, the chi-squared distribution (also chi-square or \chi^2-distribution) with k degrees of freedom is the distribution of a sum of the squares of k independent standard normal random variables. The chi-squa ...
with degrees of freedom: : s^2 \sim \frac \cdot \chi^2_, \qquad \hat\sigma^2 \sim \frac \cdot \chi^2_. The first of these expressions shows that the variance of s^2 is equal to 2\sigma^4/(n-1), which is slightly greater than the ''σσ''-element of the inverse Fisher information matrix \textstyle\mathcal^. Thus, s^2 is not an efficient estimator for \sigma^2, and moreover, since s^2 is UMVU, we can conclude that the finite-sample efficient estimator for \sigma^2 does not exist. Applying the asymptotic theory, both estimators s^2 and \textstyle\hat\sigma^2 are consistent, that is they converge in probability to \sigma^2 as the sample size n\rightarrow\infty. The two estimators are also both asymptotically normal: : \sqrt(\hat\sigma^2 - \sigma^2) \simeq \sqrt(s^2-\sigma^2) \,\xrightarrow\, \mathcal(0,2\sigma^4). In particular, both estimators are asymptotically efficient for \sigma^2.


Confidence intervals

By
Cochran's theorem In statistics, Cochran's theorem, devised by William G. Cochran, is a theorem used to justify results relating to the probability distributions of statistics that are used in the analysis of variance. Statement Let ''U''1, ..., ''U'N'' be i.i. ...
, for normal distributions the sample mean \textstyle\hat\mu and the sample variance ''s''2 are
independent Independent or Independents may refer to: Arts, entertainment, and media Artist groups * Independents (artist group), a group of modernist painters based in the New Hope, Pennsylvania, area of the United States during the early 1930s * Independ ...
, which means there can be no gain in considering their joint distribution. There is also a converse theorem: if in a sample the sample mean and sample variance are independent, then the sample must have come from the normal distribution. The independence between \textstyle\hat\mu and ''s'' can be employed to construct the so-called ''t-statistic'': : t = \frac = \frac \sim t_ This quantity ''t'' has the
Student's t-distribution In probability and statistics, Student's ''t''-distribution (or simply the ''t''-distribution) is any member of a family of continuous probability distributions that arise when estimating the mean of a normally distributed population in sit ...
with degrees of freedom, and it is an ancillary statistic (independent of the value of the parameters). Inverting the distribution of this ''t''-statistics will allow us to construct the
confidence interval In frequentist statistics, a confidence interval (CI) is a range of estimates for an unknown parameter. A confidence interval is computed at a designated ''confidence level''; the 95% confidence level is most common, but other levels, such as 9 ...
for ''μ''; similarly, inverting the ''χ''2 distribution of the statistic ''s''2 will give us the confidence interval for ''σ''2: :\mu \in \left[ \hat\mu - t_ \fracs, \hat\mu + t_ \fracs \right], :\sigma^2 \in \left[ \frac, \frac \right], where ''tk,p'' and are the ''p''th
quantile In statistics and probability, quantiles are cut points dividing the range of a probability distribution into continuous intervals with equal probabilities, or dividing the observations in a sample in the same way. There is one fewer quantile tha ...
s of the ''t''- and ''χ''2-distributions respectively. These confidence intervals are of the ''confidence level'' , meaning that the true values ''μ'' and ''σ''2 fall outside of these intervals with probability (or significance level) ''α''. In practice people usually take , resulting in the 95% confidence intervals. Approximate formulas can be derived from the asymptotic distributions of \textstyle\hat\mu and ''s''2: :\mu \in \left[ \hat\mu - , z_, \fracs, \hat\mu + , z_, \fracs \right], :\sigma^2 \in \left[ s^2 - , z_, \fracs^2, s^2 + , z_, \fracs^2 \right], The approximate formulas become valid for large values of ''n'', and are more convenient for the manual calculation since the standard normal quantiles ''z''''α''/2 do not depend on ''n''. In particular, the most popular value of , results in .


Normality tests

Normality tests assess the likelihood that the given data set comes from a normal distribution. Typically the null hypothesis ''H''0 is that the observations are distributed normally with unspecified mean ''μ'' and variance ''σ''2, versus the alternative ''Ha'' that the distribution is arbitrary. Many tests (over 40) have been devised for this problem. The more prominent of them are outlined below: Diagnostic plots are more intuitively appealing but subjective at the same time, as they rely on informal human judgement to accept or reject the null hypothesis. *
Q–Q plot In statistics, a Q–Q plot (quantile-quantile plot) is a probability plot, a List of graphical methods, graphical method for comparing two probability distributions by plotting their ''quantiles'' against each other. A point on the plot co ...
, also known as normal probability plot or rankit plot—is a plot of the sorted values from the data set against the expected values of the corresponding quantiles from the standard normal distribution. That is, it's a plot of point of the form (Φ−1(''pk''), ''x''(''k'')), where plotting points ''pk'' are equal to ''pk'' = (''k'' − ''α'')/(''n'' + 1 − 2''α'') and ''α'' is an adjustment constant, which can be anything between 0 and 1. If the null hypothesis is true, the plotted points should approximately lie on a straight line. * P–P plot – similar to the Q–Q plot, but used much less frequently. This method consists of plotting the points (Φ(''z''(''k'')), ''pk''), where \textstyle z_ = (x_-\hat\mu)/\hat\sigma. For normally distributed data this plot should lie on a 45° line between (0, 0) and (1, 1). Goodness-of-fit tests: ''Moment-based tests'': * D'Agostino's K-squared test * Jarque–Bera test * Shapiro–Wilk test: This is based on the fact that the line in the Q–Q plot has the slope of ''σ''. The test compares the least squares estimate of that slope with the value of the sample variance, and rejects the null hypothesis if these two quantities differ significantly. ''Tests based on the empirical distribution function'': * Anderson–Darling test * Lilliefors test (an adaptation of the Kolmogorov–Smirnov test)


Bayesian analysis of the normal distribution

Bayesian analysis of normally distributed data is complicated by the many different possibilities that may be considered: * Either the mean, or the variance, or neither, may be considered a fixed quantity. * When the variance is unknown, analysis may be done directly in terms of the variance, or in terms of the
precision Precision, precise or precisely may refer to: Science, and technology, and mathematics Mathematics and computing (general) * Accuracy and precision, measurement deviation from true value and its scatter * Significant figures, the number of digit ...
, the reciprocal of the variance. The reason for expressing the formulas in terms of precision is that the analysis of most cases is simplified. * Both univariate and multivariate normal distribution, multivariate cases need to be considered. * Either conjugate prior, conjugate or improper prior, improper prior distributions may be placed on the unknown variables. * An additional set of cases occurs in Bayesian linear regression, where in the basic model the data is assumed to be normally distributed, and normal priors are placed on the regression coefficients. The resulting analysis is similar to the basic cases of independent identically distributed data. The formulas for the non-linear-regression cases are summarized in the conjugate prior article.


Sum of two quadratics


= Scalar form

= The following auxiliary formula is useful for simplifying the posterior distribution, posterior update equations, which otherwise become fairly tedious. :a(x-y)^2 + b(x-z)^2 = (a + b)\left(x - \frac\right)^2 + \frac(y-z)^2 This equation rewrites the sum of two quadratics in ''x'' by expanding the squares, grouping the terms in ''x'', and completing the square. Note the following about the complex constant factors attached to some of the terms: # The factor \frac has the form of a weighted average of ''y'' and ''z''. # \frac = \frac = (a^ + b^)^. This shows that this factor can be thought of as resulting from a situation where the Multiplicative inverse, reciprocals of quantities ''a'' and ''b'' add directly, so to combine ''a'' and ''b'' themselves, it's necessary to reciprocate, add, and reciprocate the result again to get back into the original units. This is exactly the sort of operation performed by the harmonic mean, so it is not surprising that \frac is one-half the harmonic mean of ''a'' and ''b''.


= Vector form

= A similar formula can be written for the sum of two vector quadratics: If x, y, z are vectors of length ''k'', and A and B are symmetric matrix, symmetric, invertible matrices of size k\times k, then : \begin & (\mathbf-\mathbf)'\mathbf(\mathbf-\mathbf) + (\mathbf-\mathbf)' \mathbf(\mathbf-\mathbf) \\ = & (\mathbf - \mathbf)'(\mathbf+\mathbf)(\mathbf - \mathbf) + (\mathbf - \mathbf)'(\mathbf^ + \mathbf^)^(\mathbf - \mathbf) \end where :\mathbf = (\mathbf + \mathbf)^(\mathbf\mathbf + \mathbf \mathbf) Note that the form x′ A x is called a
quadratic form In mathematics, a quadratic form is a polynomial with terms all of degree two ("form" is another name for a homogeneous polynomial). For example, :4x^2 + 2xy - 3y^2 is a quadratic form in the variables and . The coefficients usually belong to a ...
and is a scalar (mathematics), scalar: :\mathbf'\mathbf\mathbf = \sum_a_ x_i x_j In other words, it sums up all possible combinations of products of pairs of elements from x, with a separate coefficient for each. In addition, since x_i x_j = x_j x_i, only the sum a_ + a_ matters for any off-diagonal elements of A, and there is no loss of generality in assuming that A is symmetric matrix, symmetric. Furthermore, if A is symmetric, then the form \mathbf'\mathbf\mathbf = \mathbf'\mathbf\mathbf.


Sum of differences from the mean

Another useful formula is as follows: \sum_^n (x_i-\mu)^2 = \sum_^n (x_i-\bar)^2 + n(\bar -\mu)^2 where \bar = \frac \sum_^n x_i.


With known variance

For a set of i.i.d. normally distributed data points X of size ''n'' where each individual point ''x'' follows x \sim \mathcal(\mu, \sigma^2) with known
variance In probability theory and statistics, variance is the expectation of the squared deviation of a random variable from its population mean or sample mean. Variance is a measure of dispersion, meaning it is a measure of how far a set of numbers ...
σ2, the conjugate prior distribution is also normally distributed. This can be shown more easily by rewriting the variance as the
precision Precision, precise or precisely may refer to: Science, and technology, and mathematics Mathematics and computing (general) * Accuracy and precision, measurement deviation from true value and its scatter * Significant figures, the number of digit ...
, i.e. using τ = 1/σ2. Then if x \sim \mathcal(\mu, 1/\tau) and \mu \sim \mathcal(\mu_0, 1/\tau_0), we proceed as follows. First, the likelihood function is (using the formula above for the sum of differences from the mean): :\begin p(\mathbf\mid\mu,\tau) &= \prod_^n \sqrt \exp\left(-\frac\tau(x_i-\mu)^2\right) \\ &= \left(\frac\right)^ \exp\left(-\frac\tau \sum_^n (x_i-\mu)^2\right) \\ &= \left(\frac\right)^ \exp\left[-\frac\tau \left(\sum_^n(x_i-\bar)^2 + n(\bar -\mu)^2\right)\right]. \end Then, we proceed as follows: :\begin p(\mu\mid\mathbf) &\propto p(\mathbf\mid\mu) p(\mu) \\ & = \left(\frac\right)^ \exp\left[-\frac\tau \left(\sum_^n(x_i-\bar)^2 + n(\bar -\mu)^2\right)\right] \sqrt \exp\left(-\frac\tau_0(\mu-\mu_0)^2\right) \\ &\propto \exp\left(-\frac\left(\tau\left(\sum_^n(x_i-\bar)^2 + n(\bar -\mu)^2\right) + \tau_0(\mu-\mu_0)^2\right)\right) \\ &\propto \exp\left(-\frac \left(n\tau(\bar-\mu)^2 + \tau_0(\mu-\mu_0)^2 \right)\right) \\ &= \exp\left(-\frac(n\tau + \tau_0)\left(\mu - \dfrac\right)^2 + \frac(\bar - \mu_0)^2\right) \\ &\propto \exp\left(-\frac(n\tau + \tau_0)\left(\mu - \dfrac\right)^2\right) \end In the above derivation, we used the formula above for the sum of two quadratics and eliminated all constant factors not involving ''μ''. The result is the kernel (statistics), kernel of a normal distribution, with mean \frac and precision n\tau + \tau_0, i.e. :p(\mu\mid\mathbf) \sim \mathcal\left(\frac, \frac\right) This can be written as a set of Bayesian update equations for the posterior parameters in terms of the prior parameters: :\begin \tau_0' &= \tau_0 + n\tau \\[5pt] \mu_0' &= \frac \\[5pt] \bar &= \frac\sum_^n x_i \end That is, to combine ''n'' data points with total precision of ''nτ'' (or equivalently, total variance of ''n''/''σ''2) and mean of values \bar, derive a new total precision simply by adding the total precision of the data to the prior total precision, and form a new mean through a ''precision-weighted average'', i.e. a weighted average of the data mean and the prior mean, each weighted by the associated total precision. This makes logical sense if the precision is thought of as indicating the certainty of the observations: In the distribution of the posterior mean, each of the input components is weighted by its certainty, and the certainty of this distribution is the sum of the individual certainties. (For the intuition of this, compare the expression "the whole is (or is not) greater than the sum of its parts". In addition, consider that the knowledge of the posterior comes from a combination of the knowledge of the prior and likelihood, so it makes sense that we are more certain of it than of either of its components.) The above formula reveals why it is more convenient to do Bayesian analysis of conjugate priors for the normal distribution in terms of the precision. The posterior precision is simply the sum of the prior and likelihood precisions, and the posterior mean is computed through a precision-weighted average, as described above. The same formulas can be written in terms of variance by reciprocating all the precisions, yielding the more ugly formulas :\begin ' &= \frac \\[5pt] \mu_0' &= \frac \\[5pt] \bar &= \frac\sum_^n x_i \end


With known mean

For a set of i.i.d. normally distributed data points X of size ''n'' where each individual point ''x'' follows x \sim \mathcal(\mu, \sigma^2) with known mean μ, the conjugate prior of the
variance In probability theory and statistics, variance is the expectation of the squared deviation of a random variable from its population mean or sample mean. Variance is a measure of dispersion, meaning it is a measure of how far a set of numbers ...
has an inverse gamma distribution or a scaled inverse chi-squared distribution. The two are equivalent 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. The prior for σ2 is as follows: :p(\sigma^2\mid\nu_0,\sigma_0^2) = \frac~\frac \propto \frac The likelihood function from above, written in terms of the variance, is: :\begin p(\mathbf\mid\mu,\sigma^2) &= \left(\frac\right)^ \exp\left[-\frac \sum_^n (x_i-\mu)^2\right] \\ &= \left(\frac\right)^ \exp\left[-\frac\right] \end where :S = \sum_^n (x_i-\mu)^2. Then: :\begin p(\sigma^2\mid\mathbf) &\propto p(\mathbf\mid\sigma^2) p(\sigma^2) \\ &= \left(\frac\right)^ \exp\left[-\frac\right] \frac~\frac \\ &\propto \left(\frac\right)^ \frac \exp\left[-\frac + \frac\right] \\ &= \frac \exp\left[-\frac\right] \end The above is also a scaled inverse chi-squared distribution where :\begin \nu_0' &= \nu_0 + n \\ \nu_0'' &= \nu_0 \sigma_0^2 + \sum_^n (x_i-\mu)^2 \end or equivalently :\begin \nu_0' &= \nu_0 + n \\ ' &= \frac \end Reparameterizing in terms of an inverse gamma distribution, the result is: :\begin \alpha' &= \alpha + \frac \\ \beta' &= \beta + \frac \end


With unknown mean and unknown variance

For a set of i.i.d. normally distributed data points X of size ''n'' where each individual point ''x'' follows x \sim \mathcal(\mu, \sigma^2) with unknown mean μ and unknown
variance In probability theory and statistics, variance is the expectation of the squared deviation of a random variable from its population mean or sample mean. Variance is a measure of dispersion, meaning it is a measure of how far a set of numbers ...
σ2, a combined (multivariate) conjugate prior is placed over the mean and variance, consisting of a normal-inverse-gamma distribution. Logically, this originates as follows: # From the analysis of the case with unknown mean but known variance, we see that the update equations involve sufficient statistics computed from the data consisting of the mean of the data points and the total variance of the data points, computed in turn from the known variance divided by the number of data points. # From the analysis of the case with unknown variance but known mean, we see that the update equations involve sufficient statistics over the data consisting of the number of data points and sum of squared deviations. # Keep in mind that the posterior update values serve as the prior distribution when further data is handled. Thus, we should logically think of our priors in terms of the sufficient statistics just described, with the same semantics kept in mind as much as possible. # To handle the case where both mean and variance are unknown, we could place independent priors over the mean and variance, with fixed estimates of the average mean, total variance, number of data points used to compute the variance prior, and sum of squared deviations. Note however that in reality, the total variance of the mean depends on the unknown variance, and the sum of squared deviations that goes into the variance prior (appears to) depend on the unknown mean. In practice, the latter dependence is relatively unimportant: Shifting the actual mean shifts the generated points by an equal amount, and on average the squared deviations will remain the same. This is not the case, however, with the total variance of the mean: As the unknown variance increases, the total variance of the mean will increase proportionately, and we would like to capture this dependence. # This suggests that we create a ''conditional prior'' of the mean on the unknown variance, with a hyperparameter specifying the mean of the pseudo-observations associated with the prior, and another parameter specifying the number of pseudo-observations. This number serves as a scaling parameter on the variance, making it possible to control the overall variance of the mean relative to the actual variance parameter. The prior for the variance also has two hyperparameters, one specifying the sum of squared deviations of the pseudo-observations associated with the prior, and another specifying once again the number of pseudo-observations. Note that each of the priors has a hyperparameter specifying the number of pseudo-observations, and in each case this controls the relative variance of that prior. These are given as two separate hyperparameters so that the variance (aka the confidence) of the two priors can be controlled separately. # This leads immediately to the normal-inverse-gamma distribution, which is the product of the two distributions just defined, with conjugate priors used (an inverse gamma distribution over the variance, and a normal distribution over the mean, ''conditional'' on the variance) and with the same four parameters just defined. The priors are normally defined as follows: :\begin p(\mu\mid\sigma^2; \mu_0, n_0) &\sim \mathcal(\mu_0,\sigma^2/n_0) \\ p(\sigma^2; \nu_0,\sigma_0^2) &\sim I\chi^2(\nu_0,\sigma_0^2) = IG(\nu_0/2, \nu_0\sigma_0^2/2) \end The update equations can be derived, and look as follows: :\begin \bar &= \frac 1 n \sum_^n x_i \\ \mu_0' &= \frac \\ n_0' &= n_0 + n \\ \nu_0' &= \nu_0 + n \\ \nu_0'' &= \nu_0 \sigma_0^2 + \sum_^n (x_i-\bar)^2 + \frac(\mu_0 - \bar)^2 \end The respective numbers of pseudo-observations add the number of actual observations to them. The new mean hyperparameter is once again a weighted average, this time weighted by the relative numbers of observations. Finally, the update for \nu_0'' is similar to the case with known mean, but in this case the sum of squared deviations is taken with respect to the observed data mean rather than the true mean, and as a result a new "interaction term" needs to be added to take care of the additional error source stemming from the deviation between prior and data mean.


Occurrence and applications

The occurrence of normal distribution in practical problems can be loosely classified into four categories: # Exactly normal distributions; # Approximately normal laws, for example when such approximation is justified by the
central limit theorem In probability theory, the central limit theorem (CLT) establishes that, in many situations, when independent random variables are summed up, their properly normalized sum tends toward a normal distribution even if the original variables themselv ...
; and # Distributions modeled as normal – the normal distribution being the distribution with Principle of maximum entropy, maximum entropy for a given mean and variance. # Regression problems – the normal distribution being found after systematic effects have been modeled sufficiently well.


Exact normality

Certain quantities in physics are distributed normally, as was first demonstrated by James Clerk Maxwell. Examples of such quantities are: * Probability density function of a ground state in a quantum harmonic oscillator. * The position of a particle that experiences diffusion. If initially the particle is located at a specific point (that is its probability distribution is the Dirac delta function), then after time ''t'' its location is described by a normal distribution with variance ''t'', which satisfies the diffusion equation \frac f(x,t) = \frac \frac f(x,t). If the initial location is given by a certain density function g(x), then the density at time ''t'' is the convolution of ''g'' and the normal PDF.


Approximate normality

''Approximately'' normal distributions occur in many situations, as explained by the
central limit theorem In probability theory, the central limit theorem (CLT) establishes that, in many situations, when independent random variables are summed up, their properly normalized sum tends toward a normal distribution even if the original variables themselv ...
. When the outcome is produced by many small effects acting ''additively and independently'', its distribution will be close to normal. The normal approximation will not be valid if the effects act multiplicatively (instead of additively), or if there is a single external influence that has a considerably larger magnitude than the rest of the effects. * In counting problems, where the central limit theorem includes a discrete-to-continuum approximation and where Infinite divisibility, infinitely divisible and Indecomposable distribution, decomposable distributions are involved, such as ** binomial distribution, Binomial random variables, associated with binary response variables; ** Poisson distribution, Poisson random variables, associated with rare events; * Thermal radiation has a Bose–Einstein statistics, Bose–Einstein distribution on very short time scales, and a normal distribution on longer timescales due to the central limit theorem.


Assumed normality

There are statistical methods to empirically test that assumption; see the above #Normality tests, Normality tests section. * In biology, the ''logarithm'' of various variables tend to have a normal distribution, that is, they tend to have a
log-normal distribution In probability theory, a log-normal (or lognormal) distribution is a continuous probability distribution of a random variable whose logarithm is normally distributed. Thus, if the random variable is log-normally distributed, then has a normal ...
(after separation on male/female subpopulations), with examples including: ** Measures of size of living tissue (length, height, skin area, weight); ** The ''length'' of ''inert'' appendages (hair, claws, nails, teeth) of biological specimens, ''in the direction of growth''; presumably the thickness of tree bark also falls under this category; ** Certain physiological measurements, such as blood pressure of adult humans. * In finance, in particular the Black–Scholes model, changes in the ''logarithm'' of exchange rates, price indices, and stock market indices are assumed normal (these variables behave like compound interest, not like simple interest, and so are multiplicative). Some mathematicians such as Benoit Mandelbrot have argued that Levy skew alpha-stable distribution, log-Levy distributions, which possesses heavy tails would be a more appropriate model, in particular for the analysis for stock market crashes. The use of the assumption of normal distribution occurring in financial models has also been criticized by Nassim Nicholas Taleb in his works. * Propagation of uncertainty, Measurement errors in physical experiments are often modeled by a normal distribution. This use of a normal distribution does not imply that one is assuming the measurement errors are normally distributed, rather using the normal distribution produces the most conservative predictions possible given only knowledge about the mean and variance of the errors. * In Standardized testing (statistics), standardized testing, results can be made to have a normal distribution by either selecting the number and difficulty of questions (as in the Intelligence quotient, IQ test) or transforming the raw test scores into "output" scores by fitting them to the normal distribution. For example, the SAT's traditional range of 200–800 is based on a normal distribution with a mean of 500 and a standard deviation of 100. * Many scores are derived from the normal distribution, including percentile ranks ("percentiles" or "quantiles"), normal curve equivalents, stanines, Standard score, z-scores, and T-scores. Additionally, some behavioral statistical procedures assume that scores are normally distributed; for example, Student's t-test, t-tests and Analysis of variance, ANOVAs. Bell curve grading assigns relative grades based on a normal distribution of scores. * In hydrology the distribution of long duration river discharge or rainfall, e.g. monthly and yearly totals, is often thought to be practically normal according to the
central limit theorem In probability theory, the central limit theorem (CLT) establishes that, in many situations, when independent random variables are summed up, their properly normalized sum tends toward a normal distribution even if the original variables themselv ...
. The blue picture, made with CumFreq, illustrates an example of fitting the normal distribution to ranked October rainfalls showing the 90% confidence belt based on the
binomial distribution In probability theory and statistics, the binomial distribution with parameters ''n'' and ''p'' is the discrete probability distribution of the number of successes in a sequence of ''n'' independent experiments, each asking a yes–no quest ...
. The rainfall data are represented by plotting positions as part of the cumulative frequency analysis.


Methodological problems and peer review

John Ioannidis argues that using normally distributed standard deviations as standards for validating research findings leave falsifiability, falsifiable predictions about phenomena that are not normally distributed untested. This includes, for example, phenomena that only appear when all necessary conditions are present and one cannot be a substitute for another in an addition-like way and phenomena that are not randomly distributed. Ioannidis argues that standard deviation-centered validation gives a false appearance of validity to hypotheses and theories where some but not all falsifiable predictions are normally distributed since the portion of falsifiable predictions that there is evidence against may and in some cases are in the non-normally distributed parts of the range of falsifiable predictions, as well as baselessly dismissing hypotheses for which none of the falsifiable predictions are normally distributed as if were they unfalsifiable when in fact they do make falsifiable predictions. It is argued by Ioannidis that many cases of mutually exclusive theories being accepted as "validated" by research journals are caused by failure of the journals to take in empirical falsifications of non-normally distributed predictions, and not because mutually exclusive theories are true, which they cannot be, although two mutually exclusive theories can both be wrong and a third one correct.


Computational methods


Generating values from normal distribution

In computer simulations, especially in applications of the Monte-Carlo method, it is often desirable to generate values that are normally distributed. The algorithms listed below all generate the standard normal deviates, since a can be generated as , where ''Z'' is standard normal. All these algorithms rely on the availability of a random number generator ''U'' capable of producing Uniform distribution (continuous), uniform random variates. * The most straightforward method is based on the probability integral transform property: if ''U'' is distributed uniformly on (0,1), then Φ−1(''U'') will have the standard normal distribution. The drawback of this method is that it relies on calculation of the
probit function In probability theory and statistics, the probit function is the quantile function associated with the standard normal distribution. It has applications in data analysis and machine learning, in particular exploratory statistical graphics and ...
Φ−1, which cannot be done analytically. Some approximate methods are described in and in the error function, erf article. Wichura gives a fast algorithm for computing this function to 16 decimal places, which is used by R programming language, R to compute random variates of the normal distribution. * Irwin–Hall distribution#Approximating a Normal distribution, An easy-to-program approximate approach that relies on the
central limit theorem In probability theory, the central limit theorem (CLT) establishes that, in many situations, when independent random variables are summed up, their properly normalized sum tends toward a normal distribution even if the original variables themselv ...
is as follows: generate 12 uniform ''U''(0,1) deviates, add them all up, and subtract 6 – the resulting random variable will have approximately standard normal distribution. In truth, the distribution will be Irwin–Hall distribution, Irwin–Hall, which is a 12-section eleventh-order polynomial approximation to the normal distribution. This random deviate will have a limited range of (−6, 6). Note that in a true normal distribution, only 0.00034% of all samples will fall outside ±6σ. * The Box–Muller transform, Box–Muller method uses two independent random numbers ''U'' and ''V'' distributed uniform distribution (continuous), uniformly on (0,1). Then the two random variables ''X'' and ''Y'' X = \sqrt \, \cos(2 \pi V) , \qquad Y = \sqrt \, \sin(2 \pi V) . will both have the standard normal distribution, and will be
independent Independent or Independents may refer to: Arts, entertainment, and media Artist groups * Independents (artist group), a group of modernist painters based in the New Hope, Pennsylvania, area of the United States during the early 1930s * Independ ...
. This formulation arises because for a bivariate normal random vector (''X'', ''Y'') the squared norm will have the
chi-squared distribution In probability theory and statistics, the chi-squared distribution (also chi-square or \chi^2-distribution) with k degrees of freedom is the distribution of a sum of the squares of k independent standard normal random variables. The chi-squa ...
with two degrees of freedom, which is an easily generated exponential distribution, exponential random variable corresponding to the quantity −2ln(''U'') in these equations; and the angle is distributed uniformly around the circle, chosen by the random variable ''V''. * The Marsaglia polar method is a modification of the Box–Muller method which does not require computation of the sine and cosine functions. In this method, ''U'' and ''V'' are drawn from the uniform (−1,1) distribution, and then is computed. If ''S'' is greater or equal to 1, then the method starts over, otherwise the two quantities X = U\sqrt, \qquad Y = V\sqrt are returned. Again, ''X'' and ''Y'' are independent, standard normal random variables. * The Ratio method is a rejection method. The algorithm proceeds as follows: ** Generate two independent uniform deviates ''U'' and ''V''; ** Compute ''X'' = (''V'' − 0.5)/''U''; ** Optional: if ''X''2 ≤ 5 − 4''e''1/4''U'' then accept ''X'' and terminate algorithm; ** Optional: if ''X''2 ≥ 4''e''−1.35/''U'' + 1.4 then reject ''X'' and start over from step 1; ** If ''X''2 ≤ −4 ln''U'' then accept ''X'', otherwise start over the algorithm. *:The two optional steps allow the evaluation of the logarithm in the last step to be avoided in most cases. These steps can be greatly improved so that the logarithm is rarely evaluated. * The ziggurat algorithm is faster than the Box–Muller transform and still exact. In about 97% of all cases it uses only two random numbers, one random integer and one random uniform, one multiplication and an if-test. Only in 3% of the cases, where the combination of those two falls outside the "core of the ziggurat" (a kind of rejection sampling using logarithms), do exponentials and more uniform random numbers have to be employed. * Integer arithmetic can be used to sample from the standard normal distribution. This method is exact in the sense that it satisfies the conditions of ''ideal approximation''; i.e., it is equivalent to sampling a real number from the standard normal distribution and rounding this to the nearest representable floating point number. * There is also some investigation into the connection between the fast Hadamard transform and the normal distribution, since the transform employs just addition and subtraction and by the central limit theorem random numbers from almost any distribution will be transformed into the normal distribution. In this regard a series of Hadamard transforms can be combined with random permutations to turn arbitrary data sets into a normally distributed data.


Numerical approximations for the normal CDF and normal quantile function

The standard normal cumulative distribution function, CDF is widely used in scientific and statistical computing. The values Φ(''x'') may be approximated very accurately by a variety of methods, such as numerical integration, Taylor series, asymptotic series and Gauss's continued fraction#Of Kummer's confluent hypergeometric function, continued fractions. Different approximations are used depending on the desired level of accuracy. * give the approximation for Φ(''x'') for ''x > 0'' with the absolute error (algorith
26.2.17
: \Phi(x) = 1 - \varphi(x)\left(b_1 t + b_2 t^2 + b_3t^3 + b_4 t^4 + b_5 t^5\right) + \varepsilon(x), \qquad t = \frac, where ''ϕ''(''x'') is the standard normal PDF, and ''b''0 = 0.2316419, ''b''1 = 0.319381530, ''b''2 = −0.356563782, ''b''3 = 1.781477937, ''b''4 = −1.821255978, ''b''5 = 1.330274429. * lists some dozens of approximations – by means of rational functions, with or without exponentials – for the function. His algorithms vary in the degree of complexity and the resulting precision, with maximum absolute precision of 24 digits. An algorithm by combines Hart's algorithm 5666 with a continued fraction approximation in the tail to provide a fast computation algorithm with a 16-digit precision. * after recalling Hart68 solution is not suited for erf, gives a solution for both erf and erfc, with maximal relative error bound, via rational function, Rational Chebyshev Approximation. * suggested a simple algorithm based on the Taylor series expansion \Phi(x) = \frac12 + \varphi(x)\left( x + \frac 3 + \frac + \frac + \frac + \cdots \right) for calculating with arbitrary precision. The drawback of this algorithm is comparatively slow calculation time (for example it takes over 300 iterations to calculate the function with 16 digits of precision when ). * The GNU Scientific Library calculates values of the standard normal CDF using Hart's algorithms and approximations with Chebyshev polynomials. Shore (1982) introduced simple approximations that may be incorporated in stochastic optimization models of engineering and operations research, like reliability engineering and inventory analysis. Denoting , the simplest approximation for the quantile function is: z = \Phi^(p)=5.5556\left[1- \left( \frac p \right)^\right],\qquad p\ge 1/2 This approximation delivers for ''z'' a maximum absolute error of 0.026 (for , corresponding to ). For replace ''p'' by and change sign. Another approximation, somewhat less accurate, is the single-parameter approximation: z=-0.4115\left\, \qquad p\ge 1/2 The latter had served to derive a simple approximation for the loss integral of the normal distribution, defined by \begin L(z) & =\int_z^\infty (u-z)\varphi(u) \, du=\int_z^\infty [1-\Phi (u)] \, du \\[5pt] L(z) & \approx \begin 0.4115\left(\dfrac p \right) - z, & p<1/2, \\ \\ 0.4115\left( \dfrac p \right), & p\ge 1/2. \end \\[5pt] \text \\ L(z) & \approx \begin 0.4115\left\, & p < 1/2, \\ \\ 0.4115 \dfrac p, & p\ge 1/2. \end \end This approximation is particularly accurate for the right far-tail (maximum error of 10−3 for z≥1.4). Highly accurate approximations for the CDF, based on Response modeling methodology, Response Modeling Methodology (RMM, Shore, 2011, 2012), are shown in Shore (2005). Some more approximations can be found at: Error function#Approximation with elementary functions. In particular, small ''relative'' error on the whole domain for the CDF \Phi and the quantile function \Phi^ as well, is achieved via an explicitly invertible formula by Sergei Winitzki in 2008.


History


Development

Some authors attribute the credit for the discovery of the normal distribution to Abraham de Moivre, de Moivre, who in 1738 published in the second edition of his "''The Doctrine of Chances''" the study of the coefficients in the binomial expansion of . De Moivre proved that the middle term in this expansion has the approximate magnitude of 2^n/\sqrt, and that "If ''m'' or ''n'' be a Quantity infinitely great, then the Logarithm of the Ratio, which a Term distant from the middle by the Interval ''ℓ'', has to the middle Term, is -\frac." Although this theorem can be interpreted as the first obscure expression for the normal probability law, Stephen Stigler, Stigler points out that de Moivre himself did not interpret his results as anything more than the approximate rule for the binomial coefficients, and in particular de Moivre lacked the concept of the probability density function. In 1823 Carl Friedrich Gauss, Gauss published his monograph "''Theoria combinationis observationum erroribus minimis obnoxiae''" where among other things he introduces several important statistical concepts, such as the method of least squares, the method of maximum likelihood, and the ''normal distribution''. Gauss used ''M'', , to denote the measurements of some unknown quantity ''V'', and sought the "most probable" estimator of that quantity: the one that maximizes the probability of obtaining the observed experimental results. In his notation φΔ is the probability density function of the measurement errors of magnitude Δ. Not knowing what the function ''φ'' is, Gauss requires that his method should reduce to the well-known answer: the arithmetic mean of the measured values. Starting from these principles, Gauss demonstrates that the only law that rationalizes the choice of arithmetic mean as an estimator of the location parameter, is the normal law of errors: \varphi\mathit = \frac h \, e^, where ''h'' is "the measure of the precision of the observations". Using this normal law as a generic model for errors in the experiments, Gauss formulates what is now known as the non-linear least squares, non-linear weighted least squares method. Although Gauss was the first to suggest the normal distribution law, Pierre Simon de Laplace, Laplace made significant contributions. It was Laplace who first posed the problem of aggregating several observations in 1774, although his own solution led to the Laplacian distribution. It was Laplace who first calculated the value of the Gaussian integral, integral in 1782, providing the normalization constant for the normal distribution. Finally, it was Laplace who in 1810 proved and presented to the Academy the fundamental
central limit theorem In probability theory, the central limit theorem (CLT) establishes that, in many situations, when independent random variables are summed up, their properly normalized sum tends toward a normal distribution even if the original variables themselv ...
, which emphasized the theoretical importance of the normal distribution. It is of interest to note that in 1809 an Irish-American mathematician Robert Adrain published two insightful but flawed derivations of the normal probability law, simultaneously and independently from Gauss. His works remained largely unnoticed by the scientific community, until in 1871 they were exhumed by Cleveland Abbe, Abbe. In the middle of the 19th century James Clerk Maxwell, Maxwell demonstrated that the normal distribution is not just a convenient mathematical tool, but may also occur in natural phenomena: "The number of particles whose velocity, resolved in a certain direction, lies between ''x'' and ''x'' + ''dx'' is \operatorname \frac\; e^ \, dx


Naming

Today, the concept is usually known in English as the normal distribution or Gaussian distribution. Other less common names include Gauss distribution, Laplace-Gauss distribution, the law of error, the law of facility of errors, Laplace's second law, Gaussian law. Gauss himself apparently coined the term with reference to the "normal equations" involved in its applications, with normal having its technical meaning of orthogonal rather than "usual". However, by the end of the 19th century some authors had started using the name ''normal distribution'', where the word "normal" was used as an adjective – the term now being seen as a reflection of the fact that this distribution was seen as typical, common – and thus "normal". Charles Sanders Peirce, Peirce (one of those authors) once defined "normal" thus: "...the 'normal' is not the average (or any other kind of mean) of what actually occurs, but of what ''would'', in the long run, occur under certain circumstances." Around the turn of the 20th century Karl Pearson, Pearson popularized the term ''normal'' as a designation for this distribution. Also, it was Pearson who first wrote the distribution in terms of the standard deviation ''σ'' as in modern notation. Soon after this, in year 1915, Ronald Fisher, Fisher added the location parameter to the formula for normal distribution, expressing it in the way it is written nowadays: df = \frac e^ \, dx. The term "standard normal", which denotes the normal distribution with zero mean and unit variance came into general use around the 1950s, appearing in the popular textbooks by P. G. Hoel (1947) "''Introduction to mathematical statistics''" and A. M. Mood (1950) "''Introduction to the theory of statistics''".


See also

* Bates distribution – similar to the Irwin–Hall distribution, but rescaled back into the 0 to 1 range * Behrens–Fisher problem – the long-standing problem of testing whether two normal samples with different variances have same means; * Bhattacharyya distance – method used to separate mixtures of normal distributions * Erdős–Kac theorem – on the occurrence of the normal distribution in number theory * Full width at half maximum * Gaussian blur – convolution, which uses the normal distribution as a kernel * Modified half-normal distribution with the pdf on (0, \infty) is given as f(x)= \frac, where \Psi(\alpha,z)=_1\Psi_1\left(\begin\left(\alpha,\frac\right)\\(1,0)\end;z \right) denotes the Fox-Wright Psi function. * Normally distributed and uncorrelated does not imply independent * Ratio normal distribution * Reciprocal normal distribution * Standard normal table * Stein's lemma * Sub-Gaussian distribution * Sum of normally distributed random variables * Tweedie distribution – The normal distribution is a member of the family of Tweedie exponential dispersion models. * Wrapped normal distribution – the Normal distribution applied to a circular domain * Z-test – using the normal distribution


Notes


References


Citations


Sources

* * In particular, the entries fo
"bell-shaped and bell curve"
an

* * * * * * * * * * * * * * * * * * * * * * * * Translated by Stephen M. Stigler in ''Statistical Science'' 1 (3), 1986: . * * * * * * * * * * * * * * * * * * * * * * * * * * * *


External links

*
Normal distribution calculator
{{Authority control Normal distribution, Continuous distributions Conjugate prior distributions Exponential family distributions Stable distributions Location-scale family probability distributions]">X - \mu, ^p\right&= \sigma^p (p-1)!! \cdot \begin \sqrt & \textp\text \\ 1 & \textp\text \end \\ &= \sigma^p \cdot \frac. \end The last formula is valid also for any non-integer p>-1. When the mean \mu \ne 0, the plain and absolute moments can be expressed in terms of
confluent hypergeometric function In mathematics, a confluent hypergeometric function is a solution of a confluent hypergeometric equation, which is a degenerate form of a hypergeometric differential equation where two of the three regular singularities merge into an irregular ...
s _1F_1 and U. :\begin \operatorname\left ^p\right&= \sigma^p\cdot (-i\sqrt 2)^p U\left(-\frac, \frac, -\frac \left( \frac \mu \sigma \right)^2 \right), \\ \operatorname\left Hermite polynomials#"Negative variance", generalized Hermite polynomials. The expectation of X conditioned on the event that X lies in an interval ,b/math> is given by :\operatorname\left \mid a= \mu - \sigma^2\frac where f and F respectively are the density and the cumulative distribution function of X. For b=\infty this is known as the
inverse Mills ratio In probability theory, the Mills ratio (or Mills's ratio) of a continuous random variable X is the function : m(x) := \frac , where f(x) is the probability density function, and :\bar(x) := \Pr x.html" ;"title=">x">>x= \int_x^ f(u)\, du is the ...
. Note that above, density f of X is used instead of standard normal density as in inverse Mills ratio, so here we have \sigma^2 instead of \sigma.


Fourier transform and characteristic function

The
Fourier transform A Fourier transform (FT) is a mathematical transform that decomposes functions into frequency components, which are represented by the output of the transform as a function of frequency. Most commonly functions of time or space are transformed, ...
of a normal density f with mean \mu and standard deviation \sigma is : \hat f(t) = \int_^\infty f(x)e^ \, dx = e^ e^ where i is the
imaginary unit The imaginary unit or unit imaginary number () is a solution to the quadratic equation x^2+1=0. Although there is no real number with this property, can be used to extend the real numbers to what are called complex numbers, using addition an ...
. If the mean \mu=0, the first factor is 1, and the Fourier transform is, apart from a constant factor, a normal density on the
frequency domain In physics, electronics, control systems engineering, and statistics, the frequency domain refers to the analysis of mathematical functions or signals with respect to frequency, rather than time. Put simply, a time-domain graph shows how a signa ...
, with mean 0 and standard deviation 1/\sigma. In particular, the standard normal distribution \varphi is an
eigenfunction In mathematics, an eigenfunction of a linear operator ''D'' defined on some function space is any non-zero function f in that space that, when acted upon by ''D'', is only multiplied by some scaling factor called an eigenvalue. As an equation, th ...
of the Fourier transform. In probability theory, the Fourier transform of the probability distribution of a real-valued random variable X is closely connected to the
characteristic function In mathematics, the term "characteristic function" can refer to any of several distinct concepts: * The indicator function of a subset, that is the function ::\mathbf_A\colon X \to \, :which for a given subset ''A'' of ''X'', has value 1 at points ...
\varphi_X(t) of that variable, which is defined as the
expected value In probability theory, the expected value (also called expectation, expectancy, mathematical expectation, mean, average, or first moment) is a generalization of the weighted average. Informally, the expected value is the arithmetic mean of a l ...
of e^, as a function of the real variable t (the
frequency Frequency is the number of occurrences of a repeating event per unit of time. It is also occasionally referred to as ''temporal frequency'' for clarity, and is distinct from ''angular frequency''. Frequency is measured in hertz (Hz) which is eq ...
parameter of the Fourier transform). This definition can be analytically extended to a complex-value variable t. The relation between both is: :\varphi_X(t) = \hat f(-t)


Moment and cumulant generating functions

The
moment generating function In probability theory and statistics, the moment-generating function of a real-valued random variable is an alternative specification of its probability distribution. Thus, it provides the basis of an alternative route to analytical results compare ...
of a real random variable X is the expected value of e^, as a function of the real parameter t. For a normal distribution with density f, mean \mu and deviation \sigma, the moment generating function exists and is equal to :M(t) = \operatorname ^= \hat f(it) = e^ e^ The
cumulant generating function In probability theory and statistics, the cumulants of a probability distribution are a set of quantities that provide an alternative to the '' moments'' of the distribution. Any two probability distributions whose moments are identical will have ...
is the logarithm of the moment generating function, namely :g(t) = \ln M(t) = \mu t + \tfrac 12 \sigma^2 t^2 Since this is a quadratic polynomial in t, only the first two
cumulant In probability theory and statistics, the cumulants of a probability distribution are a set of quantities that provide an alternative to the '' moments'' of the distribution. Any two probability distributions whose moments are identical will ha ...
s are nonzero, namely the mean \mu and the variance \sigma^2.


Stein operator and class

Within
Stein's method Stein's method is a general method in probability theory to obtain bounds on the distance between two probability distributions with respect to a probability metric. It was introduced by Charles Stein, who first published it in 1972, to obtain ...
the Stein operator and class of a random variable X \sim \mathcal(\mu, \sigma^2) are \mathcalf(x) = \sigma^2 f'(x) - (x-\mu)f(x) and \mathcal the class of all absolutely continuous functions f : \R \to \R \mbox\mathbb[, f'(X), ]< \infty.


Zero-variance limit

In the limit (mathematics), limit when \sigma tends to zero, the probability density f(x) eventually tends to zero at any x\ne \mu, but grows without limit if x = \mu, while its integral remains equal to 1. Therefore, the normal distribution cannot be defined as an ordinary
function Function or functionality may refer to: Computing * Function key, a type of key on computer keyboards * Function model, a structured representation of processes in a system * Function object or functor or functionoid, a concept of object-oriente ...
when \sigma = 0. However, one can define the normal distribution with zero variance as a
generalized function In mathematics, generalized functions are objects extending the notion of functions. There is more than one recognized theory, for example the theory of distributions. Generalized functions are especially useful in making discontinuous functions ...
; specifically, as Dirac's "delta function" \delta translated by the mean \mu, that is f(x)=\delta(x-\mu). Its CDF is then the
Heaviside step function The Heaviside step function, or the unit step function, usually denoted by or (but sometimes , or ), is a step function, named after Oliver Heaviside (1850–1925), the value of which is zero for negative arguments and one for positive argume ...
translated by the mean \mu, namely :F(x) = \begin 0 & \textx < \mu \\ 1 & \textx \geq \mu \end


Maximum entropy

Of all probability distributions over the reals with a specified mean \mu and variance \sigma^2, the normal distribution N(\mu,\sigma^2) is the one with maximum entropy. If X is a
continuous random variable In probability theory and statistics, a probability distribution is the mathematical function that gives the probabilities of occurrence of different possible outcomes for an experiment. It is a mathematical description of a random phenomenon i ...
with
probability density In probability theory, a probability density function (PDF), or density of a continuous random variable, is a function whose value at any given sample (or point) in the sample space (the set of possible values taken by the random variable) can ...
f(x), then the entropy of X is defined as : H(X) = - \int_^\infty f(x)\log f(x)\, dx where f(x)\log f(x) is understood to be zero whenever f(x)=0. This functional can be maximized, subject to the constraints that the distribution is properly normalized and has a specified variance, by using
variational calculus The calculus of variations (or Variational Calculus) is a field of mathematical analysis that uses variations, which are small changes in functions and functionals, to find maxima and minima of functionals: mappings from a set of functions t ...
. A function with two
Lagrange multipliers In mathematical optimization, the method of Lagrange multipliers is a strategy for finding the local maxima and minima of a function subject to equality constraints (i.e., subject to the condition that one or more equations have to be satisfied ex ...
is defined: : L=\int_^\infty f(x)\ln(f(x))\,dx-\lambda_0\left(1-\int_^\infty f(x)\,dx\right)-\lambda\left(\sigma^2-\int_^\infty f(x)(x-\mu)^2\,dx\right) where f(x) is, for now, regarded as some density function with mean \mu and standard deviation \sigma. At maximum entropy, a small variation \delta f(x) about f(x) will produce a variation \delta L about L which is equal to 0: : 0=\delta L=\int_^\infty \delta f(x)\left (\ln(f(x))+1+\lambda_0+\lambda(x-\mu)^2\right )\,dx Since this must hold for any small \delta f(x), the term in brackets must be zero, and solving for f(x) yields: :f(x)=e^ Using the constraint equations to solve for \lambda_0 and \lambda yields the density of the normal distribution: : f(x, \mu, \sigma)=\frace^ The entropy of a normal distribution is equal to : H(X)=\tfrac(1+\log(2\sigma^2\pi))


Other properties


Related distributions


Central limit theorem

The central limit theorem states that under certain (fairly common) conditions, the sum of many random variables will have an approximately normal distribution. More specifically, where X_1,\ldots ,X_n are
independent and identically distributed In probability theory and statistics, a collection of random variables is independent and identically distributed if each random variable has the same probability distribution as the others and all are mutually independent. This property is usua ...
random variables with the same arbitrary distribution, zero mean, and variance \sigma^2 and Z is their mean scaled by \sqrt : Z = \sqrt\left(\frac\sum_^n X_i\right) Then, as n increases, the probability distribution of Z will tend to the normal distribution with zero mean and variance \sigma^2. The theorem can be extended to variables (X_i) that are not independent and/or not identically distributed if certain constraints are placed on the degree of dependence and the moments of the distributions. Many
test statistic A test statistic is a statistic (a quantity derived from the sample) used in statistical hypothesis testing.Berger, R. L.; Casella, G. (2001). ''Statistical Inference'', Duxbury Press, Second Edition (p.374) A hypothesis test is typically specif ...
s, scores, and
estimator In statistics, an estimator is a rule for calculating an estimate of a given quantity based on observed data: thus the rule (the estimator), the quantity of interest (the estimand) and its result (the estimate) are distinguished. For example, the ...
s encountered in practice contain sums of certain random variables in 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 distributions. The central limit theorem also implies that certain distributions can be approximated by the normal distribution, for example: * The
binomial distribution In probability theory and statistics, the binomial distribution with parameters ''n'' and ''p'' is the discrete probability distribution of the number of successes in a sequence of ''n'' independent experiments, each asking a yes–no quest ...
B(n,p) is approximately normal with mean np and variance np(1-p) for large n and for p not too close to 0 or 1. * The
Poisson distribution In probability theory and statistics, the Poisson distribution is a discrete probability distribution that expresses the probability of a given number of events occurring in a fixed interval of time or space if these events occur with a known co ...
with parameter \lambda is approximately normal with mean \lambda and variance \lambda, for large values of \lambda. * The
chi-squared distribution In probability theory and statistics, the chi-squared distribution (also chi-square or \chi^2-distribution) with k degrees of freedom is the distribution of a sum of the squares of k independent standard normal random variables. The chi-squa ...
\chi^2(k) is approximately normal with mean k and variance 2k, for large k. * The
Student's t-distribution In probability and statistics, Student's ''t''-distribution (or simply the ''t''-distribution) is any member of a family of continuous probability distributions that arise when estimating the mean of a normally distributed population in sit ...
t(\nu) is approximately normal with mean 0 and variance 1 when \nu is large. Whether these approximations are sufficiently accurate depends on the purpose for which they are needed, and the rate of convergence to the normal distribution. It is typically the case that such approximations are less accurate in the tails of the distribution. A general upper bound for the approximation error in the central limit theorem is given by the
Berry–Esseen theorem In probability theory, the central limit theorem states that, under certain circumstances, the probability distribution of the scaled mean of a random sample converges to a normal distribution as the sample size increases to infinity. Under strong ...
, improvements of the approximation are given by the
Edgeworth expansion The Gram–Charlier A series (named in honor of Jørgen Pedersen Gram and Carl Charlier), and the Edgeworth series (named in honor of Francis Ysidro Edgeworth) are series that approximate a probability distribution in terms of its cumulants. The se ...
s. This theorem can also be used to justify modeling the sum of many uniform noise sources as
Gaussian noise Gaussian noise, named after Carl Friedrich Gauss, is a term from signal processing theory denoting a kind of signal noise that has a probability density function (pdf) equal to that of the normal distribution (which is also known as the Gaussia ...
. See
AWGN Additive white Gaussian noise (AWGN) is a basic noise model used in information theory to mimic the effect of many random processes that occur in nature. The modifiers denote specific characteristics: * ''Additive'' because it is added to any nois ...
.


Operations and functions of normal variables

The
probability density In probability theory, a probability density function (PDF), or density of a continuous random variable, is a function whose value at any given sample (or point) in the sample space (the set of possible values taken by the random variable) can ...
,
cumulative distribution In statistics, the frequency (or absolute frequency) of an event i is the number n_i of times the observation has occurred/recorded in an experiment or study. These frequencies are often depicted graphically or in tabular form. Types The cumul ...
, and inverse cumulative distribution of any function of one or more independent or correlated normal variables can be computed with the numerical method of ray-tracing
Matlab code
. In the following sections we look at some special cases.


Operations on a single normal variable

If X is distributed normally with mean \mu and variance \sigma^2, then * aX+b, for any real numbers a and b, is also normally distributed, with mean a\mu+b and standard deviation , a, \sigma. That is, the family of normal distributions is closed under linear transformations. * The exponential of X is distributed log-normally: . * The absolute value of X has
folded normal distribution The folded normal distribution is a probability distribution related to the normal distribution. Given a normally distributed random variable ''X'' with mean ''μ'' and variance ''σ''2, the random variable ''Y'' = , ''X'', has a folded normal d ...
: . If \mu = 0 this is known as the
half-normal distribution In probability theory and statistics, the half-normal distribution is a special case of the folded normal distribution. Let X follow an ordinary normal distribution, N(0,\sigma^2). Then, Y=, X, follows a half-normal distribution. Thus, the hal ...
. * The absolute value of normalized residuals, , ''X'' − ''μ'', /''σ'', has
chi distribution In probability theory and statistics, the chi distribution is a continuous probability distribution. It is the distribution of the positive square root of the sum of squares of a set of independent random variables each following a standard norm ...
with one degree of freedom: , X - \mu, / \sigma \sim \chi_1. * The square of ''X''/''σ'' has the
noncentral chi-squared distribution In probability theory and statistics, the noncentral chi-squared distribution (or noncentral chi-square distribution, noncentral \chi^2 distribution) is a noncentral generalization of the chi-squared distribution. It often arises in the power a ...
with one degree of freedom: X^2 / \sigma^2 \sim \chi_1^2(\mu^2 / \sigma^2). If \mu = 0, the distribution is called simply chi-squared. * The log likelihood of a normal variable x is simply the log of its
probability density function In probability theory, a probability density function (PDF), or density of a continuous random variable, is a function whose value at any given sample (or point) in the sample space (the set of possible values taken by the random variable) can ...
: \ln p(x)= -\frac \left(\frac \right)^2 -\ln \left(\sigma \sqrt \right) = -\frac z^2 -\ln \left(\sigma \sqrt \right). Since this is a scaled and shifted square of a standard normal variable, it is distributed as a scaled and shifted chi-squared variable. * The distribution of the variable ''X'' restricted to an interval 'a'', ''b''is called the
truncated normal distribution In probability and statistics, the truncated normal distribution is the probability distribution derived from that of a normally distributed random variable by bounding the random variable from either below or above (or both). The truncated no ...
. * (''X'' − ''μ'')−2 has a
Lévy distribution In probability theory and statistics, the Lévy distribution, named after Paul Lévy, is a continuous probability distribution for a non-negative random variable. In spectroscopy, this distribution, with frequency as the dependent variable, is kn ...
with location 0 and scale ''σ''−2.


= Operations on two independent normal variables

= * If X_1 and X_2 are two
independent Independent or Independents may refer to: Arts, entertainment, and media Artist groups * Independents (artist group), a group of modernist painters based in the New Hope, Pennsylvania, area of the United States during the early 1930s * Independ ...
normal random variables, with means \mu_1, \mu_2 and standard deviations \sigma_1, \sigma_2, then their sum X_1 + X_2 will also be normally distributed, roof/sup> with mean \mu_1 + \mu_2 and variance \sigma_1^2 + \sigma_2^2. * In particular, if X and Y are independent normal deviates with zero mean and variance \sigma^2, then X + Y and X - Y are also independent and normally distributed, with zero mean and variance 2\sigma^2. This is a special case of the
polarization identity In linear algebra, a branch of mathematics, the polarization identity is any one of a family of formulas that express the inner product of two vectors in terms of the norm of a normed vector space. If a norm arises from an inner product then t ...
. * If X_1, X_2 are two independent normal deviates with mean \mu and deviation \sigma, and a, b are arbitrary real numbers, then the variable X_3 = \frac + \mu is also normally distributed with mean \mu and deviation \sigma. It follows that the normal distribution is
stable A stable is a building in which livestock, especially horses, are kept. It most commonly means a building that is divided into separate stalls for individual animals and livestock. There are many different types of stables in use today; the ...
(with exponent \alpha=2).


= Operations on two independent standard normal variables

= If X_1 and X_2 are two independent standard normal random variables with mean 0 and variance 1, then * Their sum and difference is distributed normally with mean zero and variance two: X_1 \pm X_2 \sim N(0, 2). * Their product Z = X_1 X_2 follows the
product distribution A product distribution is a probability distribution constructed as the distribution of the product of random variables having two other known distributions. Given two statistically independent random variables ''X'' and ''Y'', the distribution of ...
with density function f_Z(z) = \pi^ K_0(, z, ) where K_0 is the
modified Bessel function of the second kind Bessel functions, first defined by the mathematician Daniel Bernoulli and then generalized by Friedrich Bessel, are canonical solutions of Bessel's differential equation x^2 \frac + x \frac + \left(x^2 - \alpha^2 \right)y = 0 for an arbitrary ...
. This distribution is symmetric around zero, unbounded at z = 0, and has the
characteristic function In mathematics, the term "characteristic function" can refer to any of several distinct concepts: * The indicator function of a subset, that is the function ::\mathbf_A\colon X \to \, :which for a given subset ''A'' of ''X'', has value 1 at points ...
\phi_Z(t) = (1 + t^2)^. * Their ratio follows the standard
Cauchy distribution The Cauchy distribution, named after Augustin Cauchy, is a continuous probability distribution. It is also known, especially among physicists, as the Lorentz distribution (after Hendrik Lorentz), Cauchy–Lorentz distribution, Lorentz(ian) fun ...
: X_1/ X_2 \sim \operatorname(0, 1). * Their Euclidean norm \sqrt has the
Rayleigh distribution In probability theory and statistics, the Rayleigh distribution is a continuous probability distribution for nonnegative-valued random variables. Up to rescaling, it coincides with the chi distribution with two degrees of freedom. The distribut ...
.


Operations on multiple independent normal variables

* Any linear combination of independent normal deviates is a normal deviate. * If X_1, X_2, \ldots, X_n are independent standard normal random variables, then the sum of their squares has the
chi-squared distribution In probability theory and statistics, the chi-squared distribution (also chi-square or \chi^2-distribution) with k degrees of freedom is the distribution of a sum of the squares of k independent standard normal random variables. The chi-squa ...
with n degrees of freedom X_1^2 + \cdots + X_n^2 \sim \chi_n^2. * If X_1, X_2, \ldots, X_n are independent normally distributed random variables with means \mu and variances \sigma^2, then their
sample mean The sample mean (or "empirical mean") and the sample covariance are statistics computed from a Sample (statistics), sample of data on one or more random variables. The sample mean is the average value (or mean, mean value) of a sample (statistic ...
is independent from the sample
standard deviation In statistics, the standard deviation is a measure of the amount of variation or dispersion of a set of values. A low standard deviation indicates that the values tend to be close to the mean (also called the expected value) of the set, while ...
, which can be demonstrated using Basu's theorem or
Cochran's theorem In statistics, Cochran's theorem, devised by William G. Cochran, is a theorem used to justify results relating to the probability distributions of statistics that are used in the analysis of variance. Statement Let ''U''1, ..., ''U'N'' be i.i. ...
. The ratio of these two quantities will have the
Student's t-distribution In probability and statistics, Student's ''t''-distribution (or simply the ''t''-distribution) is any member of a family of continuous probability distributions that arise when estimating the mean of a normally distributed population in sit ...
with n-1 degrees of freedom: t = \frac = \frac \sim t_. * If X_1, X_2, \ldots, X_n, Y_1, Y_2, \ldots, Y_m are independent standard normal random variables, then the ratio of their normalized sums of squares will have the with degrees of freedom: F = \frac \sim F_.


Operations on multiple correlated normal variables

* A
quadratic form In mathematics, a quadratic form is a polynomial with terms all of degree two ("form" is another name for a homogeneous polynomial). For example, :4x^2 + 2xy - 3y^2 is a quadratic form in the variables and . The coefficients usually belong to a ...
of a normal vector, i.e. a quadratic function q = \sum x_i^2 + \sum x_j + c of multiple independent or correlated normal variables, is a generalized chi-square variable.


Operations on the density function

The split normal distribution is most directly defined in terms of joining scaled sections of the density functions of different normal distributions and rescaling the density to integrate to one. The
truncated normal distribution In probability and statistics, the truncated normal distribution is the probability distribution derived from that of a normally distributed random variable by bounding the random variable from either below or above (or both). The truncated no ...
results from rescaling a section of a single density function.


Infinite divisibility and Cramér's theorem

For any positive integer \text, any normal distribution with mean \mu and variance \sigma^2 is the distribution of the sum of \text independent normal deviates, each with mean \frac and variance \frac. This property is called
infinite divisibility Infinite divisibility arises in different ways in philosophy, physics, economics, order theory (a branch of mathematics), and probability theory (also a branch of mathematics). One may speak of infinite divisibility, or the lack thereof, of matter ...
. Conversely, if X_1 and X_2 are independent random variables and their sum X_1+X_2 has a normal distribution, then both X_1 and X_2 must be normal deviates. This result is known as Cramér's decomposition theorem, and is equivalent to saying that the convolution of two distributions is normal if and only if both are normal. Cramér's theorem implies that a linear combination of independent non-Gaussian variables will never have an exactly normal distribution, although it may approach it arbitrarily closely.


Bernstein's theorem

Bernstein's theorem states that if X and Y are independent and X + Y and X - Y are also independent, then both ''X'' and ''Y'' must necessarily have normal distributions. More generally, if X_1, \ldots, X_n are independent random variables, then two distinct linear combinations \sum and \sumwill be independent if and only if all X_k are normal and \sum, where \sigma_k^2 denotes the variance of X_k.


Extensions

The notion of normal distribution, being one of the most important distributions in probability theory, has been extended far beyond the standard framework of the univariate (that is one-dimensional) case (Case 1). All these extensions are also called ''normal'' or ''Gaussian'' laws, so a certain ambiguity in names exists. * The
multivariate normal distribution In probability theory and statistics, the multivariate normal distribution, multivariate Gaussian distribution, or joint normal distribution is a generalization of the one-dimensional (univariate) normal distribution to higher dimensions. One d ...
describes the Gaussian law in the ''k''-dimensional Euclidean space. A vector is multivariate-normally distributed if any linear combination of its components has a (univariate) normal distribution. The variance of ''X'' is a ''k×k'' symmetric positive-definite matrix ''V''. The multivariate normal distribution is a special case of the
elliptical distribution In probability and statistics, an elliptical distribution is any member of a broad family of probability distributions that generalize the multivariate normal distribution. Intuitively, in the simplified two and three dimensional case, the joint di ...
s. As such, its iso-density loci in the ''k'' = 2 case are ellipses and in the case of arbitrary ''k'' are ellipsoids. * Rectified Gaussian distribution a rectified version of normal distribution with all the negative elements reset to 0 * Complex normal distribution deals with the complex normal vectors. A complex vector is said to be normal if both its real and imaginary components jointly possess a 2''k''-dimensional multivariate normal distribution. The variance-covariance structure of ''X'' is described by two matrices: the ''variance'' matrix Γ, and the ''relation'' matrix ''C''. * Matrix normal distribution describes the case of normally distributed matrices. * Gaussian processes are the normally distributed stochastic processes. These can be viewed as elements of some infinite-dimensional Hilbert space ''H'', and thus are the analogues of multivariate normal vectors for the case . A random element is said to be normal if for any constant the scalar product has a (univariate) normal distribution. The variance structure of such Gaussian random element can be described in terms of the linear ''covariance ''. Several Gaussian processes became popular enough to have their own names: ** Wiener process, Brownian motion, ** Brownian bridge, ** Ornstein–Uhlenbeck process. * Gaussian q-distribution is an abstract mathematical construction that represents a "q-analogue" of the normal distribution. * the q-Gaussian is an analogue of the Gaussian distribution, in the sense that it maximises the Tsallis entropy, and is one type of Tsallis distribution. Note that this distribution is different from the Gaussian q-distribution above. * The Kaniadakis Gaussian distribution, Kaniadakis ''κ''-Gaussian distribution is a generalization of the Gaussian distribution which arises from the Kaniadakis statistics, being one of the Kaniadakis distribution, Kaniadakis distributions. A random variable ''X'' has a two-piece normal distribution if it has a distribution : f_X( x ) = N( \mu, \sigma_1^2 ) \text x \le \mu : f_X( x ) = N( \mu, \sigma_2^2 ) \text x \ge \mu where ''μ'' is the mean and ''σ''1 and ''σ''2 are the standard deviations of the distribution to the left and right of the mean respectively. The mean, variance and third central moment of this distribution have been determined : \operatorname( X ) = \mu + \sqrt ( \sigma_2 - \sigma_1 ) : \operatorname( X ) = \left( 1 - \frac 2 \pi\right)( \sigma_2 - \sigma_1 )^2 + \sigma_1 \sigma_2 : \operatorname( X ) = \sqrt( \sigma_2 - \sigma_1 ) \left[ \left( \frac 4 \pi - 1 \right) ( \sigma_2 - \sigma_1)^2 + \sigma_1 \sigma_2 \right] where E(''X''), V(''X'') and T(''X'') are the mean, variance, and third central moment respectively. One of the main practical uses of the Gaussian law is to model the empirical distributions of many different random variables encountered in practice. In such case a possible extension would be a richer family of distributions, having more than two parameters and therefore being able to fit the empirical distribution more accurately. The examples of such extensions are: * Pearson distribution — a four-parameter family of probability distributions that extend the normal law to include different skewness and kurtosis values. * The generalized normal distribution, also known as the exponential power distribution, allows for distribution tails with thicker or thinner asymptotic behaviors.


Statistical inference


Estimation of parameters

It is often the case that we do not know the parameters of the normal distribution, but instead want to Estimation theory, estimate them. That is, having a sample (x_1, \ldots, x_n) from a normal N(\mu, \sigma^2) population we would like to learn the approximate values of parameters \mu and \sigma^2. The standard approach to this problem is the maximum likelihood method, which requires maximization of the ''log-likelihood function'': : \ln\mathcal(\mu,\sigma^2) = \sum_^n \ln f(x_i\mid\mu,\sigma^2) = -\frac\ln(2\pi) - \frac\ln\sigma^2 - \frac\sum_^n (x_i-\mu)^2. Taking derivatives with respect to \mu and \sigma^2 and solving the resulting system of first order conditions yields the ''maximum likelihood estimates'': : \hat = \overline \equiv \frac\sum_^n x_i, \qquad \hat^2 = \frac \sum_^n (x_i - \overline)^2.


Sample mean

Estimator \textstyle\hat\mu is called the ''
sample mean The sample mean (or "empirical mean") and the sample covariance are statistics computed from a Sample (statistics), sample of data on one or more random variables. The sample mean is the average value (or mean, mean value) of a sample (statistic ...
'', since it is the arithmetic mean of all observations. The statistic \textstyle\overline is complete statistic, complete and sufficient statistic, sufficient for \mu, and therefore by the Lehmann–Scheffé theorem, \textstyle\hat\mu is the uniformly minimum variance unbiased (UMVU) estimator. In finite samples it is distributed normally: : \hat\mu \sim \mathcal(\mu,\sigma^2/n). The variance of this estimator is equal to the ''μμ''-element of the inverse Fisher information matrix \textstyle\mathcal^. This implies that the estimator is efficient estimator, finite-sample efficient. Of practical importance is the fact that the standard error (statistics), standard error of \textstyle\hat\mu is proportional to \textstyle1/\sqrt, that is, if one wishes to decrease the standard error by a factor of 10, one must increase the number of points in the sample by a factor of 100. This fact is widely used in determining sample sizes for opinion polls and the number of trials in Monte Carlo simulations. From the standpoint of the asymptotic theory (statistics), asymptotic theory, \textstyle\hat\mu is consistent estimator, consistent, that is, it convergence in probability, converges in probability to \mu as n\rightarrow\infty. The estimator is also asymptotic normality, asymptotically normal, which is a simple corollary of the fact that it is normal in finite samples: : \sqrt(\hat\mu-\mu) \,\xrightarrow\, \mathcal(0,\sigma^2).


Sample variance

The estimator \textstyle\hat\sigma^2 is called the ''sample variance'', since it is the variance of the sample ((x_1, \ldots, x_n)). In practice, another estimator is often used instead of the \textstyle\hat\sigma^2. This other estimator is denoted s^2, and is also called the ''sample variance'', which represents a certain ambiguity in terminology; its square root s is called the ''sample standard deviation''. The estimator s^2 differs from \textstyle\hat\sigma^2 by having instead of ''n'' in the denominator (the so-called Bessel's correction): : s^2 = \frac \hat\sigma^2 = \frac \sum_^n (x_i - \overline)^2. The difference between s^2 and \textstyle\hat\sigma^2 becomes negligibly small for large ''n''s. In finite samples however, the motivation behind the use of s^2 is that it is an unbiased estimator of the underlying parameter \sigma^2, whereas \textstyle\hat\sigma^2 is biased. Also, by the Lehmann–Scheffé theorem the estimator s^2 is uniformly minimum variance unbiased (Minimum-variance unbiased estimator, UMVU), which makes it the "best" estimator among all unbiased ones. However it can be shown that the biased estimator \textstyle\hat\sigma^2 is "better" than the s^2 in terms of the mean squared error (MSE) criterion. In finite samples both s^2 and \textstyle\hat\sigma^2 have scaled
chi-squared distribution In probability theory and statistics, the chi-squared distribution (also chi-square or \chi^2-distribution) with k degrees of freedom is the distribution of a sum of the squares of k independent standard normal random variables. The chi-squa ...
with degrees of freedom: : s^2 \sim \frac \cdot \chi^2_, \qquad \hat\sigma^2 \sim \frac \cdot \chi^2_. The first of these expressions shows that the variance of s^2 is equal to 2\sigma^4/(n-1), which is slightly greater than the ''σσ''-element of the inverse Fisher information matrix \textstyle\mathcal^. Thus, s^2 is not an efficient estimator for \sigma^2, and moreover, since s^2 is UMVU, we can conclude that the finite-sample efficient estimator for \sigma^2 does not exist. Applying the asymptotic theory, both estimators s^2 and \textstyle\hat\sigma^2 are consistent, that is they converge in probability to \sigma^2 as the sample size n\rightarrow\infty. The two estimators are also both asymptotically normal: : \sqrt(\hat\sigma^2 - \sigma^2) \simeq \sqrt(s^2-\sigma^2) \,\xrightarrow\, \mathcal(0,2\sigma^4). In particular, both estimators are asymptotically efficient for \sigma^2.


Confidence intervals

By
Cochran's theorem In statistics, Cochran's theorem, devised by William G. Cochran, is a theorem used to justify results relating to the probability distributions of statistics that are used in the analysis of variance. Statement Let ''U''1, ..., ''U'N'' be i.i. ...
, for normal distributions the sample mean \textstyle\hat\mu and the sample variance ''s''2 are
independent Independent or Independents may refer to: Arts, entertainment, and media Artist groups * Independents (artist group), a group of modernist painters based in the New Hope, Pennsylvania, area of the United States during the early 1930s * Independ ...
, which means there can be no gain in considering their joint distribution. There is also a converse theorem: if in a sample the sample mean and sample variance are independent, then the sample must have come from the normal distribution. The independence between \textstyle\hat\mu and ''s'' can be employed to construct the so-called ''t-statistic'': : t = \frac = \frac \sim t_ This quantity ''t'' has the
Student's t-distribution In probability and statistics, Student's ''t''-distribution (or simply the ''t''-distribution) is any member of a family of continuous probability distributions that arise when estimating the mean of a normally distributed population in sit ...
with degrees of freedom, and it is an ancillary statistic (independent of the value of the parameters). Inverting the distribution of this ''t''-statistics will allow us to construct the
confidence interval In frequentist statistics, a confidence interval (CI) is a range of estimates for an unknown parameter. A confidence interval is computed at a designated ''confidence level''; the 95% confidence level is most common, but other levels, such as 9 ...
for ''μ''; similarly, inverting the ''χ''2 distribution of the statistic ''s''2 will give us the confidence interval for ''σ''2: :\mu \in \left[ \hat\mu - t_ \fracs, \hat\mu + t_ \fracs \right], :\sigma^2 \in \left[ \frac, \frac \right], where ''tk,p'' and are the ''p''th
quantile In statistics and probability, quantiles are cut points dividing the range of a probability distribution into continuous intervals with equal probabilities, or dividing the observations in a sample in the same way. There is one fewer quantile tha ...
s of the ''t''- and ''χ''2-distributions respectively. These confidence intervals are of the ''confidence level'' , meaning that the true values ''μ'' and ''σ''2 fall outside of these intervals with probability (or significance level) ''α''. In practice people usually take , resulting in the 95% confidence intervals. Approximate formulas can be derived from the asymptotic distributions of \textstyle\hat\mu and ''s''2: :\mu \in \left[ \hat\mu - , z_, \fracs, \hat\mu + , z_, \fracs \right], :\sigma^2 \in \left[ s^2 - , z_, \fracs^2, s^2 + , z_, \fracs^2 \right], The approximate formulas become valid for large values of ''n'', and are more convenient for the manual calculation since the standard normal quantiles ''z''''α''/2 do not depend on ''n''. In particular, the most popular value of , results in .


Normality tests

Normality tests assess the likelihood that the given data set comes from a normal distribution. Typically the null hypothesis ''H''0 is that the observations are distributed normally with unspecified mean ''μ'' and variance ''σ''2, versus the alternative ''Ha'' that the distribution is arbitrary. Many tests (over 40) have been devised for this problem. The more prominent of them are outlined below: Diagnostic plots are more intuitively appealing but subjective at the same time, as they rely on informal human judgement to accept or reject the null hypothesis. *
Q–Q plot In statistics, a Q–Q plot (quantile-quantile plot) is a probability plot, a List of graphical methods, graphical method for comparing two probability distributions by plotting their ''quantiles'' against each other. A point on the plot co ...
, also known as normal probability plot or rankit plot—is a plot of the sorted values from the data set against the expected values of the corresponding quantiles from the standard normal distribution. That is, it's a plot of point of the form (Φ−1(''pk''), ''x''(''k'')), where plotting points ''pk'' are equal to ''pk'' = (''k'' − ''α'')/(''n'' + 1 − 2''α'') and ''α'' is an adjustment constant, which can be anything between 0 and 1. If the null hypothesis is true, the plotted points should approximately lie on a straight line. * P–P plot – similar to the Q–Q plot, but used much less frequently. This method consists of plotting the points (Φ(''z''(''k'')), ''pk''), where \textstyle z_ = (x_-\hat\mu)/\hat\sigma. For normally distributed data this plot should lie on a 45° line between (0, 0) and (1, 1). Goodness-of-fit tests: ''Moment-based tests'': * D'Agostino's K-squared test * Jarque–Bera test * Shapiro–Wilk test: This is based on the fact that the line in the Q–Q plot has the slope of ''σ''. The test compares the least squares estimate of that slope with the value of the sample variance, and rejects the null hypothesis if these two quantities differ significantly. ''Tests based on the empirical distribution function'': * Anderson–Darling test * Lilliefors test (an adaptation of the Kolmogorov–Smirnov test)


Bayesian analysis of the normal distribution

Bayesian analysis of normally distributed data is complicated by the many different possibilities that may be considered: * Either the mean, or the variance, or neither, may be considered a fixed quantity. * When the variance is unknown, analysis may be done directly in terms of the variance, or in terms of the
precision Precision, precise or precisely may refer to: Science, and technology, and mathematics Mathematics and computing (general) * Accuracy and precision, measurement deviation from true value and its scatter * Significant figures, the number of digit ...
, the reciprocal of the variance. The reason for expressing the formulas in terms of precision is that the analysis of most cases is simplified. * Both univariate and multivariate normal distribution, multivariate cases need to be considered. * Either conjugate prior, conjugate or improper prior, improper prior distributions may be placed on the unknown variables. * An additional set of cases occurs in Bayesian linear regression, where in the basic model the data is assumed to be normally distributed, and normal priors are placed on the regression coefficients. The resulting analysis is similar to the basic cases of independent identically distributed data. The formulas for the non-linear-regression cases are summarized in the conjugate prior article.


Sum of two quadratics


= Scalar form

= The following auxiliary formula is useful for simplifying the posterior distribution, posterior update equations, which otherwise become fairly tedious. :a(x-y)^2 + b(x-z)^2 = (a + b)\left(x - \frac\right)^2 + \frac(y-z)^2 This equation rewrites the sum of two quadratics in ''x'' by expanding the squares, grouping the terms in ''x'', and completing the square. Note the following about the complex constant factors attached to some of the terms: # The factor \frac has the form of a weighted average of ''y'' and ''z''. # \frac = \frac = (a^ + b^)^. This shows that this factor can be thought of as resulting from a situation where the Multiplicative inverse, reciprocals of quantities ''a'' and ''b'' add directly, so to combine ''a'' and ''b'' themselves, it's necessary to reciprocate, add, and reciprocate the result again to get back into the original units. This is exactly the sort of operation performed by the harmonic mean, so it is not surprising that \frac is one-half the harmonic mean of ''a'' and ''b''.


= Vector form

= A similar formula can be written for the sum of two vector quadratics: If x, y, z are vectors of length ''k'', and A and B are symmetric matrix, symmetric, invertible matrices of size k\times k, then : \begin & (\mathbf-\mathbf)'\mathbf(\mathbf-\mathbf) + (\mathbf-\mathbf)' \mathbf(\mathbf-\mathbf) \\ = & (\mathbf - \mathbf)'(\mathbf+\mathbf)(\mathbf - \mathbf) + (\mathbf - \mathbf)'(\mathbf^ + \mathbf^)^(\mathbf - \mathbf) \end where :\mathbf = (\mathbf + \mathbf)^(\mathbf\mathbf + \mathbf \mathbf) Note that the form x′ A x is called a
quadratic form In mathematics, a quadratic form is a polynomial with terms all of degree two ("form" is another name for a homogeneous polynomial). For example, :4x^2 + 2xy - 3y^2 is a quadratic form in the variables and . The coefficients usually belong to a ...
and is a scalar (mathematics), scalar: :\mathbf'\mathbf\mathbf = \sum_a_ x_i x_j In other words, it sums up all possible combinations of products of pairs of elements from x, with a separate coefficient for each. In addition, since x_i x_j = x_j x_i, only the sum a_ + a_ matters for any off-diagonal elements of A, and there is no loss of generality in assuming that A is symmetric matrix, symmetric. Furthermore, if A is symmetric, then the form \mathbf'\mathbf\mathbf = \mathbf'\mathbf\mathbf.


Sum of differences from the mean

Another useful formula is as follows: \sum_^n (x_i-\mu)^2 = \sum_^n (x_i-\bar)^2 + n(\bar -\mu)^2 where \bar = \frac \sum_^n x_i.


With known variance

For a set of i.i.d. normally distributed data points X of size ''n'' where each individual point ''x'' follows x \sim \mathcal(\mu, \sigma^2) with known
variance In probability theory and statistics, variance is the expectation of the squared deviation of a random variable from its population mean or sample mean. Variance is a measure of dispersion, meaning it is a measure of how far a set of numbers ...
σ2, the conjugate prior distribution is also normally distributed. This can be shown more easily by rewriting the variance as the
precision Precision, precise or precisely may refer to: Science, and technology, and mathematics Mathematics and computing (general) * Accuracy and precision, measurement deviation from true value and its scatter * Significant figures, the number of digit ...
, i.e. using τ = 1/σ2. Then if x \sim \mathcal(\mu, 1/\tau) and \mu \sim \mathcal(\mu_0, 1/\tau_0), we proceed as follows. First, the likelihood function is (using the formula above for the sum of differences from the mean): :\begin p(\mathbf\mid\mu,\tau) &= \prod_^n \sqrt \exp\left(-\frac\tau(x_i-\mu)^2\right) \\ &= \left(\frac\right)^ \exp\left(-\frac\tau \sum_^n (x_i-\mu)^2\right) \\ &= \left(\frac\right)^ \exp\left[-\frac\tau \left(\sum_^n(x_i-\bar)^2 + n(\bar -\mu)^2\right)\right]. \end Then, we proceed as follows: :\begin p(\mu\mid\mathbf) &\propto p(\mathbf\mid\mu) p(\mu) \\ & = \left(\frac\right)^ \exp\left[-\frac\tau \left(\sum_^n(x_i-\bar)^2 + n(\bar -\mu)^2\right)\right] \sqrt \exp\left(-\frac\tau_0(\mu-\mu_0)^2\right) \\ &\propto \exp\left(-\frac\left(\tau\left(\sum_^n(x_i-\bar)^2 + n(\bar -\mu)^2\right) + \tau_0(\mu-\mu_0)^2\right)\right) \\ &\propto \exp\left(-\frac \left(n\tau(\bar-\mu)^2 + \tau_0(\mu-\mu_0)^2 \right)\right) \\ &= \exp\left(-\frac(n\tau + \tau_0)\left(\mu - \dfrac\right)^2 + \frac(\bar - \mu_0)^2\right) \\ &\propto \exp\left(-\frac(n\tau + \tau_0)\left(\mu - \dfrac\right)^2\right) \end In the above derivation, we used the formula above for the sum of two quadratics and eliminated all constant factors not involving ''μ''. The result is the kernel (statistics), kernel of a normal distribution, with mean \frac and precision n\tau + \tau_0, i.e. :p(\mu\mid\mathbf) \sim \mathcal\left(\frac, \frac\right) This can be written as a set of Bayesian update equations for the posterior parameters in terms of the prior parameters: :\begin \tau_0' &= \tau_0 + n\tau \\[5pt] \mu_0' &= \frac \\[5pt] \bar &= \frac\sum_^n x_i \end That is, to combine ''n'' data points with total precision of ''nτ'' (or equivalently, total variance of ''n''/''σ''2) and mean of values \bar, derive a new total precision simply by adding the total precision of the data to the prior total precision, and form a new mean through a ''precision-weighted average'', i.e. a weighted average of the data mean and the prior mean, each weighted by the associated total precision. This makes logical sense if the precision is thought of as indicating the certainty of the observations: In the distribution of the posterior mean, each of the input components is weighted by its certainty, and the certainty of this distribution is the sum of the individual certainties. (For the intuition of this, compare the expression "the whole is (or is not) greater than the sum of its parts". In addition, consider that the knowledge of the posterior comes from a combination of the knowledge of the prior and likelihood, so it makes sense that we are more certain of it than of either of its components.) The above formula reveals why it is more convenient to do Bayesian analysis of conjugate priors for the normal distribution in terms of the precision. The posterior precision is simply the sum of the prior and likelihood precisions, and the posterior mean is computed through a precision-weighted average, as described above. The same formulas can be written in terms of variance by reciprocating all the precisions, yielding the more ugly formulas :\begin ' &= \frac \\[5pt] \mu_0' &= \frac \\[5pt] \bar &= \frac\sum_^n x_i \end


With known mean

For a set of i.i.d. normally distributed data points X of size ''n'' where each individual point ''x'' follows x \sim \mathcal(\mu, \sigma^2) with known mean μ, the conjugate prior of the
variance In probability theory and statistics, variance is the expectation of the squared deviation of a random variable from its population mean or sample mean. Variance is a measure of dispersion, meaning it is a measure of how far a set of numbers ...
has an inverse gamma distribution or a scaled inverse chi-squared distribution. The two are equivalent 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. The prior for σ2 is as follows: :p(\sigma^2\mid\nu_0,\sigma_0^2) = \frac~\frac \propto \frac The likelihood function from above, written in terms of the variance, is: :\begin p(\mathbf\mid\mu,\sigma^2) &= \left(\frac\right)^ \exp\left[-\frac \sum_^n (x_i-\mu)^2\right] \\ &= \left(\frac\right)^ \exp\left[-\frac\right] \end where :S = \sum_^n (x_i-\mu)^2. Then: :\begin p(\sigma^2\mid\mathbf) &\propto p(\mathbf\mid\sigma^2) p(\sigma^2) \\ &= \left(\frac\right)^ \exp\left[-\frac\right] \frac~\frac \\ &\propto \left(\frac\right)^ \frac \exp\left[-\frac + \frac\right] \\ &= \frac \exp\left[-\frac\right] \end The above is also a scaled inverse chi-squared distribution where :\begin \nu_0' &= \nu_0 + n \\ \nu_0'' &= \nu_0 \sigma_0^2 + \sum_^n (x_i-\mu)^2 \end or equivalently :\begin \nu_0' &= \nu_0 + n \\ ' &= \frac \end Reparameterizing in terms of an inverse gamma distribution, the result is: :\begin \alpha' &= \alpha + \frac \\ \beta' &= \beta + \frac \end


With unknown mean and unknown variance

For a set of i.i.d. normally distributed data points X of size ''n'' where each individual point ''x'' follows x \sim \mathcal(\mu, \sigma^2) with unknown mean μ and unknown
variance In probability theory and statistics, variance is the expectation of the squared deviation of a random variable from its population mean or sample mean. Variance is a measure of dispersion, meaning it is a measure of how far a set of numbers ...
σ2, a combined (multivariate) conjugate prior is placed over the mean and variance, consisting of a normal-inverse-gamma distribution. Logically, this originates as follows: # From the analysis of the case with unknown mean but known variance, we see that the update equations involve sufficient statistics computed from the data consisting of the mean of the data points and the total variance of the data points, computed in turn from the known variance divided by the number of data points. # From the analysis of the case with unknown variance but known mean, we see that the update equations involve sufficient statistics over the data consisting of the number of data points and sum of squared deviations. # Keep in mind that the posterior update values serve as the prior distribution when further data is handled. Thus, we should logically think of our priors in terms of the sufficient statistics just described, with the same semantics kept in mind as much as possible. # To handle the case where both mean and variance are unknown, we could place independent priors over the mean and variance, with fixed estimates of the average mean, total variance, number of data points used to compute the variance prior, and sum of squared deviations. Note however that in reality, the total variance of the mean depends on the unknown variance, and the sum of squared deviations that goes into the variance prior (appears to) depend on the unknown mean. In practice, the latter dependence is relatively unimportant: Shifting the actual mean shifts the generated points by an equal amount, and on average the squared deviations will remain the same. This is not the case, however, with the total variance of the mean: As the unknown variance increases, the total variance of the mean will increase proportionately, and we would like to capture this dependence. # This suggests that we create a ''conditional prior'' of the mean on the unknown variance, with a hyperparameter specifying the mean of the pseudo-observations associated with the prior, and another parameter specifying the number of pseudo-observations. This number serves as a scaling parameter on the variance, making it possible to control the overall variance of the mean relative to the actual variance parameter. The prior for the variance also has two hyperparameters, one specifying the sum of squared deviations of the pseudo-observations associated with the prior, and another specifying once again the number of pseudo-observations. Note that each of the priors has a hyperparameter specifying the number of pseudo-observations, and in each case this controls the relative variance of that prior. These are given as two separate hyperparameters so that the variance (aka the confidence) of the two priors can be controlled separately. # This leads immediately to the normal-inverse-gamma distribution, which is the product of the two distributions just defined, with conjugate priors used (an inverse gamma distribution over the variance, and a normal distribution over the mean, ''conditional'' on the variance) and with the same four parameters just defined. The priors are normally defined as follows: :\begin p(\mu\mid\sigma^2; \mu_0, n_0) &\sim \mathcal(\mu_0,\sigma^2/n_0) \\ p(\sigma^2; \nu_0,\sigma_0^2) &\sim I\chi^2(\nu_0,\sigma_0^2) = IG(\nu_0/2, \nu_0\sigma_0^2/2) \end The update equations can be derived, and look as follows: :\begin \bar &= \frac 1 n \sum_^n x_i \\ \mu_0' &= \frac \\ n_0' &= n_0 + n \\ \nu_0' &= \nu_0 + n \\ \nu_0'' &= \nu_0 \sigma_0^2 + \sum_^n (x_i-\bar)^2 + \frac(\mu_0 - \bar)^2 \end The respective numbers of pseudo-observations add the number of actual observations to them. The new mean hyperparameter is once again a weighted average, this time weighted by the relative numbers of observations. Finally, the update for \nu_0'' is similar to the case with known mean, but in this case the sum of squared deviations is taken with respect to the observed data mean rather than the true mean, and as a result a new "interaction term" needs to be added to take care of the additional error source stemming from the deviation between prior and data mean.


Occurrence and applications

The occurrence of normal distribution in practical problems can be loosely classified into four categories: # Exactly normal distributions; # Approximately normal laws, for example when such approximation is justified by the
central limit theorem In probability theory, the central limit theorem (CLT) establishes that, in many situations, when independent random variables are summed up, their properly normalized sum tends toward a normal distribution even if the original variables themselv ...
; and # Distributions modeled as normal – the normal distribution being the distribution with Principle of maximum entropy, maximum entropy for a given mean and variance. # Regression problems – the normal distribution being found after systematic effects have been modeled sufficiently well.


Exact normality

Certain quantities in physics are distributed normally, as was first demonstrated by James Clerk Maxwell. Examples of such quantities are: * Probability density function of a ground state in a quantum harmonic oscillator. * The position of a particle that experiences diffusion. If initially the particle is located at a specific point (that is its probability distribution is the Dirac delta function), then after time ''t'' its location is described by a normal distribution with variance ''t'', which satisfies the diffusion equation \frac f(x,t) = \frac \frac f(x,t). If the initial location is given by a certain density function g(x), then the density at time ''t'' is the convolution of ''g'' and the normal PDF.


Approximate normality

''Approximately'' normal distributions occur in many situations, as explained by the
central limit theorem In probability theory, the central limit theorem (CLT) establishes that, in many situations, when independent random variables are summed up, their properly normalized sum tends toward a normal distribution even if the original variables themselv ...
. When the outcome is produced by many small effects acting ''additively and independently'', its distribution will be close to normal. The normal approximation will not be valid if the effects act multiplicatively (instead of additively), or if there is a single external influence that has a considerably larger magnitude than the rest of the effects. * In counting problems, where the central limit theorem includes a discrete-to-continuum approximation and where Infinite divisibility, infinitely divisible and Indecomposable distribution, decomposable distributions are involved, such as ** binomial distribution, Binomial random variables, associated with binary response variables; ** Poisson distribution, Poisson random variables, associated with rare events; * Thermal radiation has a Bose–Einstein statistics, Bose–Einstein distribution on very short time scales, and a normal distribution on longer timescales due to the central limit theorem.


Assumed normality

There are statistical methods to empirically test that assumption; see the above #Normality tests, Normality tests section. * In biology, the ''logarithm'' of various variables tend to have a normal distribution, that is, they tend to have a
log-normal distribution In probability theory, a log-normal (or lognormal) distribution is a continuous probability distribution of a random variable whose logarithm is normally distributed. Thus, if the random variable is log-normally distributed, then has a normal ...
(after separation on male/female subpopulations), with examples including: ** Measures of size of living tissue (length, height, skin area, weight); ** The ''length'' of ''inert'' appendages (hair, claws, nails, teeth) of biological specimens, ''in the direction of growth''; presumably the thickness of tree bark also falls under this category; ** Certain physiological measurements, such as blood pressure of adult humans. * In finance, in particular the Black–Scholes model, changes in the ''logarithm'' of exchange rates, price indices, and stock market indices are assumed normal (these variables behave like compound interest, not like simple interest, and so are multiplicative). Some mathematicians such as Benoit Mandelbrot have argued that Levy skew alpha-stable distribution, log-Levy distributions, which possesses heavy tails would be a more appropriate model, in particular for the analysis for stock market crashes. The use of the assumption of normal distribution occurring in financial models has also been criticized by Nassim Nicholas Taleb in his works. * Propagation of uncertainty, Measurement errors in physical experiments are often modeled by a normal distribution. This use of a normal distribution does not imply that one is assuming the measurement errors are normally distributed, rather using the normal distribution produces the most conservative predictions possible given only knowledge about the mean and variance of the errors. * In Standardized testing (statistics), standardized testing, results can be made to have a normal distribution by either selecting the number and difficulty of questions (as in the Intelligence quotient, IQ test) or transforming the raw test scores into "output" scores by fitting them to the normal distribution. For example, the SAT's traditional range of 200–800 is based on a normal distribution with a mean of 500 and a standard deviation of 100. * Many scores are derived from the normal distribution, including percentile ranks ("percentiles" or "quantiles"), normal curve equivalents, stanines, Standard score, z-scores, and T-scores. Additionally, some behavioral statistical procedures assume that scores are normally distributed; for example, Student's t-test, t-tests and Analysis of variance, ANOVAs. Bell curve grading assigns relative grades based on a normal distribution of scores. * In hydrology the distribution of long duration river discharge or rainfall, e.g. monthly and yearly totals, is often thought to be practically normal according to the
central limit theorem In probability theory, the central limit theorem (CLT) establishes that, in many situations, when independent random variables are summed up, their properly normalized sum tends toward a normal distribution even if the original variables themselv ...
. The blue picture, made with CumFreq, illustrates an example of fitting the normal distribution to ranked October rainfalls showing the 90% confidence belt based on the
binomial distribution In probability theory and statistics, the binomial distribution with parameters ''n'' and ''p'' is the discrete probability distribution of the number of successes in a sequence of ''n'' independent experiments, each asking a yes–no quest ...
. The rainfall data are represented by plotting positions as part of the cumulative frequency analysis.


Methodological problems and peer review

John Ioannidis argues that using normally distributed standard deviations as standards for validating research findings leave falsifiability, falsifiable predictions about phenomena that are not normally distributed untested. This includes, for example, phenomena that only appear when all necessary conditions are present and one cannot be a substitute for another in an addition-like way and phenomena that are not randomly distributed. Ioannidis argues that standard deviation-centered validation gives a false appearance of validity to hypotheses and theories where some but not all falsifiable predictions are normally distributed since the portion of falsifiable predictions that there is evidence against may and in some cases are in the non-normally distributed parts of the range of falsifiable predictions, as well as baselessly dismissing hypotheses for which none of the falsifiable predictions are normally distributed as if were they unfalsifiable when in fact they do make falsifiable predictions. It is argued by Ioannidis that many cases of mutually exclusive theories being accepted as "validated" by research journals are caused by failure of the journals to take in empirical falsifications of non-normally distributed predictions, and not because mutually exclusive theories are true, which they cannot be, although two mutually exclusive theories can both be wrong and a third one correct.


Computational methods


Generating values from normal distribution

In computer simulations, especially in applications of the Monte-Carlo method, it is often desirable to generate values that are normally distributed. The algorithms listed below all generate the standard normal deviates, since a can be generated as , where ''Z'' is standard normal. All these algorithms rely on the availability of a random number generator ''U'' capable of producing Uniform distribution (continuous), uniform random variates. * The most straightforward method is based on the probability integral transform property: if ''U'' is distributed uniformly on (0,1), then Φ−1(''U'') will have the standard normal distribution. The drawback of this method is that it relies on calculation of the
probit function In probability theory and statistics, the probit function is the quantile function associated with the standard normal distribution. It has applications in data analysis and machine learning, in particular exploratory statistical graphics and ...
Φ−1, which cannot be done analytically. Some approximate methods are described in and in the error function, erf article. Wichura gives a fast algorithm for computing this function to 16 decimal places, which is used by R programming language, R to compute random variates of the normal distribution. * Irwin–Hall distribution#Approximating a Normal distribution, An easy-to-program approximate approach that relies on the
central limit theorem In probability theory, the central limit theorem (CLT) establishes that, in many situations, when independent random variables are summed up, their properly normalized sum tends toward a normal distribution even if the original variables themselv ...
is as follows: generate 12 uniform ''U''(0,1) deviates, add them all up, and subtract 6 – the resulting random variable will have approximately standard normal distribution. In truth, the distribution will be Irwin–Hall distribution, Irwin–Hall, which is a 12-section eleventh-order polynomial approximation to the normal distribution. This random deviate will have a limited range of (−6, 6). Note that in a true normal distribution, only 0.00034% of all samples will fall outside ±6σ. * The Box–Muller transform, Box–Muller method uses two independent random numbers ''U'' and ''V'' distributed uniform distribution (continuous), uniformly on (0,1). Then the two random variables ''X'' and ''Y'' X = \sqrt \, \cos(2 \pi V) , \qquad Y = \sqrt \, \sin(2 \pi V) . will both have the standard normal distribution, and will be
independent Independent or Independents may refer to: Arts, entertainment, and media Artist groups * Independents (artist group), a group of modernist painters based in the New Hope, Pennsylvania, area of the United States during the early 1930s * Independ ...
. This formulation arises because for a bivariate normal random vector (''X'', ''Y'') the squared norm will have the
chi-squared distribution In probability theory and statistics, the chi-squared distribution (also chi-square or \chi^2-distribution) with k degrees of freedom is the distribution of a sum of the squares of k independent standard normal random variables. The chi-squa ...
with two degrees of freedom, which is an easily generated exponential distribution, exponential random variable corresponding to the quantity −2ln(''U'') in these equations; and the angle is distributed uniformly around the circle, chosen by the random variable ''V''. * The Marsaglia polar method is a modification of the Box–Muller method which does not require computation of the sine and cosine functions. In this method, ''U'' and ''V'' are drawn from the uniform (−1,1) distribution, and then is computed. If ''S'' is greater or equal to 1, then the method starts over, otherwise the two quantities X = U\sqrt, \qquad Y = V\sqrt are returned. Again, ''X'' and ''Y'' are independent, standard normal random variables. * The Ratio method is a rejection method. The algorithm proceeds as follows: ** Generate two independent uniform deviates ''U'' and ''V''; ** Compute ''X'' = (''V'' − 0.5)/''U''; ** Optional: if ''X''2 ≤ 5 − 4''e''1/4''U'' then accept ''X'' and terminate algorithm; ** Optional: if ''X''2 ≥ 4''e''−1.35/''U'' + 1.4 then reject ''X'' and start over from step 1; ** If ''X''2 ≤ −4 ln''U'' then accept ''X'', otherwise start over the algorithm. *:The two optional steps allow the evaluation of the logarithm in the last step to be avoided in most cases. These steps can be greatly improved so that the logarithm is rarely evaluated. * The ziggurat algorithm is faster than the Box–Muller transform and still exact. In about 97% of all cases it uses only two random numbers, one random integer and one random uniform, one multiplication and an if-test. Only in 3% of the cases, where the combination of those two falls outside the "core of the ziggurat" (a kind of rejection sampling using logarithms), do exponentials and more uniform random numbers have to be employed. * Integer arithmetic can be used to sample from the standard normal distribution. This method is exact in the sense that it satisfies the conditions of ''ideal approximation''; i.e., it is equivalent to sampling a real number from the standard normal distribution and rounding this to the nearest representable floating point number. * There is also some investigation into the connection between the fast Hadamard transform and the normal distribution, since the transform employs just addition and subtraction and by the central limit theorem random numbers from almost any distribution will be transformed into the normal distribution. In this regard a series of Hadamard transforms can be combined with random permutations to turn arbitrary data sets into a normally distributed data.


Numerical approximations for the normal CDF and normal quantile function

The standard normal cumulative distribution function, CDF is widely used in scientific and statistical computing. The values Φ(''x'') may be approximated very accurately by a variety of methods, such as numerical integration, Taylor series, asymptotic series and Gauss's continued fraction#Of Kummer's confluent hypergeometric function, continued fractions. Different approximations are used depending on the desired level of accuracy. * give the approximation for Φ(''x'') for ''x > 0'' with the absolute error (algorith
26.2.17
: \Phi(x) = 1 - \varphi(x)\left(b_1 t + b_2 t^2 + b_3t^3 + b_4 t^4 + b_5 t^5\right) + \varepsilon(x), \qquad t = \frac, where ''ϕ''(''x'') is the standard normal PDF, and ''b''0 = 0.2316419, ''b''1 = 0.319381530, ''b''2 = −0.356563782, ''b''3 = 1.781477937, ''b''4 = −1.821255978, ''b''5 = 1.330274429. * lists some dozens of approximations – by means of rational functions, with or without exponentials – for the function. His algorithms vary in the degree of complexity and the resulting precision, with maximum absolute precision of 24 digits. An algorithm by combines Hart's algorithm 5666 with a continued fraction approximation in the tail to provide a fast computation algorithm with a 16-digit precision. * after recalling Hart68 solution is not suited for erf, gives a solution for both erf and erfc, with maximal relative error bound, via rational function, Rational Chebyshev Approximation. * suggested a simple algorithm based on the Taylor series expansion \Phi(x) = \frac12 + \varphi(x)\left( x + \frac 3 + \frac + \frac + \frac + \cdots \right) for calculating with arbitrary precision. The drawback of this algorithm is comparatively slow calculation time (for example it takes over 300 iterations to calculate the function with 16 digits of precision when ). * The GNU Scientific Library calculates values of the standard normal CDF using Hart's algorithms and approximations with Chebyshev polynomials. Shore (1982) introduced simple approximations that may be incorporated in stochastic optimization models of engineering and operations research, like reliability engineering and inventory analysis. Denoting , the simplest approximation for the quantile function is: z = \Phi^(p)=5.5556\left[1- \left( \frac p \right)^\right],\qquad p\ge 1/2 This approximation delivers for ''z'' a maximum absolute error of 0.026 (for , corresponding to ). For replace ''p'' by and change sign. Another approximation, somewhat less accurate, is the single-parameter approximation: z=-0.4115\left\, \qquad p\ge 1/2 The latter had served to derive a simple approximation for the loss integral of the normal distribution, defined by \begin L(z) & =\int_z^\infty (u-z)\varphi(u) \, du=\int_z^\infty [1-\Phi (u)] \, du \\[5pt] L(z) & \approx \begin 0.4115\left(\dfrac p \right) - z, & p<1/2, \\ \\ 0.4115\left( \dfrac p \right), & p\ge 1/2. \end \\[5pt] \text \\ L(z) & \approx \begin 0.4115\left\, & p < 1/2, \\ \\ 0.4115 \dfrac p, & p\ge 1/2. \end \end This approximation is particularly accurate for the right far-tail (maximum error of 10−3 for z≥1.4). Highly accurate approximations for the CDF, based on Response modeling methodology, Response Modeling Methodology (RMM, Shore, 2011, 2012), are shown in Shore (2005). Some more approximations can be found at: Error function#Approximation with elementary functions. In particular, small ''relative'' error on the whole domain for the CDF \Phi and the quantile function \Phi^ as well, is achieved via an explicitly invertible formula by Sergei Winitzki in 2008.


History


Development

Some authors attribute the credit for the discovery of the normal distribution to Abraham de Moivre, de Moivre, who in 1738 published in the second edition of his "''The Doctrine of Chances''" the study of the coefficients in the binomial expansion of . De Moivre proved that the middle term in this expansion has the approximate magnitude of 2^n/\sqrt, and that "If ''m'' or ''n'' be a Quantity infinitely great, then the Logarithm of the Ratio, which a Term distant from the middle by the Interval ''ℓ'', has to the middle Term, is -\frac." Although this theorem can be interpreted as the first obscure expression for the normal probability law, Stephen Stigler, Stigler points out that de Moivre himself did not interpret his results as anything more than the approximate rule for the binomial coefficients, and in particular de Moivre lacked the concept of the probability density function. In 1823 Carl Friedrich Gauss, Gauss published his monograph "''Theoria combinationis observationum erroribus minimis obnoxiae''" where among other things he introduces several important statistical concepts, such as the method of least squares, the method of maximum likelihood, and the ''normal distribution''. Gauss used ''M'', , to denote the measurements of some unknown quantity ''V'', and sought the "most probable" estimator of that quantity: the one that maximizes the probability of obtaining the observed experimental results. In his notation φΔ is the probability density function of the measurement errors of magnitude Δ. Not knowing what the function ''φ'' is, Gauss requires that his method should reduce to the well-known answer: the arithmetic mean of the measured values. Starting from these principles, Gauss demonstrates that the only law that rationalizes the choice of arithmetic mean as an estimator of the location parameter, is the normal law of errors: \varphi\mathit = \frac h \, e^, where ''h'' is "the measure of the precision of the observations". Using this normal law as a generic model for errors in the experiments, Gauss formulates what is now known as the non-linear least squares, non-linear weighted least squares method. Although Gauss was the first to suggest the normal distribution law, Pierre Simon de Laplace, Laplace made significant contributions. It was Laplace who first posed the problem of aggregating several observations in 1774, although his own solution led to the Laplacian distribution. It was Laplace who first calculated the value of the Gaussian integral, integral in 1782, providing the normalization constant for the normal distribution. Finally, it was Laplace who in 1810 proved and presented to the Academy the fundamental
central limit theorem In probability theory, the central limit theorem (CLT) establishes that, in many situations, when independent random variables are summed up, their properly normalized sum tends toward a normal distribution even if the original variables themselv ...
, which emphasized the theoretical importance of the normal distribution. It is of interest to note that in 1809 an Irish-American mathematician Robert Adrain published two insightful but flawed derivations of the normal probability law, simultaneously and independently from Gauss. His works remained largely unnoticed by the scientific community, until in 1871 they were exhumed by Cleveland Abbe, Abbe. In the middle of the 19th century James Clerk Maxwell, Maxwell demonstrated that the normal distribution is not just a convenient mathematical tool, but may also occur in natural phenomena: "The number of particles whose velocity, resolved in a certain direction, lies between ''x'' and ''x'' + ''dx'' is \operatorname \frac\; e^ \, dx


Naming

Today, the concept is usually known in English as the normal distribution or Gaussian distribution. Other less common names include Gauss distribution, Laplace-Gauss distribution, the law of error, the law of facility of errors, Laplace's second law, Gaussian law. Gauss himself apparently coined the term with reference to the "normal equations" involved in its applications, with normal having its technical meaning of orthogonal rather than "usual". However, by the end of the 19th century some authors had started using the name ''normal distribution'', where the word "normal" was used as an adjective – the term now being seen as a reflection of the fact that this distribution was seen as typical, common – and thus "normal". Charles Sanders Peirce, Peirce (one of those authors) once defined "normal" thus: "...the 'normal' is not the average (or any other kind of mean) of what actually occurs, but of what ''would'', in the long run, occur under certain circumstances." Around the turn of the 20th century Karl Pearson, Pearson popularized the term ''normal'' as a designation for this distribution. Also, it was Pearson who first wrote the distribution in terms of the standard deviation ''σ'' as in modern notation. Soon after this, in year 1915, Ronald Fisher, Fisher added the location parameter to the formula for normal distribution, expressing it in the way it is written nowadays: df = \frac e^ \, dx. The term "standard normal", which denotes the normal distribution with zero mean and unit variance came into general use around the 1950s, appearing in the popular textbooks by P. G. Hoel (1947) "''Introduction to mathematical statistics''" and A. M. Mood (1950) "''Introduction to the theory of statistics''".


See also

* Bates distribution – similar to the Irwin–Hall distribution, but rescaled back into the 0 to 1 range * Behrens–Fisher problem – the long-standing problem of testing whether two normal samples with different variances have same means; * Bhattacharyya distance – method used to separate mixtures of normal distributions * Erdős–Kac theorem – on the occurrence of the normal distribution in number theory * Full width at half maximum * Gaussian blur – convolution, which uses the normal distribution as a kernel * Modified half-normal distribution with the pdf on (0, \infty) is given as f(x)= \frac, where \Psi(\alpha,z)=_1\Psi_1\left(\begin\left(\alpha,\frac\right)\\(1,0)\end;z \right) denotes the Fox-Wright Psi function. * Normally distributed and uncorrelated does not imply independent * Ratio normal distribution * Reciprocal normal distribution * Standard normal table * Stein's lemma * Sub-Gaussian distribution * Sum of normally distributed random variables * Tweedie distribution – The normal distribution is a member of the family of Tweedie exponential dispersion models. * Wrapped normal distribution – the Normal distribution applied to a circular domain * Z-test – using the normal distribution


Notes


References


Citations


Sources

* * In particular, the entries fo
"bell-shaped and bell curve"
an

* * * * * * * * * * * * * * * * * * * * * * * * Translated by Stephen M. Stigler in ''Statistical Science'' 1 (3), 1986: . * * * * * * * * * * * * * * * * * * * * * * * * * * * *


External links

*
Normal distribution calculator
{{Authority control Normal distribution, Continuous distributions Conjugate prior distributions Exponential family distributions Stable distributions Location-scale family probability distributions]">X - \mu, ^p\right&= \sigma^p (p-1)!! \cdot \begin \sqrt & \textp\text \\ 1 & \textp\text \end \\ &= \sigma^p \cdot \frac. \end The last formula is valid also for any non-integer p>-1. When the mean \mu \ne 0, the plain and absolute moments can be expressed in terms of
confluent hypergeometric function In mathematics, a confluent hypergeometric function is a solution of a confluent hypergeometric equation, which is a degenerate form of a hypergeometric differential equation where two of the three regular singularities merge into an irregular ...
s _1F_1 and U. :\begin \operatorname\left ^p\right&= \sigma^p\cdot (-i\sqrt 2)^p U\left(-\frac, \frac, -\frac \left( \frac \mu \sigma \right)^2 \right), \\ \operatorname\left[, X, ^p \right] &= \sigma^p \cdot 2^ \frac _1F_1\left( -\frac, \frac, -\frac \left( \frac \mu \sigma \right)^2 \right). \end These expressions remain valid even if p is not an integer. See also Hermite polynomials#"Negative variance", generalized Hermite polynomials. The expectation of X conditioned on the event that X lies in an interval ,b/math> is given by :\operatorname\left \mid a= \mu - \sigma^2\frac where f and F respectively are the density and the cumulative distribution function of X. For b=\infty this is known as the
inverse Mills ratio In probability theory, the Mills ratio (or Mills's ratio) of a continuous random variable X is the function : m(x) := \frac , where f(x) is the probability density function, and :\bar(x) := \Pr x.html" ;"title=">x">>x= \int_x^ f(u)\, du is the ...
. Note that above, density f of X is used instead of standard normal density as in inverse Mills ratio, so here we have \sigma^2 instead of \sigma.


Fourier transform and characteristic function

The
Fourier transform A Fourier transform (FT) is a mathematical transform that decomposes functions into frequency components, which are represented by the output of the transform as a function of frequency. Most commonly functions of time or space are transformed, ...
of a normal density f with mean \mu and standard deviation \sigma is : \hat f(t) = \int_^\infty f(x)e^ \, dx = e^ e^ where i is the
imaginary unit The imaginary unit or unit imaginary number () is a solution to the quadratic equation x^2+1=0. Although there is no real number with this property, can be used to extend the real numbers to what are called complex numbers, using addition an ...
. If the mean \mu=0, the first factor is 1, and the Fourier transform is, apart from a constant factor, a normal density on the
frequency domain In physics, electronics, control systems engineering, and statistics, the frequency domain refers to the analysis of mathematical functions or signals with respect to frequency, rather than time. Put simply, a time-domain graph shows how a signa ...
, with mean 0 and standard deviation 1/\sigma. In particular, the standard normal distribution \varphi is an
eigenfunction In mathematics, an eigenfunction of a linear operator ''D'' defined on some function space is any non-zero function f in that space that, when acted upon by ''D'', is only multiplied by some scaling factor called an eigenvalue. As an equation, th ...
of the Fourier transform. In probability theory, the Fourier transform of the probability distribution of a real-valued random variable X is closely connected to the
characteristic function In mathematics, the term "characteristic function" can refer to any of several distinct concepts: * The indicator function of a subset, that is the function ::\mathbf_A\colon X \to \, :which for a given subset ''A'' of ''X'', has value 1 at points ...
\varphi_X(t) of that variable, which is defined as the
expected value In probability theory, the expected value (also called expectation, expectancy, mathematical expectation, mean, average, or first moment) is a generalization of the weighted average. Informally, the expected value is the arithmetic mean of a l ...
of e^, as a function of the real variable t (the
frequency Frequency is the number of occurrences of a repeating event per unit of time. It is also occasionally referred to as ''temporal frequency'' for clarity, and is distinct from ''angular frequency''. Frequency is measured in hertz (Hz) which is eq ...
parameter of the Fourier transform). This definition can be analytically extended to a complex-value variable t. The relation between both is: :\varphi_X(t) = \hat f(-t)


Moment and cumulant generating functions

The
moment generating function In probability theory and statistics, the moment-generating function of a real-valued random variable is an alternative specification of its probability distribution. Thus, it provides the basis of an alternative route to analytical results compare ...
of a real random variable X is the expected value of e^, as a function of the real parameter t. For a normal distribution with density f, mean \mu and deviation \sigma, the moment generating function exists and is equal to :M(t) = \operatorname ^= \hat f(it) = e^ e^ The
cumulant generating function In probability theory and statistics, the cumulants of a probability distribution are a set of quantities that provide an alternative to the '' moments'' of the distribution. Any two probability distributions whose moments are identical will have ...
is the logarithm of the moment generating function, namely :g(t) = \ln M(t) = \mu t + \tfrac 12 \sigma^2 t^2 Since this is a quadratic polynomial in t, only the first two
cumulant In probability theory and statistics, the cumulants of a probability distribution are a set of quantities that provide an alternative to the '' moments'' of the distribution. Any two probability distributions whose moments are identical will ha ...
s are nonzero, namely the mean \mu and the variance \sigma^2.


Stein operator and class

Within
Stein's method Stein's method is a general method in probability theory to obtain bounds on the distance between two probability distributions with respect to a probability metric. It was introduced by Charles Stein, who first published it in 1972, to obtain ...
the Stein operator and class of a random variable X \sim \mathcal(\mu, \sigma^2) are \mathcalf(x) = \sigma^2 f'(x) - (x-\mu)f(x) and \mathcal the class of all absolutely continuous functions f : \R \to \R \mbox\mathbb[, f'(X), ]< \infty.


Zero-variance limit

In the limit (mathematics), limit when \sigma tends to zero, the probability density f(x) eventually tends to zero at any x\ne \mu, but grows without limit if x = \mu, while its integral remains equal to 1. Therefore, the normal distribution cannot be defined as an ordinary
function Function or functionality may refer to: Computing * Function key, a type of key on computer keyboards * Function model, a structured representation of processes in a system * Function object or functor or functionoid, a concept of object-oriente ...
when \sigma = 0. However, one can define the normal distribution with zero variance as a
generalized function In mathematics, generalized functions are objects extending the notion of functions. There is more than one recognized theory, for example the theory of distributions. Generalized functions are especially useful in making discontinuous functions ...
; specifically, as Dirac's "delta function" \delta translated by the mean \mu, that is f(x)=\delta(x-\mu). Its CDF is then the
Heaviside step function The Heaviside step function, or the unit step function, usually denoted by or (but sometimes , or ), is a step function, named after Oliver Heaviside (1850–1925), the value of which is zero for negative arguments and one for positive argume ...
translated by the mean \mu, namely :F(x) = \begin 0 & \textx < \mu \\ 1 & \textx \geq \mu \end


Maximum entropy

Of all probability distributions over the reals with a specified mean \mu and variance \sigma^2, the normal distribution N(\mu,\sigma^2) is the one with maximum entropy. If X is a
continuous random variable In probability theory and statistics, a probability distribution is the mathematical function that gives the probabilities of occurrence of different possible outcomes for an experiment. It is a mathematical description of a random phenomenon i ...
with
probability density In probability theory, a probability density function (PDF), or density of a continuous random variable, is a function whose value at any given sample (or point) in the sample space (the set of possible values taken by the random variable) can ...
f(x), then the entropy of X is defined as : H(X) = - \int_^\infty f(x)\log f(x)\, dx where f(x)\log f(x) is understood to be zero whenever f(x)=0. This functional can be maximized, subject to the constraints that the distribution is properly normalized and has a specified variance, by using
variational calculus The calculus of variations (or Variational Calculus) is a field of mathematical analysis that uses variations, which are small changes in functions and functionals, to find maxima and minima of functionals: mappings from a set of functions t ...
. A function with two
Lagrange multipliers In mathematical optimization, the method of Lagrange multipliers is a strategy for finding the local maxima and minima of a function subject to equality constraints (i.e., subject to the condition that one or more equations have to be satisfied ex ...
is defined: : L=\int_^\infty f(x)\ln(f(x))\,dx-\lambda_0\left(1-\int_^\infty f(x)\,dx\right)-\lambda\left(\sigma^2-\int_^\infty f(x)(x-\mu)^2\,dx\right) where f(x) is, for now, regarded as some density function with mean \mu and standard deviation \sigma. At maximum entropy, a small variation \delta f(x) about f(x) will produce a variation \delta L about L which is equal to 0: : 0=\delta L=\int_^\infty \delta f(x)\left (\ln(f(x))+1+\lambda_0+\lambda(x-\mu)^2\right )\,dx Since this must hold for any small \delta f(x), the term in brackets must be zero, and solving for f(x) yields: :f(x)=e^ Using the constraint equations to solve for \lambda_0 and \lambda yields the density of the normal distribution: : f(x, \mu, \sigma)=\frace^ The entropy of a normal distribution is equal to : H(X)=\tfrac(1+\log(2\sigma^2\pi))


Other properties


Related distributions


Central limit theorem

The central limit theorem states that under certain (fairly common) conditions, the sum of many random variables will have an approximately normal distribution. More specifically, where X_1,\ldots ,X_n are
independent and identically distributed In probability theory and statistics, a collection of random variables is independent and identically distributed if each random variable has the same probability distribution as the others and all are mutually independent. This property is usua ...
random variables with the same arbitrary distribution, zero mean, and variance \sigma^2 and Z is their mean scaled by \sqrt : Z = \sqrt\left(\frac\sum_^n X_i\right) Then, as n increases, the probability distribution of Z will tend to the normal distribution with zero mean and variance \sigma^2. The theorem can be extended to variables (X_i) that are not independent and/or not identically distributed if certain constraints are placed on the degree of dependence and the moments of the distributions. Many
test statistic A test statistic is a statistic (a quantity derived from the sample) used in statistical hypothesis testing.Berger, R. L.; Casella, G. (2001). ''Statistical Inference'', Duxbury Press, Second Edition (p.374) A hypothesis test is typically specif ...
s, scores, and
estimator In statistics, an estimator is a rule for calculating an estimate of a given quantity based on observed data: thus the rule (the estimator), the quantity of interest (the estimand) and its result (the estimate) are distinguished. For example, the ...
s encountered in practice contain sums of certain random variables in 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 distributions. The central limit theorem also implies that certain distributions can be approximated by the normal distribution, for example: * The
binomial distribution In probability theory and statistics, the binomial distribution with parameters ''n'' and ''p'' is the discrete probability distribution of the number of successes in a sequence of ''n'' independent experiments, each asking a yes–no quest ...
B(n,p) is approximately normal with mean np and variance np(1-p) for large n and for p not too close to 0 or 1. * The
Poisson distribution In probability theory and statistics, the Poisson distribution is a discrete probability distribution that expresses the probability of a given number of events occurring in a fixed interval of time or space if these events occur with a known co ...
with parameter \lambda is approximately normal with mean \lambda and variance \lambda, for large values of \lambda. * The
chi-squared distribution In probability theory and statistics, the chi-squared distribution (also chi-square or \chi^2-distribution) with k degrees of freedom is the distribution of a sum of the squares of k independent standard normal random variables. The chi-squa ...
\chi^2(k) is approximately normal with mean k and variance 2k, for large k. * The
Student's t-distribution In probability and statistics, Student's ''t''-distribution (or simply the ''t''-distribution) is any member of a family of continuous probability distributions that arise when estimating the mean of a normally distributed population in sit ...
t(\nu) is approximately normal with mean 0 and variance 1 when \nu is large. Whether these approximations are sufficiently accurate depends on the purpose for which they are needed, and the rate of convergence to the normal distribution. It is typically the case that such approximations are less accurate in the tails of the distribution. A general upper bound for the approximation error in the central limit theorem is given by the
Berry–Esseen theorem In probability theory, the central limit theorem states that, under certain circumstances, the probability distribution of the scaled mean of a random sample converges to a normal distribution as the sample size increases to infinity. Under strong ...
, improvements of the approximation are given by the
Edgeworth expansion The Gram–Charlier A series (named in honor of Jørgen Pedersen Gram and Carl Charlier), and the Edgeworth series (named in honor of Francis Ysidro Edgeworth) are series that approximate a probability distribution in terms of its cumulants. The se ...
s. This theorem can also be used to justify modeling the sum of many uniform noise sources as
Gaussian noise Gaussian noise, named after Carl Friedrich Gauss, is a term from signal processing theory denoting a kind of signal noise that has a probability density function (pdf) equal to that of the normal distribution (which is also known as the Gaussia ...
. See
AWGN Additive white Gaussian noise (AWGN) is a basic noise model used in information theory to mimic the effect of many random processes that occur in nature. The modifiers denote specific characteristics: * ''Additive'' because it is added to any nois ...
.


Operations and functions of normal variables

The
probability density In probability theory, a probability density function (PDF), or density of a continuous random variable, is a function whose value at any given sample (or point) in the sample space (the set of possible values taken by the random variable) can ...
,
cumulative distribution In statistics, the frequency (or absolute frequency) of an event i is the number n_i of times the observation has occurred/recorded in an experiment or study. These frequencies are often depicted graphically or in tabular form. Types The cumul ...
, and inverse cumulative distribution of any function of one or more independent or correlated normal variables can be computed with the numerical method of ray-tracing
Matlab code
. In the following sections we look at some special cases.


Operations on a single normal variable

If X is distributed normally with mean \mu and variance \sigma^2, then * aX+b, for any real numbers a and b, is also normally distributed, with mean a\mu+b and standard deviation , a, \sigma. That is, the family of normal distributions is closed under linear transformations. * The exponential of X is distributed log-normally: . * The absolute value of X has
folded normal distribution The folded normal distribution is a probability distribution related to the normal distribution. Given a normally distributed random variable ''X'' with mean ''μ'' and variance ''σ''2, the random variable ''Y'' = , ''X'', has a folded normal d ...
: . If \mu = 0 this is known as the
half-normal distribution In probability theory and statistics, the half-normal distribution is a special case of the folded normal distribution. Let X follow an ordinary normal distribution, N(0,\sigma^2). Then, Y=, X, follows a half-normal distribution. Thus, the hal ...
. * The absolute value of normalized residuals, , ''X'' − ''μ'', /''σ'', has
chi distribution In probability theory and statistics, the chi distribution is a continuous probability distribution. It is the distribution of the positive square root of the sum of squares of a set of independent random variables each following a standard norm ...
with one degree of freedom: , X - \mu, / \sigma \sim \chi_1. * The square of ''X''/''σ'' has the
noncentral chi-squared distribution In probability theory and statistics, the noncentral chi-squared distribution (or noncentral chi-square distribution, noncentral \chi^2 distribution) is a noncentral generalization of the chi-squared distribution. It often arises in the power a ...
with one degree of freedom: X^2 / \sigma^2 \sim \chi_1^2(\mu^2 / \sigma^2). If \mu = 0, the distribution is called simply chi-squared. * The log likelihood of a normal variable x is simply the log of its
probability density function In probability theory, a probability density function (PDF), or density of a continuous random variable, is a function whose value at any given sample (or point) in the sample space (the set of possible values taken by the random variable) can ...
: \ln p(x)= -\frac \left(\frac \right)^2 -\ln \left(\sigma \sqrt \right) = -\frac z^2 -\ln \left(\sigma \sqrt \right). Since this is a scaled and shifted square of a standard normal variable, it is distributed as a scaled and shifted chi-squared variable. * The distribution of the variable ''X'' restricted to an interval 'a'', ''b''is called the
truncated normal distribution In probability and statistics, the truncated normal distribution is the probability distribution derived from that of a normally distributed random variable by bounding the random variable from either below or above (or both). The truncated no ...
. * (''X'' − ''μ'')−2 has a
Lévy distribution In probability theory and statistics, the Lévy distribution, named after Paul Lévy, is a continuous probability distribution for a non-negative random variable. In spectroscopy, this distribution, with frequency as the dependent variable, is kn ...
with location 0 and scale ''σ''−2.


= Operations on two independent normal variables

= * If X_1 and X_2 are two
independent Independent or Independents may refer to: Arts, entertainment, and media Artist groups * Independents (artist group), a group of modernist painters based in the New Hope, Pennsylvania, area of the United States during the early 1930s * Independ ...
normal random variables, with means \mu_1, \mu_2 and standard deviations \sigma_1, \sigma_2, then their sum X_1 + X_2 will also be normally distributed, roof/sup> with mean \mu_1 + \mu_2 and variance \sigma_1^2 + \sigma_2^2. * In particular, if X and Y are independent normal deviates with zero mean and variance \sigma^2, then X + Y and X - Y are also independent and normally distributed, with zero mean and variance 2\sigma^2. This is a special case of the
polarization identity In linear algebra, a branch of mathematics, the polarization identity is any one of a family of formulas that express the inner product of two vectors in terms of the norm of a normed vector space. If a norm arises from an inner product then t ...
. * If X_1, X_2 are two independent normal deviates with mean \mu and deviation \sigma, and a, b are arbitrary real numbers, then the variable X_3 = \frac + \mu is also normally distributed with mean \mu and deviation \sigma. It follows that the normal distribution is
stable A stable is a building in which livestock, especially horses, are kept. It most commonly means a building that is divided into separate stalls for individual animals and livestock. There are many different types of stables in use today; the ...
(with exponent \alpha=2).


= Operations on two independent standard normal variables

= If X_1 and X_2 are two independent standard normal random variables with mean 0 and variance 1, then * Their sum and difference is distributed normally with mean zero and variance two: X_1 \pm X_2 \sim N(0, 2). * Their product Z = X_1 X_2 follows the
product distribution A product distribution is a probability distribution constructed as the distribution of the product of random variables having two other known distributions. Given two statistically independent random variables ''X'' and ''Y'', the distribution of ...
with density function f_Z(z) = \pi^ K_0(, z, ) where K_0 is the
modified Bessel function of the second kind Bessel functions, first defined by the mathematician Daniel Bernoulli and then generalized by Friedrich Bessel, are canonical solutions of Bessel's differential equation x^2 \frac + x \frac + \left(x^2 - \alpha^2 \right)y = 0 for an arbitrary ...
. This distribution is symmetric around zero, unbounded at z = 0, and has the
characteristic function In mathematics, the term "characteristic function" can refer to any of several distinct concepts: * The indicator function of a subset, that is the function ::\mathbf_A\colon X \to \, :which for a given subset ''A'' of ''X'', has value 1 at points ...
\phi_Z(t) = (1 + t^2)^. * Their ratio follows the standard
Cauchy distribution The Cauchy distribution, named after Augustin Cauchy, is a continuous probability distribution. It is also known, especially among physicists, as the Lorentz distribution (after Hendrik Lorentz), Cauchy–Lorentz distribution, Lorentz(ian) fun ...
: X_1/ X_2 \sim \operatorname(0, 1). * Their Euclidean norm \sqrt has the
Rayleigh distribution In probability theory and statistics, the Rayleigh distribution is a continuous probability distribution for nonnegative-valued random variables. Up to rescaling, it coincides with the chi distribution with two degrees of freedom. The distribut ...
.


Operations on multiple independent normal variables

* Any linear combination of independent normal deviates is a normal deviate. * If X_1, X_2, \ldots, X_n are independent standard normal random variables, then the sum of their squares has the
chi-squared distribution In probability theory and statistics, the chi-squared distribution (also chi-square or \chi^2-distribution) with k degrees of freedom is the distribution of a sum of the squares of k independent standard normal random variables. The chi-squa ...
with n degrees of freedom X_1^2 + \cdots + X_n^2 \sim \chi_n^2. * If X_1, X_2, \ldots, X_n are independent normally distributed random variables with means \mu and variances \sigma^2, then their
sample mean The sample mean (or "empirical mean") and the sample covariance are statistics computed from a Sample (statistics), sample of data on one or more random variables. The sample mean is the average value (or mean, mean value) of a sample (statistic ...
is independent from the sample
standard deviation In statistics, the standard deviation is a measure of the amount of variation or dispersion of a set of values. A low standard deviation indicates that the values tend to be close to the mean (also called the expected value) of the set, while ...
, which can be demonstrated using Basu's theorem or
Cochran's theorem In statistics, Cochran's theorem, devised by William G. Cochran, is a theorem used to justify results relating to the probability distributions of statistics that are used in the analysis of variance. Statement Let ''U''1, ..., ''U'N'' be i.i. ...
. The ratio of these two quantities will have the
Student's t-distribution In probability and statistics, Student's ''t''-distribution (or simply the ''t''-distribution) is any member of a family of continuous probability distributions that arise when estimating the mean of a normally distributed population in sit ...
with n-1 degrees of freedom: t = \frac = \frac \sim t_. * If X_1, X_2, \ldots, X_n, Y_1, Y_2, \ldots, Y_m are independent standard normal random variables, then the ratio of their normalized sums of squares will have the with degrees of freedom: F = \frac \sim F_.


Operations on multiple correlated normal variables

* A
quadratic form In mathematics, a quadratic form is a polynomial with terms all of degree two ("form" is another name for a homogeneous polynomial). For example, :4x^2 + 2xy - 3y^2 is a quadratic form in the variables and . The coefficients usually belong to a ...
of a normal vector, i.e. a quadratic function q = \sum x_i^2 + \sum x_j + c of multiple independent or correlated normal variables, is a generalized chi-square variable.


Operations on the density function

The split normal distribution is most directly defined in terms of joining scaled sections of the density functions of different normal distributions and rescaling the density to integrate to one. The
truncated normal distribution In probability and statistics, the truncated normal distribution is the probability distribution derived from that of a normally distributed random variable by bounding the random variable from either below or above (or both). The truncated no ...
results from rescaling a section of a single density function.


Infinite divisibility and Cramér's theorem

For any positive integer \text, any normal distribution with mean \mu and variance \sigma^2 is the distribution of the sum of \text independent normal deviates, each with mean \frac and variance \frac. This property is called
infinite divisibility Infinite divisibility arises in different ways in philosophy, physics, economics, order theory (a branch of mathematics), and probability theory (also a branch of mathematics). One may speak of infinite divisibility, or the lack thereof, of matter ...
. Conversely, if X_1 and X_2 are independent random variables and their sum X_1+X_2 has a normal distribution, then both X_1 and X_2 must be normal deviates. This result is known as Cramér's decomposition theorem, and is equivalent to saying that the convolution of two distributions is normal if and only if both are normal. Cramér's theorem implies that a linear combination of independent non-Gaussian variables will never have an exactly normal distribution, although it may approach it arbitrarily closely.


Bernstein's theorem

Bernstein's theorem states that if X and Y are independent and X + Y and X - Y are also independent, then both ''X'' and ''Y'' must necessarily have normal distributions. More generally, if X_1, \ldots, X_n are independent random variables, then two distinct linear combinations \sum and \sumwill be independent if and only if all X_k are normal and \sum, where \sigma_k^2 denotes the variance of X_k.


Extensions

The notion of normal distribution, being one of the most important distributions in probability theory, has been extended far beyond the standard framework of the univariate (that is one-dimensional) case (Case 1). All these extensions are also called ''normal'' or ''Gaussian'' laws, so a certain ambiguity in names exists. * The
multivariate normal distribution In probability theory and statistics, the multivariate normal distribution, multivariate Gaussian distribution, or joint normal distribution is a generalization of the one-dimensional (univariate) normal distribution to higher dimensions. One d ...
describes the Gaussian law in the ''k''-dimensional Euclidean space. A vector is multivariate-normally distributed if any linear combination of its components has a (univariate) normal distribution. The variance of ''X'' is a ''k×k'' symmetric positive-definite matrix ''V''. The multivariate normal distribution is a special case of the
elliptical distribution In probability and statistics, an elliptical distribution is any member of a broad family of probability distributions that generalize the multivariate normal distribution. Intuitively, in the simplified two and three dimensional case, the joint di ...
s. As such, its iso-density loci in the ''k'' = 2 case are ellipses and in the case of arbitrary ''k'' are ellipsoids. * Rectified Gaussian distribution a rectified version of normal distribution with all the negative elements reset to 0 * Complex normal distribution deals with the complex normal vectors. A complex vector is said to be normal if both its real and imaginary components jointly possess a 2''k''-dimensional multivariate normal distribution. The variance-covariance structure of ''X'' is described by two matrices: the ''variance'' matrix Γ, and the ''relation'' matrix ''C''. * Matrix normal distribution describes the case of normally distributed matrices. * Gaussian processes are the normally distributed stochastic processes. These can be viewed as elements of some infinite-dimensional Hilbert space ''H'', and thus are the analogues of multivariate normal vectors for the case . A random element is said to be normal if for any constant the scalar product has a (univariate) normal distribution. The variance structure of such Gaussian random element can be described in terms of the linear ''covariance ''. Several Gaussian processes became popular enough to have their own names: ** Wiener process, Brownian motion, ** Brownian bridge, ** Ornstein–Uhlenbeck process. * Gaussian q-distribution is an abstract mathematical construction that represents a "q-analogue" of the normal distribution. * the q-Gaussian is an analogue of the Gaussian distribution, in the sense that it maximises the Tsallis entropy, and is one type of Tsallis distribution. Note that this distribution is different from the Gaussian q-distribution above. * The Kaniadakis Gaussian distribution, Kaniadakis ''κ''-Gaussian distribution is a generalization of the Gaussian distribution which arises from the Kaniadakis statistics, being one of the Kaniadakis distribution, Kaniadakis distributions. A random variable ''X'' has a two-piece normal distribution if it has a distribution : f_X( x ) = N( \mu, \sigma_1^2 ) \text x \le \mu : f_X( x ) = N( \mu, \sigma_2^2 ) \text x \ge \mu where ''μ'' is the mean and ''σ''1 and ''σ''2 are the standard deviations of the distribution to the left and right of the mean respectively. The mean, variance and third central moment of this distribution have been determined : \operatorname( X ) = \mu + \sqrt ( \sigma_2 - \sigma_1 ) : \operatorname( X ) = \left( 1 - \frac 2 \pi\right)( \sigma_2 - \sigma_1 )^2 + \sigma_1 \sigma_2 : \operatorname( X ) = \sqrt( \sigma_2 - \sigma_1 ) \left[ \left( \frac 4 \pi - 1 \right) ( \sigma_2 - \sigma_1)^2 + \sigma_1 \sigma_2 \right] where E(''X''), V(''X'') and T(''X'') are the mean, variance, and third central moment respectively. One of the main practical uses of the Gaussian law is to model the empirical distributions of many different random variables encountered in practice. In such case a possible extension would be a richer family of distributions, having more than two parameters and therefore being able to fit the empirical distribution more accurately. The examples of such extensions are: * Pearson distribution — a four-parameter family of probability distributions that extend the normal law to include different skewness and kurtosis values. * The generalized normal distribution, also known as the exponential power distribution, allows for distribution tails with thicker or thinner asymptotic behaviors.


Statistical inference


Estimation of parameters

It is often the case that we do not know the parameters of the normal distribution, but instead want to Estimation theory, estimate them. That is, having a sample (x_1, \ldots, x_n) from a normal N(\mu, \sigma^2) population we would like to learn the approximate values of parameters \mu and \sigma^2. The standard approach to this problem is the maximum likelihood method, which requires maximization of the ''log-likelihood function'': : \ln\mathcal(\mu,\sigma^2) = \sum_^n \ln f(x_i\mid\mu,\sigma^2) = -\frac\ln(2\pi) - \frac\ln\sigma^2 - \frac\sum_^n (x_i-\mu)^2. Taking derivatives with respect to \mu and \sigma^2 and solving the resulting system of first order conditions yields the ''maximum likelihood estimates'': : \hat = \overline \equiv \frac\sum_^n x_i, \qquad \hat^2 = \frac \sum_^n (x_i - \overline)^2.


Sample mean

Estimator \textstyle\hat\mu is called the ''
sample mean The sample mean (or "empirical mean") and the sample covariance are statistics computed from a Sample (statistics), sample of data on one or more random variables. The sample mean is the average value (or mean, mean value) of a sample (statistic ...
'', since it is the arithmetic mean of all observations. The statistic \textstyle\overline is complete statistic, complete and sufficient statistic, sufficient for \mu, and therefore by the Lehmann–Scheffé theorem, \textstyle\hat\mu is the uniformly minimum variance unbiased (UMVU) estimator. In finite samples it is distributed normally: : \hat\mu \sim \mathcal(\mu,\sigma^2/n). The variance of this estimator is equal to the ''μμ''-element of the inverse Fisher information matrix \textstyle\mathcal^. This implies that the estimator is efficient estimator, finite-sample efficient. Of practical importance is the fact that the standard error (statistics), standard error of \textstyle\hat\mu is proportional to \textstyle1/\sqrt, that is, if one wishes to decrease the standard error by a factor of 10, one must increase the number of points in the sample by a factor of 100. This fact is widely used in determining sample sizes for opinion polls and the number of trials in Monte Carlo simulations. From the standpoint of the asymptotic theory (statistics), asymptotic theory, \textstyle\hat\mu is consistent estimator, consistent, that is, it convergence in probability, converges in probability to \mu as n\rightarrow\infty. The estimator is also asymptotic normality, asymptotically normal, which is a simple corollary of the fact that it is normal in finite samples: : \sqrt(\hat\mu-\mu) \,\xrightarrow\, \mathcal(0,\sigma^2).


Sample variance

The estimator \textstyle\hat\sigma^2 is called the ''sample variance'', since it is the variance of the sample ((x_1, \ldots, x_n)). In practice, another estimator is often used instead of the \textstyle\hat\sigma^2. This other estimator is denoted s^2, and is also called the ''sample variance'', which represents a certain ambiguity in terminology; its square root s is called the ''sample standard deviation''. The estimator s^2 differs from \textstyle\hat\sigma^2 by having instead of ''n'' in the denominator (the so-called Bessel's correction): : s^2 = \frac \hat\sigma^2 = \frac \sum_^n (x_i - \overline)^2. The difference between s^2 and \textstyle\hat\sigma^2 becomes negligibly small for large ''n''s. In finite samples however, the motivation behind the use of s^2 is that it is an unbiased estimator of the underlying parameter \sigma^2, whereas \textstyle\hat\sigma^2 is biased. Also, by the Lehmann–Scheffé theorem the estimator s^2 is uniformly minimum variance unbiased (Minimum-variance unbiased estimator, UMVU), which makes it the "best" estimator among all unbiased ones. However it can be shown that the biased estimator \textstyle\hat\sigma^2 is "better" than the s^2 in terms of the mean squared error (MSE) criterion. In finite samples both s^2 and \textstyle\hat\sigma^2 have scaled
chi-squared distribution In probability theory and statistics, the chi-squared distribution (also chi-square or \chi^2-distribution) with k degrees of freedom is the distribution of a sum of the squares of k independent standard normal random variables. The chi-squa ...
with degrees of freedom: : s^2 \sim \frac \cdot \chi^2_, \qquad \hat\sigma^2 \sim \frac \cdot \chi^2_. The first of these expressions shows that the variance of s^2 is equal to 2\sigma^4/(n-1), which is slightly greater than the ''σσ''-element of the inverse Fisher information matrix \textstyle\mathcal^. Thus, s^2 is not an efficient estimator for \sigma^2, and moreover, since s^2 is UMVU, we can conclude that the finite-sample efficient estimator for \sigma^2 does not exist. Applying the asymptotic theory, both estimators s^2 and \textstyle\hat\sigma^2 are consistent, that is they converge in probability to \sigma^2 as the sample size n\rightarrow\infty. The two estimators are also both asymptotically normal: : \sqrt(\hat\sigma^2 - \sigma^2) \simeq \sqrt(s^2-\sigma^2) \,\xrightarrow\, \mathcal(0,2\sigma^4). In particular, both estimators are asymptotically efficient for \sigma^2.


Confidence intervals

By
Cochran's theorem In statistics, Cochran's theorem, devised by William G. Cochran, is a theorem used to justify results relating to the probability distributions of statistics that are used in the analysis of variance. Statement Let ''U''1, ..., ''U'N'' be i.i. ...
, for normal distributions the sample mean \textstyle\hat\mu and the sample variance ''s''2 are
independent Independent or Independents may refer to: Arts, entertainment, and media Artist groups * Independents (artist group), a group of modernist painters based in the New Hope, Pennsylvania, area of the United States during the early 1930s * Independ ...
, which means there can be no gain in considering their joint distribution. There is also a converse theorem: if in a sample the sample mean and sample variance are independent, then the sample must have come from the normal distribution. The independence between \textstyle\hat\mu and ''s'' can be employed to construct the so-called ''t-statistic'': : t = \frac = \frac \sim t_ This quantity ''t'' has the
Student's t-distribution In probability and statistics, Student's ''t''-distribution (or simply the ''t''-distribution) is any member of a family of continuous probability distributions that arise when estimating the mean of a normally distributed population in sit ...
with degrees of freedom, and it is an ancillary statistic (independent of the value of the parameters). Inverting the distribution of this ''t''-statistics will allow us to construct the
confidence interval In frequentist statistics, a confidence interval (CI) is a range of estimates for an unknown parameter. A confidence interval is computed at a designated ''confidence level''; the 95% confidence level is most common, but other levels, such as 9 ...
for ''μ''; similarly, inverting the ''χ''2 distribution of the statistic ''s''2 will give us the confidence interval for ''σ''2: :\mu \in \left[ \hat\mu - t_ \fracs, \hat\mu + t_ \fracs \right], :\sigma^2 \in \left[ \frac, \frac \right], where ''tk,p'' and are the ''p''th
quantile In statistics and probability, quantiles are cut points dividing the range of a probability distribution into continuous intervals with equal probabilities, or dividing the observations in a sample in the same way. There is one fewer quantile tha ...
s of the ''t''- and ''χ''2-distributions respectively. These confidence intervals are of the ''confidence level'' , meaning that the true values ''μ'' and ''σ''2 fall outside of these intervals with probability (or significance level) ''α''. In practice people usually take , resulting in the 95% confidence intervals. Approximate formulas can be derived from the asymptotic distributions of \textstyle\hat\mu and ''s''2: :\mu \in \left[ \hat\mu - , z_, \fracs, \hat\mu + , z_, \fracs \right], :\sigma^2 \in \left[ s^2 - , z_, \fracs^2, s^2 + , z_, \fracs^2 \right], The approximate formulas become valid for large values of ''n'', and are more convenient for the manual calculation since the standard normal quantiles ''z''''α''/2 do not depend on ''n''. In particular, the most popular value of , results in .


Normality tests

Normality tests assess the likelihood that the given data set comes from a normal distribution. Typically the null hypothesis ''H''0 is that the observations are distributed normally with unspecified mean ''μ'' and variance ''σ''2, versus the alternative ''Ha'' that the distribution is arbitrary. Many tests (over 40) have been devised for this problem. The more prominent of them are outlined below: Diagnostic plots are more intuitively appealing but subjective at the same time, as they rely on informal human judgement to accept or reject the null hypothesis. *
Q–Q plot In statistics, a Q–Q plot (quantile-quantile plot) is a probability plot, a List of graphical methods, graphical method for comparing two probability distributions by plotting their ''quantiles'' against each other. A point on the plot co ...
, also known as normal probability plot or rankit plot—is a plot of the sorted values from the data set against the expected values of the corresponding quantiles from the standard normal distribution. That is, it's a plot of point of the form (Φ−1(''pk''), ''x''(''k'')), where plotting points ''pk'' are equal to ''pk'' = (''k'' − ''α'')/(''n'' + 1 − 2''α'') and ''α'' is an adjustment constant, which can be anything between 0 and 1. If the null hypothesis is true, the plotted points should approximately lie on a straight line. * P–P plot – similar to the Q–Q plot, but used much less frequently. This method consists of plotting the points (Φ(''z''(''k'')), ''pk''), where \textstyle z_ = (x_-\hat\mu)/\hat\sigma. For normally distributed data this plot should lie on a 45° line between (0, 0) and (1, 1). Goodness-of-fit tests: ''Moment-based tests'': * D'Agostino's K-squared test * Jarque–Bera test * Shapiro–Wilk test: This is based on the fact that the line in the Q–Q plot has the slope of ''σ''. The test compares the least squares estimate of that slope with the value of the sample variance, and rejects the null hypothesis if these two quantities differ significantly. ''Tests based on the empirical distribution function'': * Anderson–Darling test * Lilliefors test (an adaptation of the Kolmogorov–Smirnov test)


Bayesian analysis of the normal distribution

Bayesian analysis of normally distributed data is complicated by the many different possibilities that may be considered: * Either the mean, or the variance, or neither, may be considered a fixed quantity. * When the variance is unknown, analysis may be done directly in terms of the variance, or in terms of the
precision Precision, precise or precisely may refer to: Science, and technology, and mathematics Mathematics and computing (general) * Accuracy and precision, measurement deviation from true value and its scatter * Significant figures, the number of digit ...
, the reciprocal of the variance. The reason for expressing the formulas in terms of precision is that the analysis of most cases is simplified. * Both univariate and multivariate normal distribution, multivariate cases need to be considered. * Either conjugate prior, conjugate or improper prior, improper prior distributions may be placed on the unknown variables. * An additional set of cases occurs in Bayesian linear regression, where in the basic model the data is assumed to be normally distributed, and normal priors are placed on the regression coefficients. The resulting analysis is similar to the basic cases of independent identically distributed data. The formulas for the non-linear-regression cases are summarized in the conjugate prior article.


Sum of two quadratics


= Scalar form

= The following auxiliary formula is useful for simplifying the posterior distribution, posterior update equations, which otherwise become fairly tedious. :a(x-y)^2 + b(x-z)^2 = (a + b)\left(x - \frac\right)^2 + \frac(y-z)^2 This equation rewrites the sum of two quadratics in ''x'' by expanding the squares, grouping the terms in ''x'', and completing the square. Note the following about the complex constant factors attached to some of the terms: # The factor \frac has the form of a weighted average of ''y'' and ''z''. # \frac = \frac = (a^ + b^)^. This shows that this factor can be thought of as resulting from a situation where the Multiplicative inverse, reciprocals of quantities ''a'' and ''b'' add directly, so to combine ''a'' and ''b'' themselves, it's necessary to reciprocate, add, and reciprocate the result again to get back into the original units. This is exactly the sort of operation performed by the harmonic mean, so it is not surprising that \frac is one-half the harmonic mean of ''a'' and ''b''.


= Vector form

= A similar formula can be written for the sum of two vector quadratics: If x, y, z are vectors of length ''k'', and A and B are symmetric matrix, symmetric, invertible matrices of size k\times k, then : \begin & (\mathbf-\mathbf)'\mathbf(\mathbf-\mathbf) + (\mathbf-\mathbf)' \mathbf(\mathbf-\mathbf) \\ = & (\mathbf - \mathbf)'(\mathbf+\mathbf)(\mathbf - \mathbf) + (\mathbf - \mathbf)'(\mathbf^ + \mathbf^)^(\mathbf - \mathbf) \end where :\mathbf = (\mathbf + \mathbf)^(\mathbf\mathbf + \mathbf \mathbf) Note that the form x′ A x is called a
quadratic form In mathematics, a quadratic form is a polynomial with terms all of degree two ("form" is another name for a homogeneous polynomial). For example, :4x^2 + 2xy - 3y^2 is a quadratic form in the variables and . The coefficients usually belong to a ...
and is a scalar (mathematics), scalar: :\mathbf'\mathbf\mathbf = \sum_a_ x_i x_j In other words, it sums up all possible combinations of products of pairs of elements from x, with a separate coefficient for each. In addition, since x_i x_j = x_j x_i, only the sum a_ + a_ matters for any off-diagonal elements of A, and there is no loss of generality in assuming that A is symmetric matrix, symmetric. Furthermore, if A is symmetric, then the form \mathbf'\mathbf\mathbf = \mathbf'\mathbf\mathbf.


Sum of differences from the mean

Another useful formula is as follows: \sum_^n (x_i-\mu)^2 = \sum_^n (x_i-\bar)^2 + n(\bar -\mu)^2 where \bar = \frac \sum_^n x_i.


With known variance

For a set of i.i.d. normally distributed data points X of size ''n'' where each individual point ''x'' follows x \sim \mathcal(\mu, \sigma^2) with known
variance In probability theory and statistics, variance is the expectation of the squared deviation of a random variable from its population mean or sample mean. Variance is a measure of dispersion, meaning it is a measure of how far a set of numbers ...
σ2, the conjugate prior distribution is also normally distributed. This can be shown more easily by rewriting the variance as the
precision Precision, precise or precisely may refer to: Science, and technology, and mathematics Mathematics and computing (general) * Accuracy and precision, measurement deviation from true value and its scatter * Significant figures, the number of digit ...
, i.e. using τ = 1/σ2. Then if x \sim \mathcal(\mu, 1/\tau) and \mu \sim \mathcal(\mu_0, 1/\tau_0), we proceed as follows. First, the likelihood function is (using the formula above for the sum of differences from the mean): :\begin p(\mathbf\mid\mu,\tau) &= \prod_^n \sqrt \exp\left(-\frac\tau(x_i-\mu)^2\right) \\ &= \left(\frac\right)^ \exp\left(-\frac\tau \sum_^n (x_i-\mu)^2\right) \\ &= \left(\frac\right)^ \exp\left[-\frac\tau \left(\sum_^n(x_i-\bar)^2 + n(\bar -\mu)^2\right)\right]. \end Then, we proceed as follows: :\begin p(\mu\mid\mathbf) &\propto p(\mathbf\mid\mu) p(\mu) \\ & = \left(\frac\right)^ \exp\left[-\frac\tau \left(\sum_^n(x_i-\bar)^2 + n(\bar -\mu)^2\right)\right] \sqrt \exp\left(-\frac\tau_0(\mu-\mu_0)^2\right) \\ &\propto \exp\left(-\frac\left(\tau\left(\sum_^n(x_i-\bar)^2 + n(\bar -\mu)^2\right) + \tau_0(\mu-\mu_0)^2\right)\right) \\ &\propto \exp\left(-\frac \left(n\tau(\bar-\mu)^2 + \tau_0(\mu-\mu_0)^2 \right)\right) \\ &= \exp\left(-\frac(n\tau + \tau_0)\left(\mu - \dfrac\right)^2 + \frac(\bar - \mu_0)^2\right) \\ &\propto \exp\left(-\frac(n\tau + \tau_0)\left(\mu - \dfrac\right)^2\right) \end In the above derivation, we used the formula above for the sum of two quadratics and eliminated all constant factors not involving ''μ''. The result is the kernel (statistics), kernel of a normal distribution, with mean \frac and precision n\tau + \tau_0, i.e. :p(\mu\mid\mathbf) \sim \mathcal\left(\frac, \frac\right) This can be written as a set of Bayesian update equations for the posterior parameters in terms of the prior parameters: :\begin \tau_0' &= \tau_0 + n\tau \\[5pt] \mu_0' &= \frac \\[5pt] \bar &= \frac\sum_^n x_i \end That is, to combine ''n'' data points with total precision of ''nτ'' (or equivalently, total variance of ''n''/''σ''2) and mean of values \bar, derive a new total precision simply by adding the total precision of the data to the prior total precision, and form a new mean through a ''precision-weighted average'', i.e. a weighted average of the data mean and the prior mean, each weighted by the associated total precision. This makes logical sense if the precision is thought of as indicating the certainty of the observations: In the distribution of the posterior mean, each of the input components is weighted by its certainty, and the certainty of this distribution is the sum of the individual certainties. (For the intuition of this, compare the expression "the whole is (or is not) greater than the sum of its parts". In addition, consider that the knowledge of the posterior comes from a combination of the knowledge of the prior and likelihood, so it makes sense that we are more certain of it than of either of its components.) The above formula reveals why it is more convenient to do Bayesian analysis of conjugate priors for the normal distribution in terms of the precision. The posterior precision is simply the sum of the prior and likelihood precisions, and the posterior mean is computed through a precision-weighted average, as described above. The same formulas can be written in terms of variance by reciprocating all the precisions, yielding the more ugly formulas :\begin ' &= \frac \\[5pt] \mu_0' &= \frac \\[5pt] \bar &= \frac\sum_^n x_i \end


With known mean

For a set of i.i.d. normally distributed data points X of size ''n'' where each individual point ''x'' follows x \sim \mathcal(\mu, \sigma^2) with known mean μ, the conjugate prior of the
variance In probability theory and statistics, variance is the expectation of the squared deviation of a random variable from its population mean or sample mean. Variance is a measure of dispersion, meaning it is a measure of how far a set of numbers ...
has an inverse gamma distribution or a scaled inverse chi-squared distribution. The two are equivalent 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. The prior for σ2 is as follows: :p(\sigma^2\mid\nu_0,\sigma_0^2) = \frac~\frac \propto \frac The likelihood function from above, written in terms of the variance, is: :\begin p(\mathbf\mid\mu,\sigma^2) &= \left(\frac\right)^ \exp\left[-\frac \sum_^n (x_i-\mu)^2\right] \\ &= \left(\frac\right)^ \exp\left[-\frac\right] \end where :S = \sum_^n (x_i-\mu)^2. Then: :\begin p(\sigma^2\mid\mathbf) &\propto p(\mathbf\mid\sigma^2) p(\sigma^2) \\ &= \left(\frac\right)^ \exp\left[-\frac\right] \frac~\frac \\ &\propto \left(\frac\right)^ \frac \exp\left[-\frac + \frac\right] \\ &= \frac \exp\left[-\frac\right] \end The above is also a scaled inverse chi-squared distribution where :\begin \nu_0' &= \nu_0 + n \\ \nu_0'' &= \nu_0 \sigma_0^2 + \sum_^n (x_i-\mu)^2 \end or equivalently :\begin \nu_0' &= \nu_0 + n \\ ' &= \frac \end Reparameterizing in terms of an inverse gamma distribution, the result is: :\begin \alpha' &= \alpha + \frac \\ \beta' &= \beta + \frac \end


With unknown mean and unknown variance

For a set of i.i.d. normally distributed data points X of size ''n'' where each individual point ''x'' follows x \sim \mathcal(\mu, \sigma^2) with unknown mean μ and unknown
variance In probability theory and statistics, variance is the expectation of the squared deviation of a random variable from its population mean or sample mean. Variance is a measure of dispersion, meaning it is a measure of how far a set of numbers ...
σ2, a combined (multivariate) conjugate prior is placed over the mean and variance, consisting of a normal-inverse-gamma distribution. Logically, this originates as follows: # From the analysis of the case with unknown mean but known variance, we see that the update equations involve sufficient statistics computed from the data consisting of the mean of the data points and the total variance of the data points, computed in turn from the known variance divided by the number of data points. # From the analysis of the case with unknown variance but known mean, we see that the update equations involve sufficient statistics over the data consisting of the number of data points and sum of squared deviations. # Keep in mind that the posterior update values serve as the prior distribution when further data is handled. Thus, we should logically think of our priors in terms of the sufficient statistics just described, with the same semantics kept in mind as much as possible. # To handle the case where both mean and variance are unknown, we could place independent priors over the mean and variance, with fixed estimates of the average mean, total variance, number of data points used to compute the variance prior, and sum of squared deviations. Note however that in reality, the total variance of the mean depends on the unknown variance, and the sum of squared deviations that goes into the variance prior (appears to) depend on the unknown mean. In practice, the latter dependence is relatively unimportant: Shifting the actual mean shifts the generated points by an equal amount, and on average the squared deviations will remain the same. This is not the case, however, with the total variance of the mean: As the unknown variance increases, the total variance of the mean will increase proportionately, and we would like to capture this dependence. # This suggests that we create a ''conditional prior'' of the mean on the unknown variance, with a hyperparameter specifying the mean of the pseudo-observations associated with the prior, and another parameter specifying the number of pseudo-observations. This number serves as a scaling parameter on the variance, making it possible to control the overall variance of the mean relative to the actual variance parameter. The prior for the variance also has two hyperparameters, one specifying the sum of squared deviations of the pseudo-observations associated with the prior, and another specifying once again the number of pseudo-observations. Note that each of the priors has a hyperparameter specifying the number of pseudo-observations, and in each case this controls the relative variance of that prior. These are given as two separate hyperparameters so that the variance (aka the confidence) of the two priors can be controlled separately. # This leads immediately to the normal-inverse-gamma distribution, which is the product of the two distributions just defined, with conjugate priors used (an inverse gamma distribution over the variance, and a normal distribution over the mean, ''conditional'' on the variance) and with the same four parameters just defined. The priors are normally defined as follows: :\begin p(\mu\mid\sigma^2; \mu_0, n_0) &\sim \mathcal(\mu_0,\sigma^2/n_0) \\ p(\sigma^2; \nu_0,\sigma_0^2) &\sim I\chi^2(\nu_0,\sigma_0^2) = IG(\nu_0/2, \nu_0\sigma_0^2/2) \end The update equations can be derived, and look as follows: :\begin \bar &= \frac 1 n \sum_^n x_i \\ \mu_0' &= \frac \\ n_0' &= n_0 + n \\ \nu_0' &= \nu_0 + n \\ \nu_0'' &= \nu_0 \sigma_0^2 + \sum_^n (x_i-\bar)^2 + \frac(\mu_0 - \bar)^2 \end The respective numbers of pseudo-observations add the number of actual observations to them. The new mean hyperparameter is once again a weighted average, this time weighted by the relative numbers of observations. Finally, the update for \nu_0'' is similar to the case with known mean, but in this case the sum of squared deviations is taken with respect to the observed data mean rather than the true mean, and as a result a new "interaction term" needs to be added to take care of the additional error source stemming from the deviation between prior and data mean.


Occurrence and applications

The occurrence of normal distribution in practical problems can be loosely classified into four categories: # Exactly normal distributions; # Approximately normal laws, for example when such approximation is justified by the
central limit theorem In probability theory, the central limit theorem (CLT) establishes that, in many situations, when independent random variables are summed up, their properly normalized sum tends toward a normal distribution even if the original variables themselv ...
; and # Distributions modeled as normal – the normal distribution being the distribution with Principle of maximum entropy, maximum entropy for a given mean and variance. # Regression problems – the normal distribution being found after systematic effects have been modeled sufficiently well.


Exact normality

Certain quantities in physics are distributed normally, as was first demonstrated by James Clerk Maxwell. Examples of such quantities are: * Probability density function of a ground state in a quantum harmonic oscillator. * The position of a particle that experiences diffusion. If initially the particle is located at a specific point (that is its probability distribution is the Dirac delta function), then after time ''t'' its location is described by a normal distribution with variance ''t'', which satisfies the diffusion equation \frac f(x,t) = \frac \frac f(x,t). If the initial location is given by a certain density function g(x), then the density at time ''t'' is the convolution of ''g'' and the normal PDF.


Approximate normality

''Approximately'' normal distributions occur in many situations, as explained by the
central limit theorem In probability theory, the central limit theorem (CLT) establishes that, in many situations, when independent random variables are summed up, their properly normalized sum tends toward a normal distribution even if the original variables themselv ...
. When the outcome is produced by many small effects acting ''additively and independently'', its distribution will be close to normal. The normal approximation will not be valid if the effects act multiplicatively (instead of additively), or if there is a single external influence that has a considerably larger magnitude than the rest of the effects. * In counting problems, where the central limit theorem includes a discrete-to-continuum approximation and where Infinite divisibility, infinitely divisible and Indecomposable distribution, decomposable distributions are involved, such as ** binomial distribution, Binomial random variables, associated with binary response variables; ** Poisson distribution, Poisson random variables, associated with rare events; * Thermal radiation has a Bose–Einstein statistics, Bose–Einstein distribution on very short time scales, and a normal distribution on longer timescales due to the central limit theorem.


Assumed normality

There are statistical methods to empirically test that assumption; see the above #Normality tests, Normality tests section. * In biology, the ''logarithm'' of various variables tend to have a normal distribution, that is, they tend to have a
log-normal distribution In probability theory, a log-normal (or lognormal) distribution is a continuous probability distribution of a random variable whose logarithm is normally distributed. Thus, if the random variable is log-normally distributed, then has a normal ...
(after separation on male/female subpopulations), with examples including: ** Measures of size of living tissue (length, height, skin area, weight); ** The ''length'' of ''inert'' appendages (hair, claws, nails, teeth) of biological specimens, ''in the direction of growth''; presumably the thickness of tree bark also falls under this category; ** Certain physiological measurements, such as blood pressure of adult humans. * In finance, in particular the Black–Scholes model, changes in the ''logarithm'' of exchange rates, price indices, and stock market indices are assumed normal (these variables behave like compound interest, not like simple interest, and so are multiplicative). Some mathematicians such as Benoit Mandelbrot have argued that Levy skew alpha-stable distribution, log-Levy distributions, which possesses heavy tails would be a more appropriate model, in particular for the analysis for stock market crashes. The use of the assumption of normal distribution occurring in financial models has also been criticized by Nassim Nicholas Taleb in his works. * Propagation of uncertainty, Measurement errors in physical experiments are often modeled by a normal distribution. This use of a normal distribution does not imply that one is assuming the measurement errors are normally distributed, rather using the normal distribution produces the most conservative predictions possible given only knowledge about the mean and variance of the errors. * In Standardized testing (statistics), standardized testing, results can be made to have a normal distribution by either selecting the number and difficulty of questions (as in the Intelligence quotient, IQ test) or transforming the raw test scores into "output" scores by fitting them to the normal distribution. For example, the SAT's traditional range of 200–800 is based on a normal distribution with a mean of 500 and a standard deviation of 100. * Many scores are derived from the normal distribution, including percentile ranks ("percentiles" or "quantiles"), normal curve equivalents, stanines, Standard score, z-scores, and T-scores. Additionally, some behavioral statistical procedures assume that scores are normally distributed; for example, Student's t-test, t-tests and Analysis of variance, ANOVAs. Bell curve grading assigns relative grades based on a normal distribution of scores. * In hydrology the distribution of long duration river discharge or rainfall, e.g. monthly and yearly totals, is often thought to be practically normal according to the
central limit theorem In probability theory, the central limit theorem (CLT) establishes that, in many situations, when independent random variables are summed up, their properly normalized sum tends toward a normal distribution even if the original variables themselv ...
. The blue picture, made with CumFreq, illustrates an example of fitting the normal distribution to ranked October rainfalls showing the 90% confidence belt based on the
binomial distribution In probability theory and statistics, the binomial distribution with parameters ''n'' and ''p'' is the discrete probability distribution of the number of successes in a sequence of ''n'' independent experiments, each asking a yes–no quest ...
. The rainfall data are represented by plotting positions as part of the cumulative frequency analysis.


Methodological problems and peer review

John Ioannidis argues that using normally distributed standard deviations as standards for validating research findings leave falsifiability, falsifiable predictions about phenomena that are not normally distributed untested. This includes, for example, phenomena that only appear when all necessary conditions are present and one cannot be a substitute for another in an addition-like way and phenomena that are not randomly distributed. Ioannidis argues that standard deviation-centered validation gives a false appearance of validity to hypotheses and theories where some but not all falsifiable predictions are normally distributed since the portion of falsifiable predictions that there is evidence against may and in some cases are in the non-normally distributed parts of the range of falsifiable predictions, as well as baselessly dismissing hypotheses for which none of the falsifiable predictions are normally distributed as if were they unfalsifiable when in fact they do make falsifiable predictions. It is argued by Ioannidis that many cases of mutually exclusive theories being accepted as "validated" by research journals are caused by failure of the journals to take in empirical falsifications of non-normally distributed predictions, and not because mutually exclusive theories are true, which they cannot be, although two mutually exclusive theories can both be wrong and a third one correct.


Computational methods


Generating values from normal distribution

In computer simulations, especially in applications of the Monte-Carlo method, it is often desirable to generate values that are normally distributed. The algorithms listed below all generate the standard normal deviates, since a can be generated as , where ''Z'' is standard normal. All these algorithms rely on the availability of a random number generator ''U'' capable of producing Uniform distribution (continuous), uniform random variates. * The most straightforward method is based on the probability integral transform property: if ''U'' is distributed uniformly on (0,1), then Φ−1(''U'') will have the standard normal distribution. The drawback of this method is that it relies on calculation of the
probit function In probability theory and statistics, the probit function is the quantile function associated with the standard normal distribution. It has applications in data analysis and machine learning, in particular exploratory statistical graphics and ...
Φ−1, which cannot be done analytically. Some approximate methods are described in and in the error function, erf article. Wichura gives a fast algorithm for computing this function to 16 decimal places, which is used by R programming language, R to compute random variates of the normal distribution. * Irwin–Hall distribution#Approximating a Normal distribution, An easy-to-program approximate approach that relies on the
central limit theorem In probability theory, the central limit theorem (CLT) establishes that, in many situations, when independent random variables are summed up, their properly normalized sum tends toward a normal distribution even if the original variables themselv ...
is as follows: generate 12 uniform ''U''(0,1) deviates, add them all up, and subtract 6 – the resulting random variable will have approximately standard normal distribution. In truth, the distribution will be Irwin–Hall distribution, Irwin–Hall, which is a 12-section eleventh-order polynomial approximation to the normal distribution. This random deviate will have a limited range of (−6, 6). Note that in a true normal distribution, only 0.00034% of all samples will fall outside ±6σ. * The Box–Muller transform, Box–Muller method uses two independent random numbers ''U'' and ''V'' distributed uniform distribution (continuous), uniformly on (0,1). Then the two random variables ''X'' and ''Y'' X = \sqrt \, \cos(2 \pi V) , \qquad Y = \sqrt \, \sin(2 \pi V) . will both have the standard normal distribution, and will be
independent Independent or Independents may refer to: Arts, entertainment, and media Artist groups * Independents (artist group), a group of modernist painters based in the New Hope, Pennsylvania, area of the United States during the early 1930s * Independ ...
. This formulation arises because for a bivariate normal random vector (''X'', ''Y'') the squared norm will have the
chi-squared distribution In probability theory and statistics, the chi-squared distribution (also chi-square or \chi^2-distribution) with k degrees of freedom is the distribution of a sum of the squares of k independent standard normal random variables. The chi-squa ...
with two degrees of freedom, which is an easily generated exponential distribution, exponential random variable corresponding to the quantity −2ln(''U'') in these equations; and the angle is distributed uniformly around the circle, chosen by the random variable ''V''. * The Marsaglia polar method is a modification of the Box–Muller method which does not require computation of the sine and cosine functions. In this method, ''U'' and ''V'' are drawn from the uniform (−1,1) distribution, and then is computed. If ''S'' is greater or equal to 1, then the method starts over, otherwise the two quantities X = U\sqrt, \qquad Y = V\sqrt are returned. Again, ''X'' and ''Y'' are independent, standard normal random variables. * The Ratio method is a rejection method. The algorithm proceeds as follows: ** Generate two independent uniform deviates ''U'' and ''V''; ** Compute ''X'' = (''V'' − 0.5)/''U''; ** Optional: if ''X''2 ≤ 5 − 4''e''1/4''U'' then accept ''X'' and terminate algorithm; ** Optional: if ''X''2 ≥ 4''e''−1.35/''U'' + 1.4 then reject ''X'' and start over from step 1; ** If ''X''2 ≤ −4 ln''U'' then accept ''X'', otherwise start over the algorithm. *:The two optional steps allow the evaluation of the logarithm in the last step to be avoided in most cases. These steps can be greatly improved so that the logarithm is rarely evaluated. * The ziggurat algorithm is faster than the Box–Muller transform and still exact. In about 97% of all cases it uses only two random numbers, one random integer and one random uniform, one multiplication and an if-test. Only in 3% of the cases, where the combination of those two falls outside the "core of the ziggurat" (a kind of rejection sampling using logarithms), do exponentials and more uniform random numbers have to be employed. * Integer arithmetic can be used to sample from the standard normal distribution. This method is exact in the sense that it satisfies the conditions of ''ideal approximation''; i.e., it is equivalent to sampling a real number from the standard normal distribution and rounding this to the nearest representable floating point number. * There is also some investigation into the connection between the fast Hadamard transform and the normal distribution, since the transform employs just addition and subtraction and by the central limit theorem random numbers from almost any distribution will be transformed into the normal distribution. In this regard a series of Hadamard transforms can be combined with random permutations to turn arbitrary data sets into a normally distributed data.


Numerical approximations for the normal CDF and normal quantile function

The standard normal cumulative distribution function, CDF is widely used in scientific and statistical computing. The values Φ(''x'') may be approximated very accurately by a variety of methods, such as numerical integration, Taylor series, asymptotic series and Gauss's continued fraction#Of Kummer's confluent hypergeometric function, continued fractions. Different approximations are used depending on the desired level of accuracy. * give the approximation for Φ(''x'') for ''x > 0'' with the absolute error (algorith
26.2.17
: \Phi(x) = 1 - \varphi(x)\left(b_1 t + b_2 t^2 + b_3t^3 + b_4 t^4 + b_5 t^5\right) + \varepsilon(x), \qquad t = \frac, where ''ϕ''(''x'') is the standard normal PDF, and ''b''0 = 0.2316419, ''b''1 = 0.319381530, ''b''2 = −0.356563782, ''b''3 = 1.781477937, ''b''4 = −1.821255978, ''b''5 = 1.330274429. * lists some dozens of approximations – by means of rational functions, with or without exponentials – for the function. His algorithms vary in the degree of complexity and the resulting precision, with maximum absolute precision of 24 digits. An algorithm by combines Hart's algorithm 5666 with a continued fraction approximation in the tail to provide a fast computation algorithm with a 16-digit precision. * after recalling Hart68 solution is not suited for erf, gives a solution for both erf and erfc, with maximal relative error bound, via rational function, Rational Chebyshev Approximation. * suggested a simple algorithm based on the Taylor series expansion \Phi(x) = \frac12 + \varphi(x)\left( x + \frac 3 + \frac + \frac + \frac + \cdots \right) for calculating with arbitrary precision. The drawback of this algorithm is comparatively slow calculation time (for example it takes over 300 iterations to calculate the function with 16 digits of precision when ). * The GNU Scientific Library calculates values of the standard normal CDF using Hart's algorithms and approximations with Chebyshev polynomials. Shore (1982) introduced simple approximations that may be incorporated in stochastic optimization models of engineering and operations research, like reliability engineering and inventory analysis. Denoting , the simplest approximation for the quantile function is: z = \Phi^(p)=5.5556\left[1- \left( \frac p \right)^\right],\qquad p\ge 1/2 This approximation delivers for ''z'' a maximum absolute error of 0.026 (for , corresponding to ). For replace ''p'' by and change sign. Another approximation, somewhat less accurate, is the single-parameter approximation: z=-0.4115\left\, \qquad p\ge 1/2 The latter had served to derive a simple approximation for the loss integral of the normal distribution, defined by \begin L(z) & =\int_z^\infty (u-z)\varphi(u) \, du=\int_z^\infty [1-\Phi (u)] \, du \\[5pt] L(z) & \approx \begin 0.4115\left(\dfrac p \right) - z, & p<1/2, \\ \\ 0.4115\left( \dfrac p \right), & p\ge 1/2. \end \\[5pt] \text \\ L(z) & \approx \begin 0.4115\left\, & p < 1/2, \\ \\ 0.4115 \dfrac p, & p\ge 1/2. \end \end This approximation is particularly accurate for the right far-tail (maximum error of 10−3 for z≥1.4). Highly accurate approximations for the CDF, based on Response modeling methodology, Response Modeling Methodology (RMM, Shore, 2011, 2012), are shown in Shore (2005). Some more approximations can be found at: Error function#Approximation with elementary functions. In particular, small ''relative'' error on the whole domain for the CDF \Phi and the quantile function \Phi^ as well, is achieved via an explicitly invertible formula by Sergei Winitzki in 2008.


History


Development

Some authors attribute the credit for the discovery of the normal distribution to Abraham de Moivre, de Moivre, who in 1738 published in the second edition of his "''The Doctrine of Chances''" the study of the coefficients in the binomial expansion of . De Moivre proved that the middle term in this expansion has the approximate magnitude of 2^n/\sqrt, and that "If ''m'' or ''n'' be a Quantity infinitely great, then the Logarithm of the Ratio, which a Term distant from the middle by the Interval ''ℓ'', has to the middle Term, is -\frac." Although this theorem can be interpreted as the first obscure expression for the normal probability law, Stephen Stigler, Stigler points out that de Moivre himself did not interpret his results as anything more than the approximate rule for the binomial coefficients, and in particular de Moivre lacked the concept of the probability density function. In 1823 Carl Friedrich Gauss, Gauss published his monograph "''Theoria combinationis observationum erroribus minimis obnoxiae''" where among other things he introduces several important statistical concepts, such as the method of least squares, the method of maximum likelihood, and the ''normal distribution''. Gauss used ''M'', , to denote the measurements of some unknown quantity ''V'', and sought the "most probable" estimator of that quantity: the one that maximizes the probability of obtaining the observed experimental results. In his notation φΔ is the probability density function of the measurement errors of magnitude Δ. Not knowing what the function ''φ'' is, Gauss requires that his method should reduce to the well-known answer: the arithmetic mean of the measured values. Starting from these principles, Gauss demonstrates that the only law that rationalizes the choice of arithmetic mean as an estimator of the location parameter, is the normal law of errors: \varphi\mathit = \frac h \, e^, where ''h'' is "the measure of the precision of the observations". Using this normal law as a generic model for errors in the experiments, Gauss formulates what is now known as the non-linear least squares, non-linear weighted least squares method. Although Gauss was the first to suggest the normal distribution law, Pierre Simon de Laplace, Laplace made significant contributions. It was Laplace who first posed the problem of aggregating several observations in 1774, although his own solution led to the Laplacian distribution. It was Laplace who first calculated the value of the Gaussian integral, integral in 1782, providing the normalization constant for the normal distribution. Finally, it was Laplace who in 1810 proved and presented to the Academy the fundamental
central limit theorem In probability theory, the central limit theorem (CLT) establishes that, in many situations, when independent random variables are summed up, their properly normalized sum tends toward a normal distribution even if the original variables themselv ...
, which emphasized the theoretical importance of the normal distribution. It is of interest to note that in 1809 an Irish-American mathematician Robert Adrain published two insightful but flawed derivations of the normal probability law, simultaneously and independently from Gauss. His works remained largely unnoticed by the scientific community, until in 1871 they were exhumed by Cleveland Abbe, Abbe. In the middle of the 19th century James Clerk Maxwell, Maxwell demonstrated that the normal distribution is not just a convenient mathematical tool, but may also occur in natural phenomena: "The number of particles whose velocity, resolved in a certain direction, lies between ''x'' and ''x'' + ''dx'' is \operatorname \frac\; e^ \, dx


Naming

Today, the concept is usually known in English as the normal distribution or Gaussian distribution. Other less common names include Gauss distribution, Laplace-Gauss distribution, the law of error, the law of facility of errors, Laplace's second law, Gaussian law. Gauss himself apparently coined the term with reference to the "normal equations" involved in its applications, with normal having its technical meaning of orthogonal rather than "usual". However, by the end of the 19th century some authors had started using the name ''normal distribution'', where the word "normal" was used as an adjective – the term now being seen as a reflection of the fact that this distribution was seen as typical, common – and thus "normal". Charles Sanders Peirce, Peirce (one of those authors) once defined "normal" thus: "...the 'normal' is not the average (or any other kind of mean) of what actually occurs, but of what ''would'', in the long run, occur under certain circumstances." Around the turn of the 20th century Karl Pearson, Pearson popularized the term ''normal'' as a designation for this distribution. Also, it was Pearson who first wrote the distribution in terms of the standard deviation ''σ'' as in modern notation. Soon after this, in year 1915, Ronald Fisher, Fisher added the location parameter to the formula for normal distribution, expressing it in the way it is written nowadays: df = \frac e^ \, dx. The term "standard normal", which denotes the normal distribution with zero mean and unit variance came into general use around the 1950s, appearing in the popular textbooks by P. G. Hoel (1947) "''Introduction to mathematical statistics''" and A. M. Mood (1950) "''Introduction to the theory of statistics''".


See also

* Bates distribution – similar to the Irwin–Hall distribution, but rescaled back into the 0 to 1 range * Behrens–Fisher problem – the long-standing problem of testing whether two normal samples with different variances have same means; * Bhattacharyya distance – method used to separate mixtures of normal distributions * Erdős–Kac theorem – on the occurrence of the normal distribution in number theory * Full width at half maximum * Gaussian blur – convolution, which uses the normal distribution as a kernel * Modified half-normal distribution with the pdf on (0, \infty) is given as f(x)= \frac, where \Psi(\alpha,z)=_1\Psi_1\left(\begin\left(\alpha,\frac\right)\\(1,0)\end;z \right) denotes the Fox-Wright Psi function. * Normally distributed and uncorrelated does not imply independent * Ratio normal distribution * Reciprocal normal distribution * Standard normal table * Stein's lemma * Sub-Gaussian distribution * Sum of normally distributed random variables * Tweedie distribution – The normal distribution is a member of the family of Tweedie exponential dispersion models. * Wrapped normal distribution – the Normal distribution applied to a circular domain * Z-test – using the normal distribution


Notes


References


Citations


Sources

* * In particular, the entries fo
"bell-shaped and bell curve"
an

* * * * * * * * * * * * * * * * * * * * * * * * Translated by Stephen M. Stigler in ''Statistical Science'' 1 (3), 1986: . * * * * * * * * * * * * * * * * * * * * * * * * * * * *


External links

*
Normal distribution calculator
{{Authority control Normal distribution, Continuous distributions Conjugate prior distributions Exponential family distributions Stable distributions Location-scale family probability distributions]">X, ^p \right&= \sigma^p \cdot 2^ \frac _1F_1\left( -\frac, \frac, -\frac \left( \frac \mu \sigma \right)^2 \right). \end These expressions remain valid even if p is not an integer. See also Hermite polynomials#"Negative variance", generalized Hermite polynomials. The expectation of X conditioned on the event that X lies in an interval ,b/math> is given by :\operatorname\left \mid a= \mu - \sigma^2\frac where f and F respectively are the density and the cumulative distribution function of X. For b=\infty this is known as the
inverse Mills ratio In probability theory, the Mills ratio (or Mills's ratio) of a continuous random variable X is the function : m(x) := \frac , where f(x) is the probability density function, and :\bar(x) := \Pr x.html" ;"title=">x">>x= \int_x^ f(u)\, du is the ...
. Note that above, density f of X is used instead of standard normal density as in inverse Mills ratio, so here we have \sigma^2 instead of \sigma.


Fourier transform and characteristic function

The
Fourier transform A Fourier transform (FT) is a mathematical transform that decomposes functions into frequency components, which are represented by the output of the transform as a function of frequency. Most commonly functions of time or space are transformed, ...
of a normal density f with mean \mu and standard deviation \sigma is : \hat f(t) = \int_^\infty f(x)e^ \, dx = e^ e^ where i is the
imaginary unit The imaginary unit or unit imaginary number () is a solution to the quadratic equation x^2+1=0. Although there is no real number with this property, can be used to extend the real numbers to what are called complex numbers, using addition an ...
. If the mean \mu=0, the first factor is 1, and the Fourier transform is, apart from a constant factor, a normal density on the
frequency domain In physics, electronics, control systems engineering, and statistics, the frequency domain refers to the analysis of mathematical functions or signals with respect to frequency, rather than time. Put simply, a time-domain graph shows how a signa ...
, with mean 0 and standard deviation 1/\sigma. In particular, the standard normal distribution \varphi is an
eigenfunction In mathematics, an eigenfunction of a linear operator ''D'' defined on some function space is any non-zero function f in that space that, when acted upon by ''D'', is only multiplied by some scaling factor called an eigenvalue. As an equation, th ...
of the Fourier transform. In probability theory, the Fourier transform of the probability distribution of a real-valued random variable X is closely connected to the
characteristic function In mathematics, the term "characteristic function" can refer to any of several distinct concepts: * The indicator function of a subset, that is the function ::\mathbf_A\colon X \to \, :which for a given subset ''A'' of ''X'', has value 1 at points ...
\varphi_X(t) of that variable, which is defined as the
expected value In probability theory, the expected value (also called expectation, expectancy, mathematical expectation, mean, average, or first moment) is a generalization of the weighted average. Informally, the expected value is the arithmetic mean of a l ...
of e^, as a function of the real variable t (the
frequency Frequency is the number of occurrences of a repeating event per unit of time. It is also occasionally referred to as ''temporal frequency'' for clarity, and is distinct from ''angular frequency''. Frequency is measured in hertz (Hz) which is eq ...
parameter of the Fourier transform). This definition can be analytically extended to a complex-value variable t. The relation between both is: :\varphi_X(t) = \hat f(-t)


Moment and cumulant generating functions

The
moment generating function In probability theory and statistics, the moment-generating function of a real-valued random variable is an alternative specification of its probability distribution. Thus, it provides the basis of an alternative route to analytical results compare ...
of a real random variable X is the expected value of e^, as a function of the real parameter t. For a normal distribution with density f, mean \mu and deviation \sigma, the moment generating function exists and is equal to :M(t) = \operatorname ^= \hat f(it) = e^ e^ The
cumulant generating function In probability theory and statistics, the cumulants of a probability distribution are a set of quantities that provide an alternative to the '' moments'' of the distribution. Any two probability distributions whose moments are identical will have ...
is the logarithm of the moment generating function, namely :g(t) = \ln M(t) = \mu t + \tfrac 12 \sigma^2 t^2 Since this is a quadratic polynomial in t, only the first two
cumulant In probability theory and statistics, the cumulants of a probability distribution are a set of quantities that provide an alternative to the '' moments'' of the distribution. Any two probability distributions whose moments are identical will ha ...
s are nonzero, namely the mean \mu and the variance \sigma^2.


Stein operator and class

Within
Stein's method Stein's method is a general method in probability theory to obtain bounds on the distance between two probability distributions with respect to a probability metric. It was introduced by Charles Stein, who first published it in 1972, to obtain ...
the Stein operator and class of a random variable X \sim \mathcal(\mu, \sigma^2) are \mathcalf(x) = \sigma^2 f'(x) - (x-\mu)f(x) and \mathcal the class of all absolutely continuous functions f : \R \to \R \mbox\mathbb[, f'(X), ]< \infty.


Zero-variance limit

In the limit (mathematics), limit when \sigma tends to zero, the probability density f(x) eventually tends to zero at any x\ne \mu, but grows without limit if x = \mu, while its integral remains equal to 1. Therefore, the normal distribution cannot be defined as an ordinary
function Function or functionality may refer to: Computing * Function key, a type of key on computer keyboards * Function model, a structured representation of processes in a system * Function object or functor or functionoid, a concept of object-oriente ...
when \sigma = 0. However, one can define the normal distribution with zero variance as a
generalized function In mathematics, generalized functions are objects extending the notion of functions. There is more than one recognized theory, for example the theory of distributions. Generalized functions are especially useful in making discontinuous functions ...
; specifically, as Dirac's "delta function" \delta translated by the mean \mu, that is f(x)=\delta(x-\mu). Its CDF is then the
Heaviside step function The Heaviside step function, or the unit step function, usually denoted by or (but sometimes , or ), is a step function, named after Oliver Heaviside (1850–1925), the value of which is zero for negative arguments and one for positive argume ...
translated by the mean \mu, namely :F(x) = \begin 0 & \textx < \mu \\ 1 & \textx \geq \mu \end


Maximum entropy

Of all probability distributions over the reals with a specified mean \mu and variance \sigma^2, the normal distribution N(\mu,\sigma^2) is the one with maximum entropy. If X is a
continuous random variable In probability theory and statistics, a probability distribution is the mathematical function that gives the probabilities of occurrence of different possible outcomes for an experiment. It is a mathematical description of a random phenomenon i ...
with
probability density In probability theory, a probability density function (PDF), or density of a continuous random variable, is a function whose value at any given sample (or point) in the sample space (the set of possible values taken by the random variable) can ...
f(x), then the entropy of X is defined as : H(X) = - \int_^\infty f(x)\log f(x)\, dx where f(x)\log f(x) is understood to be zero whenever f(x)=0. This functional can be maximized, subject to the constraints that the distribution is properly normalized and has a specified variance, by using
variational calculus The calculus of variations (or Variational Calculus) is a field of mathematical analysis that uses variations, which are small changes in functions and functionals, to find maxima and minima of functionals: mappings from a set of functions t ...
. A function with two
Lagrange multipliers In mathematical optimization, the method of Lagrange multipliers is a strategy for finding the local maxima and minima of a function subject to equality constraints (i.e., subject to the condition that one or more equations have to be satisfied ex ...
is defined: : L=\int_^\infty f(x)\ln(f(x))\,dx-\lambda_0\left(1-\int_^\infty f(x)\,dx\right)-\lambda\left(\sigma^2-\int_^\infty f(x)(x-\mu)^2\,dx\right) where f(x) is, for now, regarded as some density function with mean \mu and standard deviation \sigma. At maximum entropy, a small variation \delta f(x) about f(x) will produce a variation \delta L about L which is equal to 0: : 0=\delta L=\int_^\infty \delta f(x)\left (\ln(f(x))+1+\lambda_0+\lambda(x-\mu)^2\right )\,dx Since this must hold for any small \delta f(x), the term in brackets must be zero, and solving for f(x) yields: :f(x)=e^ Using the constraint equations to solve for \lambda_0 and \lambda yields the density of the normal distribution: : f(x, \mu, \sigma)=\frace^ The entropy of a normal distribution is equal to : H(X)=\tfrac(1+\log(2\sigma^2\pi))


Other properties


Related distributions


Central limit theorem

The central limit theorem states that under certain (fairly common) conditions, the sum of many random variables will have an approximately normal distribution. More specifically, where X_1,\ldots ,X_n are
independent and identically distributed In probability theory and statistics, a collection of random variables is independent and identically distributed if each random variable has the same probability distribution as the others and all are mutually independent. This property is usua ...
random variables with the same arbitrary distribution, zero mean, and variance \sigma^2 and Z is their mean scaled by \sqrt : Z = \sqrt\left(\frac\sum_^n X_i\right) Then, as n increases, the probability distribution of Z will tend to the normal distribution with zero mean and variance \sigma^2. The theorem can be extended to variables (X_i) that are not independent and/or not identically distributed if certain constraints are placed on the degree of dependence and the moments of the distributions. Many
test statistic A test statistic is a statistic (a quantity derived from the sample) used in statistical hypothesis testing.Berger, R. L.; Casella, G. (2001). ''Statistical Inference'', Duxbury Press, Second Edition (p.374) A hypothesis test is typically specif ...
s, scores, and
estimator In statistics, an estimator is a rule for calculating an estimate of a given quantity based on observed data: thus the rule (the estimator), the quantity of interest (the estimand) and its result (the estimate) are distinguished. For example, the ...
s encountered in practice contain sums of certain random variables in 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 distributions. The central limit theorem also implies that certain distributions can be approximated by the normal distribution, for example: * The
binomial distribution In probability theory and statistics, the binomial distribution with parameters ''n'' and ''p'' is the discrete probability distribution of the number of successes in a sequence of ''n'' independent experiments, each asking a yes–no quest ...
B(n,p) is approximately normal with mean np and variance np(1-p) for large n and for p not too close to 0 or 1. * The
Poisson distribution In probability theory and statistics, the Poisson distribution is a discrete probability distribution that expresses the probability of a given number of events occurring in a fixed interval of time or space if these events occur with a known co ...
with parameter \lambda is approximately normal with mean \lambda and variance \lambda, for large values of \lambda. * The
chi-squared distribution In probability theory and statistics, the chi-squared distribution (also chi-square or \chi^2-distribution) with k degrees of freedom is the distribution of a sum of the squares of k independent standard normal random variables. The chi-squa ...
\chi^2(k) is approximately normal with mean k and variance 2k, for large k. * The
Student's t-distribution In probability and statistics, Student's ''t''-distribution (or simply the ''t''-distribution) is any member of a family of continuous probability distributions that arise when estimating the mean of a normally distributed population in sit ...
t(\nu) is approximately normal with mean 0 and variance 1 when \nu is large. Whether these approximations are sufficiently accurate depends on the purpose for which they are needed, and the rate of convergence to the normal distribution. It is typically the case that such approximations are less accurate in the tails of the distribution. A general upper bound for the approximation error in the central limit theorem is given by the
Berry–Esseen theorem In probability theory, the central limit theorem states that, under certain circumstances, the probability distribution of the scaled mean of a random sample converges to a normal distribution as the sample size increases to infinity. Under strong ...
, improvements of the approximation are given by the
Edgeworth expansion The Gram–Charlier A series (named in honor of Jørgen Pedersen Gram and Carl Charlier), and the Edgeworth series (named in honor of Francis Ysidro Edgeworth) are series that approximate a probability distribution in terms of its cumulants. The se ...
s. This theorem can also be used to justify modeling the sum of many uniform noise sources as
Gaussian noise Gaussian noise, named after Carl Friedrich Gauss, is a term from signal processing theory denoting a kind of signal noise that has a probability density function (pdf) equal to that of the normal distribution (which is also known as the Gaussia ...
. See
AWGN Additive white Gaussian noise (AWGN) is a basic noise model used in information theory to mimic the effect of many random processes that occur in nature. The modifiers denote specific characteristics: * ''Additive'' because it is added to any nois ...
.


Operations and functions of normal variables

The
probability density In probability theory, a probability density function (PDF), or density of a continuous random variable, is a function whose value at any given sample (or point) in the sample space (the set of possible values taken by the random variable) can ...
,
cumulative distribution In statistics, the frequency (or absolute frequency) of an event i is the number n_i of times the observation has occurred/recorded in an experiment or study. These frequencies are often depicted graphically or in tabular form. Types The cumul ...
, and inverse cumulative distribution of any function of one or more independent or correlated normal variables can be computed with the numerical method of ray-tracing
Matlab code
. In the following sections we look at some special cases.


Operations on a single normal variable

If X is distributed normally with mean \mu and variance \sigma^2, then * aX+b, for any real numbers a and b, is also normally distributed, with mean a\mu+b and standard deviation , a, \sigma. That is, the family of normal distributions is closed under linear transformations. * The exponential of X is distributed log-normally: . * The absolute value of X has
folded normal distribution The folded normal distribution is a probability distribution related to the normal distribution. Given a normally distributed random variable ''X'' with mean ''μ'' and variance ''σ''2, the random variable ''Y'' = , ''X'', has a folded normal d ...
: . If \mu = 0 this is known as the
half-normal distribution In probability theory and statistics, the half-normal distribution is a special case of the folded normal distribution. Let X follow an ordinary normal distribution, N(0,\sigma^2). Then, Y=, X, follows a half-normal distribution. Thus, the hal ...
. * The absolute value of normalized residuals, , ''X'' − ''μ'', /''σ'', has
chi distribution In probability theory and statistics, the chi distribution is a continuous probability distribution. It is the distribution of the positive square root of the sum of squares of a set of independent random variables each following a standard norm ...
with one degree of freedom: , X - \mu, / \sigma \sim \chi_1. * The square of ''X''/''σ'' has the
noncentral chi-squared distribution In probability theory and statistics, the noncentral chi-squared distribution (or noncentral chi-square distribution, noncentral \chi^2 distribution) is a noncentral generalization of the chi-squared distribution. It often arises in the power a ...
with one degree of freedom: X^2 / \sigma^2 \sim \chi_1^2(\mu^2 / \sigma^2). If \mu = 0, the distribution is called simply chi-squared. * The log likelihood of a normal variable x is simply the log of its
probability density function In probability theory, a probability density function (PDF), or density of a continuous random variable, is a function whose value at any given sample (or point) in the sample space (the set of possible values taken by the random variable) can ...
: \ln p(x)= -\frac \left(\frac \right)^2 -\ln \left(\sigma \sqrt \right) = -\frac z^2 -\ln \left(\sigma \sqrt \right). Since this is a scaled and shifted square of a standard normal variable, it is distributed as a scaled and shifted chi-squared variable. * The distribution of the variable ''X'' restricted to an interval 'a'', ''b''is called the
truncated normal distribution In probability and statistics, the truncated normal distribution is the probability distribution derived from that of a normally distributed random variable by bounding the random variable from either below or above (or both). The truncated no ...
. * (''X'' − ''μ'')−2 has a
Lévy distribution In probability theory and statistics, the Lévy distribution, named after Paul Lévy, is a continuous probability distribution for a non-negative random variable. In spectroscopy, this distribution, with frequency as the dependent variable, is kn ...
with location 0 and scale ''σ''−2.


= Operations on two independent normal variables

= * If X_1 and X_2 are two
independent Independent or Independents may refer to: Arts, entertainment, and media Artist groups * Independents (artist group), a group of modernist painters based in the New Hope, Pennsylvania, area of the United States during the early 1930s * Independ ...
normal random variables, with means \mu_1, \mu_2 and standard deviations \sigma_1, \sigma_2, then their sum X_1 + X_2 will also be normally distributed, roof/sup> with mean \mu_1 + \mu_2 and variance \sigma_1^2 + \sigma_2^2. * In particular, if X and Y are independent normal deviates with zero mean and variance \sigma^2, then X + Y and X - Y are also independent and normally distributed, with zero mean and variance 2\sigma^2. This is a special case of the
polarization identity In linear algebra, a branch of mathematics, the polarization identity is any one of a family of formulas that express the inner product of two vectors in terms of the norm of a normed vector space. If a norm arises from an inner product then t ...
. * If X_1, X_2 are two independent normal deviates with mean \mu and deviation \sigma, and a, b are arbitrary real numbers, then the variable X_3 = \frac + \mu is also normally distributed with mean \mu and deviation \sigma. It follows that the normal distribution is
stable A stable is a building in which livestock, especially horses, are kept. It most commonly means a building that is divided into separate stalls for individual animals and livestock. There are many different types of stables in use today; the ...
(with exponent \alpha=2).


= Operations on two independent standard normal variables

= If X_1 and X_2 are two independent standard normal random variables with mean 0 and variance 1, then * Their sum and difference is distributed normally with mean zero and variance two: X_1 \pm X_2 \sim N(0, 2). * Their product Z = X_1 X_2 follows the
product distribution A product distribution is a probability distribution constructed as the distribution of the product of random variables having two other known distributions. Given two statistically independent random variables ''X'' and ''Y'', the distribution of ...
with density function f_Z(z) = \pi^ K_0(, z, ) where K_0 is the
modified Bessel function of the second kind Bessel functions, first defined by the mathematician Daniel Bernoulli and then generalized by Friedrich Bessel, are canonical solutions of Bessel's differential equation x^2 \frac + x \frac + \left(x^2 - \alpha^2 \right)y = 0 for an arbitrary ...
. This distribution is symmetric around zero, unbounded at z = 0, and has the
characteristic function In mathematics, the term "characteristic function" can refer to any of several distinct concepts: * The indicator function of a subset, that is the function ::\mathbf_A\colon X \to \, :which for a given subset ''A'' of ''X'', has value 1 at points ...
\phi_Z(t) = (1 + t^2)^. * Their ratio follows the standard
Cauchy distribution The Cauchy distribution, named after Augustin Cauchy, is a continuous probability distribution. It is also known, especially among physicists, as the Lorentz distribution (after Hendrik Lorentz), Cauchy–Lorentz distribution, Lorentz(ian) fun ...
: X_1/ X_2 \sim \operatorname(0, 1). * Their Euclidean norm \sqrt has the
Rayleigh distribution In probability theory and statistics, the Rayleigh distribution is a continuous probability distribution for nonnegative-valued random variables. Up to rescaling, it coincides with the chi distribution with two degrees of freedom. The distribut ...
.


Operations on multiple independent normal variables

* Any linear combination of independent normal deviates is a normal deviate. * If X_1, X_2, \ldots, X_n are independent standard normal random variables, then the sum of their squares has the
chi-squared distribution In probability theory and statistics, the chi-squared distribution (also chi-square or \chi^2-distribution) with k degrees of freedom is the distribution of a sum of the squares of k independent standard normal random variables. The chi-squa ...
with n degrees of freedom X_1^2 + \cdots + X_n^2 \sim \chi_n^2. * If X_1, X_2, \ldots, X_n are independent normally distributed random variables with means \mu and variances \sigma^2, then their
sample mean The sample mean (or "empirical mean") and the sample covariance are statistics computed from a Sample (statistics), sample of data on one or more random variables. The sample mean is the average value (or mean, mean value) of a sample (statistic ...
is independent from the sample
standard deviation In statistics, the standard deviation is a measure of the amount of variation or dispersion of a set of values. A low standard deviation indicates that the values tend to be close to the mean (also called the expected value) of the set, while ...
, which can be demonstrated using Basu's theorem or
Cochran's theorem In statistics, Cochran's theorem, devised by William G. Cochran, is a theorem used to justify results relating to the probability distributions of statistics that are used in the analysis of variance. Statement Let ''U''1, ..., ''U'N'' be i.i. ...
. The ratio of these two quantities will have the
Student's t-distribution In probability and statistics, Student's ''t''-distribution (or simply the ''t''-distribution) is any member of a family of continuous probability distributions that arise when estimating the mean of a normally distributed population in sit ...
with n-1 degrees of freedom: t = \frac = \frac \sim t_. * If X_1, X_2, \ldots, X_n, Y_1, Y_2, \ldots, Y_m are independent standard normal random variables, then the ratio of their normalized sums of squares will have the with degrees of freedom: F = \frac \sim F_.


Operations on multiple correlated normal variables

* A
quadratic form In mathematics, a quadratic form is a polynomial with terms all of degree two ("form" is another name for a homogeneous polynomial). For example, :4x^2 + 2xy - 3y^2 is a quadratic form in the variables and . The coefficients usually belong to a ...
of a normal vector, i.e. a quadratic function q = \sum x_i^2 + \sum x_j + c of multiple independent or correlated normal variables, is a generalized chi-square variable.


Operations on the density function

The split normal distribution is most directly defined in terms of joining scaled sections of the density functions of different normal distributions and rescaling the density to integrate to one. The
truncated normal distribution In probability and statistics, the truncated normal distribution is the probability distribution derived from that of a normally distributed random variable by bounding the random variable from either below or above (or both). The truncated no ...
results from rescaling a section of a single density function.


Infinite divisibility and Cramér's theorem

For any positive integer \text, any normal distribution with mean \mu and variance \sigma^2 is the distribution of the sum of \text independent normal deviates, each with mean \frac and variance \frac. This property is called
infinite divisibility Infinite divisibility arises in different ways in philosophy, physics, economics, order theory (a branch of mathematics), and probability theory (also a branch of mathematics). One may speak of infinite divisibility, or the lack thereof, of matter ...
. Conversely, if X_1 and X_2 are independent random variables and their sum X_1+X_2 has a normal distribution, then both X_1 and X_2 must be normal deviates. This result is known as Cramér's decomposition theorem, and is equivalent to saying that the convolution of two distributions is normal if and only if both are normal. Cramér's theorem implies that a linear combination of independent non-Gaussian variables will never have an exactly normal distribution, although it may approach it arbitrarily closely.


Bernstein's theorem

Bernstein's theorem states that if X and Y are independent and X + Y and X - Y are also independent, then both ''X'' and ''Y'' must necessarily have normal distributions. More generally, if X_1, \ldots, X_n are independent random variables, then two distinct linear combinations \sum and \sumwill be independent if and only if all X_k are normal and \sum, where \sigma_k^2 denotes the variance of X_k.


Extensions

The notion of normal distribution, being one of the most important distributions in probability theory, has been extended far beyond the standard framework of the univariate (that is one-dimensional) case (Case 1). All these extensions are also called ''normal'' or ''Gaussian'' laws, so a certain ambiguity in names exists. * The
multivariate normal distribution In probability theory and statistics, the multivariate normal distribution, multivariate Gaussian distribution, or joint normal distribution is a generalization of the one-dimensional (univariate) normal distribution to higher dimensions. One d ...
describes the Gaussian law in the ''k''-dimensional Euclidean space. A vector is multivariate-normally distributed if any linear combination of its components has a (univariate) normal distribution. The variance of ''X'' is a ''k×k'' symmetric positive-definite matrix ''V''. The multivariate normal distribution is a special case of the
elliptical distribution In probability and statistics, an elliptical distribution is any member of a broad family of probability distributions that generalize the multivariate normal distribution. Intuitively, in the simplified two and three dimensional case, the joint di ...
s. As such, its iso-density loci in the ''k'' = 2 case are ellipses and in the case of arbitrary ''k'' are ellipsoids. * Rectified Gaussian distribution a rectified version of normal distribution with all the negative elements reset to 0 * Complex normal distribution deals with the complex normal vectors. A complex vector is said to be normal if both its real and imaginary components jointly possess a 2''k''-dimensional multivariate normal distribution. The variance-covariance structure of ''X'' is described by two matrices: the ''variance'' matrix Γ, and the ''relation'' matrix ''C''. * Matrix normal distribution describes the case of normally distributed matrices. * Gaussian processes are the normally distributed stochastic processes. These can be viewed as elements of some infinite-dimensional Hilbert space ''H'', and thus are the analogues of multivariate normal vectors for the case . A random element is said to be normal if for any constant the scalar product has a (univariate) normal distribution. The variance structure of such Gaussian random element can be described in terms of the linear ''covariance ''. Several Gaussian processes became popular enough to have their own names: ** Wiener process, Brownian motion, ** Brownian bridge, ** Ornstein–Uhlenbeck process. * Gaussian q-distribution is an abstract mathematical construction that represents a "q-analogue" of the normal distribution. * the q-Gaussian is an analogue of the Gaussian distribution, in the sense that it maximises the Tsallis entropy, and is one type of Tsallis distribution. Note that this distribution is different from the Gaussian q-distribution above. * The Kaniadakis Gaussian distribution, Kaniadakis ''κ''-Gaussian distribution is a generalization of the Gaussian distribution which arises from the Kaniadakis statistics, being one of the Kaniadakis distribution, Kaniadakis distributions. A random variable ''X'' has a two-piece normal distribution if it has a distribution : f_X( x ) = N( \mu, \sigma_1^2 ) \text x \le \mu : f_X( x ) = N( \mu, \sigma_2^2 ) \text x \ge \mu where ''μ'' is the mean and ''σ''1 and ''σ''2 are the standard deviations of the distribution to the left and right of the mean respectively. The mean, variance and third central moment of this distribution have been determined : \operatorname( X ) = \mu + \sqrt ( \sigma_2 - \sigma_1 ) : \operatorname( X ) = \left( 1 - \frac 2 \pi\right)( \sigma_2 - \sigma_1 )^2 + \sigma_1 \sigma_2 : \operatorname( X ) = \sqrt( \sigma_2 - \sigma_1 ) \left[ \left( \frac 4 \pi - 1 \right) ( \sigma_2 - \sigma_1)^2 + \sigma_1 \sigma_2 \right] where E(''X''), V(''X'') and T(''X'') are the mean, variance, and third central moment respectively. One of the main practical uses of the Gaussian law is to model the empirical distributions of many different random variables encountered in practice. In such case a possible extension would be a richer family of distributions, having more than two parameters and therefore being able to fit the empirical distribution more accurately. The examples of such extensions are: * Pearson distribution — a four-parameter family of probability distributions that extend the normal law to include different skewness and kurtosis values. * The generalized normal distribution, also known as the exponential power distribution, allows for distribution tails with thicker or thinner asymptotic behaviors.


Statistical inference


Estimation of parameters

It is often the case that we do not know the parameters of the normal distribution, but instead want to Estimation theory, estimate them. That is, having a sample (x_1, \ldots, x_n) from a normal N(\mu, \sigma^2) population we would like to learn the approximate values of parameters \mu and \sigma^2. The standard approach to this problem is the maximum likelihood method, which requires maximization of the ''log-likelihood function'': : \ln\mathcal(\mu,\sigma^2) = \sum_^n \ln f(x_i\mid\mu,\sigma^2) = -\frac\ln(2\pi) - \frac\ln\sigma^2 - \frac\sum_^n (x_i-\mu)^2. Taking derivatives with respect to \mu and \sigma^2 and solving the resulting system of first order conditions yields the ''maximum likelihood estimates'': : \hat = \overline \equiv \frac\sum_^n x_i, \qquad \hat^2 = \frac \sum_^n (x_i - \overline)^2.


Sample mean

Estimator \textstyle\hat\mu is called the ''
sample mean The sample mean (or "empirical mean") and the sample covariance are statistics computed from a Sample (statistics), sample of data on one or more random variables. The sample mean is the average value (or mean, mean value) of a sample (statistic ...
'', since it is the arithmetic mean of all observations. The statistic \textstyle\overline is complete statistic, complete and sufficient statistic, sufficient for \mu, and therefore by the Lehmann–Scheffé theorem, \textstyle\hat\mu is the uniformly minimum variance unbiased (UMVU) estimator. In finite samples it is distributed normally: : \hat\mu \sim \mathcal(\mu,\sigma^2/n). The variance of this estimator is equal to the ''μμ''-element of the inverse Fisher information matrix \textstyle\mathcal^. This implies that the estimator is efficient estimator, finite-sample efficient. Of practical importance is the fact that the standard error (statistics), standard error of \textstyle\hat\mu is proportional to \textstyle1/\sqrt, that is, if one wishes to decrease the standard error by a factor of 10, one must increase the number of points in the sample by a factor of 100. This fact is widely used in determining sample sizes for opinion polls and the number of trials in Monte Carlo simulations. From the standpoint of the asymptotic theory (statistics), asymptotic theory, \textstyle\hat\mu is consistent estimator, consistent, that is, it convergence in probability, converges in probability to \mu as n\rightarrow\infty. The estimator is also asymptotic normality, asymptotically normal, which is a simple corollary of the fact that it is normal in finite samples: : \sqrt(\hat\mu-\mu) \,\xrightarrow\, \mathcal(0,\sigma^2).


Sample variance

The estimator \textstyle\hat\sigma^2 is called the ''sample variance'', since it is the variance of the sample ((x_1, \ldots, x_n)). In practice, another estimator is often used instead of the \textstyle\hat\sigma^2. This other estimator is denoted s^2, and is also called the ''sample variance'', which represents a certain ambiguity in terminology; its square root s is called the ''sample standard deviation''. The estimator s^2 differs from \textstyle\hat\sigma^2 by having instead of ''n'' in the denominator (the so-called Bessel's correction): : s^2 = \frac \hat\sigma^2 = \frac \sum_^n (x_i - \overline)^2. The difference between s^2 and \textstyle\hat\sigma^2 becomes negligibly small for large ''n''s. In finite samples however, the motivation behind the use of s^2 is that it is an unbiased estimator of the underlying parameter \sigma^2, whereas \textstyle\hat\sigma^2 is biased. Also, by the Lehmann–Scheffé theorem the estimator s^2 is uniformly minimum variance unbiased (Minimum-variance unbiased estimator, UMVU), which makes it the "best" estimator among all unbiased ones. However it can be shown that the biased estimator \textstyle\hat\sigma^2 is "better" than the s^2 in terms of the mean squared error (MSE) criterion. In finite samples both s^2 and \textstyle\hat\sigma^2 have scaled
chi-squared distribution In probability theory and statistics, the chi-squared distribution (also chi-square or \chi^2-distribution) with k degrees of freedom is the distribution of a sum of the squares of k independent standard normal random variables. The chi-squa ...
with degrees of freedom: : s^2 \sim \frac \cdot \chi^2_, \qquad \hat\sigma^2 \sim \frac \cdot \chi^2_. The first of these expressions shows that the variance of s^2 is equal to 2\sigma^4/(n-1), which is slightly greater than the ''σσ''-element of the inverse Fisher information matrix \textstyle\mathcal^. Thus, s^2 is not an efficient estimator for \sigma^2, and moreover, since s^2 is UMVU, we can conclude that the finite-sample efficient estimator for \sigma^2 does not exist. Applying the asymptotic theory, both estimators s^2 and \textstyle\hat\sigma^2 are consistent, that is they converge in probability to \sigma^2 as the sample size n\rightarrow\infty. The two estimators are also both asymptotically normal: : \sqrt(\hat\sigma^2 - \sigma^2) \simeq \sqrt(s^2-\sigma^2) \,\xrightarrow\, \mathcal(0,2\sigma^4). In particular, both estimators are asymptotically efficient for \sigma^2.


Confidence intervals

By
Cochran's theorem In statistics, Cochran's theorem, devised by William G. Cochran, is a theorem used to justify results relating to the probability distributions of statistics that are used in the analysis of variance. Statement Let ''U''1, ..., ''U'N'' be i.i. ...
, for normal distributions the sample mean \textstyle\hat\mu and the sample variance ''s''2 are
independent Independent or Independents may refer to: Arts, entertainment, and media Artist groups * Independents (artist group), a group of modernist painters based in the New Hope, Pennsylvania, area of the United States during the early 1930s * Independ ...
, which means there can be no gain in considering their joint distribution. There is also a converse theorem: if in a sample the sample mean and sample variance are independent, then the sample must have come from the normal distribution. The independence between \textstyle\hat\mu and ''s'' can be employed to construct the so-called ''t-statistic'': : t = \frac = \frac \sim t_ This quantity ''t'' has the
Student's t-distribution In probability and statistics, Student's ''t''-distribution (or simply the ''t''-distribution) is any member of a family of continuous probability distributions that arise when estimating the mean of a normally distributed population in sit ...
with degrees of freedom, and it is an ancillary statistic (independent of the value of the parameters). Inverting the distribution of this ''t''-statistics will allow us to construct the
confidence interval In frequentist statistics, a confidence interval (CI) is a range of estimates for an unknown parameter. A confidence interval is computed at a designated ''confidence level''; the 95% confidence level is most common, but other levels, such as 9 ...
for ''μ''; similarly, inverting the ''χ''2 distribution of the statistic ''s''2 will give us the confidence interval for ''σ''2: :\mu \in \left[ \hat\mu - t_ \fracs, \hat\mu + t_ \fracs \right], :\sigma^2 \in \left[ \frac, \frac \right], where ''tk,p'' and are the ''p''th
quantile In statistics and probability, quantiles are cut points dividing the range of a probability distribution into continuous intervals with equal probabilities, or dividing the observations in a sample in the same way. There is one fewer quantile tha ...
s of the ''t''- and ''χ''2-distributions respectively. These confidence intervals are of the ''confidence level'' , meaning that the true values ''μ'' and ''σ''2 fall outside of these intervals with probability (or significance level) ''α''. In practice people usually take , resulting in the 95% confidence intervals. Approximate formulas can be derived from the asymptotic distributions of \textstyle\hat\mu and ''s''2: :\mu \in \left[ \hat\mu - , z_, \fracs, \hat\mu + , z_, \fracs \right], :\sigma^2 \in \left[ s^2 - , z_, \fracs^2, s^2 + , z_, \fracs^2 \right], The approximate formulas become valid for large values of ''n'', and are more convenient for the manual calculation since the standard normal quantiles ''z''''α''/2 do not depend on ''n''. In particular, the most popular value of , results in .


Normality tests

Normality tests assess the likelihood that the given data set comes from a normal distribution. Typically the null hypothesis ''H''0 is that the observations are distributed normally with unspecified mean ''μ'' and variance ''σ''2, versus the alternative ''Ha'' that the distribution is arbitrary. Many tests (over 40) have been devised for this problem. The more prominent of them are outlined below: Diagnostic plots are more intuitively appealing but subjective at the same time, as they rely on informal human judgement to accept or reject the null hypothesis. *
Q–Q plot In statistics, a Q–Q plot (quantile-quantile plot) is a probability plot, a List of graphical methods, graphical method for comparing two probability distributions by plotting their ''quantiles'' against each other. A point on the plot co ...
, also known as normal probability plot or rankit plot—is a plot of the sorted values from the data set against the expected values of the corresponding quantiles from the standard normal distribution. That is, it's a plot of point of the form (Φ−1(''pk''), ''x''(''k'')), where plotting points ''pk'' are equal to ''pk'' = (''k'' − ''α'')/(''n'' + 1 − 2''α'') and ''α'' is an adjustment constant, which can be anything between 0 and 1. If the null hypothesis is true, the plotted points should approximately lie on a straight line. * P–P plot – similar to the Q–Q plot, but used much less frequently. This method consists of plotting the points (Φ(''z''(''k'')), ''pk''), where \textstyle z_ = (x_-\hat\mu)/\hat\sigma. For normally distributed data this plot should lie on a 45° line between (0, 0) and (1, 1). Goodness-of-fit tests: ''Moment-based tests'': * D'Agostino's K-squared test * Jarque–Bera test * Shapiro–Wilk test: This is based on the fact that the line in the Q–Q plot has the slope of ''σ''. The test compares the least squares estimate of that slope with the value of the sample variance, and rejects the null hypothesis if these two quantities differ significantly. ''Tests based on the empirical distribution function'': * Anderson–Darling test * Lilliefors test (an adaptation of the Kolmogorov–Smirnov test)


Bayesian analysis of the normal distribution

Bayesian analysis of normally distributed data is complicated by the many different possibilities that may be considered: * Either the mean, or the variance, or neither, may be considered a fixed quantity. * When the variance is unknown, analysis may be done directly in terms of the variance, or in terms of the
precision Precision, precise or precisely may refer to: Science, and technology, and mathematics Mathematics and computing (general) * Accuracy and precision, measurement deviation from true value and its scatter * Significant figures, the number of digit ...
, the reciprocal of the variance. The reason for expressing the formulas in terms of precision is that the analysis of most cases is simplified. * Both univariate and multivariate normal distribution, multivariate cases need to be considered. * Either conjugate prior, conjugate or improper prior, improper prior distributions may be placed on the unknown variables. * An additional set of cases occurs in Bayesian linear regression, where in the basic model the data is assumed to be normally distributed, and normal priors are placed on the regression coefficients. The resulting analysis is similar to the basic cases of independent identically distributed data. The formulas for the non-linear-regression cases are summarized in the conjugate prior article.


Sum of two quadratics


= Scalar form

= The following auxiliary formula is useful for simplifying the posterior distribution, posterior update equations, which otherwise become fairly tedious. :a(x-y)^2 + b(x-z)^2 = (a + b)\left(x - \frac\right)^2 + \frac(y-z)^2 This equation rewrites the sum of two quadratics in ''x'' by expanding the squares, grouping the terms in ''x'', and completing the square. Note the following about the complex constant factors attached to some of the terms: # The factor \frac has the form of a weighted average of ''y'' and ''z''. # \frac = \frac = (a^ + b^)^. This shows that this factor can be thought of as resulting from a situation where the Multiplicative inverse, reciprocals of quantities ''a'' and ''b'' add directly, so to combine ''a'' and ''b'' themselves, it's necessary to reciprocate, add, and reciprocate the result again to get back into the original units. This is exactly the sort of operation performed by the harmonic mean, so it is not surprising that \frac is one-half the harmonic mean of ''a'' and ''b''.


= Vector form

= A similar formula can be written for the sum of two vector quadratics: If x, y, z are vectors of length ''k'', and A and B are symmetric matrix, symmetric, invertible matrices of size k\times k, then : \begin & (\mathbf-\mathbf)'\mathbf(\mathbf-\mathbf) + (\mathbf-\mathbf)' \mathbf(\mathbf-\mathbf) \\ = & (\mathbf - \mathbf)'(\mathbf+\mathbf)(\mathbf - \mathbf) + (\mathbf - \mathbf)'(\mathbf^ + \mathbf^)^(\mathbf - \mathbf) \end where :\mathbf = (\mathbf + \mathbf)^(\mathbf\mathbf + \mathbf \mathbf) Note that the form x′ A x is called a
quadratic form In mathematics, a quadratic form is a polynomial with terms all of degree two ("form" is another name for a homogeneous polynomial). For example, :4x^2 + 2xy - 3y^2 is a quadratic form in the variables and . The coefficients usually belong to a ...
and is a scalar (mathematics), scalar: :\mathbf'\mathbf\mathbf = \sum_a_ x_i x_j In other words, it sums up all possible combinations of products of pairs of elements from x, with a separate coefficient for each. In addition, since x_i x_j = x_j x_i, only the sum a_ + a_ matters for any off-diagonal elements of A, and there is no loss of generality in assuming that A is symmetric matrix, symmetric. Furthermore, if A is symmetric, then the form \mathbf'\mathbf\mathbf = \mathbf'\mathbf\mathbf.


Sum of differences from the mean

Another useful formula is as follows: \sum_^n (x_i-\mu)^2 = \sum_^n (x_i-\bar)^2 + n(\bar -\mu)^2 where \bar = \frac \sum_^n x_i.


With known variance

For a set of i.i.d. normally distributed data points X of size ''n'' where each individual point ''x'' follows x \sim \mathcal(\mu, \sigma^2) with known
variance In probability theory and statistics, variance is the expectation of the squared deviation of a random variable from its population mean or sample mean. Variance is a measure of dispersion, meaning it is a measure of how far a set of numbers ...
σ2, the conjugate prior distribution is also normally distributed. This can be shown more easily by rewriting the variance as the
precision Precision, precise or precisely may refer to: Science, and technology, and mathematics Mathematics and computing (general) * Accuracy and precision, measurement deviation from true value and its scatter * Significant figures, the number of digit ...
, i.e. using τ = 1/σ2. Then if x \sim \mathcal(\mu, 1/\tau) and \mu \sim \mathcal(\mu_0, 1/\tau_0), we proceed as follows. First, the likelihood function is (using the formula above for the sum of differences from the mean): :\begin p(\mathbf\mid\mu,\tau) &= \prod_^n \sqrt \exp\left(-\frac\tau(x_i-\mu)^2\right) \\ &= \left(\frac\right)^ \exp\left(-\frac\tau \sum_^n (x_i-\mu)^2\right) \\ &= \left(\frac\right)^ \exp\left[-\frac\tau \left(\sum_^n(x_i-\bar)^2 + n(\bar -\mu)^2\right)\right]. \end Then, we proceed as follows: :\begin p(\mu\mid\mathbf) &\propto p(\mathbf\mid\mu) p(\mu) \\ & = \left(\frac\right)^ \exp\left[-\frac\tau \left(\sum_^n(x_i-\bar)^2 + n(\bar -\mu)^2\right)\right] \sqrt \exp\left(-\frac\tau_0(\mu-\mu_0)^2\right) \\ &\propto \exp\left(-\frac\left(\tau\left(\sum_^n(x_i-\bar)^2 + n(\bar -\mu)^2\right) + \tau_0(\mu-\mu_0)^2\right)\right) \\ &\propto \exp\left(-\frac \left(n\tau(\bar-\mu)^2 + \tau_0(\mu-\mu_0)^2 \right)\right) \\ &= \exp\left(-\frac(n\tau + \tau_0)\left(\mu - \dfrac\right)^2 + \frac(\bar - \mu_0)^2\right) \\ &\propto \exp\left(-\frac(n\tau + \tau_0)\left(\mu - \dfrac\right)^2\right) \end In the above derivation, we used the formula above for the sum of two quadratics and eliminated all constant factors not involving ''μ''. The result is the kernel (statistics), kernel of a normal distribution, with mean \frac and precision n\tau + \tau_0, i.e. :p(\mu\mid\mathbf) \sim \mathcal\left(\frac, \frac\right) This can be written as a set of Bayesian update equations for the posterior parameters in terms of the prior parameters: :\begin \tau_0' &= \tau_0 + n\tau \\[5pt] \mu_0' &= \frac \\[5pt] \bar &= \frac\sum_^n x_i \end That is, to combine ''n'' data points with total precision of ''nτ'' (or equivalently, total variance of ''n''/''σ''2) and mean of values \bar, derive a new total precision simply by adding the total precision of the data to the prior total precision, and form a new mean through a ''precision-weighted average'', i.e. a weighted average of the data mean and the prior mean, each weighted by the associated total precision. This makes logical sense if the precision is thought of as indicating the certainty of the observations: In the distribution of the posterior mean, each of the input components is weighted by its certainty, and the certainty of this distribution is the sum of the individual certainties. (For the intuition of this, compare the expression "the whole is (or is not) greater than the sum of its parts". In addition, consider that the knowledge of the posterior comes from a combination of the knowledge of the prior and likelihood, so it makes sense that we are more certain of it than of either of its components.) The above formula reveals why it is more convenient to do Bayesian analysis of conjugate priors for the normal distribution in terms of the precision. The posterior precision is simply the sum of the prior and likelihood precisions, and the posterior mean is computed through a precision-weighted average, as described above. The same formulas can be written in terms of variance by reciprocating all the precisions, yielding the more ugly formulas :\begin ' &= \frac \\[5pt] \mu_0' &= \frac \\[5pt] \bar &= \frac\sum_^n x_i \end


With known mean

For a set of i.i.d. normally distributed data points X of size ''n'' where each individual point ''x'' follows x \sim \mathcal(\mu, \sigma^2) with known mean μ, the conjugate prior of the
variance In probability theory and statistics, variance is the expectation of the squared deviation of a random variable from its population mean or sample mean. Variance is a measure of dispersion, meaning it is a measure of how far a set of numbers ...
has an inverse gamma distribution or a scaled inverse chi-squared distribution. The two are equivalent 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. The prior for σ2 is as follows: :p(\sigma^2\mid\nu_0,\sigma_0^2) = \frac~\frac \propto \frac The likelihood function from above, written in terms of the variance, is: :\begin p(\mathbf\mid\mu,\sigma^2) &= \left(\frac\right)^ \exp\left[-\frac \sum_^n (x_i-\mu)^2\right] \\ &= \left(\frac\right)^ \exp\left[-\frac\right] \end where :S = \sum_^n (x_i-\mu)^2. Then: :\begin p(\sigma^2\mid\mathbf) &\propto p(\mathbf\mid\sigma^2) p(\sigma^2) \\ &= \left(\frac\right)^ \exp\left[-\frac\right] \frac~\frac \\ &\propto \left(\frac\right)^ \frac \exp\left[-\frac + \frac\right] \\ &= \frac \exp\left[-\frac\right] \end The above is also a scaled inverse chi-squared distribution where :\begin \nu_0' &= \nu_0 + n \\ \nu_0'' &= \nu_0 \sigma_0^2 + \sum_^n (x_i-\mu)^2 \end or equivalently :\begin \nu_0' &= \nu_0 + n \\ ' &= \frac \end Reparameterizing in terms of an inverse gamma distribution, the result is: :\begin \alpha' &= \alpha + \frac \\ \beta' &= \beta + \frac \end


With unknown mean and unknown variance

For a set of i.i.d. normally distributed data points X of size ''n'' where each individual point ''x'' follows x \sim \mathcal(\mu, \sigma^2) with unknown mean μ and unknown
variance In probability theory and statistics, variance is the expectation of the squared deviation of a random variable from its population mean or sample mean. Variance is a measure of dispersion, meaning it is a measure of how far a set of numbers ...
σ2, a combined (multivariate) conjugate prior is placed over the mean and variance, consisting of a normal-inverse-gamma distribution. Logically, this originates as follows: # From the analysis of the case with unknown mean but known variance, we see that the update equations involve sufficient statistics computed from the data consisting of the mean of the data points and the total variance of the data points, computed in turn from the known variance divided by the number of data points. # From the analysis of the case with unknown variance but known mean, we see that the update equations involve sufficient statistics over the data consisting of the number of data points and sum of squared deviations. # Keep in mind that the posterior update values serve as the prior distribution when further data is handled. Thus, we should logically think of our priors in terms of the sufficient statistics just described, with the same semantics kept in mind as much as possible. # To handle the case where both mean and variance are unknown, we could place independent priors over the mean and variance, with fixed estimates of the average mean, total variance, number of data points used to compute the variance prior, and sum of squared deviations. Note however that in reality, the total variance of the mean depends on the unknown variance, and the sum of squared deviations that goes into the variance prior (appears to) depend on the unknown mean. In practice, the latter dependence is relatively unimportant: Shifting the actual mean shifts the generated points by an equal amount, and on average the squared deviations will remain the same. This is not the case, however, with the total variance of the mean: As the unknown variance increases, the total variance of the mean will increase proportionately, and we would like to capture this dependence. # This suggests that we create a ''conditional prior'' of the mean on the unknown variance, with a hyperparameter specifying the mean of the pseudo-observations associated with the prior, and another parameter specifying the number of pseudo-observations. This number serves as a scaling parameter on the variance, making it possible to control the overall variance of the mean relative to the actual variance parameter. The prior for the variance also has two hyperparameters, one specifying the sum of squared deviations of the pseudo-observations associated with the prior, and another specifying once again the number of pseudo-observations. Note that each of the priors has a hyperparameter specifying the number of pseudo-observations, and in each case this controls the relative variance of that prior. These are given as two separate hyperparameters so that the variance (aka the confidence) of the two priors can be controlled separately. # This leads immediately to the normal-inverse-gamma distribution, which is the product of the two distributions just defined, with conjugate priors used (an inverse gamma distribution over the variance, and a normal distribution over the mean, ''conditional'' on the variance) and with the same four parameters just defined. The priors are normally defined as follows: :\begin p(\mu\mid\sigma^2; \mu_0, n_0) &\sim \mathcal(\mu_0,\sigma^2/n_0) \\ p(\sigma^2; \nu_0,\sigma_0^2) &\sim I\chi^2(\nu_0,\sigma_0^2) = IG(\nu_0/2, \nu_0\sigma_0^2/2) \end The update equations can be derived, and look as follows: :\begin \bar &= \frac 1 n \sum_^n x_i \\ \mu_0' &= \frac \\ n_0' &= n_0 + n \\ \nu_0' &= \nu_0 + n \\ \nu_0'' &= \nu_0 \sigma_0^2 + \sum_^n (x_i-\bar)^2 + \frac(\mu_0 - \bar)^2 \end The respective numbers of pseudo-observations add the number of actual observations to them. The new mean hyperparameter is once again a weighted average, this time weighted by the relative numbers of observations. Finally, the update for \nu_0'' is similar to the case with known mean, but in this case the sum of squared deviations is taken with respect to the observed data mean rather than the true mean, and as a result a new "interaction term" needs to be added to take care of the additional error source stemming from the deviation between prior and data mean.


Occurrence and applications

The occurrence of normal distribution in practical problems can be loosely classified into four categories: # Exactly normal distributions; # Approximately normal laws, for example when such approximation is justified by the
central limit theorem In probability theory, the central limit theorem (CLT) establishes that, in many situations, when independent random variables are summed up, their properly normalized sum tends toward a normal distribution even if the original variables themselv ...
; and # Distributions modeled as normal – the normal distribution being the distribution with Principle of maximum entropy, maximum entropy for a given mean and variance. # Regression problems – the normal distribution being found after systematic effects have been modeled sufficiently well.


Exact normality

Certain quantities in physics are distributed normally, as was first demonstrated by James Clerk Maxwell. Examples of such quantities are: * Probability density function of a ground state in a quantum harmonic oscillator. * The position of a particle that experiences diffusion. If initially the particle is located at a specific point (that is its probability distribution is the Dirac delta function), then after time ''t'' its location is described by a normal distribution with variance ''t'', which satisfies the diffusion equation \frac f(x,t) = \frac \frac f(x,t). If the initial location is given by a certain density function g(x), then the density at time ''t'' is the convolution of ''g'' and the normal PDF.


Approximate normality

''Approximately'' normal distributions occur in many situations, as explained by the
central limit theorem In probability theory, the central limit theorem (CLT) establishes that, in many situations, when independent random variables are summed up, their properly normalized sum tends toward a normal distribution even if the original variables themselv ...
. When the outcome is produced by many small effects acting ''additively and independently'', its distribution will be close to normal. The normal approximation will not be valid if the effects act multiplicatively (instead of additively), or if there is a single external influence that has a considerably larger magnitude than the rest of the effects. * In counting problems, where the central limit theorem includes a discrete-to-continuum approximation and where Infinite divisibility, infinitely divisible and Indecomposable distribution, decomposable distributions are involved, such as ** binomial distribution, Binomial random variables, associated with binary response variables; ** Poisson distribution, Poisson random variables, associated with rare events; * Thermal radiation has a Bose–Einstein statistics, Bose–Einstein distribution on very short time scales, and a normal distribution on longer timescales due to the central limit theorem.


Assumed normality

There are statistical methods to empirically test that assumption; see the above #Normality tests, Normality tests section. * In biology, the ''logarithm'' of various variables tend to have a normal distribution, that is, they tend to have a
log-normal distribution In probability theory, a log-normal (or lognormal) distribution is a continuous probability distribution of a random variable whose logarithm is normally distributed. Thus, if the random variable is log-normally distributed, then has a normal ...
(after separation on male/female subpopulations), with examples including: ** Measures of size of living tissue (length, height, skin area, weight); ** The ''length'' of ''inert'' appendages (hair, claws, nails, teeth) of biological specimens, ''in the direction of growth''; presumably the thickness of tree bark also falls under this category; ** Certain physiological measurements, such as blood pressure of adult humans. * In finance, in particular the Black–Scholes model, changes in the ''logarithm'' of exchange rates, price indices, and stock market indices are assumed normal (these variables behave like compound interest, not like simple interest, and so are multiplicative). Some mathematicians such as Benoit Mandelbrot have argued that Levy skew alpha-stable distribution, log-Levy distributions, which possesses heavy tails would be a more appropriate model, in particular for the analysis for stock market crashes. The use of the assumption of normal distribution occurring in financial models has also been criticized by Nassim Nicholas Taleb in his works. * Propagation of uncertainty, Measurement errors in physical experiments are often modeled by a normal distribution. This use of a normal distribution does not imply that one is assuming the measurement errors are normally distributed, rather using the normal distribution produces the most conservative predictions possible given only knowledge about the mean and variance of the errors. * In Standardized testing (statistics), standardized testing, results can be made to have a normal distribution by either selecting the number and difficulty of questions (as in the Intelligence quotient, IQ test) or transforming the raw test scores into "output" scores by fitting them to the normal distribution. For example, the SAT's traditional range of 200–800 is based on a normal distribution with a mean of 500 and a standard deviation of 100. * Many scores are derived from the normal distribution, including percentile ranks ("percentiles" or "quantiles"), normal curve equivalents, stanines, Standard score, z-scores, and T-scores. Additionally, some behavioral statistical procedures assume that scores are normally distributed; for example, Student's t-test, t-tests and Analysis of variance, ANOVAs. Bell curve grading assigns relative grades based on a normal distribution of scores. * In hydrology the distribution of long duration river discharge or rainfall, e.g. monthly and yearly totals, is often thought to be practically normal according to the
central limit theorem In probability theory, the central limit theorem (CLT) establishes that, in many situations, when independent random variables are summed up, their properly normalized sum tends toward a normal distribution even if the original variables themselv ...
. The blue picture, made with CumFreq, illustrates an example of fitting the normal distribution to ranked October rainfalls showing the 90% confidence belt based on the
binomial distribution In probability theory and statistics, the binomial distribution with parameters ''n'' and ''p'' is the discrete probability distribution of the number of successes in a sequence of ''n'' independent experiments, each asking a yes–no quest ...
. The rainfall data are represented by plotting positions as part of the cumulative frequency analysis.


Methodological problems and peer review

John Ioannidis argues that using normally distributed standard deviations as standards for validating research findings leave falsifiability, falsifiable predictions about phenomena that are not normally distributed untested. This includes, for example, phenomena that only appear when all necessary conditions are present and one cannot be a substitute for another in an addition-like way and phenomena that are not randomly distributed. Ioannidis argues that standard deviation-centered validation gives a false appearance of validity to hypotheses and theories where some but not all falsifiable predictions are normally distributed since the portion of falsifiable predictions that there is evidence against may and in some cases are in the non-normally distributed parts of the range of falsifiable predictions, as well as baselessly dismissing hypotheses for which none of the falsifiable predictions are normally distributed as if were they unfalsifiable when in fact they do make falsifiable predictions. It is argued by Ioannidis that many cases of mutually exclusive theories being accepted as "validated" by research journals are caused by failure of the journals to take in empirical falsifications of non-normally distributed predictions, and not because mutually exclusive theories are true, which they cannot be, although two mutually exclusive theories can both be wrong and a third one correct.


Computational methods


Generating values from normal distribution

In computer simulations, especially in applications of the Monte-Carlo method, it is often desirable to generate values that are normally distributed. The algorithms listed below all generate the standard normal deviates, since a can be generated as , where ''Z'' is standard normal. All these algorithms rely on the availability of a random number generator ''U'' capable of producing Uniform distribution (continuous), uniform random variates. * The most straightforward method is based on the probability integral transform property: if ''U'' is distributed uniformly on (0,1), then Φ−1(''U'') will have the standard normal distribution. The drawback of this method is that it relies on calculation of the
probit function In probability theory and statistics, the probit function is the quantile function associated with the standard normal distribution. It has applications in data analysis and machine learning, in particular exploratory statistical graphics and ...
Φ−1, which cannot be done analytically. Some approximate methods are described in and in the error function, erf article. Wichura gives a fast algorithm for computing this function to 16 decimal places, which is used by R programming language, R to compute random variates of the normal distribution. * Irwin–Hall distribution#Approximating a Normal distribution, An easy-to-program approximate approach that relies on the
central limit theorem In probability theory, the central limit theorem (CLT) establishes that, in many situations, when independent random variables are summed up, their properly normalized sum tends toward a normal distribution even if the original variables themselv ...
is as follows: generate 12 uniform ''U''(0,1) deviates, add them all up, and subtract 6 – the resulting random variable will have approximately standard normal distribution. In truth, the distribution will be Irwin–Hall distribution, Irwin–Hall, which is a 12-section eleventh-order polynomial approximation to the normal distribution. This random deviate will have a limited range of (−6, 6). Note that in a true normal distribution, only 0.00034% of all samples will fall outside ±6σ. * The Box–Muller transform, Box–Muller method uses two independent random numbers ''U'' and ''V'' distributed uniform distribution (continuous), uniformly on (0,1). Then the two random variables ''X'' and ''Y'' X = \sqrt \, \cos(2 \pi V) , \qquad Y = \sqrt \, \sin(2 \pi V) . will both have the standard normal distribution, and will be
independent Independent or Independents may refer to: Arts, entertainment, and media Artist groups * Independents (artist group), a group of modernist painters based in the New Hope, Pennsylvania, area of the United States during the early 1930s * Independ ...
. This formulation arises because for a bivariate normal random vector (''X'', ''Y'') the squared norm will have the
chi-squared distribution In probability theory and statistics, the chi-squared distribution (also chi-square or \chi^2-distribution) with k degrees of freedom is the distribution of a sum of the squares of k independent standard normal random variables. The chi-squa ...
with two degrees of freedom, which is an easily generated exponential distribution, exponential random variable corresponding to the quantity −2ln(''U'') in these equations; and the angle is distributed uniformly around the circle, chosen by the random variable ''V''. * The Marsaglia polar method is a modification of the Box–Muller method which does not require computation of the sine and cosine functions. In this method, ''U'' and ''V'' are drawn from the uniform (−1,1) distribution, and then is computed. If ''S'' is greater or equal to 1, then the method starts over, otherwise the two quantities X = U\sqrt, \qquad Y = V\sqrt are returned. Again, ''X'' and ''Y'' are independent, standard normal random variables. * The Ratio method is a rejection method. The algorithm proceeds as follows: ** Generate two independent uniform deviates ''U'' and ''V''; ** Compute ''X'' = (''V'' − 0.5)/''U''; ** Optional: if ''X''2 ≤ 5 − 4''e''1/4''U'' then accept ''X'' and terminate algorithm; ** Optional: if ''X''2 ≥ 4''e''−1.35/''U'' + 1.4 then reject ''X'' and start over from step 1; ** If ''X''2 ≤ −4 ln''U'' then accept ''X'', otherwise start over the algorithm. *:The two optional steps allow the evaluation of the logarithm in the last step to be avoided in most cases. These steps can be greatly improved so that the logarithm is rarely evaluated. * The ziggurat algorithm is faster than the Box–Muller transform and still exact. In about 97% of all cases it uses only two random numbers, one random integer and one random uniform, one multiplication and an if-test. Only in 3% of the cases, where the combination of those two falls outside the "core of the ziggurat" (a kind of rejection sampling using logarithms), do exponentials and more uniform random numbers have to be employed. * Integer arithmetic can be used to sample from the standard normal distribution. This method is exact in the sense that it satisfies the conditions of ''ideal approximation''; i.e., it is equivalent to sampling a real number from the standard normal distribution and rounding this to the nearest representable floating point number. * There is also some investigation into the connection between the fast Hadamard transform and the normal distribution, since the transform employs just addition and subtraction and by the central limit theorem random numbers from almost any distribution will be transformed into the normal distribution. In this regard a series of Hadamard transforms can be combined with random permutations to turn arbitrary data sets into a normally distributed data.


Numerical approximations for the normal CDF and normal quantile function

The standard normal cumulative distribution function, CDF is widely used in scientific and statistical computing. The values Φ(''x'') may be approximated very accurately by a variety of methods, such as numerical integration, Taylor series, asymptotic series and Gauss's continued fraction#Of Kummer's confluent hypergeometric function, continued fractions. Different approximations are used depending on the desired level of accuracy. * give the approximation for Φ(''x'') for ''x > 0'' with the absolute error (algorith
26.2.17
: \Phi(x) = 1 - \varphi(x)\left(b_1 t + b_2 t^2 + b_3t^3 + b_4 t^4 + b_5 t^5\right) + \varepsilon(x), \qquad t = \frac, where ''ϕ''(''x'') is the standard normal PDF, and ''b''0 = 0.2316419, ''b''1 = 0.319381530, ''b''2 = −0.356563782, ''b''3 = 1.781477937, ''b''4 = −1.821255978, ''b''5 = 1.330274429. * lists some dozens of approximations – by means of rational functions, with or without exponentials – for the function. His algorithms vary in the degree of complexity and the resulting precision, with maximum absolute precision of 24 digits. An algorithm by combines Hart's algorithm 5666 with a continued fraction approximation in the tail to provide a fast computation algorithm with a 16-digit precision. * after recalling Hart68 solution is not suited for erf, gives a solution for both erf and erfc, with maximal relative error bound, via rational function, Rational Chebyshev Approximation. * suggested a simple algorithm based on the Taylor series expansion \Phi(x) = \frac12 + \varphi(x)\left( x + \frac 3 + \frac + \frac + \frac + \cdots \right) for calculating with arbitrary precision. The drawback of this algorithm is comparatively slow calculation time (for example it takes over 300 iterations to calculate the function with 16 digits of precision when ). * The GNU Scientific Library calculates values of the standard normal CDF using Hart's algorithms and approximations with Chebyshev polynomials. Shore (1982) introduced simple approximations that may be incorporated in stochastic optimization models of engineering and operations research, like reliability engineering and inventory analysis. Denoting , the simplest approximation for the quantile function is: z = \Phi^(p)=5.5556\left[1- \left( \frac p \right)^\right],\qquad p\ge 1/2 This approximation delivers for ''z'' a maximum absolute error of 0.026 (for , corresponding to ). For replace ''p'' by and change sign. Another approximation, somewhat less accurate, is the single-parameter approximation: z=-0.4115\left\, \qquad p\ge 1/2 The latter had served to derive a simple approximation for the loss integral of the normal distribution, defined by \begin L(z) & =\int_z^\infty (u-z)\varphi(u) \, du=\int_z^\infty [1-\Phi (u)] \, du \\[5pt] L(z) & \approx \begin 0.4115\left(\dfrac p \right) - z, & p<1/2, \\ \\ 0.4115\left( \dfrac p \right), & p\ge 1/2. \end \\[5pt] \text \\ L(z) & \approx \begin 0.4115\left\, & p < 1/2, \\ \\ 0.4115 \dfrac p, & p\ge 1/2. \end \end This approximation is particularly accurate for the right far-tail (maximum error of 10−3 for z≥1.4). Highly accurate approximations for the CDF, based on Response modeling methodology, Response Modeling Methodology (RMM, Shore, 2011, 2012), are shown in Shore (2005). Some more approximations can be found at: Error function#Approximation with elementary functions. In particular, small ''relative'' error on the whole domain for the CDF \Phi and the quantile function \Phi^ as well, is achieved via an explicitly invertible formula by Sergei Winitzki in 2008.


History


Development

Some authors attribute the credit for the discovery of the normal distribution to Abraham de Moivre, de Moivre, who in 1738 published in the second edition of his "''The Doctrine of Chances''" the study of the coefficients in the binomial expansion of . De Moivre proved that the middle term in this expansion has the approximate magnitude of 2^n/\sqrt, and that "If ''m'' or ''n'' be a Quantity infinitely great, then the Logarithm of the Ratio, which a Term distant from the middle by the Interval ''ℓ'', has to the middle Term, is -\frac." Although this theorem can be interpreted as the first obscure expression for the normal probability law, Stephen Stigler, Stigler points out that de Moivre himself did not interpret his results as anything more than the approximate rule for the binomial coefficients, and in particular de Moivre lacked the concept of the probability density function. In 1823 Carl Friedrich Gauss, Gauss published his monograph "''Theoria combinationis observationum erroribus minimis obnoxiae''" where among other things he introduces several important statistical concepts, such as the method of least squares, the method of maximum likelihood, and the ''normal distribution''. Gauss used ''M'', , to denote the measurements of some unknown quantity ''V'', and sought the "most probable" estimator of that quantity: the one that maximizes the probability of obtaining the observed experimental results. In his notation φΔ is the probability density function of the measurement errors of magnitude Δ. Not knowing what the function ''φ'' is, Gauss requires that his method should reduce to the well-known answer: the arithmetic mean of the measured values. Starting from these principles, Gauss demonstrates that the only law that rationalizes the choice of arithmetic mean as an estimator of the location parameter, is the normal law of errors: \varphi\mathit = \frac h \, e^, where ''h'' is "the measure of the precision of the observations". Using this normal law as a generic model for errors in the experiments, Gauss formulates what is now known as the non-linear least squares, non-linear weighted least squares method. Although Gauss was the first to suggest the normal distribution law, Pierre Simon de Laplace, Laplace made significant contributions. It was Laplace who first posed the problem of aggregating several observations in 1774, although his own solution led to the Laplacian distribution. It was Laplace who first calculated the value of the Gaussian integral, integral in 1782, providing the normalization constant for the normal distribution. Finally, it was Laplace who in 1810 proved and presented to the Academy the fundamental
central limit theorem In probability theory, the central limit theorem (CLT) establishes that, in many situations, when independent random variables are summed up, their properly normalized sum tends toward a normal distribution even if the original variables themselv ...
, which emphasized the theoretical importance of the normal distribution. It is of interest to note that in 1809 an Irish-American mathematician Robert Adrain published two insightful but flawed derivations of the normal probability law, simultaneously and independently from Gauss. His works remained largely unnoticed by the scientific community, until in 1871 they were exhumed by Cleveland Abbe, Abbe. In the middle of the 19th century James Clerk Maxwell, Maxwell demonstrated that the normal distribution is not just a convenient mathematical tool, but may also occur in natural phenomena: "The number of particles whose velocity, resolved in a certain direction, lies between ''x'' and ''x'' + ''dx'' is \operatorname \frac\; e^ \, dx


Naming

Today, the concept is usually known in English as the normal distribution or Gaussian distribution. Other less common names include Gauss distribution, Laplace-Gauss distribution, the law of error, the law of facility of errors, Laplace's second law, Gaussian law. Gauss himself apparently coined the term with reference to the "normal equations" involved in its applications, with normal having its technical meaning of orthogonal rather than "usual". However, by the end of the 19th century some authors had started using the name ''normal distribution'', where the word "normal" was used as an adjective – the term now being seen as a reflection of the fact that this distribution was seen as typical, common – and thus "normal". Charles Sanders Peirce, Peirce (one of those authors) once defined "normal" thus: "...the 'normal' is not the average (or any other kind of mean) of what actually occurs, but of what ''would'', in the long run, occur under certain circumstances." Around the turn of the 20th century Karl Pearson, Pearson popularized the term ''normal'' as a designation for this distribution. Also, it was Pearson who first wrote the distribution in terms of the standard deviation ''σ'' as in modern notation. Soon after this, in year 1915, Ronald Fisher, Fisher added the location parameter to the formula for normal distribution, expressing it in the way it is written nowadays: df = \frac e^ \, dx. The term "standard normal", which denotes the normal distribution with zero mean and unit variance came into general use around the 1950s, appearing in the popular textbooks by P. G. Hoel (1947) "''Introduction to mathematical statistics''" and A. M. Mood (1950) "''Introduction to the theory of statistics''".


See also

* Bates distribution – similar to the Irwin–Hall distribution, but rescaled back into the 0 to 1 range * Behrens–Fisher problem – the long-standing problem of testing whether two normal samples with different variances have same means; * Bhattacharyya distance – method used to separate mixtures of normal distributions * Erdős–Kac theorem – on the occurrence of the normal distribution in number theory * Full width at half maximum * Gaussian blur – convolution, which uses the normal distribution as a kernel * Modified half-normal distribution with the pdf on (0, \infty) is given as f(x)= \frac, where \Psi(\alpha,z)=_1\Psi_1\left(\begin\left(\alpha,\frac\right)\\(1,0)\end;z \right) denotes the Fox-Wright Psi function. * Normally distributed and uncorrelated does not imply independent * Ratio normal distribution * Reciprocal normal distribution * Standard normal table * Stein's lemma * Sub-Gaussian distribution * Sum of normally distributed random variables * Tweedie distribution – The normal distribution is a member of the family of Tweedie exponential dispersion models. * Wrapped normal distribution – the Normal distribution applied to a circular domain * Z-test – using the normal distribution


Notes


References


Citations


Sources

* * In particular, the entries fo
"bell-shaped and bell curve"
an

* * * * * * * * * * * * * * * * * * * * * * * * Translated by Stephen M. Stigler in ''Statistical Science'' 1 (3), 1986: . * * * * * * * * * * * * * * * * * * * * * * * * * * * *


External links

*
Normal distribution calculator
{{Authority control Normal distribution, Continuous distributions Conjugate prior distributions Exponential family distributions Stable distributions Location-scale family probability distributions]">f'(X), \infty.


Zero-variance limit

In the limit (mathematics), limit when \sigma tends to zero, the probability density f(x) eventually tends to zero at any x\ne \mu, but grows without limit if x = \mu, while its integral remains equal to 1. Therefore, the normal distribution cannot be defined as an ordinary
function Function or functionality may refer to: Computing * Function key, a type of key on computer keyboards * Function model, a structured representation of processes in a system * Function object or functor or functionoid, a concept of object-oriente ...
when \sigma = 0. However, one can define the normal distribution with zero variance as a
generalized function In mathematics, generalized functions are objects extending the notion of functions. There is more than one recognized theory, for example the theory of distributions. Generalized functions are especially useful in making discontinuous functions ...
; specifically, as Dirac's "delta function" \delta translated by the mean \mu, that is f(x)=\delta(x-\mu). Its CDF is then the
Heaviside step function The Heaviside step function, or the unit step function, usually denoted by or (but sometimes , or ), is a step function, named after Oliver Heaviside (1850–1925), the value of which is zero for negative arguments and one for positive argume ...
translated by the mean \mu, namely :F(x) = \begin 0 & \textx < \mu \\ 1 & \textx \geq \mu \end


Maximum entropy

Of all probability distributions over the reals with a specified mean \mu and variance \sigma^2, the normal distribution N(\mu,\sigma^2) is the one with maximum entropy. If X is a
continuous random variable In probability theory and statistics, a probability distribution is the mathematical function that gives the probabilities of occurrence of different possible outcomes for an experiment. It is a mathematical description of a random phenomenon i ...
with
probability density In probability theory, a probability density function (PDF), or density of a continuous random variable, is a function whose value at any given sample (or point) in the sample space (the set of possible values taken by the random variable) can ...
f(x), then the entropy of X is defined as : H(X) = - \int_^\infty f(x)\log f(x)\, dx where f(x)\log f(x) is understood to be zero whenever f(x)=0. This functional can be maximized, subject to the constraints that the distribution is properly normalized and has a specified variance, by using
variational calculus The calculus of variations (or Variational Calculus) is a field of mathematical analysis that uses variations, which are small changes in functions and functionals, to find maxima and minima of functionals: mappings from a set of functions t ...
. A function with two
Lagrange multipliers In mathematical optimization, the method of Lagrange multipliers is a strategy for finding the local maxima and minima of a function subject to equality constraints (i.e., subject to the condition that one or more equations have to be satisfied ex ...
is defined: : L=\int_^\infty f(x)\ln(f(x))\,dx-\lambda_0\left(1-\int_^\infty f(x)\,dx\right)-\lambda\left(\sigma^2-\int_^\infty f(x)(x-\mu)^2\,dx\right) where f(x) is, for now, regarded as some density function with mean \mu and standard deviation \sigma. At maximum entropy, a small variation \delta f(x) about f(x) will produce a variation \delta L about L which is equal to 0: : 0=\delta L=\int_^\infty \delta f(x)\left (\ln(f(x))+1+\lambda_0+\lambda(x-\mu)^2\right )\,dx Since this must hold for any small \delta f(x), the term in brackets must be zero, and solving for f(x) yields: :f(x)=e^ Using the constraint equations to solve for \lambda_0 and \lambda yields the density of the normal distribution: : f(x, \mu, \sigma)=\frace^ The entropy of a normal distribution is equal to : H(X)=\tfrac(1+\log(2\sigma^2\pi))


Other properties


Related distributions


Central limit theorem

The central limit theorem states that under certain (fairly common) conditions, the sum of many random variables will have an approximately normal distribution. More specifically, where X_1,\ldots ,X_n are
independent and identically distributed In probability theory and statistics, a collection of random variables is independent and identically distributed if each random variable has the same probability distribution as the others and all are mutually independent. This property is usua ...
random variables with the same arbitrary distribution, zero mean, and variance \sigma^2 and Z is their mean scaled by \sqrt : Z = \sqrt\left(\frac\sum_^n X_i\right) Then, as n increases, the probability distribution of Z will tend to the normal distribution with zero mean and variance \sigma^2. The theorem can be extended to variables (X_i) that are not independent and/or not identically distributed if certain constraints are placed on the degree of dependence and the moments of the distributions. Many
test statistic A test statistic is a statistic (a quantity derived from the sample) used in statistical hypothesis testing.Berger, R. L.; Casella, G. (2001). ''Statistical Inference'', Duxbury Press, Second Edition (p.374) A hypothesis test is typically specif ...
s, scores, and
estimator In statistics, an estimator is a rule for calculating an estimate of a given quantity based on observed data: thus the rule (the estimator), the quantity of interest (the estimand) and its result (the estimate) are distinguished. For example, the ...
s encountered in practice contain sums of certain random variables in 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 distributions. The central limit theorem also implies that certain distributions can be approximated by the normal distribution, for example: * The
binomial distribution In probability theory and statistics, the binomial distribution with parameters ''n'' and ''p'' is the discrete probability distribution of the number of successes in a sequence of ''n'' independent experiments, each asking a yes–no quest ...
B(n,p) is approximately normal with mean np and variance np(1-p) for large n and for p not too close to 0 or 1. * The
Poisson distribution In probability theory and statistics, the Poisson distribution is a discrete probability distribution that expresses the probability of a given number of events occurring in a fixed interval of time or space if these events occur with a known co ...
with parameter \lambda is approximately normal with mean \lambda and variance \lambda, for large values of \lambda. * The
chi-squared distribution In probability theory and statistics, the chi-squared distribution (also chi-square or \chi^2-distribution) with k degrees of freedom is the distribution of a sum of the squares of k independent standard normal random variables. The chi-squa ...
\chi^2(k) is approximately normal with mean k and variance 2k, for large k. * The
Student's t-distribution In probability and statistics, Student's ''t''-distribution (or simply the ''t''-distribution) is any member of a family of continuous probability distributions that arise when estimating the mean of a normally distributed population in sit ...
t(\nu) is approximately normal with mean 0 and variance 1 when \nu is large. Whether these approximations are sufficiently accurate depends on the purpose for which they are needed, and the rate of convergence to the normal distribution. It is typically the case that such approximations are less accurate in the tails of the distribution. A general upper bound for the approximation error in the central limit theorem is given by the
Berry–Esseen theorem In probability theory, the central limit theorem states that, under certain circumstances, the probability distribution of the scaled mean of a random sample converges to a normal distribution as the sample size increases to infinity. Under strong ...
, improvements of the approximation are given by the
Edgeworth expansion The Gram–Charlier A series (named in honor of Jørgen Pedersen Gram and Carl Charlier), and the Edgeworth series (named in honor of Francis Ysidro Edgeworth) are series that approximate a probability distribution in terms of its cumulants. The se ...
s. This theorem can also be used to justify modeling the sum of many uniform noise sources as
Gaussian noise Gaussian noise, named after Carl Friedrich Gauss, is a term from signal processing theory denoting a kind of signal noise that has a probability density function (pdf) equal to that of the normal distribution (which is also known as the Gaussia ...
. See
AWGN Additive white Gaussian noise (AWGN) is a basic noise model used in information theory to mimic the effect of many random processes that occur in nature. The modifiers denote specific characteristics: * ''Additive'' because it is added to any nois ...
.


Operations and functions of normal variables

The
probability density In probability theory, a probability density function (PDF), or density of a continuous random variable, is a function whose value at any given sample (or point) in the sample space (the set of possible values taken by the random variable) can ...
,
cumulative distribution In statistics, the frequency (or absolute frequency) of an event i is the number n_i of times the observation has occurred/recorded in an experiment or study. These frequencies are often depicted graphically or in tabular form. Types The cumul ...
, and inverse cumulative distribution of any function of one or more independent or correlated normal variables can be computed with the numerical method of ray-tracing
Matlab code
. In the following sections we look at some special cases.


Operations on a single normal variable

If X is distributed normally with mean \mu and variance \sigma^2, then * aX+b, for any real numbers a and b, is also normally distributed, with mean a\mu+b and standard deviation , a, \sigma. That is, the family of normal distributions is closed under linear transformations. * The exponential of X is distributed log-normally: . * The absolute value of X has
folded normal distribution The folded normal distribution is a probability distribution related to the normal distribution. Given a normally distributed random variable ''X'' with mean ''μ'' and variance ''σ''2, the random variable ''Y'' = , ''X'', has a folded normal d ...
: . If \mu = 0 this is known as the
half-normal distribution In probability theory and statistics, the half-normal distribution is a special case of the folded normal distribution. Let X follow an ordinary normal distribution, N(0,\sigma^2). Then, Y=, X, follows a half-normal distribution. Thus, the hal ...
. * The absolute value of normalized residuals, , ''X'' − ''μ'', /''σ'', has
chi distribution In probability theory and statistics, the chi distribution is a continuous probability distribution. It is the distribution of the positive square root of the sum of squares of a set of independent random variables each following a standard norm ...
with one degree of freedom: , X - \mu, / \sigma \sim \chi_1. * The square of ''X''/''σ'' has the
noncentral chi-squared distribution In probability theory and statistics, the noncentral chi-squared distribution (or noncentral chi-square distribution, noncentral \chi^2 distribution) is a noncentral generalization of the chi-squared distribution. It often arises in the power a ...
with one degree of freedom: X^2 / \sigma^2 \sim \chi_1^2(\mu^2 / \sigma^2). If \mu = 0, the distribution is called simply chi-squared. * The log likelihood of a normal variable x is simply the log of its
probability density function In probability theory, a probability density function (PDF), or density of a continuous random variable, is a function whose value at any given sample (or point) in the sample space (the set of possible values taken by the random variable) can ...
: \ln p(x)= -\frac \left(\frac \right)^2 -\ln \left(\sigma \sqrt \right) = -\frac z^2 -\ln \left(\sigma \sqrt \right). Since this is a scaled and shifted square of a standard normal variable, it is distributed as a scaled and shifted chi-squared variable. * The distribution of the variable ''X'' restricted to an interval 'a'', ''b''is called the
truncated normal distribution In probability and statistics, the truncated normal distribution is the probability distribution derived from that of a normally distributed random variable by bounding the random variable from either below or above (or both). The truncated no ...
. * (''X'' − ''μ'')−2 has a
Lévy distribution In probability theory and statistics, the Lévy distribution, named after Paul Lévy, is a continuous probability distribution for a non-negative random variable. In spectroscopy, this distribution, with frequency as the dependent variable, is kn ...
with location 0 and scale ''σ''−2.


= Operations on two independent normal variables

= * If X_1 and X_2 are two
independent Independent or Independents may refer to: Arts, entertainment, and media Artist groups * Independents (artist group), a group of modernist painters based in the New Hope, Pennsylvania, area of the United States during the early 1930s * Independ ...
normal random variables, with means \mu_1, \mu_2 and standard deviations \sigma_1, \sigma_2, then their sum X_1 + X_2 will also be normally distributed, roof/sup> with mean \mu_1 + \mu_2 and variance \sigma_1^2 + \sigma_2^2. * In particular, if X and Y are independent normal deviates with zero mean and variance \sigma^2, then X + Y and X - Y are also independent and normally distributed, with zero mean and variance 2\sigma^2. This is a special case of the
polarization identity In linear algebra, a branch of mathematics, the polarization identity is any one of a family of formulas that express the inner product of two vectors in terms of the norm of a normed vector space. If a norm arises from an inner product then t ...
. * If X_1, X_2 are two independent normal deviates with mean \mu and deviation \sigma, and a, b are arbitrary real numbers, then the variable X_3 = \frac + \mu is also normally distributed with mean \mu and deviation \sigma. It follows that the normal distribution is
stable A stable is a building in which livestock, especially horses, are kept. It most commonly means a building that is divided into separate stalls for individual animals and livestock. There are many different types of stables in use today; the ...
(with exponent \alpha=2).


= Operations on two independent standard normal variables

= If X_1 and X_2 are two independent standard normal random variables with mean 0 and variance 1, then * Their sum and difference is distributed normally with mean zero and variance two: X_1 \pm X_2 \sim N(0, 2). * Their product Z = X_1 X_2 follows the
product distribution A product distribution is a probability distribution constructed as the distribution of the product of random variables having two other known distributions. Given two statistically independent random variables ''X'' and ''Y'', the distribution of ...
with density function f_Z(z) = \pi^ K_0(, z, ) where K_0 is the
modified Bessel function of the second kind Bessel functions, first defined by the mathematician Daniel Bernoulli and then generalized by Friedrich Bessel, are canonical solutions of Bessel's differential equation x^2 \frac + x \frac + \left(x^2 - \alpha^2 \right)y = 0 for an arbitrary ...
. This distribution is symmetric around zero, unbounded at z = 0, and has the
characteristic function In mathematics, the term "characteristic function" can refer to any of several distinct concepts: * The indicator function of a subset, that is the function ::\mathbf_A\colon X \to \, :which for a given subset ''A'' of ''X'', has value 1 at points ...
\phi_Z(t) = (1 + t^2)^. * Their ratio follows the standard
Cauchy distribution The Cauchy distribution, named after Augustin Cauchy, is a continuous probability distribution. It is also known, especially among physicists, as the Lorentz distribution (after Hendrik Lorentz), Cauchy–Lorentz distribution, Lorentz(ian) fun ...
: X_1/ X_2 \sim \operatorname(0, 1). * Their Euclidean norm \sqrt has the
Rayleigh distribution In probability theory and statistics, the Rayleigh distribution is a continuous probability distribution for nonnegative-valued random variables. Up to rescaling, it coincides with the chi distribution with two degrees of freedom. The distribut ...
.


Operations on multiple independent normal variables

* Any linear combination of independent normal deviates is a normal deviate. * If X_1, X_2, \ldots, X_n are independent standard normal random variables, then the sum of their squares has the
chi-squared distribution In probability theory and statistics, the chi-squared distribution (also chi-square or \chi^2-distribution) with k degrees of freedom is the distribution of a sum of the squares of k independent standard normal random variables. The chi-squa ...
with n degrees of freedom X_1^2 + \cdots + X_n^2 \sim \chi_n^2. * If X_1, X_2, \ldots, X_n are independent normally distributed random variables with means \mu and variances \sigma^2, then their
sample mean The sample mean (or "empirical mean") and the sample covariance are statistics computed from a Sample (statistics), sample of data on one or more random variables. The sample mean is the average value (or mean, mean value) of a sample (statistic ...
is independent from the sample
standard deviation In statistics, the standard deviation is a measure of the amount of variation or dispersion of a set of values. A low standard deviation indicates that the values tend to be close to the mean (also called the expected value) of the set, while ...
, which can be demonstrated using Basu's theorem or
Cochran's theorem In statistics, Cochran's theorem, devised by William G. Cochran, is a theorem used to justify results relating to the probability distributions of statistics that are used in the analysis of variance. Statement Let ''U''1, ..., ''U'N'' be i.i. ...
. The ratio of these two quantities will have the
Student's t-distribution In probability and statistics, Student's ''t''-distribution (or simply the ''t''-distribution) is any member of a family of continuous probability distributions that arise when estimating the mean of a normally distributed population in sit ...
with n-1 degrees of freedom: t = \frac = \frac \sim t_. * If X_1, X_2, \ldots, X_n, Y_1, Y_2, \ldots, Y_m are independent standard normal random variables, then the ratio of their normalized sums of squares will have the with degrees of freedom: F = \frac \sim F_.


Operations on multiple correlated normal variables

* A
quadratic form In mathematics, a quadratic form is a polynomial with terms all of degree two ("form" is another name for a homogeneous polynomial). For example, :4x^2 + 2xy - 3y^2 is a quadratic form in the variables and . The coefficients usually belong to a ...
of a normal vector, i.e. a quadratic function q = \sum x_i^2 + \sum x_j + c of multiple independent or correlated normal variables, is a generalized chi-square variable.


Operations on the density function

The split normal distribution is most directly defined in terms of joining scaled sections of the density functions of different normal distributions and rescaling the density to integrate to one. The
truncated normal distribution In probability and statistics, the truncated normal distribution is the probability distribution derived from that of a normally distributed random variable by bounding the random variable from either below or above (or both). The truncated no ...
results from rescaling a section of a single density function.


Infinite divisibility and Cramér's theorem

For any positive integer \text, any normal distribution with mean \mu and variance \sigma^2 is the distribution of the sum of \text independent normal deviates, each with mean \frac and variance \frac. This property is called
infinite divisibility Infinite divisibility arises in different ways in philosophy, physics, economics, order theory (a branch of mathematics), and probability theory (also a branch of mathematics). One may speak of infinite divisibility, or the lack thereof, of matter ...
. Conversely, if X_1 and X_2 are independent random variables and their sum X_1+X_2 has a normal distribution, then both X_1 and X_2 must be normal deviates. This result is known as Cramér's decomposition theorem, and is equivalent to saying that the convolution of two distributions is normal if and only if both are normal. Cramér's theorem implies that a linear combination of independent non-Gaussian variables will never have an exactly normal distribution, although it may approach it arbitrarily closely.


Bernstein's theorem

Bernstein's theorem states that if X and Y are independent and X + Y and X - Y are also independent, then both ''X'' and ''Y'' must necessarily have normal distributions. More generally, if X_1, \ldots, X_n are independent random variables, then two distinct linear combinations \sum and \sumwill be independent if and only if all X_k are normal and \sum, where \sigma_k^2 denotes the variance of X_k.


Extensions

The notion of normal distribution, being one of the most important distributions in probability theory, has been extended far beyond the standard framework of the univariate (that is one-dimensional) case (Case 1). All these extensions are also called ''normal'' or ''Gaussian'' laws, so a certain ambiguity in names exists. * The
multivariate normal distribution In probability theory and statistics, the multivariate normal distribution, multivariate Gaussian distribution, or joint normal distribution is a generalization of the one-dimensional (univariate) normal distribution to higher dimensions. One d ...
describes the Gaussian law in the ''k''-dimensional Euclidean space. A vector is multivariate-normally distributed if any linear combination of its components has a (univariate) normal distribution. The variance of ''X'' is a ''k×k'' symmetric positive-definite matrix ''V''. The multivariate normal distribution is a special case of the
elliptical distribution In probability and statistics, an elliptical distribution is any member of a broad family of probability distributions that generalize the multivariate normal distribution. Intuitively, in the simplified two and three dimensional case, the joint di ...
s. As such, its iso-density loci in the ''k'' = 2 case are ellipses and in the case of arbitrary ''k'' are ellipsoids. * Rectified Gaussian distribution a rectified version of normal distribution with all the negative elements reset to 0 * Complex normal distribution deals with the complex normal vectors. A complex vector is said to be normal if both its real and imaginary components jointly possess a 2''k''-dimensional multivariate normal distribution. The variance-covariance structure of ''X'' is described by two matrices: the ''variance'' matrix Γ, and the ''relation'' matrix ''C''. * Matrix normal distribution describes the case of normally distributed matrices. * Gaussian processes are the normally distributed stochastic processes. These can be viewed as elements of some infinite-dimensional Hilbert space ''H'', and thus are the analogues of multivariate normal vectors for the case . A random element is said to be normal if for any constant the scalar product has a (univariate) normal distribution. The variance structure of such Gaussian random element can be described in terms of the linear ''covariance ''. Several Gaussian processes became popular enough to have their own names: ** Wiener process, Brownian motion, ** Brownian bridge, ** Ornstein–Uhlenbeck process. * Gaussian q-distribution is an abstract mathematical construction that represents a "q-analogue" of the normal distribution. * the q-Gaussian is an analogue of the Gaussian distribution, in the sense that it maximises the Tsallis entropy, and is one type of Tsallis distribution. Note that this distribution is different from the Gaussian q-distribution above. * The Kaniadakis Gaussian distribution, Kaniadakis ''κ''-Gaussian distribution is a generalization of the Gaussian distribution which arises from the Kaniadakis statistics, being one of the Kaniadakis distribution, Kaniadakis distributions. A random variable ''X'' has a two-piece normal distribution if it has a distribution : f_X( x ) = N( \mu, \sigma_1^2 ) \text x \le \mu : f_X( x ) = N( \mu, \sigma_2^2 ) \text x \ge \mu where ''μ'' is the mean and ''σ''1 and ''σ''2 are the standard deviations of the distribution to the left and right of the mean respectively. The mean, variance and third central moment of this distribution have been determined : \operatorname( X ) = \mu + \sqrt ( \sigma_2 - \sigma_1 ) : \operatorname( X ) = \left( 1 - \frac 2 \pi\right)( \sigma_2 - \sigma_1 )^2 + \sigma_1 \sigma_2 : \operatorname( X ) = \sqrt( \sigma_2 - \sigma_1 ) \left[ \left( \frac 4 \pi - 1 \right) ( \sigma_2 - \sigma_1)^2 + \sigma_1 \sigma_2 \right] where E(''X''), V(''X'') and T(''X'') are the mean, variance, and third central moment respectively. One of the main practical uses of the Gaussian law is to model the empirical distributions of many different random variables encountered in practice. In such case a possible extension would be a richer family of distributions, having more than two parameters and therefore being able to fit the empirical distribution more accurately. The examples of such extensions are: * Pearson distribution — a four-parameter family of probability distributions that extend the normal law to include different skewness and kurtosis values. * The generalized normal distribution, also known as the exponential power distribution, allows for distribution tails with thicker or thinner asymptotic behaviors.


Statistical inference


Estimation of parameters

It is often the case that we do not know the parameters of the normal distribution, but instead want to Estimation theory, estimate them. That is, having a sample (x_1, \ldots, x_n) from a normal N(\mu, \sigma^2) population we would like to learn the approximate values of parameters \mu and \sigma^2. The standard approach to this problem is the maximum likelihood method, which requires maximization of the ''log-likelihood function'': : \ln\mathcal(\mu,\sigma^2) = \sum_^n \ln f(x_i\mid\mu,\sigma^2) = -\frac\ln(2\pi) - \frac\ln\sigma^2 - \frac\sum_^n (x_i-\mu)^2. Taking derivatives with respect to \mu and \sigma^2 and solving the resulting system of first order conditions yields the ''maximum likelihood estimates'': : \hat = \overline \equiv \frac\sum_^n x_i, \qquad \hat^2 = \frac \sum_^n (x_i - \overline)^2.


Sample mean

Estimator \textstyle\hat\mu is called the ''
sample mean The sample mean (or "empirical mean") and the sample covariance are statistics computed from a Sample (statistics), sample of data on one or more random variables. The sample mean is the average value (or mean, mean value) of a sample (statistic ...
'', since it is the arithmetic mean of all observations. The statistic \textstyle\overline is complete statistic, complete and sufficient statistic, sufficient for \mu, and therefore by the Lehmann–Scheffé theorem, \textstyle\hat\mu is the uniformly minimum variance unbiased (UMVU) estimator. In finite samples it is distributed normally: : \hat\mu \sim \mathcal(\mu,\sigma^2/n). The variance of this estimator is equal to the ''μμ''-element of the inverse Fisher information matrix \textstyle\mathcal^. This implies that the estimator is efficient estimator, finite-sample efficient. Of practical importance is the fact that the standard error (statistics), standard error of \textstyle\hat\mu is proportional to \textstyle1/\sqrt, that is, if one wishes to decrease the standard error by a factor of 10, one must increase the number of points in the sample by a factor of 100. This fact is widely used in determining sample sizes for opinion polls and the number of trials in Monte Carlo simulations. From the standpoint of the asymptotic theory (statistics), asymptotic theory, \textstyle\hat\mu is consistent estimator, consistent, that is, it convergence in probability, converges in probability to \mu as n\rightarrow\infty. The estimator is also asymptotic normality, asymptotically normal, which is a simple corollary of the fact that it is normal in finite samples: : \sqrt(\hat\mu-\mu) \,\xrightarrow\, \mathcal(0,\sigma^2).


Sample variance

The estimator \textstyle\hat\sigma^2 is called the ''sample variance'', since it is the variance of the sample ((x_1, \ldots, x_n)). In practice, another estimator is often used instead of the \textstyle\hat\sigma^2. This other estimator is denoted s^2, and is also called the ''sample variance'', which represents a certain ambiguity in terminology; its square root s is called the ''sample standard deviation''. The estimator s^2 differs from \textstyle\hat\sigma^2 by having instead of ''n'' in the denominator (the so-called Bessel's correction): : s^2 = \frac \hat\sigma^2 = \frac \sum_^n (x_i - \overline)^2. The difference between s^2 and \textstyle\hat\sigma^2 becomes negligibly small for large ''n''s. In finite samples however, the motivation behind the use of s^2 is that it is an unbiased estimator of the underlying parameter \sigma^2, whereas \textstyle\hat\sigma^2 is biased. Also, by the Lehmann–Scheffé theorem the estimator s^2 is uniformly minimum variance unbiased (Minimum-variance unbiased estimator, UMVU), which makes it the "best" estimator among all unbiased ones. However it can be shown that the biased estimator \textstyle\hat\sigma^2 is "better" than the s^2 in terms of the mean squared error (MSE) criterion. In finite samples both s^2 and \textstyle\hat\sigma^2 have scaled
chi-squared distribution In probability theory and statistics, the chi-squared distribution (also chi-square or \chi^2-distribution) with k degrees of freedom is the distribution of a sum of the squares of k independent standard normal random variables. The chi-squa ...
with degrees of freedom: : s^2 \sim \frac \cdot \chi^2_, \qquad \hat\sigma^2 \sim \frac \cdot \chi^2_. The first of these expressions shows that the variance of s^2 is equal to 2\sigma^4/(n-1), which is slightly greater than the ''σσ''-element of the inverse Fisher information matrix \textstyle\mathcal^. Thus, s^2 is not an efficient estimator for \sigma^2, and moreover, since s^2 is UMVU, we can conclude that the finite-sample efficient estimator for \sigma^2 does not exist. Applying the asymptotic theory, both estimators s^2 and \textstyle\hat\sigma^2 are consistent, that is they converge in probability to \sigma^2 as the sample size n\rightarrow\infty. The two estimators are also both asymptotically normal: : \sqrt(\hat\sigma^2 - \sigma^2) \simeq \sqrt(s^2-\sigma^2) \,\xrightarrow\, \mathcal(0,2\sigma^4). In particular, both estimators are asymptotically efficient for \sigma^2.


Confidence intervals

By
Cochran's theorem In statistics, Cochran's theorem, devised by William G. Cochran, is a theorem used to justify results relating to the probability distributions of statistics that are used in the analysis of variance. Statement Let ''U''1, ..., ''U'N'' be i.i. ...
, for normal distributions the sample mean \textstyle\hat\mu and the sample variance ''s''2 are
independent Independent or Independents may refer to: Arts, entertainment, and media Artist groups * Independents (artist group), a group of modernist painters based in the New Hope, Pennsylvania, area of the United States during the early 1930s * Independ ...
, which means there can be no gain in considering their joint distribution. There is also a converse theorem: if in a sample the sample mean and sample variance are independent, then the sample must have come from the normal distribution. The independence between \textstyle\hat\mu and ''s'' can be employed to construct the so-called ''t-statistic'': : t = \frac = \frac \sim t_ This quantity ''t'' has the
Student's t-distribution In probability and statistics, Student's ''t''-distribution (or simply the ''t''-distribution) is any member of a family of continuous probability distributions that arise when estimating the mean of a normally distributed population in sit ...
with degrees of freedom, and it is an ancillary statistic (independent of the value of the parameters). Inverting the distribution of this ''t''-statistics will allow us to construct the
confidence interval In frequentist statistics, a confidence interval (CI) is a range of estimates for an unknown parameter. A confidence interval is computed at a designated ''confidence level''; the 95% confidence level is most common, but other levels, such as 9 ...
for ''μ''; similarly, inverting the ''χ''2 distribution of the statistic ''s''2 will give us the confidence interval for ''σ''2: :\mu \in \left[ \hat\mu - t_ \fracs, \hat\mu + t_ \fracs \right], :\sigma^2 \in \left[ \frac, \frac \right], where ''tk,p'' and are the ''p''th
quantile In statistics and probability, quantiles are cut points dividing the range of a probability distribution into continuous intervals with equal probabilities, or dividing the observations in a sample in the same way. There is one fewer quantile tha ...
s of the ''t''- and ''χ''2-distributions respectively. These confidence intervals are of the ''confidence level'' , meaning that the true values ''μ'' and ''σ''2 fall outside of these intervals with probability (or significance level) ''α''. In practice people usually take , resulting in the 95% confidence intervals. Approximate formulas can be derived from the asymptotic distributions of \textstyle\hat\mu and ''s''2: :\mu \in \left[ \hat\mu - , z_, \fracs, \hat\mu + , z_, \fracs \right], :\sigma^2 \in \left[ s^2 - , z_, \fracs^2, s^2 + , z_, \fracs^2 \right], The approximate formulas become valid for large values of ''n'', and are more convenient for the manual calculation since the standard normal quantiles ''z''''α''/2 do not depend on ''n''. In particular, the most popular value of , results in .


Normality tests

Normality tests assess the likelihood that the given data set comes from a normal distribution. Typically the null hypothesis ''H''0 is that the observations are distributed normally with unspecified mean ''μ'' and variance ''σ''2, versus the alternative ''Ha'' that the distribution is arbitrary. Many tests (over 40) have been devised for this problem. The more prominent of them are outlined below: Diagnostic plots are more intuitively appealing but subjective at the same time, as they rely on informal human judgement to accept or reject the null hypothesis. *
Q–Q plot In statistics, a Q–Q plot (quantile-quantile plot) is a probability plot, a List of graphical methods, graphical method for comparing two probability distributions by plotting their ''quantiles'' against each other. A point on the plot co ...
, also known as normal probability plot or rankit plot—is a plot of the sorted values from the data set against the expected values of the corresponding quantiles from the standard normal distribution. That is, it's a plot of point of the form (Φ−1(''pk''), ''x''(''k'')), where plotting points ''pk'' are equal to ''pk'' = (''k'' − ''α'')/(''n'' + 1 − 2''α'') and ''α'' is an adjustment constant, which can be anything between 0 and 1. If the null hypothesis is true, the plotted points should approximately lie on a straight line. * P–P plot – similar to the Q–Q plot, but used much less frequently. This method consists of plotting the points (Φ(''z''(''k'')), ''pk''), where \textstyle z_ = (x_-\hat\mu)/\hat\sigma. For normally distributed data this plot should lie on a 45° line between (0, 0) and (1, 1). Goodness-of-fit tests: ''Moment-based tests'': * D'Agostino's K-squared test * Jarque–Bera test * Shapiro–Wilk test: This is based on the fact that the line in the Q–Q plot has the slope of ''σ''. The test compares the least squares estimate of that slope with the value of the sample variance, and rejects the null hypothesis if these two quantities differ significantly. ''Tests based on the empirical distribution function'': * Anderson–Darling test * Lilliefors test (an adaptation of the Kolmogorov–Smirnov test)


Bayesian analysis of the normal distribution

Bayesian analysis of normally distributed data is complicated by the many different possibilities that may be considered: * Either the mean, or the variance, or neither, may be considered a fixed quantity. * When the variance is unknown, analysis may be done directly in terms of the variance, or in terms of the
precision Precision, precise or precisely may refer to: Science, and technology, and mathematics Mathematics and computing (general) * Accuracy and precision, measurement deviation from true value and its scatter * Significant figures, the number of digit ...
, the reciprocal of the variance. The reason for expressing the formulas in terms of precision is that the analysis of most cases is simplified. * Both univariate and multivariate normal distribution, multivariate cases need to be considered. * Either conjugate prior, conjugate or improper prior, improper prior distributions may be placed on the unknown variables. * An additional set of cases occurs in Bayesian linear regression, where in the basic model the data is assumed to be normally distributed, and normal priors are placed on the regression coefficients. The resulting analysis is similar to the basic cases of independent identically distributed data. The formulas for the non-linear-regression cases are summarized in the conjugate prior article.


Sum of two quadratics


= Scalar form

= The following auxiliary formula is useful for simplifying the posterior distribution, posterior update equations, which otherwise become fairly tedious. :a(x-y)^2 + b(x-z)^2 = (a + b)\left(x - \frac\right)^2 + \frac(y-z)^2 This equation rewrites the sum of two quadratics in ''x'' by expanding the squares, grouping the terms in ''x'', and completing the square. Note the following about the complex constant factors attached to some of the terms: # The factor \frac has the form of a weighted average of ''y'' and ''z''. # \frac = \frac = (a^ + b^)^. This shows that this factor can be thought of as resulting from a situation where the Multiplicative inverse, reciprocals of quantities ''a'' and ''b'' add directly, so to combine ''a'' and ''b'' themselves, it's necessary to reciprocate, add, and reciprocate the result again to get back into the original units. This is exactly the sort of operation performed by the harmonic mean, so it is not surprising that \frac is one-half the harmonic mean of ''a'' and ''b''.


= Vector form

= A similar formula can be written for the sum of two vector quadratics: If x, y, z are vectors of length ''k'', and A and B are symmetric matrix, symmetric, invertible matrices of size k\times k, then : \begin & (\mathbf-\mathbf)'\mathbf(\mathbf-\mathbf) + (\mathbf-\mathbf)' \mathbf(\mathbf-\mathbf) \\ = & (\mathbf - \mathbf)'(\mathbf+\mathbf)(\mathbf - \mathbf) + (\mathbf - \mathbf)'(\mathbf^ + \mathbf^)^(\mathbf - \mathbf) \end where :\mathbf = (\mathbf + \mathbf)^(\mathbf\mathbf + \mathbf \mathbf) Note that the form x′ A x is called a
quadratic form In mathematics, a quadratic form is a polynomial with terms all of degree two ("form" is another name for a homogeneous polynomial). For example, :4x^2 + 2xy - 3y^2 is a quadratic form in the variables and . The coefficients usually belong to a ...
and is a scalar (mathematics), scalar: :\mathbf'\mathbf\mathbf = \sum_a_ x_i x_j In other words, it sums up all possible combinations of products of pairs of elements from x, with a separate coefficient for each. In addition, since x_i x_j = x_j x_i, only the sum a_ + a_ matters for any off-diagonal elements of A, and there is no loss of generality in assuming that A is symmetric matrix, symmetric. Furthermore, if A is symmetric, then the form \mathbf'\mathbf\mathbf = \mathbf'\mathbf\mathbf.


Sum of differences from the mean

Another useful formula is as follows: \sum_^n (x_i-\mu)^2 = \sum_^n (x_i-\bar)^2 + n(\bar -\mu)^2 where \bar = \frac \sum_^n x_i.


With known variance

For a set of i.i.d. normally distributed data points X of size ''n'' where each individual point ''x'' follows x \sim \mathcal(\mu, \sigma^2) with known
variance In probability theory and statistics, variance is the expectation of the squared deviation of a random variable from its population mean or sample mean. Variance is a measure of dispersion, meaning it is a measure of how far a set of numbers ...
σ2, the conjugate prior distribution is also normally distributed. This can be shown more easily by rewriting the variance as the
precision Precision, precise or precisely may refer to: Science, and technology, and mathematics Mathematics and computing (general) * Accuracy and precision, measurement deviation from true value and its scatter * Significant figures, the number of digit ...
, i.e. using τ = 1/σ2. Then if x \sim \mathcal(\mu, 1/\tau) and \mu \sim \mathcal(\mu_0, 1/\tau_0), we proceed as follows. First, the likelihood function is (using the formula above for the sum of differences from the mean): :\begin p(\mathbf\mid\mu,\tau) &= \prod_^n \sqrt \exp\left(-\frac\tau(x_i-\mu)^2\right) \\ &= \left(\frac\right)^ \exp\left(-\frac\tau \sum_^n (x_i-\mu)^2\right) \\ &= \left(\frac\right)^ \exp\left[-\frac\tau \left(\sum_^n(x_i-\bar)^2 + n(\bar -\mu)^2\right)\right]. \end Then, we proceed as follows: :\begin p(\mu\mid\mathbf) &\propto p(\mathbf\mid\mu) p(\mu) \\ & = \left(\frac\right)^ \exp\left[-\frac\tau \left(\sum_^n(x_i-\bar)^2 + n(\bar -\mu)^2\right)\right] \sqrt \exp\left(-\frac\tau_0(\mu-\mu_0)^2\right) \\ &\propto \exp\left(-\frac\left(\tau\left(\sum_^n(x_i-\bar)^2 + n(\bar -\mu)^2\right) + \tau_0(\mu-\mu_0)^2\right)\right) \\ &\propto \exp\left(-\frac \left(n\tau(\bar-\mu)^2 + \tau_0(\mu-\mu_0)^2 \right)\right) \\ &= \exp\left(-\frac(n\tau + \tau_0)\left(\mu - \dfrac\right)^2 + \frac(\bar - \mu_0)^2\right) \\ &\propto \exp\left(-\frac(n\tau + \tau_0)\left(\mu - \dfrac\right)^2\right) \end In the above derivation, we used the formula above for the sum of two quadratics and eliminated all constant factors not involving ''μ''. The result is the kernel (statistics), kernel of a normal distribution, with mean \frac and precision n\tau + \tau_0, i.e. :p(\mu\mid\mathbf) \sim \mathcal\left(\frac, \frac\right) This can be written as a set of Bayesian update equations for the posterior parameters in terms of the prior parameters: :\begin \tau_0' &= \tau_0 + n\tau \\[5pt] \mu_0' &= \frac \\[5pt] \bar &= \frac\sum_^n x_i \end That is, to combine ''n'' data points with total precision of ''nτ'' (or equivalently, total variance of ''n''/''σ''2) and mean of values \bar, derive a new total precision simply by adding the total precision of the data to the prior total precision, and form a new mean through a ''precision-weighted average'', i.e. a weighted average of the data mean and the prior mean, each weighted by the associated total precision. This makes logical sense if the precision is thought of as indicating the certainty of the observations: In the distribution of the posterior mean, each of the input components is weighted by its certainty, and the certainty of this distribution is the sum of the individual certainties. (For the intuition of this, compare the expression "the whole is (or is not) greater than the sum of its parts". In addition, consider that the knowledge of the posterior comes from a combination of the knowledge of the prior and likelihood, so it makes sense that we are more certain of it than of either of its components.) The above formula reveals why it is more convenient to do Bayesian analysis of conjugate priors for the normal distribution in terms of the precision. The posterior precision is simply the sum of the prior and likelihood precisions, and the posterior mean is computed through a precision-weighted average, as described above. The same formulas can be written in terms of variance by reciprocating all the precisions, yielding the more ugly formulas :\begin ' &= \frac \\[5pt] \mu_0' &= \frac \\[5pt] \bar &= \frac\sum_^n x_i \end


With known mean

For a set of i.i.d. normally distributed data points X of size ''n'' where each individual point ''x'' follows x \sim \mathcal(\mu, \sigma^2) with known mean μ, the conjugate prior of the
variance In probability theory and statistics, variance is the expectation of the squared deviation of a random variable from its population mean or sample mean. Variance is a measure of dispersion, meaning it is a measure of how far a set of numbers ...
has an inverse gamma distribution or a scaled inverse chi-squared distribution. The two are equivalent 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. The prior for σ2 is as follows: :p(\sigma^2\mid\nu_0,\sigma_0^2) = \frac~\frac \propto \frac The likelihood function from above, written in terms of the variance, is: :\begin p(\mathbf\mid\mu,\sigma^2) &= \left(\frac\right)^ \exp\left[-\frac \sum_^n (x_i-\mu)^2\right] \\ &= \left(\frac\right)^ \exp\left[-\frac\right] \end where :S = \sum_^n (x_i-\mu)^2. Then: :\begin p(\sigma^2\mid\mathbf) &\propto p(\mathbf\mid\sigma^2) p(\sigma^2) \\ &= \left(\frac\right)^ \exp\left[-\frac\right] \frac~\frac \\ &\propto \left(\frac\right)^ \frac \exp\left[-\frac + \frac\right] \\ &= \frac \exp\left[-\frac\right] \end The above is also a scaled inverse chi-squared distribution where :\begin \nu_0' &= \nu_0 + n \\ \nu_0'' &= \nu_0 \sigma_0^2 + \sum_^n (x_i-\mu)^2 \end or equivalently :\begin \nu_0' &= \nu_0 + n \\ ' &= \frac \end Reparameterizing in terms of an inverse gamma distribution, the result is: :\begin \alpha' &= \alpha + \frac \\ \beta' &= \beta + \frac \end


With unknown mean and unknown variance

For a set of i.i.d. normally distributed data points X of size ''n'' where each individual point ''x'' follows x \sim \mathcal(\mu, \sigma^2) with unknown mean μ and unknown
variance In probability theory and statistics, variance is the expectation of the squared deviation of a random variable from its population mean or sample mean. Variance is a measure of dispersion, meaning it is a measure of how far a set of numbers ...
σ2, a combined (multivariate) conjugate prior is placed over the mean and variance, consisting of a normal-inverse-gamma distribution. Logically, this originates as follows: # From the analysis of the case with unknown mean but known variance, we see that the update equations involve sufficient statistics computed from the data consisting of the mean of the data points and the total variance of the data points, computed in turn from the known variance divided by the number of data points. # From the analysis of the case with unknown variance but known mean, we see that the update equations involve sufficient statistics over the data consisting of the number of data points and sum of squared deviations. # Keep in mind that the posterior update values serve as the prior distribution when further data is handled. Thus, we should logically think of our priors in terms of the sufficient statistics just described, with the same semantics kept in mind as much as possible. # To handle the case where both mean and variance are unknown, we could place independent priors over the mean and variance, with fixed estimates of the average mean, total variance, number of data points used to compute the variance prior, and sum of squared deviations. Note however that in reality, the total variance of the mean depends on the unknown variance, and the sum of squared deviations that goes into the variance prior (appears to) depend on the unknown mean. In practice, the latter dependence is relatively unimportant: Shifting the actual mean shifts the generated points by an equal amount, and on average the squared deviations will remain the same. This is not the case, however, with the total variance of the mean: As the unknown variance increases, the total variance of the mean will increase proportionately, and we would like to capture this dependence. # This suggests that we create a ''conditional prior'' of the mean on the unknown variance, with a hyperparameter specifying the mean of the pseudo-observations associated with the prior, and another parameter specifying the number of pseudo-observations. This number serves as a scaling parameter on the variance, making it possible to control the overall variance of the mean relative to the actual variance parameter. The prior for the variance also has two hyperparameters, one specifying the sum of squared deviations of the pseudo-observations associated with the prior, and another specifying once again the number of pseudo-observations. Note that each of the priors has a hyperparameter specifying the number of pseudo-observations, and in each case this controls the relative variance of that prior. These are given as two separate hyperparameters so that the variance (aka the confidence) of the two priors can be controlled separately. # This leads immediately to the normal-inverse-gamma distribution, which is the product of the two distributions just defined, with conjugate priors used (an inverse gamma distribution over the variance, and a normal distribution over the mean, ''conditional'' on the variance) and with the same four parameters just defined. The priors are normally defined as follows: :\begin p(\mu\mid\sigma^2; \mu_0, n_0) &\sim \mathcal(\mu_0,\sigma^2/n_0) \\ p(\sigma^2; \nu_0,\sigma_0^2) &\sim I\chi^2(\nu_0,\sigma_0^2) = IG(\nu_0/2, \nu_0\sigma_0^2/2) \end The update equations can be derived, and look as follows: :\begin \bar &= \frac 1 n \sum_^n x_i \\ \mu_0' &= \frac \\ n_0' &= n_0 + n \\ \nu_0' &= \nu_0 + n \\ \nu_0'' &= \nu_0 \sigma_0^2 + \sum_^n (x_i-\bar)^2 + \frac(\mu_0 - \bar)^2 \end The respective numbers of pseudo-observations add the number of actual observations to them. The new mean hyperparameter is once again a weighted average, this time weighted by the relative numbers of observations. Finally, the update for \nu_0'' is similar to the case with known mean, but in this case the sum of squared deviations is taken with respect to the observed data mean rather than the true mean, and as a result a new "interaction term" needs to be added to take care of the additional error source stemming from the deviation between prior and data mean.


Occurrence and applications

The occurrence of normal distribution in practical problems can be loosely classified into four categories: # Exactly normal distributions; # Approximately normal laws, for example when such approximation is justified by the
central limit theorem In probability theory, the central limit theorem (CLT) establishes that, in many situations, when independent random variables are summed up, their properly normalized sum tends toward a normal distribution even if the original variables themselv ...
; and # Distributions modeled as normal – the normal distribution being the distribution with Principle of maximum entropy, maximum entropy for a given mean and variance. # Regression problems – the normal distribution being found after systematic effects have been modeled sufficiently well.


Exact normality

Certain quantities in physics are distributed normally, as was first demonstrated by James Clerk Maxwell. Examples of such quantities are: * Probability density function of a ground state in a quantum harmonic oscillator. * The position of a particle that experiences diffusion. If initially the particle is located at a specific point (that is its probability distribution is the Dirac delta function), then after time ''t'' its location is described by a normal distribution with variance ''t'', which satisfies the diffusion equation \frac f(x,t) = \frac \frac f(x,t). If the initial location is given by a certain density function g(x), then the density at time ''t'' is the convolution of ''g'' and the normal PDF.


Approximate normality

''Approximately'' normal distributions occur in many situations, as explained by the
central limit theorem In probability theory, the central limit theorem (CLT) establishes that, in many situations, when independent random variables are summed up, their properly normalized sum tends toward a normal distribution even if the original variables themselv ...
. When the outcome is produced by many small effects acting ''additively and independently'', its distribution will be close to normal. The normal approximation will not be valid if the effects act multiplicatively (instead of additively), or if there is a single external influence that has a considerably larger magnitude than the rest of the effects. * In counting problems, where the central limit theorem includes a discrete-to-continuum approximation and where Infinite divisibility, infinitely divisible and Indecomposable distribution, decomposable distributions are involved, such as ** binomial distribution, Binomial random variables, associated with binary response variables; ** Poisson distribution, Poisson random variables, associated with rare events; * Thermal radiation has a Bose–Einstein statistics, Bose–Einstein distribution on very short time scales, and a normal distribution on longer timescales due to the central limit theorem.


Assumed normality

There are statistical methods to empirically test that assumption; see the above #Normality tests, Normality tests section. * In biology, the ''logarithm'' of various variables tend to have a normal distribution, that is, they tend to have a
log-normal distribution In probability theory, a log-normal (or lognormal) distribution is a continuous probability distribution of a random variable whose logarithm is normally distributed. Thus, if the random variable is log-normally distributed, then has a normal ...
(after separation on male/female subpopulations), with examples including: ** Measures of size of living tissue (length, height, skin area, weight); ** The ''length'' of ''inert'' appendages (hair, claws, nails, teeth) of biological specimens, ''in the direction of growth''; presumably the thickness of tree bark also falls under this category; ** Certain physiological measurements, such as blood pressure of adult humans. * In finance, in particular the Black–Scholes model, changes in the ''logarithm'' of exchange rates, price indices, and stock market indices are assumed normal (these variables behave like compound interest, not like simple interest, and so are multiplicative). Some mathematicians such as Benoit Mandelbrot have argued that Levy skew alpha-stable distribution, log-Levy distributions, which possesses heavy tails would be a more appropriate model, in particular for the analysis for stock market crashes. The use of the assumption of normal distribution occurring in financial models has also been criticized by Nassim Nicholas Taleb in his works. * Propagation of uncertainty, Measurement errors in physical experiments are often modeled by a normal distribution. This use of a normal distribution does not imply that one is assuming the measurement errors are normally distributed, rather using the normal distribution produces the most conservative predictions possible given only knowledge about the mean and variance of the errors. * In Standardized testing (statistics), standardized testing, results can be made to have a normal distribution by either selecting the number and difficulty of questions (as in the Intelligence quotient, IQ test) or transforming the raw test scores into "output" scores by fitting them to the normal distribution. For example, the SAT's traditional range of 200–800 is based on a normal distribution with a mean of 500 and a standard deviation of 100. * Many scores are derived from the normal distribution, including percentile ranks ("percentiles" or "quantiles"), normal curve equivalents, stanines, Standard score, z-scores, and T-scores. Additionally, some behavioral statistical procedures assume that scores are normally distributed; for example, Student's t-test, t-tests and Analysis of variance, ANOVAs. Bell curve grading assigns relative grades based on a normal distribution of scores. * In hydrology the distribution of long duration river discharge or rainfall, e.g. monthly and yearly totals, is often thought to be practically normal according to the
central limit theorem In probability theory, the central limit theorem (CLT) establishes that, in many situations, when independent random variables are summed up, their properly normalized sum tends toward a normal distribution even if the original variables themselv ...
. The blue picture, made with CumFreq, illustrates an example of fitting the normal distribution to ranked October rainfalls showing the 90% confidence belt based on the
binomial distribution In probability theory and statistics, the binomial distribution with parameters ''n'' and ''p'' is the discrete probability distribution of the number of successes in a sequence of ''n'' independent experiments, each asking a yes–no quest ...
. The rainfall data are represented by plotting positions as part of the cumulative frequency analysis.


Methodological problems and peer review

John Ioannidis argues that using normally distributed standard deviations as standards for validating research findings leave falsifiability, falsifiable predictions about phenomena that are not normally distributed untested. This includes, for example, phenomena that only appear when all necessary conditions are present and one cannot be a substitute for another in an addition-like way and phenomena that are not randomly distributed. Ioannidis argues that standard deviation-centered validation gives a false appearance of validity to hypotheses and theories where some but not all falsifiable predictions are normally distributed since the portion of falsifiable predictions that there is evidence against may and in some cases are in the non-normally distributed parts of the range of falsifiable predictions, as well as baselessly dismissing hypotheses for which none of the falsifiable predictions are normally distributed as if were they unfalsifiable when in fact they do make falsifiable predictions. It is argued by Ioannidis that many cases of mutually exclusive theories being accepted as "validated" by research journals are caused by failure of the journals to take in empirical falsifications of non-normally distributed predictions, and not because mutually exclusive theories are true, which they cannot be, although two mutually exclusive theories can both be wrong and a third one correct.


Computational methods


Generating values from normal distribution

In computer simulations, especially in applications of the Monte-Carlo method, it is often desirable to generate values that are normally distributed. The algorithms listed below all generate the standard normal deviates, since a can be generated as , where ''Z'' is standard normal. All these algorithms rely on the availability of a random number generator ''U'' capable of producing Uniform distribution (continuous), uniform random variates. * The most straightforward method is based on the probability integral transform property: if ''U'' is distributed uniformly on (0,1), then Φ−1(''U'') will have the standard normal distribution. The drawback of this method is that it relies on calculation of the
probit function In probability theory and statistics, the probit function is the quantile function associated with the standard normal distribution. It has applications in data analysis and machine learning, in particular exploratory statistical graphics and ...
Φ−1, which cannot be done analytically. Some approximate methods are described in and in the error function, erf article. Wichura gives a fast algorithm for computing this function to 16 decimal places, which is used by R programming language, R to compute random variates of the normal distribution. * Irwin–Hall distribution#Approximating a Normal distribution, An easy-to-program approximate approach that relies on the
central limit theorem In probability theory, the central limit theorem (CLT) establishes that, in many situations, when independent random variables are summed up, their properly normalized sum tends toward a normal distribution even if the original variables themselv ...
is as follows: generate 12 uniform ''U''(0,1) deviates, add them all up, and subtract 6 – the resulting random variable will have approximately standard normal distribution. In truth, the distribution will be Irwin–Hall distribution, Irwin–Hall, which is a 12-section eleventh-order polynomial approximation to the normal distribution. This random deviate will have a limited range of (−6, 6). Note that in a true normal distribution, only 0.00034% of all samples will fall outside ±6σ. * The Box–Muller transform, Box–Muller method uses two independent random numbers ''U'' and ''V'' distributed uniform distribution (continuous), uniformly on (0,1). Then the two random variables ''X'' and ''Y'' X = \sqrt \, \cos(2 \pi V) , \qquad Y = \sqrt \, \sin(2 \pi V) . will both have the standard normal distribution, and will be
independent Independent or Independents may refer to: Arts, entertainment, and media Artist groups * Independents (artist group), a group of modernist painters based in the New Hope, Pennsylvania, area of the United States during the early 1930s * Independ ...
. This formulation arises because for a bivariate normal random vector (''X'', ''Y'') the squared norm will have the
chi-squared distribution In probability theory and statistics, the chi-squared distribution (also chi-square or \chi^2-distribution) with k degrees of freedom is the distribution of a sum of the squares of k independent standard normal random variables. The chi-squa ...
with two degrees of freedom, which is an easily generated exponential distribution, exponential random variable corresponding to the quantity −2ln(''U'') in these equations; and the angle is distributed uniformly around the circle, chosen by the random variable ''V''. * The Marsaglia polar method is a modification of the Box–Muller method which does not require computation of the sine and cosine functions. In this method, ''U'' and ''V'' are drawn from the uniform (−1,1) distribution, and then is computed. If ''S'' is greater or equal to 1, then the method starts over, otherwise the two quantities X = U\sqrt, \qquad Y = V\sqrt are returned. Again, ''X'' and ''Y'' are independent, standard normal random variables. * The Ratio method is a rejection method. The algorithm proceeds as follows: ** Generate two independent uniform deviates ''U'' and ''V''; ** Compute ''X'' = (''V'' − 0.5)/''U''; ** Optional: if ''X''2 ≤ 5 − 4''e''1/4''U'' then accept ''X'' and terminate algorithm; ** Optional: if ''X''2 ≥ 4''e''−1.35/''U'' + 1.4 then reject ''X'' and start over from step 1; ** If ''X''2 ≤ −4 ln''U'' then accept ''X'', otherwise start over the algorithm. *:The two optional steps allow the evaluation of the logarithm in the last step to be avoided in most cases. These steps can be greatly improved so that the logarithm is rarely evaluated. * The ziggurat algorithm is faster than the Box–Muller transform and still exact. In about 97% of all cases it uses only two random numbers, one random integer and one random uniform, one multiplication and an if-test. Only in 3% of the cases, where the combination of those two falls outside the "core of the ziggurat" (a kind of rejection sampling using logarithms), do exponentials and more uniform random numbers have to be employed. * Integer arithmetic can be used to sample from the standard normal distribution. This method is exact in the sense that it satisfies the conditions of ''ideal approximation''; i.e., it is equivalent to sampling a real number from the standard normal distribution and rounding this to the nearest representable floating point number. * There is also some investigation into the connection between the fast Hadamard transform and the normal distribution, since the transform employs just addition and subtraction and by the central limit theorem random numbers from almost any distribution will be transformed into the normal distribution. In this regard a series of Hadamard transforms can be combined with random permutations to turn arbitrary data sets into a normally distributed data.


Numerical approximations for the normal CDF and normal quantile function

The standard normal cumulative distribution function, CDF is widely used in scientific and statistical computing. The values Φ(''x'') may be approximated very accurately by a variety of methods, such as numerical integration, Taylor series, asymptotic series and Gauss's continued fraction#Of Kummer's confluent hypergeometric function, continued fractions. Different approximations are used depending on the desired level of accuracy. * give the approximation for Φ(''x'') for ''x > 0'' with the absolute error (algorith
26.2.17
: \Phi(x) = 1 - \varphi(x)\left(b_1 t + b_2 t^2 + b_3t^3 + b_4 t^4 + b_5 t^5\right) + \varepsilon(x), \qquad t = \frac, where ''ϕ''(''x'') is the standard normal PDF, and ''b''0 = 0.2316419, ''b''1 = 0.319381530, ''b''2 = −0.356563782, ''b''3 = 1.781477937, ''b''4 = −1.821255978, ''b''5 = 1.330274429. * lists some dozens of approximations – by means of rational functions, with or without exponentials – for the function. His algorithms vary in the degree of complexity and the resulting precision, with maximum absolute precision of 24 digits. An algorithm by combines Hart's algorithm 5666 with a continued fraction approximation in the tail to provide a fast computation algorithm with a 16-digit precision. * after recalling Hart68 solution is not suited for erf, gives a solution for both erf and erfc, with maximal relative error bound, via rational function, Rational Chebyshev Approximation. * suggested a simple algorithm based on the Taylor series expansion \Phi(x) = \frac12 + \varphi(x)\left( x + \frac 3 + \frac + \frac + \frac + \cdots \right) for calculating with arbitrary precision. The drawback of this algorithm is comparatively slow calculation time (for example it takes over 300 iterations to calculate the function with 16 digits of precision when ). * The GNU Scientific Library calculates values of the standard normal CDF using Hart's algorithms and approximations with Chebyshev polynomials. Shore (1982) introduced simple approximations that may be incorporated in stochastic optimization models of engineering and operations research, like reliability engineering and inventory analysis. Denoting , the simplest approximation for the quantile function is: z = \Phi^(p)=5.5556\left[1- \left( \frac p \right)^\right],\qquad p\ge 1/2 This approximation delivers for ''z'' a maximum absolute error of 0.026 (for , corresponding to ). For replace ''p'' by and change sign. Another approximation, somewhat less accurate, is the single-parameter approximation: z=-0.4115\left\, \qquad p\ge 1/2 The latter had served to derive a simple approximation for the loss integral of the normal distribution, defined by \begin L(z) & =\int_z^\infty (u-z)\varphi(u) \, du=\int_z^\infty [1-\Phi (u)] \, du \\[5pt] L(z) & \approx \begin 0.4115\left(\dfrac p \right) - z, & p<1/2, \\ \\ 0.4115\left( \dfrac p \right), & p\ge 1/2. \end \\[5pt] \text \\ L(z) & \approx \begin 0.4115\left\, & p < 1/2, \\ \\ 0.4115 \dfrac p, & p\ge 1/2. \end \end This approximation is particularly accurate for the right far-tail (maximum error of 10−3 for z≥1.4). Highly accurate approximations for the CDF, based on Response modeling methodology, Response Modeling Methodology (RMM, Shore, 2011, 2012), are shown in Shore (2005). Some more approximations can be found at: Error function#Approximation with elementary functions. In particular, small ''relative'' error on the whole domain for the CDF \Phi and the quantile function \Phi^ as well, is achieved via an explicitly invertible formula by Sergei Winitzki in 2008.


History


Development

Some authors attribute the credit for the discovery of the normal distribution to Abraham de Moivre, de Moivre, who in 1738 published in the second edition of his "''The Doctrine of Chances''" the study of the coefficients in the binomial expansion of . De Moivre proved that the middle term in this expansion has the approximate magnitude of 2^n/\sqrt, and that "If ''m'' or ''n'' be a Quantity infinitely great, then the Logarithm of the Ratio, which a Term distant from the middle by the Interval ''ℓ'', has to the middle Term, is -\frac." Although this theorem can be interpreted as the first obscure expression for the normal probability law, Stephen Stigler, Stigler points out that de Moivre himself did not interpret his results as anything more than the approximate rule for the binomial coefficients, and in particular de Moivre lacked the concept of the probability density function. In 1823 Carl Friedrich Gauss, Gauss published his monograph "''Theoria combinationis observationum erroribus minimis obnoxiae''" where among other things he introduces several important statistical concepts, such as the method of least squares, the method of maximum likelihood, and the ''normal distribution''. Gauss used ''M'', , to denote the measurements of some unknown quantity ''V'', and sought the "most probable" estimator of that quantity: the one that maximizes the probability of obtaining the observed experimental results. In his notation φΔ is the probability density function of the measurement errors of magnitude Δ. Not knowing what the function ''φ'' is, Gauss requires that his method should reduce to the well-known answer: the arithmetic mean of the measured values. Starting from these principles, Gauss demonstrates that the only law that rationalizes the choice of arithmetic mean as an estimator of the location parameter, is the normal law of errors: \varphi\mathit = \frac h \, e^, where ''h'' is "the measure of the precision of the observations". Using this normal law as a generic model for errors in the experiments, Gauss formulates what is now known as the non-linear least squares, non-linear weighted least squares method. Although Gauss was the first to suggest the normal distribution law, Pierre Simon de Laplace, Laplace made significant contributions. It was Laplace who first posed the problem of aggregating several observations in 1774, although his own solution led to the Laplacian distribution. It was Laplace who first calculated the value of the Gaussian integral, integral in 1782, providing the normalization constant for the normal distribution. Finally, it was Laplace who in 1810 proved and presented to the Academy the fundamental
central limit theorem In probability theory, the central limit theorem (CLT) establishes that, in many situations, when independent random variables are summed up, their properly normalized sum tends toward a normal distribution even if the original variables themselv ...
, which emphasized the theoretical importance of the normal distribution. It is of interest to note that in 1809 an Irish-American mathematician Robert Adrain published two insightful but flawed derivations of the normal probability law, simultaneously and independently from Gauss. His works remained largely unnoticed by the scientific community, until in 1871 they were exhumed by Cleveland Abbe, Abbe. In the middle of the 19th century James Clerk Maxwell, Maxwell demonstrated that the normal distribution is not just a convenient mathematical tool, but may also occur in natural phenomena: "The number of particles whose velocity, resolved in a certain direction, lies between ''x'' and ''x'' + ''dx'' is \operatorname \frac\; e^ \, dx


Naming

Today, the concept is usually known in English as the normal distribution or Gaussian distribution. Other less common names include Gauss distribution, Laplace-Gauss distribution, the law of error, the law of facility of errors, Laplace's second law, Gaussian law. Gauss himself apparently coined the term with reference to the "normal equations" involved in its applications, with normal having its technical meaning of orthogonal rather than "usual". However, by the end of the 19th century some authors had started using the name ''normal distribution'', where the word "normal" was used as an adjective – the term now being seen as a reflection of the fact that this distribution was seen as typical, common – and thus "normal". Charles Sanders Peirce, Peirce (one of those authors) once defined "normal" thus: "...the 'normal' is not the average (or any other kind of mean) of what actually occurs, but of what ''would'', in the long run, occur under certain circumstances." Around the turn of the 20th century Karl Pearson, Pearson popularized the term ''normal'' as a designation for this distribution. Also, it was Pearson who first wrote the distribution in terms of the standard deviation ''σ'' as in modern notation. Soon after this, in year 1915, Ronald Fisher, Fisher added the location parameter to the formula for normal distribution, expressing it in the way it is written nowadays: df = \frac e^ \, dx. The term "standard normal", which denotes the normal distribution with zero mean and unit variance came into general use around the 1950s, appearing in the popular textbooks by P. G. Hoel (1947) "''Introduction to mathematical statistics''" and A. M. Mood (1950) "''Introduction to the theory of statistics''".


See also

* Bates distribution – similar to the Irwin–Hall distribution, but rescaled back into the 0 to 1 range * Behrens–Fisher problem – the long-standing problem of testing whether two normal samples with different variances have same means; * Bhattacharyya distance – method used to separate mixtures of normal distributions * Erdős–Kac theorem – on the occurrence of the normal distribution in number theory * Full width at half maximum * Gaussian blur – convolution, which uses the normal distribution as a kernel * Modified half-normal distribution with the pdf on (0, \infty) is given as f(x)= \frac, where \Psi(\alpha,z)=_1\Psi_1\left(\begin\left(\alpha,\frac\right)\\(1,0)\end;z \right) denotes the Fox-Wright Psi function. * Normally distributed and uncorrelated does not imply independent * Ratio normal distribution * Reciprocal normal distribution * Standard normal table * Stein's lemma * Sub-Gaussian distribution * Sum of normally distributed random variables * Tweedie distribution – The normal distribution is a member of the family of Tweedie exponential dispersion models. * Wrapped normal distribution – the Normal distribution applied to a circular domain * Z-test – using the normal distribution


Notes


References


Citations


Sources

* * In particular, the entries fo
"bell-shaped and bell curve"
an

* * * * * * * * * * * * * * * * * * * * * * * * Translated by Stephen M. Stigler in ''Statistical Science'' 1 (3), 1986: . * * * * * * * * * * * * * * * * * * * * * * * * * * * *


External links

*
Normal distribution calculator
{{Authority control Normal distribution, Continuous distributions Conjugate prior distributions Exponential family distributions Stable distributions Location-scale family probability distributions