# Cochran's theorem

In statistics, **Cochran's theorem** is used in the analysis of variance.

Suppose *U*_{1}, ..., *U*_{n} are independent standard normally distributed random variables, and an identity of the form

can be written where each *Q*_{i} is a sum of squares of linear combinations of the *U*s. Further suppose that

where *r*_{i} is the rank of *Q*_{i}. Cochran's theorem states that the *Q*_{i} are independent, and *Q*_{i} has a chi-square distribution with *r*_{i} degrees of freedom.

Cochran's theorem is the converse of Fisher's theorem.

### Example

If *X*_{1}, ..., *X*_{n} are independent normally distributed random variables with mean μ and standard deviation σ
then

is standard normal for each *i*.

It is possible to write

(here, summation is from 1 to *n*, that is over the observations).
To see this identity, multiply throughout by and note that

and expand to give

The third term is zero because it is equal to a constant times

and the second term is just *n* identical terms added together.

Combining the above results (and dividing by σ^{2}), we have:

Now the rank of *Q*_{2} is just 1 (it is the square of just one linear combination of the standard normal variables). The rank of *Q*_{1} can be shown to be *n* − 1, and thus the conditions for Cochran's theorem are met.

Cochran's theorem then states that *Q*_{1} and *Q*_{2} are independent, with Chi-squared distribution with *n* − 1 and 1 degree of freedom respectively.

This shows that the sample mean and sample variance are independent; also

To estimate the variance σ^{2}, one estimator that is often used is

Cochran's theorem shows that

which shows that the expected value of is σ^{2}(*n* − 1)/*n*.

Both these distributions are proportional to the true but unknown variance σ^{2}; thus their ratio is independent of σ^{2} and because they are independent we have

where *F*_{1,n − 1} is the F-distribution with 1 and *n* − 1 degrees of freedom (see also Student's t-distribution).