maths.freeProbability Theory › Distributions › Normal distribution

Normal distribution

In probability theory and statistics, a normal distribution or Gaussian distribution is a type of continuous probability distribution for a real-valued random variable.

Normal distribution

In probability theory and statistics, a normal distribution or Gaussian distribution is a type of continuous probability distribution for a real-valued random variable. The general form of its probability density function is \[f(x) = \frac{1}{\sqrt{2\pi\sigma^2}} \exp{\left(-\frac{(x-\mu)^2}{2\sigma^2}\right)}\,.\] The parameter ⁠\(\mu\)⁠ is the mean or expectation of the distribution (and also its median and mode), while the parameter \(\sigma^2\) is the variance. The standard deviation of the distribution is the positive value ⁠\(\sigma\)⁠ (sigma). 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 and are often used in the natural and social sciences to represent real-valued random variables whose distributions are not known. Their importance is partly due to the central limit theorem. It states that the average of many statistically independent 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 errors, 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 independent normal deviates is a normal deviate. Many results and methods, such as propagation of uncertainty and least squares parameter fitting, can be derived analytically in explicit form when the relevant variables are normally distributed.

However, normal distributions are frequently misused in contexts where the assumption that the data are normally distributed is not met and the normal distribution is a poor model.

A normal distribution is sometimes informally called a bell curve. However, many other distributions are bell-shaped (such as the Cauchy, Student's t, and logistic distributions). (For other names, see Naming.)

The univariate probability distribution is generalized for vectors in the multivariate normal distribution and for matrices in the matrix normal distribution.

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^2 =1\), and it is described by this probability density function (or density): \[\varphi(z) = \frac{e^{-z^2/2}}{\sqrt{2\pi}}\,.\] The variable ⁠\(z\)⁠ has a mean of 0 and a variance and standard deviation of 1. The density \(\varphi(z)\) has its peak value \(\frac{1}{\sqrt{2\pi}}\) at \(z=0\) and inflection points 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, for example, once defined the standard normal as \(\varphi(z) = \frac{1}{\sqrt\pi} e^{-z^2},\) which has a variance of ⁠\(\tfrac12\)⁠, and Stephen Stigler once defined the standard normal as \(\varphi(z) = e^{-\pi z^2},\) which has a simple functional form and a variance of \(\sigma^2 = \frac{1}{2\pi}.\)

General normal distribution

If ⁠\(Z\)⁠ is a standard normal deviate, 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\)⁠.

In particular, the probability density function for ⁠\(X\)⁠ can be written in terms of the standard normal distribution ⁠\(\varphi\)⁠ (with zero mean and unit variance): \[f(x \mid \mu, \sigma^2) =\frac 1 \sigma \varphi\left(\frac{x-\mu} \sigma \right)\,.\] The probability density must be scaled by \(1/\sigma\) so that the integral is still 1.

Notation

The probability density function of the standard normal distribution is commonly denoted by the Greek letter phi, ⁠\(\phi\)⁠. The variant form ⁠\(\varphi\)⁠ is also used.

The cumulative distribution function of the standard normal distribution is commonly denoted by the capital Greek letter phi, ⁠\(\Phi\)⁠.

The normal distribution is often referred to as \(N(\mu,\sigma^2)\) or ⁠\(\mathcal{N}(\mu,\sigma^2)\)⁠. When a random variable ⁠\(X\)⁠ is normally distributed with mean ⁠\(\mu\)⁠ and standard deviation ⁠\(\sigma\)⁠, one may write

\[X \sim \mathcal{N}(\mu,\sigma^2).\]

Alternative parameterizations

Some authors advocate using the precision ⁠\(\tau\)⁠ as the parameter defining the width of the distribution, instead of the standard 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{\frac\tau{2\pi}} e^{-\tau(x-\mu)^2/2}.\]

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 of variables with multivariate normal distribution.

