# Fitting a second order Normal distribution to data

The Normal distribution is easy to fit to data since its two parameters, the mean and standard deviation, are independent of each other. The first is purely a location parameter and the second is purely a shape parameter. Knowledge about one parameter (e.g. the mean, telling us where the distribution is located) tells us nothing about the other parameter (the spread) and vice versa, so the two parameters can be estimated separately and the distributions of uncertainty for these parameters are uncorrelated.

### Statistical method

Classical statistics and Bayesian statistics both tell us that the uncertainty distributions for the mean and standard deviation of the Normal distribution are given by:

 Mean:

where:

• m, s are the mean and standard deviation of the population distribution,

• x and  are the sample mean and sample standard deviation of the n data points being fitted,

• t(n-1) is a Student-t distribution with n-1 degrees of freedom and c2(n-1) is a Chi-squared distribution with n-1 degrees of freedom.

##### Example

Imagine we have 25 data values that have a mean x and standard deviation  of 85 and 11 respectively. The uncertainty distributions for the Normal distribution parameters are thus:

Mean m:                           =VoseStudent(25-1)*11/SQRT(25)+85

Standard deviation s           =11*SQRT((25-1)/VoseChisq(25-1))