HOME

TheInfoList



OR:

In
statistics Statistics (from German: '' Statistik'', "description of a state, a country") is the discipline that concerns the collection, organization, analysis, interpretation, and presentation of data. In applying statistics to a scientific, indust ...
, 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 e^ The parameter \mu is the mean or expectation of the distribution (and also its median 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. The variance 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: '' Statistik'', "description of a state, a country") is the discipline that concerns the collection, organization, analysis, interpretation, and presentation of data. In applying statistics to a scientific, indust ...
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 ar ...
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, 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 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 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. 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 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 wh ...
. The univariate probability distribution is generalized for vectors in the multivariate normal distribution and for matrices in the matrix normal distribution.


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 (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 ...
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, for example, once defined the standard normal as :\varphi(z) = \frac which has a variance of 1/2, and Stephen Stigler 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). 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 \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 of variables with multivariate normal distribution. 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 th ...
s of the distribution. Normal distributions form an exponential family with natural parameters \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 (CDF) of the standard normal distribution, usually denoted with the capital Greek letter \Phi ( phi), is the integral :\Phi(x) = \frac 1 \int_^x e^ \, dt The related error function \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 functions. However, many numerical approximations are known; see
below Below may refer to: *Earth * Ground (disambiguation) *Soil *Floor * Bottom (disambiguation) *Less than *Temperatures below freezing *Hell or underworld People with the surname *Ernst von Below (1863–1955), German World War I general *Fred Below ...
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 of the standard normal CDF \Phi has 2-fold rotational symmetry 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 symbolica ...
(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 antiderivat ...
into a series: :\Phi(x)=\frac + \frac\cdot e^ \left + \frac + \frac + \cdots + \frac + \cdots\right/math> where !! denotes the double factorial. An asymptotic expansion 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 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: : \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 th ...
\Phi^(p) of the standard normal distribution is commonly denoted as z_p. These values are used in hypothesis testing, construction of confidence intervals and Q–Q plots. 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; 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 for sample averages and other statistical estimators with normal (or asymptotically 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 \Phi^(p)=-\sqrt+\mathcal(1).


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.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 ...
s. 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. Such variables may be better described by other distributions, such as the log-normal distribution or the Pareto distribution. The value of the normal distribution 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 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 distributions 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 usual ...
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 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 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^\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 ...
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, 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. * 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, 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 irregula ...
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._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,_with_mean_0_and_standard_deviation_1/\sigma._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 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 ...
_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_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__cumulants_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 (statistician), Charles Stein, who first publ ...
_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_when_\sigma_=_0. However,_one_can_define_the_normal_distribution_with_zero_variance_as_a_ generalized_function;_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 argum ...
_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 ...
_with_ probability_density_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._A_function_with_two_ Lagrange_multipliers_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_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_statistics,_ scores,_and__estimators_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 ques ...
_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_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-squar ...
_\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 situ ...
_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 ser ...
s. This_theorem_can_also_be_used_to_justify_modeling_the_sum_of_many_uniform_noise_sources_as_ Gaussian_noise._See_ AWGN.


__Operations_and_functions_of_normal_variables_

The_ probability_density,_
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_function, 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-normal_distribution, log-normally:_. *_The_absolute_value_of_X_has_folded_normal_distribution:_._If_\mu_=_0_this_is_known_as_the_half-normal_distribution. *_The_absolute_value_of_normalized_residuals,_, ''X''_−_''μ'', /''σ'',_has_chi_distribution_with_one_degree_of_freedom:_, X_-_\mu, _/_\sigma_\sim_\chi_1. *_The_square_of_''X''/''σ''_has_the_noncentral_chi-squared_distribution_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_distribution, chi-squared. *_The_log_likelihood_of_a_normal_variable_x_is_simply_the_log_of_its__probability_density_function:_\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_distribution, chi-squared_variable. *_The_distribution_of_the_variable_''X''_restricted_to_an_interval_[''a'',_''b'']_is_called_the_truncated_normal_distribution. *_(''X''_−_''μ'')−2_has_a__Lévy_distribution_with_location_0_and_scale_''σ''−2.


_=_Operations_on_two_independent_normal_variables_

= *_If_X_1_and_X_2_are_two_independence_(probability_theory), independent_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,sum_of_normally_distributed_random_variables, [proof]_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. *_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_distribution, stable_(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#Independent_central-normal_distributions, product_distribution_with_density_function_f_Z(z)_=_\pi^_K_0(, z, )_where_K_0_is_the_Macdonald_function, modified_Bessel_function_of_the_second_kind._This_distribution_is_symmetric_around_zero,_unbounded_at_z_=_0,_and_has_the__characteristic_function__\phi_Z(t)_=_(1_+_t^2)^. *_Their_ratio_follows_the_standard__Cauchy_distribution:_X_1/_X_2_\sim_\operatorname(0,_1). *_Their_Euclidean_norm_\sqrt_has_the_Rayleigh_distribution.


__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-squar ...
_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_is_independent_from_the_sample__standard_deviation,_which_can_be_demonstrated_using_Basu's_theorem_or_Cochran's_theorem._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 situ ...
_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_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_distribution, 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_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_(probability), infinite_divisibility. 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_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_...
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'',_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-squar ...
_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,_for_normal_distributions_the_sample_mean_\textstyle\hat\mu_and_the_sample_variance_''s''2_are_independence_(probability_theory), independent,_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 situ ...
_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_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_th_...
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,_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,_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_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_σ2,_the_conjugate_prior_distribution_is_also_normally_distributed. This_can_be_shown_more_easily_by_rewriting_the_variance_as_the__precision,_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_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_σ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;_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._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_(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._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 ques ...
._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_Φ−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_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_independence_(probability_theory), independent._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-squar ...
_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,_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].html"_;"title="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_functions__1F_1_and_U. :\begin ___\operatorname\left[X^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._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,_with_mean_0_and_standard_deviation_1/\sigma._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_ 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__...
_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_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__cumulants_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_(statistician),_Charles_Stein,_who_first_publ_...
_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_when_\sigma_=_0. However,_one_can_define_the_normal_distribution_with_zero_variance_as_a_ generalized_function;_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 argum ...
_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 ...
_with_ probability_density_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._A_function_with_two_ Lagrange_multipliers_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_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_statistics,_ scores,_and__estimators_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 ques ...
_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_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-squar ...
_\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 situ ...
_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 ser ...
s. This_theorem_can_also_be_used_to_justify_modeling_the_sum_of_many_uniform_noise_sources_as_ Gaussian_noise._See_ AWGN.


__Operations_and_functions_of_normal_variables_

The_ probability_density,_
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_function, 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-normal_distribution, log-normally:_. *_The_absolute_value_of_X_has_folded_normal_distribution:_._If_\mu_=_0_this_is_known_as_the_half-normal_distribution. *_The_absolute_value_of_normalized_residuals,_, ''X''_−_''μ'', /''σ'',_has_chi_distribution_with_one_degree_of_freedom:_, X_-_\mu, _/_\sigma_\sim_\chi_1. *_The_square_of_''X''/''σ''_has_the_noncentral_chi-squared_distribution_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_distribution, chi-squared. *_The_log_likelihood_of_a_normal_variable_x_is_simply_the_log_of_its__probability_density_function:_\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_distribution, chi-squared_variable. *_The_distribution_of_the_variable_''X''_restricted_to_an_interval_[''a'',_''b'']_is_called_the_truncated_normal_distribution. *_(''X''_−_''μ'')−2_has_a__Lévy_distribution_with_location_0_and_scale_''σ''−2.


_=_Operations_on_two_independent_normal_variables_

= *_If_X_1_and_X_2_are_two_independence_(probability_theory), independent_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,sum_of_normally_distributed_random_variables, [proof]_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. *_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_distribution, stable_(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#Independent_central-normal_distributions, product_distribution_with_density_function_f_Z(z)_=_\pi^_K_0(, z, )_where_K_0_is_the_Macdonald_function, modified_Bessel_function_of_the_second_kind._This_distribution_is_symmetric_around_zero,_unbounded_at_z_=_0,_and_has_the__characteristic_function__\phi_Z(t)_=_(1_+_t^2)^. *_Their_ratio_follows_the_standard__Cauchy_distribution:_X_1/_X_2_\sim_\operatorname(0,_1). *_Their_Euclidean_norm_\sqrt_has_the_Rayleigh_distribution.


__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-squar ...
_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_is_independent_from_the_sample__standard_deviation,_which_can_be_demonstrated_using_Basu's_theorem_or_Cochran's_theorem._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 situ ...
_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_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_distribution, 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_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_(probability), infinite_divisibility. 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_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_...
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'',_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-squar ...
_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,_for_normal_distributions_the_sample_mean_\textstyle\hat\mu_and_the_sample_variance_''s''2_are_independence_(probability_theory), independent,_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 situ ...
_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_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_th_...
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,_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,_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_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_σ2,_the_conjugate_prior_distribution_is_also_normally_distributed. This_can_be_shown_more_easily_by_rewriting_the_variance_as_the__precision,_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_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_σ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;_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._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_(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._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 ques ...
._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_Φ−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_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_independence_(probability_theory), independent._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-squar ...
_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,_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_functions__1F_1_and_U. :\begin ___\operatorname\left[X^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._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,_with_mean_0_and_standard_deviation_1/\sigma._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_ 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__...
_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_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__cumulants_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_(statistician),_Charles_Stein,_who_first_publ_...
_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_when_\sigma_=_0. However,_one_can_define_the_normal_distribution_with_zero_variance_as_a_ generalized_function;_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 argum ...
_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 ...
_with_ probability_density_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._A_function_with_two_ Lagrange_multipliers_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_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_statistics,_ scores,_and__estimators_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 ques ...
_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_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-squar ...
_\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 situ ...
_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 ser ...
s. This_theorem_can_also_be_used_to_justify_modeling_the_sum_of_many_uniform_noise_sources_as_ Gaussian_noise._See_ AWGN.


__Operations_and_functions_of_normal_variables_

The_ probability_density,_
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_function, 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-normal_distribution, log-normally:_. *_The_absolute_value_of_X_has_folded_normal_distribution:_._If_\mu_=_0_this_is_known_as_the_half-normal_distribution. *_The_absolute_value_of_normalized_residuals,_, ''X''_−_''μ'', /''σ'',_has_chi_distribution_with_one_degree_of_freedom:_, X_-_\mu, _/_\sigma_\sim_\chi_1. *_The_square_of_''X''/''σ''_has_the_noncentral_chi-squared_distribution_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_distribution, chi-squared. *_The_log_likelihood_of_a_normal_variable_x_is_simply_the_log_of_its__probability_density_function:_\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_distribution, chi-squared_variable. *_The_distribution_of_the_variable_''X''_restricted_to_an_interval_[''a'',_''b'']_is_called_the_truncated_normal_distribution. *_(''X''_−_''μ'')−2_has_a__Lévy_distribution_with_location_0_and_scale_''σ''−2.


_=_Operations_on_two_independent_normal_variables_

= *_If_X_1_and_X_2_are_two_independence_(probability_theory), independent_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,sum_of_normally_distributed_random_variables, [proof]_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. *_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_distribution, stable_(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#Independent_central-normal_distributions, product_distribution_with_density_function_f_Z(z)_=_\pi^_K_0(, z, )_where_K_0_is_the_Macdonald_function, modified_Bessel_function_of_the_second_kind._This_distribution_is_symmetric_around_zero,_unbounded_at_z_=_0,_and_has_the__characteristic_function__\phi_Z(t)_=_(1_+_t^2)^. *_Their_ratio_follows_the_standard__Cauchy_distribution:_X_1/_X_2_\sim_\operatorname(0,_1). *_Their_Euclidean_norm_\sqrt_has_the_Rayleigh_distribution.


__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-squar ...
_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_is_independent_from_the_sample__standard_deviation,_which_can_be_demonstrated_using_Basu's_theorem_or_Cochran's_theorem._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 situ ...
_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_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_distribution, 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_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_(probability), infinite_divisibility. 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_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_...
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'',_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-squar ...
_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,_for_normal_distributions_the_sample_mean_\textstyle\hat\mu_and_the_sample_variance_''s''2_are_independence_(probability_theory), independent,_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 situ ...
_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_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_th_...
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,_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,_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_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_σ2,_the_conjugate_prior_distribution_is_also_normally_distributed. This_can_be_shown_more_easily_by_rewriting_the_variance_as_the__precision,_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_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_σ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;_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._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_(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._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 ques ...
._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_Φ−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_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_independence_(probability_theory), independent._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-squar ...
_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,_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].html"_;"title="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._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,_with_mean_0_and_standard_deviation_1/\sigma._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_ 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__...
_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_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__cumulants_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_(statistician),_Charles_Stein,_who_first_publ_...
_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_when_\sigma_=_0. However,_one_can_define_the_normal_distribution_with_zero_variance_as_a_ generalized_function;_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 argum ...
_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 ...
_with_ probability_density_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._A_function_with_two_ Lagrange_multipliers_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_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_statistics,_ scores,_and__estimators_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 ques ...
_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_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-squar ...
_\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 situ ...
_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 ser ...
s. This_theorem_can_also_be_used_to_justify_modeling_the_sum_of_many_uniform_noise_sources_as_ Gaussian_noise._See_ AWGN.


__Operations_and_functions_of_normal_variables_

The_ probability_density,_
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_function, 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-normal_distribution, log-normally:_. *_The_absolute_value_of_X_has_folded_normal_distribution:_._If_\mu_=_0_this_is_known_as_the_half-normal_distribution. *_The_absolute_value_of_normalized_residuals,_, ''X''_−_''μ'', /''σ'',_has_chi_distribution_with_one_degree_of_freedom:_, X_-_\mu, _/_\sigma_\sim_\chi_1. *_The_square_of_''X''/''σ''_has_the_noncentral_chi-squared_distribution_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_distribution, chi-squared. *_The_log_likelihood_of_a_normal_variable_x_is_simply_the_log_of_its__probability_density_function:_\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_distribution, chi-squared_variable. *_The_distribution_of_the_variable_''X''_restricted_to_an_interval_[''a'',_''b'']_is_called_the_truncated_normal_distribution. *_(''X''_−_''μ'')−2_has_a__Lévy_distribution_with_location_0_and_scale_''σ''−2.


_=_Operations_on_two_independent_normal_variables_

= *_If_X_1_and_X_2_are_two_independence_(probability_theory), independent_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,sum_of_normally_distributed_random_variables, [proof]_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. *_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_distribution, stable_(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#Independent_central-normal_distributions, product_distribution_with_density_function_f_Z(z)_=_\pi^_K_0(, z, )_where_K_0_is_the_Macdonald_function, modified_Bessel_function_of_the_second_kind._This_distribution_is_symmetric_around_zero,_unbounded_at_z_=_0,_and_has_the__characteristic_function__\phi_Z(t)_=_(1_+_t^2)^. *_Their_ratio_follows_the_standard__Cauchy_distribution:_X_1/_X_2_\sim_\operatorname(0,_1). *_Their_Euclidean_norm_\sqrt_has_the_Rayleigh_distribution.


__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-squar ...
_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_is_independent_from_the_sample__standard_deviation,_which_can_be_demonstrated_using_Basu's_theorem_or_Cochran's_theorem._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 situ ...
_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_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_distribution, 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_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_(probability), infinite_divisibility. 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_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_...
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'',_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-squar ...
_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,_for_normal_distributions_the_sample_mean_\textstyle\hat\mu_and_the_sample_variance_''s''2_are_independence_(probability_theory), independent,_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 situ ...
_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_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_th_...
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,_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,_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_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_σ2,_the_conjugate_prior_distribution_is_also_normally_distributed. This_can_be_shown_more_easily_by_rewriting_the_variance_as_the__precision,_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_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_σ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;_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._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_(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._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 ques ...
._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_Φ−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_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_independence_(probability_theory), independent._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-squar ...
_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,_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].html"_;"title="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_functions__1F_1_and_U. :\begin ___\operatorname\left[X^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[X_\mid_a 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._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_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._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_standard_deviation_1/\sigma._In_particular,_the_standard_normal_distribution_\varphi_is_an_Fourier_transform#Eigenfunctions, 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_(probability_theory), characteristic_function_\varphi_X(t)_of_that_variable,_which_is_defined_as_the_expected_value_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_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[e^]_=_\hat_f(it)_=_e^_e^ 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 Since_this_is_a_quadratic_polynomial_in_t,_only_the_first_two__cumulants_are_nonzero,_namely_the_mean \mu_and_the_variance \sigma^2.


__Stein_operator_and_class_

Within_Stein's_method_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_when_\sigma_=_0. However,_one_can_define_the_normal_distribution_with_zero_variance_as_a_ generalized_function;_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 argum ...
_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 ...
_with_ probability_density_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._A_function_with_two_ Lagrange_multipliers_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_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_statistics,_ scores,_and__estimators_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 ques ...
_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_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-squar ...
_\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 situ ...
_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 ser ...
s. This_theorem_can_also_be_used_to_justify_modeling_the_sum_of_many_uniform_noise_sources_as_ Gaussian_noise._See_ AWGN.


__Operations_and_functions_of_normal_variables_

The_ probability_density,_
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_function, 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-normal_distribution, log-normally:_. *_The_absolute_value_of_X_has_folded_normal_distribution:_._If_\mu_=_0_this_is_known_as_the_half-normal_distribution. *_The_absolute_value_of_normalized_residuals,_, ''X''_−_''μ'', /''σ'',_has_chi_distribution_with_one_degree_of_freedom:_, X_-_\mu, _/_\sigma_\sim_\chi_1. *_The_square_of_''X''/''σ''_has_the_noncentral_chi-squared_distribution_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_distribution, chi-squared. *_The_log_likelihood_of_a_normal_variable_x_is_simply_the_log_of_its__probability_density_function:_\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_distribution, chi-squared_variable. *_The_distribution_of_the_variable_''X''_restricted_to_an_interval_[''a'',_''b'']_is_called_the_truncated_normal_distribution. *_(''X''_−_''μ'')−2_has_a__Lévy_distribution_with_location_0_and_scale_''σ''−2.


_=_Operations_on_two_independent_normal_variables_

= *_If_X_1_and_X_2_are_two_independence_(probability_theory), independent_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,sum_of_normally_distributed_random_variables, [proof]_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. *_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_distribution, stable_(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#Independent_central-normal_distributions, product_distribution_with_density_function_f_Z(z)_=_\pi^_K_0(, z, )_where_K_0_is_the_Macdonald_function, modified_Bessel_function_of_the_second_kind._This_distribution_is_symmetric_around_zero,_unbounded_at_z_=_0,_and_has_the_characteristic_function_(probability_theory), characteristic_function__\phi_Z(t)_=_(1_+_t^2)^. *_Their_ratio_follows_the_standard__Cauchy_distribution:_X_1/_X_2_\sim_\operatorname(0,_1). *_Their_Euclidean_norm_\sqrt_has_the_Rayleigh_distribution.


__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-squar ...
_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_is_independent_from_the_sample__standard_deviation,_which_can_be_demonstrated_using_Basu's_theorem_or_Cochran's_theorem._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 situ ...
_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_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_distribution, 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_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_(probability), infinite_divisibility. 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_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_...
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'',_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-squar ...
_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,_for_normal_distributions_the_sample_mean_\textstyle\hat\mu_and_the_sample_variance_''s''2_are_independence_(probability_theory), independent,_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 situ ...
_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_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_th_...
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,_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,_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_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_σ2,_the_conjugate_prior_distribution_is_also_normally_distributed. This_can_be_shown_more_easily_by_rewriting_the_variance_as_the__precision,_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_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_σ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;_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._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_(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._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 ques ...
._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_Φ−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_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_independence_(probability_theory), independent._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-squar ...
_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,_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_functions__1F_1_and_U. :\begin ___\operatorname\left[X^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[X_\mid_a 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._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_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._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_standard_deviation_1/\sigma._In_particular,_the_standard_normal_distribution_\varphi_is_an_Fourier_transform#Eigenfunctions, 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_(probability_theory), characteristic_function_\varphi_X(t)_of_that_variable,_which_is_defined_as_the_expected_value_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_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[e^]_=_\hat_f(it)_=_e^_e^ 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 Since_this_is_a_quadratic_polynomial_in_t,_only_the_first_two__cumulants_are_nonzero,_namely_the_mean \mu_and_the_variance \sigma^2.


__Stein_operator_and_class_

Within_Stein's_method_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_when_\sigma_=_0. However,_one_can_define_the_normal_distribution_with_zero_variance_as_a_ generalized_function;_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 argum ...
_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 ...
_with_ probability_density_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._A_function_with_two_ Lagrange_multipliers_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_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_statistics,_ scores,_and__estimators_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 ques ...
_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_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-squar ...
_\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 situ ...
_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 ser ...
s. This_theorem_can_also_be_used_to_justify_modeling_the_sum_of_many_uniform_noise_sources_as_ Gaussian_noise._See_ AWGN.


__Operations_and_functions_of_normal_variables_

The_ probability_density,_
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_function, 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-normal_distribution, log-normally:_. *_The_absolute_value_of_X_has_folded_normal_distribution:_._If_\mu_=_0_this_is_known_as_the_half-normal_distribution. *_The_absolute_value_of_normalized_residuals,_, ''X''_−_''μ'', /''σ'',_has_chi_distribution_with_one_degree_of_freedom:_, X_-_\mu, _/_\sigma_\sim_\chi_1. *_The_square_of_''X''/''σ''_has_the_noncentral_chi-squared_distribution_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_distribution, chi-squared. *_The_log_likelihood_of_a_normal_variable_x_is_simply_the_log_of_its__probability_density_function:_\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_distribution, chi-squared_variable. *_The_distribution_of_the_variable_''X''_restricted_to_an_interval_[''a'',_''b'']_is_called_the_truncated_normal_distribution. *_(''X''_−_''μ'')−2_has_a__Lévy_distribution_with_location_0_and_scale_''σ''−2.


_=_Operations_on_two_independent_normal_variables_

= *_If_X_1_and_X_2_are_two_independence_(probability_theory), independent_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,sum_of_normally_distributed_random_variables, [proof]_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. *_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_distribution, stable_(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#Independent_central-normal_distributions, product_distribution_with_density_function_f_Z(z)_=_\pi^_K_0(, z, )_where_K_0_is_the_Macdonald_function, modified_Bessel_function_of_the_second_kind._This_distribution_is_symmetric_around_zero,_unbounded_at_z_=_0,_and_has_the_characteristic_function_(probability_theory), characteristic_function__\phi_Z(t)_=_(1_+_t^2)^. *_Their_ratio_follows_the_standard__Cauchy_distribution:_X_1/_X_2_\sim_\operatorname(0,_1). *_Their_Euclidean_norm_\sqrt_has_the_Rayleigh_distribution.


__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-squar ...
_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_is_independent_from_the_sample__standard_deviation,_which_can_be_demonstrated_using_Basu's_theorem_or_Cochran's_theorem._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 situ ...
_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_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_distribution, 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_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_(probability), infinite_divisibility. 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_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_...
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'',_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-squar ...
_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,_for_normal_distributions_the_sample_mean_\textstyle\hat\mu_and_the_sample_variance_''s''2_are_independence_(probability_theory), independent,_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 situ ...
_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_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_th_...
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,_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,_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_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_σ2,_the_conjugate_prior_distribution_is_also_normally_distributed. This_can_be_shown_more_easily_by_rewriting_the_variance_as_the__precision,_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_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_σ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;_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._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_(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._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 ques ...
._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_Φ−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_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_independence_(probability_theory), independent._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-squar ...
_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,_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._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,_with_mean_0_and_standard_deviation_1/\sigma._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_ 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__...
_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_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__cumulants_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_(statistician),_Charles_Stein,_who_first_publ_...
_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_when_\sigma_=_0. However,_one_can_define_the_normal_distribution_with_zero_variance_as_a_ generalized_function;_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 argum ...
_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 ...
_with_ probability_density_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._A_function_with_two_ Lagrange_multipliers_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_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_statistics,_ scores,_and__estimators_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 ques ...
_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_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-squar ...
_\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 situ ...
_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 ser ...
s. This_theorem_can_also_be_used_to_justify_modeling_the_sum_of_many_uniform_noise_sources_as_ Gaussian_noise._See_ AWGN.


__Operations_and_functions_of_normal_variables_

The_ probability_density,_
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_function, 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-normal_distribution, log-normally:_. *_The_absolute_value_of_X_has_folded_normal_distribution:_._If_\mu_=_0_this_is_known_as_the_half-normal_distribution. *_The_absolute_value_of_normalized_residuals,_, ''X''_−_''μ'', /''σ'',_has_chi_distribution_with_one_degree_of_freedom:_, X_-_\mu, _/_\sigma_\sim_\chi_1. *_The_square_of_''X''/''σ''_has_the_noncentral_chi-squared_distribution_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_distribution, chi-squared. *_The_log_likelihood_of_a_normal_variable_x_is_simply_the_log_of_its__probability_density_function:_\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_distribution, chi-squared_variable. *_The_distribution_of_the_variable_''X''_restricted_to_an_interval_[''a'',_''b'']_is_called_the_truncated_normal_distribution. *_(''X''_−_''μ'')−2_has_a__Lévy_distribution_with_location_0_and_scale_''σ''−2.


_=_Operations_on_two_independent_normal_variables_

= *_If_X_1_and_X_2_are_two_independence_(probability_theory), independent_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,sum_of_normally_distributed_random_variables, [proof]_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. *_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_distribution, stable_(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#Independent_central-normal_distributions, product_distribution_with_density_function_f_Z(z)_=_\pi^_K_0(, z, )_where_K_0_is_the_Macdonald_function, modified_Bessel_function_of_the_second_kind._This_distribution_is_symmetric_around_zero,_unbounded_at_z_=_0,_and_has_the__characteristic_function__\phi_Z(t)_=_(1_+_t^2)^. *_Their_ratio_follows_the_standard__Cauchy_distribution:_X_1/_X_2_\sim_\operatorname(0,_1). *_Their_Euclidean_norm_\sqrt_has_the_Rayleigh_distribution.


__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-squar ...
_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_is_independent_from_the_sample__standard_deviation,_which_can_be_demonstrated_using_Basu's_theorem_or_Cochran's_theorem._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 situ ...
_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_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_distribution, 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_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_(probability), infinite_divisibility. 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_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_...
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'',_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-squar ...
_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,_for_normal_distributions_the_sample_mean_\textstyle\hat\mu_and_the_sample_variance_''s''2_are_independence_(probability_theory), independent,_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 situ ...
_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_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_th_...
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,_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,_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_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_σ2,_the_conjugate_prior_distribution_is_also_normally_distributed. This_can_be_shown_more_easily_by_rewriting_the_variance_as_the__precision,_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_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_σ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;_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._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_(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._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 ques ...
._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_Φ−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_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_independence_(probability_theory), independent._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-squar ...
_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,_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].html"_;"title="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_functions__1F_1_and_U. :\begin ___\operatorname\left[X^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[X_\mid_a 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._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_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._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_standard_deviation_1/\sigma._In_particular,_the_standard_normal_distribution_\varphi_is_an_Fourier_transform#Eigenfunctions, 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_(probability_theory), characteristic_function_\varphi_X(t)_of_that_variable,_which_is_defined_as_the_expected_value_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_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[e^]_=_\hat_f(it)_=_e^_e^ 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 Since_this_is_a_quadratic_polynomial_in_t,_only_the_first_two__cumulants_are_nonzero,_namely_the_mean \mu_and_the_variance \sigma^2.


__Stein_operator_and_class_

Within_Stein's_method_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_when_\sigma_=_0. However,_one_can_define_the_normal_distribution_with_zero_variance_as_a_ generalized_function;_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 argum ...
_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 ...
_with_ probability_density_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._A_function_with_two_ Lagrange_multipliers_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_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_statistics,_ scores,_and__estimators_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 ques ...
_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_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-squar ...
_\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 situ ...
_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 ser ...
s. This_theorem_can_also_be_used_to_justify_modeling_the_sum_of_many_uniform_noise_sources_as_ Gaussian_noise._See_ AWGN.


__Operations_and_functions_of_normal_variables_

The_ probability_density,_
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_function, 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-normal_distribution, log-normally:_. *_The_absolute_value_of_X_has_folded_normal_distribution:_._If_\mu_=_0_this_is_known_as_the_half-normal_distribution. *_The_absolute_value_of_normalized_residuals,_, ''X''_−_''μ'', /''σ'',_has_chi_distribution_with_one_degree_of_freedom:_, X_-_\mu, _/_\sigma_\sim_\chi_1. *_The_square_of_''X''/''σ''_has_the_noncentral_chi-squared_distribution_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_distribution, chi-squared. *_The_log_likelihood_of_a_normal_variable_x_is_simply_the_log_of_its__probability_density_function:_\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_distribution, chi-squared_variable. *_The_distribution_of_the_variable_''X''_restricted_to_an_interval_[''a'',_''b'']_is_called_the_truncated_normal_distribution. *_(''X''_−_''μ'')−2_has_a__Lévy_distribution_with_location_0_and_scale_''σ''−2.


_=_Operations_on_two_independent_normal_variables_

= *_If_X_1_and_X_2_are_two_independence_(probability_theory), independent_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,sum_of_normally_distributed_random_variables, [proof]_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. *_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_distribution, stable_(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#Independent_central-normal_distributions, product_distribution_with_density_function_f_Z(z)_=_\pi^_K_0(, z, )_where_K_0_is_the_Macdonald_function, modified_Bessel_function_of_the_second_kind._This_distribution_is_symmetric_around_zero,_unbounded_at_z_=_0,_and_has_the_characteristic_function_(probability_theory), characteristic_function__\phi_Z(t)_=_(1_+_t^2)^. *_Their_ratio_follows_the_standard__Cauchy_distribution:_X_1/_X_2_\sim_\operatorname(0,_1). *_Their_Euclidean_norm_\sqrt_has_the_Rayleigh_distribution.


__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-squar ...
_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_is_independent_from_the_sample__standard_deviation,_which_can_be_demonstrated_using_Basu's_theorem_or_Cochran's_theorem._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 situ ...
_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_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_distribution, 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_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_(probability), infinite_divisibility. 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_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_...
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'',_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-squar ...
_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,_for_normal_distributions_the_sample_mean_\textstyle\hat\mu_and_the_sample_variance_''s''2_are_independence_(probability_theory), independent,_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 situ ...
_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_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_th_...
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,_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,_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_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_σ2,_the_conjugate_prior_distribution_is_also_normally_distributed. This_can_be_shown_more_easily_by_rewriting_the_variance_as_the__precision,_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_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_σ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;_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._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_(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._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 ques ...
._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_Φ−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_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_independence_(probability_theory), independent._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-squar ...
_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,_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_functions__1F_1_and_U. :\begin ___\operatorname\left[X^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[X_\mid_a 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._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_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._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_standard_deviation_1/\sigma._In_particular,_the_standard_normal_distribution_\varphi_is_an_Fourier_transform#Eigenfunctions, 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_(probability_theory), characteristic_function_\varphi_X(t)_of_that_variable,_which_is_defined_as_the_expected_value_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_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[e^]_=_\hat_f(it)_=_e^_e^ 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 Since_this_is_a_quadratic_polynomial_in_t,_only_the_first_two__cumulants_are_nonzero,_namely_the_mean \mu_and_the_variance \sigma^2.


__Stein_operator_and_class_

Within_Stein's_method_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_when_\sigma_=_0. However,_one_can_define_the_normal_distribution_with_zero_variance_as_a_ generalized_function;_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 argum ...
_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 ...
_with_ probability_density_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._A_function_with_two_ Lagrange_multipliers_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_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_statistics,_ scores,_and__estimators_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 ques ...
_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_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-squar ...
_\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 situ ...
_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 ser ...
s. This_theorem_can_also_be_used_to_justify_modeling_the_sum_of_many_uniform_noise_sources_as_ Gaussian_noise._See_ AWGN.


__Operations_and_functions_of_normal_variables_

The_ probability_density,_
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_function, 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-normal_distribution, log-normally:_. *_The_absolute_value_of_X_has_folded_normal_distribution:_._If_\mu_=_0_this_is_known_as_the_half-normal_distribution. *_The_absolute_value_of_normalized_residuals,_, ''X''_−_''μ'', /''σ'',_has_chi_distribution_with_one_degree_of_freedom:_, X_-_\mu, _/_\sigma_\sim_\chi_1. *_The_square_of_''X''/''σ''_has_the_noncentral_chi-squared_distribution_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_distribution, chi-squared. *_The_log_likelihood_of_a_normal_variable_x_is_simply_the_log_of_its__probability_density_function:_\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_distribution, chi-squared_variable. *_The_distribution_of_the_variable_''X''_restricted_to_an_interval_[''a'',_''b'']_is_called_the_truncated_normal_distribution. *_(''X''_−_''μ'')−2_has_a__Lévy_distribution_with_location_0_and_scale_''σ''−2.


_=_Operations_on_two_independent_normal_variables_

= *_If_X_1_and_X_2_are_two_independence_(probability_theory), independent_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,sum_of_normally_distributed_random_variables, [proof]_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. *_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_distribution, stable_(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#Independent_central-normal_distributions, product_distribution_with_density_function_f_Z(z)_=_\pi^_K_0(, z, )_where_K_0_is_the_Macdonald_function, modified_Bessel_function_of_the_second_kind._This_distribution_is_symmetric_around_zero,_unbounded_at_z_=_0,_and_has_the_characteristic_function_(probability_theory), characteristic_function__\phi_Z(t)_=_(1_+_t^2)^. *_Their_ratio_follows_the_standard__Cauchy_distribution:_X_1/_X_2_\sim_\operatorname(0,_1). *_Their_Euclidean_norm_\sqrt_has_the_Rayleigh_distribution.


__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-squar ...
_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_is_independent_from_the_sample__standard_deviation,_which_can_be_demonstrated_using_Basu's_theorem_or_Cochran's_theorem._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 situ ...
_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_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_distribution, 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_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_(probability), infinite_divisibility. 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_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_...
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'',_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-squar ...
_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,_for_normal_distributions_the_sample_mean_\textstyle\hat\mu_and_the_sample_variance_''s''2_are_independence_(probability_theory), independent,_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 situ ...
_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_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_th_...
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,_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,_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_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_σ2,_the_conjugate_prior_distribution_is_also_normally_distributed. This_can_be_shown_more_easily_by_rewriting_the_variance_as_the__precision,_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_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_σ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;_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._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_(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._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 ques ...
._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_Φ−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_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_independence_(probability_theory), independent._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-squar ...
_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,_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].html" ;"title="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_when_\sigma_=_0. However,_one_can_define_the_normal_distribution_with_zero_variance_as_a_ generalized_function;_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 argum ...
_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 ...
_with_ probability_density_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._A_function_with_two_ Lagrange_multipliers_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_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_statistics,_ scores,_and__estimators_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 ques ...
_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_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-squar ...
_\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 situ ...
_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 ser ...
s. This_theorem_can_also_be_used_to_justify_modeling_the_sum_of_many_uniform_noise_sources_as_ Gaussian_noise._See_ AWGN.


__Operations_and_functions_of_normal_variables_

The_ probability_density,_
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_function, 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-normal_distribution, log-normally:_. *_The_absolute_value_of_X_has_folded_normal_distribution:_._If_\mu_=_0_this_is_known_as_the_half-normal_distribution. *_The_absolute_value_of_normalized_residuals,_, ''X''_−_''μ'', /''σ'',_has_chi_distribution_with_one_degree_of_freedom:_, X_-_\mu, _/_\sigma_\sim_\chi_1. *_The_square_of_''X''/''σ''_has_the_noncentral_chi-squared_distribution_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_distribution, chi-squared. *_The_log_likelihood_of_a_normal_variable_x_is_simply_the_log_of_its__probability_density_function:_\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_distribution, chi-squared_variable. *_The_distribution_of_the_variable_''X''_restricted_to_an_interval_[''a'',_''b'']_is_called_the_truncated_normal_distribution. *_(''X''_−_''μ'')−2_has_a__Lévy_distribution_with_location_0_and_scale_''σ''−2.


_=_Operations_on_two_independent_normal_variables_

= *_If_X_1_and_X_2_are_two_independence_(probability_theory), independent_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,sum_of_normally_distributed_random_variables, [proof]_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. *_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_distribution, stable_(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#Independent_central-normal_distributions, product_distribution_with_density_function_f_Z(z)_=_\pi^_K_0(, z, )_where_K_0_is_the_Macdonald_function, modified_Bessel_function_of_the_second_kind._This_distribution_is_symmetric_around_zero,_unbounded_at_z_=_0,_and_has_the_ characteristic_function__\phi_Z(t)_=_(1_+_t^2)^. *_Their_ratio_follows_the_standard__Cauchy_distribution:_X_1/_X_2_\sim_\operatorname(0,_1). *_Their_Euclidean_norm_\sqrt_has_the_Rayleigh_distribution.


__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-squar ...
_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_is_independent_from_the_sample__standard_deviation,_which_can_be_demonstrated_using_Basu's_theorem_or_Cochran's_theorem._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 situ ...
_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_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_distribution, 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_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_(probability), infinite_divisibility. 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_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_...
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'',_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-squar ...
_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,_for_normal_distributions_the_sample_mean_\textstyle\hat\mu_and_the_sample_variance_''s''2_are_independence_(probability_theory), independent,_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 situ ...
_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_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_th_...
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,_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,_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_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_σ2,_the_conjugate_prior_distribution_is_also_normally_distributed. This_can_be_shown_more_easily_by_rewriting_the_variance_as_the__precision,_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_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_σ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;_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._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_(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._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 ques ...
._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_Φ−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_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_independence_(probability_theory), independent._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-squar ...
_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,_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].html"_;"title="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_functions__1F_1_and_U. :\begin ___\operatorname\left[X^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._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,_with_mean_0_and_standard_deviation_1/\sigma._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 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 ...
_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_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__cumulants_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 (statistician), Charles Stein, who first publ ...
_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_when_\sigma_=_0. However,_one_can_define_the_normal_distribution_with_zero_variance_as_a_ generalized_function;_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 argum ...
_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 ...
_with_ probability_density_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._A_function_with_two_ Lagrange_multipliers_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_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_statistics,_ scores,_and__estimators_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 ques ...
_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_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-squar ...
_\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 situ ...
_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 ser ...
s. This_theorem_can_also_be_used_to_justify_modeling_the_sum_of_many_uniform_noise_sources_as_ Gaussian_noise._See_ AWGN.


__Operations_and_functions_of_normal_variables_

The_ probability_density,_
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_function, 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-normal_distribution, log-normally:_. *_The_absolute_value_of_X_has_folded_normal_distribution:_._If_\mu_=_0_this_is_known_as_the_half-normal_distribution. *_The_absolute_value_of_normalized_residuals,_, ''X''_−_''μ'', /''σ'',_has_chi_distribution_with_one_degree_of_freedom:_, X_-_\mu, _/_\sigma_\sim_\chi_1. *_The_square_of_''X''/''σ''_has_the_noncentral_chi-squared_distribution_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_distribution, chi-squared. *_The_log_likelihood_of_a_normal_variable_x_is_simply_the_log_of_its__probability_density_function:_\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_distribution, chi-squared_variable. *_The_distribution_of_the_variable_''X''_restricted_to_an_interval_[''a'',_''b'']_is_called_the_truncated_normal_distribution. *_(''X''_−_''μ'')−2_has_a__Lévy_distribution_with_location_0_and_scale_''σ''−2.


_=_Operations_on_two_independent_normal_variables_

= *_If_X_1_and_X_2_are_two_independence_(probability_theory), independent_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,sum_of_normally_distributed_random_variables, [proof]_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. *_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_distribution, stable_(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#Independent_central-normal_distributions, product_distribution_with_density_function_f_Z(z)_=_\pi^_K_0(, z, )_where_K_0_is_the_Macdonald_function, modified_Bessel_function_of_the_second_kind._This_distribution_is_symmetric_around_zero,_unbounded_at_z_=_0,_and_has_the_ characteristic_function__\phi_Z(t)_=_(1_+_t^2)^. *_Their_ratio_follows_the_standard__Cauchy_distribution:_X_1/_X_2_\sim_\operatorname(0,_1). *_Their_Euclidean_norm_\sqrt_has_the_Rayleigh_distribution.


__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-squar ...
_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_is_independent_from_the_sample__standard_deviation,_which_can_be_demonstrated_using_Basu's_theorem_or_Cochran's_theorem._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 situ ...
_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_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_distribution, 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_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_(probability), infinite_divisibility. 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_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_...
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'',_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-squar ...
_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,_for_normal_distributions_the_sample_mean_\textstyle\hat\mu_and_the_sample_variance_''s''2_are_independence_(probability_theory), independent,_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 situ ...
_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_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_th_...
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,_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,_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_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_σ2,_the_conjugate_prior_distribution_is_also_normally_distributed. This_can_be_shown_more_easily_by_rewriting_the_variance_as_the__precision,_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_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_σ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;_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._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_(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._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 ques ...
._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_Φ−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_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_independence_(probability_theory), independent._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-squar ...
_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,_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_functions__1F_1_and_U. :\begin ___\operatorname\left[X^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._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,_with_mean_0_and_standard_deviation_1/\sigma._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 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 ...
_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_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__cumulants_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 (statistician), Charles Stein, who first publ ...
_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_when_\sigma_=_0. However,_one_can_define_the_normal_distribution_with_zero_variance_as_a_ generalized_function;_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 argum ...
_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 ...
_with_ probability_density_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._A_function_with_two_ Lagrange_multipliers_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_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_statistics,_ scores,_and__estimators_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 ques ...
_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_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-squar ...
_\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 situ ...
_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 ser ...
s. This_theorem_can_also_be_used_to_justify_modeling_the_sum_of_many_uniform_noise_sources_as_ Gaussian_noise._See_ AWGN.


__Operations_and_functions_of_normal_variables_

The_ probability_density,_
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_function, 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-normal_distribution, log-normally:_. *_The_absolute_value_of_X_has_folded_normal_distribution:_._If_\mu_=_0_this_is_known_as_the_half-normal_distribution. *_The_absolute_value_of_normalized_residuals,_, ''X''_−_''μ'', /''σ'',_has_chi_distribution_with_one_degree_of_freedom:_, X_-_\mu, _/_\sigma_\sim_\chi_1. *_The_square_of_''X''/''σ''_has_the_noncentral_chi-squared_distribution_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_distribution, chi-squared. *_The_log_likelihood_of_a_normal_variable_x_is_simply_the_log_of_its__probability_density_function:_\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_distribution, chi-squared_variable. *_The_distribution_of_the_variable_''X''_restricted_to_an_interval_[''a'',_''b'']_is_called_the_truncated_normal_distribution. *_(''X''_−_''μ'')−2_has_a__Lévy_distribution_with_location_0_and_scale_''σ''−2.


_=_Operations_on_two_independent_normal_variables_

= *_If_X_1_and_X_2_are_two_independence_(probability_theory), independent_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,sum_of_normally_distributed_random_variables, [proof]_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. *_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_distribution, stable_(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#Independent_central-normal_distributions, product_distribution_with_density_function_f_Z(z)_=_\pi^_K_0(, z, )_where_K_0_is_the_Macdonald_function, modified_Bessel_function_of_the_second_kind._This_distribution_is_symmetric_around_zero,_unbounded_at_z_=_0,_and_has_the_ characteristic_function__\phi_Z(t)_=_(1_+_t^2)^. *_Their_ratio_follows_the_standard__Cauchy_distribution:_X_1/_X_2_\sim_\operatorname(0,_1). *_Their_Euclidean_norm_\sqrt_has_the_Rayleigh_distribution.


__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-squar ...
_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_is_independent_from_the_sample__standard_deviation,_which_can_be_demonstrated_using_Basu's_theorem_or_Cochran's_theorem._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 situ ...
_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_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_distribution, 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_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_(probability), infinite_divisibility. 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_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_...
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'',_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-squar ...
_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,_for_normal_distributions_the_sample_mean_\textstyle\hat\mu_and_the_sample_variance_''s''2_are_independence_(probability_theory), independent,_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 situ ...
_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_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_th_...
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,_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,_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_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_σ2,_the_conjugate_prior_distribution_is_also_normally_distributed. This_can_be_shown_more_easily_by_rewriting_the_variance_as_the__precision,_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_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_σ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;_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._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_(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._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 ques ...
._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_Φ−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_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_independence_(probability_theory), independent._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-squar ...
_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,_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].html" ;"title="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._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,_with_mean_0_and_standard_deviation_1/\sigma._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 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 ...
_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_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__cumulants_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 (statistician), Charles Stein, who first publ ...
_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_when_\sigma_=_0. However,_one_can_define_the_normal_distribution_with_zero_variance_as_a_ generalized_function;_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 argum ...
_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 ...
_with_ probability_density_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._A_function_with_two_ Lagrange_multipliers_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_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_statistics,_ scores,_and__estimators_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 ques ...
_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_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-squar ...
_\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 situ ...
_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 ser ...
s. This_theorem_can_also_be_used_to_justify_modeling_the_sum_of_many_uniform_noise_sources_as_ Gaussian_noise._See_ AWGN.


__Operations_and_functions_of_normal_variables_

The_ probability_density,_
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_function, 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-normal_distribution, log-normally:_. *_The_absolute_value_of_X_has_folded_normal_distribution:_._If_\mu_=_0_this_is_known_as_the_half-normal_distribution. *_The_absolute_value_of_normalized_residuals,_, ''X''_−_''μ'', /''σ'',_has_chi_distribution_with_one_degree_of_freedom:_, X_-_\mu, _/_\sigma_\sim_\chi_1. *_The_square_of_''X''/''σ''_has_the_noncentral_chi-squared_distribution_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_distribution, chi-squared. *_The_log_likelihood_of_a_normal_variable_x_is_simply_the_log_of_its__probability_density_function:_\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_distribution, chi-squared_variable. *_The_distribution_of_the_variable_''X''_restricted_to_an_interval_[''a'',_''b'']_is_called_the_truncated_normal_distribution. *_(''X''_−_''μ'')−2_has_a__Lévy_distribution_with_location_0_and_scale_''σ''−2.


_=_Operations_on_two_independent_normal_variables_

= *_If_X_1_and_X_2_are_two_independence_(probability_theory), independent_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,sum_of_normally_distributed_random_variables, [proof]_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. *_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_distribution, stable_(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#Independent_central-normal_distributions, product_distribution_with_density_function_f_Z(z)_=_\pi^_K_0(, z, )_where_K_0_is_the_Macdonald_function, modified_Bessel_function_of_the_second_kind._This_distribution_is_symmetric_around_zero,_unbounded_at_z_=_0,_and_has_the_ characteristic_function__\phi_Z(t)_=_(1_+_t^2)^. *_Their_ratio_follows_the_standard__Cauchy_distribution:_X_1/_X_2_\sim_\operatorname(0,_1). *_Their_Euclidean_norm_\sqrt_has_the_Rayleigh_distribution.


__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-squar ...
_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_is_independent_from_the_sample__standard_deviation,_which_can_be_demonstrated_using_Basu's_theorem_or_Cochran's_theorem._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 situ ...
_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_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_distribution, 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_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_(probability), infinite_divisibility. 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_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_...
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'',_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-squar ...
_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,_for_normal_distributions_the_sample_mean_\textstyle\hat\mu_and_the_sample_variance_''s''2_are_independence_(probability_theory), independent,_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 situ ...
_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_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_th_...
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,_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,_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_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_σ2,_the_conjugate_prior_distribution_is_also_normally_distributed. This_can_be_shown_more_easily_by_rewriting_the_variance_as_the__precision,_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_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_σ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;_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._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_(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._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 ques ...
._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_Φ−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_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_independence_(probability_theory), independent._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-squar ...
_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,_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].html" ;"title="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 functions _1F_1 and U. :\begin \operatorname\left[X^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[X \mid a 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. 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 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. 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 standard deviation 1/\sigma. In particular, the standard normal distribution \varphi is an Fourier transform#Eigenfunctions, 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 (probability theory), characteristic function \varphi_X(t) of that variable, which is defined as the expected value 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 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[e^] = \hat f(it) = e^ e^ 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 Since this is a quadratic polynomial in t, only the first two cumulants are nonzero, namely the mean \mu and the variance \sigma^2.


Stein operator and class

Within Stein's method 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 (mathematics), function when \sigma = 0. However, one can define the normal distribution with zero variance as a generalized function; specifically, as Dirac delta function, 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 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 probability distribution, maximum entropy. If X is a continuous random variable with probability density function, probability density 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. A function with two Lagrange multipliers 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 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 statistics, score (statistics), scores, and estimators 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 function (statistics), 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 B(n,p) is De Moivre–Laplace theorem, 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 with parameter \lambda is approximately normal with mean \lambda and variance \lambda, for large values of \lambda. * The chi-squared distribution \chi^2(k) is approximately normal with mean k and variance 2k, for large k. * The Student's t-distribution 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, improvements of the approximation are given by the Edgeworth expansions. This theorem can also be used to justify modeling the sum of many uniform noise sources as Gaussian noise. See AWGN.


Operations and functions of normal variables

The probability density function, probability density, cumulative distribution function, cumulative distribution, and inverse cumulative distribution function, 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-normal distribution, log-normally: . * The absolute value of X has folded normal distribution: . If \mu = 0 this is known as the half-normal distribution. * The absolute value of normalized residuals, , ''X'' − ''μ'', /''σ'', has chi distribution with one degree of freedom: , X - \mu, / \sigma \sim \chi_1. * The square of ''X''/''σ'' has the noncentral chi-squared distribution 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 distribution, chi-squared. * The log likelihood of a normal variable x is simply the log of its probability density function: \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 distribution, chi-squared variable. * The distribution of the variable ''X'' restricted to an interval [''a'', ''b''] is called the truncated normal distribution. * (''X'' − ''μ'')−2 has a Lévy distribution with location 0 and scale ''σ''−2.


= Operations on two independent normal variables

= * If X_1 and X_2 are two independence (probability theory), independent 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,sum of normally distributed random variables, [proof] 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. * 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 distribution, stable (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#Independent central-normal distributions, product distribution with density function f_Z(z) = \pi^ K_0(, z, ) where K_0 is the Macdonald function, modified Bessel function of the second kind. This distribution is symmetric around zero, unbounded at z = 0, and has the characteristic function (probability theory), characteristic function \phi_Z(t) = (1 + t^2)^. * Their ratio follows the standard Cauchy distribution: X_1/ X_2 \sim \operatorname(0, 1). * Their Euclidean norm \sqrt has the Rayleigh distribution.


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 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 is independent from the sample standard deviation, which can be demonstrated using Basu's theorem or Cochran's theorem. The ratio of these two quantities will have the Student's t-distribution 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 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 distribution, 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 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 (probability), infinite divisibility. 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 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 ...
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'', 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 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, for normal distributions the sample mean \textstyle\hat\mu and the sample variance ''s''2 are independence (probability theory), independent, 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 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 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 th ...
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, 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, 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 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 σ2, the conjugate prior distribution is also normally distributed. This can be shown more easily by rewriting the variance as the precision, 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 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 σ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; 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. 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 (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. 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. 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 Φ−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 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 independence (probability theory), independent. This formulation arises because for a bivariate normal random vector (''X'', ''Y'') the squared norm will have the chi-squared distribution 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, 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 functions _1F_1 and U. :\begin \operatorname\left[X^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[X \mid a 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. 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 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. 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 standard deviation 1/\sigma. In particular, the standard normal distribution \varphi is an Fourier transform#Eigenfunctions, 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 (probability theory), characteristic function \varphi_X(t) of that variable, which is defined as the expected value 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 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[e^] = \hat f(it) = e^ e^ 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 Since this is a quadratic polynomial in t, only the first two cumulants are nonzero, namely the mean \mu and the variance \sigma^2.


Stein operator and class

Within Stein's method 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 (mathematics), function when \sigma = 0. However, one can define the normal distribution with zero variance as a generalized function; specifically, as Dirac delta function, 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 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 probability distribution, maximum entropy. If X is a continuous random variable with probability density function, probability density 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. A function with two Lagrange multipliers 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 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 statistics, score (statistics), scores, and estimators 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 function (statistics), 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 B(n,p) is De Moivre–Laplace theorem, 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 with parameter \lambda is approximately normal with mean \lambda and variance \lambda, for large values of \lambda. * The chi-squared distribution \chi^2(k) is approximately normal with mean k and variance 2k, for large k. * The Student's t-distribution 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, improvements of the approximation are given by the Edgeworth expansions. This theorem can also be used to justify modeling the sum of many uniform noise sources as Gaussian noise. See AWGN.


Operations and functions of normal variables

The probability density function, probability density, cumulative distribution function, cumulative distribution, and inverse cumulative distribution function, 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-normal distribution, log-normally: . * The absolute value of X has folded normal distribution: . If \mu = 0 this is known as the half-normal distribution. * The absolute value of normalized residuals, , ''X'' − ''μ'', /''σ'', has chi distribution with one degree of freedom: , X - \mu, / \sigma \sim \chi_1. * The square of ''X''/''σ'' has the noncentral chi-squared distribution 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 distribution, chi-squared. * The log likelihood of a normal variable x is simply the log of its probability density function: \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 distribution, chi-squared variable. * The distribution of the variable ''X'' restricted to an interval [''a'', ''b''] is called the truncated normal distribution. * (''X'' − ''μ'')−2 has a Lévy distribution with location 0 and scale ''σ''−2.


= Operations on two independent normal variables

= * If X_1 and X_2 are two independence (probability theory), independent 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,sum of normally distributed random variables, [proof] 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. * 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 distribution, stable (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#Independent central-normal distributions, product distribution with density function f_Z(z) = \pi^ K_0(, z, ) where K_0 is the Macdonald function, modified Bessel function of the second kind. This distribution is symmetric around zero, unbounded at z = 0, and has the characteristic function (probability theory), characteristic function \phi_Z(t) = (1 + t^2)^. * Their ratio follows the standard Cauchy distribution: X_1/ X_2 \sim \operatorname(0, 1). * Their Euclidean norm \sqrt has the Rayleigh distribution.


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 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 is independent from the sample standard deviation, which can be demonstrated using Basu's theorem or Cochran's theorem. The ratio of these two quantities will have the Student's t-distribution 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 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 distribution, 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 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 (probability), infinite divisibility. 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 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 ...
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'', 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 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, for normal distributions the sample mean \textstyle\hat\mu and the sample variance ''s''2 are independence (probability theory), independent, 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 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 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 th ...
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, 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, 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 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 σ2, the conjugate prior distribution is also normally distributed. This can be shown more easily by rewriting the variance as the precision, 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 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 σ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; 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. 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 (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. 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. 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 Φ−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 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 independence (probability theory), independent. This formulation arises because for a bivariate normal random vector (''X'', ''Y'') the squared norm will have the chi-squared distribution 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, 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._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,_with_mean_0_and_standard_deviation_1/\sigma._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 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 ...
_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_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__cumulants_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 (statistician), Charles Stein, who first publ ...
_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_when_\sigma_=_0. However,_one_can_define_the_normal_distribution_with_zero_variance_as_a_ generalized_function;_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 argum ...
_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 ...
_with_ probability_density_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._A_function_with_two_ Lagrange_multipliers_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_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_statistics,_ scores,_and__estimators_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 ques ...
_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_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-squar ...
_\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 situ ...
_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 ser ...
s. This_theorem_can_also_be_used_to_justify_modeling_the_sum_of_many_uniform_noise_sources_as_ Gaussian_noise._See_ AWGN.


__Operations_and_functions_of_normal_variables_

The_ probability_density,_
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_function, 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-normal_distribution, log-normally:_. *_The_absolute_value_of_X_has_folded_normal_distribution:_._If_\mu_=_0_this_is_known_as_the_half-normal_distribution. *_The_absolute_value_of_normalized_residuals,_, ''X''_−_''μ'', /''σ'',_has_chi_distribution_with_one_degree_of_freedom:_, X_-_\mu, _/_\sigma_\sim_\chi_1. *_The_square_of_''X''/''σ''_has_the_noncentral_chi-squared_distribution_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_distribution, chi-squared. *_The_log_likelihood_of_a_normal_variable_x_is_simply_the_log_of_its__probability_density_function:_\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_distribution, chi-squared_variable. *_The_distribution_of_the_variable_''X''_restricted_to_an_interval_[''a'',_''b'']_is_called_the_truncated_normal_distribution. *_(''X''_−_''μ'')−2_has_a__Lévy_distribution_with_location_0_and_scale_''σ''−2.


_=_Operations_on_two_independent_normal_variables_

= *_If_X_1_and_X_2_are_two_independence_(probability_theory), independent_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,sum_of_normally_distributed_random_variables, [proof]_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. *_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_distribution, stable_(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#Independent_central-normal_distributions, product_distribution_with_density_function_f_Z(z)_=_\pi^_K_0(, z, )_where_K_0_is_the_Macdonald_function, modified_Bessel_function_of_the_second_kind._This_distribution_is_symmetric_around_zero,_unbounded_at_z_=_0,_and_has_the_ characteristic_function__\phi_Z(t)_=_(1_+_t^2)^. *_Their_ratio_follows_the_standard__Cauchy_distribution:_X_1/_X_2_\sim_\operatorname(0,_1). *_Their_Euclidean_norm_\sqrt_has_the_Rayleigh_distribution.


__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-squar ...
_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_is_independent_from_the_sample__standard_deviation,_which_can_be_demonstrated_using_Basu's_theorem_or_Cochran's_theorem._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 situ ...
_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_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_distribution, 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_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_(probability), infinite_divisibility. 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_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_...
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'',_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-squar ...
_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,_for_normal_distributions_the_sample_mean_\textstyle\hat\mu_and_the_sample_variance_''s''2_are_independence_(probability_theory), independent,_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 situ ...
_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_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_th_...
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,_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,_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_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_σ2,_the_conjugate_prior_distribution_is_also_normally_distributed. This_can_be_shown_more_easily_by_rewriting_the_variance_as_the__precision,_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_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_σ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;_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._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_(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._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 ques ...
._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_Φ−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_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_independence_(probability_theory), independent._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-squar ...
_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,_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].html" ;"title="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 functions _1F_1 and U. :\begin \operatorname\left[X^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[X \mid a 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. 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 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. 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 standard deviation 1/\sigma. In particular, the standard normal distribution \varphi is an Fourier transform#Eigenfunctions, 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 (probability theory), characteristic function \varphi_X(t) of that variable, which is defined as the expected value 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 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[e^] = \hat f(it) = e^ e^ 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 Since this is a quadratic polynomial in t, only the first two cumulants are nonzero, namely the mean \mu and the variance \sigma^2.


Stein operator and class

Within Stein's method 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 (mathematics), function when \sigma = 0. However, one can define the normal distribution with zero variance as a generalized function; specifically, as Dirac delta function, 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 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 probability distribution, maximum entropy. If X is a continuous random variable with probability density function, probability density 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. A function with two Lagrange multipliers 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 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 statistics, score (statistics), scores, and estimators 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 function (statistics), 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 B(n,p) is De Moivre–Laplace theorem, 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 with parameter \lambda is approximately normal with mean \lambda and variance \lambda, for large values of \lambda. * The chi-squared distribution \chi^2(k) is approximately normal with mean k and variance 2k, for large k. * The Student's t-distribution 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, improvements of the approximation are given by the Edgeworth expansions. This theorem can also be used to justify modeling the sum of many uniform noise sources as Gaussian noise. See AWGN.


Operations and functions of normal variables

The probability density function, probability density, cumulative distribution function, cumulative distribution, and inverse cumulative distribution function, 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-normal distribution, log-normally: . * The absolute value of X has folded normal distribution: . If \mu = 0 this is known as the half-normal distribution. * The absolute value of normalized residuals, , ''X'' − ''μ'', /''σ'', has chi distribution with one degree of freedom: , X - \mu, / \sigma \sim \chi_1. * The square of ''X''/''σ'' has the noncentral chi-squared distribution 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 distribution, chi-squared. * The log likelihood of a normal variable x is simply the log of its probability density function: \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 distribution, chi-squared variable. * The distribution of the variable ''X'' restricted to an interval [''a'', ''b''] is called the truncated normal distribution. * (''X'' − ''μ'')−2 has a Lévy distribution with location 0 and scale ''σ''−2.


= Operations on two independent normal variables

= * If X_1 and X_2 are two independence (probability theory), independent 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,sum of normally distributed random variables, [proof] 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. * 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 distribution, stable (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#Independent central-normal distributions, product distribution with density function f_Z(z) = \pi^ K_0(, z, ) where K_0 is the Macdonald function, modified Bessel function of the second kind. This distribution is symmetric around zero, unbounded at z = 0, and has the characteristic function (probability theory), characteristic function \phi_Z(t) = (1 + t^2)^. * Their ratio follows the standard Cauchy distribution: X_1/ X_2 \sim \operatorname(0, 1). * Their Euclidean norm \sqrt has the Rayleigh distribution.


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 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 is independent from the sample standard deviation, which can be demonstrated using Basu's theorem or Cochran's theorem. The ratio of these two quantities will have the Student's t-distribution 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 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 distribution, 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 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 (probability), infinite divisibility. 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 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 ...
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'', 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 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, for normal distributions the sample mean \textstyle\hat\mu and the sample variance ''s''2 are independence (probability theory), independent, 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 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 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 th ...
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, 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, 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 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 σ2, the conjugate prior distribution is also normally distributed. This can be shown more easily by rewriting the variance as the precision, 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 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 σ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; 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. 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 (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. 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. 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 Φ−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 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 independence (probability theory), independent. This formulation arises because for a bivariate normal random vector (''X'', ''Y'') the squared norm will have the chi-squared distribution 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, 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 functions _1F_1 and U. :\begin \operatorname\left[X^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[X \mid a 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. 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 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. 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 standard deviation 1/\sigma. In particular, the standard normal distribution \varphi is an Fourier transform#Eigenfunctions, 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 (probability theory), characteristic function \varphi_X(t) of that variable, which is defined as the expected value 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 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[e^] = \hat f(it) = e^ e^ 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 Since this is a quadratic polynomial in t, only the first two cumulants are nonzero, namely the mean \mu and the variance \sigma^2.


Stein operator and class

Within Stein's method 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 (mathematics), function when \sigma = 0. However, one can define the normal distribution with zero variance as a generalized function; specifically, as Dirac delta function, 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 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 probability distribution, maximum entropy. If X is a continuous random variable with probability density function, probability density 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. A function with two Lagrange multipliers 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 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 statistics, score (statistics), scores, and estimators 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 function (statistics), 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 B(n,p) is De Moivre–Laplace theorem, 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 with parameter \lambda is approximately normal with mean \lambda and variance \lambda, for large values of \lambda. * The chi-squared distribution \chi^2(k) is approximately normal with mean k and variance 2k, for large k. * The Student's t-distribution 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, improvements of the approximation are given by the Edgeworth expansions. This theorem can also be used to justify modeling the sum of many uniform noise sources as Gaussian noise. See AWGN.


Operations and functions of normal variables

The probability density function, probability density, cumulative distribution function, cumulative distribution, and inverse cumulative distribution function, 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-normal distribution, log-normally: . * The absolute value of X has folded normal distribution: . If \mu = 0 this is known as the half-normal distribution. * The absolute value of normalized residuals, , ''X'' − ''μ'', /''σ'', has chi distribution with one degree of freedom: , X - \mu, / \sigma \sim \chi_1. * The square of ''X''/''σ'' has the noncentral chi-squared distribution 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 distribution, chi-squared. * The log likelihood of a normal variable x is simply the log of its probability density function: \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 distribution, chi-squared variable. * The distribution of the variable ''X'' restricted to an interval [''a'', ''b''] is called the truncated normal distribution. * (''X'' − ''μ'')−2 has a Lévy distribution with location 0 and scale ''σ''−2.


= Operations on two independent normal variables

= * If X_1 and X_2 are two independence (probability theory), independent 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,sum of normally distributed random variables, [proof] 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. * 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 distribution, stable (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#Independent central-normal distributions, product distribution with density function f_Z(z) = \pi^ K_0(, z, ) where K_0 is the Macdonald function, modified Bessel function of the second kind. This distribution is symmetric around zero, unbounded at z = 0, and has the characteristic function (probability theory), characteristic function \phi_Z(t) = (1 + t^2)^. * Their ratio follows the standard Cauchy distribution: X_1/ X_2 \sim \operatorname(0, 1). * Their Euclidean norm \sqrt has the Rayleigh distribution.


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 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 is independent from the sample standard deviation, which can be demonstrated using Basu's theorem or Cochran's theorem. The ratio of these two quantities will have the Student's t-distribution 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 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 distribution, 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 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 (probability), infinite divisibility. 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 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 ...
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'', 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 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, for normal distributions the sample mean \textstyle\hat\mu and the sample variance ''s''2 are independence (probability theory), independent, 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 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 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 th ...
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, 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, 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 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 σ2, the conjugate prior distribution is also normally distributed. This can be shown more easily by rewriting the variance as the precision, 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 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 σ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; 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. 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 (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. 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. 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 Φ−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 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 independence (probability theory), independent. This formulation arises because for a bivariate normal random vector (''X'', ''Y'') the squared norm will have the chi-squared distribution 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, 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_when_\sigma_=_0. However,_one_can_define_the_normal_distribution_with_zero_variance_as_a_ generalized_function;_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 argum ...
_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 ...
_with_ probability_density_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._A_function_with_two_ Lagrange_multipliers_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_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_statistics,_ scores,_and__estimators_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 ques ...
_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_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-squar ...
_\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 situ ...
_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 ser ...
s. This_theorem_can_also_be_used_to_justify_modeling_the_sum_of_many_uniform_noise_sources_as_ Gaussian_noise._See_ AWGN.


__Operations_and_functions_of_normal_variables_

The_ probability_density,_
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_function, 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-normal_distribution, log-normally:_. *_The_absolute_value_of_X_has_folded_normal_distribution:_._If_\mu_=_0_this_is_known_as_the_half-normal_distribution. *_The_absolute_value_of_normalized_residuals,_, ''X''_−_''μ'', /''σ'',_has_chi_distribution_with_one_degree_of_freedom:_, X_-_\mu, _/_\sigma_\sim_\chi_1. *_The_square_of_''X''/''σ''_has_the_noncentral_chi-squared_distribution_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_distribution, chi-squared. *_The_log_likelihood_of_a_normal_variable_x_is_simply_the_log_of_its__probability_density_function:_\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_distribution, chi-squared_variable. *_The_distribution_of_the_variable_''X''_restricted_to_an_interval_[''a'',_''b'']_is_called_the_truncated_normal_distribution. *_(''X''_−_''μ'')−2_has_a__Lévy_distribution_with_location_0_and_scale_''σ''−2.


_=_Operations_on_two_independent_normal_variables_

= *_If_X_1_and_X_2_are_two_independence_(probability_theory), independent_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,sum_of_normally_distributed_random_variables, [proof]_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. *_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_distribution, stable_(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#Independent_central-normal_distributions, product_distribution_with_density_function_f_Z(z)_=_\pi^_K_0(, z, )_where_K_0_is_the_Macdonald_function, modified_Bessel_function_of_the_second_kind._This_distribution_is_symmetric_around_zero,_unbounded_at_z_=_0,_and_has_the_ characteristic_function__\phi_Z(t)_=_(1_+_t^2)^. *_Their_ratio_follows_the_standard__Cauchy_distribution:_X_1/_X_2_\sim_\operatorname(0,_1). *_Their_Euclidean_norm_\sqrt_has_the_Rayleigh_distribution.


__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-squar ...
_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_is_independent_from_the_sample__standard_deviation,_which_can_be_demonstrated_using_Basu's_theorem_or_Cochran's_theorem._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 situ ...
_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_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_distribution, 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_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_(probability), infinite_divisibility. 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_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_...
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'',_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-squar ...
_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,_for_normal_distributions_the_sample_mean_\textstyle\hat\mu_and_the_sample_variance_''s''2_are_independence_(probability_theory), independent,_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 situ ...
_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_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_th_...
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,_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,_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_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_σ2,_the_conjugate_prior_distribution_is_also_normally_distributed. This_can_be_shown_more_easily_by_rewriting_the_variance_as_the__precision,_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_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_σ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;_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._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_(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._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 ques ...
._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_Φ−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_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_independence_(probability_theory), independent._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-squar ...
_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,_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].html"_;"title="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_functions__1F_1_and_U. :\begin ___\operatorname\left[X^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._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,_with_mean_0_and_standard_deviation_1/\sigma._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 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 ...
_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_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__cumulants_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 (statistician), Charles Stein, who first publ ...
_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_when_\sigma_=_0. However,_one_can_define_the_normal_distribution_with_zero_variance_as_a_ generalized_function;_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 argum ...
_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 ...
_with_ probability_density_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._A_function_with_two_ Lagrange_multipliers_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_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_statistics,_ scores,_and__estimators_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 ques ...
_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_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-squar ...
_\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 situ ...
_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 ser ...
s. This_theorem_can_also_be_used_to_justify_modeling_the_sum_of_many_uniform_noise_sources_as_ Gaussian_noise._See_ AWGN.


__Operations_and_functions_of_normal_variables_

The_ probability_density,_
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_function, 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-normal_distribution, log-normally:_. *_The_absolute_value_of_X_has_folded_normal_distribution:_._If_\mu_=_0_this_is_known_as_the_half-normal_distribution. *_The_absolute_value_of_normalized_residuals,_, ''X''_−_''μ'', /''σ'',_has_chi_distribution_with_one_degree_of_freedom:_, X_-_\mu, _/_\sigma_\sim_\chi_1. *_The_square_of_''X''/''σ''_has_the_noncentral_chi-squared_distribution_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_distribution, chi-squared. *_The_log_likelihood_of_a_normal_variable_x_is_simply_the_log_of_its__probability_density_function:_\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_distribution, chi-squared_variable. *_The_distribution_of_the_variable_''X''_restricted_to_an_interval_[''a'',_''b'']_is_called_the_truncated_normal_distribution. *_(''X''_−_''μ'')−2_has_a__Lévy_distribution_with_location_0_and_scale_''σ''−2.


_=_Operations_on_two_independent_normal_variables_

= *_If_X_1_and_X_2_are_two_independence_(probability_theory), independent_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,sum_of_normally_distributed_random_variables, [proof]_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. *_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_distribution, stable_(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#Independent_central-normal_distributions, product_distribution_with_density_function_f_Z(z)_=_\pi^_K_0(, z, )_where_K_0_is_the_Macdonald_function, modified_Bessel_function_of_the_second_kind._This_distribution_is_symmetric_around_zero,_unbounded_at_z_=_0,_and_has_the__characteristic_function__\phi_Z(t)_=_(1_+_t^2)^. *_Their_ratio_follows_the_standard__Cauchy_distribution:_X_1/_X_2_\sim_\operatorname(0,_1). *_Their_Euclidean_norm_\sqrt_has_the_Rayleigh_distribution.


__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-squar ...
_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_is_independent_from_the_sample__standard_deviation,_which_can_be_demonstrated_using_Basu's_theorem_or_Cochran's_theorem._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 situ ...
_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_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_distribution, 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_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_(probability), infinite_divisibility. 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_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_...
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'',_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-squar ...
_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,_for_normal_distributions_the_sample_mean_\textstyle\hat\mu_and_the_sample_variance_''s''2_are_independence_(probability_theory), independent,_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 situ ...
_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_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_th_...
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,_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,_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_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_σ2,_the_conjugate_prior_distribution_is_also_normally_distributed. This_can_be_shown_more_easily_by_rewriting_the_variance_as_the__precision,_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_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_σ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;_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._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_(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._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 ques ...
._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_Φ−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_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_independence_(probability_theory), independent._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-squar ...
_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,_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].html"_;"title="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_functions__1F_1_and_U. :\begin ___\operatorname\left[X^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._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,_with_mean_0_and_standard_deviation_1/\sigma._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_ 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__...
_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_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__cumulants_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_(statistician),_Charles_Stein,_who_first_publ_...
_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_when_\sigma_=_0. However,_one_can_define_the_normal_distribution_with_zero_variance_as_a_ generalized_function;_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 argum ...
_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 ...
_with_ probability_density_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._A_function_with_two_ Lagrange_multipliers_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_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_statistics,_ scores,_and__estimators_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 ques ...
_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_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-squar ...
_\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 situ ...
_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 ser ...
s. This_theorem_can_also_be_used_to_justify_modeling_the_sum_of_many_uniform_noise_sources_as_ Gaussian_noise._See_ AWGN.


__Operations_and_functions_of_normal_variables_

The_ probability_density,_
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_function, 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-normal_distribution, log-normally:_. *_The_absolute_value_of_X_has_folded_normal_distribution:_._If_\mu_=_0_this_is_known_as_the_half-normal_distribution. *_The_absolute_value_of_normalized_residuals,_, ''X''_−_''μ'', /''σ'',_has_chi_distribution_with_one_degree_of_freedom:_, X_-_\mu, _/_\sigma_\sim_\chi_1. *_The_square_of_''X''/''σ''_has_the_noncentral_chi-squared_distribution_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_distribution, chi-squared. *_The_log_likelihood_of_a_normal_variable_x_is_simply_the_log_of_its__probability_density_function:_\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_distribution, chi-squared_variable. *_The_distribution_of_the_variable_''X''_restricted_to_an_interval_[''a'',_''b'']_is_called_the_truncated_normal_distribution. *_(''X''_−_''μ'')−2_has_a__Lévy_distribution_with_location_0_and_scale_''σ''−2.


_=_Operations_on_two_independent_normal_variables_

= *_If_X_1_and_X_2_are_two_independence_(probability_theory), independent_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,sum_of_normally_distributed_random_variables, [proof]_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. *_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_distribution, stable_(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#Independent_central-normal_distributions, product_distribution_with_density_function_f_Z(z)_=_\pi^_K_0(, z, )_where_K_0_is_the_Macdonald_function, modified_Bessel_function_of_the_second_kind._This_distribution_is_symmetric_around_zero,_unbounded_at_z_=_0,_and_has_the__characteristic_function__\phi_Z(t)_=_(1_+_t^2)^. *_Their_ratio_follows_the_standard__Cauchy_distribution:_X_1/_X_2_\sim_\operatorname(0,_1). *_Their_Euclidean_norm_\sqrt_has_the_Rayleigh_distribution.


__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-squar ...
_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_is_independent_from_the_sample__standard_deviation,_which_can_be_demonstrated_using_Basu's_theorem_or_Cochran's_theorem._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 situ ...
_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_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_distribution, 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_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_(probability), infinite_divisibility. 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_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_...
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'',_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-squar ...
_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,_for_normal_distributions_the_sample_mean_\textstyle\hat\mu_and_the_sample_variance_''s''2_are_independence_(probability_theory), independent,_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 situ ...
_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_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_th_...
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,_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,_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_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_σ2,_the_conjugate_prior_distribution_is_also_normally_distributed. This_can_be_shown_more_easily_by_rewriting_the_variance_as_the__precision,_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_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_σ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;_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._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_(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._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 ques ...
._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_Φ−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_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_independence_(probability_theory), independent._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-squar ...
_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,_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_functions__1F_1_and_U. :\begin ___\operatorname\left[X^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._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,_with_mean_0_and_standard_deviation_1/\sigma._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_ 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__...
_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_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__cumulants_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_(statistician),_Charles_Stein,_who_first_publ_...
_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_when_\sigma_=_0. However,_one_can_define_the_normal_distribution_with_zero_variance_as_a_ generalized_function;_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 argum ...
_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 ...
_with_ probability_density_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._A_function_with_two_ Lagrange_multipliers_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_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_statistics,_ scores,_and__estimators_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 ques ...
_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_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-squar ...
_\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 situ ...
_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 ser ...
s. This_theorem_can_also_be_used_to_justify_modeling_the_sum_of_many_uniform_noise_sources_as_ Gaussian_noise._See_ AWGN.


__Operations_and_functions_of_normal_variables_

The_ probability_density,_
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_function, 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-normal_distribution, log-normally:_. *_The_absolute_value_of_X_has_folded_normal_distribution:_._If_\mu_=_0_this_is_known_as_the_half-normal_distribution. *_The_absolute_value_of_normalized_residuals,_, ''X''_−_''μ'', /''σ'',_has_chi_distribution_with_one_degree_of_freedom:_, X_-_\mu, _/_\sigma_\sim_\chi_1. *_The_square_of_''X''/''σ''_has_the_noncentral_chi-squared_distribution_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_distribution, chi-squared. *_The_log_likelihood_of_a_normal_variable_x_is_simply_the_log_of_its__probability_density_function:_\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_distribution, chi-squared_variable. *_The_distribution_of_the_variable_''X''_restricted_to_an_interval_[''a'',_''b'']_is_called_the_truncated_normal_distribution. *_(''X''_−_''μ'')−2_has_a__Lévy_distribution_with_location_0_and_scale_''σ''−2.


_=_Operations_on_two_independent_normal_variables_

= *_If_X_1_and_X_2_are_two_independence_(probability_theory), independent_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,sum_of_normally_distributed_random_variables, [proof]_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. *_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_distribution, stable_(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#Independent_central-normal_distributions, product_distribution_with_density_function_f_Z(z)_=_\pi^_K_0(, z, )_where_K_0_is_the_Macdonald_function, modified_Bessel_function_of_the_second_kind._This_distribution_is_symmetric_around_zero,_unbounded_at_z_=_0,_and_has_the__characteristic_function__\phi_Z(t)_=_(1_+_t^2)^. *_Their_ratio_follows_the_standard__Cauchy_distribution:_X_1/_X_2_\sim_\operatorname(0,_1). *_Their_Euclidean_norm_\sqrt_has_the_Rayleigh_distribution.


__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-squar ...
_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_is_independent_from_the_sample__standard_deviation,_which_can_be_demonstrated_using_Basu's_theorem_or_Cochran's_theorem._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 situ ...
_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_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_distribution, 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_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_(probability), infinite_divisibility. 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_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_...
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'',_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-squar ...
_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,_for_normal_distributions_the_sample_mean_\textstyle\hat\mu_and_the_sample_variance_''s''2_are_independence_(probability_theory), independent,_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 situ ...
_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_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_th_...
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,_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,_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_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_σ2,_the_conjugate_prior_distribution_is_also_normally_distributed. This_can_be_shown_more_easily_by_rewriting_the_variance_as_the__precision,_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_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_σ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;_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._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_(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._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 ques ...
._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_Φ−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_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_independence_(probability_theory), independent._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-squar ...
_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,_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].html"_;"title="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._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,_with_mean_0_and_standard_deviation_1/\sigma._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_ 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__...
_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_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__cumulants_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_(statistician),_Charles_Stein,_who_first_publ_...
_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_when_\sigma_=_0. However,_one_can_define_the_normal_distribution_with_zero_variance_as_a_ generalized_function;_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 argum ...
_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 ...
_with_ probability_density_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._A_function_with_two_ Lagrange_multipliers_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_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_statistics,_ scores,_and__estimators_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 ques ...
_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_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-squar ...
_\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 situ ...
_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 ser ...
s. This_theorem_can_also_be_used_to_justify_modeling_the_sum_of_many_uniform_noise_sources_as_ Gaussian_noise._See_ AWGN.


__Operations_and_functions_of_normal_variables_

The_ probability_density,_
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_function, 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-normal_distribution, log-normally:_. *_The_absolute_value_of_X_has_folded_normal_distribution:_._If_\mu_=_0_this_is_known_as_the_half-normal_distribution. *_The_absolute_value_of_normalized_residuals,_, ''X''_−_''μ'', /''σ'',_has_chi_distribution_with_one_degree_of_freedom:_, X_-_\mu, _/_\sigma_\sim_\chi_1. *_The_square_of_''X''/''σ''_has_the_noncentral_chi-squared_distribution_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_distribution, chi-squared. *_The_log_likelihood_of_a_normal_variable_x_is_simply_the_log_of_its__probability_density_function:_\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_distribution, chi-squared_variable. *_The_distribution_of_the_variable_''X''_restricted_to_an_interval_[''a'',_''b'']_is_called_the_truncated_normal_distribution. *_(''X''_−_''μ'')−2_has_a__Lévy_distribution_with_location_0_and_scale_''σ''−2.


_=_Operations_on_two_independent_normal_variables_

= *_If_X_1_and_X_2_are_two_independence_(probability_theory), independent_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,sum_of_normally_distributed_random_variables, [proof]_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. *_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_distribution, stable_(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#Independent_central-normal_distributions, product_distribution_with_density_function_f_Z(z)_=_\pi^_K_0(, z, )_where_K_0_is_the_Macdonald_function, modified_Bessel_function_of_the_second_kind._This_distribution_is_symmetric_around_zero,_unbounded_at_z_=_0,_and_has_the__characteristic_function__\phi_Z(t)_=_(1_+_t^2)^. *_Their_ratio_follows_the_standard__Cauchy_distribution:_X_1/_X_2_\sim_\operatorname(0,_1). *_Their_Euclidean_norm_\sqrt_has_the_Rayleigh_distribution.


__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-squar ...
_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_is_independent_from_the_sample__standard_deviation,_which_can_be_demonstrated_using_Basu's_theorem_or_Cochran's_theorem._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 situ ...
_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_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_distribution, 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_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_(probability), infinite_divisibility. 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_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_...
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'',_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-squar ...
_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,_for_normal_distributions_the_sample_mean_\textstyle\hat\mu_and_the_sample_variance_''s''2_are_independence_(probability_theory), independent,_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 situ ...
_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_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_th_...
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,_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,_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_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_σ2,_the_conjugate_prior_distribution_is_also_normally_distributed. This_can_be_shown_more_easily_by_rewriting_the_variance_as_the__precision,_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_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_σ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;_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._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_(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._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 ques ...
._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_Φ−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_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_independence_(probability_theory), independent._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-squar ...
_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,_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].html"_;"title="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_functions__1F_1_and_U. :\begin ___\operatorname\left[X^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[X_\mid_a 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._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_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._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_standard_deviation_1/\sigma._In_particular,_the_standard_normal_distribution_\varphi_is_an_Fourier_transform#Eigenfunctions, 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_(probability_theory), characteristic_function_\varphi_X(t)_of_that_variable,_which_is_defined_as_the_expected_value_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_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[e^]_=_\hat_f(it)_=_e^_e^ 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 Since_this_is_a_quadratic_polynomial_in_t,_only_the_first_two__cumulants_are_nonzero,_namely_the_mean \mu_and_the_variance \sigma^2.


__Stein_operator_and_class_

Within_Stein's_method_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_when_\sigma_=_0. However,_one_can_define_the_normal_distribution_with_zero_variance_as_a_ generalized_function;_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 argum ...
_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 ...
_with_ probability_density_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._A_function_with_two_ Lagrange_multipliers_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_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_statistics,_ scores,_and__estimators_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 ques ...
_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_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-squar ...
_\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 situ ...
_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 ser ...
s. This_theorem_can_also_be_used_to_justify_modeling_the_sum_of_many_uniform_noise_sources_as_ Gaussian_noise._See_ AWGN.


__Operations_and_functions_of_normal_variables_

The_ probability_density,_
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_function, 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-normal_distribution, log-normally:_. *_The_absolute_value_of_X_has_folded_normal_distribution:_._If_\mu_=_0_this_is_known_as_the_half-normal_distribution. *_The_absolute_value_of_normalized_residuals,_, ''X''_−_''μ'', /''σ'',_has_chi_distribution_with_one_degree_of_freedom:_, X_-_\mu, _/_\sigma_\sim_\chi_1. *_The_square_of_''X''/''σ''_has_the_noncentral_chi-squared_distribution_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_distribution, chi-squared. *_The_log_likelihood_of_a_normal_variable_x_is_simply_the_log_of_its__probability_density_function:_\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_distribution, chi-squared_variable. *_The_distribution_of_the_variable_''X''_restricted_to_an_interval_[''a'',_''b'']_is_called_the_truncated_normal_distribution. *_(''X''_−_''μ'')−2_has_a__Lévy_distribution_with_location_0_and_scale_''σ''−2.


_=_Operations_on_two_independent_normal_variables_

= *_If_X_1_and_X_2_are_two_independence_(probability_theory), independent_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,sum_of_normally_distributed_random_variables, [proof]_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. *_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_distribution, stable_(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#Independent_central-normal_distributions, product_distribution_with_density_function_f_Z(z)_=_\pi^_K_0(, z, )_where_K_0_is_the_Macdonald_function, modified_Bessel_function_of_the_second_kind._This_distribution_is_symmetric_around_zero,_unbounded_at_z_=_0,_and_has_the_characteristic_function_(probability_theory), characteristic_function__\phi_Z(t)_=_(1_+_t^2)^. *_Their_ratio_follows_the_standard__Cauchy_distribution:_X_1/_X_2_\sim_\operatorname(0,_1). *_Their_Euclidean_norm_\sqrt_has_the_Rayleigh_distribution.


__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-squar ...
_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_is_independent_from_the_sample__standard_deviation,_which_can_be_demonstrated_using_Basu's_theorem_or_Cochran's_theorem._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 situ ...
_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_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_distribution, 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_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_(probability), infinite_divisibility. 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_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_...
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'',_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-squar ...
_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,_for_normal_distributions_the_sample_mean_\textstyle\hat\mu_and_the_sample_variance_''s''2_are_independence_(probability_theory), independent,_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 situ ...
_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_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_th_...
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,_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,_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_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_σ2,_the_conjugate_prior_distribution_is_also_normally_distributed. This_can_be_shown_more_easily_by_rewriting_the_variance_as_the__precision,_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_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_σ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;_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._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_(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._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 ques ...
._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_Φ−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_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_independence_(probability_theory), independent._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-squar ...
_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,_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_functions__1F_1_and_U. :\begin ___\operatorname\left[X^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[X_\mid_a 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._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_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._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_standard_deviation_1/\sigma._In_particular,_the_standard_normal_distribution_\varphi_is_an_Fourier_transform#Eigenfunctions, 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_(probability_theory), characteristic_function_\varphi_X(t)_of_that_variable,_which_is_defined_as_the_expected_value_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_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[e^]_=_\hat_f(it)_=_e^_e^ 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 Since_this_is_a_quadratic_polynomial_in_t,_only_the_first_two__cumulants_are_nonzero,_namely_the_mean \mu_and_the_variance \sigma^2.


__Stein_operator_and_class_

Within_Stein's_method_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_when_\sigma_=_0. However,_one_can_define_the_normal_distribution_with_zero_variance_as_a_ generalized_function;_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 argum ...
_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 ...
_with_ probability_density_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._A_function_with_two_ Lagrange_multipliers_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_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_statistics,_ scores,_and__estimators_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 ques ...
_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_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-squar ...
_\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 situ ...
_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 ser ...
s. This_theorem_can_also_be_used_to_justify_modeling_the_sum_of_many_uniform_noise_sources_as_ Gaussian_noise._See_ AWGN.


__Operations_and_functions_of_normal_variables_

The_ probability_density,_
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_function, 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-normal_distribution, log-normally:_. *_The_absolute_value_of_X_has_folded_normal_distribution:_._If_\mu_=_0_this_is_known_as_the_half-normal_distribution. *_The_absolute_value_of_normalized_residuals,_, ''X''_−_''μ'', /''σ'',_has_chi_distribution_with_one_degree_of_freedom:_, X_-_\mu, _/_\sigma_\sim_\chi_1. *_The_square_of_''X''/''σ''_has_the_noncentral_chi-squared_distribution_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_distribution, chi-squared. *_The_log_likelihood_of_a_normal_variable_x_is_simply_the_log_of_its__probability_density_function:_\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_distribution, chi-squared_variable. *_The_distribution_of_the_variable_''X''_restricted_to_an_interval_[''a'',_''b'']_is_called_the_truncated_normal_distribution. *_(''X''_−_''μ'')−2_has_a__Lévy_distribution_with_location_0_and_scale_''σ''−2.


_=_Operations_on_two_independent_normal_variables_

= *_If_X_1_and_X_2_are_two_independence_(probability_theory), independent_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,sum_of_normally_distributed_random_variables, [proof]_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. *_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_distribution, stable_(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#Independent_central-normal_distributions, product_distribution_with_density_function_f_Z(z)_=_\pi^_K_0(, z, )_where_K_0_is_the_Macdonald_function, modified_Bessel_function_of_the_second_kind._This_distribution_is_symmetric_around_zero,_unbounded_at_z_=_0,_and_has_the_characteristic_function_(probability_theory), characteristic_function__\phi_Z(t)_=_(1_+_t^2)^. *_Their_ratio_follows_the_standard__Cauchy_distribution:_X_1/_X_2_\sim_\operatorname(0,_1). *_Their_Euclidean_norm_\sqrt_has_the_Rayleigh_distribution.


__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-squar ...
_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_is_independent_from_the_sample__standard_deviation,_which_can_be_demonstrated_using_Basu's_theorem_or_Cochran's_theorem._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 situ ...
_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_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_distribution, 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_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_(probability), infinite_divisibility. 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_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_...
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'',_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-squar ...
_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,_for_normal_distributions_the_sample_mean_\textstyle\hat\mu_and_the_sample_variance_''s''2_are_independence_(probability_theory), independent,_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 situ ...
_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_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_th_...
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,_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,_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_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_σ2,_the_conjugate_prior_distribution_is_also_normally_distributed. This_can_be_shown_more_easily_by_rewriting_the_variance_as_the__precision,_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_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_σ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;_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._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_(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._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 ques ...
._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_Φ−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_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_independence_(probability_theory), independent._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-squar ...
_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,_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._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,_with_mean_0_and_standard_deviation_1/\sigma._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_ 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__...
_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_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__cumulants_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_(statistician),_Charles_Stein,_who_first_publ_...
_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_when_\sigma_=_0. However,_one_can_define_the_normal_distribution_with_zero_variance_as_a_ generalized_function;_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 argum ...
_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 ...
_with_ probability_density_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._A_function_with_two_ Lagrange_multipliers_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_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_statistics,_ scores,_and__estimators_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 ques ...
_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_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-squar ...
_\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 situ ...
_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 ser ...
s. This_theorem_can_also_be_used_to_justify_modeling_the_sum_of_many_uniform_noise_sources_as_ Gaussian_noise._See_ AWGN.


__Operations_and_functions_of_normal_variables_

The_ probability_density,_
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_function, 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-normal_distribution, log-normally:_. *_The_absolute_value_of_X_has_folded_normal_distribution:_._If_\mu_=_0_this_is_known_as_the_half-normal_distribution. *_The_absolute_value_of_normalized_residuals,_, ''X''_−_''μ'', /''σ'',_has_chi_distribution_with_one_degree_of_freedom:_, X_-_\mu, _/_\sigma_\sim_\chi_1. *_The_square_of_''X''/''σ''_has_the_noncentral_chi-squared_distribution_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_distribution, chi-squared. *_The_log_likelihood_of_a_normal_variable_x_is_simply_the_log_of_its__probability_density_function:_\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_distribution, chi-squared_variable. *_The_distribution_of_the_variable_''X''_restricted_to_an_interval_[''a'',_''b'']_is_called_the_truncated_normal_distribution. *_(''X''_−_''μ'')−2_has_a__Lévy_distribution_with_location_0_and_scale_''σ''−2.


_=_Operations_on_two_independent_normal_variables_

= *_If_X_1_and_X_2_are_two_independence_(probability_theory), independent_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,sum_of_normally_distributed_random_variables, [proof]_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. *_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_distribution, stable_(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#Independent_central-normal_distributions, product_distribution_with_density_function_f_Z(z)_=_\pi^_K_0(, z, )_where_K_0_is_the_Macdonald_function, modified_Bessel_function_of_the_second_kind._This_distribution_is_symmetric_around_zero,_unbounded_at_z_=_0,_and_has_the__characteristic_function__\phi_Z(t)_=_(1_+_t^2)^. *_Their_ratio_follows_the_standard__Cauchy_distribution:_X_1/_X_2_\sim_\operatorname(0,_1). *_Their_Euclidean_norm_\sqrt_has_the_Rayleigh_distribution.


__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-squar ...
_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_is_independent_from_the_sample__standard_deviation,_which_can_be_demonstrated_using_Basu's_theorem_or_Cochran's_theorem._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 situ ...
_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_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_distribution, 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_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_(probability), infinite_divisibility. 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_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_...
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'',_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-squar ...
_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,_for_normal_distributions_the_sample_mean_\textstyle\hat\mu_and_the_sample_variance_''s''2_are_independence_(probability_theory), independent,_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 situ ...
_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_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_th_...
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,_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,_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_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_σ2,_the_conjugate_prior_distribution_is_also_normally_distributed. This_can_be_shown_more_easily_by_rewriting_the_variance_as_the__precision,_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_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_σ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;_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._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_(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._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 ques ...
._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_Φ−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_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_independence_(probability_theory), independent._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-squar ...
_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,_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].html"_;"title="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_functions__1F_1_and_U. :\begin ___\operatorname\left[X^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[X_\mid_a 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._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_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._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_standard_deviation_1/\sigma._In_particular,_the_standard_normal_distribution_\varphi_is_an_Fourier_transform#Eigenfunctions, 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_(probability_theory), characteristic_function_\varphi_X(t)_of_that_variable,_which_is_defined_as_the_expected_value_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_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[e^]_=_\hat_f(it)_=_e^_e^ 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 Since_this_is_a_quadratic_polynomial_in_t,_only_the_first_two__cumulants_are_nonzero,_namely_the_mean \mu_and_the_variance \sigma^2.


__Stein_operator_and_class_

Within_Stein's_method_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_when_\sigma_=_0. However,_one_can_define_the_normal_distribution_with_zero_variance_as_a_ generalized_function;_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 argum ...
_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 ...
_with_ probability_density_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._A_function_with_two_ Lagrange_multipliers_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_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_statistics,_ scores,_and__estimators_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 ques ...
_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_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-squar ...
_\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 situ ...
_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 ser ...
s. This_theorem_can_also_be_used_to_justify_modeling_the_sum_of_many_uniform_noise_sources_as_ Gaussian_noise._See_ AWGN.


__Operations_and_functions_of_normal_variables_

The_ probability_density,_
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_function, 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-normal_distribution, log-normally:_. *_The_absolute_value_of_X_has_folded_normal_distribution:_._If_\mu_=_0_this_is_known_as_the_half-normal_distribution. *_The_absolute_value_of_normalized_residuals,_, ''X''_−_''μ'', /''σ'',_has_chi_distribution_with_one_degree_of_freedom:_, X_-_\mu, _/_\sigma_\sim_\chi_1. *_The_square_of_''X''/''σ''_has_the_noncentral_chi-squared_distribution_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_distribution, chi-squared. *_The_log_likelihood_of_a_normal_variable_x_is_simply_the_log_of_its__probability_density_function:_\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_distribution, chi-squared_variable. *_The_distribution_of_the_variable_''X''_restricted_to_an_interval_[''a'',_''b'']_is_called_the_truncated_normal_distribution. *_(''X''_−_''μ'')−2_has_a__Lévy_distribution_with_location_0_and_scale_''σ''−2.


_=_Operations_on_two_independent_normal_variables_

= *_If_X_1_and_X_2_are_two_independence_(probability_theory), independent_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,sum_of_normally_distributed_random_variables, [proof]_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. *_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_distribution, stable_(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#Independent_central-normal_distributions, product_distribution_with_density_function_f_Z(z)_=_\pi^_K_0(, z, )_where_K_0_is_the_Macdonald_function, modified_Bessel_function_of_the_second_kind._This_distribution_is_symmetric_around_zero,_unbounded_at_z_=_0,_and_has_the_characteristic_function_(probability_theory), characteristic_function__\phi_Z(t)_=_(1_+_t^2)^. *_Their_ratio_follows_the_standard__Cauchy_distribution:_X_1/_X_2_\sim_\operatorname(0,_1). *_Their_Euclidean_norm_\sqrt_has_the_Rayleigh_distribution.


__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-squar ...
_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_is_independent_from_the_sample__standard_deviation,_which_can_be_demonstrated_using_Basu's_theorem_or_Cochran's_theorem._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 situ ...
_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_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_distribution, 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_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_(probability), infinite_divisibility. 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_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_...
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'',_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-squar ...
_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,_for_normal_distributions_the_sample_mean_\textstyle\hat\mu_and_the_sample_variance_''s''2_are_independence_(probability_theory), independent,_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 situ ...
_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_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_th_...
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,_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,_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_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_σ2,_the_conjugate_prior_distribution_is_also_normally_distributed. This_can_be_shown_more_easily_by_rewriting_the_variance_as_the__precision,_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_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_σ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;_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._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_(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._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 ques ...
._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_Φ−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_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_independence_(probability_theory), independent._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-squar ...
_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,_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_functions__1F_1_and_U. :\begin ___\operatorname\left[X^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[X_\mid_a 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._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_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._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_standard_deviation_1/\sigma._In_particular,_the_standard_normal_distribution_\varphi_is_an_Fourier_transform#Eigenfunctions, 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_(probability_theory), characteristic_function_\varphi_X(t)_of_that_variable,_which_is_defined_as_the_expected_value_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_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[e^]_=_\hat_f(it)_=_e^_e^ 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 Since_this_is_a_quadratic_polynomial_in_t,_only_the_first_two__cumulants_are_nonzero,_namely_the_mean \mu_and_the_variance \sigma^2.


__Stein_operator_and_class_

Within_Stein's_method_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_when_\sigma_=_0. However,_one_can_define_the_normal_distribution_with_zero_variance_as_a_ generalized_function;_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 argum ...
_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 ...
_with_ probability_density_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._A_function_with_two_ Lagrange_multipliers_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_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_statistics,_ scores,_and__estimators_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 ques ...
_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_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-squar ...
_\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 situ ...
_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 ser ...
s. This_theorem_can_also_be_used_to_justify_modeling_the_sum_of_many_uniform_noise_sources_as_ Gaussian_noise._See_ AWGN.


__Operations_and_functions_of_normal_variables_

The_ probability_density,_
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_function, 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-normal_distribution, log-normally:_. *_The_absolute_value_of_X_has_folded_normal_distribution:_._If_\mu_=_0_this_is_known_as_the_half-normal_distribution. *_The_absolute_value_of_normalized_residuals,_, ''X''_−_''μ'', /''σ'',_has_chi_distribution_with_one_degree_of_freedom:_, X_-_\mu, _/_\sigma_\sim_\chi_1. *_The_square_of_''X''/''σ''_has_the_noncentral_chi-squared_distribution_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_distribution, chi-squared. *_The_log_likelihood_of_a_normal_variable_x_is_simply_the_log_of_its__probability_density_function:_\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_distribution, chi-squared_variable. *_The_distribution_of_the_variable_''X''_restricted_to_an_interval_[''a'',_''b'']_is_called_the_truncated_normal_distribution. *_(''X''_−_''μ'')−2_has_a__Lévy_distribution_with_location_0_and_scale_''σ''−2.


_=_Operations_on_two_independent_normal_variables_

= *_If_X_1_and_X_2_are_two_independence_(probability_theory), independent_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,sum_of_normally_distributed_random_variables, [proof]_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. *_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_distribution, stable_(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#Independent_central-normal_distributions, product_distribution_with_density_function_f_Z(z)_=_\pi^_K_0(, z, )_where_K_0_is_the_Macdonald_function, modified_Bessel_function_of_the_second_kind._This_distribution_is_symmetric_around_zero,_unbounded_at_z_=_0,_and_has_the_characteristic_function_(probability_theory), characteristic_function__\phi_Z(t)_=_(1_+_t^2)^. *_Their_ratio_follows_the_standard__Cauchy_distribution:_X_1/_X_2_\sim_\operatorname(0,_1). *_Their_Euclidean_norm_\sqrt_has_the_Rayleigh_distribution.


__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-squar ...
_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_is_independent_from_the_sample__standard_deviation,_which_can_be_demonstrated_using_Basu's_theorem_or_Cochran's_theorem._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 situ ...
_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_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_distribution, 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_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_(probability), infinite_divisibility. 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_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_...
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'',_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-squar ...
_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,_for_normal_distributions_the_sample_mean_\textstyle\hat\mu_and_the_sample_variance_''s''2_are_independence_(probability_theory), independent,_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 situ ...
_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_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_th_...
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,_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,_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_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_σ2,_the_conjugate_prior_distribution_is_also_normally_distributed. This_can_be_shown_more_easily_by_rewriting_the_variance_as_the__precision,_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_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_σ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;_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._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_(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._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 ques ...
._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_Φ−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_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_independence_(probability_theory), independent._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-squar ...
_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,_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].html" ;"title="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_when_\sigma_=_0. However,_one_can_define_the_normal_distribution_with_zero_variance_as_a_ generalized_function;_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 argum ...
_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 ...
_with_ probability_density_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._A_function_with_two_ Lagrange_multipliers_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_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_statistics,_ scores,_and__estimators_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 ques ...
_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_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-squar ...
_\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 situ ...
_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 ser ...
s. This_theorem_can_also_be_used_to_justify_modeling_the_sum_of_many_uniform_noise_sources_as_ Gaussian_noise._See_ AWGN.


__Operations_and_functions_of_normal_variables_

The_ probability_density,_
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_function, 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-normal_distribution, log-normally:_. *_The_absolute_value_of_X_has_folded_normal_distribution:_._If_\mu_=_0_this_is_known_as_the_half-normal_distribution. *_The_absolute_value_of_normalized_residuals,_, ''X''_−_''μ'', /''σ'',_has_chi_distribution_with_one_degree_of_freedom:_, X_-_\mu, _/_\sigma_\sim_\chi_1. *_The_square_of_''X''/''σ''_has_the_noncentral_chi-squared_distribution_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_distribution, chi-squared. *_The_log_likelihood_of_a_normal_variable_x_is_simply_the_log_of_its__probability_density_function:_\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_distribution, chi-squared_variable. *_The_distribution_of_the_variable_''X''_restricted_to_an_interval_[''a'',_''b'']_is_called_the_truncated_normal_distribution. *_(''X''_−_''μ'')−2_has_a__Lévy_distribution_with_location_0_and_scale_''σ''−2.


_=_Operations_on_two_independent_normal_variables_

= *_If_X_1_and_X_2_are_two_independence_(probability_theory), independent_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,sum_of_normally_distributed_random_variables, [proof]_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. *_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_distribution, stable_(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#Independent_central-normal_distributions, product_distribution_with_density_function_f_Z(z)_=_\pi^_K_0(, z, )_where_K_0_is_the_Macdonald_function, modified_Bessel_function_of_the_second_kind._This_distribution_is_symmetric_around_zero,_unbounded_at_z_=_0,_and_has_the_ characteristic_function__\phi_Z(t)_=_(1_+_t^2)^. *_Their_ratio_follows_the_standard__Cauchy_distribution:_X_1/_X_2_\sim_\operatorname(0,_1). *_Their_Euclidean_norm_\sqrt_has_the_Rayleigh_distribution.


__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-squar ...
_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_is_independent_from_the_sample__standard_deviation,_which_can_be_demonstrated_using_Basu's_theorem_or_Cochran's_theorem._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 situ ...
_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_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_distribution, 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_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_(probability), infinite_divisibility. 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_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_...
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'',_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-squar ...
_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,_for_normal_distributions_the_sample_mean_\textstyle\hat\mu_and_the_sample_variance_''s''2_are_independence_(probability_theory), independent,_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 situ ...
_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_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_th_...
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,_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,_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_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_σ2,_the_conjugate_prior_distribution_is_also_normally_distributed. This_can_be_shown_more_easily_by_rewriting_the_variance_as_the__precision,_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_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_σ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;_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._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_(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._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 ques ...
._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_Φ−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_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_independence_(probability_theory), independent._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-squar ...
_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,_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].html"_;"title="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_functions__1F_1_and_U. :\begin ___\operatorname\left[X^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._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,_with_mean_0_and_standard_deviation_1/\sigma._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 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 ...
_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_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__cumulants_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 (statistician), Charles Stein, who first publ ...
_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_when_\sigma_=_0. However,_one_can_define_the_normal_distribution_with_zero_variance_as_a_ generalized_function;_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 argum ...
_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 ...
_with_ probability_density_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._A_function_with_two_ Lagrange_multipliers_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_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_statistics,_ scores,_and__estimators_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 ques ...
_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_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-squar ...
_\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 situ ...
_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 ser ...
s. This_theorem_can_also_be_used_to_justify_modeling_the_sum_of_many_uniform_noise_sources_as_ Gaussian_noise._See_ AWGN.


__Operations_and_functions_of_normal_variables_

The_ probability_density,_
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_function, 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-normal_distribution, log-normally:_. *_The_absolute_value_of_X_has_folded_normal_distribution:_._If_\mu_=_0_this_is_known_as_the_half-normal_distribution. *_The_absolute_value_of_normalized_residuals,_, ''X''_−_''μ'', /''σ'',_has_chi_distribution_with_one_degree_of_freedom:_, X_-_\mu, _/_\sigma_\sim_\chi_1. *_The_square_of_''X''/''σ''_has_the_noncentral_chi-squared_distribution_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_distribution, chi-squared. *_The_log_likelihood_of_a_normal_variable_x_is_simply_the_log_of_its__probability_density_function:_\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_distribution, chi-squared_variable. *_The_distribution_of_the_variable_''X''_restricted_to_an_interval_[''a'',_''b'']_is_called_the_truncated_normal_distribution. *_(''X''_−_''μ'')−2_has_a__Lévy_distribution_with_location_0_and_scale_''σ''−2.


_=_Operations_on_two_independent_normal_variables_

= *_If_X_1_and_X_2_are_two_independence_(probability_theory), independent_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,sum_of_normally_distributed_random_variables, [proof]_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. *_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_distribution, stable_(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#Independent_central-normal_distributions, product_distribution_with_density_function_f_Z(z)_=_\pi^_K_0(, z, )_where_K_0_is_the_Macdonald_function, modified_Bessel_function_of_the_second_kind._This_distribution_is_symmetric_around_zero,_unbounded_at_z_=_0,_and_has_the_ characteristic_function__\phi_Z(t)_=_(1_+_t^2)^. *_Their_ratio_follows_the_standard__Cauchy_distribution:_X_1/_X_2_\sim_\operatorname(0,_1). *_Their_Euclidean_norm_\sqrt_has_the_Rayleigh_distribution.


__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-squar ...
_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_is_independent_from_the_sample__standard_deviation,_which_can_be_demonstrated_using_Basu's_theorem_or_Cochran's_theorem._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 situ ...
_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_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_distribution, 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_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_(probability), infinite_divisibility. 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_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_...
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'',_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-squar ...
_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,_for_normal_distributions_the_sample_mean_\textstyle\hat\mu_and_the_sample_variance_''s''2_are_independence_(probability_theory), independent,_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 situ ...
_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_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_th_...
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,_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,_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_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_σ2,_the_conjugate_prior_distribution_is_also_normally_distributed. This_can_be_shown_more_easily_by_rewriting_the_variance_as_the__precision,_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_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_σ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;_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._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_(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._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 ques ...
._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_Φ−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_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_independence_(probability_theory), independent._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-squar ...
_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,_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_functions__1F_1_and_U. :\begin ___\operatorname\left[X^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._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,_with_mean_0_and_standard_deviation_1/\sigma._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 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 ...
_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_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__cumulants_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 (statistician), Charles Stein, who first publ ...
_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_when_\sigma_=_0. However,_one_can_define_the_normal_distribution_with_zero_variance_as_a_ generalized_function;_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 argum ...
_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 ...
_with_ probability_density_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._A_function_with_two_ Lagrange_multipliers_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_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_statistics,_ scores,_and__estimators_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 ques ...
_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_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-squar ...
_\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 situ ...
_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 ser ...
s. This_theorem_can_also_be_used_to_justify_modeling_the_sum_of_many_uniform_noise_sources_as_ Gaussian_noise._See_ AWGN.


__Operations_and_functions_of_normal_variables_

The_ probability_density,_
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_function, 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-normal_distribution, log-normally:_. *_The_absolute_value_of_X_has_folded_normal_distribution:_._If_\mu_=_0_this_is_known_as_the_half-normal_distribution. *_The_absolute_value_of_normalized_residuals,_, ''X''_−_''μ'', /''σ'',_has_chi_distribution_with_one_degree_of_freedom:_, X_-_\mu, _/_\sigma_\sim_\chi_1. *_The_square_of_''X''/''σ''_has_the_noncentral_chi-squared_distribution_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_distribution, chi-squared. *_The_log_likelihood_of_a_normal_variable_x_is_simply_the_log_of_its__probability_density_function:_\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_distribution, chi-squared_variable. *_The_distribution_of_the_variable_''X''_restricted_to_an_interval_[''a'',_''b'']_is_called_the_truncated_normal_distribution. *_(''X''_−_''μ'')−2_has_a__Lévy_distribution_with_location_0_and_scale_''σ''−2.


_=_Operations_on_two_independent_normal_variables_

= *_If_X_1_and_X_2_are_two_independence_(probability_theory), independent_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,sum_of_normally_distributed_random_variables, [proof]_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. *_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_distribution, stable_(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#Independent_central-normal_distributions, product_distribution_with_density_function_f_Z(z)_=_\pi^_K_0(, z, )_where_K_0_is_the_Macdonald_function, modified_Bessel_function_of_the_second_kind._This_distribution_is_symmetric_around_zero,_unbounded_at_z_=_0,_and_has_the_ characteristic_function__\phi_Z(t)_=_(1_+_t^2)^. *_Their_ratio_follows_the_standard__Cauchy_distribution:_X_1/_X_2_\sim_\operatorname(0,_1). *_Their_Euclidean_norm_\sqrt_has_the_Rayleigh_distribution.


__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-squar ...
_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_is_independent_from_the_sample__standard_deviation,_which_can_be_demonstrated_using_Basu's_theorem_or_Cochran's_theorem._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 situ ...
_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_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_distribution, 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_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_(probability), infinite_divisibility. 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_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_...
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'',_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-squar ...
_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,_for_normal_distributions_the_sample_mean_\textstyle\hat\mu_and_the_sample_variance_''s''2_are_independence_(probability_theory), independent,_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 situ ...
_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_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_th_...
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,_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,_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_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_σ2,_the_conjugate_prior_distribution_is_also_normally_distributed. This_can_be_shown_more_easily_by_rewriting_the_variance_as_the__precision,_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_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_σ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;_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._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_(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._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 ques ...
._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_Φ−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_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_independence_(probability_theory), independent._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-squar ...
_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,_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].html" ;"title="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._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,_with_mean_0_and_standard_deviation_1/\sigma._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 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 ...
_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_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__cumulants_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 (statistician), Charles Stein, who first publ ...
_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_when_\sigma_=_0. However,_one_can_define_the_normal_distribution_with_zero_variance_as_a_ generalized_function;_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 argum ...
_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 ...
_with_ probability_density_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._A_function_with_two_ Lagrange_multipliers_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_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_statistics,_ scores,_and__estimators_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 ques ...
_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_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-squar ...
_\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 situ ...
_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 ser ...
s. This_theorem_can_also_be_used_to_justify_modeling_the_sum_of_many_uniform_noise_sources_as_ Gaussian_noise._See_ AWGN.


__Operations_and_functions_of_normal_variables_

The_ probability_density,_
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_function, 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-normal_distribution, log-normally:_. *_The_absolute_value_of_X_has_folded_normal_distribution:_._If_\mu_=_0_this_is_known_as_the_half-normal_distribution. *_The_absolute_value_of_normalized_residuals,_, ''X''_−_''μ'', /''σ'',_has_chi_distribution_with_one_degree_of_freedom:_, X_-_\mu, _/_\sigma_\sim_\chi_1. *_The_square_of_''X''/''σ''_has_the_noncentral_chi-squared_distribution_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_distribution, chi-squared. *_The_log_likelihood_of_a_normal_variable_x_is_simply_the_log_of_its__probability_density_function:_\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_distribution, chi-squared_variable. *_The_distribution_of_the_variable_''X''_restricted_to_an_interval_[''a'',_''b'']_is_called_the_truncated_normal_distribution. *_(''X''_−_''μ'')−2_has_a__Lévy_distribution_with_location_0_and_scale_''σ''−2.


_=_Operations_on_two_independent_normal_variables_

= *_If_X_1_and_X_2_are_two_independence_(probability_theory), independent_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,sum_of_normally_distributed_random_variables, [proof]_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. *_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_distribution, stable_(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#Independent_central-normal_distributions, product_distribution_with_density_function_f_Z(z)_=_\pi^_K_0(, z, )_where_K_0_is_the_Macdonald_function, modified_Bessel_function_of_the_second_kind._This_distribution_is_symmetric_around_zero,_unbounded_at_z_=_0,_and_has_the_ characteristic_function__\phi_Z(t)_=_(1_+_t^2)^. *_Their_ratio_follows_the_standard__Cauchy_distribution:_X_1/_X_2_\sim_\operatorname(0,_1). *_Their_Euclidean_norm_\sqrt_has_the_Rayleigh_distribution.


__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-squar ...
_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_is_independent_from_the_sample__standard_deviation,_which_can_be_demonstrated_using_Basu's_theorem_or_Cochran's_theorem._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 situ ...
_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_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_distribution, 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_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_(probability), infinite_divisibility. 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_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_...
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'',_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-squar ...
_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,_for_normal_distributions_the_sample_mean_\textstyle\hat\mu_and_the_sample_variance_''s''2_are_independence_(probability_theory), independent,_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 situ ...
_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_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_th_...
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,_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,_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_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_σ2,_the_conjugate_prior_distribution_is_also_normally_distributed. This_can_be_shown_more_easily_by_rewriting_the_variance_as_the__precision,_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_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_σ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;_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._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_(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._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 ques ...
._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_Φ−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_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_independence_(probability_theory), independent._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-squar ...
_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,_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].html" ;"title="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 functions _1F_1 and U. :\begin \operatorname\left[X^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[X \mid a 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. 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 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. 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 standard deviation 1/\sigma. In particular, the standard normal distribution \varphi is an Fourier transform#Eigenfunctions, 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 (probability theory), characteristic function \varphi_X(t) of that variable, which is defined as the expected value 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 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[e^] = \hat f(it) = e^ e^ 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 Since this is a quadratic polynomial in t, only the first two cumulants are nonzero, namely the mean \mu and the variance \sigma^2.


Stein operator and class

Within Stein's method 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 (mathematics), function when \sigma = 0. However, one can define the normal distribution with zero variance as a generalized function; specifically, as Dirac delta function, 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 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 probability distribution, maximum entropy. If X is a continuous random variable with probability density function, probability density 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. A function with two Lagrange multipliers 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 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 statistics, score (statistics), scores, and estimators 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 function (statistics), 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 B(n,p) is De Moivre–Laplace theorem, 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 with parameter \lambda is approximately normal with mean \lambda and variance \lambda, for large values of \lambda. * The chi-squared distribution \chi^2(k) is approximately normal with mean k and variance 2k, for large k. * The Student's t-distribution 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, improvements of the approximation are given by the Edgeworth expansions. This theorem can also be used to justify modeling the sum of many uniform noise sources as Gaussian noise. See AWGN.


Operations and functions of normal variables

The probability density function, probability density, cumulative distribution function, cumulative distribution, and inverse cumulative distribution function, 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-normal distribution, log-normally: . * The absolute value of X has folded normal distribution: . If \mu = 0 this is known as the half-normal distribution. * The absolute value of normalized residuals, , ''X'' − ''μ'', /''σ'', has chi distribution with one degree of freedom: , X - \mu, / \sigma \sim \chi_1. * The square of ''X''/''σ'' has the noncentral chi-squared distribution 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 distribution, chi-squared. * The log likelihood of a normal variable x is simply the log of its probability density function: \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 distribution, chi-squared variable. * The distribution of the variable ''X'' restricted to an interval [''a'', ''b''] is called the truncated normal distribution. * (''X'' − ''μ'')−2 has a Lévy distribution with location 0 and scale ''σ''−2.


= Operations on two independent normal variables

= * If X_1 and X_2 are two independence (probability theory), independent 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,sum of normally distributed random variables, [proof] 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. * 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 distribution, stable (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#Independent central-normal distributions, product distribution with density function f_Z(z) = \pi^ K_0(, z, ) where K_0 is the Macdonald function, modified Bessel function of the second kind. This distribution is symmetric around zero, unbounded at z = 0, and has the characteristic function (probability theory), characteristic function \phi_Z(t) = (1 + t^2)^. * Their ratio follows the standard Cauchy distribution: X_1/ X_2 \sim \operatorname(0, 1). * Their Euclidean norm \sqrt has the Rayleigh distribution.


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 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 is independent from the sample standard deviation, which can be demonstrated using Basu's theorem or Cochran's theorem. The ratio of these two quantities will have the Student's t-distribution 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 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 distribution, 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 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 (probability), infinite divisibility. 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 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 ...
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'', 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 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, for normal distributions the sample mean \textstyle\hat\mu and the sample variance ''s''2 are independence (probability theory), independent, 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 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 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 th ...
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, 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, 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 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 σ2, the conjugate prior distribution is also normally distributed. This can be shown more easily by rewriting the variance as the precision, 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 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 σ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; 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. 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 (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. 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. 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 Φ−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 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 independence (probability theory), independent. This formulation arises because for a bivariate normal random vector (''X'', ''Y'') the squared norm will have the chi-squared distribution 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, 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 functions _1F_1 and U. :\begin \operatorname\left[X^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[X \mid a 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. 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 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. 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 standard deviation 1/\sigma. In particular, the standard normal distribution \varphi is an Fourier transform#Eigenfunctions, 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 (probability theory), characteristic function \varphi_X(t) of that variable, which is defined as the expected value 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 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[e^] = \hat f(it) = e^ e^ 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 Since this is a quadratic polynomial in t, only the first two cumulants are nonzero, namely the mean \mu and the variance \sigma^2.


Stein operator and class

Within Stein's method 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 (mathematics), function when \sigma = 0. However, one can define the normal distribution with zero variance as a generalized function; specifically, as Dirac delta function, 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 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 probability distribution, maximum entropy. If X is a continuous random variable with probability density function, probability density 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. A function with two Lagrange multipliers 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 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 statistics, score (statistics), scores, and estimators 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 function (statistics), 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 B(n,p) is De Moivre–Laplace theorem, 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 with parameter \lambda is approximately normal with mean \lambda and variance \lambda, for large values of \lambda. * The chi-squared distribution \chi^2(k) is approximately normal with mean k and variance 2k, for large k. * The Student's t-distribution 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, improvements of the approximation are given by the Edgeworth expansions. This theorem can also be used to justify modeling the sum of many uniform noise sources as Gaussian noise. See AWGN.


Operations and functions of normal variables

The probability density function, probability density, cumulative distribution function, cumulative distribution, and inverse cumulative distribution function, 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-normal distribution, log-normally: . * The absolute value of X has folded normal distribution: . If \mu = 0 this is known as the half-normal distribution. * The absolute value of normalized residuals, , ''X'' − ''μ'', /''σ'', has chi distribution with one degree of freedom: , X - \mu, / \sigma \sim \chi_1. * The square of ''X''/''σ'' has the noncentral chi-squared distribution 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 distribution, chi-squared. * The log likelihood of a normal variable x is simply the log of its probability density function: \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 distribution, chi-squared variable. * The distribution of the variable ''X'' restricted to an interval [''a'', ''b''] is called the truncated normal distribution. * (''X'' − ''μ'')−2 has a Lévy distribution with location 0 and scale ''σ''−2.


= Operations on two independent normal variables

= * If X_1 and X_2 are two independence (probability theory), independent 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,sum of normally distributed random variables, [proof] 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. * 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 distribution, stable (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#Independent central-normal distributions, product distribution with density function f_Z(z) = \pi^ K_0(, z, ) where K_0 is the Macdonald function, modified Bessel function of the second kind. This distribution is symmetric around zero, unbounded at z = 0, and has the characteristic function (probability theory), characteristic function \phi_Z(t) = (1 + t^2)^. * Their ratio follows the standard Cauchy distribution: X_1/ X_2 \sim \operatorname(0, 1). * Their Euclidean norm \sqrt has the Rayleigh distribution.


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 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 is independent from the sample standard deviation, which can be demonstrated using Basu's theorem or Cochran's theorem. The ratio of these two quantities will have the Student's t-distribution 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 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 distribution, 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 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 (probability), infinite divisibility. 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 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 ...
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'', 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 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, for normal distributions the sample mean \textstyle\hat\mu and the sample variance ''s''2 are independence (probability theory), independent, 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 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 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 th ...
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, 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, 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 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 σ2, the conjugate prior distribution is also normally distributed. This can be shown more easily by rewriting the variance as the precision, 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 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 σ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; 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. 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 (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. 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. 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 Φ−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 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 independence (probability theory), independent. This formulation arises because for a bivariate normal random vector (''X'', ''Y'') the squared norm will have the chi-squared distribution 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, 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._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,_with_mean_0_and_standard_deviation_1/\sigma._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 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 ...
_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_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__cumulants_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 (statistician), Charles Stein, who first publ ...
_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_when_\sigma_=_0. However,_one_can_define_the_normal_distribution_with_zero_variance_as_a_ generalized_function;_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 argum ...
_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 ...
_with_ probability_density_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._A_function_with_two_ Lagrange_multipliers_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_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_statistics,_ scores,_and__estimators_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 ques ...
_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_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-squar ...
_\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 situ ...
_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 ser ...
s. This_theorem_can_also_be_used_to_justify_modeling_the_sum_of_many_uniform_noise_sources_as_ Gaussian_noise._See_ AWGN.


__Operations_and_functions_of_normal_variables_

The_ probability_density,_
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_function, 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-normal_distribution, log-normally:_. *_The_absolute_value_of_X_has_folded_normal_distribution:_._If_\mu_=_0_this_is_known_as_the_half-normal_distribution. *_The_absolute_value_of_normalized_residuals,_, ''X''_−_''μ'', /''σ'',_has_chi_distribution_with_one_degree_of_freedom:_, X_-_\mu, _/_\sigma_\sim_\chi_1. *_The_square_of_''X''/''σ''_has_the_noncentral_chi-squared_distribution_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_distribution, chi-squared. *_The_log_likelihood_of_a_normal_variable_x_is_simply_the_log_of_its__probability_density_function:_\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_distribution, chi-squared_variable. *_The_distribution_of_the_variable_''X''_restricted_to_an_interval_[''a'',_''b'']_is_called_the_truncated_normal_distribution. *_(''X''_−_''μ'')−2_has_a__Lévy_distribution_with_location_0_and_scale_''σ''−2.


_=_Operations_on_two_independent_normal_variables_

= *_If_X_1_and_X_2_are_two_independence_(probability_theory), independent_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,sum_of_normally_distributed_random_variables, [proof]_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. *_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_distribution, stable_(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#Independent_central-normal_distributions, product_distribution_with_density_function_f_Z(z)_=_\pi^_K_0(, z, )_where_K_0_is_the_Macdonald_function, modified_Bessel_function_of_the_second_kind._This_distribution_is_symmetric_around_zero,_unbounded_at_z_=_0,_and_has_the_ characteristic_function__\phi_Z(t)_=_(1_+_t^2)^. *_Their_ratio_follows_the_standard__Cauchy_distribution:_X_1/_X_2_\sim_\operatorname(0,_1). *_Their_Euclidean_norm_\sqrt_has_the_Rayleigh_distribution.


__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-squar ...
_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_is_independent_from_the_sample__standard_deviation,_which_can_be_demonstrated_using_Basu's_theorem_or_Cochran's_theorem._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 situ ...
_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_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_distribution, 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_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_(probability), infinite_divisibility. 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_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_...
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'',_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-squar ...
_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,_for_normal_distributions_the_sample_mean_\textstyle\hat\mu_and_the_sample_variance_''s''2_are_independence_(probability_theory), independent,_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 situ ...
_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_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_th_...
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,_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,_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_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_σ2,_the_conjugate_prior_distribution_is_also_normally_distributed. This_can_be_shown_more_easily_by_rewriting_the_variance_as_the__precision,_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_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_σ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;_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._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_(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._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 ques ...
._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_Φ−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_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_independence_(probability_theory), independent._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-squar ...
_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,_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].html" ;"title="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 functions _1F_1 and U. :\begin \operatorname\left[X^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[X \mid a 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. 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 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. 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 standard deviation 1/\sigma. In particular, the standard normal distribution \varphi is an Fourier transform#Eigenfunctions, 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 (probability theory), characteristic function \varphi_X(t) of that variable, which is defined as the expected value 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 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[e^] = \hat f(it) = e^ e^ 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 Since this is a quadratic polynomial in t, only the first two cumulants are nonzero, namely the mean \mu and the variance \sigma^2.


Stein operator and class

Within Stein's method 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 (mathematics), function when \sigma = 0. However, one can define the normal distribution with zero variance as a generalized function; specifically, as Dirac delta function, 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 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 probability distribution, maximum entropy. If X is a continuous random variable with probability density function, probability density 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. A function with two Lagrange multipliers 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 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 statistics, score (statistics), scores, and estimators 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 function (statistics), 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 B(n,p) is De Moivre–Laplace theorem, 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 with parameter \lambda is approximately normal with mean \lambda and variance \lambda, for large values of \lambda. * The chi-squared distribution \chi^2(k) is approximately normal with mean k and variance 2k, for large k. * The Student's t-distribution 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, improvements of the approximation are given by the Edgeworth expansions. This theorem can also be used to justify modeling the sum of many uniform noise sources as Gaussian noise. See AWGN.


Operations and functions of normal variables

The probability density function, probability density, cumulative distribution function, cumulative distribution, and inverse cumulative distribution function, 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-normal distribution, log-normally: . * The absolute value of X has folded normal distribution: . If \mu = 0 this is known as the half-normal distribution. * The absolute value of normalized residuals, , ''X'' − ''μ'', /''σ'', has chi distribution with one degree of freedom: , X - \mu, / \sigma \sim \chi_1. * The square of ''X''/''σ'' has the noncentral chi-squared distribution 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 distribution, chi-squared. * The log likelihood of a normal variable x is simply the log of its probability density function: \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 distribution, chi-squared variable. * The distribution of the variable ''X'' restricted to an interval [''a'', ''b''] is called the truncated normal distribution. * (''X'' − ''μ'')−2 has a Lévy distribution with location 0 and scale ''σ''−2.


= Operations on two independent normal variables

= * If X_1 and X_2 are two independence (probability theory), independent 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,sum of normally distributed random variables, [proof] 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. * 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 distribution, stable (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#Independent central-normal distributions, product distribution with density function f_Z(z) = \pi^ K_0(, z, ) where K_0 is the Macdonald function, modified Bessel function of the second kind. This distribution is symmetric around zero, unbounded at z = 0, and has the characteristic function (probability theory), characteristic function \phi_Z(t) = (1 + t^2)^. * Their ratio follows the standard Cauchy distribution: X_1/ X_2 \sim \operatorname(0, 1). * Their Euclidean norm \sqrt has the Rayleigh distribution.


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 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 is independent from the sample standard deviation, which can be demonstrated using Basu's theorem or Cochran's theorem. The ratio of these two quantities will have the Student's t-distribution 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 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 distribution, 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 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 (probability), infinite divisibility. 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 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 ...
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'', 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 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, for normal distributions the sample mean \textstyle\hat\mu and the sample variance ''s''2 are independence (probability theory), independent, 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 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 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 th ...
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, 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, 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 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 σ2, the conjugate prior distribution is also normally distributed. This can be shown more easily by rewriting the variance as the precision, 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 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 σ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; 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. 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 (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. 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. 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 Φ−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 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 independence (probability theory), independent. This formulation arises because for a bivariate normal random vector (''X'', ''Y'') the squared norm will have the chi-squared distribution 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, 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 functions _1F_1 and U. :\begin \operatorname\left[X^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[X \mid a 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. 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 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. 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 standard deviation 1/\sigma. In particular, the standard normal distribution \varphi is an Fourier transform#Eigenfunctions, 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 (probability theory), characteristic function \varphi_X(t) of that variable, which is defined as the expected value 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 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[e^] = \hat f(it) = e^ e^ 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 Since this is a quadratic polynomial in t, only the first two cumulants are nonzero, namely the mean \mu and the variance \sigma^2.


Stein operator and class

Within Stein's method 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 (mathematics), function when \sigma = 0. However, one can define the normal distribution with zero variance as a generalized function; specifically, as Dirac delta function, 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 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 probability distribution, maximum entropy. If X is a continuous random variable with probability density function, probability density 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. A function with two Lagrange multipliers 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 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 statistics, score (statistics), scores, and estimators 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 function (statistics), 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 B(n,p) is De Moivre–Laplace theorem, 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 with parameter \lambda is approximately normal with mean \lambda and variance \lambda, for large values of \lambda. * The chi-squared distribution \chi^2(k) is approximately normal with mean k and variance 2k, for large k. * The Student's t-distribution 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, improvements of the approximation are given by the Edgeworth expansions. This theorem can also be used to justify modeling the sum of many uniform noise sources as Gaussian noise. See AWGN.


Operations and functions of normal variables

The probability density function, probability density, cumulative distribution function, cumulative distribution, and inverse cumulative distribution function, 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-normal distribution, log-normally: . * The absolute value of X has folded normal distribution: . If \mu = 0 this is known as the half-normal distribution. * The absolute value of normalized residuals, , ''X'' − ''μ'', /''σ'', has chi distribution with one degree of freedom: , X - \mu, / \sigma \sim \chi_1. * The square of ''X''/''σ'' has the noncentral chi-squared distribution 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 distribution, chi-squared. * The log likelihood of a normal variable x is simply the log of its probability density function: \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 distribution, chi-squared variable. * The distribution of the variable ''X'' restricted to an interval [''a'', ''b''] is called the truncated normal distribution. * (''X'' − ''μ'')−2 has a Lévy distribution with location 0 and scale ''σ''−2.


= Operations on two independent normal variables

= * If X_1 and X_2 are two independence (probability theory), independent 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,sum of normally distributed random variables, [proof] 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. * 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 distribution, stable (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#Independent central-normal distributions, product distribution with density function f_Z(z) = \pi^ K_0(, z, ) where K_0 is the Macdonald function, modified Bessel function of the second kind. This distribution is symmetric around zero, unbounded at z = 0, and has the characteristic function (probability theory), characteristic function \phi_Z(t) = (1 + t^2)^. * Their ratio follows the standard Cauchy distribution: X_1/ X_2 \sim \operatorname(0, 1). * Their Euclidean norm \sqrt has the Rayleigh distribution.


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 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 is independent from the sample standard deviation, which can be demonstrated using Basu's theorem or Cochran's theorem. The ratio of these two quantities will have the Student's t-distribution 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 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 distribution, 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 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 (probability), infinite divisibility. 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 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 ...
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'', 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 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, for normal distributions the sample mean \textstyle\hat\mu and the sample variance ''s''2 are independence (probability theory), independent, 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 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 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 th ...
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, 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, 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 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 σ2, the conjugate prior distribution is also normally distributed. This can be shown more easily by rewriting the variance as the precision, 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 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 σ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; 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. 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 (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. 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. 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 Φ−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 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 independence (probability theory), independent. This formulation arises because for a bivariate normal random vector (''X'', ''Y'') the squared norm will have the chi-squared distribution 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, 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_when_\sigma_=_0. However,_one_can_define_the_normal_distribution_with_zero_variance_as_a_ generalized_function;_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 argum ...
_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 ...
_with_ probability_density_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._A_function_with_two_ Lagrange_multipliers_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_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_statistics,_ scores,_and__estimators_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 ques ...
_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_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-squar ...
_\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 situ ...
_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 ser ...
s. This_theorem_can_also_be_used_to_justify_modeling_the_sum_of_many_uniform_noise_sources_as_ Gaussian_noise._See_ AWGN.


__Operations_and_functions_of_normal_variables_

The_ probability_density,_
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_function, 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-normal_distribution, log-normally:_. *_The_absolute_value_of_X_has_folded_normal_distribution:_._If_\mu_=_0_this_is_known_as_the_half-normal_distribution. *_The_absolute_value_of_normalized_residuals,_, ''X''_−_''μ'', /''σ'',_has_chi_distribution_with_one_degree_of_freedom:_, X_-_\mu, _/_\sigma_\sim_\chi_1. *_The_square_of_''X''/''σ''_has_the_noncentral_chi-squared_distribution_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_distribution, chi-squared. *_The_log_likelihood_of_a_normal_variable_x_is_simply_the_log_of_its__probability_density_function:_\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_distribution, chi-squared_variable. *_The_distribution_of_the_variable_''X''_restricted_to_an_interval_[''a'',_''b'']_is_called_the_truncated_normal_distribution. *_(''X''_−_''μ'')−2_has_a__Lévy_distribution_with_location_0_and_scale_''σ''−2.


_=_Operations_on_two_independent_normal_variables_

= *_If_X_1_and_X_2_are_two_independence_(probability_theory), independent_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,sum_of_normally_distributed_random_variables, [proof]_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. *_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_distribution, stable_(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#Independent_central-normal_distributions, product_distribution_with_density_function_f_Z(z)_=_\pi^_K_0(, z, )_where_K_0_is_the_Macdonald_function, modified_Bessel_function_of_the_second_kind._This_distribution_is_symmetric_around_zero,_unbounded_at_z_=_0,_and_has_the_ characteristic_function__\phi_Z(t)_=_(1_+_t^2)^. *_Their_ratio_follows_the_standard__Cauchy_distribution:_X_1/_X_2_\sim_\operatorname(0,_1). *_Their_Euclidean_norm_\sqrt_has_the_Rayleigh_distribution.


__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-squar ...
_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_is_independent_from_the_sample__standard_deviation,_which_can_be_demonstrated_using_Basu's_theorem_or_Cochran's_theorem._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 situ ...
_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_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_distribution, 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_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_(probability), infinite_divisibility. 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_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_...
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'',_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-squar ...
_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,_for_normal_distributions_the_sample_mean_\textstyle\hat\mu_and_the_sample_variance_''s''2_are_independence_(probability_theory), independent,_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 situ ...
_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_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_th_...
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,_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,_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_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_σ2,_the_conjugate_prior_distribution_is_also_normally_distributed. This_can_be_shown_more_easily_by_rewriting_the_variance_as_the__precision,_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_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_σ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;_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._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_(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._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 ques ...
._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_Φ−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_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_independence_(probability_theory), independent._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-squar ...
_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,_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_functions__1F_1_and_U. :\begin ___\operatorname\left[X^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._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,_with_mean_0_and_standard_deviation_1/\sigma._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 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 ...
_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_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__cumulants_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 (statistician), Charles Stein, who first publ ...
_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_when_\sigma_=_0. However,_one_can_define_the_normal_distribution_with_zero_variance_as_a_ generalized_function;_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 argum ...
_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 ...
_with_ probability_density_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._A_function_with_two_ Lagrange_multipliers_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_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_statistics,_ scores,_and__estimators_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 ques ...
_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_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-squar ...
_\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 situ ...
_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 ser ...
s. This_theorem_can_also_be_used_to_justify_modeling_the_sum_of_many_uniform_noise_sources_as_ Gaussian_noise._See_ AWGN.


__Operations_and_functions_of_normal_variables_

The_ probability_density,_
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_function, 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-normal_distribution, log-normally:_. *_The_absolute_value_of_X_has_folded_normal_distribution:_._If_\mu_=_0_this_is_known_as_the_half-normal_distribution. *_The_absolute_value_of_normalized_residuals,_, ''X''_−_''μ'', /''σ'',_has_chi_distribution_with_one_degree_of_freedom:_, X_-_\mu, _/_\sigma_\sim_\chi_1. *_The_square_of_''X''/''σ''_has_the_noncentral_chi-squared_distribution_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_distribution, chi-squared. *_The_log_likelihood_of_a_normal_variable_x_is_simply_the_log_of_its__probability_density_function:_\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_distribution, chi-squared_variable. *_The_distribution_of_the_variable_''X''_restricted_to_an_interval_[''a'',_''b'']_is_called_the_truncated_normal_distribution. *_(''X''_−_''μ'')−2_has_a__Lévy_distribution_with_location_0_and_scale_''σ''−2.


_=_Operations_on_two_independent_normal_variables_

= *_If_X_1_and_X_2_are_two_independence_(probability_theory), independent_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,sum_of_normally_distributed_random_variables, [proof]_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. *_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_distribution, stable_(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#Independent_central-normal_distributions, product_distribution_with_density_function_f_Z(z)_=_\pi^_K_0(, z, )_where_K_0_is_the_Macdonald_function, modified_Bessel_function_of_the_second_kind._This_distribution_is_symmetric_around_zero,_unbounded_at_z_=_0,_and_has_the__characteristic_function__\phi_Z(t)_=_(1_+_t^2)^. *_Their_ratio_follows_the_standard__Cauchy_distribution:_X_1/_X_2_\sim_\operatorname(0,_1). *_Their_Euclidean_norm_\sqrt_has_the_Rayleigh_distribution.


__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-squar ...
_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_is_independent_from_the_sample__standard_deviation,_which_can_be_demonstrated_using_Basu's_theorem_or_Cochran's_theorem._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 situ ...
_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_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_distribution, 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_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_(probability), infinite_divisibility. 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_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_...
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'',_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-squar ...
_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,_for_normal_distributions_the_sample_mean_\textstyle\hat\mu_and_the_sample_variance_''s''2_are_independence_(probability_theory), independent,_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 situ ...
_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_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_th_...
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,_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,_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_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_σ2,_the_conjugate_prior_distribution_is_also_normally_distributed. This_can_be_shown_more_easily_by_rewriting_the_variance_as_the__precision,_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_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_σ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;_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._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_(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._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 ques ...
._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_Φ−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_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_independence_(probability_theory), independent._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-squar ...
_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,_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].html"_;"title="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_functions__1F_1_and_U. :\begin ___\operatorname\left[X^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._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,_with_mean_0_and_standard_deviation_1/\sigma._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_ 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__...
_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_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__cumulants_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_(statistician),_Charles_Stein,_who_first_publ_...
_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_when_\sigma_=_0. However,_one_can_define_the_normal_distribution_with_zero_variance_as_a_ generalized_function;_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 argum ...
_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 ...
_with_ probability_density_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._A_function_with_two_ Lagrange_multipliers_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_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_statistics,_ scores,_and__estimators_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 ques ...
_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_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-squar ...
_\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 situ ...
_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 ser ...
s. This_theorem_can_also_be_used_to_justify_modeling_the_sum_of_many_uniform_noise_sources_as_ Gaussian_noise._See_ AWGN.


__Operations_and_functions_of_normal_variables_

The_ probability_density,_
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_function, 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-normal_distribution, log-normally:_. *_The_absolute_value_of_X_has_folded_normal_distribution:_._If_\mu_=_0_this_is_known_as_the_half-normal_distribution. *_The_absolute_value_of_normalized_residuals,_, ''X''_−_''μ'', /''σ'',_has_chi_distribution_with_one_degree_of_freedom:_, X_-_\mu, _/_\sigma_\sim_\chi_1. *_The_square_of_''X''/''σ''_has_the_noncentral_chi-squared_distribution_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_distribution, chi-squared. *_The_log_likelihood_of_a_normal_variable_x_is_simply_the_log_of_its__probability_density_function:_\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_distribution, chi-squared_variable. *_The_distribution_of_the_variable_''X''_restricted_to_an_interval_[''a'',_''b'']_is_called_the_truncated_normal_distribution. *_(''X''_−_''μ'')−2_has_a__Lévy_distribution_with_location_0_and_scale_''σ''−2.


_=_Operations_on_two_independent_normal_variables_

= *_If_X_1_and_X_2_are_two_independence_(probability_theory), independent_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,sum_of_normally_distributed_random_variables, [proof]_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. *_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_distribution, stable_(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#Independent_central-normal_distributions, product_distribution_with_density_function_f_Z(z)_=_\pi^_K_0(, z, )_where_K_0_is_the_Macdonald_function, modified_Bessel_function_of_the_second_kind._This_distribution_is_symmetric_around_zero,_unbounded_at_z_=_0,_and_has_the__characteristic_function__\phi_Z(t)_=_(1_+_t^2)^. *_Their_ratio_follows_the_standard__Cauchy_distribution:_X_1/_X_2_\sim_\operatorname(0,_1). *_Their_Euclidean_norm_\sqrt_has_the_Rayleigh_distribution.


__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-squar ...
_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_is_independent_from_the_sample__standard_deviation,_which_can_be_demonstrated_using_Basu's_theorem_or_Cochran's_theorem._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 situ ...
_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_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_distribution, 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_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_(probability), infinite_divisibility. 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_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_...
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'',_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-squar ...
_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,_for_normal_distributions_the_sample_mean_\textstyle\hat\mu_and_the_sample_variance_''s''2_are_independence_(probability_theory), independent,_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 situ ...
_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_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_th_...
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,_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,_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_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_σ2,_the_conjugate_prior_distribution_is_also_normally_distributed. This_can_be_shown_more_easily_by_rewriting_the_variance_as_the__precision,_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_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_σ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;_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._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_(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._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 ques ...
._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_Φ−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_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_independence_(probability_theory), independent._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-squar ...
_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,_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_functions__1F_1_and_U. :\begin ___\operatorname\left[X^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._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,_with_mean_0_and_standard_deviation_1/\sigma._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_ 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__...
_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_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__cumulants_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_(statistician),_Charles_Stein,_who_first_publ_...
_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_when_\sigma_=_0. However,_one_can_define_the_normal_distribution_with_zero_variance_as_a_ generalized_function;_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 argum ...
_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 ...
_with_ probability_density_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._A_function_with_two_ Lagrange_multipliers_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_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_statistics,_ scores,_and__estimators_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 ques ...
_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_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-squar ...
_\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 situ ...
_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 ser ...
s. This_theorem_can_also_be_used_to_justify_modeling_the_sum_of_many_uniform_noise_sources_as_ Gaussian_noise._See_ AWGN.


__Operations_and_functions_of_normal_variables_

The_ probability_density,_
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_function, 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-normal_distribution, log-normally:_. *_The_absolute_value_of_X_has_folded_normal_distribution:_._If_\mu_=_0_this_is_known_as_the_half-normal_distribution. *_The_absolute_value_of_normalized_residuals,_, ''X''_−_''μ'', /''σ'',_has_chi_distribution_with_one_degree_of_freedom:_, X_-_\mu, _/_\sigma_\sim_\chi_1. *_The_square_of_''X''/''σ''_has_the_noncentral_chi-squared_distribution_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_distribution, chi-squared. *_The_log_likelihood_of_a_normal_variable_x_is_simply_the_log_of_its__probability_density_function:_\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_distribution, chi-squared_variable. *_The_distribution_of_the_variable_''X''_restricted_to_an_interval_[''a'',_''b'']_is_called_the_truncated_normal_distribution. *_(''X''_−_''μ'')−2_has_a__Lévy_distribution_with_location_0_and_scale_''σ''−2.


_=_Operations_on_two_independent_normal_variables_

= *_If_X_1_and_X_2_are_two_independence_(probability_theory), independent_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,sum_of_normally_distributed_random_variables, [proof]_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. *_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_distribution, stable_(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#Independent_central-normal_distributions, product_distribution_with_density_function_f_Z(z)_=_\pi^_K_0(, z, )_where_K_0_is_the_Macdonald_function, modified_Bessel_function_of_the_second_kind._This_distribution_is_symmetric_around_zero,_unbounded_at_z_=_0,_and_has_the__characteristic_function__\phi_Z(t)_=_(1_+_t^2)^. *_Their_ratio_follows_the_standard__Cauchy_distribution:_X_1/_X_2_\sim_\operatorname(0,_1). *_Their_Euclidean_norm_\sqrt_has_the_Rayleigh_distribution.


__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-squar ...
_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_is_independent_from_the_sample__standard_deviation,_which_can_be_demonstrated_using_Basu's_theorem_or_Cochran's_theorem._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 situ ...
_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_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_distribution, 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_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_(probability), infinite_divisibility. 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_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_...
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'',_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-squar ...
_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,_for_normal_distributions_the_sample_mean_\textstyle\hat\mu_and_the_sample_variance_''s''2_are_independence_(probability_theory), independent,_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 situ ...
_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_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_th_...
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,_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,_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_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_σ2,_the_conjugate_prior_distribution_is_also_normally_distributed. This_can_be_shown_more_easily_by_rewriting_the_variance_as_the__precision,_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_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_σ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;_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._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_(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._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 ques ...
._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_Φ−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_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_independence_(probability_theory), independent._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-squar ...
_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,_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].html"_;"title="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._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,_with_mean_0_and_standard_deviation_1/\sigma._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_ 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__...
_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_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__cumulants_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_(statistician),_Charles_Stein,_who_first_publ_...
_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_when_\sigma_=_0. However,_one_can_define_the_normal_distribution_with_zero_variance_as_a_ generalized_function;_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 argum ...
_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 ...
_with_ probability_density_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._A_function_with_two_ Lagrange_multipliers_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_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_statistics,_ scores,_and__estimators_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 ques ...
_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_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-squar ...
_\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 situ ...
_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 ser ...
s. This_theorem_can_also_be_used_to_justify_modeling_the_sum_of_many_uniform_noise_sources_as_ Gaussian_noise._See_ AWGN.


__Operations_and_functions_of_normal_variables_

The_ probability_density,_
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_function, 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-normal_distribution, log-normally:_. *_The_absolute_value_of_X_has_folded_normal_distribution:_._If_\mu_=_0_this_is_known_as_the_half-normal_distribution. *_The_absolute_value_of_normalized_residuals,_, ''X''_−_''μ'', /''σ'',_has_chi_distribution_with_one_degree_of_freedom:_, X_-_\mu, _/_\sigma_\sim_\chi_1. *_The_square_of_''X''/''σ''_has_the_noncentral_chi-squared_distribution_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_distribution, chi-squared. *_The_log_likelihood_of_a_normal_variable_x_is_simply_the_log_of_its__probability_density_function:_\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_distribution, chi-squared_variable. *_The_distribution_of_the_variable_''X''_restricted_to_an_interval_[''a'',_''b'']_is_called_the_truncated_normal_distribution. *_(''X''_−_''μ'')−2_has_a__Lévy_distribution_with_location_0_and_scale_''σ''−2.


_=_Operations_on_two_independent_normal_variables_

= *_If_X_1_and_X_2_are_two_independence_(probability_theory), independent_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,sum_of_normally_distributed_random_variables, [proof]_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. *_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_distribution, stable_(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#Independent_central-normal_distributions, product_distribution_with_density_function_f_Z(z)_=_\pi^_K_0(, z, )_where_K_0_is_the_Macdonald_function, modified_Bessel_function_of_the_second_kind._This_distribution_is_symmetric_around_zero,_unbounded_at_z_=_0,_and_has_the__characteristic_function__\phi_Z(t)_=_(1_+_t^2)^. *_Their_ratio_follows_the_standard__Cauchy_distribution:_X_1/_X_2_\sim_\operatorname(0,_1). *_Their_Euclidean_norm_\sqrt_has_the_Rayleigh_distribution.


__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-squar ...
_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_is_independent_from_the_sample__standard_deviation,_which_can_be_demonstrated_using_Basu's_theorem_or_Cochran's_theorem._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 situ ...
_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_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_distribution, 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_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_(probability), infinite_divisibility. 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_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_...
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'',_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-squar ...
_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,_for_normal_distributions_the_sample_mean_\textstyle\hat\mu_and_the_sample_variance_''s''2_are_independence_(probability_theory), independent,_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 situ ...
_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_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_th_...
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,_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,_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_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_σ2,_the_conjugate_prior_distribution_is_also_normally_distributed. This_can_be_shown_more_easily_by_rewriting_the_variance_as_the__precision,_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_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_σ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;_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._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_(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._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 ques ...
._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_Φ−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_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_independence_(probability_theory), independent._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-squar ...
_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,_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].html"_;"title="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_functions__1F_1_and_U. :\begin ___\operatorname\left[X^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[X_\mid_a 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._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_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._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_standard_deviation_1/\sigma._In_particular,_the_standard_normal_distribution_\varphi_is_an_Fourier_transform#Eigenfunctions, 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_(probability_theory), characteristic_function_\varphi_X(t)_of_that_variable,_which_is_defined_as_the_expected_value_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_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[e^]_=_\hat_f(it)_=_e^_e^ 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 Since_this_is_a_quadratic_polynomial_in_t,_only_the_first_two__cumulants_are_nonzero,_namely_the_mean \mu_and_the_variance \sigma^2.


__Stein_operator_and_class_

Within_Stein's_method_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_when_\sigma_=_0. However,_one_can_define_the_normal_distribution_with_zero_variance_as_a_ generalized_function;_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 argum ...
_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 ...
_with_ probability_density_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._A_function_with_two_ Lagrange_multipliers_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_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_statistics,_ scores,_and__estimators_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 ques ...
_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_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-squar ...
_\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 situ ...
_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 ser ...
s. This_theorem_can_also_be_used_to_justify_modeling_the_sum_of_many_uniform_noise_sources_as_ Gaussian_noise._See_ AWGN.


__Operations_and_functions_of_normal_variables_

The_ probability_density,_
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_function, 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-normal_distribution, log-normally:_. *_The_absolute_value_of_X_has_folded_normal_distribution:_._If_\mu_=_0_this_is_known_as_the_half-normal_distribution. *_The_absolute_value_of_normalized_residuals,_, ''X''_−_''μ'', /''σ'',_has_chi_distribution_with_one_degree_of_freedom:_, X_-_\mu, _/_\sigma_\sim_\chi_1. *_The_square_of_''X''/''σ''_has_the_noncentral_chi-squared_distribution_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_distribution, chi-squared. *_The_log_likelihood_of_a_normal_variable_x_is_simply_the_log_of_its__probability_density_function:_\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_distribution, chi-squared_variable. *_The_distribution_of_the_variable_''X''_restricted_to_an_interval_[''a'',_''b'']_is_called_the_truncated_normal_distribution. *_(''X''_−_''μ'')−2_has_a__Lévy_distribution_with_location_0_and_scale_''σ''−2.


_=_Operations_on_two_independent_normal_variables_

= *_If_X_1_and_X_2_are_two_independence_(probability_theory), independent_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,sum_of_normally_distributed_random_variables, [proof]_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. *_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_distribution, stable_(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#Independent_central-normal_distributions, product_distribution_with_density_function_f_Z(z)_=_\pi^_K_0(, z, )_where_K_0_is_the_Macdonald_function, modified_Bessel_function_of_the_second_kind._This_distribution_is_symmetric_around_zero,_unbounded_at_z_=_0,_and_has_the_characteristic_function_(probability_theory), characteristic_function__\phi_Z(t)_=_(1_+_t^2)^. *_Their_ratio_follows_the_standard__Cauchy_distribution:_X_1/_X_2_\sim_\operatorname(0,_1). *_Their_Euclidean_norm_\sqrt_has_the_Rayleigh_distribution.


__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-squar ...
_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_is_independent_from_the_sample__standard_deviation,_which_can_be_demonstrated_using_Basu's_theorem_or_Cochran's_theorem._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 situ ...
_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_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_distribution, 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_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_(probability), infinite_divisibility. 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_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_...
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'',_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-squar ...
_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,_for_normal_distributions_the_sample_mean_\textstyle\hat\mu_and_the_sample_variance_''s''2_are_independence_(probability_theory), independent,_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 situ ...
_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_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_th_...
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,_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,_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_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_σ2,_the_conjugate_prior_distribution_is_also_normally_distributed. This_can_be_shown_more_easily_by_rewriting_the_variance_as_the__precision,_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_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_σ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;_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._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_(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._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 ques ...
._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_Φ−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_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_independence_(probability_theory), independent._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-squar ...
_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,_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_functions__1F_1_and_U. :\begin ___\operatorname\left[X^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[X_\mid_a 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._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_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._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_standard_deviation_1/\sigma._In_particular,_the_standard_normal_distribution_\varphi_is_an_Fourier_transform#Eigenfunctions, 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_(probability_theory), characteristic_function_\varphi_X(t)_of_that_variable,_which_is_defined_as_the_expected_value_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_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[e^]_=_\hat_f(it)_=_e^_e^ 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 Since_this_is_a_quadratic_polynomial_in_t,_only_the_first_two__cumulants_are_nonzero,_namely_the_mean \mu_and_the_variance \sigma^2.


__Stein_operator_and_class_

Within_Stein's_method_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_when_\sigma_=_0. However,_one_can_define_the_normal_distribution_with_zero_variance_as_a_ generalized_function;_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 argum ...
_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 ...
_with_ probability_density_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._A_function_with_two_ Lagrange_multipliers_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_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_statistics,_ scores,_and__estimators_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 ques ...
_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_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-squar ...
_\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 situ ...
_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 ser ...
s. This_theorem_can_also_be_used_to_justify_modeling_the_sum_of_many_uniform_noise_sources_as_ Gaussian_noise._See_ AWGN.


__Operations_and_functions_of_normal_variables_

The_ probability_density,_
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_function, 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-normal_distribution, log-normally:_. *_The_absolute_value_of_X_has_folded_normal_distribution:_._If_\mu_=_0_this_is_known_as_the_half-normal_distribution. *_The_absolute_value_of_normalized_residuals,_, ''X''_−_''μ'', /''σ'',_has_chi_distribution_with_one_degree_of_freedom:_, X_-_\mu, _/_\sigma_\sim_\chi_1. *_The_square_of_''X''/''σ''_has_the_noncentral_chi-squared_distribution_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_distribution, chi-squared. *_The_log_likelihood_of_a_normal_variable_x_is_simply_the_log_of_its__probability_density_function:_\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_distribution, chi-squared_variable. *_The_distribution_of_the_variable_''X''_restricted_to_an_interval_[''a'',_''b'']_is_called_the_truncated_normal_distribution. *_(''X''_−_''μ'')−2_has_a__Lévy_distribution_with_location_0_and_scale_''σ''−2.


_=_Operations_on_two_independent_normal_variables_

= *_If_X_1_and_X_2_are_two_independence_(probability_theory), independent_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,sum_of_normally_distributed_random_variables, [proof]_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. *_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_distribution, stable_(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#Independent_central-normal_distributions, product_distribution_with_density_function_f_Z(z)_=_\pi^_K_0(, z, )_where_K_0_is_the_Macdonald_function, modified_Bessel_function_of_the_second_kind._This_distribution_is_symmetric_around_zero,_unbounded_at_z_=_0,_and_has_the_characteristic_function_(probability_theory), characteristic_function__\phi_Z(t)_=_(1_+_t^2)^. *_Their_ratio_follows_the_standard__Cauchy_distribution:_X_1/_X_2_\sim_\operatorname(0,_1). *_Their_Euclidean_norm_\sqrt_has_the_Rayleigh_distribution.


__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-squar ...
_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_is_independent_from_the_sample__standard_deviation,_which_can_be_demonstrated_using_Basu's_theorem_or_Cochran's_theorem._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 situ ...
_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_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_distribution, 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_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_(probability), infinite_divisibility. 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_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_...
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'',_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-squar ...
_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,_for_normal_distributions_the_sample_mean_\textstyle\hat\mu_and_the_sample_variance_''s''2_are_independence_(probability_theory), independent,_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 situ ...
_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_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_th_...
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,_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,_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_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_σ2,_the_conjugate_prior_distribution_is_also_normally_distributed. This_can_be_shown_more_easily_by_rewriting_the_variance_as_the__precision,_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_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_σ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;_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._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_(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._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 ques ...
._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_Φ−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_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_independence_(probability_theory), independent._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-squar ...
_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,_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._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,_with_mean_0_and_standard_deviation_1/\sigma._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_ 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__...
_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_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__cumulants_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_(statistician),_Charles_Stein,_who_first_publ_...
_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_when_\sigma_=_0. However,_one_can_define_the_normal_distribution_with_zero_variance_as_a_ generalized_function;_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 argum ...
_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 ...
_with_ probability_density_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._A_function_with_two_ Lagrange_multipliers_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_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_statistics,_ scores,_and__estimators_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 ques ...
_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_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-squar ...
_\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 situ ...
_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 ser ...
s. This_theorem_can_also_be_used_to_justify_modeling_the_sum_of_many_uniform_noise_sources_as_ Gaussian_noise._See_ AWGN.


__Operations_and_functions_of_normal_variables_

The_ probability_density,_
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_function, 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-normal_distribution, log-normally:_. *_The_absolute_value_of_X_has_folded_normal_distribution:_._If_\mu_=_0_this_is_known_as_the_half-normal_distribution. *_The_absolute_value_of_normalized_residuals,_, ''X''_−_''μ'', /''σ'',_has_chi_distribution_with_one_degree_of_freedom:_, X_-_\mu, _/_\sigma_\sim_\chi_1. *_The_square_of_''X''/''σ''_has_the_noncentral_chi-squared_distribution_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_distribution, chi-squared. *_The_log_likelihood_of_a_normal_variable_x_is_simply_the_log_of_its__probability_density_function:_\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_distribution, chi-squared_variable. *_The_distribution_of_the_variable_''X''_restricted_to_an_interval_[''a'',_''b'']_is_called_the_truncated_normal_distribution. *_(''X''_−_''μ'')−2_has_a__Lévy_distribution_with_location_0_and_scale_''σ''−2.


_=_Operations_on_two_independent_normal_variables_

= *_If_X_1_and_X_2_are_two_independence_(probability_theory), independent_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,sum_of_normally_distributed_random_variables, [proof]_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. *_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_distribution, stable_(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#Independent_central-normal_distributions, product_distribution_with_density_function_f_Z(z)_=_\pi^_K_0(, z, )_where_K_0_is_the_Macdonald_function, modified_Bessel_function_of_the_second_kind._This_distribution_is_symmetric_around_zero,_unbounded_at_z_=_0,_and_has_the__characteristic_function__\phi_Z(t)_=_(1_+_t^2)^. *_Their_ratio_follows_the_standard__Cauchy_distribution:_X_1/_X_2_\sim_\operatorname(0,_1). *_Their_Euclidean_norm_\sqrt_has_the_Rayleigh_distribution.


__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-squar ...
_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_is_independent_from_the_sample__standard_deviation,_which_can_be_demonstrated_using_Basu's_theorem_or_Cochran's_theorem._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 situ ...
_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_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_distribution, 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_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_(probability), infinite_divisibility. 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_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_...
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'',_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-squar ...
_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,_for_normal_distributions_the_sample_mean_\textstyle\hat\mu_and_the_sample_variance_''s''2_are_independence_(probability_theory), independent,_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 situ ...
_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_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_th_...
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,_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,_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_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_σ2,_the_conjugate_prior_distribution_is_also_normally_distributed. This_can_be_shown_more_easily_by_rewriting_the_variance_as_the__precision,_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_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_σ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;_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._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_(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._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 ques ...
._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_Φ−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_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_independence_(probability_theory), independent._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-squar ...
_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,_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].html"_;"title="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_functions__1F_1_and_U. :\begin ___\operatorname\left[X^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[X_\mid_a 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._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_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._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_standard_deviation_1/\sigma._In_particular,_the_standard_normal_distribution_\varphi_is_an_Fourier_transform#Eigenfunctions, 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_(probability_theory), characteristic_function_\varphi_X(t)_of_that_variable,_which_is_defined_as_the_expected_value_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_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[e^]_=_\hat_f(it)_=_e^_e^ 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 Since_this_is_a_quadratic_polynomial_in_t,_only_the_first_two__cumulants_are_nonzero,_namely_the_mean \mu_and_the_variance \sigma^2.


__Stein_operator_and_class_

Within_Stein's_method_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_when_\sigma_=_0. However,_one_can_define_the_normal_distribution_with_zero_variance_as_a_ generalized_function;_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 argum ...
_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 ...
_with_ probability_density_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._A_function_with_two_ Lagrange_multipliers_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_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_statistics,_ scores,_and__estimators_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 ques ...
_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_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-squar ...
_\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 situ ...
_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 ser ...
s. This_theorem_can_also_be_used_to_justify_modeling_the_sum_of_many_uniform_noise_sources_as_ Gaussian_noise._See_ AWGN.


__Operations_and_functions_of_normal_variables_

The_ probability_density,_
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_function, 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-normal_distribution, log-normally:_. *_The_absolute_value_of_X_has_folded_normal_distribution:_._If_\mu_=_0_this_is_known_as_the_half-normal_distribution. *_The_absolute_value_of_normalized_residuals,_, ''X''_−_''μ'', /''σ'',_has_chi_distribution_with_one_degree_of_freedom:_, X_-_\mu, _/_\sigma_\sim_\chi_1. *_The_square_of_''X''/''σ''_has_the_noncentral_chi-squared_distribution_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_distribution, chi-squared. *_The_log_likelihood_of_a_normal_variable_x_is_simply_the_log_of_its__probability_density_function:_\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_distribution, chi-squared_variable. *_The_distribution_of_the_variable_''X''_restricted_to_an_interval_[''a'',_''b'']_is_called_the_truncated_normal_distribution. *_(''X''_−_''μ'')−2_has_a__Lévy_distribution_with_location_0_and_scale_''σ''−2.


_=_Operations_on_two_independent_normal_variables_

= *_If_X_1_and_X_2_are_two_independence_(probability_theory), independent_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,sum_of_normally_distributed_random_variables, [proof]_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. *_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_distribution, stable_(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#Independent_central-normal_distributions, product_distribution_with_density_function_f_Z(z)_=_\pi^_K_0(, z, )_where_K_0_is_the_Macdonald_function, modified_Bessel_function_of_the_second_kind._This_distribution_is_symmetric_around_zero,_unbounded_at_z_=_0,_and_has_the_characteristic_function_(probability_theory), characteristic_function__\phi_Z(t)_=_(1_+_t^2)^. *_Their_ratio_follows_the_standard__Cauchy_distribution:_X_1/_X_2_\sim_\operatorname(0,_1). *_Their_Euclidean_norm_\sqrt_has_the_Rayleigh_distribution.


__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-squar ...
_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_is_independent_from_the_sample__standard_deviation,_which_can_be_demonstrated_using_Basu's_theorem_or_Cochran's_theorem._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 situ ...
_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_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_distribution, 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_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_(probability), infinite_divisibility. 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_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_...
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'',_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-squar ...
_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,_for_normal_distributions_the_sample_mean_\textstyle\hat\mu_and_the_sample_variance_''s''2_are_independence_(probability_theory), independent,_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 situ ...
_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_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_th_...
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,_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,_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_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_σ2,_the_conjugate_prior_distribution_is_also_normally_distributed. This_can_be_shown_more_easily_by_rewriting_the_variance_as_the__precision,_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_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_σ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;_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._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_(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._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 ques ...
._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_Φ−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_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_independence_(probability_theory), independent._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-squar ...
_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,_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_functions__1F_1_and_U. :\begin ___\operatorname\left[X^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[X_\mid_a 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._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_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._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_standard_deviation_1/\sigma._In_particular,_the_standard_normal_distribution_\varphi_is_an_Fourier_transform#Eigenfunctions, 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_(probability_theory), characteristic_function_\varphi_X(t)_of_that_variable,_which_is_defined_as_the_expected_value_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_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[e^]_=_\hat_f(it)_=_e^_e^ 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 Since_this_is_a_quadratic_polynomial_in_t,_only_the_first_two__cumulants_are_nonzero,_namely_the_mean \mu_and_the_variance \sigma^2.


__Stein_operator_and_class_

Within_Stein's_method_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_when_\sigma_=_0. However,_one_can_define_the_normal_distribution_with_zero_variance_as_a_ generalized_function;_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 argum ...
_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 ...
_with_ probability_density_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._A_function_with_two_ Lagrange_multipliers_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_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_statistics,_ scores,_and__estimators_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 ques ...
_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_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-squar ...
_\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 situ ...
_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 ser ...
s. This_theorem_can_also_be_used_to_justify_modeling_the_sum_of_many_uniform_noise_sources_as_ Gaussian_noise._See_ AWGN.


__Operations_and_functions_of_normal_variables_

The_ probability_density,_
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_function, 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-normal_distribution, log-normally:_. *_The_absolute_value_of_X_has_folded_normal_distribution:_._If_\mu_=_0_this_is_known_as_the_half-normal_distribution. *_The_absolute_value_of_normalized_residuals,_, ''X''_−_''μ'', /''σ'',_has_chi_distribution_with_one_degree_of_freedom:_, X_-_\mu, _/_\sigma_\sim_\chi_1. *_The_square_of_''X''/''σ''_has_the_noncentral_chi-squared_distribution_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_distribution, chi-squared. *_The_log_likelihood_of_a_normal_variable_x_is_simply_the_log_of_its__probability_density_function:_\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_distribution, chi-squared_variable. *_The_distribution_of_the_variable_''X''_restricted_to_an_interval_[''a'',_''b'']_is_called_the_truncated_normal_distribution. *_(''X''_−_''μ'')−2_has_a__Lévy_distribution_with_location_0_and_scale_''σ''−2.


_=_Operations_on_two_independent_normal_variables_

= *_If_X_1_and_X_2_are_two_independence_(probability_theory), independent_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,sum_of_normally_distributed_random_variables, [proof]_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. *_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_distribution, stable_(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#Independent_central-normal_distributions, product_distribution_with_density_function_f_Z(z)_=_\pi^_K_0(, z, )_where_K_0_is_the_Macdonald_function, modified_Bessel_function_of_the_second_kind._This_distribution_is_symmetric_around_zero,_unbounded_at_z_=_0,_and_has_the_characteristic_function_(probability_theory), characteristic_function__\phi_Z(t)_=_(1_+_t^2)^. *_Their_ratio_follows_the_standard__Cauchy_distribution:_X_1/_X_2_\sim_\operatorname(0,_1). *_Their_Euclidean_norm_\sqrt_has_the_Rayleigh_distribution.


__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-squar ...
_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_is_independent_from_the_sample__standard_deviation,_which_can_be_demonstrated_using_Basu's_theorem_or_Cochran's_theorem._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 situ ...
_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_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_distribution, 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_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_(probability), infinite_divisibility. 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_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_...
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'',_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-squar ...
_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,_for_normal_distributions_the_sample_mean_\textstyle\hat\mu_and_the_sample_variance_''s''2_are_independence_(probability_theory), independent,_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 situ ...
_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_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_th_...
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,_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,_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_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_σ2,_the_conjugate_prior_distribution_is_also_normally_distributed. This_can_be_shown_more_easily_by_rewriting_the_variance_as_the__precision,_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_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_σ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;_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._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_(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._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 ques ...
._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_Φ−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_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_independence_(probability_theory), independent._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-squar ...
_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,_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].html" ;"title="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_when_\sigma_=_0. However,_one_can_define_the_normal_distribution_with_zero_variance_as_a_ generalized_function;_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 argum ...
_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 ...
_with_ probability_density_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._A_function_with_two_ Lagrange_multipliers_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_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_statistics,_ scores,_and__estimators_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 ques ...
_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_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-squar ...
_\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 situ ...
_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 ser ...
s. This_theorem_can_also_be_used_to_justify_modeling_the_sum_of_many_uniform_noise_sources_as_ Gaussian_noise._See_ AWGN.


__Operations_and_functions_of_normal_variables_

The_ probability_density,_
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_function, 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-normal_distribution, log-normally:_. *_The_absolute_value_of_X_has_folded_normal_distribution:_._If_\mu_=_0_this_is_known_as_the_half-normal_distribution. *_The_absolute_value_of_normalized_residuals,_, ''X''_−_''μ'', /''σ'',_has_chi_distribution_with_one_degree_of_freedom:_, X_-_\mu, _/_\sigma_\sim_\chi_1. *_The_square_of_''X''/''σ''_has_the_noncentral_chi-squared_distribution_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_distribution, chi-squared. *_The_log_likelihood_of_a_normal_variable_x_is_simply_the_log_of_its__probability_density_function:_\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_distribution, chi-squared_variable. *_The_distribution_of_the_variable_''X''_restricted_to_an_interval_[''a'',_''b'']_is_called_the_truncated_normal_distribution. *_(''X''_−_''μ'')−2_has_a__Lévy_distribution_with_location_0_and_scale_''σ''−2.


_=_Operations_on_two_independent_normal_variables_

= *_If_X_1_and_X_2_are_two_independence_(probability_theory), independent_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,sum_of_normally_distributed_random_variables, [proof]_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. *_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_distribution, stable_(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#Independent_central-normal_distributions, product_distribution_with_density_function_f_Z(z)_=_\pi^_K_0(, z, )_where_K_0_is_the_Macdonald_function, modified_Bessel_function_of_the_second_kind._This_distribution_is_symmetric_around_zero,_unbounded_at_z_=_0,_and_has_the_ characteristic_function__\phi_Z(t)_=_(1_+_t^2)^. *_Their_ratio_follows_the_standard__Cauchy_distribution:_X_1/_X_2_\sim_\operatorname(0,_1). *_Their_Euclidean_norm_\sqrt_has_the_Rayleigh_distribution.


__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-squar ...
_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_is_independent_from_the_sample__standard_deviation,_which_can_be_demonstrated_using_Basu's_theorem_or_Cochran's_theorem._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 situ ...
_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_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_distribution, 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_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_(probability), infinite_divisibility. 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_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_...
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'',_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-squar ...
_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,_for_normal_distributions_the_sample_mean_\textstyle\hat\mu_and_the_sample_variance_''s''2_are_independence_(probability_theory), independent,_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 situ ...
_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_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_th_...
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,_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,_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_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_σ2,_the_conjugate_prior_distribution_is_also_normally_distributed. This_can_be_shown_more_easily_by_rewriting_the_variance_as_the__precision,_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_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_σ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;_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._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_(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._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 ques ...
._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_Φ−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_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_independence_(probability_theory), independent._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-squar ...
_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,_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].html"_;"title="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_functions__1F_1_and_U. :\begin ___\operatorname\left[X^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._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,_with_mean_0_and_standard_deviation_1/\sigma._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 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 ...
_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_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__cumulants_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 (statistician), Charles Stein, who first publ ...
_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_when_\sigma_=_0. However,_one_can_define_the_normal_distribution_with_zero_variance_as_a_ generalized_function;_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 argum ...
_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 ...
_with_ probability_density_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._A_function_with_two_ Lagrange_multipliers_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_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_statistics,_ scores,_and__estimators_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 ques ...
_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_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-squar ...
_\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 situ ...
_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 ser ...
s. This_theorem_can_also_be_used_to_justify_modeling_the_sum_of_many_uniform_noise_sources_as_ Gaussian_noise._See_ AWGN.


__Operations_and_functions_of_normal_variables_

The_ probability_density,_
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_function, 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-normal_distribution, log-normally:_. *_The_absolute_value_of_X_has_folded_normal_distribution:_._If_\mu_=_0_this_is_known_as_the_half-normal_distribution. *_The_absolute_value_of_normalized_residuals,_, ''X''_−_''μ'', /''σ'',_has_chi_distribution_with_one_degree_of_freedom:_, X_-_\mu, _/_\sigma_\sim_\chi_1. *_The_square_of_''X''/''σ''_has_the_noncentral_chi-squared_distribution_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_distribution, chi-squared. *_The_log_likelihood_of_a_normal_variable_x_is_simply_the_log_of_its__probability_density_function:_\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_distribution, chi-squared_variable. *_The_distribution_of_the_variable_''X''_restricted_to_an_interval_[''a'',_''b'']_is_called_the_truncated_normal_distribution. *_(''X''_−_''μ'')−2_has_a__Lévy_distribution_with_location_0_and_scale_''σ''−2.


_=_Operations_on_two_independent_normal_variables_

= *_If_X_1_and_X_2_are_two_independence_(probability_theory), independent_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,sum_of_normally_distributed_random_variables, [proof]_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. *_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_distribution, stable_(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#Independent_central-normal_distributions, product_distribution_with_density_function_f_Z(z)_=_\pi^_K_0(, z, )_where_K_0_is_the_Macdonald_function, modified_Bessel_function_of_the_second_kind._This_distribution_is_symmetric_around_zero,_unbounded_at_z_=_0,_and_has_the_ characteristic_function__\phi_Z(t)_=_(1_+_t^2)^. *_Their_ratio_follows_the_standard__Cauchy_distribution:_X_1/_X_2_\sim_\operatorname(0,_1). *_Their_Euclidean_norm_\sqrt_has_the_Rayleigh_distribution.


__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-squar ...
_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_is_independent_from_the_sample__standard_deviation,_which_can_be_demonstrated_using_Basu's_theorem_or_Cochran's_theorem._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 situ ...
_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_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_distribution, 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_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_(probability), infinite_divisibility. 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_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_...
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'',_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-squar ...
_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,_for_normal_distributions_the_sample_mean_\textstyle\hat\mu_and_the_sample_variance_''s''2_are_independence_(probability_theory), independent,_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 situ ...
_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_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_th_...
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,_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,_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_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_σ2,_the_conjugate_prior_distribution_is_also_normally_distributed. This_can_be_shown_more_easily_by_rewriting_the_variance_as_the__precision,_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_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_σ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;_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._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_(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._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 ques ...
._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_Φ−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_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_independence_(probability_theory), independent._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-squar ...
_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,_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_functions__1F_1_and_U. :\begin ___\operatorname\left[X^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._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,_with_mean_0_and_standard_deviation_1/\sigma._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 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 ...
_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_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__cumulants_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 (statistician), Charles Stein, who first publ ...
_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_when_\sigma_=_0. However,_one_can_define_the_normal_distribution_with_zero_variance_as_a_ generalized_function;_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 argum ...
_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 ...
_with_ probability_density_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._A_function_with_two_ Lagrange_multipliers_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_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_statistics,_ scores,_and__estimators_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 ques ...
_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_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-squar ...
_\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 situ ...
_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 ser ...
s. This_theorem_can_also_be_used_to_justify_modeling_the_sum_of_many_uniform_noise_sources_as_ Gaussian_noise._See_ AWGN.


__Operations_and_functions_of_normal_variables_

The_ probability_density,_
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_function, 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-normal_distribution, log-normally:_. *_The_absolute_value_of_X_has_folded_normal_distribution:_._If_\mu_=_0_this_is_known_as_the_half-normal_distribution. *_The_absolute_value_of_normalized_residuals,_, ''X''_−_''μ'', /''σ'',_has_chi_distribution_with_one_degree_of_freedom:_, X_-_\mu, _/_\sigma_\sim_\chi_1. *_The_square_of_''X''/''σ''_has_the_noncentral_chi-squared_distribution_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_distribution, chi-squared. *_The_log_likelihood_of_a_normal_variable_x_is_simply_the_log_of_its__probability_density_function:_\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_distribution, chi-squared_variable. *_The_distribution_of_the_variable_''X''_restricted_to_an_interval_[''a'',_''b'']_is_called_the_truncated_normal_distribution. *_(''X''_−_''μ'')−2_has_a__Lévy_distribution_with_location_0_and_scale_''σ''−2.


_=_Operations_on_two_independent_normal_variables_

= *_If_X_1_and_X_2_are_two_independence_(probability_theory), independent_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,sum_of_normally_distributed_random_variables, [proof]_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. *_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_distribution, stable_(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#Independent_central-normal_distributions, product_distribution_with_density_function_f_Z(z)_=_\pi^_K_0(, z, )_where_K_0_is_the_Macdonald_function, modified_Bessel_function_of_the_second_kind._This_distribution_is_symmetric_around_zero,_unbounded_at_z_=_0,_and_has_the_ characteristic_function__\phi_Z(t)_=_(1_+_t^2)^. *_Their_ratio_follows_the_standard__Cauchy_distribution:_X_1/_X_2_\sim_\operatorname(0,_1). *_Their_Euclidean_norm_\sqrt_has_the_Rayleigh_distribution.


__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-squar ...
_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_is_independent_from_the_sample__standard_deviation,_which_can_be_demonstrated_using_Basu's_theorem_or_Cochran's_theorem._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 situ ...
_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_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_distribution, 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_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_(probability), infinite_divisibility. 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_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_...
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'',_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-squar ...
_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,_for_normal_distributions_the_sample_mean_\textstyle\hat\mu_and_the_sample_variance_''s''2_are_independence_(probability_theory), independent,_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 situ ...
_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_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_th_...
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,_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,_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_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_σ2,_the_conjugate_prior_distribution_is_also_normally_distributed. This_can_be_shown_more_easily_by_rewriting_the_variance_as_the__precision,_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_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_σ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;_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._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_(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._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 ques ...
._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_Φ−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_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_independence_(probability_theory), independent._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-squar ...
_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,_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].html" ;"title="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._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,_with_mean_0_and_standard_deviation_1/\sigma._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 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 ...
_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_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__cumulants_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 (statistician), Charles Stein, who first publ ...
_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_when_\sigma_=_0. However,_one_can_define_the_normal_distribution_with_zero_variance_as_a_ generalized_function;_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 argum ...
_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 ...
_with_ probability_density_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._A_function_with_two_ Lagrange_multipliers_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_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_statistics,_ scores,_and__estimators_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 ques ...
_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_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-squar ...
_\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 situ ...
_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 ser ...
s. This_theorem_can_also_be_used_to_justify_modeling_the_sum_of_many_uniform_noise_sources_as_ Gaussian_noise._See_ AWGN.


__Operations_and_functions_of_normal_variables_

The_ probability_density,_
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_function, 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-normal_distribution, log-normally:_. *_The_absolute_value_of_X_has_folded_normal_distribution:_._If_\mu_=_0_this_is_known_as_the_half-normal_distribution. *_The_absolute_value_of_normalized_residuals,_, ''X''_−_''μ'', /''σ'',_has_chi_distribution_with_one_degree_of_freedom:_, X_-_\mu, _/_\sigma_\sim_\chi_1. *_The_square_of_''X''/''σ''_has_the_noncentral_chi-squared_distribution_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_distribution, chi-squared. *_The_log_likelihood_of_a_normal_variable_x_is_simply_the_log_of_its__probability_density_function:_\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_distribution, chi-squared_variable. *_The_distribution_of_the_variable_''X''_restricted_to_an_interval_[''a'',_''b'']_is_called_the_truncated_normal_distribution. *_(''X''_−_''μ'')−2_has_a__Lévy_distribution_with_location_0_and_scale_''σ''−2.


_=_Operations_on_two_independent_normal_variables_

= *_If_X_1_and_X_2_are_two_independence_(probability_theory), independent_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,sum_of_normally_distributed_random_variables, [proof]_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. *_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_distribution, stable_(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#Independent_central-normal_distributions, product_distribution_with_density_function_f_Z(z)_=_\pi^_K_0(, z, )_where_K_0_is_the_Macdonald_function, modified_Bessel_function_of_the_second_kind._This_distribution_is_symmetric_around_zero,_unbounded_at_z_=_0,_and_has_the_ characteristic_function__\phi_Z(t)_=_(1_+_t^2)^. *_Their_ratio_follows_the_standard__Cauchy_distribution:_X_1/_X_2_\sim_\operatorname(0,_1). *_Their_Euclidean_norm_\sqrt_has_the_Rayleigh_distribution.


__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-squar ...
_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_is_independent_from_the_sample__standard_deviation,_which_can_be_demonstrated_using_Basu's_theorem_or_Cochran's_theorem._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 situ ...
_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_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_distribution, 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_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_(probability), infinite_divisibility. 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_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_...
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'',_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-squar ...
_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,_for_normal_distributions_the_sample_mean_\textstyle\hat\mu_and_the_sample_variance_''s''2_are_independence_(probability_theory), independent,_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 situ ...
_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_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_th_...
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,_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,_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_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_σ2,_the_conjugate_prior_distribution_is_also_normally_distributed. This_can_be_shown_more_easily_by_rewriting_the_variance_as_the__precision,_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_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_σ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;_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._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_(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._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 ques ...
._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_Φ−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_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_independence_(probability_theory), independent._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-squar ...
_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,_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].html" ;"title="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 functions _1F_1 and U. :\begin \operatorname\left[X^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[X \mid a 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. 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 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. 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 standard deviation 1/\sigma. In particular, the standard normal distribution \varphi is an Fourier transform#Eigenfunctions, 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 (probability theory), characteristic function \varphi_X(t) of that variable, which is defined as the expected value 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 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[e^] = \hat f(it) = e^ e^ 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 Since this is a quadratic polynomial in t, only the first two cumulants are nonzero, namely the mean \mu and the variance \sigma^2.


Stein operator and class

Within Stein's method 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 (mathematics), function when \sigma = 0. However, one can define the normal distribution with zero variance as a generalized function; specifically, as Dirac delta function, 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 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 probability distribution, maximum entropy. If X is a continuous random variable with probability density function, probability density 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. A function with two Lagrange multipliers 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 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 statistics, score (statistics), scores, and estimators 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 function (statistics), 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 B(n,p) is De Moivre–Laplace theorem, 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 with parameter \lambda is approximately normal with mean \lambda and variance \lambda, for large values of \lambda. * The chi-squared distribution \chi^2(k) is approximately normal with mean k and variance 2k, for large k. * The Student's t-distribution 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, improvements of the approximation are given by the Edgeworth expansions. This theorem can also be used to justify modeling the sum of many uniform noise sources as Gaussian noise. See AWGN.


Operations and functions of normal variables

The probability density function, probability density, cumulative distribution function, cumulative distribution, and inverse cumulative distribution function, 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-normal distribution, log-normally: . * The absolute value of X has folded normal distribution: . If \mu = 0 this is known as the half-normal distribution. * The absolute value of normalized residuals, , ''X'' − ''μ'', /''σ'', has chi distribution with one degree of freedom: , X - \mu, / \sigma \sim \chi_1. * The square of ''X''/''σ'' has the noncentral chi-squared distribution 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 distribution, chi-squared. * The log likelihood of a normal variable x is simply the log of its probability density function: \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 distribution, chi-squared variable. * The distribution of the variable ''X'' restricted to an interval [''a'', ''b''] is called the truncated normal distribution. * (''X'' − ''μ'')−2 has a Lévy distribution with location 0 and scale ''σ''−2.


= Operations on two independent normal variables

= * If X_1 and X_2 are two independence (probability theory), independent 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,sum of normally distributed random variables, [proof] 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. * 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 distribution, stable (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#Independent central-normal distributions, product distribution with density function f_Z(z) = \pi^ K_0(, z, ) where K_0 is the Macdonald function, modified Bessel function of the second kind. This distribution is symmetric around zero, unbounded at z = 0, and has the characteristic function (probability theory), characteristic function \phi_Z(t) = (1 + t^2)^. * Their ratio follows the standard Cauchy distribution: X_1/ X_2 \sim \operatorname(0, 1). * Their Euclidean norm \sqrt has the Rayleigh distribution.


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 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 is independent from the sample standard deviation, which can be demonstrated using Basu's theorem or Cochran's theorem. The ratio of these two quantities will have the Student's t-distribution 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 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 distribution, 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 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 (probability), infinite divisibility. 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 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 ...
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'', 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 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, for normal distributions the sample mean \textstyle\hat\mu and the sample variance ''s''2 are independence (probability theory), independent, 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 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 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 th ...
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, 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, 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 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 σ2, the conjugate prior distribution is also normally distributed. This can be shown more easily by rewriting the variance as the precision, 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 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 σ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; 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. 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 (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. 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. 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 Φ−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 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 independence (probability theory), independent. This formulation arises because for a bivariate normal random vector (''X'', ''Y'') the squared norm will have the chi-squared distribution 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, 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 functions _1F_1 and U. :\begin \operatorname\left[X^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[X \mid a 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. 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 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. 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 standard deviation 1/\sigma. In particular, the standard normal distribution \varphi is an Fourier transform#Eigenfunctions, 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 (probability theory), characteristic function \varphi_X(t) of that variable, which is defined as the expected value 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 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[e^] = \hat f(it) = e^ e^ 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 Since this is a quadratic polynomial in t, only the first two cumulants are nonzero, namely the mean \mu and the variance \sigma^2.


Stein operator and class

Within Stein's method 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 (mathematics), function when \sigma = 0. However, one can define the normal distribution with zero variance as a generalized function; specifically, as Dirac delta function, 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 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 probability distribution, maximum entropy. If X is a continuous random variable with probability density function, probability density 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. A function with two Lagrange multipliers 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 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 statistics, score (statistics), scores, and estimators 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 function (statistics), 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 B(n,p) is De Moivre–Laplace theorem, 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 with parameter \lambda is approximately normal with mean \lambda and variance \lambda, for large values of \lambda. * The chi-squared distribution \chi^2(k) is approximately normal with mean k and variance 2k, for large k. * The Student's t-distribution 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, improvements of the approximation are given by the Edgeworth expansions. This theorem can also be used to justify modeling the sum of many uniform noise sources as Gaussian noise. See AWGN.


Operations and functions of normal variables

The probability density function, probability density, cumulative distribution function, cumulative distribution, and inverse cumulative distribution function, 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-normal distribution, log-normally: . * The absolute value of X has folded normal distribution: . If \mu = 0 this is known as the half-normal distribution. * The absolute value of normalized residuals, , ''X'' − ''μ'', /''σ'', has chi distribution with one degree of freedom: , X - \mu, / \sigma \sim \chi_1. * The square of ''X''/''σ'' has the noncentral chi-squared distribution 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 distribution, chi-squared. * The log likelihood of a normal variable x is simply the log of its probability density function: \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 distribution, chi-squared variable. * The distribution of the variable ''X'' restricted to an interval [''a'', ''b''] is called the truncated normal distribution. * (''X'' − ''μ'')−2 has a Lévy distribution with location 0 and scale ''σ''−2.


= Operations on two independent normal variables

= * If X_1 and X_2 are two independence (probability theory), independent 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,sum of normally distributed random variables, [proof] 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. * 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 distribution, stable (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#Independent central-normal distributions, product distribution with density function f_Z(z) = \pi^ K_0(, z, ) where K_0 is the Macdonald function, modified Bessel function of the second kind. This distribution is symmetric around zero, unbounded at z = 0, and has the characteristic function (probability theory), characteristic function \phi_Z(t) = (1 + t^2)^. * Their ratio follows the standard Cauchy distribution: X_1/ X_2 \sim \operatorname(0, 1). * Their Euclidean norm \sqrt has the Rayleigh distribution.


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 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 is independent from the sample standard deviation, which can be demonstrated using Basu's theorem or Cochran's theorem. The ratio of these two quantities will have the Student's t-distribution 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 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 distribution, 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 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 (probability), infinite divisibility. 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 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 ...
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'', 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 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, for normal distributions the sample mean \textstyle\hat\mu and the sample variance ''s''2 are independence (probability theory), independent, 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 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 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 th ...
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, 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, 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 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 σ2, the conjugate prior distribution is also normally distributed. This can be shown more easily by rewriting the variance as the precision, 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 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 σ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; 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. 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 (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. 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. 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 Φ−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 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 independence (probability theory), independent. This formulation arises because for a bivariate normal random vector (''X'', ''Y'') the squared norm will have the chi-squared distribution 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, 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._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,_with_mean_0_and_standard_deviation_1/\sigma._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 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 ...
_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_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__cumulants_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 (statistician), Charles Stein, who first publ ...
_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_when_\sigma_=_0. However,_one_can_define_the_normal_distribution_with_zero_variance_as_a_ generalized_function;_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 argum ...
_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 ...
_with_ probability_density_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._A_function_with_two_ Lagrange_multipliers_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_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_statistics,_ scores,_and__estimators_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 ques ...
_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_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-squar ...
_\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 situ ...
_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 ser ...
s. This_theorem_can_also_be_used_to_justify_modeling_the_sum_of_many_uniform_noise_sources_as_ Gaussian_noise._See_ AWGN.


__Operations_and_functions_of_normal_variables_

The_ probability_density,_
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_function, 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-normal_distribution, log-normally:_. *_The_absolute_value_of_X_has_folded_normal_distribution:_._If_\mu_=_0_this_is_known_as_the_half-normal_distribution. *_The_absolute_value_of_normalized_residuals,_, ''X''_−_''μ'', /''σ'',_has_chi_distribution_with_one_degree_of_freedom:_, X_-_\mu, _/_\sigma_\sim_\chi_1. *_The_square_of_''X''/''σ''_has_the_noncentral_chi-squared_distribution_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_distribution, chi-squared. *_The_log_likelihood_of_a_normal_variable_x_is_simply_the_log_of_its__probability_density_function:_\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_distribution, chi-squared_variable. *_The_distribution_of_the_variable_''X''_restricted_to_an_interval_[''a'',_''b'']_is_called_the_truncated_normal_distribution. *_(''X''_−_''μ'')−2_has_a__Lévy_distribution_with_location_0_and_scale_''σ''−2.


_=_Operations_on_two_independent_normal_variables_

= *_If_X_1_and_X_2_are_two_independence_(probability_theory), independent_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,sum_of_normally_distributed_random_variables, [proof]_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. *_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_distribution, stable_(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#Independent_central-normal_distributions, product_distribution_with_density_function_f_Z(z)_=_\pi^_K_0(, z, )_where_K_0_is_the_Macdonald_function, modified_Bessel_function_of_the_second_kind._This_distribution_is_symmetric_around_zero,_unbounded_at_z_=_0,_and_has_the_ characteristic_function__\phi_Z(t)_=_(1_+_t^2)^. *_Their_ratio_follows_the_standard__Cauchy_distribution:_X_1/_X_2_\sim_\operatorname(0,_1). *_Their_Euclidean_norm_\sqrt_has_the_Rayleigh_distribution.


__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-squar ...
_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_is_independent_from_the_sample__standard_deviation,_which_can_be_demonstrated_using_Basu's_theorem_or_Cochran's_theorem._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 situ ...
_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_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_distribution, 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_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_(probability), infinite_divisibility. 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_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_...
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'',_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-squar ...
_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,_for_normal_distributions_the_sample_mean_\textstyle\hat\mu_and_the_sample_variance_''s''2_are_independence_(probability_theory), independent,_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 situ ...
_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_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_th_...
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,_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,_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_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_σ2,_the_conjugate_prior_distribution_is_also_normally_distributed. This_can_be_shown_more_easily_by_rewriting_the_variance_as_the__precision,_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_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_σ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;_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._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_(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._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 ques ...
._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_Φ−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_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_independence_(probability_theory), independent._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-squar ...
_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,_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].html" ;"title="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 functions _1F_1 and U. :\begin \operatorname\left[X^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[X \mid a 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. 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 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. 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 standard deviation 1/\sigma. In particular, the standard normal distribution \varphi is an Fourier transform#Eigenfunctions, 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 (probability theory), characteristic function \varphi_X(t) of that variable, which is defined as the expected value 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 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[e^] = \hat f(it) = e^ e^ 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 Since this is a quadratic polynomial in t, only the first two cumulants are nonzero, namely the mean \mu and the variance \sigma^2.


Stein operator and class

Within Stein's method 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 (mathematics), function when \sigma = 0. However, one can define the normal distribution with zero variance as a generalized function; specifically, as Dirac delta function, 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 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 probability distribution, maximum entropy. If X is a continuous random variable with probability density function, probability density 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. A function with two Lagrange multipliers 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 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 statistics, score (statistics), scores, and estimators 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 function (statistics), 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 B(n,p) is De Moivre–Laplace theorem, 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 with parameter \lambda is approximately normal with mean \lambda and variance \lambda, for large values of \lambda. * The chi-squared distribution \chi^2(k) is approximately normal with mean k and variance 2k, for large k. * The Student's t-distribution 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, improvements of the approximation are given by the Edgeworth expansions. This theorem can also be used to justify modeling the sum of many uniform noise sources as Gaussian noise. See AWGN.


Operations and functions of normal variables

The probability density function, probability density, cumulative distribution function, cumulative distribution, and inverse cumulative distribution function, 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-normal distribution, log-normally: . * The absolute value of X has folded normal distribution: . If \mu = 0 this is known as the half-normal distribution. * The absolute value of normalized residuals, , ''X'' − ''μ'', /''σ'', has chi distribution with one degree of freedom: , X - \mu, / \sigma \sim \chi_1. * The square of ''X''/''σ'' has the noncentral chi-squared distribution 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 distribution, chi-squared. * The log likelihood of a normal variable x is simply the log of its probability density function: \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 distribution, chi-squared variable. * The distribution of the variable ''X'' restricted to an interval [''a'', ''b''] is called the truncated normal distribution. * (''X'' − ''μ'')−2 has a Lévy distribution with location 0 and scale ''σ''−2.


= Operations on two independent normal variables

= * If X_1 and X_2 are two independence (probability theory), independent 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,sum of normally distributed random variables, [proof] 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. * 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 distribution, stable (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#Independent central-normal distributions, product distribution with density function f_Z(z) = \pi^ K_0(, z, ) where K_0 is the Macdonald function, modified Bessel function of the second kind. This distribution is symmetric around zero, unbounded at z = 0, and has the characteristic function (probability theory), characteristic function \phi_Z(t) = (1 + t^2)^. * Their ratio follows the standard Cauchy distribution: X_1/ X_2 \sim \operatorname(0, 1). * Their Euclidean norm \sqrt has the Rayleigh distribution.


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 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 is independent from the sample standard deviation, which can be demonstrated using Basu's theorem or Cochran's theorem. The ratio of these two quantities will have the Student's t-distribution 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 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 distribution, 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 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 (probability), infinite divisibility. 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 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 ...
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'', 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 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, for normal distributions the sample mean \textstyle\hat\mu and the sample variance ''s''2 are independence (probability theory), independent, 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 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 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 th ...
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, 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, 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 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 σ2, the conjugate prior distribution is also normally distributed. This can be shown more easily by rewriting the variance as the precision, 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 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 σ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; 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. 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 (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. 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. 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 Φ−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 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 independence (probability theory), independent. This formulation arises because for a bivariate normal random vector (''X'', ''Y'') the squared norm will have the chi-squared distribution 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, 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 functions _1F_1 and U. :\begin \operatorname\left[X^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[X \mid a 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. 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 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. 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 standard deviation 1/\sigma. In particular, the standard normal distribution \varphi is an Fourier transform#Eigenfunctions, 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 (probability theory), characteristic function \varphi_X(t) of that variable, which is defined as the expected value 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 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[e^] = \hat f(it) = e^ e^ 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 Since this is a quadratic polynomial in t, only the first two cumulants are nonzero, namely the mean \mu and the variance \sigma^2.


Stein operator and class

Within Stein's method 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 (mathematics), function when \sigma = 0. However, one can define the normal distribution with zero variance as a generalized function; specifically, as Dirac delta function, 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 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 probability distribution, maximum entropy. If X is a continuous random variable with probability density function, probability density 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. A function with two Lagrange multipliers 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 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 statistics, score (statistics), scores, and estimators 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 function (statistics), 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 B(n,p) is De Moivre–Laplace theorem, 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 with parameter \lambda is approximately normal with mean \lambda and variance \lambda, for large values of \lambda. * The chi-squared distribution \chi^2(k) is approximately normal with mean k and variance 2k, for large k. * The Student's t-distribution 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, improvements of the approximation are given by the Edgeworth expansions. This theorem can also be used to justify modeling the sum of many uniform noise sources as Gaussian noise. See AWGN.


Operations and functions of normal variables

The probability density function, probability density, cumulative distribution function, cumulative distribution, and inverse cumulative distribution function, 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-normal distribution, log-normally: . * The absolute value of X has folded normal distribution: . If \mu = 0 this is known as the half-normal distribution. * The absolute value of normalized residuals, , ''X'' − ''μ'', /''σ'', has chi distribution with one degree of freedom: , X - \mu, / \sigma \sim \chi_1. * The square of ''X''/''σ'' has the noncentral chi-squared distribution 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 distribution, chi-squared. * The log likelihood of a normal variable x is simply the log of its probability density function: \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 distribution, chi-squared variable. * The distribution of the variable ''X'' restricted to an interval [''a'', ''b''] is called the truncated normal distribution. * (''X'' − ''μ'')−2 has a Lévy distribution with location 0 and scale ''σ''−2.


= Operations on two independent normal variables

= * If X_1 and X_2 are two independence (probability theory), independent 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,sum of normally distributed random variables, [proof] 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. * 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 distribution, stable (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#Independent central-normal distributions, product distribution with density function f_Z(z) = \pi^ K_0(, z, ) where K_0 is the Macdonald function, modified Bessel function of the second kind. This distribution is symmetric around zero, unbounded at z = 0, and has the characteristic function (probability theory), characteristic function \phi_Z(t) = (1 + t^2)^. * Their ratio follows the standard Cauchy distribution: X_1/ X_2 \sim \operatorname(0, 1). * Their Euclidean norm \sqrt has the Rayleigh distribution.


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 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 is independent from the sample standard deviation, which can be demonstrated using Basu's theorem or Cochran's theorem. The ratio of these two quantities will have the Student's t-distribution 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 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 distribution, 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 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 (probability), infinite divisibility. 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 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 ...
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'', 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 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, for normal distributions the sample mean \textstyle\hat\mu and the sample variance ''s''2 are independence (probability theory), independent, 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 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 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 th ...
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, 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, 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 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 σ2, the conjugate prior distribution is also normally distributed. This can be shown more easily by rewriting the variance as the precision, 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 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 σ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; 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. 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 (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. 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. 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 Φ−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 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 independence (probability theory), independent. This formulation arises because for a bivariate normal random vector (''X'', ''Y'') the squared norm will have the chi-squared distribution 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, 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_when_\sigma_=_0. However,_one_can_define_the_normal_distribution_with_zero_variance_as_a_ generalized_function;_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 argum ...
_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 ...
_with_ probability_density_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._A_function_with_two_ Lagrange_multipliers_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_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_statistics,_ scores,_and__estimators_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 ques ...
_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_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-squar ...
_\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 situ ...
_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 ser ...
s. This_theorem_can_also_be_used_to_justify_modeling_the_sum_of_many_uniform_noise_sources_as_ Gaussian_noise._See_ AWGN.


__Operations_and_functions_of_normal_variables_

The_ probability_density,_
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_function, 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-normal_distribution, log-normally:_. *_The_absolute_value_of_X_has_folded_normal_distribution:_._If_\mu_=_0_this_is_known_as_the_half-normal_distribution. *_The_absolute_value_of_normalized_residuals,_, ''X''_−_''μ'', /''σ'',_has_chi_distribution_with_one_degree_of_freedom:_, X_-_\mu, _/_\sigma_\sim_\chi_1. *_The_square_of_''X''/''σ''_has_the_noncentral_chi-squared_distribution_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_distribution, chi-squared. *_The_log_likelihood_of_a_normal_variable_x_is_simply_the_log_of_its__probability_density_function:_\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_distribution, chi-squared_variable. *_The_distribution_of_the_variable_''X''_restricted_to_an_interval_[''a'',_''b'']_is_called_the_truncated_normal_distribution. *_(''X''_−_''μ'')−2_has_a__Lévy_distribution_with_location_0_and_scale_''σ''−2.


_=_Operations_on_two_independent_normal_variables_

= *_If_X_1_and_X_2_are_two_independence_(probability_theory), independent_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,sum_of_normally_distributed_random_variables, [proof]_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. *_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_distribution, stable_(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#Independent_central-normal_distributions, product_distribution_with_density_function_f_Z(z)_=_\pi^_K_0(, z, )_where_K_0_is_the_Macdonald_function, modified_Bessel_function_of_the_second_kind._This_distribution_is_symmetric_around_zero,_unbounded_at_z_=_0,_and_has_the_ characteristic_function__\phi_Z(t)_=_(1_+_t^2)^. *_Their_ratio_follows_the_standard__Cauchy_distribution:_X_1/_X_2_\sim_\operatorname(0,_1). *_Their_Euclidean_norm_\sqrt_has_the_Rayleigh_distribution.


__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-squar ...
_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_is_independent_from_the_sample__standard_deviation,_which_can_be_demonstrated_using_Basu's_theorem_or_Cochran's_theorem._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 situ ...
_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_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_distribution, 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_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_(probability), infinite_divisibility. 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_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_...
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'',_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-squar ...
_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,_for_normal_distributions_the_sample_mean_\textstyle\hat\mu_and_the_sample_variance_''s''2_are_independence_(probability_theory), independent,_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 situ ...
_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_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_th_...
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,_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,_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_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_σ2,_the_conjugate_prior_distribution_is_also_normally_distributed. This_can_be_shown_more_easily_by_rewriting_the_variance_as_the__precision,_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_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_σ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;_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._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_(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._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 ques ...
._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_Φ−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_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_independence_(probability_theory), independent._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-squar ...
_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,_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].html" ;"title="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._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,_with_mean_0_and_standard_deviation_1/\sigma._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 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 ...
_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_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__cumulants_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 (statistician), Charles Stein, who first publ ...
_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_when_\sigma_=_0. However,_one_can_define_the_normal_distribution_with_zero_variance_as_a_ generalized_function;_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 argum ...
_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 ...
_with_ probability_density_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._A_function_with_two_ Lagrange_multipliers_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_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_statistics,_ scores,_and__estimators_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 ques ...
_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_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-squar ...
_\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 situ ...
_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 ser ...
s. This_theorem_can_also_be_used_to_justify_modeling_the_sum_of_many_uniform_noise_sources_as_ Gaussian_noise._See_ AWGN.


__Operations_and_functions_of_normal_variables_

The_ probability_density,_
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_function, 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-normal_distribution, log-normally:_. *_The_absolute_value_of_X_has_folded_normal_distribution:_._If_\mu_=_0_this_is_known_as_the_half-normal_distribution. *_The_absolute_value_of_normalized_residuals,_, ''X''_−_''μ'', /''σ'',_has_chi_distribution_with_one_degree_of_freedom:_, X_-_\mu, _/_\sigma_\sim_\chi_1. *_The_square_of_''X''/''σ''_has_the_noncentral_chi-squared_distribution_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_distribution, chi-squared. *_The_log_likelihood_of_a_normal_variable_x_is_simply_the_log_of_its__probability_density_function:_\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_distribution, chi-squared_variable. *_The_distribution_of_the_variable_''X''_restricted_to_an_interval_[''a'',_''b'']_is_called_the_truncated_normal_distribution. *_(''X''_−_''μ'')−2_has_a__Lévy_distribution_with_location_0_and_scale_''σ''−2.


_=_Operations_on_two_independent_normal_variables_

= *_If_X_1_and_X_2_are_two_independence_(probability_theory), independent_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,sum_of_normally_distributed_random_variables, [proof]_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. *_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_distribution, stable_(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#Independent_central-normal_distributions, product_distribution_with_density_function_f_Z(z)_=_\pi^_K_0(, z, )_where_K_0_is_the_Macdonald_function, modified_Bessel_function_of_the_second_kind._This_distribution_is_symmetric_around_zero,_unbounded_at_z_=_0,_and_has_the__characteristic_function__\phi_Z(t)_=_(1_+_t^2)^. *_Their_ratio_follows_the_standard__Cauchy_distribution:_X_1/_X_2_\sim_\operatorname(0,_1). *_Their_Euclidean_norm_\sqrt_has_the_Rayleigh_distribution.


__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-squar ...
_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_is_independent_from_the_sample__standard_deviation,_which_can_be_demonstrated_using_Basu's_theorem_or_Cochran's_theorem._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 situ ...
_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_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_distribution, 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_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_(probability), infinite_divisibility. 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_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_...
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'',_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-squar ...
_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,_for_normal_distributions_the_sample_mean_\textstyle\hat\mu_and_the_sample_variance_''s''2_are_independence_(probability_theory), independent,_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 situ ...
_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_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_th_...
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,_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,_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_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_σ2,_the_conjugate_prior_distribution_is_also_normally_distributed. This_can_be_shown_more_easily_by_rewriting_the_variance_as_the__precision,_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_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_σ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;_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._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_(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._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 ques ...
._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_Φ−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_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_independence_(probability_theory), independent._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-squar ...
_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,_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].html"_;"title="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_functions__1F_1_and_U. :\begin ___\operatorname\left[X^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._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,_with_mean_0_and_standard_deviation_1/\sigma._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_ 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__...
_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_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__cumulants_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_(statistician),_Charles_Stein,_who_first_publ_...
_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_when_\sigma_=_0. However,_one_can_define_the_normal_distribution_with_zero_variance_as_a_ generalized_function;_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 argum ...
_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 ...
_with_ probability_density_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._A_function_with_two_ Lagrange_multipliers_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_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_statistics,_ scores,_and__estimators_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 ques ...
_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_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-squar ...
_\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 situ ...
_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 ser ...
s. This_theorem_can_also_be_used_to_justify_modeling_the_sum_of_many_uniform_noise_sources_as_ Gaussian_noise._See_ AWGN.


__Operations_and_functions_of_normal_variables_

The_ probability_density,_
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_function, 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-normal_distribution, log-normally:_. *_The_absolute_value_of_X_has_folded_normal_distribution:_._If_\mu_=_0_this_is_known_as_the_half-normal_distribution. *_The_absolute_value_of_normalized_residuals,_, ''X''_−_''μ'', /''σ'',_has_chi_distribution_with_one_degree_of_freedom:_, X_-_\mu, _/_\sigma_\sim_\chi_1. *_The_square_of_''X''/''σ''_has_the_noncentral_chi-squared_distribution_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_distribution, chi-squared. *_The_log_likelihood_of_a_normal_variable_x_is_simply_the_log_of_its__probability_density_function:_\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_distribution, chi-squared_variable. *_The_distribution_of_the_variable_''X''_restricted_to_an_interval_[''a'',_''b'']_is_called_the_truncated_normal_distribution. *_(''X''_−_''μ'')−2_has_a__Lévy_distribution_with_location_0_and_scale_''σ''−2.


_=_Operations_on_two_independent_normal_variables_

= *_If_X_1_and_X_2_are_two_independence_(probability_theory), independent_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,sum_of_normally_distributed_random_variables, [proof]_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. *_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_distribution, stable_(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#Independent_central-normal_distributions, product_distribution_with_density_function_f_Z(z)_=_\pi^_K_0(, z, )_where_K_0_is_the_Macdonald_function, modified_Bessel_function_of_the_second_kind._This_distribution_is_symmetric_around_zero,_unbounded_at_z_=_0,_and_has_the__characteristic_function__\phi_Z(t)_=_(1_+_t^2)^. *_Their_ratio_follows_the_standard__Cauchy_distribution:_X_1/_X_2_\sim_\operatorname(0,_1). *_Their_Euclidean_norm_\sqrt_has_the_Rayleigh_distribution.


__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-squar ...
_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_is_independent_from_the_sample__standard_deviation,_which_can_be_demonstrated_using_Basu's_theorem_or_Cochran's_theorem._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 situ ...
_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_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_distribution, 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_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_(probability), infinite_divisibility. 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_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_...
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'',_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-squar ...
_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,_for_normal_distributions_the_sample_mean_\textstyle\hat\mu_and_the_sample_variance_''s''2_are_independence_(probability_theory), independent,_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 situ ...
_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_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_th_...
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,_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,_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_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_σ2,_the_conjugate_prior_distribution_is_also_normally_distributed. This_can_be_shown_more_easily_by_rewriting_the_variance_as_the__precision,_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_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_σ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;_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._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_(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._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 ques ...
._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_Φ−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_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_independence_(probability_theory), independent._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-squar ...
_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,_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_functions__1F_1_and_U. :\begin ___\operatorname\left[X^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._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,_with_mean_0_and_standard_deviation_1/\sigma._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_ 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__...
_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_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__cumulants_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_(statistician),_Charles_Stein,_who_first_publ_...
_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_when_\sigma_=_0. However,_one_can_define_the_normal_distribution_with_zero_variance_as_a_ generalized_function;_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 argum ...
_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 ...
_with_ probability_density_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._A_function_with_two_ Lagrange_multipliers_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_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_statistics,_ scores,_and__estimators_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 ques ...
_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_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-squar ...
_\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 situ ...
_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 ser ...
s. This_theorem_can_also_be_used_to_justify_modeling_the_sum_of_many_uniform_noise_sources_as_ Gaussian_noise._See_ AWGN.


__Operations_and_functions_of_normal_variables_

The_ probability_density,_
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_function, 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-normal_distribution, log-normally:_. *_The_absolute_value_of_X_has_folded_normal_distribution:_._If_\mu_=_0_this_is_known_as_the_half-normal_distribution. *_The_absolute_value_of_normalized_residuals,_, ''X''_−_''μ'', /''σ'',_has_chi_distribution_with_one_degree_of_freedom:_, X_-_\mu, _/_\sigma_\sim_\chi_1. *_The_square_of_''X''/''σ''_has_the_noncentral_chi-squared_distribution_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_distribution, chi-squared. *_The_log_likelihood_of_a_normal_variable_x_is_simply_the_log_of_its__probability_density_function:_\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_distribution, chi-squared_variable. *_The_distribution_of_the_variable_''X''_restricted_to_an_interval_[''a'',_''b'']_is_called_the_truncated_normal_distribution. *_(''X''_−_''μ'')−2_has_a__Lévy_distribution_with_location_0_and_scale_''σ''−2.


_=_Operations_on_two_independent_normal_variables_

= *_If_X_1_and_X_2_are_two_independence_(probability_theory), independent_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,sum_of_normally_distributed_random_variables, [proof]_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. *_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_distribution, stable_(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#Independent_central-normal_distributions, product_distribution_with_density_function_f_Z(z)_=_\pi^_K_0(, z, )_where_K_0_is_the_Macdonald_function, modified_Bessel_function_of_the_second_kind._This_distribution_is_symmetric_around_zero,_unbounded_at_z_=_0,_and_has_the__characteristic_function__\phi_Z(t)_=_(1_+_t^2)^. *_Their_ratio_follows_the_standard__Cauchy_distribution:_X_1/_X_2_\sim_\operatorname(0,_1). *_Their_Euclidean_norm_\sqrt_has_the_Rayleigh_distribution.


__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-squar ...
_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_is_independent_from_the_sample__standard_deviation,_which_can_be_demonstrated_using_Basu's_theorem_or_Cochran's_theorem._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 situ ...
_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_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_distribution, 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_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_(probability), infinite_divisibility. 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_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_...
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'',_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-squar ...
_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,_for_normal_distributions_the_sample_mean_\textstyle\hat\mu_and_the_sample_variance_''s''2_are_independence_(probability_theory), independent,_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 situ ...
_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_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_th_...
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,_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,_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_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_σ2,_the_conjugate_prior_distribution_is_also_normally_distributed. This_can_be_shown_more_easily_by_rewriting_the_variance_as_the__precision,_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_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_σ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;_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._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_(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._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 ques ...
._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_Φ−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_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_independence_(probability_theory), independent._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-squar ...
_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,_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].html"_;"title="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._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,_with_mean_0_and_standard_deviation_1/\sigma._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_ 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__...
_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_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__cumulants_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_(statistician),_Charles_Stein,_who_first_publ_...
_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_when_\sigma_=_0. However,_one_can_define_the_normal_distribution_with_zero_variance_as_a_ generalized_function;_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 argum ...
_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 ...
_with_ probability_density_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._A_function_with_two_ Lagrange_multipliers_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_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_statistics,_ scores,_and__estimators_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 ques ...
_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_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-squar ...
_\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 situ ...
_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 ser ...
s. This_theorem_can_also_be_used_to_justify_modeling_the_sum_of_many_uniform_noise_sources_as_ Gaussian_noise._See_ AWGN.


__Operations_and_functions_of_normal_variables_

The_ probability_density,_
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_function, 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-normal_distribution, log-normally:_. *_The_absolute_value_of_X_has_folded_normal_distribution:_._If_\mu_=_0_this_is_known_as_the_half-normal_distribution. *_The_absolute_value_of_normalized_residuals,_, ''X''_−_''μ'', /''σ'',_has_chi_distribution_with_one_degree_of_freedom:_, X_-_\mu, _/_\sigma_\sim_\chi_1. *_The_square_of_''X''/''σ''_has_the_noncentral_chi-squared_distribution_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_distribution, chi-squared. *_The_log_likelihood_of_a_normal_variable_x_is_simply_the_log_of_its__probability_density_function:_\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_distribution, chi-squared_variable. *_The_distribution_of_the_variable_''X''_restricted_to_an_interval_[''a'',_''b'']_is_called_the_truncated_normal_distribution. *_(''X''_−_''μ'')−2_has_a__Lévy_distribution_with_location_0_and_scale_''σ''−2.


_=_Operations_on_two_independent_normal_variables_

= *_If_X_1_and_X_2_are_two_independence_(probability_theory), independent_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,sum_of_normally_distributed_random_variables, [proof]_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. *_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_distribution, stable_(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#Independent_central-normal_distributions, product_distribution_with_density_function_f_Z(z)_=_\pi^_K_0(, z, )_where_K_0_is_the_Macdonald_function, modified_Bessel_function_of_the_second_kind._This_distribution_is_symmetric_around_zero,_unbounded_at_z_=_0,_and_has_the__characteristic_function__\phi_Z(t)_=_(1_+_t^2)^. *_Their_ratio_follows_the_standard__Cauchy_distribution:_X_1/_X_2_\sim_\operatorname(0,_1). *_Their_Euclidean_norm_\sqrt_has_the_Rayleigh_distribution.


__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-squar ...
_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_is_independent_from_the_sample__standard_deviation,_which_can_be_demonstrated_using_Basu's_theorem_or_Cochran's_theorem._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 situ ...
_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_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_distribution, 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_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_(probability), infinite_divisibility. 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_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_...
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'',_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-squar ...
_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,_for_normal_distributions_the_sample_mean_\textstyle\hat\mu_and_the_sample_variance_''s''2_are_independence_(probability_theory), independent,_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 situ ...
_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_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_th_...
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,_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,_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_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_σ2,_the_conjugate_prior_distribution_is_also_normally_distributed. This_can_be_shown_more_easily_by_rewriting_the_variance_as_the__precision,_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_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_σ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;_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._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_(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._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 ques ...
._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_Φ−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_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_independence_(probability_theory), independent._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-squar ...
_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,_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].html"_;"title="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_functions__1F_1_and_U. :\begin ___\operatorname\left[X^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[X_\mid_a 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._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_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._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_standard_deviation_1/\sigma._In_particular,_the_standard_normal_distribution_\varphi_is_an_Fourier_transform#Eigenfunctions, 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_(probability_theory), characteristic_function_\varphi_X(t)_of_that_variable,_which_is_defined_as_the_expected_value_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_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[e^]_=_\hat_f(it)_=_e^_e^ 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 Since_this_is_a_quadratic_polynomial_in_t,_only_the_first_two__cumulants_are_nonzero,_namely_the_mean \mu_and_the_variance \sigma^2.


__Stein_operator_and_class_

Within_Stein's_method_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_when_\sigma_=_0. However,_one_can_define_the_normal_distribution_with_zero_variance_as_a_ generalized_function;_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 argum ...
_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 ...
_with_ probability_density_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._A_function_with_two_ Lagrange_multipliers_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_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_statistics,_ scores,_and__estimators_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 ques ...
_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_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-squar ...
_\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 situ ...
_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 ser ...
s. This_theorem_can_also_be_used_to_justify_modeling_the_sum_of_many_uniform_noise_sources_as_ Gaussian_noise._See_ AWGN.


__Operations_and_functions_of_normal_variables_

The_ probability_density,_
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_function, 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-normal_distribution, log-normally:_. *_The_absolute_value_of_X_has_folded_normal_distribution:_._If_\mu_=_0_this_is_known_as_the_half-normal_distribution. *_The_absolute_value_of_normalized_residuals,_, ''X''_−_''μ'', /''σ'',_has_chi_distribution_with_one_degree_of_freedom:_, X_-_\mu, _/_\sigma_\sim_\chi_1. *_The_square_of_''X''/''σ''_has_the_noncentral_chi-squared_distribution_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_distribution, chi-squared. *_The_log_likelihood_of_a_normal_variable_x_is_simply_the_log_of_its__probability_density_function:_\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_distribution, chi-squared_variable. *_The_distribution_of_the_variable_''X''_restricted_to_an_interval_[''a'',_''b'']_is_called_the_truncated_normal_distribution. *_(''X''_−_''μ'')−2_has_a__Lévy_distribution_with_location_0_and_scale_''σ''−2.


_=_Operations_on_two_independent_normal_variables_

= *_If_X_1_and_X_2_are_two_independence_(probability_theory), independent_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,sum_of_normally_distributed_random_variables, [proof]_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. *_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_distribution, stable_(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#Independent_central-normal_distributions, product_distribution_with_density_function_f_Z(z)_=_\pi^_K_0(, z, )_where_K_0_is_the_Macdonald_function, modified_Bessel_function_of_the_second_kind._This_distribution_is_symmetric_around_zero,_unbounded_at_z_=_0,_and_has_the_characteristic_function_(probability_theory), characteristic_function__\phi_Z(t)_=_(1_+_t^2)^. *_Their_ratio_follows_the_standard__Cauchy_distribution:_X_1/_X_2_\sim_\operatorname(0,_1). *_Their_Euclidean_norm_\sqrt_has_the_Rayleigh_distribution.


__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-squar ...
_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_is_independent_from_the_sample__standard_deviation,_which_can_be_demonstrated_using_Basu's_theorem_or_Cochran's_theorem._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 situ ...
_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_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_distribution, 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_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_(probability), infinite_divisibility. 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_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_...
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'',_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-squar ...
_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,_for_normal_distributions_the_sample_mean_\textstyle\hat\mu_and_the_sample_variance_''s''2_are_independence_(probability_theory), independent,_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 situ ...
_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_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_th_...
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,_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,_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_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_σ2,_the_conjugate_prior_distribution_is_also_normally_distributed. This_can_be_shown_more_easily_by_rewriting_the_variance_as_the__precision,_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_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_σ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;_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._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_(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._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 ques ...
._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_Φ−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_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_independence_(probability_theory), independent._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-squar ...
_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,_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_functions__1F_1_and_U. :\begin ___\operatorname\left[X^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[X_\mid_a 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._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_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._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_standard_deviation_1/\sigma._In_particular,_the_standard_normal_distribution_\varphi_is_an_Fourier_transform#Eigenfunctions, 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_(probability_theory), characteristic_function_\varphi_X(t)_of_that_variable,_which_is_defined_as_the_expected_value_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_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[e^]_=_\hat_f(it)_=_e^_e^ 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 Since_this_is_a_quadratic_polynomial_in_t,_only_the_first_two__cumulants_are_nonzero,_namely_the_mean \mu_and_the_variance \sigma^2.


__Stein_operator_and_class_

Within_Stein's_method_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_when_\sigma_=_0. However,_one_can_define_the_normal_distribution_with_zero_variance_as_a_ generalized_function;_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 argum ...
_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 ...
_with_ probability_density_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._A_function_with_two_ Lagrange_multipliers_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_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_statistics,_ scores,_and__estimators_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 ques ...
_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_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-squar ...
_\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 situ ...
_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 ser ...
s. This_theorem_can_also_be_used_to_justify_modeling_the_sum_of_many_uniform_noise_sources_as_ Gaussian_noise._See_ AWGN.


__Operations_and_functions_of_normal_variables_

The_ probability_density,_
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_function, 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-normal_distribution, log-normally:_. *_The_absolute_value_of_X_has_folded_normal_distribution:_._If_\mu_=_0_this_is_known_as_the_half-normal_distribution. *_The_absolute_value_of_normalized_residuals,_, ''X''_−_''μ'', /''σ'',_has_chi_distribution_with_one_degree_of_freedom:_, X_-_\mu, _/_\sigma_\sim_\chi_1. *_The_square_of_''X''/''σ''_has_the_noncentral_chi-squared_distribution_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_distribution, chi-squared. *_The_log_likelihood_of_a_normal_variable_x_is_simply_the_log_of_its__probability_density_function:_\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_distribution, chi-squared_variable. *_The_distribution_of_the_variable_''X''_restricted_to_an_interval_[''a'',_''b'']_is_called_the_truncated_normal_distribution. *_(''X''_−_''μ'')−2_has_a__Lévy_distribution_with_location_0_and_scale_''σ''−2.


_=_Operations_on_two_independent_normal_variables_

= *_If_X_1_and_X_2_are_two_independence_(probability_theory), independent_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,sum_of_normally_distributed_random_variables, [proof]_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. *_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_distribution, stable_(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#Independent_central-normal_distributions, product_distribution_with_density_function_f_Z(z)_=_\pi^_K_0(, z, )_where_K_0_is_the_Macdonald_function, modified_Bessel_function_of_the_second_kind._This_distribution_is_symmetric_around_zero,_unbounded_at_z_=_0,_and_has_the_characteristic_function_(probability_theory), characteristic_function__\phi_Z(t)_=_(1_+_t^2)^. *_Their_ratio_follows_the_standard__Cauchy_distribution:_X_1/_X_2_\sim_\operatorname(0,_1). *_Their_Euclidean_norm_\sqrt_has_the_Rayleigh_distribution.


__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-squar ...
_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_is_independent_from_the_sample__standard_deviation,_which_can_be_demonstrated_using_Basu's_theorem_or_Cochran's_theorem._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 situ ...
_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_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_distribution, 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_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_(probability), infinite_divisibility. 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_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_...
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'',_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-squar ...
_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,_for_normal_distributions_the_sample_mean_\textstyle\hat\mu_and_the_sample_variance_''s''2_are_independence_(probability_theory), independent,_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 situ ...
_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_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_th_...
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,_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,_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_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_σ2,_the_conjugate_prior_distribution_is_also_normally_distributed. This_can_be_shown_more_easily_by_rewriting_the_variance_as_the__precision,_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_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_σ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;_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._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_(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._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 ques ...
._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_Φ−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_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_independence_(probability_theory), independent._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-squar ...
_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,_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._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,_with_mean_0_and_standard_deviation_1/\sigma._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_ 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__...
_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_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__cumulants_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_(statistician),_Charles_Stein,_who_first_publ_...
_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_when_\sigma_=_0. However,_one_can_define_the_normal_distribution_with_zero_variance_as_a_ generalized_function;_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 argum ...
_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 ...
_with_ probability_density_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._A_function_with_two_ Lagrange_multipliers_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_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_statistics,_ scores,_and__estimators_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 ques ...
_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_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-squar ...
_\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 situ ...
_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 ser ...
s. This_theorem_can_also_be_used_to_justify_modeling_the_sum_of_many_uniform_noise_sources_as_ Gaussian_noise._See_ AWGN.


__Operations_and_functions_of_normal_variables_

The_ probability_density,_
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_function, 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-normal_distribution, log-normally:_. *_The_absolute_value_of_X_has_folded_normal_distribution:_._If_\mu_=_0_this_is_known_as_the_half-normal_distribution. *_The_absolute_value_of_normalized_residuals,_, ''X''_−_''μ'', /''σ'',_has_chi_distribution_with_one_degree_of_freedom:_, X_-_\mu, _/_\sigma_\sim_\chi_1. *_The_square_of_''X''/''σ''_has_the_noncentral_chi-squared_distribution_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_distribution, chi-squared. *_The_log_likelihood_of_a_normal_variable_x_is_simply_the_log_of_its__probability_density_function:_\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_distribution, chi-squared_variable. *_The_distribution_of_the_variable_''X''_restricted_to_an_interval_[''a'',_''b'']_is_called_the_truncated_normal_distribution. *_(''X''_−_''μ'')−2_has_a__Lévy_distribution_with_location_0_and_scale_''σ''−2.


_=_Operations_on_two_independent_normal_variables_

= *_If_X_1_and_X_2_are_two_independence_(probability_theory), independent_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,sum_of_normally_distributed_random_variables, [proof]_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. *_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_distribution, stable_(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#Independent_central-normal_distributions, product_distribution_with_density_function_f_Z(z)_=_\pi^_K_0(, z, )_where_K_0_is_the_Macdonald_function, modified_Bessel_function_of_the_second_kind._This_distribution_is_symmetric_around_zero,_unbounded_at_z_=_0,_and_has_the__characteristic_function__\phi_Z(t)_=_(1_+_t^2)^. *_Their_ratio_follows_the_standard__Cauchy_distribution:_X_1/_X_2_\sim_\operatorname(0,_1). *_Their_Euclidean_norm_\sqrt_has_the_Rayleigh_distribution.


__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-squar ...
_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_is_independent_from_the_sample__standard_deviation,_which_can_be_demonstrated_using_Basu's_theorem_or_Cochran's_theorem._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 situ ...
_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_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_distribution, 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_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_(probability), infinite_divisibility. 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_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_...
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'',_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-squar ...
_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,_for_normal_distributions_the_sample_mean_\textstyle\hat\mu_and_the_sample_variance_''s''2_are_independence_(probability_theory), independent,_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 situ ...
_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_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_th_...
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,_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,_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_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_σ2,_the_conjugate_prior_distribution_is_also_normally_distributed. This_can_be_shown_more_easily_by_rewriting_the_variance_as_the__precision,_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_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_σ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;_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._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_(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._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 ques ...
._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_Φ−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_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_independence_(probability_theory), independent._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-squar ...
_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,_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].html"_;"title="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_functions__1F_1_and_U. :\begin ___\operatorname\left[X^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[X_\mid_a 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._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_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._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_standard_deviation_1/\sigma._In_particular,_the_standard_normal_distribution_\varphi_is_an_Fourier_transform#Eigenfunctions, 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_(probability_theory), characteristic_function_\varphi_X(t)_of_that_variable,_which_is_defined_as_the_expected_value_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_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[e^]_=_\hat_f(it)_=_e^_e^ 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 Since_this_is_a_quadratic_polynomial_in_t,_only_the_first_two__cumulants_are_nonzero,_namely_the_mean \mu_and_the_variance \sigma^2.


__Stein_operator_and_class_

Within_Stein's_method_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_when_\sigma_=_0. However,_one_can_define_the_normal_distribution_with_zero_variance_as_a_ generalized_function;_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 argum ...
_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 ...
_with_ probability_density_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._A_function_with_two_ Lagrange_multipliers_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_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_statistics,_ scores,_and__estimators_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 ques ...
_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_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-squar ...
_\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 situ ...
_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 ser ...
s. This_theorem_can_also_be_used_to_justify_modeling_the_sum_of_many_uniform_noise_sources_as_ Gaussian_noise._See_ AWGN.


__Operations_and_functions_of_normal_variables_

The_ probability_density,_
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_function, 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-normal_distribution, log-normally:_. *_The_absolute_value_of_X_has_folded_normal_distribution:_._If_\mu_=_0_this_is_known_as_the_half-normal_distribution. *_The_absolute_value_of_normalized_residuals,_, ''X''_−_''μ'', /''σ'',_has_chi_distribution_with_one_degree_of_freedom:_, X_-_\mu, _/_\sigma_\sim_\chi_1. *_The_square_of_''X''/''σ''_has_the_noncentral_chi-squared_distribution_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_distribution, chi-squared. *_The_log_likelihood_of_a_normal_variable_x_is_simply_the_log_of_its__probability_density_function:_\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_distribution, chi-squared_variable. *_The_distribution_of_the_variable_''X''_restricted_to_an_interval_[''a'',_''b'']_is_called_the_truncated_normal_distribution. *_(''X''_−_''μ'')−2_has_a__Lévy_distribution_with_location_0_and_scale_''σ''−2.


_=_Operations_on_two_independent_normal_variables_

= *_If_X_1_and_X_2_are_two_independence_(probability_theory), independent_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,sum_of_normally_distributed_random_variables, [proof]_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. *_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_distribution, stable_(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#Independent_central-normal_distributions, product_distribution_with_density_function_f_Z(z)_=_\pi^_K_0(, z, )_where_K_0_is_the_Macdonald_function, modified_Bessel_function_of_the_second_kind._This_distribution_is_symmetric_around_zero,_unbounded_at_z_=_0,_and_has_the_characteristic_function_(probability_theory), characteristic_function__\phi_Z(t)_=_(1_+_t^2)^. *_Their_ratio_follows_the_standard__Cauchy_distribution:_X_1/_X_2_\sim_\operatorname(0,_1). *_Their_Euclidean_norm_\sqrt_has_the_Rayleigh_distribution.


__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-squar ...
_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_is_independent_from_the_sample__standard_deviation,_which_can_be_demonstrated_using_Basu's_theorem_or_Cochran's_theorem._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 situ ...
_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_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_distribution, 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_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_(probability), infinite_divisibility. 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_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_...
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'',_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-squar ...
_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,_for_normal_distributions_the_sample_mean_\textstyle\hat\mu_and_the_sample_variance_''s''2_are_independence_(probability_theory), independent,_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 situ ...
_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_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_th_...
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,_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,_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_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_σ2,_the_conjugate_prior_distribution_is_also_normally_distributed. This_can_be_shown_more_easily_by_rewriting_the_variance_as_the__precision,_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_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_σ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;_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._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_(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._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 ques ...
._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_Φ−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_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_independence_(probability_theory), independent._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-squar ...
_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,_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_functions__1F_1_and_U. :\begin ___\operatorname\left[X^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[X_\mid_a 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._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_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._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_standard_deviation_1/\sigma._In_particular,_the_standard_normal_distribution_\varphi_is_an_Fourier_transform#Eigenfunctions, 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_(probability_theory), characteristic_function_\varphi_X(t)_of_that_variable,_which_is_defined_as_the_expected_value_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_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[e^]_=_\hat_f(it)_=_e^_e^ 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 Since_this_is_a_quadratic_polynomial_in_t,_only_the_first_two__cumulants_are_nonzero,_namely_the_mean \mu_and_the_variance \sigma^2.


__Stein_operator_and_class_

Within_Stein's_method_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_when_\sigma_=_0. However,_one_can_define_the_normal_distribution_with_zero_variance_as_a_ generalized_function;_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 argum ...
_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 ...
_with_ probability_density_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._A_function_with_two_ Lagrange_multipliers_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_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_statistics,_ scores,_and__estimators_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 ques ...
_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_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-squar ...
_\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 situ ...
_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 ser ...
s. This_theorem_can_also_be_used_to_justify_modeling_the_sum_of_many_uniform_noise_sources_as_ Gaussian_noise._See_ AWGN.


__Operations_and_functions_of_normal_variables_

The_ probability_density,_
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_function, 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-normal_distribution, log-normally:_. *_The_absolute_value_of_X_has_folded_normal_distribution:_._If_\mu_=_0_this_is_known_as_the_half-normal_distribution. *_The_absolute_value_of_normalized_residuals,_, ''X''_−_''μ'', /''σ'',_has_chi_distribution_with_one_degree_of_freedom:_, X_-_\mu, _/_\sigma_\sim_\chi_1. *_The_square_of_''X''/''σ''_has_the_noncentral_chi-squared_distribution_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_distribution, chi-squared. *_The_log_likelihood_of_a_normal_variable_x_is_simply_the_log_of_its__probability_density_function:_\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_distribution, chi-squared_variable. *_The_distribution_of_the_variable_''X''_restricted_to_an_interval_[''a'',_''b'']_is_called_the_truncated_normal_distribution. *_(''X''_−_''μ'')−2_has_a__Lévy_distribution_with_location_0_and_scale_''σ''−2.


_=_Operations_on_two_independent_normal_variables_

= *_If_X_1_and_X_2_are_two_independence_(probability_theory), independent_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,sum_of_normally_distributed_random_variables, [proof]_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. *_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_distribution, stable_(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#Independent_central-normal_distributions, product_distribution_with_density_function_f_Z(z)_=_\pi^_K_0(, z, )_where_K_0_is_the_Macdonald_function, modified_Bessel_function_of_the_second_kind._This_distribution_is_symmetric_around_zero,_unbounded_at_z_=_0,_and_has_the_characteristic_function_(probability_theory), characteristic_function__\phi_Z(t)_=_(1_+_t^2)^. *_Their_ratio_follows_the_standard__Cauchy_distribution:_X_1/_X_2_\sim_\operatorname(0,_1). *_Their_Euclidean_norm_\sqrt_has_the_Rayleigh_distribution.


__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-squar ...
_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_is_independent_from_the_sample__standard_deviation,_which_can_be_demonstrated_using_Basu's_theorem_or_Cochran's_theorem._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 situ ...
_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_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_distribution, 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_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_(probability), infinite_divisibility. 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_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_...
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'',_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-squar ...
_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,_for_normal_distributions_the_sample_mean_\textstyle\hat\mu_and_the_sample_variance_''s''2_are_independence_(probability_theory), independent,_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 situ ...
_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_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_th_...
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,_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,_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_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_σ2,_the_conjugate_prior_distribution_is_also_normally_distributed. This_can_be_shown_more_easily_by_rewriting_the_variance_as_the__precision,_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_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_σ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;_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._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_(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._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 ques ...
._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_Φ−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_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_independence_(probability_theory), independent._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-squar ...
_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,_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].html" ;"title="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_when_\sigma_=_0. However,_one_can_define_the_normal_distribution_with_zero_variance_as_a_ generalized_function;_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 argum ...
_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 ...
_with_ probability_density_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._A_function_with_two_ Lagrange_multipliers_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_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_statistics,_ scores,_and__estimators_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 ques ...
_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_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-squar ...
_\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 situ ...
_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 ser ...
s. This_theorem_can_also_be_used_to_justify_modeling_the_sum_of_many_uniform_noise_sources_as_ Gaussian_noise._See_ AWGN.


__Operations_and_functions_of_normal_variables_

The_ probability_density,_
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_function, 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-normal_distribution, log-normally:_. *_The_absolute_value_of_X_has_folded_normal_distribution:_._If_\mu_=_0_this_is_known_as_the_half-normal_distribution. *_The_absolute_value_of_normalized_residuals,_, ''X''_−_''μ'', /''σ'',_has_chi_distribution_with_one_degree_of_freedom:_, X_-_\mu, _/_\sigma_\sim_\chi_1. *_The_square_of_''X''/''σ''_has_the_noncentral_chi-squared_distribution_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_distribution, chi-squared. *_The_log_likelihood_of_a_normal_variable_x_is_simply_the_log_of_its__probability_density_function:_\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_distribution, chi-squared_variable. *_The_distribution_of_the_variable_''X''_restricted_to_an_interval_[''a'',_''b'']_is_called_the_truncated_normal_distribution. *_(''X''_−_''μ'')−2_has_a__Lévy_distribution_with_location_0_and_scale_''σ''−2.


_=_Operations_on_two_independent_normal_variables_

= *_If_X_1_and_X_2_are_two_independence_(probability_theory), independent_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,sum_of_normally_distributed_random_variables, [proof]_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. *_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_distribution, stable_(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#Independent_central-normal_distributions, product_distribution_with_density_function_f_Z(z)_=_\pi^_K_0(, z, )_where_K_0_is_the_Macdonald_function, modified_Bessel_function_of_the_second_kind._This_distribution_is_symmetric_around_zero,_unbounded_at_z_=_0,_and_has_the_ characteristic_function__\phi_Z(t)_=_(1_+_t^2)^. *_Their_ratio_follows_the_standard__Cauchy_distribution:_X_1/_X_2_\sim_\operatorname(0,_1). *_Their_Euclidean_norm_\sqrt_has_the_Rayleigh_distribution.


__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-squar ...
_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_is_independent_from_the_sample__standard_deviation,_which_can_be_demonstrated_using_Basu's_theorem_or_Cochran's_theorem._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 situ ...
_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_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_distribution, 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_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_(probability), infinite_divisibility. 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_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_...
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'',_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-squar ...
_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,_for_normal_distributions_the_sample_mean_\textstyle\hat\mu_and_the_sample_variance_''s''2_are_independence_(probability_theory), independent,_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 situ ...
_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_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_th_...
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,_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,_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_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_σ2,_the_conjugate_prior_distribution_is_also_normally_distributed. This_can_be_shown_more_easily_by_rewriting_the_variance_as_the__precision,_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_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_σ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;_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._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_(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._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 ques ...
._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_Φ−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_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_independence_(probability_theory), independent._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-squar ...
_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,_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].html"_;"title="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_functions__1F_1_and_U. :\begin ___\operatorname\left[X^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._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,_with_mean_0_and_standard_deviation_1/\sigma._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 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 ...
_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_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__cumulants_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 (statistician), Charles Stein, who first publ ...
_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_when_\sigma_=_0. However,_one_can_define_the_normal_distribution_with_zero_variance_as_a_ generalized_function;_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 argum ...
_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 ...
_with_ probability_density_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._A_function_with_two_ Lagrange_multipliers_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_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_statistics,_ scores,_and__estimators_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 ques ...
_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_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-squar ...
_\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 situ ...
_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 ser ...
s. This_theorem_can_also_be_used_to_justify_modeling_the_sum_of_many_uniform_noise_sources_as_ Gaussian_noise._See_ AWGN.


__Operations_and_functions_of_normal_variables_

The_ probability_density,_
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_function, 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-normal_distribution, log-normally:_. *_The_absolute_value_of_X_has_folded_normal_distribution:_._If_\mu_=_0_this_is_known_as_the_half-normal_distribution. *_The_absolute_value_of_normalized_residuals,_, ''X''_−_''μ'', /''σ'',_has_chi_distribution_with_one_degree_of_freedom:_, X_-_\mu, _/_\sigma_\sim_\chi_1. *_The_square_of_''X''/''σ''_has_the_noncentral_chi-squared_distribution_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_distribution, chi-squared. *_The_log_likelihood_of_a_normal_variable_x_is_simply_the_log_of_its__probability_density_function:_\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_distribution, chi-squared_variable. *_The_distribution_of_the_variable_''X''_restricted_to_an_interval_[''a'',_''b'']_is_called_the_truncated_normal_distribution. *_(''X''_−_''μ'')−2_has_a__Lévy_distribution_with_location_0_and_scale_''σ''−2.


_=_Operations_on_two_independent_normal_variables_

= *_If_X_1_and_X_2_are_two_independence_(probability_theory), independent_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,sum_of_normally_distributed_random_variables, [proof]_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. *_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_distribution, stable_(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#Independent_central-normal_distributions, product_distribution_with_density_function_f_Z(z)_=_\pi^_K_0(, z, )_where_K_0_is_the_Macdonald_function, modified_Bessel_function_of_the_second_kind._This_distribution_is_symmetric_around_zero,_unbounded_at_z_=_0,_and_has_the_ characteristic_function__\phi_Z(t)_=_(1_+_t^2)^. *_Their_ratio_follows_the_standard__Cauchy_distribution:_X_1/_X_2_\sim_\operatorname(0,_1). *_Their_Euclidean_norm_\sqrt_has_the_Rayleigh_distribution.


__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-squar ...
_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_is_independent_from_the_sample__standard_deviation,_which_can_be_demonstrated_using_Basu's_theorem_or_Cochran's_theorem._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 situ ...
_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_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_distribution, 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_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_(probability), infinite_divisibility. 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_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_...
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'',_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-squar ...
_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,_for_normal_distributions_the_sample_mean_\textstyle\hat\mu_and_the_sample_variance_''s''2_are_independence_(probability_theory), independent,_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 situ ...
_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_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_th_...
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,_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,_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_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_σ2,_the_conjugate_prior_distribution_is_also_normally_distributed. This_can_be_shown_more_easily_by_rewriting_the_variance_as_the__precision,_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_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_σ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;_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._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_(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._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 ques ...
._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_Φ−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_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_independence_(probability_theory), independent._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-squar ...
_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,_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_functions__1F_1_and_U. :\begin ___\operatorname\left[X^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._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,_with_mean_0_and_standard_deviation_1/\sigma._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 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 ...
_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_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__cumulants_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 (statistician), Charles Stein, who first publ ...
_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_when_\sigma_=_0. However,_one_can_define_the_normal_distribution_with_zero_variance_as_a_ generalized_function;_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 argum ...
_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 ...
_with_ probability_density_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._A_function_with_two_ Lagrange_multipliers_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_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_statistics,_ scores,_and__estimators_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 ques ...
_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_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-squar ...
_\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 situ ...
_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 ser ...
s. This_theorem_can_also_be_used_to_justify_modeling_the_sum_of_many_uniform_noise_sources_as_ Gaussian_noise._See_ AWGN.


__Operations_and_functions_of_normal_variables_

The_ probability_density,_
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_function, 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-normal_distribution, log-normally:_. *_The_absolute_value_of_X_has_folded_normal_distribution:_._If_\mu_=_0_this_is_known_as_the_half-normal_distribution. *_The_absolute_value_of_normalized_residuals,_, ''X''_−_''μ'', /''σ'',_has_chi_distribution_with_one_degree_of_freedom:_, X_-_\mu, _/_\sigma_\sim_\chi_1. *_The_square_of_''X''/''σ''_has_the_noncentral_chi-squared_distribution_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_distribution, chi-squared. *_The_log_likelihood_of_a_normal_variable_x_is_simply_the_log_of_its__probability_density_function:_\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_distribution, chi-squared_variable. *_The_distribution_of_the_variable_''X''_restricted_to_an_interval_[''a'',_''b'']_is_called_the_truncated_normal_distribution. *_(''X''_−_''μ'')−2_has_a__Lévy_distribution_with_location_0_and_scale_''σ''−2.


_=_Operations_on_two_independent_normal_variables_

= *_If_X_1_and_X_2_are_two_independence_(probability_theory), independent_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,sum_of_normally_distributed_random_variables, [proof]_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. *_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_distribution, stable_(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#Independent_central-normal_distributions, product_distribution_with_density_function_f_Z(z)_=_\pi^_K_0(, z, )_where_K_0_is_the_Macdonald_function, modified_Bessel_function_of_the_second_kind._This_distribution_is_symmetric_around_zero,_unbounded_at_z_=_0,_and_has_the_ characteristic_function__\phi_Z(t)_=_(1_+_t^2)^. *_Their_ratio_follows_the_standard__Cauchy_distribution:_X_1/_X_2_\sim_\operatorname(0,_1). *_Their_Euclidean_norm_\sqrt_has_the_Rayleigh_distribution.


__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-squar ...
_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_is_independent_from_the_sample__standard_deviation,_which_can_be_demonstrated_using_Basu's_theorem_or_Cochran's_theorem._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 situ ...
_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_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_distribution, 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_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_(probability), infinite_divisibility. 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_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_...
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'',_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-squar ...
_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,_for_normal_distributions_the_sample_mean_\textstyle\hat\mu_and_the_sample_variance_''s''2_are_independence_(probability_theory), independent,_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 situ ...
_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_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_th_...
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,_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,_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_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_σ2,_the_conjugate_prior_distribution_is_also_normally_distributed. This_can_be_shown_more_easily_by_rewriting_the_variance_as_the__precision,_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_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_σ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;_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._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_(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._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 ques ...
._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_Φ−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_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_independence_(probability_theory), independent._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-squar ...
_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,_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].html" ;"title="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._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,_with_mean_0_and_standard_deviation_1/\sigma._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 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 ...
_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_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__cumulants_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 (statistician), Charles Stein, who first publ ...
_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_when_\sigma_=_0. However,_one_can_define_the_normal_distribution_with_zero_variance_as_a_ generalized_function;_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 argum ...
_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 ...
_with_ probability_density_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._A_function_with_two_ Lagrange_multipliers_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_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_statistics,_ scores,_and__estimators_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 ques ...
_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_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-squar ...
_\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 situ ...
_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 ser ...
s. This_theorem_can_also_be_used_to_justify_modeling_the_sum_of_many_uniform_noise_sources_as_ Gaussian_noise._See_ AWGN.


__Operations_and_functions_of_normal_variables_

The_ probability_density,_
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_function, 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-normal_distribution, log-normally:_. *_The_absolute_value_of_X_has_folded_normal_distribution:_._If_\mu_=_0_this_is_known_as_the_half-normal_distribution. *_The_absolute_value_of_normalized_residuals,_, ''X''_−_''μ'', /''σ'',_has_chi_distribution_with_one_degree_of_freedom:_, X_-_\mu, _/_\sigma_\sim_\chi_1. *_The_square_of_''X''/''σ''_has_the_noncentral_chi-squared_distribution_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_distribution, chi-squared. *_The_log_likelihood_of_a_normal_variable_x_is_simply_the_log_of_its__probability_density_function:_\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_distribution, chi-squared_variable. *_The_distribution_of_the_variable_''X''_restricted_to_an_interval_[''a'',_''b'']_is_called_the_truncated_normal_distribution. *_(''X''_−_''μ'')−2_has_a__Lévy_distribution_with_location_0_and_scale_''σ''−2.


_=_Operations_on_two_independent_normal_variables_

= *_If_X_1_and_X_2_are_two_independence_(probability_theory), independent_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,sum_of_normally_distributed_random_variables, [proof]_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. *_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_distribution, stable_(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#Independent_central-normal_distributions, product_distribution_with_density_function_f_Z(z)_=_\pi^_K_0(, z, )_where_K_0_is_the_Macdonald_function, modified_Bessel_function_of_the_second_kind._This_distribution_is_symmetric_around_zero,_unbounded_at_z_=_0,_and_has_the_ characteristic_function__\phi_Z(t)_=_(1_+_t^2)^. *_Their_ratio_follows_the_standard__Cauchy_distribution:_X_1/_X_2_\sim_\operatorname(0,_1). *_Their_Euclidean_norm_\sqrt_has_the_Rayleigh_distribution.


__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-squar ...
_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_is_independent_from_the_sample__standard_deviation,_which_can_be_demonstrated_using_Basu's_theorem_or_Cochran's_theorem._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 situ ...
_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_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_distribution, 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_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_(probability), infinite_divisibility. 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_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_...
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'',_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-squar ...
_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,_for_normal_distributions_the_sample_mean_\textstyle\hat\mu_and_the_sample_variance_''s''2_are_independence_(probability_theory), independent,_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 situ ...
_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_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_th_...
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,_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,_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_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_σ2,_the_conjugate_prior_distribution_is_also_normally_distributed. This_can_be_shown_more_easily_by_rewriting_the_variance_as_the__precision,_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_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_σ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;_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._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_(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._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 ques ...
._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_Φ−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_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_independence_(probability_theory), independent._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-squar ...
_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,_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].html" ;"title="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 functions _1F_1 and U. :\begin \operatorname\left[X^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[X \mid a 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. 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 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. 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 standard deviation 1/\sigma. In particular, the standard normal distribution \varphi is an Fourier transform#Eigenfunctions, 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 (probability theory), characteristic function \varphi_X(t) of that variable, which is defined as the expected value 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 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[e^] = \hat f(it) = e^ e^ 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 Since this is a quadratic polynomial in t, only the first two cumulants are nonzero, namely the mean \mu and the variance \sigma^2.


Stein operator and class

Within Stein's method 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 (mathematics), function when \sigma = 0. However, one can define the normal distribution with zero variance as a generalized function; specifically, as Dirac delta function, 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 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 probability distribution, maximum entropy. If X is a continuous random variable with probability density function, probability density 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. A function with two Lagrange multipliers 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 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 statistics, score (statistics), scores, and estimators 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 function (statistics), 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 B(n,p) is De Moivre–Laplace theorem, 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 with parameter \lambda is approximately normal with mean \lambda and variance \lambda, for large values of \lambda. * The chi-squared distribution \chi^2(k) is approximately normal with mean k and variance 2k, for large k. * The Student's t-distribution 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, improvements of the approximation are given by the Edgeworth expansions. This theorem can also be used to justify modeling the sum of many uniform noise sources as Gaussian noise. See AWGN.


Operations and functions of normal variables

The probability density function, probability density, cumulative distribution function, cumulative distribution, and inverse cumulative distribution function, 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-normal distribution, log-normally: . * The absolute value of X has folded normal distribution: . If \mu = 0 this is known as the half-normal distribution. * The absolute value of normalized residuals, , ''X'' − ''μ'', /''σ'', has chi distribution with one degree of freedom: , X - \mu, / \sigma \sim \chi_1. * The square of ''X''/''σ'' has the noncentral chi-squared distribution 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 distribution, chi-squared. * The log likelihood of a normal variable x is simply the log of its probability density function: \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 distribution, chi-squared variable. * The distribution of the variable ''X'' restricted to an interval [''a'', ''b''] is called the truncated normal distribution. * (''X'' − ''μ'')−2 has a Lévy distribution with location 0 and scale ''σ''−2.


= Operations on two independent normal variables

= * If X_1 and X_2 are two independence (probability theory), independent 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,sum of normally distributed random variables, [proof] 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. * 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 distribution, stable (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#Independent central-normal distributions, product distribution with density function f_Z(z) = \pi^ K_0(, z, ) where K_0 is the Macdonald function, modified Bessel function of the second kind. This distribution is symmetric around zero, unbounded at z = 0, and has the characteristic function (probability theory), characteristic function \phi_Z(t) = (1 + t^2)^. * Their ratio follows the standard Cauchy distribution: X_1/ X_2 \sim \operatorname(0, 1). * Their Euclidean norm \sqrt has the Rayleigh distribution.


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 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 is independent from the sample standard deviation, which can be demonstrated using Basu's theorem or Cochran's theorem. The ratio of these two quantities will have the Student's t-distribution 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 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 distribution, 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 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 (probability), infinite divisibility. 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 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 ...
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'', 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 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, for normal distributions the sample mean \textstyle\hat\mu and the sample variance ''s''2 are independence (probability theory), independent, 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 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 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 th ...
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, 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, 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 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 σ2, the conjugate prior distribution is also normally distributed. This can be shown more easily by rewriting the variance as the precision, 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 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 σ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; 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. 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 (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. 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. 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 Φ−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 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 independence (probability theory), independent. This formulation arises because for a bivariate normal random vector (''X'', ''Y'') the squared norm will have the chi-squared distribution 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, 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 functions _1F_1 and U. :\begin \operatorname\left[X^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[X \mid a 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. 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 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. 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 standard deviation 1/\sigma. In particular, the standard normal distribution \varphi is an Fourier transform#Eigenfunctions, 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 (probability theory), characteristic function \varphi_X(t) of that variable, which is defined as the expected value 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 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[e^] = \hat f(it) = e^ e^ 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 Since this is a quadratic polynomial in t, only the first two cumulants are nonzero, namely the mean \mu and the variance \sigma^2.


Stein operator and class

Within Stein's method 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 (mathematics), function when \sigma = 0. However, one can define the normal distribution with zero variance as a generalized function; specifically, as Dirac delta function, 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 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 probability distribution, maximum entropy. If X is a continuous random variable with probability density function, probability density 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. A function with two Lagrange multipliers 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 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 statistics, score (statistics), scores, and estimators 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 function (statistics), 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 B(n,p) is De Moivre–Laplace theorem, 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 with parameter \lambda is approximately normal with mean \lambda and variance \lambda, for large values of \lambda. * The chi-squared distribution \chi^2(k) is approximately normal with mean k and variance 2k, for large k. * The Student's t-distribution 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, improvements of the approximation are given by the Edgeworth expansions. This theorem can also be used to justify modeling the sum of many uniform noise sources as Gaussian noise. See AWGN.


Operations and functions of normal variables

The probability density function, probability density, cumulative distribution function, cumulative distribution, and inverse cumulative distribution function, 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-normal distribution, log-normally: . * The absolute value of X has folded normal distribution: . If \mu = 0 this is known as the half-normal distribution. * The absolute value of normalized residuals, , ''X'' − ''μ'', /''σ'', has chi distribution with one degree of freedom: , X - \mu, / \sigma \sim \chi_1. * The square of ''X''/''σ'' has the noncentral chi-squared distribution 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 distribution, chi-squared. * The log likelihood of a normal variable x is simply the log of its probability density function: \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 distribution, chi-squared variable. * The distribution of the variable ''X'' restricted to an interval [''a'', ''b''] is called the truncated normal distribution. * (''X'' − ''μ'')−2 has a Lévy distribution with location 0 and scale ''σ''−2.


= Operations on two independent normal variables

= * If X_1 and X_2 are two independence (probability theory), independent 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,sum of normally distributed random variables, [proof] 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. * 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 distribution, stable (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#Independent central-normal distributions, product distribution with density function f_Z(z) = \pi^ K_0(, z, ) where K_0 is the Macdonald function, modified Bessel function of the second kind. This distribution is symmetric around zero, unbounded at z = 0, and has the characteristic function (probability theory), characteristic function \phi_Z(t) = (1 + t^2)^. * Their ratio follows the standard Cauchy distribution: X_1/ X_2 \sim \operatorname(0, 1). * Their Euclidean norm \sqrt has the Rayleigh distribution.


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 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 is independent from the sample standard deviation, which can be demonstrated using Basu's theorem or Cochran's theorem. The ratio of these two quantities will have the Student's t-distribution 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 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 distribution, 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 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 (probability), infinite divisibility. 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 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 ...
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'', 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 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, for normal distributions the sample mean \textstyle\hat\mu and the sample variance ''s''2 are independence (probability theory), independent, 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 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 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 th ...
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, 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, 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 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 σ2, the conjugate prior distribution is also normally distributed. This can be shown more easily by rewriting the variance as the precision, 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 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 σ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; 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. 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 (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. 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. 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 Φ−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 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 independence (probability theory), independent. This formulation arises because for a bivariate normal random vector (''X'', ''Y'') the squared norm will have the chi-squared distribution 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, 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._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,_with_mean_0_and_standard_deviation_1/\sigma._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 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 ...
_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_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__cumulants_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 (statistician), Charles Stein, who first publ ...
_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_when_\sigma_=_0. However,_one_can_define_the_normal_distribution_with_zero_variance_as_a_ generalized_function;_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 argum ...
_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 ...
_with_ probability_density_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._A_function_with_two_ Lagrange_multipliers_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_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_statistics,_ scores,_and__estimators_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 ques ...
_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_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-squar ...
_\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 situ ...
_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 ser ...
s. This_theorem_can_also_be_used_to_justify_modeling_the_sum_of_many_uniform_noise_sources_as_ Gaussian_noise._See_ AWGN.


__Operations_and_functions_of_normal_variables_

The_ probability_density,_
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_function, 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-normal_distribution, log-normally:_. *_The_absolute_value_of_X_has_folded_normal_distribution:_._If_\mu_=_0_this_is_known_as_the_half-normal_distribution. *_The_absolute_value_of_normalized_residuals,_, ''X''_−_''μ'', /''σ'',_has_chi_distribution_with_one_degree_of_freedom:_, X_-_\mu, _/_\sigma_\sim_\chi_1. *_The_square_of_''X''/''σ''_has_the_noncentral_chi-squared_distribution_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_distribution, chi-squared. *_The_log_likelihood_of_a_normal_variable_x_is_simply_the_log_of_its__probability_density_function:_\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_distribution, chi-squared_variable. *_The_distribution_of_the_variable_''X''_restricted_to_an_interval_[''a'',_''b'']_is_called_the_truncated_normal_distribution. *_(''X''_−_''μ'')−2_has_a__Lévy_distribution_with_location_0_and_scale_''σ''−2.


_=_Operations_on_two_independent_normal_variables_

= *_If_X_1_and_X_2_are_two_independence_(probability_theory), independent_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,sum_of_normally_distributed_random_variables, [proof]_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. *_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_distribution, stable_(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#Independent_central-normal_distributions, product_distribution_with_density_function_f_Z(z)_=_\pi^_K_0(, z, )_where_K_0_is_the_Macdonald_function, modified_Bessel_function_of_the_second_kind._This_distribution_is_symmetric_around_zero,_unbounded_at_z_=_0,_and_has_the_ characteristic_function__\phi_Z(t)_=_(1_+_t^2)^. *_Their_ratio_follows_the_standard__Cauchy_distribution:_X_1/_X_2_\sim_\operatorname(0,_1). *_Their_Euclidean_norm_\sqrt_has_the_Rayleigh_distribution.


__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-squar ...
_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_is_independent_from_the_sample__standard_deviation,_which_can_be_demonstrated_using_Basu's_theorem_or_Cochran's_theorem._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 situ ...
_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_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_distribution, 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_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_(probability), infinite_divisibility. 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_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_...
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'',_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-squar ...
_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,_for_normal_distributions_the_sample_mean_\textstyle\hat\mu_and_the_sample_variance_''s''2_are_independence_(probability_theory), independent,_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 situ ...
_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_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_th_...
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,_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,_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_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_σ2,_the_conjugate_prior_distribution_is_also_normally_distributed. This_can_be_shown_more_easily_by_rewriting_the_variance_as_the__precision,_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_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_σ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;_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._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_(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._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 ques ...
._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_Φ−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_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_independence_(probability_theory), independent._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-squar ...
_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,_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].html" ;"title="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 functions _1F_1 and U. :\begin \operatorname\left[X^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[X \mid a 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. 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 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. 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 standard deviation 1/\sigma. In particular, the standard normal distribution \varphi is an Fourier transform#Eigenfunctions, 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 (probability theory), characteristic function \varphi_X(t) of that variable, which is defined as the expected value 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 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[e^] = \hat f(it) = e^ e^ 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 Since this is a quadratic polynomial in t, only the first two cumulants are nonzero, namely the mean \mu and the variance \sigma^2.


Stein operator and class

Within Stein's method 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 (mathematics), function when \sigma = 0. However, one can define the normal distribution with zero variance as a generalized function; specifically, as Dirac delta function, 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 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 probability distribution, maximum entropy. If X is a continuous random variable with probability density function, probability density 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. A function with two Lagrange multipliers 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 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 statistics, score (statistics), scores, and estimators 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 function (statistics), 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 B(n,p) is De Moivre–Laplace theorem, 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 with parameter \lambda is approximately normal with mean \lambda and variance \lambda, for large values of \lambda. * The chi-squared distribution \chi^2(k) is approximately normal with mean k and variance 2k, for large k. * The Student's t-distribution 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, improvements of the approximation are given by the Edgeworth expansions. This theorem can also be used to justify modeling the sum of many uniform noise sources as Gaussian noise. See AWGN.


Operations and functions of normal variables

The probability density function, probability density, cumulative distribution function, cumulative distribution, and inverse cumulative distribution function, 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-normal distribution, log-normally: . * The absolute value of X has folded normal distribution: . If \mu = 0 this is known as the half-normal distribution. * The absolute value of normalized residuals, , ''X'' − ''μ'', /''σ'', has chi distribution with one degree of freedom: , X - \mu, / \sigma \sim \chi_1. * The square of ''X''/''σ'' has the noncentral chi-squared distribution 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 distribution, chi-squared. * The log likelihood of a normal variable x is simply the log of its probability density function: \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 distribution, chi-squared variable. * The distribution of the variable ''X'' restricted to an interval [''a'', ''b''] is called the truncated normal distribution. * (''X'' − ''μ'')−2 has a Lévy distribution with location 0 and scale ''σ''−2.


= Operations on two independent normal variables

= * If X_1 and X_2 are two independence (probability theory), independent 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,sum of normally distributed random variables, [proof] 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. * 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 distribution, stable (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#Independent central-normal distributions, product distribution with density function f_Z(z) = \pi^ K_0(, z, ) where K_0 is the Macdonald function, modified Bessel function of the second kind. This distribution is symmetric around zero, unbounded at z = 0, and has the characteristic function (probability theory), characteristic function \phi_Z(t) = (1 + t^2)^. * Their ratio follows the standard Cauchy distribution: X_1/ X_2 \sim \operatorname(0, 1). * Their Euclidean norm \sqrt has the Rayleigh distribution.


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 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 is independent from the sample standard deviation, which can be demonstrated using Basu's theorem or Cochran's theorem. The ratio of these two quantities will have the Student's t-distribution 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 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 distribution, 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 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 (probability), infinite divisibility. 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 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 ...
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'', 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 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, for normal distributions the sample mean \textstyle\hat\mu and the sample variance ''s''2 are independence (probability theory), independent, 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 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 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 th ...
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, 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, 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 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 σ2, the conjugate prior distribution is also normally distributed. This can be shown more easily by rewriting the variance as the precision, 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 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 σ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; 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. 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 (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. 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. 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 Φ−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 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 independence (probability theory), independent. This formulation arises because for a bivariate normal random vector (''X'', ''Y'') the squared norm will have the chi-squared distribution 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, 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 functions _1F_1 and U. :\begin \operatorname\left[X^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[X \mid a 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. 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 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. 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 standard deviation 1/\sigma. In particular, the standard normal distribution \varphi is an Fourier transform#Eigenfunctions, 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 (probability theory), characteristic function \varphi_X(t) of that variable, which is defined as the expected value 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 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[e^] = \hat f(it) = e^ e^ 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 Since this is a quadratic polynomial in t, only the first two cumulants are nonzero, namely the mean \mu and the variance \sigma^2.


Stein operator and class

Within Stein's method 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 (mathematics), function when \sigma = 0. However, one can define the normal distribution with zero variance as a generalized function; specifically, as Dirac delta function, 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 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 probability distribution, maximum entropy. If X is a continuous random variable with probability density function, probability density 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. A function with two Lagrange multipliers 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 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 statistics, score (statistics), scores, and estimators 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 function (statistics), 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 B(n,p) is De Moivre–Laplace theorem, 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 with parameter \lambda is approximately normal with mean \lambda and variance \lambda, for large values of \lambda. * The chi-squared distribution \chi^2(k) is approximately normal with mean k and variance 2k, for large k. * The Student's t-distribution 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, improvements of the approximation are given by the Edgeworth expansions. This theorem can also be used to justify modeling the sum of many uniform noise sources as Gaussian noise. See AWGN.


Operations and functions of normal variables

The probability density function, probability density, cumulative distribution function, cumulative distribution, and inverse cumulative distribution function, 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-normal distribution, log-normally: . * The absolute value of X has folded normal distribution: . If \mu = 0 this is known as the half-normal distribution. * The absolute value of normalized residuals, , ''X'' − ''μ'', /''σ'', has chi distribution with one degree of freedom: , X - \mu, / \sigma \sim \chi_1. * The square of ''X''/''σ'' has the noncentral chi-squared distribution 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 distribution, chi-squared. * The log likelihood of a normal variable x is simply the log of its probability density function: \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 distribution, chi-squared variable. * The distribution of the variable ''X'' restricted to an interval [''a'', ''b''] is called the truncated normal distribution. * (''X'' − ''μ'')−2 has a Lévy distribution with location 0 and scale ''σ''−2.


= Operations on two independent normal variables

= * If X_1 and X_2 are two independence (probability theory), independent 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,sum of normally distributed random variables, [proof] 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. * 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 distribution, stable (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#Independent central-normal distributions, product distribution with density function f_Z(z) = \pi^ K_0(, z, ) where K_0 is the Macdonald function, modified Bessel function of the second kind. This distribution is symmetric around zero, unbounded at z = 0, and has the characteristic function (probability theory), characteristic function \phi_Z(t) = (1 + t^2)^. * Their ratio follows the standard Cauchy distribution: X_1/ X_2 \sim \operatorname(0, 1). * Their Euclidean norm \sqrt has the Rayleigh distribution.


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 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 is independent from the sample standard deviation, which can be demonstrated using Basu's theorem or Cochran's theorem. The ratio of these two quantities will have the Student's t-distribution 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 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 distribution, 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 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 (probability), infinite divisibility. 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 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 ...
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'', 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 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, for normal distributions the sample mean \textstyle\hat\mu and the sample variance ''s''2 are independence (probability theory), independent, 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 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 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 th ...
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, 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, 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 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 σ2, the conjugate prior distribution is also normally distributed. This can be shown more easily by rewriting the variance as the precision, 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 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 σ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; 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. 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 (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. 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. 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 Φ−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 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 independence (probability theory), independent. This formulation arises because for a bivariate normal random vector (''X'', ''Y'') the squared norm will have the chi-squared distribution 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, 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_when_\sigma_=_0. However,_one_can_define_the_normal_distribution_with_zero_variance_as_a_ generalized_function;_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 argum ...
_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 ...
_with_ probability_density_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._A_function_with_two_ Lagrange_multipliers_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_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_statistics,_ scores,_and__estimators_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 ques ...
_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_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-squar ...
_\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 situ ...
_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 ser ...
s. This_theorem_can_also_be_used_to_justify_modeling_the_sum_of_many_uniform_noise_sources_as_ Gaussian_noise._See_ AWGN.


__Operations_and_functions_of_normal_variables_

The_ probability_density,_
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_function, 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-normal_distribution, log-normally:_. *_The_absolute_value_of_X_has_folded_normal_distribution:_._If_\mu_=_0_this_is_known_as_the_half-normal_distribution. *_The_absolute_value_of_normalized_residuals,_, ''X''_−_''μ'', /''σ'',_has_chi_distribution_with_one_degree_of_freedom:_, X_-_\mu, _/_\sigma_\sim_\chi_1. *_The_square_of_''X''/''σ''_has_the_noncentral_chi-squared_distribution_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_distribution, chi-squared. *_The_log_likelihood_of_a_normal_variable_x_is_simply_the_log_of_its__probability_density_function:_\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_distribution, chi-squared_variable. *_The_distribution_of_the_variable_''X''_restricted_to_an_interval_[''a'',_''b'']_is_called_the_truncated_normal_distribution. *_(''X''_−_''μ'')−2_has_a__Lévy_distribution_with_location_0_and_scale_''σ''−2.


_=_Operations_on_two_independent_normal_variables_

= *_If_X_1_and_X_2_are_two_independence_(probability_theory), independent_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,sum_of_normally_distributed_random_variables, [proof]_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. *_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_distribution, stable_(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#Independent_central-normal_distributions, product_distribution_with_density_function_f_Z(z)_=_\pi^_K_0(, z, )_where_K_0_is_the_Macdonald_function, modified_Bessel_function_of_the_second_kind._This_distribution_is_symmetric_around_zero,_unbounded_at_z_=_0,_and_has_the_ characteristic_function__\phi_Z(t)_=_(1_+_t^2)^. *_Their_ratio_follows_the_standard__Cauchy_distribution:_X_1/_X_2_\sim_\operatorname(0,_1). *_Their_Euclidean_norm_\sqrt_has_the_Rayleigh_distribution.


__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-squar ...
_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_is_independent_from_the_sample__standard_deviation,_which_can_be_demonstrated_using_Basu's_theorem_or_Cochran's_theorem._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 situ ...
_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_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_distribution, 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_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_(probability), infinite_divisibility. 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_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_...
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'',_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-squar ...
_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,_for_normal_distributions_the_sample_mean_\textstyle\hat\mu_and_the_sample_variance_''s''2_are_independence_(probability_theory), independent,_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 situ ...
_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_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_th_...
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,_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,_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_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_σ2,_the_conjugate_prior_distribution_is_also_normally_distributed. This_can_be_shown_more_easily_by_rewriting_the_variance_as_the__precision,_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_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_σ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;_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._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_(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._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 ques ...
._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_Φ−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_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_independence_(probability_theory), independent._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-squar ...
_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,_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].html" ;"title="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 functions _1F_1 and U. :\begin \operatorname\left[X^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[X \mid a 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. 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 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. 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 standard deviation 1/\sigma. In particular, the standard normal distribution \varphi is an Fourier transform#Eigenfunctions, 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 (probability theory), characteristic function \varphi_X(t) of that variable, which is defined as the expected value 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 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[e^] = \hat f(it) = e^ e^ 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 Since this is a quadratic polynomial in t, only the first two cumulants are nonzero, namely the mean \mu and the variance \sigma^2.


Stein operator and class

Within Stein's method 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_when_\sigma_=_0. However,_one_can_define_the_normal_distribution_with_zero_variance_as_a_ generalized_function;_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 argum ...
_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 ...
_with_ probability_density_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._A_function_with_two_ Lagrange_multipliers_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_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_statistics,_ scores,_and__estimators_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 ques ...
_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_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-squar ...
_\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 situ ...
_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 ser ...
s. This_theorem_can_also_be_used_to_justify_modeling_the_sum_of_many_uniform_noise_sources_as_ Gaussian_noise._See_ AWGN.


__Operations_and_functions_of_normal_variables_

The_ probability_density,_
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_function, 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-normal_distribution, log-normally:_. *_The_absolute_value_of_X_has_folded_normal_distribution:_._If_\mu_=_0_this_is_known_as_the_half-normal_distribution. *_The_absolute_value_of_normalized_residuals,_, ''X''_−_''μ'', /''σ'',_has_chi_distribution_with_one_degree_of_freedom:_, X_-_\mu, _/_\sigma_\sim_\chi_1. *_The_square_of_''X''/''σ''_has_the_noncentral_chi-squared_distribution_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_distribution, chi-squared. *_The_log_likelihood_of_a_normal_variable_x_is_simply_the_log_of_its__probability_density_function:_\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_distribution, chi-squared_variable. *_The_distribution_of_the_variable_''X''_restricted_to_an_interval_[''a'',_''b'']_is_called_the_truncated_normal_distribution. *_(''X''_−_''μ'')−2_has_a__Lévy_distribution_with_location_0_and_scale_''σ''−2.


_=_Operations_on_two_independent_normal_variables_

= *_If_X_1_and_X_2_are_two_independence_(probability_theory), independent_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,sum_of_normally_distributed_random_variables, [proof]_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. *_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_distribution, stable_(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#Independent_central-normal_distributions, product_distribution_with_density_function_f_Z(z)_=_\pi^_K_0(, z, )_where_K_0_is_the_Macdonald_function, modified_Bessel_function_of_the_second_kind._This_distribution_is_symmetric_around_zero,_unbounded_at_z_=_0,_and_has_the__characteristic_function__\phi_Z(t)_=_(1_+_t^2)^. *_Their_ratio_follows_the_standard__Cauchy_distribution:_X_1/_X_2_\sim_\operatorname(0,_1). *_Their_Euclidean_norm_\sqrt_has_the_Rayleigh_distribution.


__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-squar ...
_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_is_independent_from_the_sample__standard_deviation,_which_can_be_demonstrated_using_Basu's_theorem_or_Cochran's_theorem._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 situ ...
_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_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_distribution, 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_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_(probability), infinite_divisibility. 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_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_...
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'',_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-squar ...
_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,_for_normal_distributions_the_sample_mean_\textstyle\hat\mu_and_the_sample_variance_''s''2_are_independence_(probability_theory), independent,_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 situ ...
_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_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_th_...
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,_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,_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_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_σ2,_the_conjugate_prior_distribution_is_also_normally_distributed. This_can_be_shown_more_easily_by_rewriting_the_variance_as_the__precision,_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_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_σ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;_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._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_(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._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 ques ...
._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_Φ−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_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_independence_(probability_theory), independent._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-squar ...
_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,_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].html"_;"title="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_functions__1F_1_and_U. :\begin ___\operatorname\left[X^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._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,_with_mean_0_and_standard_deviation_1/\sigma._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_ 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__...
_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_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__cumulants_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_(statistician),_Charles_Stein,_who_first_publ_...
_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_when_\sigma_=_0. However,_one_can_define_the_normal_distribution_with_zero_variance_as_a_ generalized_function;_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 argum ...
_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 ...
_with_ probability_density_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._A_function_with_two_ Lagrange_multipliers_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_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_statistics,_ scores,_and__estimators_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 ques ...
_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_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-squar ...
_\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 situ ...
_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 ser ...
s. This_theorem_can_also_be_used_to_justify_modeling_the_sum_of_many_uniform_noise_sources_as_ Gaussian_noise._See_ AWGN.


__Operations_and_functions_of_normal_variables_

The_ probability_density,_
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_function, 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-normal_distribution, log-normally:_. *_The_absolute_value_of_X_has_folded_normal_distribution:_._If_\mu_=_0_this_is_known_as_the_half-normal_distribution. *_The_absolute_value_of_normalized_residuals,_, ''X''_−_''μ'', /''σ'',_has_chi_distribution_with_one_degree_of_freedom:_, X_-_\mu, _/_\sigma_\sim_\chi_1. *_The_square_of_''X''/''σ''_has_the_noncentral_chi-squared_distribution_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_distribution, chi-squared. *_The_log_likelihood_of_a_normal_variable_x_is_simply_the_log_of_its__probability_density_function:_\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_distribution, chi-squared_variable. *_The_distribution_of_the_variable_''X''_restricted_to_an_interval_[''a'',_''b'']_is_called_the_truncated_normal_distribution. *_(''X''_−_''μ'')−2_has_a__Lévy_distribution_with_location_0_and_scale_''σ''−2.


_=_Operations_on_two_independent_normal_variables_

= *_If_X_1_and_X_2_are_two_independence_(probability_theory), independent_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,sum_of_normally_distributed_random_variables, [proof]_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. *_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_distribution, stable_(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#Independent_central-normal_distributions, product_distribution_with_density_function_f_Z(z)_=_\pi^_K_0(, z, )_where_K_0_is_the_Macdonald_function, modified_Bessel_function_of_the_second_kind._This_distribution_is_symmetric_around_zero,_unbounded_at_z_=_0,_and_has_the__characteristic_function__\phi_Z(t)_=_(1_+_t^2)^. *_Their_ratio_follows_the_standard__Cauchy_distribution:_X_1/_X_2_\sim_\operatorname(0,_1). *_Their_Euclidean_norm_\sqrt_has_the_Rayleigh_distribution.


__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-squar ...
_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_is_independent_from_the_sample__standard_deviation,_which_can_be_demonstrated_using_Basu's_theorem_or_Cochran's_theorem._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 situ ...
_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_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_distribution, 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_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_(probability), infinite_divisibility. 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_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_...
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'',_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-squar ...
_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,_for_normal_distributions_the_sample_mean_\textstyle\hat\mu_and_the_sample_variance_''s''2_are_independence_(probability_theory), independent,_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 situ ...
_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_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_th_...
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,_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,_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_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_σ2,_the_conjugate_prior_distribution_is_also_normally_distributed. This_can_be_shown_more_easily_by_rewriting_the_variance_as_the__precision,_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_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_σ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;_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._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_(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._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 ques ...
._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_Φ−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_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_independence_(probability_theory), independent._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-squar ...
_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,_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_functions__1F_1_and_U. :\begin ___\operatorname\left[X^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._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,_with_mean_0_and_standard_deviation_1/\sigma._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_ 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__...
_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_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__cumulants_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_(statistician),_Charles_Stein,_who_first_publ_...
_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_when_\sigma_=_0. However,_one_can_define_the_normal_distribution_with_zero_variance_as_a_ generalized_function;_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 argum ...
_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 ...
_with_ probability_density_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._A_function_with_two_ Lagrange_multipliers_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_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_statistics,_ scores,_and__estimators_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 ques ...
_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_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-squar ...
_\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 situ ...
_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 ser ...
s. This_theorem_can_also_be_used_to_justify_modeling_the_sum_of_many_uniform_noise_sources_as_ Gaussian_noise._See_ AWGN.


__Operations_and_functions_of_normal_variables_

The_ probability_density,_
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_function, 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-normal_distribution, log-normally:_. *_The_absolute_value_of_X_has_folded_normal_distribution:_._If_\mu_=_0_this_is_known_as_the_half-normal_distribution. *_The_absolute_value_of_normalized_residuals,_, ''X''_−_''μ'', /''σ'',_has_chi_distribution_with_one_degree_of_freedom:_, X_-_\mu, _/_\sigma_\sim_\chi_1. *_The_square_of_''X''/''σ''_has_the_noncentral_chi-squared_distribution_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_distribution, chi-squared. *_The_log_likelihood_of_a_normal_variable_x_is_simply_the_log_of_its__probability_density_function:_\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_distribution, chi-squared_variable. *_The_distribution_of_the_variable_''X''_restricted_to_an_interval_[''a'',_''b'']_is_called_the_truncated_normal_distribution. *_(''X''_−_''μ'')−2_has_a__Lévy_distribution_with_location_0_and_scale_''σ''−2.


_=_Operations_on_two_independent_normal_variables_

= *_If_X_1_and_X_2_are_two_independence_(probability_theory), independent_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,sum_of_normally_distributed_random_variables, [proof]_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. *_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_distribution, stable_(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#Independent_central-normal_distributions, product_distribution_with_density_function_f_Z(z)_=_\pi^_K_0(, z, )_where_K_0_is_the_Macdonald_function, modified_Bessel_function_of_the_second_kind._This_distribution_is_symmetric_around_zero,_unbounded_at_z_=_0,_and_has_the__characteristic_function__\phi_Z(t)_=_(1_+_t^2)^. *_Their_ratio_follows_the_standard__Cauchy_distribution:_X_1/_X_2_\sim_\operatorname(0,_1). *_Their_Euclidean_norm_\sqrt_has_the_Rayleigh_distribution.


__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-squar ...
_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_is_independent_from_the_sample__standard_deviation,_which_can_be_demonstrated_using_Basu's_theorem_or_Cochran's_theorem._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 situ ...
_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_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_distribution, 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_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_(probability), infinite_divisibility. 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_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_...
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'',_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-squar ...
_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,_for_normal_distributions_the_sample_mean_\textstyle\hat\mu_and_the_sample_variance_''s''2_are_independence_(probability_theory), independent,_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 situ ...
_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_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_th_...
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,_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,_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_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_σ2,_the_conjugate_prior_distribution_is_also_normally_distributed. This_can_be_shown_more_easily_by_rewriting_the_variance_as_the__precision,_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_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_σ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;_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._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_(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._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 ques ...
._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_Φ−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_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_independence_(probability_theory), independent._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-squar ...
_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,_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].html"_;"title="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._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,_with_mean_0_and_standard_deviation_1/\sigma._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_ 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__...
_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_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__cumulants_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_(statistician),_Charles_Stein,_who_first_publ_...
_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_when_\sigma_=_0. However,_one_can_define_the_normal_distribution_with_zero_variance_as_a_ generalized_function;_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 argum ...
_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 ...
_with_ probability_density_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._A_function_with_two_ Lagrange_multipliers_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_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_statistics,_ scores,_and__estimators_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 ques ...
_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_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-squar ...
_\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 situ ...
_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 ser ...
s. This_theorem_can_also_be_used_to_justify_modeling_the_sum_of_many_uniform_noise_sources_as_ Gaussian_noise._See_ AWGN.


__Operations_and_functions_of_normal_variables_

The_ probability_density,_
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_function, 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-normal_distribution, log-normally:_. *_The_absolute_value_of_X_has_folded_normal_distribution:_._If_\mu_=_0_this_is_known_as_the_half-normal_distribution. *_The_absolute_value_of_normalized_residuals,_, ''X''_−_''μ'', /''σ'',_has_chi_distribution_with_one_degree_of_freedom:_, X_-_\mu, _/_\sigma_\sim_\chi_1. *_The_square_of_''X''/''σ''_has_the_noncentral_chi-squared_distribution_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_distribution, chi-squared. *_The_log_likelihood_of_a_normal_variable_x_is_simply_the_log_of_its__probability_density_function:_\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_distribution, chi-squared_variable. *_The_distribution_of_the_variable_''X''_restricted_to_an_interval_[''a'',_''b'']_is_called_the_truncated_normal_distribution. *_(''X''_−_''μ'')−2_has_a__Lévy_distribution_with_location_0_and_scale_''σ''−2.


_=_Operations_on_two_independent_normal_variables_

= *_If_X_1_and_X_2_are_two_independence_(probability_theory), independent_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,sum_of_normally_distributed_random_variables, [proof]_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. *_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_distribution, stable_(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#Independent_central-normal_distributions, product_distribution_with_density_function_f_Z(z)_=_\pi^_K_0(, z, )_where_K_0_is_the_Macdonald_function, modified_Bessel_function_of_the_second_kind._This_distribution_is_symmetric_around_zero,_unbounded_at_z_=_0,_and_has_the__characteristic_function__\phi_Z(t)_=_(1_+_t^2)^. *_Their_ratio_follows_the_standard__Cauchy_distribution:_X_1/_X_2_\sim_\operatorname(0,_1). *_Their_Euclidean_norm_\sqrt_has_the_Rayleigh_distribution.


__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-squar ...
_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_is_independent_from_the_sample__standard_deviation,_which_can_be_demonstrated_using_Basu's_theorem_or_Cochran's_theorem._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 situ ...
_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_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_distribution, 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_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_(probability), infinite_divisibility. 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_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_...
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'',_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-squar ...
_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,_for_normal_distributions_the_sample_mean_\textstyle\hat\mu_and_the_sample_variance_''s''2_are_independence_(probability_theory), independent,_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 situ ...
_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_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_th_...
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,_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,_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_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_σ2,_the_conjugate_prior_distribution_is_also_normally_distributed. This_can_be_shown_more_easily_by_rewriting_the_variance_as_the__precision,_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_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_σ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;_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._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_(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._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 ques ...
._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_Φ−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_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_independence_(probability_theory), independent._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-squar ...
_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,_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].html"_;"title="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_functions__1F_1_and_U. :\begin ___\operatorname\left[X^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[X_\mid_a 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._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_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._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_standard_deviation_1/\sigma._In_particular,_the_standard_normal_distribution_\varphi_is_an_Fourier_transform#Eigenfunctions, 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_(probability_theory), characteristic_function_\varphi_X(t)_of_that_variable,_which_is_defined_as_the_expected_value_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_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[e^]_=_\hat_f(it)_=_e^_e^ 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 Since_this_is_a_quadratic_polynomial_in_t,_only_the_first_two__cumulants_are_nonzero,_namely_the_mean \mu_and_the_variance \sigma^2.


__Stein_operator_and_class_

Within_Stein's_method_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_when_\sigma_=_0. However,_one_can_define_the_normal_distribution_with_zero_variance_as_a_ generalized_function;_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 argum ...
_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 ...
_with_ probability_density_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._A_function_with_two_ Lagrange_multipliers_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_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_statistics,_ scores,_and__estimators_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 ques ...
_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_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-squar ...
_\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 situ ...
_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 ser ...
s. This_theorem_can_also_be_used_to_justify_modeling_the_sum_of_many_uniform_noise_sources_as_ Gaussian_noise._See_ AWGN.


__Operations_and_functions_of_normal_variables_

The_ probability_density,_
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_function, 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-normal_distribution, log-normally:_. *_The_absolute_value_of_X_has_folded_normal_distribution:_._If_\mu_=_0_this_is_known_as_the_half-normal_distribution. *_The_absolute_value_of_normalized_residuals,_, ''X''_−_''μ'', /''σ'',_has_chi_distribution_with_one_degree_of_freedom:_, X_-_\mu, _/_\sigma_\sim_\chi_1. *_The_square_of_''X''/''σ''_has_the_noncentral_chi-squared_distribution_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_distribution, chi-squared. *_The_log_likelihood_of_a_normal_variable_x_is_simply_the_log_of_its__probability_density_function:_\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_distribution, chi-squared_variable. *_The_distribution_of_the_variable_''X''_restricted_to_an_interval_[''a'',_''b'']_is_called_the_truncated_normal_distribution. *_(''X''_−_''μ'')−2_has_a__Lévy_distribution_with_location_0_and_scale_''σ''−2.


_=_Operations_on_two_independent_normal_variables_

= *_If_X_1_and_X_2_are_two_independence_(probability_theory), independent_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,sum_of_normally_distributed_random_variables, [proof]_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. *_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_distribution, stable_(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#Independent_central-normal_distributions, product_distribution_with_density_function_f_Z(z)_=_\pi^_K_0(, z, )_where_K_0_is_the_Macdonald_function, modified_Bessel_function_of_the_second_kind._This_distribution_is_symmetric_around_zero,_unbounded_at_z_=_0,_and_has_the_characteristic_function_(probability_theory), characteristic_function__\phi_Z(t)_=_(1_+_t^2)^. *_Their_ratio_follows_the_standard__Cauchy_distribution:_X_1/_X_2_\sim_\operatorname(0,_1). *_Their_Euclidean_norm_\sqrt_has_the_Rayleigh_distribution.


__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-squar ...
_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_is_independent_from_the_sample__standard_deviation,_which_can_be_demonstrated_using_Basu's_theorem_or_Cochran's_theorem._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 situ ...
_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_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_distribution, 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_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_(probability), infinite_divisibility. 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_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_...
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'',_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-squar ...
_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,_for_normal_distributions_the_sample_mean_\textstyle\hat\mu_and_the_sample_variance_''s''2_are_independence_(probability_theory), independent,_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 situ ...
_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_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_th_...
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,_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,_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_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_σ2,_the_conjugate_prior_distribution_is_also_normally_distributed. This_can_be_shown_more_easily_by_rewriting_the_variance_as_the__precision,_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_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_σ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;_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._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_(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._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 ques ...
._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_Φ−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_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_independence_(probability_theory), independent._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-squar ...
_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,_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_functions__1F_1_and_U. :\begin ___\operatorname\left[X^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[X_\mid_a 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._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_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._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_standard_deviation_1/\sigma._In_particular,_the_standard_normal_distribution_\varphi_is_an_Fourier_transform#Eigenfunctions, 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_(probability_theory), characteristic_function_\varphi_X(t)_of_that_variable,_which_is_defined_as_the_expected_value_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_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[e^]_=_\hat_f(it)_=_e^_e^ 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 Since_this_is_a_quadratic_polynomial_in_t,_only_the_first_two__cumulants_are_nonzero,_namely_the_mean \mu_and_the_variance \sigma^2.


__Stein_operator_and_class_

Within_Stein's_method_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_when_\sigma_=_0. However,_one_can_define_the_normal_distribution_with_zero_variance_as_a_ generalized_function;_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 argum ...
_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 ...
_with_ probability_density_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._A_function_with_two_ Lagrange_multipliers_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_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_statistics,_ scores,_and__estimators_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 ques ...
_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_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-squar ...
_\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 situ ...
_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 ser ...
s. This_theorem_can_also_be_used_to_justify_modeling_the_sum_of_many_uniform_noise_sources_as_ Gaussian_noise._See_ AWGN.


__Operations_and_functions_of_normal_variables_

The_ probability_density,_
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_function, 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-normal_distribution, log-normally:_. *_The_absolute_value_of_X_has_folded_normal_distribution:_._If_\mu_=_0_this_is_known_as_the_half-normal_distribution. *_The_absolute_value_of_normalized_residuals,_, ''X''_−_''μ'', /''σ'',_has_chi_distribution_with_one_degree_of_freedom:_, X_-_\mu, _/_\sigma_\sim_\chi_1. *_The_square_of_''X''/''σ''_has_the_noncentral_chi-squared_distribution_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_distribution, chi-squared. *_The_log_likelihood_of_a_normal_variable_x_is_simply_the_log_of_its__probability_density_function:_\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_distribution, chi-squared_variable. *_The_distribution_of_the_variable_''X''_restricted_to_an_interval_[''a'',_''b'']_is_called_the_truncated_normal_distribution. *_(''X''_−_''μ'')−2_has_a__Lévy_distribution_with_location_0_and_scale_''σ''−2.


_=_Operations_on_two_independent_normal_variables_

= *_If_X_1_and_X_2_are_two_independence_(probability_theory), independent_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,sum_of_normally_distributed_random_variables, [proof]_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. *_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_distribution, stable_(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#Independent_central-normal_distributions, product_distribution_with_density_function_f_Z(z)_=_\pi^_K_0(, z, )_where_K_0_is_the_Macdonald_function, modified_Bessel_function_of_the_second_kind._This_distribution_is_symmetric_around_zero,_unbounded_at_z_=_0,_and_has_the_characteristic_function_(probability_theory), characteristic_function__\phi_Z(t)_=_(1_+_t^2)^. *_Their_ratio_follows_the_standard__Cauchy_distribution:_X_1/_X_2_\sim_\operatorname(0,_1). *_Their_Euclidean_norm_\sqrt_has_the_Rayleigh_distribution.


__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-squar ...
_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_is_independent_from_the_sample__standard_deviation,_which_can_be_demonstrated_using_Basu's_theorem_or_Cochran's_theorem._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 situ ...
_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_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_distribution, 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_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_(probability), infinite_divisibility. 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_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_...
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'',_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-squar ...
_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,_for_normal_distributions_the_sample_mean_\textstyle\hat\mu_and_the_sample_variance_''s''2_are_independence_(probability_theory), independent,_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 situ ...
_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_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_th_...
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,_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,_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_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_σ2,_the_conjugate_prior_distribution_is_also_normally_distributed. This_can_be_shown_more_easily_by_rewriting_the_variance_as_the__precision,_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_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_σ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;_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._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_(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._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 ques ...
._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_Φ−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_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_independence_(probability_theory), independent._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-squar ...
_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,_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._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,_with_mean_0_and_standard_deviation_1/\sigma._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_ 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__...
_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_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__cumulants_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_(statistician),_Charles_Stein,_who_first_publ_...
_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_when_\sigma_=_0. However,_one_can_define_the_normal_distribution_with_zero_variance_as_a_ generalized_function;_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 argum ...
_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 ...
_with_ probability_density_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._A_function_with_two_ Lagrange_multipliers_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_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_statistics,_ scores,_and__estimators_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 ques ...
_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_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-squar ...
_\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 situ ...
_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 ser ...
s. This_theorem_can_also_be_used_to_justify_modeling_the_sum_of_many_uniform_noise_sources_as_ Gaussian_noise._See_ AWGN.


__Operations_and_functions_of_normal_variables_

The_ probability_density,_
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_function, 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-normal_distribution, log-normally:_. *_The_absolute_value_of_X_has_folded_normal_distribution:_._If_\mu_=_0_this_is_known_as_the_half-normal_distribution. *_The_absolute_value_of_normalized_residuals,_, ''X''_−_''μ'', /''σ'',_has_chi_distribution_with_one_degree_of_freedom:_, X_-_\mu, _/_\sigma_\sim_\chi_1. *_The_square_of_''X''/''σ''_has_the_noncentral_chi-squared_distribution_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_distribution, chi-squared. *_The_log_likelihood_of_a_normal_variable_x_is_simply_the_log_of_its__probability_density_function:_\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_distribution, chi-squared_variable. *_The_distribution_of_the_variable_''X''_restricted_to_an_interval_[''a'',_''b'']_is_called_the_truncated_normal_distribution. *_(''X''_−_''μ'')−2_has_a__Lévy_distribution_with_location_0_and_scale_''σ''−2.


_=_Operations_on_two_independent_normal_variables_

= *_If_X_1_and_X_2_are_two_independence_(probability_theory), independent_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,sum_of_normally_distributed_random_variables, [proof]_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. *_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_distribution, stable_(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#Independent_central-normal_distributions, product_distribution_with_density_function_f_Z(z)_=_\pi^_K_0(, z, )_where_K_0_is_the_Macdonald_function, modified_Bessel_function_of_the_second_kind._This_distribution_is_symmetric_around_zero,_unbounded_at_z_=_0,_and_has_the__characteristic_function__\phi_Z(t)_=_(1_+_t^2)^. *_Their_ratio_follows_the_standard__Cauchy_distribution:_X_1/_X_2_\sim_\operatorname(0,_1). *_Their_Euclidean_norm_\sqrt_has_the_Rayleigh_distribution.


__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-squar ...
_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_is_independent_from_the_sample__standard_deviation,_which_can_be_demonstrated_using_Basu's_theorem_or_Cochran's_theorem._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 situ ...
_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_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_distribution, 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_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_(probability), infinite_divisibility. 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_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_...
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'',_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-squar ...
_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,_for_normal_distributions_the_sample_mean_\textstyle\hat\mu_and_the_sample_variance_''s''2_are_independence_(probability_theory), independent,_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 situ ...
_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_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_th_...
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,_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,_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_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_σ2,_the_conjugate_prior_distribution_is_also_normally_distributed. This_can_be_shown_more_easily_by_rewriting_the_variance_as_the__precision,_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_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_σ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;_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._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_(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._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 ques ...
._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_Φ−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_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_independence_(probability_theory), independent._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-squar ...
_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,_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].html"_;"title="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_functions__1F_1_and_U. :\begin ___\operatorname\left[X^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[X_\mid_a 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._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_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._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_standard_deviation_1/\sigma._In_particular,_the_standard_normal_distribution_\varphi_is_an_Fourier_transform#Eigenfunctions, 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_(probability_theory), characteristic_function_\varphi_X(t)_of_that_variable,_which_is_defined_as_the_expected_value_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_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[e^]_=_\hat_f(it)_=_e^_e^ 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 Since_this_is_a_quadratic_polynomial_in_t,_only_the_first_two__cumulants_are_nonzero,_namely_the_mean \mu_and_the_variance \sigma^2.


__Stein_operator_and_class_

Within_Stein's_method_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_when_\sigma_=_0. However,_one_can_define_the_normal_distribution_with_zero_variance_as_a_ generalized_function;_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 argum ...
_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 ...
_with_ probability_density_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._A_function_with_two_ Lagrange_multipliers_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_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_statistics,_ scores,_and__estimators_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 ques ...
_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_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-squar ...
_\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 situ ...
_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 ser ...
s. This_theorem_can_also_be_used_to_justify_modeling_the_sum_of_many_uniform_noise_sources_as_ Gaussian_noise._See_ AWGN.


__Operations_and_functions_of_normal_variables_

The_ probability_density,_
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_function, 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-normal_distribution, log-normally:_. *_The_absolute_value_of_X_has_folded_normal_distribution:_._If_\mu_=_0_this_is_known_as_the_half-normal_distribution. *_The_absolute_value_of_normalized_residuals,_, ''X''_−_''μ'', /''σ'',_has_chi_distribution_with_one_degree_of_freedom:_, X_-_\mu, _/_\sigma_\sim_\chi_1. *_The_square_of_''X''/''σ''_has_the_noncentral_chi-squared_distribution_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_distribution, chi-squared. *_The_log_likelihood_of_a_normal_variable_x_is_simply_the_log_of_its__probability_density_function:_\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_distribution, chi-squared_variable. *_The_distribution_of_the_variable_''X''_restricted_to_an_interval_[''a'',_''b'']_is_called_the_truncated_normal_distribution. *_(''X''_−_''μ'')−2_has_a__Lévy_distribution_with_location_0_and_scale_''σ''−2.


_=_Operations_on_two_independent_normal_variables_

= *_If_X_1_and_X_2_are_two_independence_(probability_theory), independent_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,sum_of_normally_distributed_random_variables, [proof]_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. *_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_distribution, stable_(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#Independent_central-normal_distributions, product_distribution_with_density_function_f_Z(z)_=_\pi^_K_0(, z, )_where_K_0_is_the_Macdonald_function, modified_Bessel_function_of_the_second_kind._This_distribution_is_symmetric_around_zero,_unbounded_at_z_=_0,_and_has_the_characteristic_function_(probability_theory), characteristic_function__\phi_Z(t)_=_(1_+_t^2)^. *_Their_ratio_follows_the_standard__Cauchy_distribution:_X_1/_X_2_\sim_\operatorname(0,_1). *_Their_Euclidean_norm_\sqrt_has_the_Rayleigh_distribution.


__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-squar ...
_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_is_independent_from_the_sample__standard_deviation,_which_can_be_demonstrated_using_Basu's_theorem_or_Cochran's_theorem._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 situ ...
_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_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_distribution, 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_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_(probability), infinite_divisibility. 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_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_...
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'',_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-squar ...
_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,_for_normal_distributions_the_sample_mean_\textstyle\hat\mu_and_the_sample_variance_''s''2_are_independence_(probability_theory), independent,_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 situ ...
_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_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_th_...
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,_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,_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_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_σ2,_the_conjugate_prior_distribution_is_also_normally_distributed. This_can_be_shown_more_easily_by_rewriting_the_variance_as_the__precision,_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_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_σ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;_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._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_(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._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 ques ...
._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_Φ−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_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_independence_(probability_theory), independent._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-squar ...
_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,_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_functions__1F_1_and_U. :\begin ___\operatorname\left[X^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[X_\mid_a 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._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_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._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_standard_deviation_1/\sigma._In_particular,_the_standard_normal_distribution_\varphi_is_an_Fourier_transform#Eigenfunctions, 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_(probability_theory), characteristic_function_\varphi_X(t)_of_that_variable,_which_is_defined_as_the_expected_value_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_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[e^]_=_\hat_f(it)_=_e^_e^ 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 Since_this_is_a_quadratic_polynomial_in_t,_only_the_first_two__cumulants_are_nonzero,_namely_the_mean \mu_and_the_variance \sigma^2.


__Stein_operator_and_class_

Within_Stein's_method_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_when_\sigma_=_0. However,_one_can_define_the_normal_distribution_with_zero_variance_as_a_ generalized_function;_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 argum ...
_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 ...
_with_ probability_density_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._A_function_with_two_ Lagrange_multipliers_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_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_statistics,_ scores,_and__estimators_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 ques ...
_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_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-squar ...
_\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 situ ...
_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 ser ...
s. This_theorem_can_also_be_used_to_justify_modeling_the_sum_of_many_uniform_noise_sources_as_ Gaussian_noise._See_ AWGN.


__Operations_and_functions_of_normal_variables_

The_ probability_density,_
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_function, 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-normal_distribution, log-normally:_. *_The_absolute_value_of_X_has_folded_normal_distribution:_._If_\mu_=_0_this_is_known_as_the_half-normal_distribution. *_The_absolute_value_of_normalized_residuals,_, ''X''_−_''μ'', /''σ'',_has_chi_distribution_with_one_degree_of_freedom:_, X_-_\mu, _/_\sigma_\sim_\chi_1. *_The_square_of_''X''/''σ''_has_the_noncentral_chi-squared_distribution_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_distribution, chi-squared. *_The_log_likelihood_of_a_normal_variable_x_is_simply_the_log_of_its__probability_density_function:_\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_distribution, chi-squared_variable. *_The_distribution_of_the_variable_''X''_restricted_to_an_interval_[''a'',_''b'']_is_called_the_truncated_normal_distribution. *_(''X''_−_''μ'')−2_has_a__Lévy_distribution_with_location_0_and_scale_''σ''−2.


_=_Operations_on_two_independent_normal_variables_

= *_If_X_1_and_X_2_are_two_independence_(probability_theory), independent_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,sum_of_normally_distributed_random_variables, [proof]_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. *_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_distribution, stable_(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#Independent_central-normal_distributions, product_distribution_with_density_function_f_Z(z)_=_\pi^_K_0(, z, )_where_K_0_is_the_Macdonald_function, modified_Bessel_function_of_the_second_kind._This_distribution_is_symmetric_around_zero,_unbounded_at_z_=_0,_and_has_the_characteristic_function_(probability_theory), characteristic_function__\phi_Z(t)_=_(1_+_t^2)^. *_Their_ratio_follows_the_standard__Cauchy_distribution:_X_1/_X_2_\sim_\operatorname(0,_1). *_Their_Euclidean_norm_\sqrt_has_the_Rayleigh_distribution.


__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-squar ...
_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_is_independent_from_the_sample__standard_deviation,_which_can_be_demonstrated_using_Basu's_theorem_or_Cochran's_theorem._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 situ ...
_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_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_distribution, 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_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_(probability), infinite_divisibility. 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_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_...
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'',_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-squar ...
_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,_for_normal_distributions_the_sample_mean_\textstyle\hat\mu_and_the_sample_variance_''s''2_are_independence_(probability_theory), independent,_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 situ ...
_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_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_th_...
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,_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,_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_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_σ2,_the_conjugate_prior_distribution_is_also_normally_distributed. This_can_be_shown_more_easily_by_rewriting_the_variance_as_the__precision,_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_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_σ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;_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._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_(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._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 ques ...
._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_Φ−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_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_independence_(probability_theory), independent._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-squar ...
_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,_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].html" ;"title="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_when_\sigma_=_0. However,_one_can_define_the_normal_distribution_with_zero_variance_as_a_ generalized_function;_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 argum ...
_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 ...
_with_ probability_density_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._A_function_with_two_ Lagrange_multipliers_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_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_statistics,_ scores,_and__estimators_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 ques ...
_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_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-squar ...
_\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 situ ...
_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 ser ...
s. This_theorem_can_also_be_used_to_justify_modeling_the_sum_of_many_uniform_noise_sources_as_ Gaussian_noise._See_ AWGN.


__Operations_and_functions_of_normal_variables_

The_ probability_density,_
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_function, 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-normal_distribution, log-normally:_. *_The_absolute_value_of_X_has_folded_normal_distribution:_._If_\mu_=_0_this_is_known_as_the_half-normal_distribution. *_The_absolute_value_of_normalized_residuals,_, ''X''_−_''μ'', /''σ'',_has_chi_distribution_with_one_degree_of_freedom:_, X_-_\mu, _/_\sigma_\sim_\chi_1. *_The_square_of_''X''/''σ''_has_the_noncentral_chi-squared_distribution_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_distribution, chi-squared. *_The_log_likelihood_of_a_normal_variable_x_is_simply_the_log_of_its__probability_density_function:_\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_distribution, chi-squared_variable. *_The_distribution_of_the_variable_''X''_restricted_to_an_interval_[''a'',_''b'']_is_called_the_truncated_normal_distribution. *_(''X''_−_''μ'')−2_has_a__Lévy_distribution_with_location_0_and_scale_''σ''−2.


_=_Operations_on_two_independent_normal_variables_

= *_If_X_1_and_X_2_are_two_independence_(probability_theory), independent_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,sum_of_normally_distributed_random_variables, [proof]_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. *_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_distribution, stable_(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#Independent_central-normal_distributions, product_distribution_with_density_function_f_Z(z)_=_\pi^_K_0(, z, )_where_K_0_is_the_Macdonald_function, modified_Bessel_function_of_the_second_kind._This_distribution_is_symmetric_around_zero,_unbounded_at_z_=_0,_and_has_the_ characteristic_function__\phi_Z(t)_=_(1_+_t^2)^. *_Their_ratio_follows_the_standard__Cauchy_distribution:_X_1/_X_2_\sim_\operatorname(0,_1). *_Their_Euclidean_norm_\sqrt_has_the_Rayleigh_distribution.


__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-squar ...
_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_is_independent_from_the_sample__standard_deviation,_which_can_be_demonstrated_using_Basu's_theorem_or_Cochran's_theorem._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 situ ...
_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_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_distribution, 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_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_(probability), infinite_divisibility. 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_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_...
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'',_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-squar ...
_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,_for_normal_distributions_the_sample_mean_\textstyle\hat\mu_and_the_sample_variance_''s''2_are_independence_(probability_theory), independent,_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 situ ...
_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_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_th_...
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,_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,_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_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_σ2,_the_conjugate_prior_distribution_is_also_normally_distributed. This_can_be_shown_more_easily_by_rewriting_the_variance_as_the__precision,_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_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_σ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;_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._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_(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._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 ques ...
._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_Φ−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_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_independence_(probability_theory), independent._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-squar ...
_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,_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].html"_;"title="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_functions__1F_1_and_U. :\begin ___\operatorname\left[X^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._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,_with_mean_0_and_standard_deviation_1/\sigma._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 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 ...
_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_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__cumulants_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 (statistician), Charles Stein, who first publ ...
_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_when_\sigma_=_0. However,_one_can_define_the_normal_distribution_with_zero_variance_as_a_ generalized_function;_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 argum ...
_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 ...
_with_ probability_density_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._A_function_with_two_ Lagrange_multipliers_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_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_statistics,_ scores,_and__estimators_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 ques ...
_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_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-squar ...
_\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 situ ...
_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 ser ...
s. This_theorem_can_also_be_used_to_justify_modeling_the_sum_of_many_uniform_noise_sources_as_ Gaussian_noise._See_ AWGN.


__Operations_and_functions_of_normal_variables_

The_ probability_density,_
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_function, 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-normal_distribution, log-normally:_. *_The_absolute_value_of_X_has_folded_normal_distribution:_._If_\mu_=_0_this_is_known_as_the_half-normal_distribution. *_The_absolute_value_of_normalized_residuals,_, ''X''_−_''μ'', /''σ'',_has_chi_distribution_with_one_degree_of_freedom:_, X_-_\mu, _/_\sigma_\sim_\chi_1. *_The_square_of_''X''/''σ''_has_the_noncentral_chi-squared_distribution_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_distribution, chi-squared. *_The_log_likelihood_of_a_normal_variable_x_is_simply_the_log_of_its__probability_density_function:_\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_distribution, chi-squared_variable. *_The_distribution_of_the_variable_''X''_restricted_to_an_interval_[''a'',_''b'']_is_called_the_truncated_normal_distribution. *_(''X''_−_''μ'')−2_has_a__Lévy_distribution_with_location_0_and_scale_''σ''−2.


_=_Operations_on_two_independent_normal_variables_

= *_If_X_1_and_X_2_are_two_independence_(probability_theory), independent_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,sum_of_normally_distributed_random_variables, [proof]_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. *_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_distribution, stable_(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#Independent_central-normal_distributions, product_distribution_with_density_function_f_Z(z)_=_\pi^_K_0(, z, )_where_K_0_is_the_Macdonald_function, modified_Bessel_function_of_the_second_kind._This_distribution_is_symmetric_around_zero,_unbounded_at_z_=_0,_and_has_the_ characteristic_function__\phi_Z(t)_=_(1_+_t^2)^. *_Their_ratio_follows_the_standard__Cauchy_distribution:_X_1/_X_2_\sim_\operatorname(0,_1). *_Their_Euclidean_norm_\sqrt_has_the_Rayleigh_distribution.


__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-squar ...
_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_is_independent_from_the_sample__standard_deviation,_which_can_be_demonstrated_using_Basu's_theorem_or_Cochran's_theorem._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 situ ...
_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_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_distribution, 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_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_(probability), infinite_divisibility. 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_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_...
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'',_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-squar ...
_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,_for_normal_distributions_the_sample_mean_\textstyle\hat\mu_and_the_sample_variance_''s''2_are_independence_(probability_theory), independent,_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 situ ...
_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_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_th_...
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,_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,_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_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_σ2,_the_conjugate_prior_distribution_is_also_normally_distributed. This_can_be_shown_more_easily_by_rewriting_the_variance_as_the__precision,_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_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_σ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;_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._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_(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._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 ques ...
._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_Φ−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_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_independence_(probability_theory), independent._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-squar ...
_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,_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_functions__1F_1_and_U. :\begin ___\operatorname\left[X^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._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,_with_mean_0_and_standard_deviation_1/\sigma._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 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 ...
_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_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__cumulants_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 (statistician), Charles Stein, who first publ ...
_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_when_\sigma_=_0. However,_one_can_define_the_normal_distribution_with_zero_variance_as_a_ generalized_function;_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 argum ...
_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 ...
_with_ probability_density_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._A_function_with_two_ Lagrange_multipliers_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_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_statistics,_ scores,_and__estimators_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 ques ...
_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_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-squar ...
_\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 situ ...
_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 ser ...
s. This_theorem_can_also_be_used_to_justify_modeling_the_sum_of_many_uniform_noise_sources_as_ Gaussian_noise._See_ AWGN.


__Operations_and_functions_of_normal_variables_

The_ probability_density,_
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_function, 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-normal_distribution, log-normally:_. *_The_absolute_value_of_X_has_folded_normal_distribution:_._If_\mu_=_0_this_is_known_as_the_half-normal_distribution. *_The_absolute_value_of_normalized_residuals,_, ''X''_−_''μ'', /''σ'',_has_chi_distribution_with_one_degree_of_freedom:_, X_-_\mu, _/_\sigma_\sim_\chi_1. *_The_square_of_''X''/''σ''_has_the_noncentral_chi-squared_distribution_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_distribution, chi-squared. *_The_log_likelihood_of_a_normal_variable_x_is_simply_the_log_of_its__probability_density_function:_\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_distribution, chi-squared_variable. *_The_distribution_of_the_variable_''X''_restricted_to_an_interval_[''a'',_''b'']_is_called_the_truncated_normal_distribution. *_(''X''_−_''μ'')−2_has_a__Lévy_distribution_with_location_0_and_scale_''σ''−2.


_=_Operations_on_two_independent_normal_variables_

= *_If_X_1_and_X_2_are_two_independence_(probability_theory), independent_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,sum_of_normally_distributed_random_variables, [proof]_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. *_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_distribution, stable_(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#Independent_central-normal_distributions, product_distribution_with_density_function_f_Z(z)_=_\pi^_K_0(, z, )_where_K_0_is_the_Macdonald_function, modified_Bessel_function_of_the_second_kind._This_distribution_is_symmetric_around_zero,_unbounded_at_z_=_0,_and_has_the_ characteristic_function__\phi_Z(t)_=_(1_+_t^2)^. *_Their_ratio_follows_the_standard__Cauchy_distribution:_X_1/_X_2_\sim_\operatorname(0,_1). *_Their_Euclidean_norm_\sqrt_has_the_Rayleigh_distribution.


__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-squar ...
_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_is_independent_from_the_sample__standard_deviation,_which_can_be_demonstrated_using_Basu's_theorem_or_Cochran's_theorem._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 situ ...
_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_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_distribution, 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_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_(probability), infinite_divisibility. 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_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_...
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'',_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-squar ...
_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,_for_normal_distributions_the_sample_mean_\textstyle\hat\mu_and_the_sample_variance_''s''2_are_independence_(probability_theory), independent,_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 situ ...
_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_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_th_...
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,_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,_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_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_σ2,_the_conjugate_prior_distribution_is_also_normally_distributed. This_can_be_shown_more_easily_by_rewriting_the_variance_as_the__precision,_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_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_σ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;_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._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_(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._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 ques ...
._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_Φ−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_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_independence_(probability_theory), independent._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-squar ...
_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,_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].html" ;"title="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._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,_with_mean_0_and_standard_deviation_1/\sigma._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 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 ...
_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_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__cumulants_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 (statistician), Charles Stein, who first publ ...
_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_when_\sigma_=_0. However,_one_can_define_the_normal_distribution_with_zero_variance_as_a_ generalized_function;_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 argum ...
_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 ...
_with_ probability_density_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._A_function_with_two_ Lagrange_multipliers_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_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_statistics,_ scores,_and__estimators_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 ques ...
_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_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-squar ...
_\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 situ ...
_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 ser ...
s. This_theorem_can_also_be_used_to_justify_modeling_the_sum_of_many_uniform_noise_sources_as_ Gaussian_noise._See_ AWGN.


__Operations_and_functions_of_normal_variables_

The_ probability_density,_
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_function, 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-normal_distribution, log-normally:_. *_The_absolute_value_of_X_has_folded_normal_distribution:_._If_\mu_=_0_this_is_known_as_the_half-normal_distribution. *_The_absolute_value_of_normalized_residuals,_, ''X''_−_''μ'', /''σ'',_has_chi_distribution_with_one_degree_of_freedom:_, X_-_\mu, _/_\sigma_\sim_\chi_1. *_The_square_of_''X''/''σ''_has_the_noncentral_chi-squared_distribution_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_distribution, chi-squared. *_The_log_likelihood_of_a_normal_variable_x_is_simply_the_log_of_its__probability_density_function:_\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_distribution, chi-squared_variable. *_The_distribution_of_the_variable_''X''_restricted_to_an_interval_[''a'',_''b'']_is_called_the_truncated_normal_distribution. *_(''X''_−_''μ'')−2_has_a__Lévy_distribution_with_location_0_and_scale_''σ''−2.


_=_Operations_on_two_independent_normal_variables_

= *_If_X_1_and_X_2_are_two_independence_(probability_theory), independent_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,sum_of_normally_distributed_random_variables, [proof]_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. *_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_distribution, stable_(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#Independent_central-normal_distributions, product_distribution_with_density_function_f_Z(z)_=_\pi^_K_0(, z, )_where_K_0_is_the_Macdonald_function, modified_Bessel_function_of_the_second_kind._This_distribution_is_symmetric_around_zero,_unbounded_at_z_=_0,_and_has_the_ characteristic_function__\phi_Z(t)_=_(1_+_t^2)^. *_Their_ratio_follows_the_standard__Cauchy_distribution:_X_1/_X_2_\sim_\operatorname(0,_1). *_Their_Euclidean_norm_\sqrt_has_the_Rayleigh_distribution.


__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-squar ...
_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_is_independent_from_the_sample__standard_deviation,_which_can_be_demonstrated_using_Basu's_theorem_or_Cochran's_theorem._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 situ ...
_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_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_distribution, 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_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_(probability), infinite_divisibility. 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_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_...
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'',_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-squar ...
_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,_for_normal_distributions_the_sample_mean_\textstyle\hat\mu_and_the_sample_variance_''s''2_are_independence_(probability_theory), independent,_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 situ ...
_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_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_th_...
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,_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,_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_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_σ2,_the_conjugate_prior_distribution_is_also_normally_distributed. This_can_be_shown_more_easily_by_rewriting_the_variance_as_the__precision,_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_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_σ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;_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._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_(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._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 ques ...
._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_Φ−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_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_independence_(probability_theory), independent._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-squar ...
_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,_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].html" ;"title="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 functions _1F_1 and U. :\begin \operatorname\left[X^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[X \mid a 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. 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 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. 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 standard deviation 1/\sigma. In particular, the standard normal distribution \varphi is an Fourier transform#Eigenfunctions, 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 (probability theory), characteristic function \varphi_X(t) of that variable, which is defined as the expected value 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 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[e^] = \hat f(it) = e^ e^ 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 Since this is a quadratic polynomial in t, only the first two cumulants are nonzero, namely the mean \mu and the variance \sigma^2.


Stein operator and class

Within Stein's method 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 (mathematics), function when \sigma = 0. However, one can define the normal distribution with zero variance as a generalized function; specifically, as Dirac delta function, 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 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 probability distribution, maximum entropy. If X is a continuous random variable with probability density function, probability density 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. A function with two Lagrange multipliers 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 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 statistics, score (statistics), scores, and estimators 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 function (statistics), 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 B(n,p) is De Moivre–Laplace theorem, 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 with parameter \lambda is approximately normal with mean \lambda and variance \lambda, for large values of \lambda. * The chi-squared distribution \chi^2(k) is approximately normal with mean k and variance 2k, for large k. * The Student's t-distribution 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, improvements of the approximation are given by the Edgeworth expansions. This theorem can also be used to justify modeling the sum of many uniform noise sources as Gaussian noise. See AWGN.


Operations and functions of normal variables

The probability density function, probability density, cumulative distribution function, cumulative distribution, and inverse cumulative distribution function, 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-normal distribution, log-normally: . * The absolute value of X has folded normal distribution: . If \mu = 0 this is known as the half-normal distribution. * The absolute value of normalized residuals, , ''X'' − ''μ'', /''σ'', has chi distribution with one degree of freedom: , X - \mu, / \sigma \sim \chi_1. * The square of ''X''/''σ'' has the noncentral chi-squared distribution 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 distribution, chi-squared. * The log likelihood of a normal variable x is simply the log of its probability density function: \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 distribution, chi-squared variable. * The distribution of the variable ''X'' restricted to an interval [''a'', ''b''] is called the truncated normal distribution. * (''X'' − ''μ'')−2 has a Lévy distribution with location 0 and scale ''σ''−2.


= Operations on two independent normal variables

= * If X_1 and X_2 are two independence (probability theory), independent 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,sum of normally distributed random variables, [proof] 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. * 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 distribution, stable (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#Independent central-normal distributions, product distribution with density function f_Z(z) = \pi^ K_0(, z, ) where K_0 is the Macdonald function, modified Bessel function of the second kind. This distribution is symmetric around zero, unbounded at z = 0, and has the characteristic function (probability theory), characteristic function \phi_Z(t) = (1 + t^2)^. * Their ratio follows the standard Cauchy distribution: X_1/ X_2 \sim \operatorname(0, 1). * Their Euclidean norm \sqrt has the Rayleigh distribution.


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 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 is independent from the sample standard deviation, which can be demonstrated using Basu's theorem or Cochran's theorem. The ratio of these two quantities will have the Student's t-distribution 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 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 distribution, 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 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 (probability), infinite divisibility. 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 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 ...
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'', 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 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, for normal distributions the sample mean \textstyle\hat\mu and the sample variance ''s''2 are independence (probability theory), independent, 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 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 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 th ...
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, 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, 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 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 σ2, the conjugate prior distribution is also normally distributed. This can be shown more easily by rewriting the variance as the precision, 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 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 σ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; 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. 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 (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. 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. 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 Φ−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 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 independence (probability theory), independent. This formulation arises because for a bivariate normal random vector (''X'', ''Y'') the squared norm will have the chi-squared distribution 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, 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 functions _1F_1 and U. :\begin \operatorname\left[X^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[X \mid a 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. 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 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. 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 standard deviation 1/\sigma. In particular, the standard normal distribution \varphi is an Fourier transform#Eigenfunctions, 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 (probability theory), characteristic function \varphi_X(t) of that variable, which is defined as the expected value 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 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[e^] = \hat f(it) = e^ e^ 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 Since this is a quadratic polynomial in t, only the first two cumulants are nonzero, namely the mean \mu and the variance \sigma^2.


Stein operator and class

Within Stein's method 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 (mathematics), function when \sigma = 0. However, one can define the normal distribution with zero variance as a generalized function; specifically, as Dirac delta function, 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 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 probability distribution, maximum entropy. If X is a continuous random variable with probability density function, probability density 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. A function with two Lagrange multipliers 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 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 statistics, score (statistics), scores, and estimators 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 function (statistics), 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 B(n,p) is De Moivre–Laplace theorem, 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 with parameter \lambda is approximately normal with mean \lambda and variance \lambda, for large values of \lambda. * The chi-squared distribution \chi^2(k) is approximately normal with mean k and variance 2k, for large k. * The Student's t-distribution 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, improvements of the approximation are given by the Edgeworth expansions. This theorem can also be used to justify modeling the sum of many uniform noise sources as Gaussian noise. See AWGN.


Operations and functions of normal variables

The probability density function, probability density, cumulative distribution function, cumulative distribution, and inverse cumulative distribution function, 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-normal distribution, log-normally: . * The absolute value of X has folded normal distribution: . If \mu = 0 this is known as the half-normal distribution. * The absolute value of normalized residuals, , ''X'' − ''μ'', /''σ'', has chi distribution with one degree of freedom: , X - \mu, / \sigma \sim \chi_1. * The square of ''X''/''σ'' has the noncentral chi-squared distribution 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 distribution, chi-squared. * The log likelihood of a normal variable x is simply the log of its probability density function: \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 distribution, chi-squared variable. * The distribution of the variable ''X'' restricted to an interval [''a'', ''b''] is called the truncated normal distribution. * (''X'' − ''μ'')−2 has a Lévy distribution with location 0 and scale ''σ''−2.


= Operations on two independent normal variables

= * If X_1 and X_2 are two independence (probability theory), independent 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,sum of normally distributed random variables, [proof] 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. * 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 distribution, stable (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#Independent central-normal distributions, product distribution with density function f_Z(z) = \pi^ K_0(, z, ) where K_0 is the Macdonald function, modified Bessel function of the second kind. This distribution is symmetric around zero, unbounded at z = 0, and has the characteristic function (probability theory), characteristic function \phi_Z(t) = (1 + t^2)^. * Their ratio follows the standard Cauchy distribution: X_1/ X_2 \sim \operatorname(0, 1). * Their Euclidean norm \sqrt has the Rayleigh distribution.


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 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 is independent from the sample standard deviation, which can be demonstrated using Basu's theorem or Cochran's theorem. The ratio of these two quantities will have the Student's t-distribution 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 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 distribution, 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 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 (probability), infinite divisibility. 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 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 ...
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'', 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 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, for normal distributions the sample mean \textstyle\hat\mu and the sample variance ''s''2 are independence (probability theory), independent, 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 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 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 th ...
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, 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, 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 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 σ2, the conjugate prior distribution is also normally distributed. This can be shown more easily by rewriting the variance as the precision, 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 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 σ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; 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. 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 (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. 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. 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 Φ−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 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 independence (probability theory), independent. This formulation arises because for a bivariate normal random vector (''X'', ''Y'') the squared norm will have the chi-squared distribution 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, 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._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,_with_mean_0_and_standard_deviation_1/\sigma._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 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 ...
_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_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__cumulants_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 (statistician), Charles Stein, who first publ ...
_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_when_\sigma_=_0. However,_one_can_define_the_normal_distribution_with_zero_variance_as_a_ generalized_function;_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 argum ...
_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 ...
_with_ probability_density_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._A_function_with_two_ Lagrange_multipliers_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_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_statistics,_ scores,_and__estimators_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 ques ...
_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_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-squar ...
_\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 situ ...
_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 ser ...
s. This_theorem_can_also_be_used_to_justify_modeling_the_sum_of_many_uniform_noise_sources_as_ Gaussian_noise._See_ AWGN.


__Operations_and_functions_of_normal_variables_

The_ probability_density,_
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_function, 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-normal_distribution, log-normally:_. *_The_absolute_value_of_X_has_folded_normal_distribution:_._If_\mu_=_0_this_is_known_as_the_half-normal_distribution. *_The_absolute_value_of_normalized_residuals,_, ''X''_−_''μ'', /''σ'',_has_chi_distribution_with_one_degree_of_freedom:_, X_-_\mu, _/_\sigma_\sim_\chi_1. *_The_square_of_''X''/''σ''_has_the_noncentral_chi-squared_distribution_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_distribution, chi-squared. *_The_log_likelihood_of_a_normal_variable_x_is_simply_the_log_of_its__probability_density_function:_\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_distribution, chi-squared_variable. *_The_distribution_of_the_variable_''X''_restricted_to_an_interval_[''a'',_''b'']_is_called_the_truncated_normal_distribution. *_(''X''_−_''μ'')−2_has_a__Lévy_distribution_with_location_0_and_scale_''σ''−2.


_=_Operations_on_two_independent_normal_variables_

= *_If_X_1_and_X_2_are_two_independence_(probability_theory), independent_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,sum_of_normally_distributed_random_variables, [proof]_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. *_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_distribution, stable_(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#Independent_central-normal_distributions, product_distribution_with_density_function_f_Z(z)_=_\pi^_K_0(, z, )_where_K_0_is_the_Macdonald_function, modified_Bessel_function_of_the_second_kind._This_distribution_is_symmetric_around_zero,_unbounded_at_z_=_0,_and_has_the_ characteristic_function__\phi_Z(t)_=_(1_+_t^2)^. *_Their_ratio_follows_the_standard__Cauchy_distribution:_X_1/_X_2_\sim_\operatorname(0,_1). *_Their_Euclidean_norm_\sqrt_has_the_Rayleigh_distribution.


__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-squar ...
_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_is_independent_from_the_sample__standard_deviation,_which_can_be_demonstrated_using_Basu's_theorem_or_Cochran's_theorem._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 situ ...
_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_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_distribution, 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_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_(probability), infinite_divisibility. 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_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_...
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'',_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-squar ...
_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,_for_normal_distributions_the_sample_mean_\textstyle\hat\mu_and_the_sample_variance_''s''2_are_independence_(probability_theory), independent,_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 situ ...
_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_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_th_...
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,_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,_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_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_σ2,_the_conjugate_prior_distribution_is_also_normally_distributed. This_can_be_shown_more_easily_by_rewriting_the_variance_as_the__precision,_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_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_σ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;_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._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_(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._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 ques ...
._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_Φ−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_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_independence_(probability_theory), independent._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-squar ...
_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,_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].html" ;"title="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 functions _1F_1 and U. :\begin \operatorname\left[X^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[X \mid a 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. 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 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. 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 standard deviation 1/\sigma. In particular, the standard normal distribution \varphi is an Fourier transform#Eigenfunctions, 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 (probability theory), characteristic function \varphi_X(t) of that variable, which is defined as the expected value 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 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[e^] = \hat f(it) = e^ e^ 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 Since this is a quadratic polynomial in t, only the first two cumulants are nonzero, namely the mean \mu and the variance \sigma^2.


Stein operator and class

Within Stein's method 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 (mathematics), function when \sigma = 0. However, one can define the normal distribution with zero variance as a generalized function; specifically, as Dirac delta function, 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 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 probability distribution, maximum entropy. If X is a continuous random variable with probability density function, probability density 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. A function with two Lagrange multipliers 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 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 statistics, score (statistics), scores, and estimators 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 function (statistics), 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 B(n,p) is De Moivre–Laplace theorem, 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 with parameter \lambda is approximately normal with mean \lambda and variance \lambda, for large values of \lambda. * The chi-squared distribution \chi^2(k) is approximately normal with mean k and variance 2k, for large k. * The Student's t-distribution 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, improvements of the approximation are given by the Edgeworth expansions. This theorem can also be used to justify modeling the sum of many uniform noise sources as Gaussian noise. See AWGN.


Operations and functions of normal variables

The probability density function, probability density, cumulative distribution function, cumulative distribution, and inverse cumulative distribution function, 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-normal distribution, log-normally: . * The absolute value of X has folded normal distribution: . If \mu = 0 this is known as the half-normal distribution. * The absolute value of normalized residuals, , ''X'' − ''μ'', /''σ'', has chi distribution with one degree of freedom: , X - \mu, / \sigma \sim \chi_1. * The square of ''X''/''σ'' has the noncentral chi-squared distribution 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 distribution, chi-squared. * The log likelihood of a normal variable x is simply the log of its probability density function: \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 distribution, chi-squared variable. * The distribution of the variable ''X'' restricted to an interval [''a'', ''b''] is called the truncated normal distribution. * (''X'' − ''μ'')−2 has a Lévy distribution with location 0 and scale ''σ''−2.


= Operations on two independent normal variables

= * If X_1 and X_2 are two independence (probability theory), independent 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,sum of normally distributed random variables, [proof] 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. * 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 distribution, stable (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#Independent central-normal distributions, product distribution with density function f_Z(z) = \pi^ K_0(, z, ) where K_0 is the Macdonald function, modified Bessel function of the second kind. This distribution is symmetric around zero, unbounded at z = 0, and has the characteristic function (probability theory), characteristic function \phi_Z(t) = (1 + t^2)^. * Their ratio follows the standard Cauchy distribution: X_1/ X_2 \sim \operatorname(0, 1). * Their Euclidean norm \sqrt has the Rayleigh distribution.


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 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 is independent from the sample standard deviation, which can be demonstrated using Basu's theorem or Cochran's theorem. The ratio of these two quantities will have the Student's t-distribution 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 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 distribution, 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 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 (probability), infinite divisibility. 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 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 ...
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'', 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 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, for normal distributions the sample mean \textstyle\hat\mu and the sample variance ''s''2 are independence (probability theory), independent, 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 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 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 th ...
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, 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, 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 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 σ2, the conjugate prior distribution is also normally distributed. This can be shown more easily by rewriting the variance as the precision, 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 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 σ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; 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. 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 (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. 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. 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 Φ−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 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 independence (probability theory), independent. This formulation arises because for a bivariate normal random vector (''X'', ''Y'') the squared norm will have the chi-squared distribution 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, 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 functions _1F_1 and U. :\begin \operatorname\left[X^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[X \mid a 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. 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 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. 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 standard deviation 1/\sigma. In particular, the standard normal distribution \varphi is an Fourier transform#Eigenfunctions, 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 (probability theory), characteristic function \varphi_X(t) of that variable, which is defined as the expected value 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 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[e^] = \hat f(it) = e^ e^ 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 Since this is a quadratic polynomial in t, only the first two cumulants are nonzero, namely the mean \mu and the variance \sigma^2.


Stein operator and class

Within Stein's method 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 (mathematics), function when \sigma = 0. However, one can define the normal distribution with zero variance as a generalized function; specifically, as Dirac delta function, 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 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 probability distribution, maximum entropy. If X is a continuous random variable with probability density function, probability density 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. A function with two Lagrange multipliers 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 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 statistics, score (statistics), scores, and estimators 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 function (statistics), 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 B(n,p) is De Moivre–Laplace theorem, 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 with parameter \lambda is approximately normal with mean \lambda and variance \lambda, for large values of \lambda. * The chi-squared distribution \chi^2(k) is approximately normal with mean k and variance 2k, for large k. * The Student's t-distribution 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, improvements of the approximation are given by the Edgeworth expansions. This theorem can also be used to justify modeling the sum of many uniform noise sources as Gaussian noise. See AWGN.


Operations and functions of normal variables

The probability density function, probability density, cumulative distribution function, cumulative distribution, and inverse cumulative distribution function, 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-normal distribution, log-normally: . * The absolute value of X has folded normal distribution: . If \mu = 0 this is known as the half-normal distribution. * The absolute value of normalized residuals, , ''X'' − ''μ'', /''σ'', has chi distribution with one degree of freedom: , X - \mu, / \sigma \sim \chi_1. * The square of ''X''/''σ'' has the noncentral chi-squared distribution 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 distribution, chi-squared. * The log likelihood of a normal variable x is simply the log of its probability density function: \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 distribution, chi-squared variable. * The distribution of the variable ''X'' restricted to an interval [''a'', ''b''] is called the truncated normal distribution. * (''X'' − ''μ'')−2 has a Lévy distribution with location 0 and scale ''σ''−2.


= Operations on two independent normal variables

= * If X_1 and X_2 are two independence (probability theory), independent 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,sum of normally distributed random variables, [proof] 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. * 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 distribution, stable (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#Independent central-normal distributions, product distribution with density function f_Z(z) = \pi^ K_0(, z, ) where K_0 is the Macdonald function, modified Bessel function of the second kind. This distribution is symmetric around zero, unbounded at z = 0, and has the characteristic function (probability theory), characteristic function \phi_Z(t) = (1 + t^2)^. * Their ratio follows the standard Cauchy distribution: X_1/ X_2 \sim \operatorname(0, 1). * Their Euclidean norm \sqrt has the Rayleigh distribution.


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 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 is independent from the sample standard deviation, which can be demonstrated using Basu's theorem or Cochran's theorem. The ratio of these two quantities will have the Student's t-distribution 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 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 distribution, 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 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 (probability), infinite divisibility. 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 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 ...
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'', 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 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, for normal distributions the sample mean \textstyle\hat\mu and the sample variance ''s''2 are independence (probability theory), independent, 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 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 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 th ...
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, 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, 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 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 σ2, the conjugate prior distribution is also normally distributed. This can be shown more easily by rewriting the variance as the precision, 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 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 σ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; 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. 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 (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. 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. 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 Φ−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 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 independence (probability theory), independent. This formulation arises because for a bivariate normal random vector (''X'', ''Y'') the squared norm will have the chi-squared distribution 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, 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 (mathematics), function when \sigma = 0. However, one can define the normal distribution with zero variance as a generalized function; specifically, as Dirac delta function, 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 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 probability distribution, maximum entropy. If X is a continuous random variable with probability density function, probability density 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. A function with two Lagrange multipliers 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 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 statistics, score (statistics), scores, and estimators 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 function (statistics), 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 B(n,p) is De Moivre–Laplace theorem, 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 with parameter \lambda is approximately normal with mean \lambda and variance \lambda, for large values of \lambda. * The chi-squared distribution \chi^2(k) is approximately normal with mean k and variance 2k, for large k. * The Student's t-distribution 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, improvements of the approximation are given by the Edgeworth expansions. This theorem can also be used to justify modeling the sum of many uniform noise sources as Gaussian noise. See AWGN.


Operations and functions of normal variables

The probability density function, probability density, cumulative distribution function, cumulative distribution, and inverse cumulative distribution function, 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-normal distribution, log-normally: . * The absolute value of X has folded normal distribution: . If \mu = 0 this is known as the half-normal distribution. * The absolute value of normalized residuals, , ''X'' − ''μ'', /''σ'', has chi distribution with one degree of freedom: , X - \mu, / \sigma \sim \chi_1. * The square of ''X''/''σ'' has the noncentral chi-squared distribution 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 distribution, chi-squared. * The log likelihood of a normal variable x is simply the log of its probability density function: \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 distribution, chi-squared variable. * The distribution of the variable ''X'' restricted to an interval [''a'', ''b''] is called the truncated normal distribution. * (''X'' − ''μ'')−2 has a Lévy distribution with location 0 and scale ''σ''−2.


= Operations on two independent normal variables

= * If X_1 and X_2 are two independence (probability theory), independent 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,sum of normally distributed random variables, [proof] 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. * 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 distribution, stable (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#Independent central-normal distributions, product distribution with density function f_Z(z) = \pi^ K_0(, z, ) where K_0 is the Macdonald function, modified Bessel function of the second kind. This distribution is symmetric around zero, unbounded at z = 0, and has the characteristic function (probability theory), characteristic function \phi_Z(t) = (1 + t^2)^. * Their ratio follows the standard Cauchy distribution: X_1/ X_2 \sim \operatorname(0, 1). * Their Euclidean norm \sqrt has the Rayleigh distribution.


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 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 is independent from the sample standard deviation, which can be demonstrated using Basu's theorem or Cochran's theorem. The ratio of these two quantities will have the Student's t-distribution 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 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 distribution, 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 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 (probability), infinite divisibility. 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 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 ...
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'', 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 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, for normal distributions the sample mean \textstyle\hat\mu and the sample variance ''s''2 are independence (probability theory), independent, 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 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 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 th ...
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, 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, 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 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 σ2, the conjugate prior distribution is also normally distributed. This can be shown more easily by rewriting the variance as the precision, 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 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 σ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; 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. 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 (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. 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. 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 Φ−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 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 independence (probability theory), independent. This formulation arises because for a bivariate normal random vector (''X'', ''Y'') the squared norm will have the chi-squared distribution 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, 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 functions _1F_1 and U. :\begin \operatorname\left[X^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[X \mid a 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. 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 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. 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 standard deviation 1/\sigma. In particular, the standard normal distribution \varphi is an Fourier transform#Eigenfunctions, 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 (probability theory), characteristic function \varphi_X(t) of that variable, which is defined as the expected value 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 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[e^] = \hat f(it) = e^ e^ 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 Since this is a quadratic polynomial in t, only the first two cumulants are nonzero, namely the mean \mu and the variance \sigma^2.


Stein operator and class

Within Stein's method 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_when_\sigma_=_0. However,_one_can_define_the_normal_distribution_with_zero_variance_as_a_ generalized_function;_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 argum ...
_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 ...
_with_ probability_density_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._A_function_with_two_ Lagrange_multipliers_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_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_statistics,_ scores,_and__estimators_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 ques ...
_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_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-squar ...
_\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 situ ...
_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 ser ...
s. This_theorem_can_also_be_used_to_justify_modeling_the_sum_of_many_uniform_noise_sources_as_ Gaussian_noise._See_ AWGN.


__Operations_and_functions_of_normal_variables_

The_ probability_density,_
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_function, 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-normal_distribution, log-normally:_. *_The_absolute_value_of_X_has_folded_normal_distribution:_._If_\mu_=_0_this_is_known_as_the_half-normal_distribution. *_The_absolute_value_of_normalized_residuals,_, ''X''_−_''μ'', /''σ'',_has_chi_distribution_with_one_degree_of_freedom:_, X_-_\mu, _/_\sigma_\sim_\chi_1. *_The_square_of_''X''/''σ''_has_the_noncentral_chi-squared_distribution_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_distribution, chi-squared. *_The_log_likelihood_of_a_normal_variable_x_is_simply_the_log_of_its__probability_density_function:_\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_distribution, chi-squared_variable. *_The_distribution_of_the_variable_''X''_restricted_to_an_interval_[''a'',_''b'']_is_called_the_truncated_normal_distribution. *_(''X''_−_''μ'')−2_has_a__Lévy_distribution_with_location_0_and_scale_''σ''−2.


_=_Operations_on_two_independent_normal_variables_

= *_If_X_1_and_X_2_are_two_independence_(probability_theory), independent_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,sum_of_normally_distributed_random_variables, [proof]_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. *_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_distribution, stable_(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#Independent_central-normal_distributions, product_distribution_with_density_function_f_Z(z)_=_\pi^_K_0(, z, )_where_K_0_is_the_Macdonald_function, modified_Bessel_function_of_the_second_kind._This_distribution_is_symmetric_around_zero,_unbounded_at_z_=_0,_and_has_the__characteristic_function__\phi_Z(t)_=_(1_+_t^2)^. *_Their_ratio_follows_the_standard__Cauchy_distribution:_X_1/_X_2_\sim_\operatorname(0,_1). *_Their_Euclidean_norm_\sqrt_has_the_Rayleigh_distribution.


__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-squar ...
_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_is_independent_from_the_sample__standard_deviation,_which_can_be_demonstrated_using_Basu's_theorem_or_Cochran's_theorem._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 situ ...
_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_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_distribution, 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_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_(probability), infinite_divisibility. 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_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_...
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'',_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-squar ...
_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,_for_normal_distributions_the_sample_mean_\textstyle\hat\mu_and_the_sample_variance_''s''2_are_independence_(probability_theory), independent,_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 situ ...
_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_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_th_...
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,_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,_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_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_σ2,_the_conjugate_prior_distribution_is_also_normally_distributed. This_can_be_shown_more_easily_by_rewriting_the_variance_as_the__precision,_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_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_σ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;_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._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_(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._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 ques ...
._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_Φ−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_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_independence_(probability_theory), independent._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-squar ...
_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,_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].html"_;"title="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_functions__1F_1_and_U. :\begin ___\operatorname\left[X^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._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,_with_mean_0_and_standard_deviation_1/\sigma._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_ 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__...
_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_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__cumulants_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_(statistician),_Charles_Stein,_who_first_publ_...
_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_when_\sigma_=_0. However,_one_can_define_the_normal_distribution_with_zero_variance_as_a_ generalized_function;_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 argum ...
_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 ...
_with_ probability_density_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._A_function_with_two_ Lagrange_multipliers_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_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_statistics,_ scores,_and__estimators_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 ques ...
_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_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-squar ...
_\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 situ ...
_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 ser ...
s. This_theorem_can_also_be_used_to_justify_modeling_the_sum_of_many_uniform_noise_sources_as_ Gaussian_noise._See_ AWGN.


__Operations_and_functions_of_normal_variables_

The_ probability_density,_
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_function, 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-normal_distribution, log-normally:_. *_The_absolute_value_of_X_has_folded_normal_distribution:_._If_\mu_=_0_this_is_known_as_the_half-normal_distribution. *_The_absolute_value_of_normalized_residuals,_, ''X''_−_''μ'', /''σ'',_has_chi_distribution_with_one_degree_of_freedom:_, X_-_\mu, _/_\sigma_\sim_\chi_1. *_The_square_of_''X''/''σ''_has_the_noncentral_chi-squared_distribution_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_distribution, chi-squared. *_The_log_likelihood_of_a_normal_variable_x_is_simply_the_log_of_its__probability_density_function:_\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_distribution, chi-squared_variable. *_The_distribution_of_the_variable_''X''_restricted_to_an_interval_[''a'',_''b'']_is_called_the_truncated_normal_distribution. *_(''X''_−_''μ'')−2_has_a__Lévy_distribution_with_location_0_and_scale_''σ''−2.


_=_Operations_on_two_independent_normal_variables_

= *_If_X_1_and_X_2_are_two_independence_(probability_theory), independent_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,sum_of_normally_distributed_random_variables, [proof]_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. *_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_distribution, stable_(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#Independent_central-normal_distributions, product_distribution_with_density_function_f_Z(z)_=_\pi^_K_0(, z, )_where_K_0_is_the_Macdonald_function, modified_Bessel_function_of_the_second_kind._This_distribution_is_symmetric_around_zero,_unbounded_at_z_=_0,_and_has_the__characteristic_function__\phi_Z(t)_=_(1_+_t^2)^. *_Their_ratio_follows_the_standard__Cauchy_distribution:_X_1/_X_2_\sim_\operatorname(0,_1). *_Their_Euclidean_norm_\sqrt_has_the_Rayleigh_distribution.


__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-squar ...
_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_is_independent_from_the_sample__standard_deviation,_which_can_be_demonstrated_using_Basu's_theorem_or_Cochran's_theorem._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 situ ...
_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_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_distribution, 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_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_(probability), infinite_divisibility. 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_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_...
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'',_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-squar ...
_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,_for_normal_distributions_the_sample_mean_\textstyle\hat\mu_and_the_sample_variance_''s''2_are_independence_(probability_theory), independent,_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 situ ...
_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_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_th_...
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,_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,_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_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_σ2,_the_conjugate_prior_distribution_is_also_normally_distributed. This_can_be_shown_more_easily_by_rewriting_the_variance_as_the__precision,_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_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_σ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;_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._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_(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._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 ques ...
._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_Φ−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_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_independence_(probability_theory), independent._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-squar ...
_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,_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_functions__1F_1_and_U. :\begin ___\operatorname\left[X^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._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,_with_mean_0_and_standard_deviation_1/\sigma._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_ 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__...
_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_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__cumulants_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_(statistician),_Charles_Stein,_who_first_publ_...
_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_when_\sigma_=_0. However,_one_can_define_the_normal_distribution_with_zero_variance_as_a_ generalized_function;_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 argum ...
_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 ...
_with_ probability_density_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._A_function_with_two_ Lagrange_multipliers_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_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_statistics,_ scores,_and__estimators_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 ques ...
_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_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-squar ...
_\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 situ ...
_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 ser ...
s. This_theorem_can_also_be_used_to_justify_modeling_the_sum_of_many_uniform_noise_sources_as_ Gaussian_noise._See_ AWGN.


__Operations_and_functions_of_normal_variables_

The_ probability_density,_
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_function, 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-normal_distribution, log-normally:_. *_The_absolute_value_of_X_has_folded_normal_distribution:_._If_\mu_=_0_this_is_known_as_the_half-normal_distribution. *_The_absolute_value_of_normalized_residuals,_, ''X''_−_''μ'', /''σ'',_has_chi_distribution_with_one_degree_of_freedom:_, X_-_\mu, _/_\sigma_\sim_\chi_1. *_The_square_of_''X''/''σ''_has_the_noncentral_chi-squared_distribution_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_distribution, chi-squared. *_The_log_likelihood_of_a_normal_variable_x_is_simply_the_log_of_its__probability_density_function:_\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_distribution, chi-squared_variable. *_The_distribution_of_the_variable_''X''_restricted_to_an_interval_[''a'',_''b'']_is_called_the_truncated_normal_distribution. *_(''X''_−_''μ'')−2_has_a__Lévy_distribution_with_location_0_and_scale_''σ''−2.


_=_Operations_on_two_independent_normal_variables_

= *_If_X_1_and_X_2_are_two_independence_(probability_theory), independent_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,sum_of_normally_distributed_random_variables, [proof]_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. *_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_distribution, stable_(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#Independent_central-normal_distributions, product_distribution_with_density_function_f_Z(z)_=_\pi^_K_0(, z, )_where_K_0_is_the_Macdonald_function, modified_Bessel_function_of_the_second_kind._This_distribution_is_symmetric_around_zero,_unbounded_at_z_=_0,_and_has_the__characteristic_function__\phi_Z(t)_=_(1_+_t^2)^. *_Their_ratio_follows_the_standard__Cauchy_distribution:_X_1/_X_2_\sim_\operatorname(0,_1). *_Their_Euclidean_norm_\sqrt_has_the_Rayleigh_distribution.


__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-squar ...
_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_is_independent_from_the_sample__standard_deviation,_which_can_be_demonstrated_using_Basu's_theorem_or_Cochran's_theorem._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 situ ...
_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_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_distribution, 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_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_(probability), infinite_divisibility. 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_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_...
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'',_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-squar ...
_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,_for_normal_distributions_the_sample_mean_\textstyle\hat\mu_and_the_sample_variance_''s''2_are_independence_(probability_theory), independent,_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 situ ...
_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_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_th_...
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,_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,_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_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_σ2,_the_conjugate_prior_distribution_is_also_normally_distributed. This_can_be_shown_more_easily_by_rewriting_the_variance_as_the__precision,_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_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_σ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;_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._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_(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._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 ques ...
._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_Φ−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_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_independence_(probability_theory), independent._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-squar ...
_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,_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].html"_;"title="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._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,_with_mean_0_and_standard_deviation_1/\sigma._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_ 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__...
_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_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__cumulants_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_(statistician),_Charles_Stein,_who_first_publ_...
_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_when_\sigma_=_0. However,_one_can_define_the_normal_distribution_with_zero_variance_as_a_ generalized_function;_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 argum ...
_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 ...
_with_ probability_density_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._A_function_with_two_ Lagrange_multipliers_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_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_statistics,_ scores,_and__estimators_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 ques ...
_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_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-squar ...
_\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 situ ...
_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 ser ...
s. This_theorem_can_also_be_used_to_justify_modeling_the_sum_of_many_uniform_noise_sources_as_ Gaussian_noise._See_ AWGN.


__Operations_and_functions_of_normal_variables_

The_ probability_density,_
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_function, 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-normal_distribution, log-normally:_. *_The_absolute_value_of_X_has_folded_normal_distribution:_._If_\mu_=_0_this_is_known_as_the_half-normal_distribution. *_The_absolute_value_of_normalized_residuals,_, ''X''_−_''μ'', /''σ'',_has_chi_distribution_with_one_degree_of_freedom:_, X_-_\mu, _/_\sigma_\sim_\chi_1. *_The_square_of_''X''/''σ''_has_the_noncentral_chi-squared_distribution_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_distribution, chi-squared. *_The_log_likelihood_of_a_normal_variable_x_is_simply_the_log_of_its__probability_density_function:_\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_distribution, chi-squared_variable. *_The_distribution_of_the_variable_''X''_restricted_to_an_interval_[''a'',_''b'']_is_called_the_truncated_normal_distribution. *_(''X''_−_''μ'')−2_has_a__Lévy_distribution_with_location_0_and_scale_''σ''−2.


_=_Operations_on_two_independent_normal_variables_

= *_If_X_1_and_X_2_are_two_independence_(probability_theory), independent_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,sum_of_normally_distributed_random_variables, [proof]_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. *_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_distribution, stable_(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#Independent_central-normal_distributions, product_distribution_with_density_function_f_Z(z)_=_\pi^_K_0(, z, )_where_K_0_is_the_Macdonald_function, modified_Bessel_function_of_the_second_kind._This_distribution_is_symmetric_around_zero,_unbounded_at_z_=_0,_and_has_the__characteristic_function__\phi_Z(t)_=_(1_+_t^2)^. *_Their_ratio_follows_the_standard__Cauchy_distribution:_X_1/_X_2_\sim_\operatorname(0,_1). *_Their_Euclidean_norm_\sqrt_has_the_Rayleigh_distribution.


__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-squar ...
_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_is_independent_from_the_sample__standard_deviation,_which_can_be_demonstrated_using_Basu's_theorem_or_Cochran's_theorem._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 situ ...
_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_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_distribution, 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_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_(probability), infinite_divisibility. 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_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_...
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'',_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-squar ...
_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,_for_normal_distributions_the_sample_mean_\textstyle\hat\mu_and_the_sample_variance_''s''2_are_independence_(probability_theory), independent,_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 situ ...
_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_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_th_...
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,_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,_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_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_σ2,_the_conjugate_prior_distribution_is_also_normally_distributed. This_can_be_shown_more_easily_by_rewriting_the_variance_as_the__precision,_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_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_σ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;_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._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_(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._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 ques ...
._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_Φ−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_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_independence_(probability_theory), independent._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-squar ...
_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,_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].html"_;"title="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_functions__1F_1_and_U. :\begin ___\operatorname\left[X^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[X_\mid_a 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._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_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._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_standard_deviation_1/\sigma._In_particular,_the_standard_normal_distribution_\varphi_is_an_Fourier_transform#Eigenfunctions, 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_(probability_theory), characteristic_function_\varphi_X(t)_of_that_variable,_which_is_defined_as_the_expected_value_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_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[e^]_=_\hat_f(it)_=_e^_e^ 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 Since_this_is_a_quadratic_polynomial_in_t,_only_the_first_two__cumulants_are_nonzero,_namely_the_mean \mu_and_the_variance \sigma^2.


__Stein_operator_and_class_

Within_Stein's_method_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_when_\sigma_=_0. However,_one_can_define_the_normal_distribution_with_zero_variance_as_a_ generalized_function;_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 argum ...
_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 ...
_with_ probability_density_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._A_function_with_two_ Lagrange_multipliers_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_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_statistics,_ scores,_and__estimators_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 ques ...
_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_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-squar ...
_\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 situ ...
_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 ser ...
s. This_theorem_can_also_be_used_to_justify_modeling_the_sum_of_many_uniform_noise_sources_as_ Gaussian_noise._See_ AWGN.


__Operations_and_functions_of_normal_variables_

The_ probability_density,_
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_function, 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-normal_distribution, log-normally:_. *_The_absolute_value_of_X_has_folded_normal_distribution:_._If_\mu_=_0_this_is_known_as_the_half-normal_distribution. *_The_absolute_value_of_normalized_residuals,_, ''X''_−_''μ'', /''σ'',_has_chi_distribution_with_one_degree_of_freedom:_, X_-_\mu, _/_\sigma_\sim_\chi_1. *_The_square_of_''X''/''σ''_has_the_noncentral_chi-squared_distribution_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_distribution, chi-squared. *_The_log_likelihood_of_a_normal_variable_x_is_simply_the_log_of_its__probability_density_function:_\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_distribution, chi-squared_variable. *_The_distribution_of_the_variable_''X''_restricted_to_an_interval_[''a'',_''b'']_is_called_the_truncated_normal_distribution. *_(''X''_−_''μ'')−2_has_a__Lévy_distribution_with_location_0_and_scale_''σ''−2.


_=_Operations_on_two_independent_normal_variables_

= *_If_X_1_and_X_2_are_two_independence_(probability_theory), independent_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,sum_of_normally_distributed_random_variables, [proof]_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. *_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_distribution, stable_(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#Independent_central-normal_distributions, product_distribution_with_density_function_f_Z(z)_=_\pi^_K_0(, z, )_where_K_0_is_the_Macdonald_function, modified_Bessel_function_of_the_second_kind._This_distribution_is_symmetric_around_zero,_unbounded_at_z_=_0,_and_has_the_characteristic_function_(probability_theory), characteristic_function__\phi_Z(t)_=_(1_+_t^2)^. *_Their_ratio_follows_the_standard__Cauchy_distribution:_X_1/_X_2_\sim_\operatorname(0,_1). *_Their_Euclidean_norm_\sqrt_has_the_Rayleigh_distribution.


__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-squar ...
_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_is_independent_from_the_sample__standard_deviation,_which_can_be_demonstrated_using_Basu's_theorem_or_Cochran's_theorem._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 situ ...
_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_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_distribution, 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_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_(probability), infinite_divisibility. 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_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_...
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'',_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-squar ...
_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,_for_normal_distributions_the_sample_mean_\textstyle\hat\mu_and_the_sample_variance_''s''2_are_independence_(probability_theory), independent,_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 situ ...
_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_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_th_...
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,_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,_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_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_σ2,_the_conjugate_prior_distribution_is_also_normally_distributed. This_can_be_shown_more_easily_by_rewriting_the_variance_as_the__precision,_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_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_σ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;_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._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_(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._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 ques ...
._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_Φ−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_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_independence_(probability_theory), independent._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-squar ...
_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,_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_functions__1F_1_and_U. :\begin ___\operatorname\left[X^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[X_\mid_a 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._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_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._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_standard_deviation_1/\sigma._In_particular,_the_standard_normal_distribution_\varphi_is_an_Fourier_transform#Eigenfunctions, 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_(probability_theory), characteristic_function_\varphi_X(t)_of_that_variable,_which_is_defined_as_the_expected_value_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_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[e^]_=_\hat_f(it)_=_e^_e^ 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 Since_this_is_a_quadratic_polynomial_in_t,_only_the_first_two__cumulants_are_nonzero,_namely_the_mean \mu_and_the_variance \sigma^2.


__Stein_operator_and_class_

Within_Stein's_method_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_when_\sigma_=_0. However,_one_can_define_the_normal_distribution_with_zero_variance_as_a_ generalized_function;_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 argum ...
_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 ...
_with_ probability_density_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._A_function_with_two_ Lagrange_multipliers_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_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_statistics,_ scores,_and__estimators_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 ques ...
_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_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-squar ...
_\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 situ ...
_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 ser ...
s. This_theorem_can_also_be_used_to_justify_modeling_the_sum_of_many_uniform_noise_sources_as_ Gaussian_noise._See_ AWGN.


__Operations_and_functions_of_normal_variables_

The_ probability_density,_
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_function, 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-normal_distribution, log-normally:_. *_The_absolute_value_of_X_has_folded_normal_distribution:_._If_\mu_=_0_this_is_known_as_the_half-normal_distribution. *_The_absolute_value_of_normalized_residuals,_, ''X''_−_''μ'', /''σ'',_has_chi_distribution_with_one_degree_of_freedom:_, X_-_\mu, _/_\sigma_\sim_\chi_1. *_The_square_of_''X''/''σ''_has_the_noncentral_chi-squared_distribution_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_distribution, chi-squared. *_The_log_likelihood_of_a_normal_variable_x_is_simply_the_log_of_its__probability_density_function:_\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_distribution, chi-squared_variable. *_The_distribution_of_the_variable_''X''_restricted_to_an_interval_[''a'',_''b'']_is_called_the_truncated_normal_distribution. *_(''X''_−_''μ'')−2_has_a__Lévy_distribution_with_location_0_and_scale_''σ''−2.


_=_Operations_on_two_independent_normal_variables_

= *_If_X_1_and_X_2_are_two_independence_(probability_theory), independent_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,sum_of_normally_distributed_random_variables, [proof]_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. *_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_distribution, stable_(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#Independent_central-normal_distributions, product_distribution_with_density_function_f_Z(z)_=_\pi^_K_0(, z, )_where_K_0_is_the_Macdonald_function, modified_Bessel_function_of_the_second_kind._This_distribution_is_symmetric_around_zero,_unbounded_at_z_=_0,_and_has_the_characteristic_function_(probability_theory), characteristic_function__\phi_Z(t)_=_(1_+_t^2)^. *_Their_ratio_follows_the_standard__Cauchy_distribution:_X_1/_X_2_\sim_\operatorname(0,_1). *_Their_Euclidean_norm_\sqrt_has_the_Rayleigh_distribution.


__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-squar ...
_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_is_independent_from_the_sample__standard_deviation,_which_can_be_demonstrated_using_Basu's_theorem_or_Cochran's_theorem._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 situ ...
_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_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_distribution, 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_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_(probability), infinite_divisibility. 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_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_...
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'',_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-squar ...
_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,_for_normal_distributions_the_sample_mean_\textstyle\hat\mu_and_the_sample_variance_''s''2_are_independence_(probability_theory), independent,_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 situ ...
_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_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_th_...
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,_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,_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_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_σ2,_the_conjugate_prior_distribution_is_also_normally_distributed. This_can_be_shown_more_easily_by_rewriting_the_variance_as_the__precision,_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_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_σ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;_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._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_(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._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 ques ...
._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_Φ−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_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_independence_(probability_theory), independent._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-squar ...
_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,_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._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,_with_mean_0_and_standard_deviation_1/\sigma._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_ 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__...
_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_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__cumulants_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_(statistician),_Charles_Stein,_who_first_publ_...
_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_when_\sigma_=_0. However,_one_can_define_the_normal_distribution_with_zero_variance_as_a_ generalized_function;_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 argum ...
_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 ...
_with_ probability_density_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._A_function_with_two_ Lagrange_multipliers_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_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_statistics,_ scores,_and__estimators_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 ques ...
_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_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-squar ...
_\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 situ ...
_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 ser ...
s. This_theorem_can_also_be_used_to_justify_modeling_the_sum_of_many_uniform_noise_sources_as_ Gaussian_noise._See_ AWGN.


__Operations_and_functions_of_normal_variables_

The_ probability_density,_
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_function, 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-normal_distribution, log-normally:_. *_The_absolute_value_of_X_has_folded_normal_distribution:_._If_\mu_=_0_this_is_known_as_the_half-normal_distribution. *_The_absolute_value_of_normalized_residuals,_, ''X''_−_''μ'', /''σ'',_has_chi_distribution_with_one_degree_of_freedom:_, X_-_\mu, _/_\sigma_\sim_\chi_1. *_The_square_of_''X''/''σ''_has_the_noncentral_chi-squared_distribution_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_distribution, chi-squared. *_The_log_likelihood_of_a_normal_variable_x_is_simply_the_log_of_its__probability_density_function:_\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_distribution, chi-squared_variable. *_The_distribution_of_the_variable_''X''_restricted_to_an_interval_[''a'',_''b'']_is_called_the_truncated_normal_distribution. *_(''X''_−_''μ'')−2_has_a__Lévy_distribution_with_location_0_and_scale_''σ''−2.


_=_Operations_on_two_independent_normal_variables_

= *_If_X_1_and_X_2_are_two_independence_(probability_theory), independent_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,sum_of_normally_distributed_random_variables, [proof]_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. *_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_distribution, stable_(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#Independent_central-normal_distributions, product_distribution_with_density_function_f_Z(z)_=_\pi^_K_0(, z, )_where_K_0_is_the_Macdonald_function, modified_Bessel_function_of_the_second_kind._This_distribution_is_symmetric_around_zero,_unbounded_at_z_=_0,_and_has_the__characteristic_function__\phi_Z(t)_=_(1_+_t^2)^. *_Their_ratio_follows_the_standard__Cauchy_distribution:_X_1/_X_2_\sim_\operatorname(0,_1). *_Their_Euclidean_norm_\sqrt_has_the_Rayleigh_distribution.


__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-squar ...
_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_is_independent_from_the_sample__standard_deviation,_which_can_be_demonstrated_using_Basu's_theorem_or_Cochran's_theorem._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 situ ...
_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_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_distribution, 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_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_(probability), infinite_divisibility. 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_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_...
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'',_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-squar ...
_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,_for_normal_distributions_the_sample_mean_\textstyle\hat\mu_and_the_sample_variance_''s''2_are_independence_(probability_theory), independent,_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 situ ...
_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_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_th_...
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,_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,_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_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_σ2,_the_conjugate_prior_distribution_is_also_normally_distributed. This_can_be_shown_more_easily_by_rewriting_the_variance_as_the__precision,_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_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_σ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;_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._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_(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._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 ques ...
._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_Φ−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_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_independence_(probability_theory), independent._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-squar ...
_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,_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].html"_;"title="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_functions__1F_1_and_U. :\begin ___\operatorname\left[X^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[X_\mid_a 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._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_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._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_standard_deviation_1/\sigma._In_particular,_the_standard_normal_distribution_\varphi_is_an_Fourier_transform#Eigenfunctions, 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_(probability_theory), characteristic_function_\varphi_X(t)_of_that_variable,_which_is_defined_as_the_expected_value_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_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[e^]_=_\hat_f(it)_=_e^_e^ 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 Since_this_is_a_quadratic_polynomial_in_t,_only_the_first_two__cumulants_are_nonzero,_namely_the_mean \mu_and_the_variance \sigma^2.


__Stein_operator_and_class_

Within_Stein's_method_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_when_\sigma_=_0. However,_one_can_define_the_normal_distribution_with_zero_variance_as_a_ generalized_function;_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 argum ...
_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 ...
_with_ probability_density_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._A_function_with_two_ Lagrange_multipliers_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_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_statistics,_ scores,_and__estimators_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 ques ...
_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_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-squar ...
_\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 situ ...
_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 ser ...
s. This_theorem_can_also_be_used_to_justify_modeling_the_sum_of_many_uniform_noise_sources_as_ Gaussian_noise._See_ AWGN.


__Operations_and_functions_of_normal_variables_

The_ probability_density,_
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_function, 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-normal_distribution, log-normally:_. *_The_absolute_value_of_X_has_folded_normal_distribution:_._If_\mu_=_0_this_is_known_as_the_half-normal_distribution. *_The_absolute_value_of_normalized_residuals,_, ''X''_−_''μ'', /''σ'',_has_chi_distribution_with_one_degree_of_freedom:_, X_-_\mu, _/_\sigma_\sim_\chi_1. *_The_square_of_''X''/''σ''_has_the_noncentral_chi-squared_distribution_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_distribution, chi-squared. *_The_log_likelihood_of_a_normal_variable_x_is_simply_the_log_of_its__probability_density_function:_\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_distribution, chi-squared_variable. *_The_distribution_of_the_variable_''X''_restricted_to_an_interval_[''a'',_''b'']_is_called_the_truncated_normal_distribution. *_(''X''_−_''μ'')−2_has_a__Lévy_distribution_with_location_0_and_scale_''σ''−2.


_=_Operations_on_two_independent_normal_variables_

= *_If_X_1_and_X_2_are_two_independence_(probability_theory), independent_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,sum_of_normally_distributed_random_variables, [proof]_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. *_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_distribution, stable_(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#Independent_central-normal_distributions, product_distribution_with_density_function_f_Z(z)_=_\pi^_K_0(, z, )_where_K_0_is_the_Macdonald_function, modified_Bessel_function_of_the_second_kind._This_distribution_is_symmetric_around_zero,_unbounded_at_z_=_0,_and_has_the_characteristic_function_(probability_theory), characteristic_function__\phi_Z(t)_=_(1_+_t^2)^. *_Their_ratio_follows_the_standard__Cauchy_distribution:_X_1/_X_2_\sim_\operatorname(0,_1). *_Their_Euclidean_norm_\sqrt_has_the_Rayleigh_distribution.


__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-squar ...
_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_is_independent_from_the_sample__standard_deviation,_which_can_be_demonstrated_using_Basu's_theorem_or_Cochran's_theorem._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 situ ...
_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_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_distribution, 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_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_(probability), infinite_divisibility. 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_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_...
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'',_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-squar ...
_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,_for_normal_distributions_the_sample_mean_\textstyle\hat\mu_and_the_sample_variance_''s''2_are_independence_(probability_theory), independent,_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 situ ...
_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_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_th_...
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,_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,_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_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_σ2,_the_conjugate_prior_distribution_is_also_normally_distributed. This_can_be_shown_more_easily_by_rewriting_the_variance_as_the__precision,_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_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_σ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;_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._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_(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._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 ques ...
._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_Φ−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_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_independence_(probability_theory), independent._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-squar ...
_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,_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_functions__1F_1_and_U. :\begin ___\operatorname\left[X^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[X_\mid_a 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._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_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._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_standard_deviation_1/\sigma._In_particular,_the_standard_normal_distribution_\varphi_is_an_Fourier_transform#Eigenfunctions, 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_(probability_theory), characteristic_function_\varphi_X(t)_of_that_variable,_which_is_defined_as_the_expected_value_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_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[e^]_=_\hat_f(it)_=_e^_e^ 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 Since_this_is_a_quadratic_polynomial_in_t,_only_the_first_two__cumulants_are_nonzero,_namely_the_mean \mu_and_the_variance \sigma^2.


__Stein_operator_and_class_

Within_Stein's_method_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_when_\sigma_=_0. However,_one_can_define_the_normal_distribution_with_zero_variance_as_a_ generalized_function;_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 argum ...
_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 ...
_with_ probability_density_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._A_function_with_two_ Lagrange_multipliers_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_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_statistics,_ scores,_and__estimators_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 ques ...
_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_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-squar ...
_\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 situ ...
_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 ser ...
s. This_theorem_can_also_be_used_to_justify_modeling_the_sum_of_many_uniform_noise_sources_as_ Gaussian_noise._See_ AWGN.


__Operations_and_functions_of_normal_variables_

The_ probability_density,_
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_function, 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-normal_distribution, log-normally:_. *_The_absolute_value_of_X_has_folded_normal_distribution:_._If_\mu_=_0_this_is_known_as_the_half-normal_distribution. *_The_absolute_value_of_normalized_residuals,_, ''X''_−_''μ'', /''σ'',_has_chi_distribution_with_one_degree_of_freedom:_, X_-_\mu, _/_\sigma_\sim_\chi_1. *_The_square_of_''X''/''σ''_has_the_noncentral_chi-squared_distribution_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_distribution, chi-squared. *_The_log_likelihood_of_a_normal_variable_x_is_simply_the_log_of_its__probability_density_function:_\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_distribution, chi-squared_variable. *_The_distribution_of_the_variable_''X''_restricted_to_an_interval_[''a'',_''b'']_is_called_the_truncated_normal_distribution. *_(''X''_−_''μ'')−2_has_a__Lévy_distribution_with_location_0_and_scale_''σ''−2.


_=_Operations_on_two_independent_normal_variables_

= *_If_X_1_and_X_2_are_two_independence_(probability_theory), independent_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,sum_of_normally_distributed_random_variables, [proof]_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. *_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_distribution, stable_(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#Independent_central-normal_distributions, product_distribution_with_density_function_f_Z(z)_=_\pi^_K_0(, z, )_where_K_0_is_the_Macdonald_function, modified_Bessel_function_of_the_second_kind._This_distribution_is_symmetric_around_zero,_unbounded_at_z_=_0,_and_has_the_characteristic_function_(probability_theory), characteristic_function__\phi_Z(t)_=_(1_+_t^2)^. *_Their_ratio_follows_the_standard__Cauchy_distribution:_X_1/_X_2_\sim_\operatorname(0,_1). *_Their_Euclidean_norm_\sqrt_has_the_Rayleigh_distribution.


__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-squar ...
_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_is_independent_from_the_sample__standard_deviation,_which_can_be_demonstrated_using_Basu's_theorem_or_Cochran's_theorem._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 situ ...
_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_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_distribution, 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_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_(probability), infinite_divisibility. 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_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_...
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'',_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-squar ...
_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,_for_normal_distributions_the_sample_mean_\textstyle\hat\mu_and_the_sample_variance_''s''2_are_independence_(probability_theory), independent,_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 situ ...
_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_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_th_...
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,_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,_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_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_σ2,_the_conjugate_prior_distribution_is_also_normally_distributed. This_can_be_shown_more_easily_by_rewriting_the_variance_as_the__precision,_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_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_σ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;_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._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_(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._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 ques ...
._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_Φ−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_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_independence_(probability_theory), independent._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-squar ...
_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,_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].html" ;"title="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_when_\sigma_=_0. However,_one_can_define_the_normal_distribution_with_zero_variance_as_a_ generalized_function;_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 argum ...
_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 ...
_with_ probability_density_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._A_function_with_two_ Lagrange_multipliers_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_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_statistics,_ scores,_and__estimators_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 ques ...
_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_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-squar ...
_\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 situ ...
_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 ser ...
s. This_theorem_can_also_be_used_to_justify_modeling_the_sum_of_many_uniform_noise_sources_as_ Gaussian_noise._See_ AWGN.


__Operations_and_functions_of_normal_variables_

The_ probability_density,_
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_function, 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-normal_distribution, log-normally:_. *_The_absolute_value_of_X_has_folded_normal_distribution:_._If_\mu_=_0_this_is_known_as_the_half-normal_distribution. *_The_absolute_value_of_normalized_residuals,_, ''X''_−_''μ'', /''σ'',_has_chi_distribution_with_one_degree_of_freedom:_, X_-_\mu, _/_\sigma_\sim_\chi_1. *_The_square_of_''X''/''σ''_has_the_noncentral_chi-squared_distribution_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_distribution, chi-squared. *_The_log_likelihood_of_a_normal_variable_x_is_simply_the_log_of_its__probability_density_function:_\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_distribution, chi-squared_variable. *_The_distribution_of_the_variable_''X''_restricted_to_an_interval_[''a'',_''b'']_is_called_the_truncated_normal_distribution. *_(''X''_−_''μ'')−2_has_a__Lévy_distribution_with_location_0_and_scale_''σ''−2.


_=_Operations_on_two_independent_normal_variables_

= *_If_X_1_and_X_2_are_two_independence_(probability_theory), independent_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,sum_of_normally_distributed_random_variables, [proof]_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. *_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_distribution, stable_(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#Independent_central-normal_distributions, product_distribution_with_density_function_f_Z(z)_=_\pi^_K_0(, z, )_where_K_0_is_the_Macdonald_function, modified_Bessel_function_of_the_second_kind._This_distribution_is_symmetric_around_zero,_unbounded_at_z_=_0,_and_has_the_ characteristic_function__\phi_Z(t)_=_(1_+_t^2)^. *_Their_ratio_follows_the_standard__Cauchy_distribution:_X_1/_X_2_\sim_\operatorname(0,_1). *_Their_Euclidean_norm_\sqrt_has_the_Rayleigh_distribution.


__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-squar ...
_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_is_independent_from_the_sample__standard_deviation,_which_can_be_demonstrated_using_Basu's_theorem_or_Cochran's_theorem._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 situ ...
_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_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_distribution, 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_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_(probability), infinite_divisibility. 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_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_...
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'',_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-squar ...
_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,_for_normal_distributions_the_sample_mean_\textstyle\hat\mu_and_the_sample_variance_''s''2_are_independence_(probability_theory), independent,_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 situ ...
_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_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_th_...
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,_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,_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_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_σ2,_the_conjugate_prior_distribution_is_also_normally_distributed. This_can_be_shown_more_easily_by_rewriting_the_variance_as_the__precision,_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_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_σ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;_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._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_(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._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 ques ...
._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_Φ−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_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_independence_(probability_theory), independent._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-squar ...
_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,_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].html"_;"title="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_functions__1F_1_and_U. :\begin ___\operatorname\left[X^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._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,_with_mean_0_and_standard_deviation_1/\sigma._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 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 ...
_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_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__cumulants_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 (statistician), Charles Stein, who first publ ...
_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_when_\sigma_=_0. However,_one_can_define_the_normal_distribution_with_zero_variance_as_a_ generalized_function;_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 argum ...
_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 ...
_with_ probability_density_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._A_function_with_two_ Lagrange_multipliers_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_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_statistics,_ scores,_and__estimators_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 ques ...
_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_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-squar ...
_\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 situ ...
_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 ser ...
s. This_theorem_can_also_be_used_to_justify_modeling_the_sum_of_many_uniform_noise_sources_as_ Gaussian_noise._See_ AWGN.


__Operations_and_functions_of_normal_variables_

The_ probability_density,_
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_function, 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-normal_distribution, log-normally:_. *_The_absolute_value_of_X_has_folded_normal_distribution:_._If_\mu_=_0_this_is_known_as_the_half-normal_distribution. *_The_absolute_value_of_normalized_residuals,_, ''X''_−_''μ'', /''σ'',_has_chi_distribution_with_one_degree_of_freedom:_, X_-_\mu, _/_\sigma_\sim_\chi_1. *_The_square_of_''X''/''σ''_has_the_noncentral_chi-squared_distribution_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_distribution, chi-squared. *_The_log_likelihood_of_a_normal_variable_x_is_simply_the_log_of_its__probability_density_function:_\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_distribution, chi-squared_variable. *_The_distribution_of_the_variable_''X''_restricted_to_an_interval_[''a'',_''b'']_is_called_the_truncated_normal_distribution. *_(''X''_−_''μ'')−2_has_a__Lévy_distribution_with_location_0_and_scale_''σ''−2.


_=_Operations_on_two_independent_normal_variables_

= *_If_X_1_and_X_2_are_two_independence_(probability_theory), independent_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,sum_of_normally_distributed_random_variables, [proof]_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. *_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_distribution, stable_(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#Independent_central-normal_distributions, product_distribution_with_density_function_f_Z(z)_=_\pi^_K_0(, z, )_where_K_0_is_the_Macdonald_function, modified_Bessel_function_of_the_second_kind._This_distribution_is_symmetric_around_zero,_unbounded_at_z_=_0,_and_has_the_ characteristic_function__\phi_Z(t)_=_(1_+_t^2)^. *_Their_ratio_follows_the_standard__Cauchy_distribution:_X_1/_X_2_\sim_\operatorname(0,_1). *_Their_Euclidean_norm_\sqrt_has_the_Rayleigh_distribution.


__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-squar ...
_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_is_independent_from_the_sample__standard_deviation,_which_can_be_demonstrated_using_Basu's_theorem_or_Cochran's_theorem._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 situ ...
_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_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_distribution, 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_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_(probability), infinite_divisibility. 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_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_...
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'',_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-squar ...
_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,_for_normal_distributions_the_sample_mean_\textstyle\hat\mu_and_the_sample_variance_''s''2_are_independence_(probability_theory), independent,_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 situ ...
_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_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_th_...
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,_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,_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_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_σ2,_the_conjugate_prior_distribution_is_also_normally_distributed. This_can_be_shown_more_easily_by_rewriting_the_variance_as_the__precision,_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_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_σ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;_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._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_(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._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 ques ...
._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_Φ−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_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_independence_(probability_theory), independent._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-squar ...
_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,_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_functions__1F_1_and_U. :\begin ___\operatorname\left[X^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._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,_with_mean_0_and_standard_deviation_1/\sigma._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 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 ...
_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_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__cumulants_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 (statistician), Charles Stein, who first publ ...
_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_when_\sigma_=_0. However,_one_can_define_the_normal_distribution_with_zero_variance_as_a_ generalized_function;_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 argum ...
_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 ...
_with_ probability_density_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._A_function_with_two_ Lagrange_multipliers_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_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_statistics,_ scores,_and__estimators_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 ques ...
_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_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-squar ...
_\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 situ ...
_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 ser ...
s. This_theorem_can_also_be_used_to_justify_modeling_the_sum_of_many_uniform_noise_sources_as_ Gaussian_noise._See_ AWGN.


__Operations_and_functions_of_normal_variables_

The_ probability_density,_
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_function, 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-normal_distribution, log-normally:_. *_The_absolute_value_of_X_has_folded_normal_distribution:_._If_\mu_=_0_this_is_known_as_the_half-normal_distribution. *_The_absolute_value_of_normalized_residuals,_, ''X''_−_''μ'', /''σ'',_has_chi_distribution_with_one_degree_of_freedom:_, X_-_\mu, _/_\sigma_\sim_\chi_1. *_The_square_of_''X''/''σ''_has_the_noncentral_chi-squared_distribution_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_distribution, chi-squared. *_The_log_likelihood_of_a_normal_variable_x_is_simply_the_log_of_its__probability_density_function:_\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_distribution, chi-squared_variable. *_The_distribution_of_the_variable_''X''_restricted_to_an_interval_[''a'',_''b'']_is_called_the_truncated_normal_distribution. *_(''X''_−_''μ'')−2_has_a__Lévy_distribution_with_location_0_and_scale_''σ''−2.


_=_Operations_on_two_independent_normal_variables_

= *_If_X_1_and_X_2_are_two_independence_(probability_theory), independent_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,sum_of_normally_distributed_random_variables, [proof]_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. *_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_distribution, stable_(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#Independent_central-normal_distributions, product_distribution_with_density_function_f_Z(z)_=_\pi^_K_0(, z, )_where_K_0_is_the_Macdonald_function, modified_Bessel_function_of_the_second_kind._This_distribution_is_symmetric_around_zero,_unbounded_at_z_=_0,_and_has_the_ characteristic_function__\phi_Z(t)_=_(1_+_t^2)^. *_Their_ratio_follows_the_standard__Cauchy_distribution:_X_1/_X_2_\sim_\operatorname(0,_1). *_Their_Euclidean_norm_\sqrt_has_the_Rayleigh_distribution.


__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-squar ...
_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_is_independent_from_the_sample__standard_deviation,_which_can_be_demonstrated_using_Basu's_theorem_or_Cochran's_theorem._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 situ ...
_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_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_distribution, 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_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_(probability), infinite_divisibility. 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_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_...
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'',_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-squar ...
_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,_for_normal_distributions_the_sample_mean_\textstyle\hat\mu_and_the_sample_variance_''s''2_are_independence_(probability_theory), independent,_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 situ ...
_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_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_th_...
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,_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,_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_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_σ2,_the_conjugate_prior_distribution_is_also_normally_distributed. This_can_be_shown_more_easily_by_rewriting_the_variance_as_the__precision,_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_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_σ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;_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._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_(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._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 ques ...
._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_Φ−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_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_independence_(probability_theory), independent._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-squar ...
_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,_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].html" ;"title="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._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,_with_mean_0_and_standard_deviation_1/\sigma._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 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 ...
_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_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__cumulants_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 (statistician), Charles Stein, who first publ ...
_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_when_\sigma_=_0. However,_one_can_define_the_normal_distribution_with_zero_variance_as_a_ generalized_function;_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 argum ...
_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 ...
_with_ probability_density_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._A_function_with_two_ Lagrange_multipliers_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_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_statistics,_ scores,_and__estimators_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 ques ...
_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_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-squar ...
_\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 situ ...
_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 ser ...
s. This_theorem_can_also_be_used_to_justify_modeling_the_sum_of_many_uniform_noise_sources_as_ Gaussian_noise._See_ AWGN.


__Operations_and_functions_of_normal_variables_

The_ probability_density,_
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_function, 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-normal_distribution, log-normally:_. *_The_absolute_value_of_X_has_folded_normal_distribution:_._If_\mu_=_0_this_is_known_as_the_half-normal_distribution. *_The_absolute_value_of_normalized_residuals,_, ''X''_−_''μ'', /''σ'',_has_chi_distribution_with_one_degree_of_freedom:_, X_-_\mu, _/_\sigma_\sim_\chi_1. *_The_square_of_''X''/''σ''_has_the_noncentral_chi-squared_distribution_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_distribution, chi-squared. *_The_log_likelihood_of_a_normal_variable_x_is_simply_the_log_of_its__probability_density_function:_\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_distribution, chi-squared_variable. *_The_distribution_of_the_variable_''X''_restricted_to_an_interval_[''a'',_''b'']_is_called_the_truncated_normal_distribution. *_(''X''_−_''μ'')−2_has_a__Lévy_distribution_with_location_0_and_scale_''σ''−2.


_=_Operations_on_two_independent_normal_variables_

= *_If_X_1_and_X_2_are_two_independence_(probability_theory), independent_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,sum_of_normally_distributed_random_variables, [proof]_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. *_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_distribution, stable_(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#Independent_central-normal_distributions, product_distribution_with_density_function_f_Z(z)_=_\pi^_K_0(, z, )_where_K_0_is_the_Macdonald_function, modified_Bessel_function_of_the_second_kind._This_distribution_is_symmetric_around_zero,_unbounded_at_z_=_0,_and_has_the_ characteristic_function__\phi_Z(t)_=_(1_+_t^2)^. *_Their_ratio_follows_the_standard__Cauchy_distribution:_X_1/_X_2_\sim_\operatorname(0,_1). *_Their_Euclidean_norm_\sqrt_has_the_Rayleigh_distribution.


__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-squar ...
_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_is_independent_from_the_sample__standard_deviation,_which_can_be_demonstrated_using_Basu's_theorem_or_Cochran's_theorem._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 situ ...
_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_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_distribution, 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_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_(probability), infinite_divisibility. 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_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_...
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'',_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-squar ...
_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,_for_normal_distributions_the_sample_mean_\textstyle\hat\mu_and_the_sample_variance_''s''2_are_independence_(probability_theory), independent,_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 situ ...
_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_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_th_...
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,_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,_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_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_σ2,_the_conjugate_prior_distribution_is_also_normally_distributed. This_can_be_shown_more_easily_by_rewriting_the_variance_as_the__precision,_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_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_σ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;_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._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_(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._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 ques ...
._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_Φ−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_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_independence_(probability_theory), independent._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-squar ...
_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,_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].html" ;"title="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 functions _1F_1 and U. :\begin \operatorname\left[X^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[X \mid a 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. 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 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. 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 standard deviation 1/\sigma. In particular, the standard normal distribution \varphi is an Fourier transform#Eigenfunctions, 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 (probability theory), characteristic function \varphi_X(t) of that variable, which is defined as the expected value 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 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[e^] = \hat f(it) = e^ e^ 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 Since this is a quadratic polynomial in t, only the first two cumulants are nonzero, namely the mean \mu and the variance \sigma^2.


Stein operator and class

Within Stein's method 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 (mathematics), function when \sigma = 0. However, one can define the normal distribution with zero variance as a generalized function; specifically, as Dirac delta function, 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 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 probability distribution, maximum entropy. If X is a continuous random variable with probability density function, probability density 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. A function with two Lagrange multipliers 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 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 statistics, score (statistics), scores, and estimators 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 function (statistics), 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 B(n,p) is De Moivre–Laplace theorem, 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 with parameter \lambda is approximately normal with mean \lambda and variance \lambda, for large values of \lambda. * The chi-squared distribution \chi^2(k) is approximately normal with mean k and variance 2k, for large k. * The Student's t-distribution 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, improvements of the approximation are given by the Edgeworth expansions. This theorem can also be used to justify modeling the sum of many uniform noise sources as Gaussian noise. See AWGN.


Operations and functions of normal variables

The probability density function, probability density, cumulative distribution function, cumulative distribution, and inverse cumulative distribution function, 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-normal distribution, log-normally: . * The absolute value of X has folded normal distribution: . If \mu = 0 this is known as the half-normal distribution. * The absolute value of normalized residuals, , ''X'' − ''μ'', /''σ'', has chi distribution with one degree of freedom: , X - \mu, / \sigma \sim \chi_1. * The square of ''X''/''σ'' has the noncentral chi-squared distribution 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 distribution, chi-squared. * The log likelihood of a normal variable x is simply the log of its probability density function: \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 distribution, chi-squared variable. * The distribution of the variable ''X'' restricted to an interval [''a'', ''b''] is called the truncated normal distribution. * (''X'' − ''μ'')−2 has a Lévy distribution with location 0 and scale ''σ''−2.


= Operations on two independent normal variables

= * If X_1 and X_2 are two independence (probability theory), independent 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,sum of normally distributed random variables, [proof] 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. * 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 distribution, stable (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#Independent central-normal distributions, product distribution with density function f_Z(z) = \pi^ K_0(, z, ) where K_0 is the Macdonald function, modified Bessel function of the second kind. This distribution is symmetric around zero, unbounded at z = 0, and has the characteristic function (probability theory), characteristic function \phi_Z(t) = (1 + t^2)^. * Their ratio follows the standard Cauchy distribution: X_1/ X_2 \sim \operatorname(0, 1). * Their Euclidean norm \sqrt has the Rayleigh distribution.


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 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 is independent from the sample standard deviation, which can be demonstrated using Basu's theorem or Cochran's theorem. The ratio of these two quantities will have the Student's t-distribution 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 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 distribution, 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 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 (probability), infinite divisibility. 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 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 ...
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'', 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 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, for normal distributions the sample mean \textstyle\hat\mu and the sample variance ''s''2 are independence (probability theory), independent, 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 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 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 th ...
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, 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, 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 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 σ2, the conjugate prior distribution is also normally distributed. This can be shown more easily by rewriting the variance as the precision, 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 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 σ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; 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. 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 (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. 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. 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 Φ−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 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 independence (probability theory), independent. This formulation arises because for a bivariate normal random vector (''X'', ''Y'') the squared norm will have the chi-squared distribution 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, 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 functions _1F_1 and U. :\begin \operatorname\left[X^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[X \mid a 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. 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 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. 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 standard deviation 1/\sigma. In particular, the standard normal distribution \varphi is an Fourier transform#Eigenfunctions, 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 (probability theory), characteristic function \varphi_X(t) of that variable, which is defined as the expected value 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 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[e^] = \hat f(it) = e^ e^ 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 Since this is a quadratic polynomial in t, only the first two cumulants are nonzero, namely the mean \mu and the variance \sigma^2.


Stein operator and class

Within Stein's method 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 (mathematics), function when \sigma = 0. However, one can define the normal distribution with zero variance as a generalized function; specifically, as Dirac delta function, 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 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 probability distribution, maximum entropy. If X is a continuous random variable with probability density function, probability density 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. A function with two Lagrange multipliers 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 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 statistics, score (statistics), scores, and estimators 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 function (statistics), 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 B(n,p) is De Moivre–Laplace theorem, 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 with parameter \lambda is approximately normal with mean \lambda and variance \lambda, for large values of \lambda. * The chi-squared distribution \chi^2(k) is approximately normal with mean k and variance 2k, for large k. * The Student's t-distribution 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, improvements of the approximation are given by the Edgeworth expansions. This theorem can also be used to justify modeling the sum of many uniform noise sources as Gaussian noise. See AWGN.


Operations and functions of normal variables

The probability density function, probability density, cumulative distribution function, cumulative distribution, and inverse cumulative distribution function, 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-normal distribution, log-normally: . * The absolute value of X has folded normal distribution: . If \mu = 0 this is known as the half-normal distribution. * The absolute value of normalized residuals, , ''X'' − ''μ'', /''σ'', has chi distribution with one degree of freedom: , X - \mu, / \sigma \sim \chi_1. * The square of ''X''/''σ'' has the noncentral chi-squared distribution 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 distribution, chi-squared. * The log likelihood of a normal variable x is simply the log of its probability density function: \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 distribution, chi-squared variable. * The distribution of the variable ''X'' restricted to an interval [''a'', ''b''] is called the truncated normal distribution. * (''X'' − ''μ'')−2 has a Lévy distribution with location 0 and scale ''σ''−2.


= Operations on two independent normal variables

= * If X_1 and X_2 are two independence (probability theory), independent 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,sum of normally distributed random variables, [proof] 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. * 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 distribution, stable (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#Independent central-normal distributions, product distribution with density function f_Z(z) = \pi^ K_0(, z, ) where K_0 is the Macdonald function, modified Bessel function of the second kind. This distribution is symmetric around zero, unbounded at z = 0, and has the characteristic function (probability theory), characteristic function \phi_Z(t) = (1 + t^2)^. * Their ratio follows the standard Cauchy distribution: X_1/ X_2 \sim \operatorname(0, 1). * Their Euclidean norm \sqrt has the Rayleigh distribution.


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 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 is independent from the sample standard deviation, which can be demonstrated using Basu's theorem or Cochran's theorem. The ratio of these two quantities will have the Student's t-distribution 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 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 distribution, 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 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 (probability), infinite divisibility. 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 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 ...
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'', 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 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, for normal distributions the sample mean \textstyle\hat\mu and the sample variance ''s''2 are independence (probability theory), independent, 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 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 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 th ...
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, 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, 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 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 σ2, the conjugate prior distribution is also normally distributed. This can be shown more easily by rewriting the variance as the precision, 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 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 σ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; 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. 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 (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. 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. 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 Φ−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 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 independence (probability theory), independent. This formulation arises because for a bivariate normal random vector (''X'', ''Y'') the squared norm will have the chi-squared distribution 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, 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._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,_with_mean_0_and_standard_deviation_1/\sigma._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 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 ...
_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_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__cumulants_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 (statistician), Charles Stein, who first publ ...
_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_when_\sigma_=_0. However,_one_can_define_the_normal_distribution_with_zero_variance_as_a_ generalized_function;_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 argum ...
_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 ...
_with_ probability_density_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._A_function_with_two_ Lagrange_multipliers_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_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_statistics,_ scores,_and__estimators_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 ques ...
_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_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-squar ...
_\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 situ ...
_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 ser ...
s. This_theorem_can_also_be_used_to_justify_modeling_the_sum_of_many_uniform_noise_sources_as_ Gaussian_noise._See_ AWGN.


__Operations_and_functions_of_normal_variables_

The_ probability_density,_
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_function, 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-normal_distribution, log-normally:_. *_The_absolute_value_of_X_has_folded_normal_distribution:_._If_\mu_=_0_this_is_known_as_the_half-normal_distribution. *_The_absolute_value_of_normalized_residuals,_, ''X''_−_''μ'', /''σ'',_has_chi_distribution_with_one_degree_of_freedom:_, X_-_\mu, _/_\sigma_\sim_\chi_1. *_The_square_of_''X''/''σ''_has_the_noncentral_chi-squared_distribution_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_distribution, chi-squared. *_The_log_likelihood_of_a_normal_variable_x_is_simply_the_log_of_its__probability_density_function:_\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_distribution, chi-squared_variable. *_The_distribution_of_the_variable_''X''_restricted_to_an_interval_[''a'',_''b'']_is_called_the_truncated_normal_distribution. *_(''X''_−_''μ'')−2_has_a__Lévy_distribution_with_location_0_and_scale_''σ''−2.


_=_Operations_on_two_independent_normal_variables_

= *_If_X_1_and_X_2_are_two_independence_(probability_theory), independent_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,sum_of_normally_distributed_random_variables, [proof]_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. *_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_distribution, stable_(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#Independent_central-normal_distributions, product_distribution_with_density_function_f_Z(z)_=_\pi^_K_0(, z, )_where_K_0_is_the_Macdonald_function, modified_Bessel_function_of_the_second_kind._This_distribution_is_symmetric_around_zero,_unbounded_at_z_=_0,_and_has_the_ characteristic_function__\phi_Z(t)_=_(1_+_t^2)^. *_Their_ratio_follows_the_standard__Cauchy_distribution:_X_1/_X_2_\sim_\operatorname(0,_1). *_Their_Euclidean_norm_\sqrt_has_the_Rayleigh_distribution.


__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-squar ...
_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_is_independent_from_the_sample__standard_deviation,_which_can_be_demonstrated_using_Basu's_theorem_or_Cochran's_theorem._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 situ ...
_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_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_distribution, 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_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_(probability), infinite_divisibility. 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_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_...
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'',_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-squar ...
_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,_for_normal_distributions_the_sample_mean_\textstyle\hat\mu_and_the_sample_variance_''s''2_are_independence_(probability_theory), independent,_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 situ ...
_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_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_th_...
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,_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,_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_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_σ2,_the_conjugate_prior_distribution_is_also_normally_distributed. This_can_be_shown_more_easily_by_rewriting_the_variance_as_the__precision,_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_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_σ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;_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._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_(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._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 ques ...
._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_Φ−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_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_independence_(probability_theory), independent._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-squar ...
_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,_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].html" ;"title="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 functions _1F_1 and U. :\begin \operatorname\left[X^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[X \mid a 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. 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 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. 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 standard deviation 1/\sigma. In particular, the standard normal distribution \varphi is an Fourier transform#Eigenfunctions, 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 (probability theory), characteristic function \varphi_X(t) of that variable, which is defined as the expected value 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 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[e^] = \hat f(it) = e^ e^ 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 Since this is a quadratic polynomial in t, only the first two cumulants are nonzero, namely the mean \mu and the variance \sigma^2.


Stein operator and class

Within Stein's method 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 (mathematics), function when \sigma = 0. However, one can define the normal distribution with zero variance as a generalized function; specifically, as Dirac delta function, 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 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 probability distribution, maximum entropy. If X is a continuous random variable with probability density function, probability density 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. A function with two Lagrange multipliers 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 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 statistics, score (statistics), scores, and estimators 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 function (statistics), 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 B(n,p) is De Moivre–Laplace theorem, 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 with parameter \lambda is approximately normal with mean \lambda and variance \lambda, for large values of \lambda. * The chi-squared distribution \chi^2(k) is approximately normal with mean k and variance 2k, for large k. * The Student's t-distribution 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, improvements of the approximation are given by the Edgeworth expansions. This theorem can also be used to justify modeling the sum of many uniform noise sources as Gaussian noise. See AWGN.


Operations and functions of normal variables

The probability density function, probability density, cumulative distribution function, cumulative distribution, and inverse cumulative distribution function, 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-normal distribution, log-normally: . * The absolute value of X has folded normal distribution: . If \mu = 0 this is known as the half-normal distribution. * The absolute value of normalized residuals, , ''X'' − ''μ'', /''σ'', has chi distribution with one degree of freedom: , X - \mu, / \sigma \sim \chi_1. * The square of ''X''/''σ'' has the noncentral chi-squared distribution 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 distribution, chi-squared. * The log likelihood of a normal variable x is simply the log of its probability density function: \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 distribution, chi-squared variable. * The distribution of the variable ''X'' restricted to an interval [''a'', ''b''] is called the truncated normal distribution. * (''X'' − ''μ'')−2 has a Lévy distribution with location 0 and scale ''σ''−2.


= Operations on two independent normal variables

= * If X_1 and X_2 are two independence (probability theory), independent 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,sum of normally distributed random variables, [proof] 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. * 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 distribution, stable (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#Independent central-normal distributions, product distribution with density function f_Z(z) = \pi^ K_0(, z, ) where K_0 is the Macdonald function, modified Bessel function of the second kind. This distribution is symmetric around zero, unbounded at z = 0, and has the characteristic function (probability theory), characteristic function \phi_Z(t) = (1 + t^2)^. * Their ratio follows the standard Cauchy distribution: X_1/ X_2 \sim \operatorname(0, 1). * Their Euclidean norm \sqrt has the Rayleigh distribution.


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 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 is independent from the sample standard deviation, which can be demonstrated using Basu's theorem or Cochran's theorem. The ratio of these two quantities will have the Student's t-distribution 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 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 distribution, 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 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 (probability), infinite divisibility. 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 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 ...
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'', 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 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, for normal distributions the sample mean \textstyle\hat\mu and the sample variance ''s''2 are independence (probability theory), independent, 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 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 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 th ...
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, 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, 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 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 σ2, the conjugate prior distribution is also normally distributed. This can be shown more easily by rewriting the variance as the precision, 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 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 σ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; 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. 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 (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. 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. 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 Φ−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 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 independence (probability theory), independent. This formulation arises because for a bivariate normal random vector (''X'', ''Y'') the squared norm will have the chi-squared distribution 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, 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 functions _1F_1 and U. :\begin \operatorname\left[X^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[X \mid a 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. 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 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. 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 standard deviation 1/\sigma. In particular, the standard normal distribution \varphi is an Fourier transform#Eigenfunctions, 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 (probability theory), characteristic function \varphi_X(t) of that variable, which is defined as the expected value 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 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[e^] = \hat f(it) = e^ e^ 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 Since this is a quadratic polynomial in t, only the first two cumulants are nonzero, namely the mean \mu and the variance \sigma^2.


Stein operator and class

Within Stein's method 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 (mathematics), function when \sigma = 0. However, one can define the normal distribution with zero variance as a generalized function; specifically, as Dirac delta function, 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 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 probability distribution, maximum entropy. If X is a continuous random variable with probability density function, probability density 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. A function with two Lagrange multipliers 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 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 statistics, score (statistics), scores, and estimators 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 function (statistics), 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 B(n,p) is De Moivre–Laplace theorem, 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 with parameter \lambda is approximately normal with mean \lambda and variance \lambda, for large values of \lambda. * The chi-squared distribution \chi^2(k) is approximately normal with mean k and variance 2k, for large k. * The Student's t-distribution 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, improvements of the approximation are given by the Edgeworth expansions. This theorem can also be used to justify modeling the sum of many uniform noise sources as Gaussian noise. See AWGN.


Operations and functions of normal variables

The probability density function, probability density, cumulative distribution function, cumulative distribution, and inverse cumulative distribution function, 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-normal distribution, log-normally: . * The absolute value of X has folded normal distribution: . If \mu = 0 this is known as the half-normal distribution. * The absolute value of normalized residuals, , ''X'' − ''μ'', /''σ'', has chi distribution with one degree of freedom: , X - \mu, / \sigma \sim \chi_1. * The square of ''X''/''σ'' has the noncentral chi-squared distribution 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 distribution, chi-squared. * The log likelihood of a normal variable x is simply the log of its probability density function: \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 distribution, chi-squared variable. * The distribution of the variable ''X'' restricted to an interval [''a'', ''b''] is called the truncated normal distribution. * (''X'' − ''μ'')−2 has a Lévy distribution with location 0 and scale ''σ''−2.


= Operations on two independent normal variables

= * If X_1 and X_2 are two independence (probability theory), independent 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,sum of normally distributed random variables, [proof] 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. * 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 distribution, stable (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#Independent central-normal distributions, product distribution with density function f_Z(z) = \pi^ K_0(, z, ) where K_0 is the Macdonald function, modified Bessel function of the second kind. This distribution is symmetric around zero, unbounded at z = 0, and has the characteristic function (probability theory), characteristic function \phi_Z(t) = (1 + t^2)^. * Their ratio follows the standard Cauchy distribution: X_1/ X_2 \sim \operatorname(0, 1). * Their Euclidean norm \sqrt has the Rayleigh distribution.


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 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 is independent from the sample standard deviation, which can be demonstrated using Basu's theorem or Cochran's theorem. The ratio of these two quantities will have the Student's t-distribution 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 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 distribution, 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 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 (probability), infinite divisibility. 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 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 ...
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'', 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 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, for normal distributions the sample mean \textstyle\hat\mu and the sample variance ''s''2 are independence (probability theory), independent, 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 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 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 th ...
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, 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, 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 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 σ2, the conjugate prior distribution is also normally distributed. This can be shown more easily by rewriting the variance as the precision, 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 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 σ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; 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. 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 (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. 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. 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 Φ−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 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 independence (probability theory), independent. This formulation arises because for a bivariate normal random vector (''X'', ''Y'') the squared norm will have the chi-squared distribution 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, 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 (mathematics), function when \sigma = 0. However, one can define the normal distribution with zero variance as a generalized function; specifically, as Dirac delta function, 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 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 probability distribution, maximum entropy. If X is a continuous random variable with probability density function, probability density 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. A function with two Lagrange multipliers 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 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 statistics, score (statistics), scores, and estimators 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 function (statistics), 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 B(n,p) is De Moivre–Laplace theorem, 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 with parameter \lambda is approximately normal with mean \lambda and variance \lambda, for large values of \lambda. * The chi-squared distribution \chi^2(k) is approximately normal with mean k and variance 2k, for large k. * The Student's t-distribution 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, improvements of the approximation are given by the Edgeworth expansions. This theorem can also be used to justify modeling the sum of many uniform noise sources as Gaussian noise. See AWGN.


Operations and functions of normal variables

The probability density function, probability density, cumulative distribution function, cumulative distribution, and inverse cumulative distribution function, 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-normal distribution, log-normally: . * The absolute value of X has folded normal distribution: . If \mu = 0 this is known as the half-normal distribution. * The absolute value of normalized residuals, , ''X'' − ''μ'', /''σ'', has chi distribution with one degree of freedom: , X - \mu, / \sigma \sim \chi_1. * The square of ''X''/''σ'' has the noncentral chi-squared distribution 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 distribution, chi-squared. * The log likelihood of a normal variable x is simply the log of its probability density function: \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 distribution, chi-squared variable. * The distribution of the variable ''X'' restricted to an interval [''a'', ''b''] is called the truncated normal distribution. * (''X'' − ''μ'')−2 has a Lévy distribution with location 0 and scale ''σ''−2.


= Operations on two independent normal variables

= * If X_1 and X_2 are two independence (probability theory), independent 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,sum of normally distributed random variables, [proof] 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. * 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 distribution, stable (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#Independent central-normal distributions, product distribution with density function f_Z(z) = \pi^ K_0(, z, ) where K_0 is the Macdonald function, modified Bessel function of the second kind. This distribution is symmetric around zero, unbounded at z = 0, and has the characteristic function (probability theory), characteristic function \phi_Z(t) = (1 + t^2)^. * Their ratio follows the standard Cauchy distribution: X_1/ X_2 \sim \operatorname(0, 1). * Their Euclidean norm \sqrt has the Rayleigh distribution.


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 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 is independent from the sample standard deviation, which can be demonstrated using Basu's theorem or Cochran's theorem. The ratio of these two quantities will have the Student's t-distribution 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 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 distribution, 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 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 (probability), infinite divisibility. 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 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 ...
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'', 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 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, for normal distributions the sample mean \textstyle\hat\mu and the sample variance ''s''2 are independence (probability theory), independent, 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 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 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 th ...
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, 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, 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 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 σ2, the conjugate prior distribution is also normally distributed. This can be shown more easily by rewriting the variance as the precision, 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 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 σ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; 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. 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 (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. 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. 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 Φ−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 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 independence (probability theory), independent. This formulation arises because for a bivariate normal random vector (''X'', ''Y'') the squared norm will have the chi-squared distribution 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, 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._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,_with_mean_0_and_standard_deviation_1/\sigma._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 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 ...
_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_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__cumulants_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 (statistician), Charles Stein, who first publ ...
_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_when_\sigma_=_0. However,_one_can_define_the_normal_distribution_with_zero_variance_as_a_ generalized_function;_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 argum ...
_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 ...
_with_ probability_density_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._A_function_with_two_ Lagrange_multipliers_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_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_statistics,_ scores,_and__estimators_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 ques ...
_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_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-squar ...
_\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 situ ...
_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 ser ...
s. This_theorem_can_also_be_used_to_justify_modeling_the_sum_of_many_uniform_noise_sources_as_ Gaussian_noise._See_ AWGN.


__Operations_and_functions_of_normal_variables_

The_ probability_density,_
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_function, 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-normal_distribution, log-normally:_. *_The_absolute_value_of_X_has_folded_normal_distribution:_._If_\mu_=_0_this_is_known_as_the_half-normal_distribution. *_The_absolute_value_of_normalized_residuals,_, ''X''_−_''μ'', /''σ'',_has_chi_distribution_with_one_degree_of_freedom:_, X_-_\mu, _/_\sigma_\sim_\chi_1. *_The_square_of_''X''/''σ''_has_the_noncentral_chi-squared_distribution_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_distribution, chi-squared. *_The_log_likelihood_of_a_normal_variable_x_is_simply_the_log_of_its__probability_density_function:_\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_distribution, chi-squared_variable. *_The_distribution_of_the_variable_''X''_restricted_to_an_interval_[''a'',_''b'']_is_called_the_truncated_normal_distribution. *_(''X''_−_''μ'')−2_has_a__Lévy_distribution_with_location_0_and_scale_''σ''−2.


_=_Operations_on_two_independent_normal_variables_

= *_If_X_1_and_X_2_are_two_independence_(probability_theory), independent_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,sum_of_normally_distributed_random_variables, [proof]_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. *_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_distribution, stable_(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#Independent_central-normal_distributions, product_distribution_with_density_function_f_Z(z)_=_\pi^_K_0(, z, )_where_K_0_is_the_Macdonald_function, modified_Bessel_function_of_the_second_kind._This_distribution_is_symmetric_around_zero,_unbounded_at_z_=_0,_and_has_the__characteristic_function__\phi_Z(t)_=_(1_+_t^2)^. *_Their_ratio_follows_the_standard__Cauchy_distribution:_X_1/_X_2_\sim_\operatorname(0,_1). *_Their_Euclidean_norm_\sqrt_has_the_Rayleigh_distribution.


__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-squar ...
_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_is_independent_from_the_sample__standard_deviation,_which_can_be_demonstrated_using_Basu's_theorem_or_Cochran's_theorem._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 situ ...
_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_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_distribution, 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_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_(probability), infinite_divisibility. 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_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_...
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'',_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-squar ...
_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,_for_normal_distributions_the_sample_mean_\textstyle\hat\mu_and_the_sample_variance_''s''2_are_independence_(probability_theory), independent,_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 situ ...
_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_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_th_...
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,_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,_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_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_σ2,_the_conjugate_prior_distribution_is_also_normally_distributed. This_can_be_shown_more_easily_by_rewriting_the_variance_as_the__precision,_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_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_σ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;_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._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_(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._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 ques ...
._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_Φ−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_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_independence_(probability_theory), independent._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-squar ...
_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,_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].html"_;"title="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_functions__1F_1_and_U. :\begin ___\operatorname\left[X^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._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,_with_mean_0_and_standard_deviation_1/\sigma._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_ 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__...
_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_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__cumulants_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_(statistician),_Charles_Stein,_who_first_publ_...
_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_when_\sigma_=_0. However,_one_can_define_the_normal_distribution_with_zero_variance_as_a_ generalized_function;_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 argum ...
_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 ...
_with_ probability_density_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._A_function_with_two_ Lagrange_multipliers_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_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_statistics,_ scores,_and__estimators_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 ques ...
_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_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-squar ...
_\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 situ ...
_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 ser ...
s. This_theorem_can_also_be_used_to_justify_modeling_the_sum_of_many_uniform_noise_sources_as_ Gaussian_noise._See_ AWGN.


__Operations_and_functions_of_normal_variables_

The_ probability_density,_
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_function, 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-normal_distribution, log-normally:_. *_The_absolute_value_of_X_has_folded_normal_distribution:_._If_\mu_=_0_this_is_known_as_the_half-normal_distribution. *_The_absolute_value_of_normalized_residuals,_, ''X''_−_''μ'', /''σ'',_has_chi_distribution_with_one_degree_of_freedom:_, X_-_\mu, _/_\sigma_\sim_\chi_1. *_The_square_of_''X''/''σ''_has_the_noncentral_chi-squared_distribution_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_distribution, chi-squared. *_The_log_likelihood_of_a_normal_variable_x_is_simply_the_log_of_its__probability_density_function:_\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_distribution, chi-squared_variable. *_The_distribution_of_the_variable_''X''_restricted_to_an_interval_[''a'',_''b'']_is_called_the_truncated_normal_distribution. *_(''X''_−_''μ'')−2_has_a__Lévy_distribution_with_location_0_and_scale_''σ''−2.


_=_Operations_on_two_independent_normal_variables_

= *_If_X_1_and_X_2_are_two_independence_(probability_theory), independent_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,sum_of_normally_distributed_random_variables, [proof]_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. *_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_distribution, stable_(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#Independent_central-normal_distributions, product_distribution_with_density_function_f_Z(z)_=_\pi^_K_0(, z, )_where_K_0_is_the_Macdonald_function, modified_Bessel_function_of_the_second_kind._This_distribution_is_symmetric_around_zero,_unbounded_at_z_=_0,_and_has_the__characteristic_function__\phi_Z(t)_=_(1_+_t^2)^. *_Their_ratio_follows_the_standard__Cauchy_distribution:_X_1/_X_2_\sim_\operatorname(0,_1). *_Their_Euclidean_norm_\sqrt_has_the_Rayleigh_distribution.


__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-squar ...
_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_is_independent_from_the_sample__standard_deviation,_which_can_be_demonstrated_using_Basu's_theorem_or_Cochran's_theorem._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 situ ...
_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_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_distribution, 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_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_(probability), infinite_divisibility. 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_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_...
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'',_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-squar ...
_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,_for_normal_distributions_the_sample_mean_\textstyle\hat\mu_and_the_sample_variance_''s''2_are_independence_(probability_theory), independent,_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 situ ...
_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_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_th_...
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,_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,_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_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_σ2,_the_conjugate_prior_distribution_is_also_normally_distributed. This_can_be_shown_more_easily_by_rewriting_the_variance_as_the__precision,_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_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_σ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;_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._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_(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._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 ques ...
._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_Φ−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_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_independence_(probability_theory), independent._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-squar ...
_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,_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_functions__1F_1_and_U. :\begin ___\operatorname\left[X^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._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,_with_mean_0_and_standard_deviation_1/\sigma._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_ 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__...
_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_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__cumulants_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_(statistician),_Charles_Stein,_who_first_publ_...
_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_when_\sigma_=_0. However,_one_can_define_the_normal_distribution_with_zero_variance_as_a_ generalized_function;_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 argum ...
_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 ...
_with_ probability_density_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._A_function_with_two_ Lagrange_multipliers_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_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_statistics,_ scores,_and__estimators_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 ques ...
_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_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-squar ...
_\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 situ ...
_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 ser ...
s. This_theorem_can_also_be_used_to_justify_modeling_the_sum_of_many_uniform_noise_sources_as_ Gaussian_noise._See_ AWGN.


__Operations_and_functions_of_normal_variables_

The_ probability_density,_
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_function, 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-normal_distribution, log-normally:_. *_The_absolute_value_of_X_has_folded_normal_distribution:_._If_\mu_=_0_this_is_known_as_the_half-normal_distribution. *_The_absolute_value_of_normalized_residuals,_, ''X''_−_''μ'', /''σ'',_has_chi_distribution_with_one_degree_of_freedom:_, X_-_\mu, _/_\sigma_\sim_\chi_1. *_The_square_of_''X''/''σ''_has_the_noncentral_chi-squared_distribution_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_distribution, chi-squared. *_The_log_likelihood_of_a_normal_variable_x_is_simply_the_log_of_its__probability_density_function:_\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_distribution, chi-squared_variable. *_The_distribution_of_the_variable_''X''_restricted_to_an_interval_[''a'',_''b'']_is_called_the_truncated_normal_distribution. *_(''X''_−_''μ'')−2_has_a__Lévy_distribution_with_location_0_and_scale_''σ''−2.


_=_Operations_on_two_independent_normal_variables_

= *_If_X_1_and_X_2_are_two_independence_(probability_theory), independent_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,sum_of_normally_distributed_random_variables, [proof]_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. *_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_distribution, stable_(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#Independent_central-normal_distributions, product_distribution_with_density_function_f_Z(z)_=_\pi^_K_0(, z, )_where_K_0_is_the_Macdonald_function, modified_Bessel_function_of_the_second_kind._This_distribution_is_symmetric_around_zero,_unbounded_at_z_=_0,_and_has_the__characteristic_function__\phi_Z(t)_=_(1_+_t^2)^. *_Their_ratio_follows_the_standard__Cauchy_distribution:_X_1/_X_2_\sim_\operatorname(0,_1). *_Their_Euclidean_norm_\sqrt_has_the_Rayleigh_distribution.


__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-squar ...
_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_is_independent_from_the_sample__standard_deviation,_which_can_be_demonstrated_using_Basu's_theorem_or_Cochran's_theorem._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 situ ...
_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_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_distribution, 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_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_(probability), infinite_divisibility. 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_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_...
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'',_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-squar ...
_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,_for_normal_distributions_the_sample_mean_\textstyle\hat\mu_and_the_sample_variance_''s''2_are_independence_(probability_theory), independent,_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 situ ...
_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_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_th_...
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,_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,_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_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_σ2,_the_conjugate_prior_distribution_is_also_normally_distributed. This_can_be_shown_more_easily_by_rewriting_the_variance_as_the__precision,_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_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_σ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;_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._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_(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._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 ques ...
._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_Φ−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_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_independence_(probability_theory), independent._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-squar ...
_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,_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].html"_;"title="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._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,_with_mean_0_and_standard_deviation_1/\sigma._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_ 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__...
_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_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__cumulants_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_(statistician),_Charles_Stein,_who_first_publ_...
_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_when_\sigma_=_0. However,_one_can_define_the_normal_distribution_with_zero_variance_as_a_ generalized_function;_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 argum ...
_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 ...
_with_ probability_density_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._A_function_with_two_ Lagrange_multipliers_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_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_statistics,_ scores,_and__estimators_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 ques ...
_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_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-squar ...
_\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 situ ...
_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 ser ...
s. This_theorem_can_also_be_used_to_justify_modeling_the_sum_of_many_uniform_noise_sources_as_ Gaussian_noise._See_ AWGN.


__Operations_and_functions_of_normal_variables_

The_ probability_density,_
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_function, 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-normal_distribution, log-normally:_. *_The_absolute_value_of_X_has_folded_normal_distribution:_._If_\mu_=_0_this_is_known_as_the_half-normal_distribution. *_The_absolute_value_of_normalized_residuals,_, ''X''_−_''μ'', /''σ'',_has_chi_distribution_with_one_degree_of_freedom:_, X_-_\mu, _/_\sigma_\sim_\chi_1. *_The_square_of_''X''/''σ''_has_the_noncentral_chi-squared_distribution_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_distribution, chi-squared. *_The_log_likelihood_of_a_normal_variable_x_is_simply_the_log_of_its__probability_density_function:_\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_distribution, chi-squared_variable. *_The_distribution_of_the_variable_''X''_restricted_to_an_interval_[''a'',_''b'']_is_called_the_truncated_normal_distribution. *_(''X''_−_''μ'')−2_has_a__Lévy_distribution_with_location_0_and_scale_''σ''−2.


_=_Operations_on_two_independent_normal_variables_

= *_If_X_1_and_X_2_are_two_independence_(probability_theory), independent_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,sum_of_normally_distributed_random_variables, [proof]_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. *_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_distribution, stable_(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#Independent_central-normal_distributions, product_distribution_with_density_function_f_Z(z)_=_\pi^_K_0(, z, )_where_K_0_is_the_Macdonald_function, modified_Bessel_function_of_the_second_kind._This_distribution_is_symmetric_around_zero,_unbounded_at_z_=_0,_and_has_the__characteristic_function__\phi_Z(t)_=_(1_+_t^2)^. *_Their_ratio_follows_the_standard__Cauchy_distribution:_X_1/_X_2_\sim_\operatorname(0,_1). *_Their_Euclidean_norm_\sqrt_has_the_Rayleigh_distribution.


__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-squar ...
_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_is_independent_from_the_sample__standard_deviation,_which_can_be_demonstrated_using_Basu's_theorem_or_Cochran's_theorem._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 situ ...
_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_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_distribution, 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_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_(probability), infinite_divisibility. 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_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_...
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'',_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-squar ...
_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,_for_normal_distributions_the_sample_mean_\textstyle\hat\mu_and_the_sample_variance_''s''2_are_independence_(probability_theory), independent,_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 situ ...
_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_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_th_...
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,_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,_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_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_σ2,_the_conjugate_prior_distribution_is_also_normally_distributed. This_can_be_shown_more_easily_by_rewriting_the_variance_as_the__precision,_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_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_σ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;_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._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_(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._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 ques ...
._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_Φ−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_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_independence_(probability_theory), independent._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-squar ...
_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,_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].html"_;"title="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_functions__1F_1_and_U. :\begin ___\operatorname\left[X^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[X_\mid_a 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._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_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._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_standard_deviation_1/\sigma._In_particular,_the_standard_normal_distribution_\varphi_is_an_Fourier_transform#Eigenfunctions, 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_(probability_theory), characteristic_function_\varphi_X(t)_of_that_variable,_which_is_defined_as_the_expected_value_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_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[e^]_=_\hat_f(it)_=_e^_e^ 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 Since_this_is_a_quadratic_polynomial_in_t,_only_the_first_two__cumulants_are_nonzero,_namely_the_mean \mu_and_the_variance \sigma^2.


__Stein_operator_and_class_

Within_Stein's_method_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_when_\sigma_=_0. However,_one_can_define_the_normal_distribution_with_zero_variance_as_a_ generalized_function;_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 argum ...
_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 ...
_with_ probability_density_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._A_function_with_two_ Lagrange_multipliers_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_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_statistics,_ scores,_and__estimators_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 ques ...
_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_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-squar ...
_\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 situ ...
_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 ser ...
s. This_theorem_can_also_be_used_to_justify_modeling_the_sum_of_many_uniform_noise_sources_as_ Gaussian_noise._See_ AWGN.


__Operations_and_functions_of_normal_variables_

The_ probability_density,_
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_function, 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-normal_distribution, log-normally:_. *_The_absolute_value_of_X_has_folded_normal_distribution:_._If_\mu_=_0_this_is_known_as_the_half-normal_distribution. *_The_absolute_value_of_normalized_residuals,_, ''X''_−_''μ'', /''σ'',_has_chi_distribution_with_one_degree_of_freedom:_, X_-_\mu, _/_\sigma_\sim_\chi_1. *_The_square_of_''X''/''σ''_has_the_noncentral_chi-squared_distribution_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_distribution, chi-squared. *_The_log_likelihood_of_a_normal_variable_x_is_simply_the_log_of_its__probability_density_function:_\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_distribution, chi-squared_variable. *_The_distribution_of_the_variable_''X''_restricted_to_an_interval_[''a'',_''b'']_is_called_the_truncated_normal_distribution. *_(''X''_−_''μ'')−2_has_a__Lévy_distribution_with_location_0_and_scale_''σ''−2.


_=_Operations_on_two_independent_normal_variables_

= *_If_X_1_and_X_2_are_two_independence_(probability_theory), independent_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,sum_of_normally_distributed_random_variables, [proof]_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. *_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_distribution, stable_(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#Independent_central-normal_distributions, product_distribution_with_density_function_f_Z(z)_=_\pi^_K_0(, z, )_where_K_0_is_the_Macdonald_function, modified_Bessel_function_of_the_second_kind._This_distribution_is_symmetric_around_zero,_unbounded_at_z_=_0,_and_has_the_characteristic_function_(probability_theory), characteristic_function__\phi_Z(t)_=_(1_+_t^2)^. *_Their_ratio_follows_the_standard__Cauchy_distribution:_X_1/_X_2_\sim_\operatorname(0,_1). *_Their_Euclidean_norm_\sqrt_has_the_Rayleigh_distribution.


__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-squar ...
_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_is_independent_from_the_sample__standard_deviation,_which_can_be_demonstrated_using_Basu's_theorem_or_Cochran's_theorem._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 situ ...
_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_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_distribution, 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_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_(probability), infinite_divisibility. 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_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_...
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'',_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-squar ...
_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,_for_normal_distributions_the_sample_mean_\textstyle\hat\mu_and_the_sample_variance_''s''2_are_independence_(probability_theory), independent,_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 situ ...
_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_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_th_...
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,_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,_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_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_σ2,_the_conjugate_prior_distribution_is_also_normally_distributed. This_can_be_shown_more_easily_by_rewriting_the_variance_as_the__precision,_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_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_σ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;_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._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_(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._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 ques ...
._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_Φ−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_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_independence_(probability_theory), independent._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-squar ...
_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,_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_functions__1F_1_and_U. :\begin ___\operatorname\left[X^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[X_\mid_a 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._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_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._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_standard_deviation_1/\sigma._In_particular,_the_standard_normal_distribution_\varphi_is_an_Fourier_transform#Eigenfunctions, 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_(probability_theory), characteristic_function_\varphi_X(t)_of_that_variable,_which_is_defined_as_the_expected_value_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_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[e^]_=_\hat_f(it)_=_e^_e^ 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 Since_this_is_a_quadratic_polynomial_in_t,_only_the_first_two__cumulants_are_nonzero,_namely_the_mean \mu_and_the_variance \sigma^2.


__Stein_operator_and_class_

Within_Stein's_method_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_when_\sigma_=_0. However,_one_can_define_the_normal_distribution_with_zero_variance_as_a_ generalized_function;_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 argum ...
_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 ...
_with_ probability_density_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._A_function_with_two_ Lagrange_multipliers_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_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_statistics,_ scores,_and__estimators_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 ques ...
_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_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-squar ...
_\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 situ ...
_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 ser ...
s. This_theorem_can_also_be_used_to_justify_modeling_the_sum_of_many_uniform_noise_sources_as_ Gaussian_noise._See_ AWGN.


__Operations_and_functions_of_normal_variables_

The_ probability_density,_
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_function, 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-normal_distribution, log-normally:_. *_The_absolute_value_of_X_has_folded_normal_distribution:_._If_\mu_=_0_this_is_known_as_the_half-normal_distribution. *_The_absolute_value_of_normalized_residuals,_, ''X''_−_''μ'', /''σ'',_has_chi_distribution_with_one_degree_of_freedom:_, X_-_\mu, _/_\sigma_\sim_\chi_1. *_The_square_of_''X''/''σ''_has_the_noncentral_chi-squared_distribution_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_distribution, chi-squared. *_The_log_likelihood_of_a_normal_variable_x_is_simply_the_log_of_its__probability_density_function:_\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_distribution, chi-squared_variable. *_The_distribution_of_the_variable_''X''_restricted_to_an_interval_[''a'',_''b'']_is_called_the_truncated_normal_distribution. *_(''X''_−_''μ'')−2_has_a__Lévy_distribution_with_location_0_and_scale_''σ''−2.


_=_Operations_on_two_independent_normal_variables_

= *_If_X_1_and_X_2_are_two_independence_(probability_theory), independent_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,sum_of_normally_distributed_random_variables, [proof]_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. *_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_distribution, stable_(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#Independent_central-normal_distributions, product_distribution_with_density_function_f_Z(z)_=_\pi^_K_0(, z, )_where_K_0_is_the_Macdonald_function, modified_Bessel_function_of_the_second_kind._This_distribution_is_symmetric_around_zero,_unbounded_at_z_=_0,_and_has_the_characteristic_function_(probability_theory), characteristic_function__\phi_Z(t)_=_(1_+_t^2)^. *_Their_ratio_follows_the_standard__Cauchy_distribution:_X_1/_X_2_\sim_\operatorname(0,_1). *_Their_Euclidean_norm_\sqrt_has_the_Rayleigh_distribution.


__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-squar ...
_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_is_independent_from_the_sample__standard_deviation,_which_can_be_demonstrated_using_Basu's_theorem_or_Cochran's_theorem._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 situ ...
_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_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_distribution, 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_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_(probability), infinite_divisibility. 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_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_...
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'',_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-squar ...
_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,_for_normal_distributions_the_sample_mean_\textstyle\hat\mu_and_the_sample_variance_''s''2_are_independence_(probability_theory), independent,_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 situ ...
_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_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_th_...
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,_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,_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_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_σ2,_the_conjugate_prior_distribution_is_also_normally_distributed. This_can_be_shown_more_easily_by_rewriting_the_variance_as_the__precision,_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_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_σ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;_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._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_(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._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 ques ...
._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_Φ−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_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_independence_(probability_theory), independent._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-squar ...
_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,_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._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,_with_mean_0_and_standard_deviation_1/\sigma._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_ 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__...
_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_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__cumulants_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_(statistician),_Charles_Stein,_who_first_publ_...
_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_when_\sigma_=_0. However,_one_can_define_the_normal_distribution_with_zero_variance_as_a_ generalized_function;_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 argum ...
_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 ...
_with_ probability_density_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._A_function_with_two_ Lagrange_multipliers_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_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_statistics,_ scores,_and__estimators_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 ques ...
_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_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-squar ...
_\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 situ ...
_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 ser ...
s. This_theorem_can_also_be_used_to_justify_modeling_the_sum_of_many_uniform_noise_sources_as_ Gaussian_noise._See_ AWGN.


__Operations_and_functions_of_normal_variables_

The_ probability_density,_
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_function, 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-normal_distribution, log-normally:_. *_The_absolute_value_of_X_has_folded_normal_distribution:_._If_\mu_=_0_this_is_known_as_the_half-normal_distribution. *_The_absolute_value_of_normalized_residuals,_, ''X''_−_''μ'', /''σ'',_has_chi_distribution_with_one_degree_of_freedom:_, X_-_\mu, _/_\sigma_\sim_\chi_1. *_The_square_of_''X''/''σ''_has_the_noncentral_chi-squared_distribution_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_distribution, chi-squared. *_The_log_likelihood_of_a_normal_variable_x_is_simply_the_log_of_its__probability_density_function:_\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_distribution, chi-squared_variable. *_The_distribution_of_the_variable_''X''_restricted_to_an_interval_[''a'',_''b'']_is_called_the_truncated_normal_distribution. *_(''X''_−_''μ'')−2_has_a__Lévy_distribution_with_location_0_and_scale_''σ''−2.


_=_Operations_on_two_independent_normal_variables_

= *_If_X_1_and_X_2_are_two_independence_(probability_theory), independent_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,sum_of_normally_distributed_random_variables, [proof]_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. *_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_distribution, stable_(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#Independent_central-normal_distributions, product_distribution_with_density_function_f_Z(z)_=_\pi^_K_0(, z, )_where_K_0_is_the_Macdonald_function, modified_Bessel_function_of_the_second_kind._This_distribution_is_symmetric_around_zero,_unbounded_at_z_=_0,_and_has_the__characteristic_function__\phi_Z(t)_=_(1_+_t^2)^. *_Their_ratio_follows_the_standard__Cauchy_distribution:_X_1/_X_2_\sim_\operatorname(0,_1). *_Their_Euclidean_norm_\sqrt_has_the_Rayleigh_distribution.


__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-squar ...
_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_is_independent_from_the_sample__standard_deviation,_which_can_be_demonstrated_using_Basu's_theorem_or_Cochran's_theorem._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 situ ...
_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_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_distribution, 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_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_(probability), infinite_divisibility. 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_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_...
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'',_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-squar ...
_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,_for_normal_distributions_the_sample_mean_\textstyle\hat\mu_and_the_sample_variance_''s''2_are_independence_(probability_theory), independent,_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 situ ...
_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_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_th_...
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,_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,_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_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_σ2,_the_conjugate_prior_distribution_is_also_normally_distributed. This_can_be_shown_more_easily_by_rewriting_the_variance_as_the__precision,_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_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_σ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;_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._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_(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._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 ques ...
._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_Φ−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_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_independence_(probability_theory), independent._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-squar ...
_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,_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].html"_;"title="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_functions__1F_1_and_U. :\begin ___\operatorname\left[X^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[X_\mid_a 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._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_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._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_standard_deviation_1/\sigma._In_particular,_the_standard_normal_distribution_\varphi_is_an_Fourier_transform#Eigenfunctions, 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_(probability_theory), characteristic_function_\varphi_X(t)_of_that_variable,_which_is_defined_as_the_expected_value_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_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[e^]_=_\hat_f(it)_=_e^_e^ 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 Since_this_is_a_quadratic_polynomial_in_t,_only_the_first_two__cumulants_are_nonzero,_namely_the_mean \mu_and_the_variance \sigma^2.


__Stein_operator_and_class_

Within_Stein's_method_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_when_\sigma_=_0. However,_one_can_define_the_normal_distribution_with_zero_variance_as_a_ generalized_function;_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 argum ...
_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 ...
_with_ probability_density_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._A_function_with_two_ Lagrange_multipliers_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_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_statistics,_ scores,_and__estimators_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 ques ...
_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_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-squar ...
_\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 situ ...
_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 ser ...
s. This_theorem_can_also_be_used_to_justify_modeling_the_sum_of_many_uniform_noise_sources_as_ Gaussian_noise._See_ AWGN.


__Operations_and_functions_of_normal_variables_

The_ probability_density,_
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_function, 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-normal_distribution, log-normally:_. *_The_absolute_value_of_X_has_folded_normal_distribution:_._If_\mu_=_0_this_is_known_as_the_half-normal_distribution. *_The_absolute_value_of_normalized_residuals,_, ''X''_−_''μ'', /''σ'',_has_chi_distribution_with_one_degree_of_freedom:_, X_-_\mu, _/_\sigma_\sim_\chi_1. *_The_square_of_''X''/''σ''_has_the_noncentral_chi-squared_distribution_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_distribution, chi-squared. *_The_log_likelihood_of_a_normal_variable_x_is_simply_the_log_of_its__probability_density_function:_\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_distribution, chi-squared_variable. *_The_distribution_of_the_variable_''X''_restricted_to_an_interval_[''a'',_''b'']_is_called_the_truncated_normal_distribution. *_(''X''_−_''μ'')−2_has_a__Lévy_distribution_with_location_0_and_scale_''σ''−2.


_=_Operations_on_two_independent_normal_variables_

= *_If_X_1_and_X_2_are_two_independence_(probability_theory), independent_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,sum_of_normally_distributed_random_variables, [proof]_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. *_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_distribution, stable_(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#Independent_central-normal_distributions, product_distribution_with_density_function_f_Z(z)_=_\pi^_K_0(, z, )_where_K_0_is_the_Macdonald_function, modified_Bessel_function_of_the_second_kind._This_distribution_is_symmetric_around_zero,_unbounded_at_z_=_0,_and_has_the_characteristic_function_(probability_theory), characteristic_function__\phi_Z(t)_=_(1_+_t^2)^. *_Their_ratio_follows_the_standard__Cauchy_distribution:_X_1/_X_2_\sim_\operatorname(0,_1). *_Their_Euclidean_norm_\sqrt_has_the_Rayleigh_distribution.


__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-squar ...
_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_is_independent_from_the_sample__standard_deviation,_which_can_be_demonstrated_using_Basu's_theorem_or_Cochran's_theorem._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 situ ...
_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_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_distribution, 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_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_(probability), infinite_divisibility. 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_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_...
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'',_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-squar ...
_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,_for_normal_distributions_the_sample_mean_\textstyle\hat\mu_and_the_sample_variance_''s''2_are_independence_(probability_theory), independent,_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 situ ...
_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_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_th_...
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,_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,_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_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_σ2,_the_conjugate_prior_distribution_is_also_normally_distributed. This_can_be_shown_more_easily_by_rewriting_the_variance_as_the__precision,_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_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_σ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;_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._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_(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._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 ques ...
._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_Φ−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_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_independence_(probability_theory), independent._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-squar ...
_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,_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_functions__1F_1_and_U. :\begin ___\operatorname\left[X^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[X_\mid_a 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._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_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._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_standard_deviation_1/\sigma._In_particular,_the_standard_normal_distribution_\varphi_is_an_Fourier_transform#Eigenfunctions, 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_(probability_theory), characteristic_function_\varphi_X(t)_of_that_variable,_which_is_defined_as_the_expected_value_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_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[e^]_=_\hat_f(it)_=_e^_e^ 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 Since_this_is_a_quadratic_polynomial_in_t,_only_the_first_two__cumulants_are_nonzero,_namely_the_mean \mu_and_the_variance \sigma^2.


__Stein_operator_and_class_

Within_Stein's_method_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_when_\sigma_=_0. However,_one_can_define_the_normal_distribution_with_zero_variance_as_a_ generalized_function;_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 argum ...
_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 ...
_with_ probability_density_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._A_function_with_two_ Lagrange_multipliers_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_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_statistics,_ scores,_and__estimators_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 ques ...
_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_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-squar ...
_\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 situ ...
_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 ser ...
s. This_theorem_can_also_be_used_to_justify_modeling_the_sum_of_many_uniform_noise_sources_as_ Gaussian_noise._See_ AWGN.


__Operations_and_functions_of_normal_variables_

The_ probability_density,_
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_function, 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-normal_distribution, log-normally:_. *_The_absolute_value_of_X_has_folded_normal_distribution:_._If_\mu_=_0_this_is_known_as_the_half-normal_distribution. *_The_absolute_value_of_normalized_residuals,_, ''X''_−_''μ'', /''σ'',_has_chi_distribution_with_one_degree_of_freedom:_, X_-_\mu, _/_\sigma_\sim_\chi_1. *_The_square_of_''X''/''σ''_has_the_noncentral_chi-squared_distribution_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_distribution, chi-squared. *_The_log_likelihood_of_a_normal_variable_x_is_simply_the_log_of_its__probability_density_function:_\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_distribution, chi-squared_variable. *_The_distribution_of_the_variable_''X''_restricted_to_an_interval_[''a'',_''b'']_is_called_the_truncated_normal_distribution. *_(''X''_−_''μ'')−2_has_a__Lévy_distribution_with_location_0_and_scale_''σ''−2.


_=_Operations_on_two_independent_normal_variables_

= *_If_X_1_and_X_2_are_two_independence_(probability_theory), independent_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,sum_of_normally_distributed_random_variables, [proof]_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. *_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_distribution, stable_(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#Independent_central-normal_distributions, product_distribution_with_density_function_f_Z(z)_=_\pi^_K_0(, z, )_where_K_0_is_the_Macdonald_function, modified_Bessel_function_of_the_second_kind._This_distribution_is_symmetric_around_zero,_unbounded_at_z_=_0,_and_has_the_characteristic_function_(probability_theory), characteristic_function__\phi_Z(t)_=_(1_+_t^2)^. *_Their_ratio_follows_the_standard__Cauchy_distribution:_X_1/_X_2_\sim_\operatorname(0,_1). *_Their_Euclidean_norm_\sqrt_has_the_Rayleigh_distribution.


__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-squar ...
_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_is_independent_from_the_sample__standard_deviation,_which_can_be_demonstrated_using_Basu's_theorem_or_Cochran's_theorem._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 situ ...
_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_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_distribution, 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_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_(probability), infinite_divisibility. 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_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_...
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'',_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-squar ...
_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,_for_normal_distributions_the_sample_mean_\textstyle\hat\mu_and_the_sample_variance_''s''2_are_independence_(probability_theory), independent,_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 situ ...
_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_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_th_...
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,_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,_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_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_σ2,_the_conjugate_prior_distribution_is_also_normally_distributed. This_can_be_shown_more_easily_by_rewriting_the_variance_as_the__precision,_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_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_σ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;_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._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_(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._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 ques ...
._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_Φ−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_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_independence_(probability_theory), independent._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-squar ...
_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,_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].html" ;"title="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_when_\sigma_=_0. However,_one_can_define_the_normal_distribution_with_zero_variance_as_a_ generalized_function;_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 argum ...
_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 ...
_with_ probability_density_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._A_function_with_two_ Lagrange_multipliers_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_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_statistics,_ scores,_and__estimators_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 ques ...
_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_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-squar ...
_\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 situ ...
_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 ser ...
s. This_theorem_can_also_be_used_to_justify_modeling_the_sum_of_many_uniform_noise_sources_as_ Gaussian_noise._See_ AWGN.


__Operations_and_functions_of_normal_variables_

The_ probability_density,_
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_function, 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-normal_distribution, log-normally:_. *_The_absolute_value_of_X_has_folded_normal_distribution:_._If_\mu_=_0_this_is_known_as_the_half-normal_distribution. *_The_absolute_value_of_normalized_residuals,_, ''X''_−_''μ'', /''σ'',_has_chi_distribution_with_one_degree_of_freedom:_, X_-_\mu, _/_\sigma_\sim_\chi_1. *_The_square_of_''X''/''σ''_has_the_noncentral_chi-squared_distribution_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_distribution, chi-squared. *_The_log_likelihood_of_a_normal_variable_x_is_simply_the_log_of_its__probability_density_function:_\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_distribution, chi-squared_variable. *_The_distribution_of_the_variable_''X''_restricted_to_an_interval_[''a'',_''b'']_is_called_the_truncated_normal_distribution. *_(''X''_−_''μ'')−2_has_a__Lévy_distribution_with_location_0_and_scale_''σ''−2.


_=_Operations_on_two_independent_normal_variables_

= *_If_X_1_and_X_2_are_two_independence_(probability_theory), independent_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,sum_of_normally_distributed_random_variables, [proof]_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. *_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_distribution, stable_(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#Independent_central-normal_distributions, product_distribution_with_density_function_f_Z(z)_=_\pi^_K_0(, z, )_where_K_0_is_the_Macdonald_function, modified_Bessel_function_of_the_second_kind._This_distribution_is_symmetric_around_zero,_unbounded_at_z_=_0,_and_has_the_ characteristic_function__\phi_Z(t)_=_(1_+_t^2)^. *_Their_ratio_follows_the_standard__Cauchy_distribution:_X_1/_X_2_\sim_\operatorname(0,_1). *_Their_Euclidean_norm_\sqrt_has_the_Rayleigh_distribution.


__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-squar ...
_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_is_independent_from_the_sample__standard_deviation,_which_can_be_demonstrated_using_Basu's_theorem_or_Cochran's_theorem._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 situ ...
_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_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_distribution, 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_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_(probability), infinite_divisibility. 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_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_...
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'',_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-squar ...
_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,_for_normal_distributions_the_sample_mean_\textstyle\hat\mu_and_the_sample_variance_''s''2_are_independence_(probability_theory), independent,_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 situ ...
_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_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_th_...
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,_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,_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_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_σ2,_the_conjugate_prior_distribution_is_also_normally_distributed. This_can_be_shown_more_easily_by_rewriting_the_variance_as_the__precision,_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_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_σ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;_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._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_(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._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 ques ...
._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_Φ−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_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_independence_(probability_theory), independent._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-squar ...
_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,_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].html"_;"title="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_functions__1F_1_and_U. :\begin ___\operatorname\left[X^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._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,_with_mean_0_and_standard_deviation_1/\sigma._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 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 ...
_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_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__cumulants_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 (statistician), Charles Stein, who first publ ...
_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_when_\sigma_=_0. However,_one_can_define_the_normal_distribution_with_zero_variance_as_a_ generalized_function;_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 argum ...
_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 ...
_with_ probability_density_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._A_function_with_two_ Lagrange_multipliers_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_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_statistics,_ scores,_and__estimators_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 ques ...
_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_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-squar ...
_\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 situ ...
_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 ser ...
s. This_theorem_can_also_be_used_to_justify_modeling_the_sum_of_many_uniform_noise_sources_as_ Gaussian_noise._See_ AWGN.


__Operations_and_functions_of_normal_variables_

The_ probability_density,_
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_function, 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-normal_distribution, log-normally:_. *_The_absolute_value_of_X_has_folded_normal_distribution:_._If_\mu_=_0_this_is_known_as_the_half-normal_distribution. *_The_absolute_value_of_normalized_residuals,_, ''X''_−_''μ'', /''σ'',_has_chi_distribution_with_one_degree_of_freedom:_, X_-_\mu, _/_\sigma_\sim_\chi_1. *_The_square_of_''X''/''σ''_has_the_noncentral_chi-squared_distribution_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_distribution, chi-squared. *_The_log_likelihood_of_a_normal_variable_x_is_simply_the_log_of_its__probability_density_function:_\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_distribution, chi-squared_variable. *_The_distribution_of_the_variable_''X''_restricted_to_an_interval_[''a'',_''b'']_is_called_the_truncated_normal_distribution. *_(''X''_−_''μ'')−2_has_a__Lévy_distribution_with_location_0_and_scale_''σ''−2.


_=_Operations_on_two_independent_normal_variables_

= *_If_X_1_and_X_2_are_two_independence_(probability_theory), independent_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,sum_of_normally_distributed_random_variables, [proof]_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. *_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_distribution, stable_(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#Independent_central-normal_distributions, product_distribution_with_density_function_f_Z(z)_=_\pi^_K_0(, z, )_where_K_0_is_the_Macdonald_function, modified_Bessel_function_of_the_second_kind._This_distribution_is_symmetric_around_zero,_unbounded_at_z_=_0,_and_has_the_ characteristic_function__\phi_Z(t)_=_(1_+_t^2)^. *_Their_ratio_follows_the_standard__Cauchy_distribution:_X_1/_X_2_\sim_\operatorname(0,_1). *_Their_Euclidean_norm_\sqrt_has_the_Rayleigh_distribution.


__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-squar ...
_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_is_independent_from_the_sample__standard_deviation,_which_can_be_demonstrated_using_Basu's_theorem_or_Cochran's_theorem._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 situ ...
_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_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_distribution, 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_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_(probability), infinite_divisibility. 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_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_...
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'',_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-squar ...
_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,_for_normal_distributions_the_sample_mean_\textstyle\hat\mu_and_the_sample_variance_''s''2_are_independence_(probability_theory), independent,_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 situ ...
_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_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_th_...
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,_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,_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_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_σ2,_the_conjugate_prior_distribution_is_also_normally_distributed. This_can_be_shown_more_easily_by_rewriting_the_variance_as_the__precision,_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_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_σ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;_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._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_(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._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 ques ...
._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_Φ−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_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_independence_(probability_theory), independent._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-squar ...
_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,_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_functions__1F_1_and_U. :\begin ___\operatorname\left[X^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._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,_with_mean_0_and_standard_deviation_1/\sigma._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 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 ...
_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_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__cumulants_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 (statistician), Charles Stein, who first publ ...
_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_when_\sigma_=_0. However,_one_can_define_the_normal_distribution_with_zero_variance_as_a_ generalized_function;_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 argum ...
_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 ...
_with_ probability_density_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._A_function_with_two_ Lagrange_multipliers_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_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_statistics,_ scores,_and__estimators_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 ques ...
_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_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-squar ...
_\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 situ ...
_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 ser ...
s. This_theorem_can_also_be_used_to_justify_modeling_the_sum_of_many_uniform_noise_sources_as_ Gaussian_noise._See_ AWGN.


__Operations_and_functions_of_normal_variables_

The_ probability_density,_
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_function, 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-normal_distribution, log-normally:_. *_The_absolute_value_of_X_has_folded_normal_distribution:_._If_\mu_=_0_this_is_known_as_the_half-normal_distribution. *_The_absolute_value_of_normalized_residuals,_, ''X''_−_''μ'', /''σ'',_has_chi_distribution_with_one_degree_of_freedom:_, X_-_\mu, _/_\sigma_\sim_\chi_1. *_The_square_of_''X''/''σ''_has_the_noncentral_chi-squared_distribution_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_distribution, chi-squared. *_The_log_likelihood_of_a_normal_variable_x_is_simply_the_log_of_its__probability_density_function:_\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_distribution, chi-squared_variable. *_The_distribution_of_the_variable_''X''_restricted_to_an_interval_[''a'',_''b'']_is_called_the_truncated_normal_distribution. *_(''X''_−_''μ'')−2_has_a__Lévy_distribution_with_location_0_and_scale_''σ''−2.


_=_Operations_on_two_independent_normal_variables_

= *_If_X_1_and_X_2_are_two_independence_(probability_theory), independent_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,sum_of_normally_distributed_random_variables, [proof]_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. *_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_distribution, stable_(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#Independent_central-normal_distributions, product_distribution_with_density_function_f_Z(z)_=_\pi^_K_0(, z, )_where_K_0_is_the_Macdonald_function, modified_Bessel_function_of_the_second_kind._This_distribution_is_symmetric_around_zero,_unbounded_at_z_=_0,_and_has_the_ characteristic_function__\phi_Z(t)_=_(1_+_t^2)^. *_Their_ratio_follows_the_standard__Cauchy_distribution:_X_1/_X_2_\sim_\operatorname(0,_1). *_Their_Euclidean_norm_\sqrt_has_the_Rayleigh_distribution.


__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-squar ...
_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_is_independent_from_the_sample__standard_deviation,_which_can_be_demonstrated_using_Basu's_theorem_or_Cochran's_theorem._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 situ ...
_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_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_distribution, 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_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_(probability), infinite_divisibility. 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_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_...
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'',_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-squar ...
_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,_for_normal_distributions_the_sample_mean_\textstyle\hat\mu_and_the_sample_variance_''s''2_are_independence_(probability_theory), independent,_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 situ ...
_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_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_th_...
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,_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,_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_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_σ2,_the_conjugate_prior_distribution_is_also_normally_distributed. This_can_be_shown_more_easily_by_rewriting_the_variance_as_the__precision,_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_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_σ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;_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._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_(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._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 ques ...
._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_Φ−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_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_independence_(probability_theory), independent._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-squar ...
_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,_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].html" ;"title="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._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,_with_mean_0_and_standard_deviation_1/\sigma._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 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 ...
_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_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__cumulants_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 (statistician), Charles Stein, who first publ ...
_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_when_\sigma_=_0. However,_one_can_define_the_normal_distribution_with_zero_variance_as_a_ generalized_function;_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 argum ...
_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 ...
_with_ probability_density_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._A_function_with_two_ Lagrange_multipliers_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_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_statistics,_ scores,_and__estimators_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 ques ...
_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_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-squar ...
_\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 situ ...
_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 ser ...
s. This_theorem_can_also_be_used_to_justify_modeling_the_sum_of_many_uniform_noise_sources_as_ Gaussian_noise._See_ AWGN.


__Operations_and_functions_of_normal_variables_

The_ probability_density,_
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_function, 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-normal_distribution, log-normally:_. *_The_absolute_value_of_X_has_folded_normal_distribution:_._If_\mu_=_0_this_is_known_as_the_half-normal_distribution. *_The_absolute_value_of_normalized_residuals,_, ''X''_−_''μ'', /''σ'',_has_chi_distribution_with_one_degree_of_freedom:_, X_-_\mu, _/_\sigma_\sim_\chi_1. *_The_square_of_''X''/''σ''_has_the_noncentral_chi-squared_distribution_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_distribution, chi-squared. *_The_log_likelihood_of_a_normal_variable_x_is_simply_the_log_of_its__probability_density_function:_\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_distribution, chi-squared_variable. *_The_distribution_of_the_variable_''X''_restricted_to_an_interval_[''a'',_''b'']_is_called_the_truncated_normal_distribution. *_(''X''_−_''μ'')−2_has_a__Lévy_distribution_with_location_0_and_scale_''σ''−2.


_=_Operations_on_two_independent_normal_variables_

= *_If_X_1_and_X_2_are_two_independence_(probability_theory), independent_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,sum_of_normally_distributed_random_variables, [proof]_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. *_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_distribution, stable_(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#Independent_central-normal_distributions, product_distribution_with_density_function_f_Z(z)_=_\pi^_K_0(, z, )_where_K_0_is_the_Macdonald_function, modified_Bessel_function_of_the_second_kind._This_distribution_is_symmetric_around_zero,_unbounded_at_z_=_0,_and_has_the_ characteristic_function__\phi_Z(t)_=_(1_+_t^2)^. *_Their_ratio_follows_the_standard__Cauchy_distribution:_X_1/_X_2_\sim_\operatorname(0,_1). *_Their_Euclidean_norm_\sqrt_has_the_Rayleigh_distribution.


__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-squar ...
_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_is_independent_from_the_sample__standard_deviation,_which_can_be_demonstrated_using_Basu's_theorem_or_Cochran's_theorem._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 situ ...
_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_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_distribution, 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_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_(probability), infinite_divisibility. 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_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_...
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'',_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-squar ...
_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,_for_normal_distributions_the_sample_mean_\textstyle\hat\mu_and_the_sample_variance_''s''2_are_independence_(probability_theory), independent,_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 situ ...
_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_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_th_...
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,_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,_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_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_σ2,_the_conjugate_prior_distribution_is_also_normally_distributed. This_can_be_shown_more_easily_by_rewriting_the_variance_as_the__precision,_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_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_σ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;_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._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_(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._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 ques ...
._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_Φ−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_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_independence_(probability_theory), independent._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-squar ...
_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,_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].html" ;"title="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 functions _1F_1 and U. :\begin \operatorname\left[X^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[X \mid a 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. 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 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. 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 standard deviation 1/\sigma. In particular, the standard normal distribution \varphi is an Fourier transform#Eigenfunctions, 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 (probability theory), characteristic function \varphi_X(t) of that variable, which is defined as the expected value 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 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[e^] = \hat f(it) = e^ e^ 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 Since this is a quadratic polynomial in t, only the first two cumulants are nonzero, namely the mean \mu and the variance \sigma^2.


Stein operator and class

Within Stein's method 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 (mathematics), function when \sigma = 0. However, one can define the normal distribution with zero variance as a generalized function; specifically, as Dirac delta function, 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 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 probability distribution, maximum entropy. If X is a continuous random variable with probability density function, probability density 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. A function with two Lagrange multipliers 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 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 statistics, score (statistics), scores, and estimators 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 function (statistics), 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 B(n,p) is De Moivre–Laplace theorem, 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 with parameter \lambda is approximately normal with mean \lambda and variance \lambda, for large values of \lambda. * The chi-squared distribution \chi^2(k) is approximately normal with mean k and variance 2k, for large k. * The Student's t-distribution 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, improvements of the approximation are given by the Edgeworth expansions. This theorem can also be used to justify modeling the sum of many uniform noise sources as Gaussian noise. See AWGN.


Operations and functions of normal variables

The probability density function, probability density, cumulative distribution function, cumulative distribution, and inverse cumulative distribution function, 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-normal distribution, log-normally: . * The absolute value of X has folded normal distribution: . If \mu = 0 this is known as the half-normal distribution. * The absolute value of normalized residuals, , ''X'' − ''μ'', /''σ'', has chi distribution with one degree of freedom: , X - \mu, / \sigma \sim \chi_1. * The square of ''X''/''σ'' has the noncentral chi-squared distribution 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 distribution, chi-squared. * The log likelihood of a normal variable x is simply the log of its probability density function: \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 distribution, chi-squared variable. * The distribution of the variable ''X'' restricted to an interval [''a'', ''b''] is called the truncated normal distribution. * (''X'' − ''μ'')−2 has a Lévy distribution with location 0 and scale ''σ''−2.


= Operations on two independent normal variables

= * If X_1 and X_2 are two independence (probability theory), independent 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,sum of normally distributed random variables, [proof] 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. * 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 distribution, stable (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#Independent central-normal distributions, product distribution with density function f_Z(z) = \pi^ K_0(, z, ) where K_0 is the Macdonald function, modified Bessel function of the second kind. This distribution is symmetric around zero, unbounded at z = 0, and has the characteristic function (probability theory), characteristic function \phi_Z(t) = (1 + t^2)^. * Their ratio follows the standard Cauchy distribution: X_1/ X_2 \sim \operatorname(0, 1). * Their Euclidean norm \sqrt has the Rayleigh distribution.


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 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 is independent from the sample standard deviation, which can be demonstrated using Basu's theorem or Cochran's theorem. The ratio of these two quantities will have the Student's t-distribution 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 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 distribution, 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 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 (probability), infinite divisibility. 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 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 ...
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'', 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 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, for normal distributions the sample mean \textstyle\hat\mu and the sample variance ''s''2 are independence (probability theory), independent, 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 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 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 th ...
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, 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, 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 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 σ2, the conjugate prior distribution is also normally distributed. This can be shown more easily by rewriting the variance as the precision, 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 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 σ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; 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. 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 (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. 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. 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 Φ−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 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 independence (probability theory), independent. This formulation arises because for a bivariate normal random vector (''X'', ''Y'') the squared norm will have the chi-squared distribution 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, 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 functions _1F_1 and U. :\begin \operatorname\left[X^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[X \mid a 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. 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 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. 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 standard deviation 1/\sigma. In particular, the standard normal distribution \varphi is an Fourier transform#Eigenfunctions, 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 (probability theory), characteristic function \varphi_X(t) of that variable, which is defined as the expected value 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 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[e^] = \hat f(it) = e^ e^ 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 Since this is a quadratic polynomial in t, only the first two cumulants are nonzero, namely the mean \mu and the variance \sigma^2.


Stein operator and class

Within Stein's method 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 (mathematics), function when \sigma = 0. However, one can define the normal distribution with zero variance as a generalized function; specifically, as Dirac delta function, 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 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 probability distribution, maximum entropy. If X is a continuous random variable with probability density function, probability density 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. A function with two Lagrange multipliers 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 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 statistics, score (statistics), scores, and estimators 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 function (statistics), 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 B(n,p) is De Moivre–Laplace theorem, 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 with parameter \lambda is approximately normal with mean \lambda and variance \lambda, for large values of \lambda. * The chi-squared distribution \chi^2(k) is approximately normal with mean k and variance 2k, for large k. * The Student's t-distribution 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, improvements of the approximation are given by the Edgeworth expansions. This theorem can also be used to justify modeling the sum of many uniform noise sources as Gaussian noise. See AWGN.


Operations and functions of normal variables

The probability density function, probability density, cumulative distribution function, cumulative distribution, and inverse cumulative distribution function, 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-normal distribution, log-normally: . * The absolute value of X has folded normal distribution: . If \mu = 0 this is known as the half-normal distribution. * The absolute value of normalized residuals, , ''X'' − ''μ'', /''σ'', has chi distribution with one degree of freedom: , X - \mu, / \sigma \sim \chi_1. * The square of ''X''/''σ'' has the noncentral chi-squared distribution 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 distribution, chi-squared. * The log likelihood of a normal variable x is simply the log of its probability density function: \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 distribution, chi-squared variable. * The distribution of the variable ''X'' restricted to an interval [''a'', ''b''] is called the truncated normal distribution. * (''X'' − ''μ'')−2 has a Lévy distribution with location 0 and scale ''σ''−2.


= Operations on two independent normal variables

= * If X_1 and X_2 are two independence (probability theory), independent 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,sum of normally distributed random variables, [proof] 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. * 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 distribution, stable (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#Independent central-normal distributions, product distribution with density function f_Z(z) = \pi^ K_0(, z, ) where K_0 is the Macdonald function, modified Bessel function of the second kind. This distribution is symmetric around zero, unbounded at z = 0, and has the characteristic function (probability theory), characteristic function \phi_Z(t) = (1 + t^2)^. * Their ratio follows the standard Cauchy distribution: X_1/ X_2 \sim \operatorname(0, 1). * Their Euclidean norm \sqrt has the Rayleigh distribution.


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 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 is independent from the sample standard deviation, which can be demonstrated using Basu's theorem or Cochran's theorem. The ratio of these two quantities will have the Student's t-distribution 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 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 distribution, 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 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 (probability), infinite divisibility. 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 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 ...
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'', 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 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, for normal distributions the sample mean \textstyle\hat\mu and the sample variance ''s''2 are independence (probability theory), independent, 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 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 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 th ...
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, 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, 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 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 σ2, the conjugate prior distribution is also normally distributed. This can be shown more easily by rewriting the variance as the precision, 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 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 σ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; 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. 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 (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. 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. 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 Φ−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 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 independence (probability theory), independent. This formulation arises because for a bivariate normal random vector (''X'', ''Y'') the squared norm will have the chi-squared distribution 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, 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._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,_with_mean_0_and_standard_deviation_1/\sigma._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 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 ...
_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_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__cumulants_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 (statistician), Charles Stein, who first publ ...
_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_when_\sigma_=_0. However,_one_can_define_the_normal_distribution_with_zero_variance_as_a_ generalized_function;_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 argum ...
_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 ...
_with_ probability_density_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._A_function_with_two_ Lagrange_multipliers_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_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_statistics,_ scores,_and__estimators_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 ques ...
_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_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-squar ...
_\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 situ ...
_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 ser ...
s. This_theorem_can_also_be_used_to_justify_modeling_the_sum_of_many_uniform_noise_sources_as_ Gaussian_noise._See_ AWGN.


__Operations_and_functions_of_normal_variables_

The_ probability_density,_
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_function, 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-normal_distribution, log-normally:_. *_The_absolute_value_of_X_has_folded_normal_distribution:_._If_\mu_=_0_this_is_known_as_the_half-normal_distribution. *_The_absolute_value_of_normalized_residuals,_, ''X''_−_''μ'', /''σ'',_has_chi_distribution_with_one_degree_of_freedom:_, X_-_\mu, _/_\sigma_\sim_\chi_1. *_The_square_of_''X''/''σ''_has_the_noncentral_chi-squared_distribution_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_distribution, chi-squared. *_The_log_likelihood_of_a_normal_variable_x_is_simply_the_log_of_its__probability_density_function:_\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_distribution, chi-squared_variable. *_The_distribution_of_the_variable_''X''_restricted_to_an_interval_[''a'',_''b'']_is_called_the_truncated_normal_distribution. *_(''X''_−_''μ'')−2_has_a__Lévy_distribution_with_location_0_and_scale_''σ''−2.


_=_Operations_on_two_independent_normal_variables_

= *_If_X_1_and_X_2_are_two_independence_(probability_theory), independent_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,sum_of_normally_distributed_random_variables, [proof]_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. *_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_distribution, stable_(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#Independent_central-normal_distributions, product_distribution_with_density_function_f_Z(z)_=_\pi^_K_0(, z, )_where_K_0_is_the_Macdonald_function, modified_Bessel_function_of_the_second_kind._This_distribution_is_symmetric_around_zero,_unbounded_at_z_=_0,_and_has_the_ characteristic_function__\phi_Z(t)_=_(1_+_t^2)^. *_Their_ratio_follows_the_standard__Cauchy_distribution:_X_1/_X_2_\sim_\operatorname(0,_1). *_Their_Euclidean_norm_\sqrt_has_the_Rayleigh_distribution.


__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-squar ...
_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_is_independent_from_the_sample__standard_deviation,_which_can_be_demonstrated_using_Basu's_theorem_or_Cochran's_theorem._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 situ ...
_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_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_distribution, 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_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_(probability), infinite_divisibility. 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_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_...
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'',_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-squar ...
_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,_for_normal_distributions_the_sample_mean_\textstyle\hat\mu_and_the_sample_variance_''s''2_are_independence_(probability_theory), independent,_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 situ ...
_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_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_th_...
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,_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,_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_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_σ2,_the_conjugate_prior_distribution_is_also_normally_distributed. This_can_be_shown_more_easily_by_rewriting_the_variance_as_the__precision,_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_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_σ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;_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._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_(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._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 ques ...
._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_Φ−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_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_independence_(probability_theory), independent._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-squar ...
_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,_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].html" ;"title="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 functions _1F_1 and U. :\begin \operatorname\left[X^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[X \mid a 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. 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 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. 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 standard deviation 1/\sigma. In particular, the standard normal distribution \varphi is an Fourier transform#Eigenfunctions, 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 (probability theory), characteristic function \varphi_X(t) of that variable, which is defined as the expected value 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 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[e^] = \hat f(it) = e^ e^ 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 Since this is a quadratic polynomial in t, only the first two cumulants are nonzero, namely the mean \mu and the variance \sigma^2.


Stein operator and class

Within Stein's method 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 (mathematics), function when \sigma = 0. However, one can define the normal distribution with zero variance as a generalized function; specifically, as Dirac delta function, 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 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 probability distribution, maximum entropy. If X is a continuous random variable with probability density function, probability density 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. A function with two Lagrange multipliers 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 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 statistics, score (statistics), scores, and estimators 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 function (statistics), 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 B(n,p) is De Moivre–Laplace theorem, 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 with parameter \lambda is approximately normal with mean \lambda and variance \lambda, for large values of \lambda. * The chi-squared distribution \chi^2(k) is approximately normal with mean k and variance 2k, for large k. * The Student's t-distribution 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, improvements of the approximation are given by the Edgeworth expansions. This theorem can also be used to justify modeling the sum of many uniform noise sources as Gaussian noise. See AWGN.


Operations and functions of normal variables

The probability density function, probability density, cumulative distribution function, cumulative distribution, and inverse cumulative distribution function, 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-normal distribution, log-normally: . * The absolute value of X has folded normal distribution: . If \mu = 0 this is known as the half-normal distribution. * The absolute value of normalized residuals, , ''X'' − ''μ'', /''σ'', has chi distribution with one degree of freedom: , X - \mu, / \sigma \sim \chi_1. * The square of ''X''/''σ'' has the noncentral chi-squared distribution 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 distribution, chi-squared. * The log likelihood of a normal variable x is simply the log of its probability density function: \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 distribution, chi-squared variable. * The distribution of the variable ''X'' restricted to an interval [''a'', ''b''] is called the truncated normal distribution. * (''X'' − ''μ'')−2 has a Lévy distribution with location 0 and scale ''σ''−2.


= Operations on two independent normal variables

= * If X_1 and X_2 are two independence (probability theory), independent 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,sum of normally distributed random variables, [proof] 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. * 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 distribution, stable (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#Independent central-normal distributions, product distribution with density function f_Z(z) = \pi^ K_0(, z, ) where K_0 is the Macdonald function, modified Bessel function of the second kind. This distribution is symmetric around zero, unbounded at z = 0, and has the characteristic function (probability theory), characteristic function \phi_Z(t) = (1 + t^2)^. * Their ratio follows the standard Cauchy distribution: X_1/ X_2 \sim \operatorname(0, 1). * Their Euclidean norm \sqrt has the Rayleigh distribution.


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 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 is independent from the sample standard deviation, which can be demonstrated using Basu's theorem or Cochran's theorem. The ratio of these two quantities will have the Student's t-distribution 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 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 distribution, 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 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 (probability), infinite divisibility. 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 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 ...
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'', 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 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, for normal distributions the sample mean \textstyle\hat\mu and the sample variance ''s''2 are independence (probability theory), independent, 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 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 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 th ...
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, 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, 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 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 σ2, the conjugate prior distribution is also normally distributed. This can be shown more easily by rewriting the variance as the precision, 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 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 σ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; 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. 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 (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. 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. 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 Φ−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 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 independence (probability theory), independent. This formulation arises because for a bivariate normal random vector (''X'', ''Y'') the squared norm will have the chi-squared distribution 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, 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 functions _1F_1 and U. :\begin \operatorname\left[X^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[X \mid a 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. 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 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. 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 standard deviation 1/\sigma. In particular, the standard normal distribution \varphi is an Fourier transform#Eigenfunctions, 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 (probability theory), characteristic function \varphi_X(t) of that variable, which is defined as the expected value 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 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[e^] = \hat f(it) = e^ e^ 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 Since this is a quadratic polynomial in t, only the first two cumulants are nonzero, namely the mean \mu and the variance \sigma^2.


Stein operator and class

Within Stein's method 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 (mathematics), function when \sigma = 0. However, one can define the normal distribution with zero variance as a generalized function; specifically, as Dirac delta function, 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 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 probability distribution, maximum entropy. If X is a continuous random variable with probability density function, probability density 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. A function with two Lagrange multipliers 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 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 statistics, score (statistics), scores, and estimators 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 function (statistics), 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 B(n,p) is De Moivre–Laplace theorem, 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 with parameter \lambda is approximately normal with mean \lambda and variance \lambda, for large values of \lambda. * The chi-squared distribution \chi^2(k) is approximately normal with mean k and variance 2k, for large k. * The Student's t-distribution 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, improvements of the approximation are given by the Edgeworth expansions. This theorem can also be used to justify modeling the sum of many uniform noise sources as Gaussian noise. See AWGN.


Operations and functions of normal variables

The probability density function, probability density, cumulative distribution function, cumulative distribution, and inverse cumulative distribution function, 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-normal distribution, log-normally: . * The absolute value of X has folded normal distribution: . If \mu = 0 this is known as the half-normal distribution. * The absolute value of normalized residuals, , ''X'' − ''μ'', /''σ'', has chi distribution with one degree of freedom: , X - \mu, / \sigma \sim \chi_1. * The square of ''X''/''σ'' has the noncentral chi-squared distribution 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 distribution, chi-squared. * The log likelihood of a normal variable x is simply the log of its probability density function: \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 distribution, chi-squared variable. * The distribution of the variable ''X'' restricted to an interval [''a'', ''b''] is called the truncated normal distribution. * (''X'' − ''μ'')−2 has a Lévy distribution with location 0 and scale ''σ''−2.


= Operations on two independent normal variables

= * If X_1 and X_2 are two independence (probability theory), independent 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,sum of normally distributed random variables, [proof] 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. * 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 distribution, stable (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#Independent central-normal distributions, product distribution with density function f_Z(z) = \pi^ K_0(, z, ) where K_0 is the Macdonald function, modified Bessel function of the second kind. This distribution is symmetric around zero, unbounded at z = 0, and has the characteristic function (probability theory), characteristic function \phi_Z(t) = (1 + t^2)^. * Their ratio follows the standard Cauchy distribution: X_1/ X_2 \sim \operatorname(0, 1). * Their Euclidean norm \sqrt has the Rayleigh distribution.


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 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 is independent from the sample standard deviation, which can be demonstrated using Basu's theorem or Cochran's theorem. The ratio of these two quantities will have the Student's t-distribution 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 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 distribution, 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 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 (probability), infinite divisibility. 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 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 ...
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'', 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 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, for normal distributions the sample mean \textstyle\hat\mu and the sample variance ''s''2 are independence (probability theory), independent, 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 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 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 th ...
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, 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, 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 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 σ2, the conjugate prior distribution is also normally distributed. This can be shown more easily by rewriting the variance as the precision, 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 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 σ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; 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. 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 (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. 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. 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 Φ−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 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 independence (probability theory), independent. This formulation arises because for a bivariate normal random vector (''X'', ''Y'') the squared norm will have the chi-squared distribution 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, 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_when_\sigma_=_0. However,_one_can_define_the_normal_distribution_with_zero_variance_as_a_ generalized_function;_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 argum ...
_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 ...
_with_ probability_density_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._A_function_with_two_ Lagrange_multipliers_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_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_statistics,_ scores,_and__estimators_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 ques ...
_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_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-squar ...
_\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 situ ...
_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 ser ...
s. This_theorem_can_also_be_used_to_justify_modeling_the_sum_of_many_uniform_noise_sources_as_ Gaussian_noise._See_ AWGN.


__Operations_and_functions_of_normal_variables_

The_ probability_density,_
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_function, 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-normal_distribution, log-normally:_. *_The_absolute_value_of_X_has_folded_normal_distribution:_._If_\mu_=_0_this_is_known_as_the_half-normal_distribution. *_The_absolute_value_of_normalized_residuals,_, ''X''_−_''μ'', /''σ'',_has_chi_distribution_with_one_degree_of_freedom:_, X_-_\mu, _/_\sigma_\sim_\chi_1. *_The_square_of_''X''/''σ''_has_the_noncentral_chi-squared_distribution_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_distribution, chi-squared. *_The_log_likelihood_of_a_normal_variable_x_is_simply_the_log_of_its__probability_density_function:_\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_distribution, chi-squared_variable. *_The_distribution_of_the_variable_''X''_restricted_to_an_interval_[''a'',_''b'']_is_called_the_truncated_normal_distribution. *_(''X''_−_''μ'')−2_has_a__Lévy_distribution_with_location_0_and_scale_''σ''−2.


_=_Operations_on_two_independent_normal_variables_

= *_If_X_1_and_X_2_are_two_independence_(probability_theory), independent_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,sum_of_normally_distributed_random_variables, [proof]_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. *_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_distribution, stable_(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#Independent_central-normal_distributions, product_distribution_with_density_function_f_Z(z)_=_\pi^_K_0(, z, )_where_K_0_is_the_Macdonald_function, modified_Bessel_function_of_the_second_kind._This_distribution_is_symmetric_around_zero,_unbounded_at_z_=_0,_and_has_the_ characteristic_function__\phi_Z(t)_=_(1_+_t^2)^. *_Their_ratio_follows_the_standard__Cauchy_distribution:_X_1/_X_2_\sim_\operatorname(0,_1). *_Their_Euclidean_norm_\sqrt_has_the_Rayleigh_distribution.


__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-squar ...
_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_is_independent_from_the_sample__standard_deviation,_which_can_be_demonstrated_using_Basu's_theorem_or_Cochran's_theorem._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 situ ...
_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_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_distribution, 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_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_(probability), infinite_divisibility. 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_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_...
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'',_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-squar ...
_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,_for_normal_distributions_the_sample_mean_\textstyle\hat\mu_and_the_sample_variance_''s''2_are_independence_(probability_theory), independent,_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 situ ...
_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_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_th_...
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,_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,_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_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_σ2,_the_conjugate_prior_distribution_is_also_normally_distributed. This_can_be_shown_more_easily_by_rewriting_the_variance_as_the__precision,_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_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_σ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;_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._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_(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._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 ques ...
._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_Φ−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_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_independence_(probability_theory), independent._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-squar ...
_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,_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].html" ;"title="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 functions _1F_1 and U. :\begin \operatorname\left[X^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[X \mid a 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. 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 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. 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 standard deviation 1/\sigma. In particular, the standard normal distribution \varphi is an Fourier transform#Eigenfunctions, 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 (probability theory), characteristic function \varphi_X(t) of that variable, which is defined as the expected value 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 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[e^] = \hat f(it) = e^ e^ 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 Since this is a quadratic polynomial in t, only the first two cumulants are nonzero, namely the mean \mu and the variance \sigma^2.


Stein operator and class

Within Stein's method 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_when_\sigma_=_0. However,_one_can_define_the_normal_distribution_with_zero_variance_as_a_ generalized_function;_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 argum ...
_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 ...
_with_ probability_density_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._A_function_with_two_ Lagrange_multipliers_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_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_statistics,_ scores,_and__estimators_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 ques ...
_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_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-squar ...
_\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 situ ...
_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 ser ...
s. This_theorem_can_also_be_used_to_justify_modeling_the_sum_of_many_uniform_noise_sources_as_ Gaussian_noise._See_ AWGN.


__Operations_and_functions_of_normal_variables_

The_ probability_density,_
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_function, 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-normal_distribution, log-normally:_. *_The_absolute_value_of_X_has_folded_normal_distribution:_._If_\mu_=_0_this_is_known_as_the_half-normal_distribution. *_The_absolute_value_of_normalized_residuals,_, ''X''_−_''μ'', /''σ'',_has_chi_distribution_with_one_degree_of_freedom:_, X_-_\mu, _/_\sigma_\sim_\chi_1. *_The_square_of_''X''/''σ''_has_the_noncentral_chi-squared_distribution_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_distribution, chi-squared. *_The_log_likelihood_of_a_normal_variable_x_is_simply_the_log_of_its__probability_density_function:_\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_distribution, chi-squared_variable. *_The_distribution_of_the_variable_''X''_restricted_to_an_interval_[''a'',_''b'']_is_called_the_truncated_normal_distribution. *_(''X''_−_''μ'')−2_has_a__Lévy_distribution_with_location_0_and_scale_''σ''−2.


_=_Operations_on_two_independent_normal_variables_

= *_If_X_1_and_X_2_are_two_independence_(probability_theory), independent_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,sum_of_normally_distributed_random_variables, [proof]_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. *_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_distribution, stable_(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#Independent_central-normal_distributions, product_distribution_with_density_function_f_Z(z)_=_\pi^_K_0(, z, )_where_K_0_is_the_Macdonald_function, modified_Bessel_function_of_the_second_kind._This_distribution_is_symmetric_around_zero,_unbounded_at_z_=_0,_and_has_the__characteristic_function__\phi_Z(t)_=_(1_+_t^2)^. *_Their_ratio_follows_the_standard__Cauchy_distribution:_X_1/_X_2_\sim_\operatorname(0,_1). *_Their_Euclidean_norm_\sqrt_has_the_Rayleigh_distribution.


__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-squar ...
_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_is_independent_from_the_sample__standard_deviation,_which_can_be_demonstrated_using_Basu's_theorem_or_Cochran's_theorem._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 situ ...
_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_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_distribution, 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_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_(probability), infinite_divisibility. 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_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_...
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'',_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-squar ...
_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,_for_normal_distributions_the_sample_mean_\textstyle\hat\mu_and_the_sample_variance_''s''2_are_independence_(probability_theory), independent,_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 situ ...
_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_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_th_...
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,_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,_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_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_σ2,_the_conjugate_prior_distribution_is_also_normally_distributed. This_can_be_shown_more_easily_by_rewriting_the_variance_as_the__precision,_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_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_σ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;_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._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_(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._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 ques ...
._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_Φ−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_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_independence_(probability_theory), independent._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-squar ...
_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,_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].html"_;"title="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_functions__1F_1_and_U. :\begin ___\operatorname\left[X^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._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,_with_mean_0_and_standard_deviation_1/\sigma._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_ 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__...
_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_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__cumulants_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_(statistician),_Charles_Stein,_who_first_publ_...
_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_when_\sigma_=_0. However,_one_can_define_the_normal_distribution_with_zero_variance_as_a_ generalized_function;_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 argum ...
_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 ...
_with_ probability_density_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._A_function_with_two_ Lagrange_multipliers_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_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_statistics,_ scores,_and__estimators_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 ques ...
_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_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-squar ...
_\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 situ ...
_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 ser ...
s. This_theorem_can_also_be_used_to_justify_modeling_the_sum_of_many_uniform_noise_sources_as_ Gaussian_noise._See_ AWGN.


__Operations_and_functions_of_normal_variables_

The_ probability_density,_
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_function, 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-normal_distribution, log-normally:_. *_The_absolute_value_of_X_has_folded_normal_distribution:_._If_\mu_=_0_this_is_known_as_the_half-normal_distribution. *_The_absolute_value_of_normalized_residuals,_, ''X''_−_''μ'', /''σ'',_has_chi_distribution_with_one_degree_of_freedom:_, X_-_\mu, _/_\sigma_\sim_\chi_1. *_The_square_of_''X''/''σ''_has_the_noncentral_chi-squared_distribution_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_distribution, chi-squared. *_The_log_likelihood_of_a_normal_variable_x_is_simply_the_log_of_its__probability_density_function:_\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_distribution, chi-squared_variable. *_The_distribution_of_the_variable_''X''_restricted_to_an_interval_[''a'',_''b'']_is_called_the_truncated_normal_distribution. *_(''X''_−_''μ'')−2_has_a__Lévy_distribution_with_location_0_and_scale_''σ''−2.


_=_Operations_on_two_independent_normal_variables_

= *_If_X_1_and_X_2_are_two_independence_(probability_theory), independent_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,sum_of_normally_distributed_random_variables, [proof]_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. *_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_distribution, stable_(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#Independent_central-normal_distributions, product_distribution_with_density_function_f_Z(z)_=_\pi^_K_0(, z, )_where_K_0_is_the_Macdonald_function, modified_Bessel_function_of_the_second_kind._This_distribution_is_symmetric_around_zero,_unbounded_at_z_=_0,_and_has_the__characteristic_function__\phi_Z(t)_=_(1_+_t^2)^. *_Their_ratio_follows_the_standard__Cauchy_distribution:_X_1/_X_2_\sim_\operatorname(0,_1). *_Their_Euclidean_norm_\sqrt_has_the_Rayleigh_distribution.


__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-squar ...
_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_is_independent_from_the_sample__standard_deviation,_which_can_be_demonstrated_using_Basu's_theorem_or_Cochran's_theorem._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 situ ...
_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_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_distribution, 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_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_(probability), infinite_divisibility. 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_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_...
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'',_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-squar ...
_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,_for_normal_distributions_the_sample_mean_\textstyle\hat\mu_and_the_sample_variance_''s''2_are_independence_(probability_theory), independent,_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 situ ...
_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_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_th_...
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,_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,_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_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_σ2,_the_conjugate_prior_distribution_is_also_normally_distributed. This_can_be_shown_more_easily_by_rewriting_the_variance_as_the__precision,_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_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_σ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;_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._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_(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._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 ques ...
._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_Φ−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_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_independence_(probability_theory), independent._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-squar ...
_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,_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_functions__1F_1_and_U. :\begin ___\operatorname\left[X^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._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,_with_mean_0_and_standard_deviation_1/\sigma._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_ 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__...
_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_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__cumulants_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_(statistician),_Charles_Stein,_who_first_publ_...
_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_when_\sigma_=_0. However,_one_can_define_the_normal_distribution_with_zero_variance_as_a_ generalized_function;_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 argum ...
_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 ...
_with_ probability_density_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._A_function_with_two_ Lagrange_multipliers_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_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_statistics,_ scores,_and__estimators_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 ques ...
_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_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-squar ...
_\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 situ ...
_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 ser ...
s. This_theorem_can_also_be_used_to_justify_modeling_the_sum_of_many_uniform_noise_sources_as_ Gaussian_noise._See_ AWGN.


__Operations_and_functions_of_normal_variables_

The_ probability_density,_
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_function, 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-normal_distribution, log-normally:_. *_The_absolute_value_of_X_has_folded_normal_distribution:_._If_\mu_=_0_this_is_known_as_the_half-normal_distribution. *_The_absolute_value_of_normalized_residuals,_, ''X''_−_''μ'', /''σ'',_has_chi_distribution_with_one_degree_of_freedom:_, X_-_\mu, _/_\sigma_\sim_\chi_1. *_The_square_of_''X''/''σ''_has_the_noncentral_chi-squared_distribution_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_distribution, chi-squared. *_The_log_likelihood_of_a_normal_variable_x_is_simply_the_log_of_its__probability_density_function:_\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_distribution, chi-squared_variable. *_The_distribution_of_the_variable_''X''_restricted_to_an_interval_[''a'',_''b'']_is_called_the_truncated_normal_distribution. *_(''X''_−_''μ'')−2_has_a__Lévy_distribution_with_location_0_and_scale_''σ''−2.


_=_Operations_on_two_independent_normal_variables_

= *_If_X_1_and_X_2_are_two_independence_(probability_theory), independent_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,sum_of_normally_distributed_random_variables, [proof]_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. *_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_distribution, stable_(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#Independent_central-normal_distributions, product_distribution_with_density_function_f_Z(z)_=_\pi^_K_0(, z, )_where_K_0_is_the_Macdonald_function, modified_Bessel_function_of_the_second_kind._This_distribution_is_symmetric_around_zero,_unbounded_at_z_=_0,_and_has_the__characteristic_function__\phi_Z(t)_=_(1_+_t^2)^. *_Their_ratio_follows_the_standard__Cauchy_distribution:_X_1/_X_2_\sim_\operatorname(0,_1). *_Their_Euclidean_norm_\sqrt_has_the_Rayleigh_distribution.


__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-squar ...
_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_is_independent_from_the_sample__standard_deviation,_which_can_be_demonstrated_using_Basu's_theorem_or_Cochran's_theorem._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 situ ...
_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_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_distribution, 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_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_(probability), infinite_divisibility. 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_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_...
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'',_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-squar ...
_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,_for_normal_distributions_the_sample_mean_\textstyle\hat\mu_and_the_sample_variance_''s''2_are_independence_(probability_theory), independent,_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 situ ...
_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_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_th_...
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,_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,_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_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_σ2,_the_conjugate_prior_distribution_is_also_normally_distributed. This_can_be_shown_more_easily_by_rewriting_the_variance_as_the__precision,_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_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_σ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;_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._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_(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._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 ques ...
._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_Φ−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_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_independence_(probability_theory), independent._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-squar ...
_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,_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].html"_;"title="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._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,_with_mean_0_and_standard_deviation_1/\sigma._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_ 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__...
_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_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__cumulants_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_(statistician),_Charles_Stein,_who_first_publ_...
_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_when_\sigma_=_0. However,_one_can_define_the_normal_distribution_with_zero_variance_as_a_ generalized_function;_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 argum ...
_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 ...
_with_ probability_density_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._A_function_with_two_ Lagrange_multipliers_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_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_statistics,_ scores,_and__estimators_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 ques ...
_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_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-squar ...
_\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 situ ...
_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 ser ...
s. This_theorem_can_also_be_used_to_justify_modeling_the_sum_of_many_uniform_noise_sources_as_ Gaussian_noise._See_ AWGN.


__Operations_and_functions_of_normal_variables_

The_ probability_density,_
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_function, 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-normal_distribution, log-normally:_. *_The_absolute_value_of_X_has_folded_normal_distribution:_._If_\mu_=_0_this_is_known_as_the_half-normal_distribution. *_The_absolute_value_of_normalized_residuals,_, ''X''_−_''μ'', /''σ'',_has_chi_distribution_with_one_degree_of_freedom:_, X_-_\mu, _/_\sigma_\sim_\chi_1. *_The_square_of_''X''/''σ''_has_the_noncentral_chi-squared_distribution_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_distribution, chi-squared. *_The_log_likelihood_of_a_normal_variable_x_is_simply_the_log_of_its__probability_density_function:_\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_distribution, chi-squared_variable. *_The_distribution_of_the_variable_''X''_restricted_to_an_interval_[''a'',_''b'']_is_called_the_truncated_normal_distribution. *_(''X''_−_''μ'')−2_has_a__Lévy_distribution_with_location_0_and_scale_''σ''−2.


_=_Operations_on_two_independent_normal_variables_

= *_If_X_1_and_X_2_are_two_independence_(probability_theory), independent_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,sum_of_normally_distributed_random_variables, [proof]_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. *_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_distribution, stable_(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#Independent_central-normal_distributions, product_distribution_with_density_function_f_Z(z)_=_\pi^_K_0(, z, )_where_K_0_is_the_Macdonald_function, modified_Bessel_function_of_the_second_kind._This_distribution_is_symmetric_around_zero,_unbounded_at_z_=_0,_and_has_the__characteristic_function__\phi_Z(t)_=_(1_+_t^2)^. *_Their_ratio_follows_the_standard__Cauchy_distribution:_X_1/_X_2_\sim_\operatorname(0,_1). *_Their_Euclidean_norm_\sqrt_has_the_Rayleigh_distribution.


__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-squar ...
_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_is_independent_from_the_sample__standard_deviation,_which_can_be_demonstrated_using_Basu's_theorem_or_Cochran's_theorem._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 situ ...
_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_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_distribution, 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_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_(probability), infinite_divisibility. 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_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_...
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'',_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-squar ...
_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,_for_normal_distributions_the_sample_mean_\textstyle\hat\mu_and_the_sample_variance_''s''2_are_independence_(probability_theory), independent,_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 situ ...
_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_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_th_...
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,_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,_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_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_σ2,_the_conjugate_prior_distribution_is_also_normally_distributed. This_can_be_shown_more_easily_by_rewriting_the_variance_as_the__precision,_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_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_σ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;_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._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_(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._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 ques ...
._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_Φ−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_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_independence_(probability_theory), independent._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-squar ...
_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,_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].html"_;"title="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_functions__1F_1_and_U. :\begin ___\operatorname\left[X^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[X_\mid_a 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._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_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._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_standard_deviation_1/\sigma._In_particular,_the_standard_normal_distribution_\varphi_is_an_Fourier_transform#Eigenfunctions, 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_(probability_theory), characteristic_function_\varphi_X(t)_of_that_variable,_which_is_defined_as_the_expected_value_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_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[e^]_=_\hat_f(it)_=_e^_e^ 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 Since_this_is_a_quadratic_polynomial_in_t,_only_the_first_two__cumulants_are_nonzero,_namely_the_mean \mu_and_the_variance \sigma^2.


__Stein_operator_and_class_

Within_Stein's_method_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_when_\sigma_=_0. However,_one_can_define_the_normal_distribution_with_zero_variance_as_a_ generalized_function;_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 argum ...
_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 ...
_with_ probability_density_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._A_function_with_two_ Lagrange_multipliers_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_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_statistics,_ scores,_and__estimators_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 ques ...
_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_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-squar ...
_\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 situ ...
_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 ser ...
s. This_theorem_can_also_be_used_to_justify_modeling_the_sum_of_many_uniform_noise_sources_as_ Gaussian_noise._See_ AWGN.


__Operations_and_functions_of_normal_variables_

The_ probability_density,_
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_function, 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-normal_distribution, log-normally:_. *_The_absolute_value_of_X_has_folded_normal_distribution:_._If_\mu_=_0_this_is_known_as_the_half-normal_distribution. *_The_absolute_value_of_normalized_residuals,_, ''X''_−_''μ'', /''σ'',_has_chi_distribution_with_one_degree_of_freedom:_, X_-_\mu, _/_\sigma_\sim_\chi_1. *_The_square_of_''X''/''σ''_has_the_noncentral_chi-squared_distribution_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_distribution, chi-squared. *_The_log_likelihood_of_a_normal_variable_x_is_simply_the_log_of_its__probability_density_function:_\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_distribution, chi-squared_variable. *_The_distribution_of_the_variable_''X''_restricted_to_an_interval_[''a'',_''b'']_is_called_the_truncated_normal_distribution. *_(''X''_−_''μ'')−2_has_a__Lévy_distribution_with_location_0_and_scale_''σ''−2.


_=_Operations_on_two_independent_normal_variables_

= *_If_X_1_and_X_2_are_two_independence_(probability_theory), independent_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,sum_of_normally_distributed_random_variables, [proof]_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. *_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_distribution, stable_(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#Independent_central-normal_distributions, product_distribution_with_density_function_f_Z(z)_=_\pi^_K_0(, z, )_where_K_0_is_the_Macdonald_function, modified_Bessel_function_of_the_second_kind._This_distribution_is_symmetric_around_zero,_unbounded_at_z_=_0,_and_has_the_characteristic_function_(probability_theory), characteristic_function__\phi_Z(t)_=_(1_+_t^2)^. *_Their_ratio_follows_the_standard__Cauchy_distribution:_X_1/_X_2_\sim_\operatorname(0,_1). *_Their_Euclidean_norm_\sqrt_has_the_Rayleigh_distribution.


__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-squar ...
_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_is_independent_from_the_sample__standard_deviation,_which_can_be_demonstrated_using_Basu's_theorem_or_Cochran's_theorem._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 situ ...
_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_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_distribution, 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_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_(probability), infinite_divisibility. 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_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_...
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'',_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-squar ...
_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,_for_normal_distributions_the_sample_mean_\textstyle\hat\mu_and_the_sample_variance_''s''2_are_independence_(probability_theory), independent,_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 situ ...
_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_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_th_...
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,_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,_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_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_σ2,_the_conjugate_prior_distribution_is_also_normally_distributed. This_can_be_shown_more_easily_by_rewriting_the_variance_as_the__precision,_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_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_σ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;_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._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_(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._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 ques ...
._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_Φ−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_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_independence_(probability_theory), independent._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-squar ...
_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,_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_functions__1F_1_and_U. :\begin ___\operatorname\left[X^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[X_\mid_a 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._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_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._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_standard_deviation_1/\sigma._In_particular,_the_standard_normal_distribution_\varphi_is_an_Fourier_transform#Eigenfunctions, 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_(probability_theory), characteristic_function_\varphi_X(t)_of_that_variable,_which_is_defined_as_the_expected_value_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_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[e^]_=_\hat_f(it)_=_e^_e^ 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 Since_this_is_a_quadratic_polynomial_in_t,_only_the_first_two__cumulants_are_nonzero,_namely_the_mean \mu_and_the_variance \sigma^2.


__Stein_operator_and_class_

Within_Stein's_method_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_when_\sigma_=_0. However,_one_can_define_the_normal_distribution_with_zero_variance_as_a_ generalized_function;_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 argum ...
_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 ...
_with_ probability_density_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._A_function_with_two_ Lagrange_multipliers_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_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_statistics,_ scores,_and__estimators_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 ques ...
_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_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-squar ...
_\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 situ ...
_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 ser ...
s. This_theorem_can_also_be_used_to_justify_modeling_the_sum_of_many_uniform_noise_sources_as_ Gaussian_noise._See_ AWGN.


__Operations_and_functions_of_normal_variables_

The_ probability_density,_
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_function, 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-normal_distribution, log-normally:_. *_The_absolute_value_of_X_has_folded_normal_distribution:_._If_\mu_=_0_this_is_known_as_the_half-normal_distribution. *_The_absolute_value_of_normalized_residuals,_, ''X''_−_''μ'', /''σ'',_has_chi_distribution_with_one_degree_of_freedom:_, X_-_\mu, _/_\sigma_\sim_\chi_1. *_The_square_of_''X''/''σ''_has_the_noncentral_chi-squared_distribution_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_distribution, chi-squared. *_The_log_likelihood_of_a_normal_variable_x_is_simply_the_log_of_its__probability_density_function:_\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_distribution, chi-squared_variable. *_The_distribution_of_the_variable_''X''_restricted_to_an_interval_[''a'',_''b'']_is_called_the_truncated_normal_distribution. *_(''X''_−_''μ'')−2_has_a__Lévy_distribution_with_location_0_and_scale_''σ''−2.


_=_Operations_on_two_independent_normal_variables_

= *_If_X_1_and_X_2_are_two_independence_(probability_theory), independent_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,sum_of_normally_distributed_random_variables, [proof]_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. *_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_distribution, stable_(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#Independent_central-normal_distributions, product_distribution_with_density_function_f_Z(z)_=_\pi^_K_0(, z, )_where_K_0_is_the_Macdonald_function, modified_Bessel_function_of_the_second_kind._This_distribution_is_symmetric_around_zero,_unbounded_at_z_=_0,_and_has_the_characteristic_function_(probability_theory), characteristic_function__\phi_Z(t)_=_(1_+_t^2)^. *_Their_ratio_follows_the_standard__Cauchy_distribution:_X_1/_X_2_\sim_\operatorname(0,_1). *_Their_Euclidean_norm_\sqrt_has_the_Rayleigh_distribution.


__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-squar ...
_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_is_independent_from_the_sample__standard_deviation,_which_can_be_demonstrated_using_Basu's_theorem_or_Cochran's_theorem._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 situ ...
_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_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_distribution, 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_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_(probability), infinite_divisibility. 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_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_...
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'',_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-squar ...
_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,_for_normal_distributions_the_sample_mean_\textstyle\hat\mu_and_the_sample_variance_''s''2_are_independence_(probability_theory), independent,_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 situ ...
_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_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_th_...
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,_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,_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_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_σ2,_the_conjugate_prior_distribution_is_also_normally_distributed. This_can_be_shown_more_easily_by_rewriting_the_variance_as_the__precision,_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_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_σ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;_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._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_(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._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 ques ...
._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_Φ−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_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_independence_(probability_theory), independent._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-squar ...
_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,_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._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,_with_mean_0_and_standard_deviation_1/\sigma._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_ 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__...
_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_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__cumulants_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_(statistician),_Charles_Stein,_who_first_publ_...
_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_when_\sigma_=_0. However,_one_can_define_the_normal_distribution_with_zero_variance_as_a_ generalized_function;_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 argum ...
_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 ...
_with_ probability_density_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._A_function_with_two_ Lagrange_multipliers_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_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_statistics,_ scores,_and__estimators_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 ques ...
_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_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-squar ...
_\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 situ ...
_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 ser ...
s. This_theorem_can_also_be_used_to_justify_modeling_the_sum_of_many_uniform_noise_sources_as_ Gaussian_noise._See_ AWGN.


__Operations_and_functions_of_normal_variables_

The_ probability_density,_
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_function, 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-normal_distribution, log-normally:_. *_The_absolute_value_of_X_has_folded_normal_distribution:_._If_\mu_=_0_this_is_known_as_the_half-normal_distribution. *_The_absolute_value_of_normalized_residuals,_, ''X''_−_''μ'', /''σ'',_has_chi_distribution_with_one_degree_of_freedom:_, X_-_\mu, _/_\sigma_\sim_\chi_1. *_The_square_of_''X''/''σ''_has_the_noncentral_chi-squared_distribution_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_distribution, chi-squared. *_The_log_likelihood_of_a_normal_variable_x_is_simply_the_log_of_its__probability_density_function:_\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_distribution, chi-squared_variable. *_The_distribution_of_the_variable_''X''_restricted_to_an_interval_[''a'',_''b'']_is_called_the_truncated_normal_distribution. *_(''X''_−_''μ'')−2_has_a__Lévy_distribution_with_location_0_and_scale_''σ''−2.


_=_Operations_on_two_independent_normal_variables_

= *_If_X_1_and_X_2_are_two_independence_(probability_theory), independent_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,sum_of_normally_distributed_random_variables, [proof]_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. *_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_distribution, stable_(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#Independent_central-normal_distributions, product_distribution_with_density_function_f_Z(z)_=_\pi^_K_0(, z, )_where_K_0_is_the_Macdonald_function, modified_Bessel_function_of_the_second_kind._This_distribution_is_symmetric_around_zero,_unbounded_at_z_=_0,_and_has_the__characteristic_function__\phi_Z(t)_=_(1_+_t^2)^. *_Their_ratio_follows_the_standard__Cauchy_distribution:_X_1/_X_2_\sim_\operatorname(0,_1). *_Their_Euclidean_norm_\sqrt_has_the_Rayleigh_distribution.


__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-squar ...
_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_is_independent_from_the_sample__standard_deviation,_which_can_be_demonstrated_using_Basu's_theorem_or_Cochran's_theorem._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 situ ...
_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_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_distribution, 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_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_(probability), infinite_divisibility. 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_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_...
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'',_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-squar ...
_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,_for_normal_distributions_the_sample_mean_\textstyle\hat\mu_and_the_sample_variance_''s''2_are_independence_(probability_theory), independent,_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 situ ...
_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_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_th_...
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,_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,_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_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_σ2,_the_conjugate_prior_distribution_is_also_normally_distributed. This_can_be_shown_more_easily_by_rewriting_the_variance_as_the__precision,_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_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_σ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;_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._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_(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._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 ques ...
._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_Φ−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_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_independence_(probability_theory), independent._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-squar ...
_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,_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].html"_;"title="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_functions__1F_1_and_U. :\begin ___\operatorname\left[X^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[X_\mid_a 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._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_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._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_standard_deviation_1/\sigma._In_particular,_the_standard_normal_distribution_\varphi_is_an_Fourier_transform#Eigenfunctions, 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_(probability_theory), characteristic_function_\varphi_X(t)_of_that_variable,_which_is_defined_as_the_expected_value_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_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[e^]_=_\hat_f(it)_=_e^_e^ 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 Since_this_is_a_quadratic_polynomial_in_t,_only_the_first_two__cumulants_are_nonzero,_namely_the_mean \mu_and_the_variance \sigma^2.


__Stein_operator_and_class_

Within_Stein's_method_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_when_\sigma_=_0. However,_one_can_define_the_normal_distribution_with_zero_variance_as_a_ generalized_function;_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 argum ...
_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 ...
_with_ probability_density_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._A_function_with_two_ Lagrange_multipliers_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_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_statistics,_ scores,_and__estimators_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 ques ...
_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_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-squar ...
_\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 situ ...
_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 ser ...
s. This_theorem_can_also_be_used_to_justify_modeling_the_sum_of_many_uniform_noise_sources_as_ Gaussian_noise._See_ AWGN.


__Operations_and_functions_of_normal_variables_

The_ probability_density,_
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_function, 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-normal_distribution, log-normally:_. *_The_absolute_value_of_X_has_folded_normal_distribution:_._If_\mu_=_0_this_is_known_as_the_half-normal_distribution. *_The_absolute_value_of_normalized_residuals,_, ''X''_−_''μ'', /''σ'',_has_chi_distribution_with_one_degree_of_freedom:_, X_-_\mu, _/_\sigma_\sim_\chi_1. *_The_square_of_''X''/''σ''_has_the_noncentral_chi-squared_distribution_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_distribution, chi-squared. *_The_log_likelihood_of_a_normal_variable_x_is_simply_the_log_of_its__probability_density_function:_\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_distribution, chi-squared_variable. *_The_distribution_of_the_variable_''X''_restricted_to_an_interval_[''a'',_''b'']_is_called_the_truncated_normal_distribution. *_(''X''_−_''μ'')−2_has_a__Lévy_distribution_with_location_0_and_scale_''σ''−2.


_=_Operations_on_two_independent_normal_variables_

= *_If_X_1_and_X_2_are_two_independence_(probability_theory), independent_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,sum_of_normally_distributed_random_variables, [proof]_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. *_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_distribution, stable_(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#Independent_central-normal_distributions, product_distribution_with_density_function_f_Z(z)_=_\pi^_K_0(, z, )_where_K_0_is_the_Macdonald_function, modified_Bessel_function_of_the_second_kind._This_distribution_is_symmetric_around_zero,_unbounded_at_z_=_0,_and_has_the_characteristic_function_(probability_theory), characteristic_function__\phi_Z(t)_=_(1_+_t^2)^. *_Their_ratio_follows_the_standard__Cauchy_distribution:_X_1/_X_2_\sim_\operatorname(0,_1). *_Their_Euclidean_norm_\sqrt_has_the_Rayleigh_distribution.


__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-squar ...
_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_is_independent_from_the_sample__standard_deviation,_which_can_be_demonstrated_using_Basu's_theorem_or_Cochran's_theorem._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 situ ...
_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_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_distribution, 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_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_(probability), infinite_divisibility. 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_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_...
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'',_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-squar ...
_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,_for_normal_distributions_the_sample_mean_\textstyle\hat\mu_and_the_sample_variance_''s''2_are_independence_(probability_theory), independent,_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 situ ...
_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_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_th_...
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,_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,_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_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_σ2,_the_conjugate_prior_distribution_is_also_normally_distributed. This_can_be_shown_more_easily_by_rewriting_the_variance_as_the__precision,_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_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_σ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;_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._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_(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._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 ques ...
._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_Φ−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_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_independence_(probability_theory), independent._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-squar ...
_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,_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_functions__1F_1_and_U. :\begin ___\operatorname\left[X^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[X_\mid_a 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._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_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._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_standard_deviation_1/\sigma._In_particular,_the_standard_normal_distribution_\varphi_is_an_Fourier_transform#Eigenfunctions, 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_(probability_theory), characteristic_function_\varphi_X(t)_of_that_variable,_which_is_defined_as_the_expected_value_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_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[e^]_=_\hat_f(it)_=_e^_e^ 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 Since_this_is_a_quadratic_polynomial_in_t,_only_the_first_two__cumulants_are_nonzero,_namely_the_mean \mu_and_the_variance \sigma^2.


__Stein_operator_and_class_

Within_Stein's_method_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_when_\sigma_=_0. However,_one_can_define_the_normal_distribution_with_zero_variance_as_a_ generalized_function;_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 argum ...
_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 ...
_with_ probability_density_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._A_function_with_two_ Lagrange_multipliers_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_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_statistics,_ scores,_and__estimators_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 ques ...
_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_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-squar ...
_\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 situ ...
_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 ser ...
s. This_theorem_can_also_be_used_to_justify_modeling_the_sum_of_many_uniform_noise_sources_as_ Gaussian_noise._See_ AWGN.


__Operations_and_functions_of_normal_variables_

The_ probability_density,_
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_function, 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-normal_distribution, log-normally:_. *_The_absolute_value_of_X_has_folded_normal_distribution:_._If_\mu_=_0_this_is_known_as_the_half-normal_distribution. *_The_absolute_value_of_normalized_residuals,_, ''X''_−_''μ'', /''σ'',_has_chi_distribution_with_one_degree_of_freedom:_, X_-_\mu, _/_\sigma_\sim_\chi_1. *_The_square_of_''X''/''σ''_has_the_noncentral_chi-squared_distribution_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_distribution, chi-squared. *_The_log_likelihood_of_a_normal_variable_x_is_simply_the_log_of_its__probability_density_function:_\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_distribution, chi-squared_variable. *_The_distribution_of_the_variable_''X''_restricted_to_an_interval_[''a'',_''b'']_is_called_the_truncated_normal_distribution. *_(''X''_−_''μ'')−2_has_a__Lévy_distribution_with_location_0_and_scale_''σ''−2.


_=_Operations_on_two_independent_normal_variables_

= *_If_X_1_and_X_2_are_two_independence_(probability_theory), independent_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,sum_of_normally_distributed_random_variables, [proof]_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. *_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_distribution, stable_(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#Independent_central-normal_distributions, product_distribution_with_density_function_f_Z(z)_=_\pi^_K_0(, z, )_where_K_0_is_the_Macdonald_function, modified_Bessel_function_of_the_second_kind._This_distribution_is_symmetric_around_zero,_unbounded_at_z_=_0,_and_has_the_characteristic_function_(probability_theory), characteristic_function__\phi_Z(t)_=_(1_+_t^2)^. *_Their_ratio_follows_the_standard__Cauchy_distribution:_X_1/_X_2_\sim_\operatorname(0,_1). *_Their_Euclidean_norm_\sqrt_has_the_Rayleigh_distribution.


__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-squar ...
_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_is_independent_from_the_sample__standard_deviation,_which_can_be_demonstrated_using_Basu's_theorem_or_Cochran's_theorem._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 situ ...
_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_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_distribution, 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_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_(probability), infinite_divisibility. 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_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_...
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'',_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-squar ...
_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,_for_normal_distributions_the_sample_mean_\textstyle\hat\mu_and_the_sample_variance_''s''2_are_independence_(probability_theory), independent,_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 situ ...
_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_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_th_...
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,_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,_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_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_σ2,_the_conjugate_prior_distribution_is_also_normally_distributed. This_can_be_shown_more_easily_by_rewriting_the_variance_as_the__precision,_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_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_σ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;_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._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_(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._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 ques ...
._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_Φ−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_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_independence_(probability_theory), independent._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-squar ...
_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,_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].html" ;"title="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_when_\sigma_=_0. However,_one_can_define_the_normal_distribution_with_zero_variance_as_a_ generalized_function;_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 argum ...
_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 ...
_with_ probability_density_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._A_function_with_two_ Lagrange_multipliers_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_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_statistics,_ scores,_and__estimators_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 ques ...
_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_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-squar ...
_\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 situ ...
_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 ser ...
s. This_theorem_can_also_be_used_to_justify_modeling_the_sum_of_many_uniform_noise_sources_as_ Gaussian_noise._See_ AWGN.


__Operations_and_functions_of_normal_variables_

The_ probability_density,_
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_function, 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-normal_distribution, log-normally:_. *_The_absolute_value_of_X_has_folded_normal_distribution:_._If_\mu_=_0_this_is_known_as_the_half-normal_distribution. *_The_absolute_value_of_normalized_residuals,_, ''X''_−_''μ'', /''σ'',_has_chi_distribution_with_one_degree_of_freedom:_, X_-_\mu, _/_\sigma_\sim_\chi_1. *_The_square_of_''X''/''σ''_has_the_noncentral_chi-squared_distribution_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_distribution, chi-squared. *_The_log_likelihood_of_a_normal_variable_x_is_simply_the_log_of_its__probability_density_function:_\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_distribution, chi-squared_variable. *_The_distribution_of_the_variable_''X''_restricted_to_an_interval_[''a'',_''b'']_is_called_the_truncated_normal_distribution. *_(''X''_−_''μ'')−2_has_a__Lévy_distribution_with_location_0_and_scale_''σ''−2.


_=_Operations_on_two_independent_normal_variables_

= *_If_X_1_and_X_2_are_two_independence_(probability_theory), independent_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,sum_of_normally_distributed_random_variables, [proof]_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. *_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_distribution, stable_(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#Independent_central-normal_distributions, product_distribution_with_density_function_f_Z(z)_=_\pi^_K_0(, z, )_where_K_0_is_the_Macdonald_function, modified_Bessel_function_of_the_second_kind._This_distribution_is_symmetric_around_zero,_unbounded_at_z_=_0,_and_has_the_ characteristic_function__\phi_Z(t)_=_(1_+_t^2)^. *_Their_ratio_follows_the_standard__Cauchy_distribution:_X_1/_X_2_\sim_\operatorname(0,_1). *_Their_Euclidean_norm_\sqrt_has_the_Rayleigh_distribution.


__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-squar ...
_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_is_independent_from_the_sample__standard_deviation,_which_can_be_demonstrated_using_Basu's_theorem_or_Cochran's_theorem._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 situ ...
_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_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_distribution, 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_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_(probability), infinite_divisibility. 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_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_...
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'',_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-squar ...
_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,_for_normal_distributions_the_sample_mean_\textstyle\hat\mu_and_the_sample_variance_''s''2_are_independence_(probability_theory), independent,_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 situ ...
_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_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_th_...
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,_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,_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_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_σ2,_the_conjugate_prior_distribution_is_also_normally_distributed. This_can_be_shown_more_easily_by_rewriting_the_variance_as_the__precision,_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_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_σ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;_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._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_(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._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 ques ...
._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_Φ−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_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_independence_(probability_theory), independent._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-squar ...
_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,_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].html"_;"title="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_functions__1F_1_and_U. :\begin ___\operatorname\left[X^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._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,_with_mean_0_and_standard_deviation_1/\sigma._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 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 ...
_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_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__cumulants_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 (statistician), Charles Stein, who first publ ...
_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_when_\sigma_=_0. However,_one_can_define_the_normal_distribution_with_zero_variance_as_a_ generalized_function;_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 argum ...
_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 ...
_with_ probability_density_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._A_function_with_two_ Lagrange_multipliers_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_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_statistics,_ scores,_and__estimators_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 ques ...
_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_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-squar ...
_\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 situ ...
_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 ser ...
s. This_theorem_can_also_be_used_to_justify_modeling_the_sum_of_many_uniform_noise_sources_as_ Gaussian_noise._See_ AWGN.


__Operations_and_functions_of_normal_variables_

The_ probability_density,_
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_function, 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-normal_distribution, log-normally:_. *_The_absolute_value_of_X_has_folded_normal_distribution:_._If_\mu_=_0_this_is_known_as_the_half-normal_distribution. *_The_absolute_value_of_normalized_residuals,_, ''X''_−_''μ'', /''σ'',_has_chi_distribution_with_one_degree_of_freedom:_, X_-_\mu, _/_\sigma_\sim_\chi_1. *_The_square_of_''X''/''σ''_has_the_noncentral_chi-squared_distribution_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_distribution, chi-squared. *_The_log_likelihood_of_a_normal_variable_x_is_simply_the_log_of_its__probability_density_function:_\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_distribution, chi-squared_variable. *_The_distribution_of_the_variable_''X''_restricted_to_an_interval_[''a'',_''b'']_is_called_the_truncated_normal_distribution. *_(''X''_−_''μ'')−2_has_a__Lévy_distribution_with_location_0_and_scale_''σ''−2.


_=_Operations_on_two_independent_normal_variables_

= *_If_X_1_and_X_2_are_two_independence_(probability_theory), independent_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,sum_of_normally_distributed_random_variables, [proof]_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. *_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_distribution, stable_(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#Independent_central-normal_distributions, product_distribution_with_density_function_f_Z(z)_=_\pi^_K_0(, z, )_where_K_0_is_the_Macdonald_function, modified_Bessel_function_of_the_second_kind._This_distribution_is_symmetric_around_zero,_unbounded_at_z_=_0,_and_has_the_ characteristic_function__\phi_Z(t)_=_(1_+_t^2)^. *_Their_ratio_follows_the_standard__Cauchy_distribution:_X_1/_X_2_\sim_\operatorname(0,_1). *_Their_Euclidean_norm_\sqrt_has_the_Rayleigh_distribution.


__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-squar ...
_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_is_independent_from_the_sample__standard_deviation,_which_can_be_demonstrated_using_Basu's_theorem_or_Cochran's_theorem._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 situ ...
_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_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_distribution, 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_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_(probability), infinite_divisibility. 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_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_...
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'',_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-squar ...
_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,_for_normal_distributions_the_sample_mean_\textstyle\hat\mu_and_the_sample_variance_''s''2_are_independence_(probability_theory), independent,_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 situ ...
_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_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_th_...
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,_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,_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_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_σ2,_the_conjugate_prior_distribution_is_also_normally_distributed. This_can_be_shown_more_easily_by_rewriting_the_variance_as_the__precision,_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_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_σ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;_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._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_(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._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 ques ...
._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_Φ−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_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_independence_(probability_theory), independent._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-squar ...
_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,_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_functions__1F_1_and_U. :\begin ___\operatorname\left[X^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._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,_with_mean_0_and_standard_deviation_1/\sigma._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 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 ...
_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_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__cumulants_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 (statistician), Charles Stein, who first publ ...
_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_when_\sigma_=_0. However,_one_can_define_the_normal_distribution_with_zero_variance_as_a_ generalized_function;_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 argum ...
_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 ...
_with_ probability_density_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._A_function_with_two_ Lagrange_multipliers_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_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_statistics,_ scores,_and__estimators_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 ques ...
_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_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-squar ...
_\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 situ ...
_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 ser ...
s. This_theorem_can_also_be_used_to_justify_modeling_the_sum_of_many_uniform_noise_sources_as_ Gaussian_noise._See_ AWGN.


__Operations_and_functions_of_normal_variables_

The_ probability_density,_
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_function, 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-normal_distribution, log-normally:_. *_The_absolute_value_of_X_has_folded_normal_distribution:_._If_\mu_=_0_this_is_known_as_the_half-normal_distribution. *_The_absolute_value_of_normalized_residuals,_, ''X''_−_''μ'', /''σ'',_has_chi_distribution_with_one_degree_of_freedom:_, X_-_\mu, _/_\sigma_\sim_\chi_1. *_The_square_of_''X''/''σ''_has_the_noncentral_chi-squared_distribution_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_distribution, chi-squared. *_The_log_likelihood_of_a_normal_variable_x_is_simply_the_log_of_its__probability_density_function:_\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_distribution, chi-squared_variable. *_The_distribution_of_the_variable_''X''_restricted_to_an_interval_[''a'',_''b'']_is_called_the_truncated_normal_distribution. *_(''X''_−_''μ'')−2_has_a__Lévy_distribution_with_location_0_and_scale_''σ''−2.


_=_Operations_on_two_independent_normal_variables_

= *_If_X_1_and_X_2_are_two_independence_(probability_theory), independent_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,sum_of_normally_distributed_random_variables, [proof]_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. *_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_distribution, stable_(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#Independent_central-normal_distributions, product_distribution_with_density_function_f_Z(z)_=_\pi^_K_0(, z, )_where_K_0_is_the_Macdonald_function, modified_Bessel_function_of_the_second_kind._This_distribution_is_symmetric_around_zero,_unbounded_at_z_=_0,_and_has_the_ characteristic_function__\phi_Z(t)_=_(1_+_t^2)^. *_Their_ratio_follows_the_standard__Cauchy_distribution:_X_1/_X_2_\sim_\operatorname(0,_1). *_Their_Euclidean_norm_\sqrt_has_the_Rayleigh_distribution.


__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-squar ...
_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_is_independent_from_the_sample__standard_deviation,_which_can_be_demonstrated_using_Basu's_theorem_or_Cochran's_theorem._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 situ ...
_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_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_distribution, 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_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_(probability), infinite_divisibility. 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_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_...
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'',_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-squar ...
_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,_for_normal_distributions_the_sample_mean_\textstyle\hat\mu_and_the_sample_variance_''s''2_are_independence_(probability_theory), independent,_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 situ ...
_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_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_th_...
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,_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,_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_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_σ2,_the_conjugate_prior_distribution_is_also_normally_distributed. This_can_be_shown_more_easily_by_rewriting_the_variance_as_the__precision,_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_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_σ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;_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._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_(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._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 ques ...
._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_Φ−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_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_independence_(probability_theory), independent._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-squar ...
_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,_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].html" ;"title="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._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,_with_mean_0_and_standard_deviation_1/\sigma._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 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 ...
_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_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__cumulants_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 (statistician), Charles Stein, who first publ ...
_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_when_\sigma_=_0. However,_one_can_define_the_normal_distribution_with_zero_variance_as_a_ generalized_function;_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 argum ...
_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 ...
_with_ probability_density_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._A_function_with_two_ Lagrange_multipliers_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_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_statistics,_ scores,_and__estimators_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 ques ...
_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_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-squar ...
_\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 situ ...
_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 ser ...
s. This_theorem_can_also_be_used_to_justify_modeling_the_sum_of_many_uniform_noise_sources_as_ Gaussian_noise._See_ AWGN.


__Operations_and_functions_of_normal_variables_

The_ probability_density,_
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_function, 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-normal_distribution, log-normally:_. *_The_absolute_value_of_X_has_folded_normal_distribution:_._If_\mu_=_0_this_is_known_as_the_half-normal_distribution. *_The_absolute_value_of_normalized_residuals,_, ''X''_−_''μ'', /''σ'',_has_chi_distribution_with_one_degree_of_freedom:_, X_-_\mu, _/_\sigma_\sim_\chi_1. *_The_square_of_''X''/''σ''_has_the_noncentral_chi-squared_distribution_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_distribution, chi-squared. *_The_log_likelihood_of_a_normal_variable_x_is_simply_the_log_of_its__probability_density_function:_\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_distribution, chi-squared_variable. *_The_distribution_of_the_variable_''X''_restricted_to_an_interval_[''a'',_''b'']_is_called_the_truncated_normal_distribution. *_(''X''_−_''μ'')−2_has_a__Lévy_distribution_with_location_0_and_scale_''σ''−2.


_=_Operations_on_two_independent_normal_variables_

= *_If_X_1_and_X_2_are_two_independence_(probability_theory), independent_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,sum_of_normally_distributed_random_variables, [proof]_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. *_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_distribution, stable_(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#Independent_central-normal_distributions, product_distribution_with_density_function_f_Z(z)_=_\pi^_K_0(, z, )_where_K_0_is_the_Macdonald_function, modified_Bessel_function_of_the_second_kind._This_distribution_is_symmetric_around_zero,_unbounded_at_z_=_0,_and_has_the_ characteristic_function__\phi_Z(t)_=_(1_+_t^2)^. *_Their_ratio_follows_the_standard__Cauchy_distribution:_X_1/_X_2_\sim_\operatorname(0,_1). *_Their_Euclidean_norm_\sqrt_has_the_Rayleigh_distribution.


__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-squar ...
_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_is_independent_from_the_sample__standard_deviation,_which_can_be_demonstrated_using_Basu's_theorem_or_Cochran's_theorem._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 situ ...
_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_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_distribution, 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_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_(probability), infinite_divisibility. 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_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_...
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'',_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-squar ...
_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,_for_normal_distributions_the_sample_mean_\textstyle\hat\mu_and_the_sample_variance_''s''2_are_independence_(probability_theory), independent,_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 situ ...
_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_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_th_...
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,_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,_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_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_σ2,_the_conjugate_prior_distribution_is_also_normally_distributed. This_can_be_shown_more_easily_by_rewriting_the_variance_as_the__precision,_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_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_σ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;_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._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_(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._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 ques ...
._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_Φ−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_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_independence_(probability_theory), independent._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-squar ...
_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,_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].html" ;"title="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 functions _1F_1 and U. :\begin \operatorname\left[X^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[X \mid a 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. 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 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. 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 standard deviation 1/\sigma. In particular, the standard normal distribution \varphi is an Fourier transform#Eigenfunctions, 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 (probability theory), characteristic function \varphi_X(t) of that variable, which is defined as the expected value 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 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[e^] = \hat f(it) = e^ e^ 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 Since this is a quadratic polynomial in t, only the first two cumulants are nonzero, namely the mean \mu and the variance \sigma^2.


Stein operator and class

Within Stein's method 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 (mathematics), function when \sigma = 0. However, one can define the normal distribution with zero variance as a generalized function; specifically, as Dirac delta function, 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 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 probability distribution, maximum entropy. If X is a continuous random variable with probability density function, probability density 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. A function with two Lagrange multipliers 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 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 statistics, score (statistics), scores, and estimators 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 function (statistics), 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 B(n,p) is De Moivre–Laplace theorem, 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 with parameter \lambda is approximately normal with mean \lambda and variance \lambda, for large values of \lambda. * The chi-squared distribution \chi^2(k) is approximately normal with mean k and variance 2k, for large k. * The Student's t-distribution 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, improvements of the approximation are given by the Edgeworth expansions. This theorem can also be used to justify modeling the sum of many uniform noise sources as Gaussian noise. See AWGN.


Operations and functions of normal variables

The probability density function, probability density, cumulative distribution function, cumulative distribution, and inverse cumulative distribution function, 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-normal distribution, log-normally: . * The absolute value of X has folded normal distribution: . If \mu = 0 this is known as the half-normal distribution. * The absolute value of normalized residuals, , ''X'' − ''μ'', /''σ'', has chi distribution with one degree of freedom: , X - \mu, / \sigma \sim \chi_1. * The square of ''X''/''σ'' has the noncentral chi-squared distribution 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 distribution, chi-squared. * The log likelihood of a normal variable x is simply the log of its probability density function: \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 distribution, chi-squared variable. * The distribution of the variable ''X'' restricted to an interval [''a'', ''b''] is called the truncated normal distribution. * (''X'' − ''μ'')−2 has a Lévy distribution with location 0 and scale ''σ''−2.


= Operations on two independent normal variables

= * If X_1 and X_2 are two independence (probability theory), independent 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,sum of normally distributed random variables, [proof] 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. * 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 distribution, stable (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#Independent central-normal distributions, product distribution with density function f_Z(z) = \pi^ K_0(, z, ) where K_0 is the Macdonald function, modified Bessel function of the second kind. This distribution is symmetric around zero, unbounded at z = 0, and has the characteristic function (probability theory), characteristic function \phi_Z(t) = (1 + t^2)^. * Their ratio follows the standard Cauchy distribution: X_1/ X_2 \sim \operatorname(0, 1). * Their Euclidean norm \sqrt has the Rayleigh distribution.


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 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 is independent from the sample standard deviation, which can be demonstrated using Basu's theorem or Cochran's theorem. The ratio of these two quantities will have the Student's t-distribution 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 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 distribution, 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 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 (probability), infinite divisibility. 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 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 ...
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'', 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 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, for normal distributions the sample mean \textstyle\hat\mu and the sample variance ''s''2 are independence (probability theory), independent, 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 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 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 th ...
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, 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, 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 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 σ2, the conjugate prior distribution is also normally distributed. This can be shown more easily by rewriting the variance as the precision, 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 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 σ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; 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. 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 (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. 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. 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 Φ−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 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 independence (probability theory), independent. This formulation arises because for a bivariate normal random vector (''X'', ''Y'') the squared norm will have the chi-squared distribution 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, 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 functions _1F_1 and U. :\begin \operatorname\left[X^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[X \mid a 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. 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 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. 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 standard deviation 1/\sigma. In particular, the standard normal distribution \varphi is an Fourier transform#Eigenfunctions, 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 (probability theory), characteristic function \varphi_X(t) of that variable, which is defined as the expected value 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 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[e^] = \hat f(it) = e^ e^ 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 Since this is a quadratic polynomial in t, only the first two cumulants are nonzero, namely the mean \mu and the variance \sigma^2.


Stein operator and class

Within Stein's method 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 (mathematics), function when \sigma = 0. However, one can define the normal distribution with zero variance as a generalized function; specifically, as Dirac delta function, 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 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 probability distribution, maximum entropy. If X is a continuous random variable with probability density function, probability density 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. A function with two Lagrange multipliers 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 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 statistics, score (statistics), scores, and estimators 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 function (statistics), 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 B(n,p) is De Moivre–Laplace theorem, 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 with parameter \lambda is approximately normal with mean \lambda and variance \lambda, for large values of \lambda. * The chi-squared distribution \chi^2(k) is approximately normal with mean k and variance 2k, for large k. * The Student's t-distribution 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, improvements of the approximation are given by the Edgeworth expansions. This theorem can also be used to justify modeling the sum of many uniform noise sources as Gaussian noise. See AWGN.


Operations and functions of normal variables

The probability density function, probability density, cumulative distribution function, cumulative distribution, and inverse cumulative distribution function, 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-normal distribution, log-normally: . * The absolute value of X has folded normal distribution: . If \mu = 0 this is known as the half-normal distribution. * The absolute value of normalized residuals, , ''X'' − ''μ'', /''σ'', has chi distribution with one degree of freedom: , X - \mu, / \sigma \sim \chi_1. * The square of ''X''/''σ'' has the noncentral chi-squared distribution 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 distribution, chi-squared. * The log likelihood of a normal variable x is simply the log of its probability density function: \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 distribution, chi-squared variable. * The distribution of the variable ''X'' restricted to an interval [''a'', ''b''] is called the truncated normal distribution. * (''X'' − ''μ'')−2 has a Lévy distribution with location 0 and scale ''σ''−2.


= Operations on two independent normal variables

= * If X_1 and X_2 are two independence (probability theory), independent 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,sum of normally distributed random variables, [proof] 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. * 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 distribution, stable (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#Independent central-normal distributions, product distribution with density function f_Z(z) = \pi^ K_0(, z, ) where K_0 is the Macdonald function, modified Bessel function of the second kind. This distribution is symmetric around zero, unbounded at z = 0, and has the characteristic function (probability theory), characteristic function \phi_Z(t) = (1 + t^2)^. * Their ratio follows the standard Cauchy distribution: X_1/ X_2 \sim \operatorname(0, 1). * Their Euclidean norm \sqrt has the Rayleigh distribution.


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 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 is independent from the sample standard deviation, which can be demonstrated using Basu's theorem or Cochran's theorem. The ratio of these two quantities will have the Student's t-distribution 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 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 distribution, 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 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 (probability), infinite divisibility. 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 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 ...
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'', 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 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, for normal distributions the sample mean \textstyle\hat\mu and the sample variance ''s''2 are independence (probability theory), independent, 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 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 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 th ...
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, 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, 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 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 σ2, the conjugate prior distribution is also normally distributed. This can be shown more easily by rewriting the variance as the precision, 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 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 σ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; 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. 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 (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. 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. 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 Φ−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 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 independence (probability theory), independent. This formulation arises because for a bivariate normal random vector (''X'', ''Y'') the squared norm will have the chi-squared distribution 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, 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._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,_with_mean_0_and_standard_deviation_1/\sigma._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 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 ...
_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_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__cumulants_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 (statistician), Charles Stein, who first publ ...
_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_when_\sigma_=_0. However,_one_can_define_the_normal_distribution_with_zero_variance_as_a_ generalized_function;_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 argum ...
_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 ...
_with_ probability_density_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._A_function_with_two_ Lagrange_multipliers_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_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_statistics,_ scores,_and__estimators_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 ques ...
_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_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-squar ...
_\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 situ ...
_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 ser ...
s. This_theorem_can_also_be_used_to_justify_modeling_the_sum_of_many_uniform_noise_sources_as_ Gaussian_noise._See_ AWGN.


__Operations_and_functions_of_normal_variables_

The_ probability_density,_
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_function, 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-normal_distribution, log-normally:_. *_The_absolute_value_of_X_has_folded_normal_distribution:_._If_\mu_=_0_this_is_known_as_the_half-normal_distribution. *_The_absolute_value_of_normalized_residuals,_, ''X''_−_''μ'', /''σ'',_has_chi_distribution_with_one_degree_of_freedom:_, X_-_\mu, _/_\sigma_\sim_\chi_1. *_The_square_of_''X''/''σ''_has_the_noncentral_chi-squared_distribution_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_distribution, chi-squared. *_The_log_likelihood_of_a_normal_variable_x_is_simply_the_log_of_its__probability_density_function:_\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_distribution, chi-squared_variable. *_The_distribution_of_the_variable_''X''_restricted_to_an_interval_[''a'',_''b'']_is_called_the_truncated_normal_distribution. *_(''X''_−_''μ'')−2_has_a__Lévy_distribution_with_location_0_and_scale_''σ''−2.


_=_Operations_on_two_independent_normal_variables_

= *_If_X_1_and_X_2_are_two_independence_(probability_theory), independent_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,sum_of_normally_distributed_random_variables, [proof]_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. *_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_distribution, stable_(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#Independent_central-normal_distributions, product_distribution_with_density_function_f_Z(z)_=_\pi^_K_0(, z, )_where_K_0_is_the_Macdonald_function, modified_Bessel_function_of_the_second_kind._This_distribution_is_symmetric_around_zero,_unbounded_at_z_=_0,_and_has_the_ characteristic_function__\phi_Z(t)_=_(1_+_t^2)^. *_Their_ratio_follows_the_standard__Cauchy_distribution:_X_1/_X_2_\sim_\operatorname(0,_1). *_Their_Euclidean_norm_\sqrt_has_the_Rayleigh_distribution.


__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-squar ...
_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_is_independent_from_the_sample__standard_deviation,_which_can_be_demonstrated_using_Basu's_theorem_or_Cochran's_theorem._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 situ ...
_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_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_distribution, 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_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_(probability), infinite_divisibility. 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_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_...
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'',_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-squar ...
_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,_for_normal_distributions_the_sample_mean_\textstyle\hat\mu_and_the_sample_variance_''s''2_are_independence_(probability_theory), independent,_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 situ ...
_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_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_th_...
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,_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,_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_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_σ2,_the_conjugate_prior_distribution_is_also_normally_distributed. This_can_be_shown_more_easily_by_rewriting_the_variance_as_the__precision,_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_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_σ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;_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._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_(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._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 ques ...
._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_Φ−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_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_independence_(probability_theory), independent._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-squar ...
_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,_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].html" ;"title="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 functions _1F_1 and U. :\begin \operatorname\left[X^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[X \mid a 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. 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 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. 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 standard deviation 1/\sigma. In particular, the standard normal distribution \varphi is an Fourier transform#Eigenfunctions, 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 (probability theory), characteristic function \varphi_X(t) of that variable, which is defined as the expected value 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 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[e^] = \hat f(it) = e^ e^ 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 Since this is a quadratic polynomial in t, only the first two cumulants are nonzero, namely the mean \mu and the variance \sigma^2.


Stein operator and class

Within Stein's method 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 (mathematics), function when \sigma = 0. However, one can define the normal distribution with zero variance as a generalized function; specifically, as Dirac delta function, 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 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 probability distribution, maximum entropy. If X is a continuous random variable with probability density function, probability density 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. A function with two Lagrange multipliers 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 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 statistics, score (statistics), scores, and estimators 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 function (statistics), 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 B(n,p) is De Moivre–Laplace theorem, 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 with parameter \lambda is approximately normal with mean \lambda and variance \lambda, for large values of \lambda. * The chi-squared distribution \chi^2(k) is approximately normal with mean k and variance 2k, for large k. * The Student's t-distribution 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, improvements of the approximation are given by the Edgeworth expansions. This theorem can also be used to justify modeling the sum of many uniform noise sources as Gaussian noise. See AWGN.


Operations and functions of normal variables

The probability density function, probability density, cumulative distribution function, cumulative distribution, and inverse cumulative distribution function, 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-normal distribution, log-normally: . * The absolute value of X has folded normal distribution: . If \mu = 0 this is known as the half-normal distribution. * The absolute value of normalized residuals, , ''X'' − ''μ'', /''σ'', has chi distribution with one degree of freedom: , X - \mu, / \sigma \sim \chi_1. * The square of ''X''/''σ'' has the noncentral chi-squared distribution 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 distribution, chi-squared. * The log likelihood of a normal variable x is simply the log of its probability density function: \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 distribution, chi-squared variable. * The distribution of the variable ''X'' restricted to an interval [''a'', ''b''] is called the truncated normal distribution. * (''X'' − ''μ'')−2 has a Lévy distribution with location 0 and scale ''σ''−2.


= Operations on two independent normal variables

= * If X_1 and X_2 are two independence (probability theory), independent 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,sum of normally distributed random variables, [proof] 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. * 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 distribution, stable (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#Independent central-normal distributions, product distribution with density function f_Z(z) = \pi^ K_0(, z, ) where K_0 is the Macdonald function, modified Bessel function of the second kind. This distribution is symmetric around zero, unbounded at z = 0, and has the characteristic function (probability theory), characteristic function \phi_Z(t) = (1 + t^2)^. * Their ratio follows the standard Cauchy distribution: X_1/ X_2 \sim \operatorname(0, 1). * Their Euclidean norm \sqrt has the Rayleigh distribution.


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 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 is independent from the sample standard deviation, which can be demonstrated using Basu's theorem or Cochran's theorem. The ratio of these two quantities will have the Student's t-distribution 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 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 distribution, 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 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 (probability), infinite divisibility. 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 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 ...
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'', 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 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, for normal distributions the sample mean \textstyle\hat\mu and the sample variance ''s''2 are independence (probability theory), independent, 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 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 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 th ...
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, 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, 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 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 σ2, the conjugate prior distribution is also normally distributed. This can be shown more easily by rewriting the variance as the precision, 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 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 σ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; 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. 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 (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. 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. 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 Φ−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 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 independence (probability theory), independent. This formulation arises because for a bivariate normal random vector (''X'', ''Y'') the squared norm will have the chi-squared distribution 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, 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 functions _1F_1 and U. :\begin \operatorname\left[X^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[X \mid a 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. 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 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. 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 standard deviation 1/\sigma. In particular, the standard normal distribution \varphi is an Fourier transform#Eigenfunctions, 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 (probability theory), characteristic function \varphi_X(t) of that variable, which is defined as the expected value 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 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[e^] = \hat f(it) = e^ e^ 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 Since this is a quadratic polynomial in t, only the first two cumulants are nonzero, namely the mean \mu and the variance \sigma^2.


Stein operator and class

Within Stein's method 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 (mathematics), function when \sigma = 0. However, one can define the normal distribution with zero variance as a generalized function; specifically, as Dirac delta function, 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 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 probability distribution, maximum entropy. If X is a continuous random variable with probability density function, probability density 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. A function with two Lagrange multipliers 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 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 statistics, score (statistics), scores, and estimators 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 function (statistics), 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 B(n,p) is De Moivre–Laplace theorem, 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 with parameter \lambda is approximately normal with mean \lambda and variance \lambda, for large values of \lambda. * The chi-squared distribution \chi^2(k) is approximately normal with mean k and variance 2k, for large k. * The Student's t-distribution 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, improvements of the approximation are given by the Edgeworth expansions. This theorem can also be used to justify modeling the sum of many uniform noise sources as Gaussian noise. See AWGN.


Operations and functions of normal variables

The probability density function, probability density, cumulative distribution function, cumulative distribution, and inverse cumulative distribution function, 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-normal distribution, log-normally: . * The absolute value of X has folded normal distribution: . If \mu = 0 this is known as the half-normal distribution. * The absolute value of normalized residuals, , ''X'' − ''μ'', /''σ'', has chi distribution with one degree of freedom: , X - \mu, / \sigma \sim \chi_1. * The square of ''X''/''σ'' has the noncentral chi-squared distribution 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 distribution, chi-squared. * The log likelihood of a normal variable x is simply the log of its probability density function: \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 distribution, chi-squared variable. * The distribution of the variable ''X'' restricted to an interval [''a'', ''b''] is called the truncated normal distribution. * (''X'' − ''μ'')−2 has a Lévy distribution with location 0 and scale ''σ''−2.


= Operations on two independent normal variables

= * If X_1 and X_2 are two independence (probability theory), independent 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,sum of normally distributed random variables, [proof] 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. * 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 distribution, stable (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#Independent central-normal distributions, product distribution with density function f_Z(z) = \pi^ K_0(, z, ) where K_0 is the Macdonald function, modified Bessel function of the second kind. This distribution is symmetric around zero, unbounded at z = 0, and has the characteristic function (probability theory), characteristic function \phi_Z(t) = (1 + t^2)^. * Their ratio follows the standard Cauchy distribution: X_1/ X_2 \sim \operatorname(0, 1). * Their Euclidean norm \sqrt has the Rayleigh distribution.


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 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 is independent from the sample standard deviation, which can be demonstrated using Basu's theorem or Cochran's theorem. The ratio of these two quantities will have the Student's t-distribution 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 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 distribution, 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 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 (probability), infinite divisibility. 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 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 ...
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'', 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 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, for normal distributions the sample mean \textstyle\hat\mu and the sample variance ''s''2 are independence (probability theory), independent, 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 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 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 th ...
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, 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, 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 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 σ2, the conjugate prior distribution is also normally distributed. This can be shown more easily by rewriting the variance as the precision, 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 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 σ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; 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. 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 (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. 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. 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 Φ−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 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 independence (probability theory), independent. This formulation arises because for a bivariate normal random vector (''X'', ''Y'') the squared norm will have the chi-squared distribution 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, 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 (mathematics), function when \sigma = 0. However, one can define the normal distribution with zero variance as a generalized function; specifically, as Dirac delta function, 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 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 probability distribution, maximum entropy. If X is a continuous random variable with probability density function, probability density 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. A function with two Lagrange multipliers 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 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 statistics, score (statistics), scores, and estimators 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 function (statistics), 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 B(n,p) is De Moivre–Laplace theorem, 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 with parameter \lambda is approximately normal with mean \lambda and variance \lambda, for large values of \lambda. * The chi-squared distribution \chi^2(k) is approximately normal with mean k and variance 2k, for large k. * The Student's t-distribution 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, improvements of the approximation are given by the Edgeworth expansions. This theorem can also be used to justify modeling the sum of many uniform noise sources as Gaussian noise. See AWGN.


Operations and functions of normal variables

The probability density function, probability density, cumulative distribution function, cumulative distribution, and inverse cumulative distribution function, 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-normal distribution, log-normally: . * The absolute value of X has folded normal distribution: . If \mu = 0 this is known as the half-normal distribution. * The absolute value of normalized residuals, , ''X'' − ''μ'', /''σ'', has chi distribution with one degree of freedom: , X - \mu, / \sigma \sim \chi_1. * The square of ''X''/''σ'' has the noncentral chi-squared distribution 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 distribution, chi-squared. * The log likelihood of a normal variable x is simply the log of its probability density function: \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 distribution, chi-squared variable. * The distribution of the variable ''X'' restricted to an interval [''a'', ''b''] is called the truncated normal distribution. * (''X'' − ''μ'')−2 has a Lévy distribution with location 0 and scale ''σ''−2.


= Operations on two independent normal variables

= * If X_1 and X_2 are two independence (probability theory), independent 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,sum of normally distributed random variables, [proof] 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. * 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 distribution, stable (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#Independent central-normal distributions, product distribution with density function f_Z(z) = \pi^ K_0(, z, ) where K_0 is the Macdonald function, modified Bessel function of the second kind. This distribution is symmetric around zero, unbounded at z = 0, and has the characteristic function (probability theory), characteristic function \phi_Z(t) = (1 + t^2)^. * Their ratio follows the standard Cauchy distribution: X_1/ X_2 \sim \operatorname(0, 1). * Their Euclidean norm \sqrt has the Rayleigh distribution.


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 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 is independent from the sample standard deviation, which can be demonstrated using Basu's theorem or Cochran's theorem. The ratio of these two quantities will have the Student's t-distribution 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 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 distribution, 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 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 (probability), infinite divisibility. 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 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 ...
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'', 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 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, for normal distributions the sample mean \textstyle\hat\mu and the sample variance ''s''2 are independence (probability theory), independent, 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 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 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 th ...
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, 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, 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 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 σ2, the conjugate prior distribution is also normally distributed. This can be shown more easily by rewriting the variance as the precision, 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 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 σ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; 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. 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 (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. 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. 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 Φ−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 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 independence (probability theory), independent. This formulation arises because for a bivariate normal random vector (''X'', ''Y'') the squared norm will have the chi-squared distribution 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, 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 functions _1F_1 and U. :\begin \operatorname\left[X^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[X \mid a 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. 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 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. 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 standard deviation 1/\sigma. In particular, the standard normal distribution \varphi is an Fourier transform#Eigenfunctions, 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 (probability theory), characteristic function \varphi_X(t) of that variable, which is defined as the expected value 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 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[e^] = \hat f(it) = e^ e^ 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 Since this is a quadratic polynomial in t, only the first two cumulants are nonzero, namely the mean \mu and the variance \sigma^2.


Stein operator and class

Within Stein's method 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_when_\sigma_=_0. However,_one_can_define_the_normal_distribution_with_zero_variance_as_a_ generalized_function;_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 argum ...
_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 ...
_with_ probability_density_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._A_function_with_two_ Lagrange_multipliers_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_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_statistics,_ scores,_and__estimators_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 ques ...
_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_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-squar ...
_\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 situ ...
_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 ser ...
s. This_theorem_can_also_be_used_to_justify_modeling_the_sum_of_many_uniform_noise_sources_as_ Gaussian_noise._See_ AWGN.


__Operations_and_functions_of_normal_variables_

The_ probability_density,_
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_function, 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-normal_distribution, log-normally:_. *_The_absolute_value_of_X_has_folded_normal_distribution:_._If_\mu_=_0_this_is_known_as_the_half-normal_distribution. *_The_absolute_value_of_normalized_residuals,_, ''X''_−_''μ'', /''σ'',_has_chi_distribution_with_one_degree_of_freedom:_, X_-_\mu, _/_\sigma_\sim_\chi_1. *_The_square_of_''X''/''σ''_has_the_noncentral_chi-squared_distribution_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_distribution, chi-squared. *_The_log_likelihood_of_a_normal_variable_x_is_simply_the_log_of_its__probability_density_function:_\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_distribution, chi-squared_variable. *_The_distribution_of_the_variable_''X''_restricted_to_an_interval_[''a'',_''b'']_is_called_the_truncated_normal_distribution. *_(''X''_−_''μ'')−2_has_a__Lévy_distribution_with_location_0_and_scale_''σ''−2.


_=_Operations_on_two_independent_normal_variables_

= *_If_X_1_and_X_2_are_two_independence_(probability_theory), independent_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,sum_of_normally_distributed_random_variables, [proof]_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. *_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_distribution, stable_(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#Independent_central-normal_distributions, product_distribution_with_density_function_f_Z(z)_=_\pi^_K_0(, z, )_where_K_0_is_the_Macdonald_function, modified_Bessel_function_of_the_second_kind._This_distribution_is_symmetric_around_zero,_unbounded_at_z_=_0,_and_has_the__characteristic_function__\phi_Z(t)_=_(1_+_t^2)^. *_Their_ratio_follows_the_standard__Cauchy_distribution:_X_1/_X_2_\sim_\operatorname(0,_1). *_Their_Euclidean_norm_\sqrt_has_the_Rayleigh_distribution.


__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-squar ...
_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_is_independent_from_the_sample__standard_deviation,_which_can_be_demonstrated_using_Basu's_theorem_or_Cochran's_theorem._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 situ ...
_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_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_distribution, 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_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_(probability), infinite_divisibility. 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_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_...
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'',_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-squar ...
_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,_for_normal_distributions_the_sample_mean_\textstyle\hat\mu_and_the_sample_variance_''s''2_are_independence_(probability_theory), independent,_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 situ ...
_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_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_th_...
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,_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,_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_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_σ2,_the_conjugate_prior_distribution_is_also_normally_distributed. This_can_be_shown_more_easily_by_rewriting_the_variance_as_the__precision,_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_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_σ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;_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._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_(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._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 ques ...
._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_Φ−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_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_independence_(probability_theory), independent._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-squar ...
_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,_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].html"_;"title="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_functions__1F_1_and_U. :\begin ___\operatorname\left[X^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._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,_with_mean_0_and_standard_deviation_1/\sigma._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_ 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__...
_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_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__cumulants_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_(statistician),_Charles_Stein,_who_first_publ_...
_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_when_\sigma_=_0. However,_one_can_define_the_normal_distribution_with_zero_variance_as_a_ generalized_function;_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 argum ...
_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 ...
_with_ probability_density_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._A_function_with_two_ Lagrange_multipliers_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_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_statistics,_ scores,_and__estimators_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 ques ...
_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_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-squar ...
_\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 situ ...
_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 ser ...
s. This_theorem_can_also_be_used_to_justify_modeling_the_sum_of_many_uniform_noise_sources_as_ Gaussian_noise._See_ AWGN.


__Operations_and_functions_of_normal_variables_

The_ probability_density,_
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_function, 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-normal_distribution, log-normally:_. *_The_absolute_value_of_X_has_folded_normal_distribution:_._If_\mu_=_0_this_is_known_as_the_half-normal_distribution. *_The_absolute_value_of_normalized_residuals,_, ''X''_−_''μ'', /''σ'',_has_chi_distribution_with_one_degree_of_freedom:_, X_-_\mu, _/_\sigma_\sim_\chi_1. *_The_square_of_''X''/''σ''_has_the_noncentral_chi-squared_distribution_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_distribution, chi-squared. *_The_log_likelihood_of_a_normal_variable_x_is_simply_the_log_of_its__probability_density_function:_\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_distribution, chi-squared_variable. *_The_distribution_of_the_variable_''X''_restricted_to_an_interval_[''a'',_''b'']_is_called_the_truncated_normal_distribution. *_(''X''_−_''μ'')−2_has_a__Lévy_distribution_with_location_0_and_scale_''σ''−2.


_=_Operations_on_two_independent_normal_variables_

= *_If_X_1_and_X_2_are_two_independence_(probability_theory), independent_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,sum_of_normally_distributed_random_variables, [proof]_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. *_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_distribution, stable_(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#Independent_central-normal_distributions, product_distribution_with_density_function_f_Z(z)_=_\pi^_K_0(, z, )_where_K_0_is_the_Macdonald_function, modified_Bessel_function_of_the_second_kind._This_distribution_is_symmetric_around_zero,_unbounded_at_z_=_0,_and_has_the__characteristic_function__\phi_Z(t)_=_(1_+_t^2)^. *_Their_ratio_follows_the_standard__Cauchy_distribution:_X_1/_X_2_\sim_\operatorname(0,_1). *_Their_Euclidean_norm_\sqrt_has_the_Rayleigh_distribution.


__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-squar ...
_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_is_independent_from_the_sample__standard_deviation,_which_can_be_demonstrated_using_Basu's_theorem_or_Cochran's_theorem._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 situ ...
_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_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_distribution, 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_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_(probability), infinite_divisibility. 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_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_...
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'',_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-squar ...
_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,_for_normal_distributions_the_sample_mean_\textstyle\hat\mu_and_the_sample_variance_''s''2_are_independence_(probability_theory), independent,_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 situ ...
_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_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_th_...
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,_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,_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_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_σ2,_the_conjugate_prior_distribution_is_also_normally_distributed. This_can_be_shown_more_easily_by_rewriting_the_variance_as_the__precision,_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_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_σ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;_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._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_(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._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 ques ...
._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_Φ−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_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_independence_(probability_theory), independent._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-squar ...
_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,_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_functions__1F_1_and_U. :\begin ___\operatorname\left[X^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._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,_with_mean_0_and_standard_deviation_1/\sigma._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_ 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__...
_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_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__cumulants_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_(statistician),_Charles_Stein,_who_first_publ_...
_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_when_\sigma_=_0. However,_one_can_define_the_normal_distribution_with_zero_variance_as_a_ generalized_function;_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 argum ...
_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 ...
_with_ probability_density_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._A_function_with_two_ Lagrange_multipliers_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_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_statistics,_ scores,_and__estimators_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 ques ...
_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_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-squar ...
_\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 situ ...
_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 ser ...
s. This_theorem_can_also_be_used_to_justify_modeling_the_sum_of_many_uniform_noise_sources_as_ Gaussian_noise._See_ AWGN.


__Operations_and_functions_of_normal_variables_

The_ probability_density,_
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_function, 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-normal_distribution, log-normally:_. *_The_absolute_value_of_X_has_folded_normal_distribution:_._If_\mu_=_0_this_is_known_as_the_half-normal_distribution. *_The_absolute_value_of_normalized_residuals,_, ''X''_−_''μ'', /''σ'',_has_chi_distribution_with_one_degree_of_freedom:_, X_-_\mu, _/_\sigma_\sim_\chi_1. *_The_square_of_''X''/''σ''_has_the_noncentral_chi-squared_distribution_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_distribution, chi-squared. *_The_log_likelihood_of_a_normal_variable_x_is_simply_the_log_of_its__probability_density_function:_\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_distribution, chi-squared_variable. *_The_distribution_of_the_variable_''X''_restricted_to_an_interval_[''a'',_''b'']_is_called_the_truncated_normal_distribution. *_(''X''_−_''μ'')−2_has_a__Lévy_distribution_with_location_0_and_scale_''σ''−2.


_=_Operations_on_two_independent_normal_variables_

= *_If_X_1_and_X_2_are_two_independence_(probability_theory), independent_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,sum_of_normally_distributed_random_variables, [proof]_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. *_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_distribution, stable_(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#Independent_central-normal_distributions, product_distribution_with_density_function_f_Z(z)_=_\pi^_K_0(, z, )_where_K_0_is_the_Macdonald_function, modified_Bessel_function_of_the_second_kind._This_distribution_is_symmetric_around_zero,_unbounded_at_z_=_0,_and_has_the__characteristic_function__\phi_Z(t)_=_(1_+_t^2)^. *_Their_ratio_follows_the_standard__Cauchy_distribution:_X_1/_X_2_\sim_\operatorname(0,_1). *_Their_Euclidean_norm_\sqrt_has_the_Rayleigh_distribution.


__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-squar ...
_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_is_independent_from_the_sample__standard_deviation,_which_can_be_demonstrated_using_Basu's_theorem_or_Cochran's_theorem._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 situ ...
_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_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_distribution, 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_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_(probability), infinite_divisibility. 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_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_...
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'',_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-squar ...
_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,_for_normal_distributions_the_sample_mean_\textstyle\hat\mu_and_the_sample_variance_''s''2_are_independence_(probability_theory), independent,_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 situ ...
_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_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_th_...
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,_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,_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_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_σ2,_the_conjugate_prior_distribution_is_also_normally_distributed. This_can_be_shown_more_easily_by_rewriting_the_variance_as_the__precision,_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_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_σ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;_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._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_(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._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 ques ...
._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_Φ−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_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_independence_(probability_theory), independent._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-squar ...
_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,_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].html"_;"title="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._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,_with_mean_0_and_standard_deviation_1/\sigma._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_ 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__...
_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_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__cumulants_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_(statistician),_Charles_Stein,_who_first_publ_...
_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_when_\sigma_=_0. However,_one_can_define_the_normal_distribution_with_zero_variance_as_a_ generalized_function;_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 argum ...
_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 ...
_with_ probability_density_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._A_function_with_two_ Lagrange_multipliers_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_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_statistics,_ scores,_and__estimators_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 ques ...
_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_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-squar ...
_\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 situ ...
_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 ser ...
s. This_theorem_can_also_be_used_to_justify_modeling_the_sum_of_many_uniform_noise_sources_as_ Gaussian_noise._See_ AWGN.


__Operations_and_functions_of_normal_variables_

The_ probability_density,_
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_function, 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-normal_distribution, log-normally:_. *_The_absolute_value_of_X_has_folded_normal_distribution:_._If_\mu_=_0_this_is_known_as_the_half-normal_distribution. *_The_absolute_value_of_normalized_residuals,_, ''X''_−_''μ'', /''σ'',_has_chi_distribution_with_one_degree_of_freedom:_, X_-_\mu, _/_\sigma_\sim_\chi_1. *_The_square_of_''X''/''σ''_has_the_noncentral_chi-squared_distribution_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_distribution, chi-squared. *_The_log_likelihood_of_a_normal_variable_x_is_simply_the_log_of_its__probability_density_function:_\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_distribution, chi-squared_variable. *_The_distribution_of_the_variable_''X''_restricted_to_an_interval_[''a'',_''b'']_is_called_the_truncated_normal_distribution. *_(''X''_−_''μ'')−2_has_a__Lévy_distribution_with_location_0_and_scale_''σ''−2.


_=_Operations_on_two_independent_normal_variables_

= *_If_X_1_and_X_2_are_two_independence_(probability_theory), independent_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,sum_of_normally_distributed_random_variables, [proof]_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. *_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_distribution, stable_(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#Independent_central-normal_distributions, product_distribution_with_density_function_f_Z(z)_=_\pi^_K_0(, z, )_where_K_0_is_the_Macdonald_function, modified_Bessel_function_of_the_second_kind._This_distribution_is_symmetric_around_zero,_unbounded_at_z_=_0,_and_has_the__characteristic_function__\phi_Z(t)_=_(1_+_t^2)^. *_Their_ratio_follows_the_standard__Cauchy_distribution:_X_1/_X_2_\sim_\operatorname(0,_1). *_Their_Euclidean_norm_\sqrt_has_the_Rayleigh_distribution.


__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-squar ...
_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_is_independent_from_the_sample__standard_deviation,_which_can_be_demonstrated_using_Basu's_theorem_or_Cochran's_theorem._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 situ ...
_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_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_distribution, 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_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_(probability), infinite_divisibility. 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_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_...
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'',_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-squar ...
_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,_for_normal_distributions_the_sample_mean_\textstyle\hat\mu_and_the_sample_variance_''s''2_are_independence_(probability_theory), independent,_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 situ ...
_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_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_th_...
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,_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,_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_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_σ2,_the_conjugate_prior_distribution_is_also_normally_distributed. This_can_be_shown_more_easily_by_rewriting_the_variance_as_the__precision,_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_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_σ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;_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._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_(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._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 ques ...
._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_Φ−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_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_independence_(probability_theory), independent._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-squar ...
_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,_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].html"_;"title="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_functions__1F_1_and_U. :\begin ___\operatorname\left[X^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[X_\mid_a 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._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_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._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_standard_deviation_1/\sigma._In_particular,_the_standard_normal_distribution_\varphi_is_an_Fourier_transform#Eigenfunctions, 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_(probability_theory), characteristic_function_\varphi_X(t)_of_that_variable,_which_is_defined_as_the_expected_value_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_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[e^]_=_\hat_f(it)_=_e^_e^ 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 Since_this_is_a_quadratic_polynomial_in_t,_only_the_first_two__cumulants_are_nonzero,_namely_the_mean \mu_and_the_variance \sigma^2.


__Stein_operator_and_class_

Within_Stein's_method_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_when_\sigma_=_0. However,_one_can_define_the_normal_distribution_with_zero_variance_as_a_ generalized_function;_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 argum ...
_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 ...
_with_ probability_density_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._A_function_with_two_ Lagrange_multipliers_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_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_statistics,_ scores,_and__estimators_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 ques ...
_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_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-squar ...
_\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 situ ...
_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 ser ...
s. This_theorem_can_also_be_used_to_justify_modeling_the_sum_of_many_uniform_noise_sources_as_ Gaussian_noise._See_ AWGN.


__Operations_and_functions_of_normal_variables_

The_ probability_density,_
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_function, 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-normal_distribution, log-normally:_. *_The_absolute_value_of_X_has_folded_normal_distribution:_._If_\mu_=_0_this_is_known_as_the_half-normal_distribution. *_The_absolute_value_of_normalized_residuals,_, ''X''_−_''μ'', /''σ'',_has_chi_distribution_with_one_degree_of_freedom:_, X_-_\mu, _/_\sigma_\sim_\chi_1. *_The_square_of_''X''/''σ''_has_the_noncentral_chi-squared_distribution_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_distribution, chi-squared. *_The_log_likelihood_of_a_normal_variable_x_is_simply_the_log_of_its__probability_density_function:_\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_distribution, chi-squared_variable. *_The_distribution_of_the_variable_''X''_restricted_to_an_interval_[''a'',_''b'']_is_called_the_truncated_normal_distribution. *_(''X''_−_''μ'')−2_has_a__Lévy_distribution_with_location_0_and_scale_''σ''−2.


_=_Operations_on_two_independent_normal_variables_

= *_If_X_1_and_X_2_are_two_independence_(probability_theory), independent_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,sum_of_normally_distributed_random_variables, [proof]_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. *_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_distribution, stable_(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#Independent_central-normal_distributions, product_distribution_with_density_function_f_Z(z)_=_\pi^_K_0(, z, )_where_K_0_is_the_Macdonald_function, modified_Bessel_function_of_the_second_kind._This_distribution_is_symmetric_around_zero,_unbounded_at_z_=_0,_and_has_the_characteristic_function_(probability_theory), characteristic_function__\phi_Z(t)_=_(1_+_t^2)^. *_Their_ratio_follows_the_standard__Cauchy_distribution:_X_1/_X_2_\sim_\operatorname(0,_1). *_Their_Euclidean_norm_\sqrt_has_the_Rayleigh_distribution.


__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-squar ...
_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_is_independent_from_the_sample__standard_deviation,_which_can_be_demonstrated_using_Basu's_theorem_or_Cochran's_theorem._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 situ ...
_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_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_distribution, 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_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_(probability), infinite_divisibility. 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_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_...
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'',_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-squar ...
_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,_for_normal_distributions_the_sample_mean_\textstyle\hat\mu_and_the_sample_variance_''s''2_are_independence_(probability_theory), independent,_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 situ ...
_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_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_th_...
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,_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,_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_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_σ2,_the_conjugate_prior_distribution_is_also_normally_distributed. This_can_be_shown_more_easily_by_rewriting_the_variance_as_the__precision,_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_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_σ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;_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._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_(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._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 ques ...
._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_Φ−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_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_independence_(probability_theory), independent._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-squar ...
_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,_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_functions__1F_1_and_U. :\begin ___\operatorname\left[X^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[X_\mid_a 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._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_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._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_standard_deviation_1/\sigma._In_particular,_the_standard_normal_distribution_\varphi_is_an_Fourier_transform#Eigenfunctions, 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_(probability_theory), characteristic_function_\varphi_X(t)_of_that_variable,_which_is_defined_as_the_expected_value_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_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[e^]_=_\hat_f(it)_=_e^_e^ 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 Since_this_is_a_quadratic_polynomial_in_t,_only_the_first_two__cumulants_are_nonzero,_namely_the_mean \mu_and_the_variance \sigma^2.


__Stein_operator_and_class_

Within_Stein's_method_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_when_\sigma_=_0. However,_one_can_define_the_normal_distribution_with_zero_variance_as_a_ generalized_function;_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 argum ...
_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 ...
_with_ probability_density_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._A_function_with_two_ Lagrange_multipliers_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_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_statistics,_ scores,_and__estimators_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 ques ...
_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_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-squar ...
_\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 situ ...
_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 ser ...
s. This_theorem_can_also_be_used_to_justify_modeling_the_sum_of_many_uniform_noise_sources_as_ Gaussian_noise._See_ AWGN.


__Operations_and_functions_of_normal_variables_

The_ probability_density,_
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_function, 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-normal_distribution, log-normally:_. *_The_absolute_value_of_X_has_folded_normal_distribution:_._If_\mu_=_0_this_is_known_as_the_half-normal_distribution. *_The_absolute_value_of_normalized_residuals,_, ''X''_−_''μ'', /''σ'',_has_chi_distribution_with_one_degree_of_freedom:_, X_-_\mu, _/_\sigma_\sim_\chi_1. *_The_square_of_''X''/''σ''_has_the_noncentral_chi-squared_distribution_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_distribution, chi-squared. *_The_log_likelihood_of_a_normal_variable_x_is_simply_the_log_of_its__probability_density_function:_\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_distribution, chi-squared_variable. *_The_distribution_of_the_variable_''X''_restricted_to_an_interval_[''a'',_''b'']_is_called_the_truncated_normal_distribution. *_(''X''_−_''μ'')−2_has_a__Lévy_distribution_with_location_0_and_scale_''σ''−2.


_=_Operations_on_two_independent_normal_variables_

= *_If_X_1_and_X_2_are_two_independence_(probability_theory), independent_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,sum_of_normally_distributed_random_variables, [proof]_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. *_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_distribution, stable_(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#Independent_central-normal_distributions, product_distribution_with_density_function_f_Z(z)_=_\pi^_K_0(, z, )_where_K_0_is_the_Macdonald_function, modified_Bessel_function_of_the_second_kind._This_distribution_is_symmetric_around_zero,_unbounded_at_z_=_0,_and_has_the_characteristic_function_(probability_theory), characteristic_function__\phi_Z(t)_=_(1_+_t^2)^. *_Their_ratio_follows_the_standard__Cauchy_distribution:_X_1/_X_2_\sim_\operatorname(0,_1). *_Their_Euclidean_norm_\sqrt_has_the_Rayleigh_distribution.


__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-squar ...
_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_is_independent_from_the_sample__standard_deviation,_which_can_be_demonstrated_using_Basu's_theorem_or_Cochran's_theorem._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 situ ...
_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_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_distribution, 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_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_(probability), infinite_divisibility. 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_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_...
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'',_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-squar ...
_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,_for_normal_distributions_the_sample_mean_\textstyle\hat\mu_and_the_sample_variance_''s''2_are_independence_(probability_theory), independent,_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 situ ...
_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_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_th_...
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,_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,_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_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_σ2,_the_conjugate_prior_distribution_is_also_normally_distributed. This_can_be_shown_more_easily_by_rewriting_the_variance_as_the__precision,_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_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_σ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;_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._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_(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._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 ques ...
._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_Φ−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_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_independence_(probability_theory), independent._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-squar ...
_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,_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._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,_with_mean_0_and_standard_deviation_1/\sigma._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_ 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__...
_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_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__cumulants_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_(statistician),_Charles_Stein,_who_first_publ_...
_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_when_\sigma_=_0. However,_one_can_define_the_normal_distribution_with_zero_variance_as_a_ generalized_function;_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 argum ...
_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 ...
_with_ probability_density_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._A_function_with_two_ Lagrange_multipliers_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_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_statistics,_ scores,_and__estimators_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 ques ...
_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_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-squar ...
_\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 situ ...
_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 ser ...
s. This_theorem_can_also_be_used_to_justify_modeling_the_sum_of_many_uniform_noise_sources_as_ Gaussian_noise._See_ AWGN.


__Operations_and_functions_of_normal_variables_

The_ probability_density,_
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_function, 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-normal_distribution, log-normally:_. *_The_absolute_value_of_X_has_folded_normal_distribution:_._If_\mu_=_0_this_is_known_as_the_half-normal_distribution. *_The_absolute_value_of_normalized_residuals,_, ''X''_−_''μ'', /''σ'',_has_chi_distribution_with_one_degree_of_freedom:_, X_-_\mu, _/_\sigma_\sim_\chi_1. *_The_square_of_''X''/''σ''_has_the_noncentral_chi-squared_distribution_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_distribution, chi-squared. *_The_log_likelihood_of_a_normal_variable_x_is_simply_the_log_of_its__probability_density_function:_\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_distribution, chi-squared_variable. *_The_distribution_of_the_variable_''X''_restricted_to_an_interval_[''a'',_''b'']_is_called_the_truncated_normal_distribution. *_(''X''_−_''μ'')−2_has_a__Lévy_distribution_with_location_0_and_scale_''σ''−2.


_=_Operations_on_two_independent_normal_variables_

= *_If_X_1_and_X_2_are_two_independence_(probability_theory), independent_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,sum_of_normally_distributed_random_variables, [proof]_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. *_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_distribution, stable_(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#Independent_central-normal_distributions, product_distribution_with_density_function_f_Z(z)_=_\pi^_K_0(, z, )_where_K_0_is_the_Macdonald_function, modified_Bessel_function_of_the_second_kind._This_distribution_is_symmetric_around_zero,_unbounded_at_z_=_0,_and_has_the__characteristic_function__\phi_Z(t)_=_(1_+_t^2)^. *_Their_ratio_follows_the_standard__Cauchy_distribution:_X_1/_X_2_\sim_\operatorname(0,_1). *_Their_Euclidean_norm_\sqrt_has_the_Rayleigh_distribution.


__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-squar ...
_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_is_independent_from_the_sample__standard_deviation,_which_can_be_demonstrated_using_Basu's_theorem_or_Cochran's_theorem._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 situ ...
_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_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_distribution, 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_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_(probability), infinite_divisibility. 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_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_...
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'',_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-squar ...
_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,_for_normal_distributions_the_sample_mean_\textstyle\hat\mu_and_the_sample_variance_''s''2_are_independence_(probability_theory), independent,_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 situ ...
_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_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_th_...
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,_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,_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_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_σ2,_the_conjugate_prior_distribution_is_also_normally_distributed. This_can_be_shown_more_easily_by_rewriting_the_variance_as_the__precision,_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_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_σ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;_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._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_(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._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 ques ...
._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_Φ−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_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_independence_(probability_theory), independent._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-squar ...
_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,_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].html"_;"title="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_functions__1F_1_and_U. :\begin ___\operatorname\left[X^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[X_\mid_a 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._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_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._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_standard_deviation_1/\sigma._In_particular,_the_standard_normal_distribution_\varphi_is_an_Fourier_transform#Eigenfunctions, 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_(probability_theory), characteristic_function_\varphi_X(t)_of_that_variable,_which_is_defined_as_the_expected_value_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_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[e^]_=_\hat_f(it)_=_e^_e^ 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 Since_this_is_a_quadratic_polynomial_in_t,_only_the_first_two__cumulants_are_nonzero,_namely_the_mean \mu_and_the_variance \sigma^2.


__Stein_operator_and_class_

Within_Stein's_method_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_when_\sigma_=_0. However,_one_can_define_the_normal_distribution_with_zero_variance_as_a_ generalized_function;_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 argum ...
_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 ...
_with_ probability_density_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._A_function_with_two_ Lagrange_multipliers_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_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_statistics,_ scores,_and__estimators_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 ques ...
_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_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-squar ...
_\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 situ ...
_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 ser ...
s. This_theorem_can_also_be_used_to_justify_modeling_the_sum_of_many_uniform_noise_sources_as_ Gaussian_noise._See_ AWGN.


__Operations_and_functions_of_normal_variables_

The_ probability_density,_
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_function, 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-normal_distribution, log-normally:_. *_The_absolute_value_of_X_has_folded_normal_distribution:_._If_\mu_=_0_this_is_known_as_the_half-normal_distribution. *_The_absolute_value_of_normalized_residuals,_, ''X''_−_''μ'', /''σ'',_has_chi_distribution_with_one_degree_of_freedom:_, X_-_\mu, _/_\sigma_\sim_\chi_1. *_The_square_of_''X''/''σ''_has_the_noncentral_chi-squared_distribution_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_distribution, chi-squared. *_The_log_likelihood_of_a_normal_variable_x_is_simply_the_log_of_its__probability_density_function:_\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_distribution, chi-squared_variable. *_The_distribution_of_the_variable_''X''_restricted_to_an_interval_[''a'',_''b'']_is_called_the_truncated_normal_distribution. *_(''X''_−_''μ'')−2_has_a__Lévy_distribution_with_location_0_and_scale_''σ''−2.


_=_Operations_on_two_independent_normal_variables_

= *_If_X_1_and_X_2_are_two_independence_(probability_theory), independent_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,sum_of_normally_distributed_random_variables, [proof]_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. *_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_distribution, stable_(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#Independent_central-normal_distributions, product_distribution_with_density_function_f_Z(z)_=_\pi^_K_0(, z, )_where_K_0_is_the_Macdonald_function, modified_Bessel_function_of_the_second_kind._This_distribution_is_symmetric_around_zero,_unbounded_at_z_=_0,_and_has_the_characteristic_function_(probability_theory), characteristic_function__\phi_Z(t)_=_(1_+_t^2)^. *_Their_ratio_follows_the_standard__Cauchy_distribution:_X_1/_X_2_\sim_\operatorname(0,_1). *_Their_Euclidean_norm_\sqrt_has_the_Rayleigh_distribution.


__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-squar ...
_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_is_independent_from_the_sample__standard_deviation,_which_can_be_demonstrated_using_Basu's_theorem_or_Cochran's_theorem._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 situ ...
_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_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_distribution, 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_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_(probability), infinite_divisibility. 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_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_...
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'',_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-squar ...
_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,_for_normal_distributions_the_sample_mean_\textstyle\hat\mu_and_the_sample_variance_''s''2_are_independence_(probability_theory), independent,_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 situ ...
_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_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_th_...
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,_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,_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_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_σ2,_the_conjugate_prior_distribution_is_also_normally_distributed. This_can_be_shown_more_easily_by_rewriting_the_variance_as_the__precision,_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_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_σ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;_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._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_(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._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 ques ...
._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_Φ−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_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_independence_(probability_theory), independent._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-squar ...
_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,_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_functions__1F_1_and_U. :\begin ___\operatorname\left[X^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[X_\mid_a 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._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_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._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_standard_deviation_1/\sigma._In_particular,_the_standard_normal_distribution_\varphi_is_an_Fourier_transform#Eigenfunctions, 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_(probability_theory), characteristic_function_\varphi_X(t)_of_that_variable,_which_is_defined_as_the_expected_value_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_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[e^]_=_\hat_f(it)_=_e^_e^ 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 Since_this_is_a_quadratic_polynomial_in_t,_only_the_first_two__cumulants_are_nonzero,_namely_the_mean \mu_and_the_variance \sigma^2.


__Stein_operator_and_class_

Within_Stein's_method_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_when_\sigma_=_0. However,_one_can_define_the_normal_distribution_with_zero_variance_as_a_ generalized_function;_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 argum ...
_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 ...
_with_ probability_density_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._A_function_with_two_ Lagrange_multipliers_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_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_statistics,_ scores,_and__estimators_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 ques ...
_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_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-squar ...
_\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 situ ...
_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 ser ...
s. This_theorem_can_also_be_used_to_justify_modeling_the_sum_of_many_uniform_noise_sources_as_ Gaussian_noise._See_ AWGN.


__Operations_and_functions_of_normal_variables_

The_ probability_density,_
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_function, 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-normal_distribution, log-normally:_. *_The_absolute_value_of_X_has_folded_normal_distribution:_._If_\mu_=_0_this_is_known_as_the_half-normal_distribution. *_The_absolute_value_of_normalized_residuals,_, ''X''_−_''μ'', /''σ'',_has_chi_distribution_with_one_degree_of_freedom:_, X_-_\mu, _/_\sigma_\sim_\chi_1. *_The_square_of_''X''/''σ''_has_the_noncentral_chi-squared_distribution_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_distribution, chi-squared. *_The_log_likelihood_of_a_normal_variable_x_is_simply_the_log_of_its__probability_density_function:_\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_distribution, chi-squared_variable. *_The_distribution_of_the_variable_''X''_restricted_to_an_interval_[''a'',_''b'']_is_called_the_truncated_normal_distribution. *_(''X''_−_''μ'')−2_has_a__Lévy_distribution_with_location_0_and_scale_''σ''−2.


_=_Operations_on_two_independent_normal_variables_

= *_If_X_1_and_X_2_are_two_independence_(probability_theory), independent_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,sum_of_normally_distributed_random_variables, [proof]_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. *_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_distribution, stable_(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#Independent_central-normal_distributions, product_distribution_with_density_function_f_Z(z)_=_\pi^_K_0(, z, )_where_K_0_is_the_Macdonald_function, modified_Bessel_function_of_the_second_kind._This_distribution_is_symmetric_around_zero,_unbounded_at_z_=_0,_and_has_the_characteristic_function_(probability_theory), characteristic_function__\phi_Z(t)_=_(1_+_t^2)^. *_Their_ratio_follows_the_standard__Cauchy_distribution:_X_1/_X_2_\sim_\operatorname(0,_1). *_Their_Euclidean_norm_\sqrt_has_the_Rayleigh_distribution.


__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-squar ...
_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_is_independent_from_the_sample__standard_deviation,_which_can_be_demonstrated_using_Basu's_theorem_or_Cochran's_theorem._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 situ ...
_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_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_distribution, 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_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_(probability), infinite_divisibility. 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_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_...
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'',_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-squar ...
_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,_for_normal_distributions_the_sample_mean_\textstyle\hat\mu_and_the_sample_variance_''s''2_are_independence_(probability_theory), independent,_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 situ ...
_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_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_th_...
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,_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,_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_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_σ2,_the_conjugate_prior_distribution_is_also_normally_distributed. This_can_be_shown_more_easily_by_rewriting_the_variance_as_the__precision,_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_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_σ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;_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._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_(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._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 ques ...
._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_Φ−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_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_independence_(probability_theory), independent._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-squar ...
_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,_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].html" ;"title="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_when_\sigma_=_0. However,_one_can_define_the_normal_distribution_with_zero_variance_as_a_ generalized_function;_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 argum ...
_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 ...
_with_ probability_density_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._A_function_with_two_ Lagrange_multipliers_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_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_statistics,_ scores,_and__estimators_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 ques ...
_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_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-squar ...
_\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 situ ...
_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 ser ...
s. This_theorem_can_also_be_used_to_justify_modeling_the_sum_of_many_uniform_noise_sources_as_ Gaussian_noise._See_ AWGN.


__Operations_and_functions_of_normal_variables_

The_ probability_density,_
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_function, 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-normal_distribution, log-normally:_. *_The_absolute_value_of_X_has_folded_normal_distribution:_._If_\mu_=_0_this_is_known_as_the_half-normal_distribution. *_The_absolute_value_of_normalized_residuals,_, ''X''_−_''μ'', /''σ'',_has_chi_distribution_with_one_degree_of_freedom:_, X_-_\mu, _/_\sigma_\sim_\chi_1. *_The_square_of_''X''/''σ''_has_the_noncentral_chi-squared_distribution_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_distribution, chi-squared. *_The_log_likelihood_of_a_normal_variable_x_is_simply_the_log_of_its__probability_density_function:_\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_distribution, chi-squared_variable. *_The_distribution_of_the_variable_''X''_restricted_to_an_interval_[''a'',_''b'']_is_called_the_truncated_normal_distribution. *_(''X''_−_''μ'')−2_has_a__Lévy_distribution_with_location_0_and_scale_''σ''−2.


_=_Operations_on_two_independent_normal_variables_

= *_If_X_1_and_X_2_are_two_independence_(probability_theory), independent_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,sum_of_normally_distributed_random_variables, [proof]_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. *_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_distribution, stable_(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#Independent_central-normal_distributions, product_distribution_with_density_function_f_Z(z)_=_\pi^_K_0(, z, )_where_K_0_is_the_Macdonald_function, modified_Bessel_function_of_the_second_kind._This_distribution_is_symmetric_around_zero,_unbounded_at_z_=_0,_and_has_the_ characteristic_function__\phi_Z(t)_=_(1_+_t^2)^. *_Their_ratio_follows_the_standard__Cauchy_distribution:_X_1/_X_2_\sim_\operatorname(0,_1). *_Their_Euclidean_norm_\sqrt_has_the_Rayleigh_distribution.


__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-squar ...
_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_is_independent_from_the_sample__standard_deviation,_which_can_be_demonstrated_using_Basu's_theorem_or_Cochran's_theorem._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 situ ...
_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_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_distribution, 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_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_(probability), infinite_divisibility. 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_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_...
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'',_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-squar ...
_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,_for_normal_distributions_the_sample_mean_\textstyle\hat\mu_and_the_sample_variance_''s''2_are_independence_(probability_theory), independent,_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 situ ...
_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_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_th_...
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,_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,_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_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_σ2,_the_conjugate_prior_distribution_is_also_normally_distributed. This_can_be_shown_more_easily_by_rewriting_the_variance_as_the__precision,_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_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_σ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;_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._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_(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._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 ques ...
._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_Φ−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_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_independence_(probability_theory), independent._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-squar ...
_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,_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].html"_;"title="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_functions__1F_1_and_U. :\begin ___\operatorname\left[X^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._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,_with_mean_0_and_standard_deviation_1/\sigma._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 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 ...
_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_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__cumulants_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 (statistician), Charles Stein, who first publ ...
_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_when_\sigma_=_0. However,_one_can_define_the_normal_distribution_with_zero_variance_as_a_ generalized_function;_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 argum ...
_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 ...
_with_ probability_density_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._A_function_with_two_ Lagrange_multipliers_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_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_statistics,_ scores,_and__estimators_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 ques ...
_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_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-squar ...
_\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 situ ...
_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 ser ...
s. This_theorem_can_also_be_used_to_justify_modeling_the_sum_of_many_uniform_noise_sources_as_ Gaussian_noise._See_ AWGN.


__Operations_and_functions_of_normal_variables_

The_ probability_density,_
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_function, 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-normal_distribution, log-normally:_. *_The_absolute_value_of_X_has_folded_normal_distribution:_._If_\mu_=_0_this_is_known_as_the_half-normal_distribution. *_The_absolute_value_of_normalized_residuals,_, ''X''_−_''μ'', /''σ'',_has_chi_distribution_with_one_degree_of_freedom:_, X_-_\mu, _/_\sigma_\sim_\chi_1. *_The_square_of_''X''/''σ''_has_the_noncentral_chi-squared_distribution_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_distribution, chi-squared. *_The_log_likelihood_of_a_normal_variable_x_is_simply_the_log_of_its__probability_density_function:_\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_distribution, chi-squared_variable. *_The_distribution_of_the_variable_''X''_restricted_to_an_interval_[''a'',_''b'']_is_called_the_truncated_normal_distribution. *_(''X''_−_''μ'')−2_has_a__Lévy_distribution_with_location_0_and_scale_''σ''−2.


_=_Operations_on_two_independent_normal_variables_

= *_If_X_1_and_X_2_are_two_independence_(probability_theory), independent_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,sum_of_normally_distributed_random_variables, [proof]_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. *_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_distribution, stable_(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#Independent_central-normal_distributions, product_distribution_with_density_function_f_Z(z)_=_\pi^_K_0(, z, )_where_K_0_is_the_Macdonald_function, modified_Bessel_function_of_the_second_kind._This_distribution_is_symmetric_around_zero,_unbounded_at_z_=_0,_and_has_the_ characteristic_function__\phi_Z(t)_=_(1_+_t^2)^. *_Their_ratio_follows_the_standard__Cauchy_distribution:_X_1/_X_2_\sim_\operatorname(0,_1). *_Their_Euclidean_norm_\sqrt_has_the_Rayleigh_distribution.


__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-squar ...
_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_is_independent_from_the_sample__standard_deviation,_which_can_be_demonstrated_using_Basu's_theorem_or_Cochran's_theorem._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 situ ...
_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_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_distribution, 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_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_(probability), infinite_divisibility. 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_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_...
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'',_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-squar ...
_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,_for_normal_distributions_the_sample_mean_\textstyle\hat\mu_and_the_sample_variance_''s''2_are_independence_(probability_theory), independent,_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 situ ...
_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_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_th_...
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,_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,_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_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_σ2,_the_conjugate_prior_distribution_is_also_normally_distributed. This_can_be_shown_more_easily_by_rewriting_the_variance_as_the__precision,_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_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_σ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;_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._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_(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._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 ques ...
._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_Φ−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_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_independence_(probability_theory), independent._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-squar ...
_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,_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_functions__1F_1_and_U. :\begin ___\operatorname\left[X^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._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,_with_mean_0_and_standard_deviation_1/\sigma._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 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 ...
_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_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__cumulants_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 (statistician), Charles Stein, who first publ ...
_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_when_\sigma_=_0. However,_one_can_define_the_normal_distribution_with_zero_variance_as_a_ generalized_function;_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 argum ...
_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 ...
_with_ probability_density_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._A_function_with_two_ Lagrange_multipliers_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_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_statistics,_ scores,_and__estimators_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 ques ...
_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_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-squar ...
_\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 situ ...
_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 ser ...
s. This_theorem_can_also_be_used_to_justify_modeling_the_sum_of_many_uniform_noise_sources_as_ Gaussian_noise._See_ AWGN.


__Operations_and_functions_of_normal_variables_

The_ probability_density,_
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_function, 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-normal_distribution, log-normally:_. *_The_absolute_value_of_X_has_folded_normal_distribution:_._If_\mu_=_0_this_is_known_as_the_half-normal_distribution. *_The_absolute_value_of_normalized_residuals,_, ''X''_−_''μ'', /''σ'',_has_chi_distribution_with_one_degree_of_freedom:_, X_-_\mu, _/_\sigma_\sim_\chi_1. *_The_square_of_''X''/''σ''_has_the_noncentral_chi-squared_distribution_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_distribution, chi-squared. *_The_log_likelihood_of_a_normal_variable_x_is_simply_the_log_of_its__probability_density_function:_\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_distribution, chi-squared_variable. *_The_distribution_of_the_variable_''X''_restricted_to_an_interval_[''a'',_''b'']_is_called_the_truncated_normal_distribution. *_(''X''_−_''μ'')−2_has_a__Lévy_distribution_with_location_0_and_scale_''σ''−2.


_=_Operations_on_two_independent_normal_variables_

= *_If_X_1_and_X_2_are_two_independence_(probability_theory), independent_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,sum_of_normally_distributed_random_variables, [proof]_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. *_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_distribution, stable_(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#Independent_central-normal_distributions, product_distribution_with_density_function_f_Z(z)_=_\pi^_K_0(, z, )_where_K_0_is_the_Macdonald_function, modified_Bessel_function_of_the_second_kind._This_distribution_is_symmetric_around_zero,_unbounded_at_z_=_0,_and_has_the_ characteristic_function__\phi_Z(t)_=_(1_+_t^2)^. *_Their_ratio_follows_the_standard__Cauchy_distribution:_X_1/_X_2_\sim_\operatorname(0,_1). *_Their_Euclidean_norm_\sqrt_has_the_Rayleigh_distribution.


__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-squar ...
_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_is_independent_from_the_sample__standard_deviation,_which_can_be_demonstrated_using_Basu's_theorem_or_Cochran's_theorem._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 situ ...
_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_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_distribution, 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_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_(probability), infinite_divisibility. 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_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_...
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'',_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-squar ...
_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,_for_normal_distributions_the_sample_mean_\textstyle\hat\mu_and_the_sample_variance_''s''2_are_independence_(probability_theory), independent,_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 situ ...
_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_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_th_...
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,_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,_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_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_σ2,_the_conjugate_prior_distribution_is_also_normally_distributed. This_can_be_shown_more_easily_by_rewriting_the_variance_as_the__precision,_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_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_σ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;_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._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_(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._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 ques ...
._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_Φ−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_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_independence_(probability_theory), independent._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-squar ...
_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,_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].html" ;"title="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._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,_with_mean_0_and_standard_deviation_1/\sigma._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 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 ...
_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_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__cumulants_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 (statistician), Charles Stein, who first publ ...
_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_when_\sigma_=_0. However,_one_can_define_the_normal_distribution_with_zero_variance_as_a_ generalized_function;_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 argum ...
_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 ...
_with_ probability_density_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._A_function_with_two_ Lagrange_multipliers_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_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_statistics,_ scores,_and__estimators_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 ques ...
_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_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-squar ...
_\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 situ ...
_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 ser ...
s. This_theorem_can_also_be_used_to_justify_modeling_the_sum_of_many_uniform_noise_sources_as_ Gaussian_noise._See_ AWGN.


__Operations_and_functions_of_normal_variables_

The_ probability_density,_
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_function, 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-normal_distribution, log-normally:_. *_The_absolute_value_of_X_has_folded_normal_distribution:_._If_\mu_=_0_this_is_known_as_the_half-normal_distribution. *_The_absolute_value_of_normalized_residuals,_, ''X''_−_''μ'', /''σ'',_has_chi_distribution_with_one_degree_of_freedom:_, X_-_\mu, _/_\sigma_\sim_\chi_1. *_The_square_of_''X''/''σ''_has_the_noncentral_chi-squared_distribution_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_distribution, chi-squared. *_The_log_likelihood_of_a_normal_variable_x_is_simply_the_log_of_its__probability_density_function:_\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_distribution, chi-squared_variable. *_The_distribution_of_the_variable_''X''_restricted_to_an_interval_[''a'',_''b'']_is_called_the_truncated_normal_distribution. *_(''X''_−_''μ'')−2_has_a__Lévy_distribution_with_location_0_and_scale_''σ''−2.


_=_Operations_on_two_independent_normal_variables_

= *_If_X_1_and_X_2_are_two_independence_(probability_theory), independent_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,sum_of_normally_distributed_random_variables, [proof]_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. *_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_distribution, stable_(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#Independent_central-normal_distributions, product_distribution_with_density_function_f_Z(z)_=_\pi^_K_0(, z, )_where_K_0_is_the_Macdonald_function, modified_Bessel_function_of_the_second_kind._This_distribution_is_symmetric_around_zero,_unbounded_at_z_=_0,_and_has_the_ characteristic_function__\phi_Z(t)_=_(1_+_t^2)^. *_Their_ratio_follows_the_standard__Cauchy_distribution:_X_1/_X_2_\sim_\operatorname(0,_1). *_Their_Euclidean_norm_\sqrt_has_the_Rayleigh_distribution.


__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-squar ...
_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_is_independent_from_the_sample__standard_deviation,_which_can_be_demonstrated_using_Basu's_theorem_or_Cochran's_theorem._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 situ ...
_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_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_distribution, 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_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_(probability), infinite_divisibility. 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_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_...
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'',_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-squar ...
_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,_for_normal_distributions_the_sample_mean_\textstyle\hat\mu_and_the_sample_variance_''s''2_are_independence_(probability_theory), independent,_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 situ ...
_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_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_th_...
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,_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,_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_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_σ2,_the_conjugate_prior_distribution_is_also_normally_distributed. This_can_be_shown_more_easily_by_rewriting_the_variance_as_the__precision,_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_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_σ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;_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._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_(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._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 ques ...
._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_Φ−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_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_independence_(probability_theory), independent._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-squar ...
_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,_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].html" ;"title="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 functions _1F_1 and U. :\begin \operatorname\left[X^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[X \mid a 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. 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 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. 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 standard deviation 1/\sigma. In particular, the standard normal distribution \varphi is an Fourier transform#Eigenfunctions, 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 (probability theory), characteristic function \varphi_X(t) of that variable, which is defined as the expected value 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 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[e^] = \hat f(it) = e^ e^ 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 Since this is a quadratic polynomial in t, only the first two cumulants are nonzero, namely the mean \mu and the variance \sigma^2.


Stein operator and class

Within Stein's method 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 (mathematics), function when \sigma = 0. However, one can define the normal distribution with zero variance as a generalized function; specifically, as Dirac delta function, 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 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 probability distribution, maximum entropy. If X is a continuous random variable with probability density function, probability density 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. A function with two Lagrange multipliers 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 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 statistics, score (statistics), scores, and estimators 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 function (statistics), 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 B(n,p) is De Moivre–Laplace theorem, 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 with parameter \lambda is approximately normal with mean \lambda and variance \lambda, for large values of \lambda. * The chi-squared distribution \chi^2(k) is approximately normal with mean k and variance 2k, for large k. * The Student's t-distribution 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, improvements of the approximation are given by the Edgeworth expansions. This theorem can also be used to justify modeling the sum of many uniform noise sources as Gaussian noise. See AWGN.


Operations and functions of normal variables

The probability density function, probability density, cumulative distribution function, cumulative distribution, and inverse cumulative distribution function, 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-normal distribution, log-normally: . * The absolute value of X has folded normal distribution: . If \mu = 0 this is known as the half-normal distribution. * The absolute value of normalized residuals, , ''X'' − ''μ'', /''σ'', has chi distribution with one degree of freedom: , X - \mu, / \sigma \sim \chi_1. * The square of ''X''/''σ'' has the noncentral chi-squared distribution 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 distribution, chi-squared. * The log likelihood of a normal variable x is simply the log of its probability density function: \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 distribution, chi-squared variable. * The distribution of the variable ''X'' restricted to an interval [''a'', ''b''] is called the truncated normal distribution. * (''X'' − ''μ'')−2 has a Lévy distribution with location 0 and scale ''σ''−2.


= Operations on two independent normal variables

= * If X_1 and X_2 are two independence (probability theory), independent 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,sum of normally distributed random variables, [proof] 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. * 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 distribution, stable (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#Independent central-normal distributions, product distribution with density function f_Z(z) = \pi^ K_0(, z, ) where K_0 is the Macdonald function, modified Bessel function of the second kind. This distribution is symmetric around zero, unbounded at z = 0, and has the characteristic function (probability theory), characteristic function \phi_Z(t) = (1 + t^2)^. * Their ratio follows the standard Cauchy distribution: X_1/ X_2 \sim \operatorname(0, 1). * Their Euclidean norm \sqrt has the Rayleigh distribution.


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 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 is independent from the sample standard deviation, which can be demonstrated using Basu's theorem or Cochran's theorem. The ratio of these two quantities will have the Student's t-distribution 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 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 distribution, 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 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 (probability), infinite divisibility. 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 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 ...
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'', 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 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, for normal distributions the sample mean \textstyle\hat\mu and the sample variance ''s''2 are independence (probability theory), independent, 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 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 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 th ...
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, 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, 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 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 σ2, the conjugate prior distribution is also normally distributed. This can be shown more easily by rewriting the variance as the precision, 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 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 σ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; 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. 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 (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. 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. 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 Φ−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 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 independence (probability theory), independent. This formulation arises because for a bivariate normal random vector (''X'', ''Y'') the squared norm will have the chi-squared distribution 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, 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 functions _1F_1 and U. :\begin \operatorname\left[X^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[X \mid a 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. 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 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. 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 standard deviation 1/\sigma. In particular, the standard normal distribution \varphi is an Fourier transform#Eigenfunctions, 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 (probability theory), characteristic function \varphi_X(t) of that variable, which is defined as the expected value 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 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[e^] = \hat f(it) = e^ e^ 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 Since this is a quadratic polynomial in t, only the first two cumulants are nonzero, namely the mean \mu and the variance \sigma^2.


Stein operator and class

Within Stein's method 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 (mathematics), function when \sigma = 0. However, one can define the normal distribution with zero variance as a generalized function; specifically, as Dirac delta function, 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 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 probability distribution, maximum entropy. If X is a continuous random variable with probability density function, probability density 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. A function with two Lagrange multipliers 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 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 statistics, score (statistics), scores, and estimators 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 function (statistics), 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 B(n,p) is De Moivre–Laplace theorem, 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 with parameter \lambda is approximately normal with mean \lambda and variance \lambda, for large values of \lambda. * The chi-squared distribution \chi^2(k) is approximately normal with mean k and variance 2k, for large k. * The Student's t-distribution 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, improvements of the approximation are given by the Edgeworth expansions. This theorem can also be used to justify modeling the sum of many uniform noise sources as Gaussian noise. See AWGN.


Operations and functions of normal variables

The probability density function, probability density, cumulative distribution function, cumulative distribution, and inverse cumulative distribution function, 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-normal distribution, log-normally: . * The absolute value of X has folded normal distribution: . If \mu = 0 this is known as the half-normal distribution. * The absolute value of normalized residuals, , ''X'' − ''μ'', /''σ'', has chi distribution with one degree of freedom: , X - \mu, / \sigma \sim \chi_1. * The square of ''X''/''σ'' has the noncentral chi-squared distribution 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 distribution, chi-squared. * The log likelihood of a normal variable x is simply the log of its probability density function: \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 distribution, chi-squared variable. * The distribution of the variable ''X'' restricted to an interval [''a'', ''b''] is called the truncated normal distribution. * (''X'' − ''μ'')−2 has a Lévy distribution with location 0 and scale ''σ''−2.


= Operations on two independent normal variables

= * If X_1 and X_2 are two independence (probability theory), independent 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,sum of normally distributed random variables, [proof] 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. * 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 distribution, stable (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#Independent central-normal distributions, product distribution with density function f_Z(z) = \pi^ K_0(, z, ) where K_0 is the Macdonald function, modified Bessel function of the second kind. This distribution is symmetric around zero, unbounded at z = 0, and has the characteristic function (probability theory), characteristic function \phi_Z(t) = (1 + t^2)^. * Their ratio follows the standard Cauchy distribution: X_1/ X_2 \sim \operatorname(0, 1). * Their Euclidean norm \sqrt has the Rayleigh distribution.


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 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 is independent from the sample standard deviation, which can be demonstrated using Basu's theorem or Cochran's theorem. The ratio of these two quantities will have the Student's t-distribution 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 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 distribution, 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 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 (probability), infinite divisibility. 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 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 ...
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'', 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 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, for normal distributions the sample mean \textstyle\hat\mu and the sample variance ''s''2 are independence (probability theory), independent, 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 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 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 th ...
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, 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, 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 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 σ2, the conjugate prior distribution is also normally distributed. This can be shown more easily by rewriting the variance as the precision, 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 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 σ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; 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. 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 (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. 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. 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 Φ−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 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 independence (probability theory), independent. This formulation arises because for a bivariate normal random vector (''X'', ''Y'') the squared norm will have the chi-squared distribution 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, 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._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,_with_mean_0_and_standard_deviation_1/\sigma._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 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 ...
_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_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__cumulants_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 (statistician), Charles Stein, who first publ ...
_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_when_\sigma_=_0. However,_one_can_define_the_normal_distribution_with_zero_variance_as_a_ generalized_function;_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 argum ...
_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 ...
_with_ probability_density_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._A_function_with_two_ Lagrange_multipliers_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_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_statistics,_ scores,_and__estimators_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 ques ...
_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_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-squar ...
_\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 situ ...
_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 ser ...
s. This_theorem_can_also_be_used_to_justify_modeling_the_sum_of_many_uniform_noise_sources_as_ Gaussian_noise._See_ AWGN.


__Operations_and_functions_of_normal_variables_

The_ probability_density,_
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_function, 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-normal_distribution, log-normally:_. *_The_absolute_value_of_X_has_folded_normal_distribution:_._If_\mu_=_0_this_is_known_as_the_half-normal_distribution. *_The_absolute_value_of_normalized_residuals,_, ''X''_−_''μ'', /''σ'',_has_chi_distribution_with_one_degree_of_freedom:_, X_-_\mu, _/_\sigma_\sim_\chi_1. *_The_square_of_''X''/''σ''_has_the_noncentral_chi-squared_distribution_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_distribution, chi-squared. *_The_log_likelihood_of_a_normal_variable_x_is_simply_the_log_of_its__probability_density_function:_\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_distribution, chi-squared_variable. *_The_distribution_of_the_variable_''X''_restricted_to_an_interval_[''a'',_''b'']_is_called_the_truncated_normal_distribution. *_(''X''_−_''μ'')−2_has_a__Lévy_distribution_with_location_0_and_scale_''σ''−2.


_=_Operations_on_two_independent_normal_variables_

= *_If_X_1_and_X_2_are_two_independence_(probability_theory), independent_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,sum_of_normally_distributed_random_variables, [proof]_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. *_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_distribution, stable_(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#Independent_central-normal_distributions, product_distribution_with_density_function_f_Z(z)_=_\pi^_K_0(, z, )_where_K_0_is_the_Macdonald_function, modified_Bessel_function_of_the_second_kind._This_distribution_is_symmetric_around_zero,_unbounded_at_z_=_0,_and_has_the_ characteristic_function__\phi_Z(t)_=_(1_+_t^2)^. *_Their_ratio_follows_the_standard__Cauchy_distribution:_X_1/_X_2_\sim_\operatorname(0,_1). *_Their_Euclidean_norm_\sqrt_has_the_Rayleigh_distribution.


__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-squar ...
_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_is_independent_from_the_sample__standard_deviation,_which_can_be_demonstrated_using_Basu's_theorem_or_Cochran's_theorem._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 situ ...
_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_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_distribution, 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_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_(probability), infinite_divisibility. 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_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_...
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'',_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-squar ...
_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,_for_normal_distributions_the_sample_mean_\textstyle\hat\mu_and_the_sample_variance_''s''2_are_independence_(probability_theory), independent,_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 situ ...
_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_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_th_...
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,_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,_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_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_σ2,_the_conjugate_prior_distribution_is_also_normally_distributed. This_can_be_shown_more_easily_by_rewriting_the_variance_as_the__precision,_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_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_σ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;_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._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_(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._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 ques ...
._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_Φ−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_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_independence_(probability_theory), independent._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-squar ...
_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,_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].html" ;"title="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 functions _1F_1 and U. :\begin \operatorname\left[X^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[X \mid a 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. 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 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. 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 standard deviation 1/\sigma. In particular, the standard normal distribution \varphi is an Fourier transform#Eigenfunctions, 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 (probability theory), characteristic function \varphi_X(t) of that variable, which is defined as the expected value 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 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[e^] = \hat f(it) = e^ e^ 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 Since this is a quadratic polynomial in t, only the first two cumulants are nonzero, namely the mean \mu and the variance \sigma^2.


Stein operator and class

Within Stein's method 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 (mathematics), function when \sigma = 0. However, one can define the normal distribution with zero variance as a generalized function; specifically, as Dirac delta function, 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 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 probability distribution, maximum entropy. If X is a continuous random variable with probability density function, probability density 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. A function with two Lagrange multipliers 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 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 statistics, score (statistics), scores, and estimators 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 function (statistics), 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 B(n,p) is De Moivre–Laplace theorem, 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 with parameter \lambda is approximately normal with mean \lambda and variance \lambda, for large values of \lambda. * The chi-squared distribution \chi^2(k) is approximately normal with mean k and variance 2k, for large k. * The Student's t-distribution 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, improvements of the approximation are given by the Edgeworth expansions. This theorem can also be used to justify modeling the sum of many uniform noise sources as Gaussian noise. See AWGN.


Operations and functions of normal variables

The probability density function, probability density, cumulative distribution function, cumulative distribution, and inverse cumulative distribution function, 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-normal distribution, log-normally: . * The absolute value of X has folded normal distribution: . If \mu = 0 this is known as the half-normal distribution. * The absolute value of normalized residuals, , ''X'' − ''μ'', /''σ'', has chi distribution with one degree of freedom: , X - \mu, / \sigma \sim \chi_1. * The square of ''X''/''σ'' has the noncentral chi-squared distribution 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 distribution, chi-squared. * The log likelihood of a normal variable x is simply the log of its probability density function: \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 distribution, chi-squared variable. * The distribution of the variable ''X'' restricted to an interval [''a'', ''b''] is called the truncated normal distribution. * (''X'' − ''μ'')−2 has a Lévy distribution with location 0 and scale ''σ''−2.


= Operations on two independent normal variables

= * If X_1 and X_2 are two independence (probability theory), independent 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,sum of normally distributed random variables, [proof] 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. * 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 distribution, stable (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#Independent central-normal distributions, product distribution with density function f_Z(z) = \pi^ K_0(, z, ) where K_0 is the Macdonald function, modified Bessel function of the second kind. This distribution is symmetric around zero, unbounded at z = 0, and has the characteristic function (probability theory), characteristic function \phi_Z(t) = (1 + t^2)^. * Their ratio follows the standard Cauchy distribution: X_1/ X_2 \sim \operatorname(0, 1). * Their Euclidean norm \sqrt has the Rayleigh distribution.


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 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 is independent from the sample standard deviation, which can be demonstrated using Basu's theorem or Cochran's theorem. The ratio of these two quantities will have the Student's t-distribution 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 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 distribution, 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 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 (probability), infinite divisibility. 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 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 ...
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'', 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 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, for normal distributions the sample mean \textstyle\hat\mu and the sample variance ''s''2 are independence (probability theory), independent, 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 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 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 th ...
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, 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, 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 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 σ2, the conjugate prior distribution is also normally distributed. This can be shown more easily by rewriting the variance as the precision, 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 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 σ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; 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. 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 (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. 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. 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 Φ−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 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 independence (probability theory), independent. This formulation arises because for a bivariate normal random vector (''X'', ''Y'') the squared norm will have the chi-squared distribution 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, 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 functions _1F_1 and U. :\begin \operatorname\left[X^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[X \mid a 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. 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 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. 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 standard deviation 1/\sigma. In particular, the standard normal distribution \varphi is an Fourier transform#Eigenfunctions, 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 (probability theory), characteristic function \varphi_X(t) of that variable, which is defined as the expected value 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 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[e^] = \hat f(it) = e^ e^ 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 Since this is a quadratic polynomial in t, only the first two cumulants are nonzero, namely the mean \mu and the variance \sigma^2.


Stein operator and class

Within Stein's method 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 (mathematics), function when \sigma = 0. However, one can define the normal distribution with zero variance as a generalized function; specifically, as Dirac delta function, 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 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 probability distribution, maximum entropy. If X is a continuous random variable with probability density function, probability density 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. A function with two Lagrange multipliers 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 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 statistics, score (statistics), scores, and estimators 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 function (statistics), 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 B(n,p) is De Moivre–Laplace theorem, 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 with parameter \lambda is approximately normal with mean \lambda and variance \lambda, for large values of \lambda. * The chi-squared distribution \chi^2(k) is approximately normal with mean k and variance 2k, for large k. * The Student's t-distribution 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, improvements of the approximation are given by the Edgeworth expansions. This theorem can also be used to justify modeling the sum of many uniform noise sources as Gaussian noise. See AWGN.


Operations and functions of normal variables

The probability density function, probability density, cumulative distribution function, cumulative distribution, and inverse cumulative distribution function, 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-normal distribution, log-normally: . * The absolute value of X has folded normal distribution: . If \mu = 0 this is known as the half-normal distribution. * The absolute value of normalized residuals, , ''X'' − ''μ'', /''σ'', has chi distribution with one degree of freedom: , X - \mu, / \sigma \sim \chi_1. * The square of ''X''/''σ'' has the noncentral chi-squared distribution 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 distribution, chi-squared. * The log likelihood of a normal variable x is simply the log of its probability density function: \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 distribution, chi-squared variable. * The distribution of the variable ''X'' restricted to an interval [''a'', ''b''] is called the truncated normal distribution. * (''X'' − ''μ'')−2 has a Lévy distribution with location 0 and scale ''σ''−2.


= Operations on two independent normal variables

= * If X_1 and X_2 are two independence (probability theory), independent 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,sum of normally distributed random variables, [proof] 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. * 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 distribution, stable (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#Independent central-normal distributions, product distribution with density function f_Z(z) = \pi^ K_0(, z, ) where K_0 is the Macdonald function, modified Bessel function of the second kind. This distribution is symmetric around zero, unbounded at z = 0, and has the characteristic function (probability theory), characteristic function \phi_Z(t) = (1 + t^2)^. * Their ratio follows the standard Cauchy distribution: X_1/ X_2 \sim \operatorname(0, 1). * Their Euclidean norm \sqrt has the Rayleigh distribution.


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 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 is independent from the sample standard deviation, which can be demonstrated using Basu's theorem or Cochran's theorem. The ratio of these two quantities will have the Student's t-distribution 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 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 distribution, 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 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 (probability), infinite divisibility. 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 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 ...
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'', 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 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, for normal distributions the sample mean \textstyle\hat\mu and the sample variance ''s''2 are independence (probability theory), independent, 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 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 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 th ...
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, 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, 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 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 σ2, the conjugate prior distribution is also normally distributed. This can be shown more easily by rewriting the variance as the precision, 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 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 σ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; 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. 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 (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. 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. 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 Φ−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 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 independence (probability theory), independent. This formulation arises because for a bivariate normal random vector (''X'', ''Y'') the squared norm will have the chi-squared distribution 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, 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 (mathematics), function when \sigma = 0. However, one can define the normal distribution with zero variance as a generalized function; specifically, as Dirac delta function, 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 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 probability distribution, maximum entropy. If X is a continuous random variable with probability density function, probability density 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. A function with two Lagrange multipliers 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 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 statistics, score (statistics), scores, and estimators 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 function (statistics), 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 B(n,p) is De Moivre–Laplace theorem, 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 with parameter \lambda is approximately normal with mean \lambda and variance \lambda, for large values of \lambda. * The chi-squared distribution \chi^2(k) is approximately normal with mean k and variance 2k, for large k. * The Student's t-distribution 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, improvements of the approximation are given by the Edgeworth expansions. This theorem can also be used to justify modeling the sum of many uniform noise sources as Gaussian noise. See AWGN.


Operations and functions of normal variables

The probability density function, probability density, cumulative distribution function, cumulative distribution, and inverse cumulative distribution function, 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-normal distribution, log-normally: . * The absolute value of X has folded normal distribution: . If \mu = 0 this is known as the half-normal distribution. * The absolute value of normalized residuals, , ''X'' − ''μ'', /''σ'', has chi distribution with one degree of freedom: , X - \mu, / \sigma \sim \chi_1. * The square of ''X''/''σ'' has the noncentral chi-squared distribution 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 distribution, chi-squared. * The log likelihood of a normal variable x is simply the log of its probability density function: \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 distribution, chi-squared variable. * The distribution of the variable ''X'' restricted to an interval [''a'', ''b''] is called the truncated normal distribution. * (''X'' − ''μ'')−2 has a Lévy distribution with location 0 and scale ''σ''−2.


= Operations on two independent normal variables

= * If X_1 and X_2 are two independence (probability theory), independent 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,sum of normally distributed random variables, [proof] 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. * 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 distribution, stable (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#Independent central-normal distributions, product distribution with density function f_Z(z) = \pi^ K_0(, z, ) where K_0 is the Macdonald function, modified Bessel function of the second kind. This distribution is symmetric around zero, unbounded at z = 0, and has the characteristic function (probability theory), characteristic function \phi_Z(t) = (1 + t^2)^. * Their ratio follows the standard Cauchy distribution: X_1/ X_2 \sim \operatorname(0, 1). * Their Euclidean norm \sqrt has the Rayleigh distribution.


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 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 is independent from the sample standard deviation, which can be demonstrated using Basu's theorem or Cochran's theorem. The ratio of these two quantities will have the Student's t-distribution 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 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 distribution, 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 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 (probability), infinite divisibility. 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 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 ...
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'', 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 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, for normal distributions the sample mean \textstyle\hat\mu and the sample variance ''s''2 are independence (probability theory), independent, 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 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 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 th ...
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, 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, 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 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 σ2, the conjugate prior distribution is also normally distributed. This can be shown more easily by rewriting the variance as the precision, 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 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 σ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; 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. 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 (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. 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. 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 Φ−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 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 independence (probability theory), independent. This formulation arises because for a bivariate normal random vector (''X'', ''Y'') the squared norm will have the chi-squared distribution 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, 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