Alternatively, the reciprocal of the standard deviation \(\tau'=1/\sigma\) might be defined as the precision, in which case the expression of the normal distribution becomes \[f(x) = \frac{\tau'}{\sqrt{2\pi}} e^{-(\tau')^2(x-\mu)^2/2}.\]

According to Stigler, this formulation is advantageous because of a much simpler and easier-to-remember formula, and simple approximate formulas for the quantiles of the distribution.

Normal distributions form an exponential family with natural parameters \(\textstyle\theta_1=\frac{\mu}{\sigma^2}\) and \(\textstyle\theta_2=-\frac{1}{2\sigma^2}\), and natural statistics x and x. The dual expectation parameters for normal distribution are η1 = μ and η2 = μ + σ.

Cumulative distribution function

The cumulative distribution function (CDF) of the standard normal distribution, usually denoted with the capital Greek letter ⁠\(\Phi\)⁠, is the integral \[\Phi(x) = \frac 1 {\sqrt{2\pi}} \int_{-\infty}^x e^{-t^2/2} \, dt\,.\]

The related error function \(\operatorname{erf}(x)\) gives the probability of a random variable, with normal distribution of mean 0 and variance 1/2, falling in the range ⁠\([-x, x]\)⁠. That is: \[\operatorname{erf}(x) = \frac 1 {\sqrt\pi} \int_{-x}^x e^{-t^2} \, dt = \frac 2 {\sqrt\pi} \int_0^x e^{-t^2} \, dt\,.\]

These integrals cannot be expressed in terms of elementary functions, and are often said to be special functions. However, many numerical approximations are known; see below for more.

The two functions are closely related, namely \[\Phi(x) = \frac{1}{2} \left[1 + \operatorname{erf}\left( \frac x {\sqrt 2} \right) \right].\]

For a generic normal distribution with density ⁠\(f\)⁠, mean ⁠\(\mu\)⁠ and variance \(\sigma^2\), the cumulative distribution function is \[F(x) = \Phi{\left(\frac{x-\mu} \sigma \right)} = \frac{1}{2} \left[1 + \operatorname{erf}\left(\frac{x-\mu}{\sigma \sqrt 2 }\right)\right].\]

The probability that x lies between a and b with a < b is therefore\[\operatorname{P}(a < x \le b) = \frac12 \left[ \operatorname{erf}\left(\frac{b-\mu}{\sigma \sqrt{2}}\right) - \operatorname{erf}\left(\frac{a-\mu}{\sigma \sqrt{2}}\right) \right]\]

The complement of the standard normal cumulative distribution function, \(Q(x) = 1 - \Phi(x)\), is often called the Q-function, 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.

Condensed: the full section is in Wikipedia.

Properties

The normal distribution is the only distribution whose cumulants beyond the first two (i.e., other than the mean and variance) 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.

The normal distribution is a subclass of the elliptical distributions. The normal distribution is symmetric 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 of a person or the price of a share of stock. Such variables may be better described by other distributions, such as the log-normal distribution or the Pareto distribution.

The value of the normal density is practically zero when the value ⁠\(x\)⁠ lies more than a few standard deviations 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 outliers, values that lie many standard deviations away from the mean, and least squares and other statistical inference methods that are optimal for normally distributed variables often become highly unreliable when applied to such data. In those cases, a more heavy-tailed distribution should be assumed and appropriate robust statistical inference methods applied.

The Gaussian distribution belongs to the family of stable distributions which are the attractors of sums of independent, identically distributed 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 and the Lévy distribution.

Symmetries and derivatives

The normal distribution with density \(f(x)\) (mean ⁠\(\mu\)⁠ and variance \(\sigma^2 > 0\)) has the following properties:

  • It is symmetric around the point \(x=\mu,\) which is at the same time the mode, the median and the mean of the distribution.
  • It is unimodal: its first derivative 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'(x)=-\frac{x-\mu}{\sigma^2} f(x).\)
  • Its second derivative is \(f''(x) = \frac{(x-\mu)^2 - \sigma^2}{\sigma^4} f(x).\)
  • Its density has two inflection points (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, 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'(x)=-x\varphi(x).\)
  • Its second derivative is \(\varphi''(x)=(x^2-1)\varphi(x)\)
  • More generally, its nth derivative is \(\varphi^{(n)}(x) = (-1)^n\operatorname{He}_n(x)\varphi(x),\) where \(\operatorname{He}_n(x)\) is the nth (probabilist) Hermite polynomial.
  • The probability that a normally distributed variable ⁠\(X\)⁠ with known ⁠\(\mu\)⁠ and \(\sigma^2\) is in a particular set, can be calculated given 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{E}\left[(X-\mu)^p\right] = \begin{cases} 0 & \text{if }p\text{ is odd,} \\ \sigma^p (p-1)!! & \text{if }p\text{ is even.} \end{cases}\] Here \(n!!\) denotes the double factorial, 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{aligned} \operatorname{E}\left[|X - \mu|^p\right] &= \sigma^p (p-1)!! \cdot \begin{cases} \sqrt{\frac{2}{\pi}} & \text{if }p\text{ is odd} \\ 1 & \text{if }p\text{ is even} \end{cases} \\[8pt] &= \sigma^p \cdot \frac{2^{p/2}\Gamma\left(\frac{p+1} 2 \right)}{\sqrt\pi}. \end{aligned}\] 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 functions \({}_1F_1\) and \(U.\) \[\begin{aligned} \operatorname{E}\left[X^p\right] &= \sigma^p\cdot {\left(-i\sqrt 2\right)}^p \, U{\left(-\frac{p}{2}, \frac{1}{2}, -\frac{\mu^2}{2\sigma^2}\right)}, \\ \operatorname{E}\left[|X|^p \right] &= \sigma^p \cdot 2^{p/2} \frac {\Gamma{\left(\frac{1+p} 2\right)}}{\sqrt\pi} \, {}_1F_1{\left( -\frac{p}{2}, \frac{1}{2}, -\frac{\mu^2}{2\sigma^2} \right)}. \end{aligned}\]

These expressions remain valid even when ⁠\(p > -1\)⁠ is not an integer. See also generalized Hermite polynomials.

The expectation of ⁠\(X\)⁠ conditioned on the event that ⁠\(X\)⁠ lies in an interval \([a,b]\) is given by \[\operatorname{E}\left[X \mid a

Fourier transform and characteristic function

The Fourier transform of a normal density ⁠\(f\)⁠ with mean ⁠\(\mu\)⁠ and variance \(\sigma^2\) is

\[\hat f(t) = \int_{-\infty}^\infty f(x)e^{-itx} \, dx = e^{-i\mu t} e^{- \frac12 \sigma^2 t^2}\,,\]

where ⁠\(i\)⁠ is the imaginary unit. 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, with mean 0 and variance ⁠\(1/\sigma^2\)⁠. In particular, the standard normal distribution ⁠\(\varphi\)⁠ is an eigenfunction 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 \(\varphi_X(t)\) of that variable, which is defined as the expected value of \(e^{itX}\), as a function of the real variable ⁠\(t\)⁠ (the frequency 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)\,.\]

The real and imaginary parts of \(\hat f(t) = \operatorname{E}[e^{-itx}] = e^{-i\mu t} e^{- \frac12 \sigma^2 t^2}\) give: \[\operatorname{E}[\cos(tx)] = \cos(\mu t) e^{- \frac12 \sigma^2 t^2}\] and \[\operatorname{E}[\sin(tx)] = \sin(\mu t) e^{- \frac12 \sigma^2 t^2}.\]

Similarly, \[\operatorname{E}[\cosh(tx)] = \cosh(\mu t) e^{\frac12 \sigma^2 t^2}\] and \[\operatorname{E}[\sinh(tx)] = \sinh(\mu t) e^{\frac12 \sigma^2 t^2}.\]

These formulas evaluated at \(t=1\) give the expected value of these basic trigonometric and hyperbolic functions over a Gaussian random variable \(X \sim N(\mu,\sigma^2)\), which also could be seen as consequences of the Isserlis's theorem.

Moment- and cumulant-generating functions

The moment generating function of a real random variable ⁠\(X\)⁠ is the expected value of \(e^{tX}\), as a function of the real parameter ⁠\(t\)⁠. For a normal distribution with density ⁠\(f\)⁠, mean ⁠\(\mu\)⁠ and variance \(\sigma^2\), the moment generating function exists and is equal to

\[M(t) = \operatorname{E}\left[e^{tX}\right] = \hat f(it) = e^{\mu t} e^{\sigma^2 t^2/2}\,.\] For any ⁠\(k\)⁠, the coefficient of ⁠\(t^k / k!\)⁠ in the moment generating function (expressed as an exponential power series in ⁠\(t\)⁠) is the normal distribution's expected value ⁠\(\operatorname{E}[X^k]\)⁠.

The cumulant generating function is the logarithm of the moment generating function, namely \[g(t) = \ln M(t) = \mu t + \tfrac 12 \sigma^2 t^2\,.\]

The coefficients of this exponential power series define the cumulants, but because this is a quadratic polynomial in ⁠\(t\)⁠, only the first two cumulants are nonzero, namely the mean ⁠\(\mu\)⁠ and the variance ⁠\(\sigma^2\)⁠.

Some authors prefer to instead work with the characteristic function E[e] = e and ln E[e] = iμt − ⁠1/2⁠σt.

Stein operator and class

Within Stein's method the Stein operator and class of a random variable \(X \sim \mathcal{N}(\mu, \sigma^2)\) are \(\mathcal{A}f(x) = \sigma^2 f'(x) - (x-\mu)f(x)\) and \(\mathcal{F}\) the class of all absolutely continuous functions ⁠\(\textstyle f : \R \to \R\)⁠ such that ⁠\(\operatorname{E}[\vert f'(X)\vert] < \infty\)⁠.

Zero-variance limit

In the limit when \(\sigma^2\) approaches zero, the probability density \(f\) approaches zero everywhere except at \(\mu\), where it approaches \(\infty\), while its integral remains equal to 1. An extension of the normal distribution to the case with zero variance can be defined using the Dirac delta measure \(\delta_\mu\), although the resulting random variables are not absolutely continuous and thus do not have probability density functions. The cumulative distribution function of such a random variable is then the Heaviside step function translated by the mean \(\mu\), namely \[F(x) = \begin{cases} 0 & \text{if }x < \mu \\ 1 & \text{if }x \geq \mu. \end{cases}\]

Maximum entropy

Of all probability distributions over the reals with a specified finite mean ⁠\(\mu\)⁠ and finite variance ⁠\(\sigma^2\)⁠, the normal distribution \(N(\mu,\sigma^2)\) is the one with maximum entropy. To see this, let ⁠\(X\)⁠ be a continuous random variable with probability density ⁠\(f(x)\)⁠. The entropy of ⁠\(X\)⁠ is defined as \[H(X) = - \int_{-\infty}^\infty f(x)\ln 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 mean and variance, by using variational calculus. A function with three Lagrange multipliers is defined: \[L=-\int_{-\infty}^\infty f(x)\ln f(x)\,dx-\lambda_0\left(1-\int_{-\infty}^\infty f(x)\,dx\right)-\lambda_1\left(\mu-\int_{-\infty}^\infty f(x)x\,dx\right)-\lambda_2\left(\sigma^2-\int_{-\infty}^\infty f(x)(x-\mu)^2\,dx\right)\,.\]

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}^\infty \delta f(x)\left(-\ln f(x) -1+\lambda_0+\lambda_1 x+\lambda_2(x-\mu)^2\right)\,dx\,.\]

Since this must hold for any small ⁠\(\delta f(x)\)⁠, the factor multiplying ⁠\(\delta f(x)\)⁠ must be zero, and solving for ⁠\(f(x)\)⁠ yields: \[f(x)=\exp\left(-1+\lambda_0+\lambda_1 x+\lambda_2(x-\mu)^2\right)\,.\]

The Lagrange constraints that ⁠\(f(x)\)⁠ is properly normalized and has the specified mean and variance are satisfied if and only if ⁠\(\lambda_0\)⁠, ⁠\(\lambda_1\)⁠, and ⁠\(\lambda_2\)⁠ are chosen so that \[f(x)=\frac{1}{\sqrt{2\pi\sigma^2}}e^{-\frac{(x-\mu)^2}{2\sigma^2}}\,.\] The entropy of a normal distribution \(X \sim N(\mu,\sigma^2)\) is equal to \[H(X)=\tfrac{1}{2}(1+\ln 2\sigma^2\pi)\,,\] which is independent of the mean ⁠\(\mu\)⁠.

Tagad tu Neviens kalkulators nenoslīgst šo, bet tā gabali ir komplējami. Izmēģiniet vienu zemāk vai ievadiet paši savu.

Saglabāt savu darbu

Bezmaksas konts pievieno piezīmes par katru nodarbību, ierakstu par to, ko esat pabeidzis, jūsu atrisinātās problēmas vienā vietā, un pasniedzēju, kuru varat jautāt par šo lapu. Pati matemātika ir pieejama ikvienam, kas ir vai nav parakstījies.

Pierakstīties Pieteikšanās

Šeit izmantotie simboli

Piesitiet visiem simboliem, kas apzīmē pilnu definīciju, attēlu un ko katrs burts tajā nozīmē.

Jautājumi, ko cilvēki vaicā

What is the difference between probability and statistics?

Probability goes from a known model to what the data should look like; statistics goes from data back to the model. Probability theory is the deductive half.

What does the law of large numbers promise?

That the average of many independent samples converges to the expected value. It says nothing about any single trial.

Daļas šīs lapas ir pielāgotas no Wikipedia (CC BY-SA 4.0). Šeit ir pārliecināts un vēlreiz izskaidrots; kļūdas ir mūsu.

Vairāk Probability Theory