Normal Distribution

The normal distribution, also known as the Gaussian distribution, is the most well-known and widely used statistical distribution. It is characterized by its bell-shaped curve and is applicable to a wide range of phenomena.

Definition

The normal distribution is characterized by two parameters: μ (mu), which represents the mean and acts as the location parameter, and σ (sigma), which represents the standard deviation and acts as the scale parameter. The probability density function (PDF) is:

f(x)=1σ2πexp((xμ)22σ2)

The cumulative distribution function (CDF) is:

F(x)=12[1+erf(xμσ2)]

The distribution is defined for all real numbers x, while the standard deviation σ must be strictly positive. The mean μ can take any real value.

Applications

  • Statistical inference uses the normal distribution for hypothesis testing and confidence intervals.

  • Financial mathematics employs it for modeling asset returns and risk assessment.

  • Quality control applications use it for process monitoring and capability analysis.

  • Natural sciences use it to model measurement errors and physical phenomena.

Properties

Statistical Properties
PropertyValue
Meanμ
Varianceσ2
Skewness0
Excess Kurtosis0
Medianμ
Modeμ
Entropyln(σ2πe)

Notable properties include:

  • The characteristic function is ϕ(t)=eiμtσ2t2/2.

  • The distribution is symmetric about its mean.

  • Approximately 68%, 95%, and 99.7% of the data fall within one, two, and three standard deviations of the mean, respectively.

Relationships to Other Distributions

  • The sum of independent normal random variables is normally distributed.

  • The square of a standard normal random variable follows a chi-square distribution with one degree of freedom.

  • By the central limit theorem, the sum of independent random variables with finite variance tends toward a normal distribution.

The NormalDistribution class

The normal distribution is implemented by the NormalDistribution class. It has two constructors. The first constructor takes two arguments. The first argument is the mean, which acts as the location parameter. The second argument is the standard deviation and acts as the scale parameter. The following constructs the normal distribution with mean 6.8 and standard deviation 4.1:

C#
var normal = new NormalDistribution(6.8, 4.1);

If a variable is assumed to have a normal distribution, then the parameters of the distribution can be estimated using the method of maximum likelihood or the method of matching moments. Both methods produce the same results. The second constructor performs this calculation. It takes one argument: a Vector<T> whose distribution is to be estimated.

Note that parameter estimation says nothing about how well the estimated distribution fits the variable's distribution. Use one of the goodness-of-fit tests to verify the appropriateness of the choice of distribution.

NormalDistribution class has one specific property: the StandardDeviation property returns a NormalDistribution object that represents the standard normal distribution with mean 0 and standard deviation 1. The location and scale parameters are given by the Mean and StandardDeviation properties.

NormalDistribution has one static (Shared in Visual Basic) method, Sample, which generates a random sample using a user-supplied uniform random number generator. The second and third parameters are the location and scale parameters of the distribution.

C#
var random = new Pcg32();
double sample = NormalDistribution.Sample(random, 6.8, 4.1);

The above example uses the Pcg32 to generate uniform random numbers.

References

For more information on the normal distribution, refer to the following sources:

  • Johnson, N. L., Kotz, S., & Balakrishnan, N. (1994). "Continuous Univariate Distributions, Volume 1", Chapter 13. Wiley Series in Probability and Statistics.

  • Forbes, C., Evans, M., Hastings, N., & Peacock, B. (2011). "Statistical Distributions", Chapter 33. Wiley Series in Probability and Statistics.

  • "The Normal Distribution: Characterizations with Applications" by Samuel Kotz, Tomasz Kozubowski, and Krzysztof Podgorski

See Also