Open main menu
Home
Random
Recent changes
Special pages
Community portal
Preferences
About Wikipedia
Disclaimers
Incubator escapee wiki
Search
User menu
Talk
Dark mode
Contributions
Create account
Log in
Editing
Normal distribution
(section)
Warning:
You are not logged in. Your IP address will be publicly visible if you make any edits. If you
log in
or
create an account
, your edits will be attributed to your username, along with other benefits.
Anti-spam check. Do
not
fill this in!
=== Error function === The related [[error function]] <math display=inline>\operatorname{erf}(x)</math> gives the probability of a random variable, with normal distribution of mean 0 and variance 1/2 falling in the range {{tmath|[-x, x]}}. That is:<!-- SIC! The interval for erf is [βx,+x], NOT [0,x]. --> <math display=block>\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\,.</math> These integrals cannot be expressed in terms of elementary functions, and are often said to be [[special function]]s. However, many numerical approximations are known; see [[#Numerical approximations for the normal cumulative distribution function and normal quantile function|below]] for more. The two functions are closely related, namely <math display=block>\Phi(x) = \frac{1}{2} \left[1 + \operatorname{erf}\left( \frac x {\sqrt 2} \right) \right]\,.</math> For a generic normal distribution with density {{tmath|f}}, mean {{tmath|\mu}} and variance <math display=inline>\sigma^2</math>, the cumulative distribution function is <math display="block"> 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]\,. </math> The complement of the standard normal cumulative distribution function, <math display=inline>Q(x) = 1 - \Phi(x)</math>, is often called the [[Q-function]], especially in engineering texts.<ref>{{cite web|url=http://cnx.org/content/m11537/1.2/|last1=Scott|first1=Clayton|first2=Robert|last2=Nowak|title=The Q-function|work=Connexions|date=August 7, 2003}}</ref><ref>{{cite web|url=http://www.eng.tau.ac.il/~jo/academic/Q.pdf|last=Barak|first=Ohad|title=Q Function and Error Function|publisher=Tel Aviv University|date=April 6, 2006|url-status=dead|archive-url=https://web.archive.org/web/20090325160012/http://www.eng.tau.ac.il/~jo/academic/Q.pdf|archive-date=March 25, 2009|df=mdy-all}}</ref> It gives the probability that the value of a standard normal random variable {{tmath|X}} will exceed {{tmath|x}}: {{tmath|P(X>x)}}. Other definitions of the {{tmath|Q}}-function, all of which are simple transformations of {{tmath|\Phi}}, are also used occasionally.<ref>{{MathWorld |urlname=NormalDistributionFunction |title=Normal Distribution Function }}</ref> The [[graph of a function|graph]] of the standard normal cumulative distribution function {{tmath|\Phi}} has 2-fold [[rotational symmetry]] around the point (0,1/2); that is, {{tmath|1=\Phi(-x) = 1 - \Phi(x)}}. Its [[antiderivative]] (indefinite integral) can be expressed as follows: <math display=block>\int \Phi(x)\, dx = x\Phi(x) + \varphi(x) + C.</math> The cumulative distribution function of the standard normal distribution can be expanded by [[integration by parts]] into a series: <math display=block>\Phi(x)=\frac{1}{2} + \frac{1}{\sqrt{2\pi}}\cdot e^{-x^2/2} \left[x + \frac{x^3}{3} + \frac{x^5}{3\cdot 5} + \cdots + \frac{x^{2n+1}}{(2n+1)!!} + \cdots\right]\,.</math> where <math display=inline>!!</math> denotes the [[double factorial]]. An [[asymptotic expansion]] of the cumulative distribution function for large ''x'' can also be derived using integration by parts. For more, see {{slink|Error function#Asymptotic expansion}}.<ref>{{AS ref|26, eqn 26.2.12|932}}</ref> A quick approximation to the standard normal distribution's cumulative distribution function can be found by using a Taylor series approximation: <math display=block>\Phi(x) \approx \frac{1}{2}+\frac{1}{\sqrt{2\pi}} \sum_{k=0}^n \frac{(-1)^k x^{(2k+1)}}{2^k k! (2k+1)}\,.</math> ==== Recursive computation with Taylor series expansion ==== The recursive nature of the <math display=inline>e^{ax^2}</math>family of derivatives may be used to easily construct a rapidly converging [[Taylor series]] expansion using recursive entries about any point of known value of the distribution,<math display=inline>\Phi(x_0)</math>: <math display=block>\Phi(x) = \sum_{n=0}^\infty \frac{\Phi^{(n)}(x_0)}{n!}(x-x_0)^n\,,</math> where: <math display=block>\begin{align} \Phi^{(0)}(x_0) &= \frac{1}{\sqrt{2\pi}}\int_{-\infty}^{x_0}e^{-t^2/2}\,dt \\ \Phi^{(1)}(x_0) &= \frac{1}{\sqrt{2\pi}}e^{-x_0^2/2} \\ \Phi^{(n)}(x_0) &= -\left(x_0\Phi^{(n-1)}(x_0)+(n-2)\Phi^{(n-2)}(x_0)\right), & n \geq 2\,. \end{align}</math> ==== Using the Taylor series and Newton's method for the inverse function ==== An application for the above Taylor series expansion is to use [[Newton's method]] to reverse the computation. That is, if we have a value for the [[cumulative distribution function]], <math display=inline>\Phi(x)</math>, but do not know the x needed to obtain the <math display=inline>\Phi(x)</math>, we can use Newton's method to find x, and use the Taylor series expansion above to minimize the number of computations. Newton's method is ideal to solve this problem because the first derivative of <math display=inline>\Phi(x)</math>, which is an integral of the normal standard distribution, is the normal standard distribution, and is readily available to use in the Newton's method solution. To solve, select a known approximate solution, <math display=inline>x_0</math>, to the desired {{tmath|\Phi(x)}}. <math display=inline>x_0</math> may be a value from a distribution table, or an intelligent estimate followed by a computation of <math display=inline>\Phi(x_0)</math> using any desired means to compute. Use this value of <math display=inline>x_0</math> and the Taylor series expansion above to minimize computations. Repeat the following process until the difference between the computed <math display=inline>\Phi(x_{n})</math> and the desired {{tmath|\Phi}}, which we will call <math display=inline>\Phi(\text{desired})</math>, is below a chosen acceptably small error, such as 10<sup>β5</sup>, 10<sup>β15</sup>, etc.: <math display=block>x_{n+1} = x_n - \frac{\Phi(x_n,x_0,\Phi(x_0))-\Phi(\text{desired})}{\Phi'(x_n)}\,,</math> where : <math display=inline>\Phi(x,x_0,\Phi(x_0))</math> is the <math display=inline>\Phi(x)</math> from a Taylor series solution using <math display=inline>x_0</math> and <math display=inline>\Phi(x_0)</math> <math display=block>\Phi'(x_n)=\frac{1}{\sqrt{2\pi}}e^{-x_n^2/2}\,.</math> When the repeated computations converge to an error below the chosen acceptably small value, ''x'' will be the value needed to obtain a <math display=inline>\Phi(x)</math> of the desired value, {{tmath|\Phi(\text{desired})}}. ==== Standard deviation and coverage ==== {{Further|Interval estimation|Coverage probability}} [[File:Standard deviation diagram.svg|thumb|350px|For the normal distribution, the values less than one standard deviation from the mean account for 68.27% of the set; while two standard deviations from the mean account for 95.45%; and three standard deviations account for 99.73%.]] About 68% of values drawn from a normal distribution are within one standard deviation ''Ο'' from the mean; about 95% of the values lie within two standard deviations; and about 99.7% are within three standard deviations.<ref name="www.mathsisfun.com" /> This fact is known as the [[68β95β99.7 rule|68β95β99.7 (empirical) rule]], or the ''3-sigma rule''. More precisely, the probability that a normal deviate lies in the range between <math display=inline>\mu-n\sigma</math> and <math display=inline>\mu+n\sigma</math> is given by <math display=block> F(\mu+n\sigma) - F(\mu-n\sigma) = \Phi(n)-\Phi(-n) = \operatorname{erf} \left(\frac{n}{\sqrt{2}}\right). </math> To 12 significant digits, the values for <math display=inline>n=1,2,\ldots , 6</math> are: {| class="wikitable" style="text-align:center;margin-left:24pt" |- ! {{tmath|n}} !! <math display=inline>p= F(\mu+n\sigma) - F(\mu-n\sigma)</math> !! <math display=inline>1-p</math>!! <math display=inline>\text{or }1\text{ in }(1-p)</math> !! [[OEIS]] |- |1 || {{val|0.682689492137}} || {{val|0.317310507863}} || {| cellpadding="0" cellspacing="0" style="width: 16em;" | style="text-align: right; width: 7em;" | {{val|3}} || style="text-align: left; width: 9em;" | {{#invoke:Gapnum|main|.15148718753}} |} || {{OEIS2C|A178647}} |- |2 || {{val|0.954499736104}} || {{val|0.045500263896}} || {| cellpadding="0" cellspacing="0" style="width: 16em;" | style="text-align: right; width: 7em;" | {{val|21}} || style="text-align: left; width: 9em;" | {{#invoke:Gapnum|main|.9778945080}} |} || {{OEIS2C|A110894}} |- |3 || {{val|0.997300203937}} || {{val|0.002699796063}} || {| cellpadding="0" cellspacing="0" style="width: 16em;" | style="text-align: right; width: 7em;" | {{val|370}} || style="text-align: left; width: 9em;" | {{#invoke:Gapnum|main|.398347345}} |} || {{OEIS2C|A270712}} |- |4 || {{val|0.999936657516}} || {{val|0.000063342484}} || {| cellpadding="0" cellspacing="0" style="width: 16em;" | style="text-align: right; width: 7em;" | {{val|15787}} || style="text-align: left; width: 9em;" | {{#invoke:Gapnum|main|.1927673}} |} |- |5 || {{val|0.999999426697}} || {{val|0.000000573303}} || {| cellpadding="0" cellspacing="0" style="width: 16em;" | style="text-align: right; width: 7em;" | {{val|1744277}} || style="text-align: left; width: 9em;" | {{#invoke:Gapnum|main|.89362}} |} |- |6 || {{val|0.999999998027}} || {{val|0.000000001973}} || {| cellpadding="0" cellspacing="0" style="width: 16em;" | style="text-align: right; width: 7em;" | {{val|506797345}} || style="text-align: left; width: 9em;" | {{#invoke:Gapnum|main|.897}} |} |} For large {{tmath|n}}, one can use the approximation <math display=inline>1 - p \approx \frac{e^{-n^2/2}}{n\sqrt{\pi/2}}</math>. ==== Quantile function ==== {{Further|Quantile function#Normal distribution}} The [[quantile function]] of a distribution is the inverse of the cumulative distribution function. The quantile function of the standard normal distribution is called the [[probit function]], and can be expressed in terms of the inverse [[error function]]: <math display=block> \Phi^{-1}(p) = \sqrt2\operatorname{erf}^{-1}(2p - 1), \quad p\in(0,1). </math> For a normal random variable with mean {{tmath|\mu}} and variance <math display=inline>\sigma^2</math>, the quantile function is <math display=block> F^{-1}(p) = \mu + \sigma\Phi^{-1}(p) = \mu + \sigma\sqrt 2 \operatorname{erf}^{-1}(2p - 1), \quad p\in(0,1). </math> The [[quantile]] <math display=inline>\Phi^{-1}(p)</math> of the standard normal distribution is commonly denoted as {{tmath|z_p}}. These values are used in [[hypothesis testing]], construction of [[confidence interval]]s and [[QβQ plot]]s. A normal random variable {{tmath|X}} will exceed <math display=inline>\mu + z_p\sigma</math> with probability <math display=inline>1-p</math>, and will lie outside the interval <math display=inline>\mu \pm z_p\sigma</math> with probability {{tmath|2(1-p)}}. In particular, the quantile <math display=inline>z_{0.975}</math> is [[1.96]]; therefore a normal random variable will lie outside the interval <math display=inline>\mu \pm 1.96\sigma</math> in only 5% of cases. The following table gives the quantile <math display=inline>z_p</math> such that {{tmath|X}} will lie in the range <math display=inline>\mu \pm z_p\sigma</math> with a specified probability {{tmath|p}}. These values are useful to determine [[tolerance interval]] for [[Sample mean and sample covariance#Sample mean|sample averages]] and other statistical [[estimator]]s with normal (or [[asymptotic]]ally normal) distributions.<ref>{{Cite book |last=Vaart |first=A. W. van der |url=http://dx.doi.org/10.1017/cbo9780511802256 |title=Asymptotic Statistics |date=1998-10-13 |publisher=Cambridge University Press |doi=10.1017/cbo9780511802256 |isbn=978-0-511-80225-6}}</ref> The following table shows <math display=inline>\sqrt 2 \operatorname{erf}^{-1}(p)=\Phi^{-1}\left(\frac{p+1}{2}\right)</math>, not <math display=inline>\Phi^{-1}(p)</math> as defined above. {| class="wikitable" style="text-align:left;margin-left:24pt;border:none;" ! {{tmath|p}} !! <math display=inline>z_p</math> | rowspan="8" style="border:none;"| ! {{tmath|p}} !! <math display=inline>z_p</math> |- | 0.80 || {{val|1.281551565545}} || 0.999 || {{val|3.290526731492}} |- | 0.90 || {{val|1.644853626951}} || 0.9999 || {{val|3.890591886413}} |- | 0.95 || {{val|1.959963984540}} || 0.99999 || {{val|4.417173413469}} |- | 0.98 || {{val|2.326347874041}} || 0.999999 || {{val|4.891638475699}} |- | 0.99 || {{val|2.575829303549}} || 0.9999999 || {{val|5.326723886384}} |- | 0.995 || {{val|2.807033768344}} || 0.99999999 || {{val|5.730728868236}} |- | 0.998 || {{val|3.090232306168}} || 0.999999999 || {{val|6.109410204869}} |} For small {{tmath|p}}, the quantile function has the useful [[asymptotic expansion]] <math display=inline>\Phi^{-1}(p)=-\sqrt{\ln\frac{1}{p^2}-\ln\ln\frac{1}{p^2}-\ln(2\pi)}+\mathcal{o}(1).</math>{{citation needed|date=February 2023}}
Edit summary
(Briefly describe your changes)
By publishing changes, you agree to the
Terms of Use
, and you irrevocably agree to release your contribution under the
CC BY-SA 4.0 License
and the
GFDL
. You agree that a hyperlink or URL is sufficient attribution under the Creative Commons license.
Cancel
Editing help
(opens in new window)