Cochran's theorem
{{Short description|Statistical theorem in the analysis of variance}}
In statistics, Cochran's theorem, devised by William G. Cochran,{{cite journal|last=Cochran|first=W. G.|author-link=William Gemmell Cochran|title=The distribution of quadratic forms in a normal system, with applications to the analysis of covariance|journal=Mathematical Proceedings of the Cambridge Philosophical Society|date=April 1934|volume=30|issue=2|pages=178–191|doi=10.1017/S0305004100016595|bibcode=1934PCPS...30..178C }} is a theorem used to justify results relating to the probability distributions of statistics that are used in the analysis of variance.{{cite book |author= Bapat, R. B.|title=Linear Algebra and Linear Models|edition=Second|publisher= Springer |year=2000|isbn=978-0-387-98871-9}}
Examples
= Sample mean and sample variance =
If X1, ..., Xn are independent normally distributed random variables with mean μ and standard deviation σ then
:
is standard normal for each i. Note that the total Q is equal to sum of squared Us as shown here:
:
\sum_{jk} U_j U_k\delta_{jk} = \sum_{j} U_j^2
which stems from the original assumption that .
So instead we will calculate this quantity and later separate it into Qi's. It is possible to write
:
\sum_{i=1}^n U_i^2=\sum_{i=1}^n\left(\frac{X_i-\overline{X}}{\sigma}\right)^2
+ n\left(\frac{\overline{X}-\mu}{\sigma}\right)^2
(here is the sample mean). To see this identity, multiply throughout by and note that
:
\sum(X_i-\mu)^2=
\sum(X_i-\overline{X}+\overline{X}-\mu)^2
and expand to give
:
\sum(X_i-\mu)^2=
\sum(X_i-\overline{X})^2+\sum(\overline{X}-\mu)^2+
2\sum(X_i-\overline{X})(\overline{X}-\mu).
The third term is zero because it is equal to a constant times
:
and the second term has just n identical terms added together. Thus
:
\sum(X_i-\mu)^2 = \sum(X_i-\overline{X})^2+n(\overline{X}-\mu)^2 ,
and hence
:
\sum\left(\tfrac{X_i-\mu}{\sigma}\right)^2=
\sum\left(\tfrac{X_i-\overline{X}}{\sigma}\right)^2
+n\left(\tfrac{\overline{X}-\mu}{\sigma}\right)^2=
\overbrace{\sum_i\left(U_i-\tfrac{1}{n}\sum_j{U_j}\right)^2}^{Q_1}
+\overbrace{\tfrac{1}{n}\left(\sum_j{U_j}\right)^2}^{Q_2}=
Q_1+Q_2.
Now with the matrix of ones which has rank 1. In turn given that . This expression can be also obtained by expanding in matrix notation. It can be shown that the rank of is as the addition of all its rows is equal to zero. Thus the conditions for Cochran's theorem are met.
Cochran's theorem then states that Q1 and Q2 are independent, with chi-squared distributions with n − 1 and 1 degree of freedom respectively. This shows that the sample mean and sample variance are independent. This can also be shown by Basu's theorem, and in fact this property characterizes the normal distribution – for no other distribution are the sample mean and sample variance independent.{{cite journal
|doi=10.2307/2983669
|first=R.C. |last=Geary |author-link=Roy C. Geary
|year=1936
|title=The Distribution of "Student's" Ratio for Non-Normal Samples
|journal=Supplement to the Journal of the Royal Statistical Society
|volume=3 |issue=2 |pages=178–184
|jfm=63.1090.03
|jstor=2983669
}}
=Distributions=
The result for the distributions is written symbolically as
:
\sum\left(X_i-\overline{X}\right)^2 \sim \sigma^2 \chi^2_{n-1}.
:
n(\overline{X}-\mu)^2\sim \sigma^2 \chi^2_1,
Both these random variables are proportional to the true but unknown variance σ2. Thus their ratio does not depend on σ2 and, because they are statistically independent. The distribution of their ratio is given by
:
\frac{n\left(\overline{X}-\mu\right)^2}
{\frac{1}{n-1}\sum\left(X_i-\overline{X}\right)^2}\sim \frac{\chi^2_1}{\frac{1}{n-1}\chi^2_{n-1}}
\sim F_{1,n-1}
where F1,n − 1 is the F-distribution with 1 and n − 1 degrees of freedom (see also Student's t-distribution). The final step here is effectively the definition of a random variable having the F-distribution.
= Estimation of variance =
To estimate the variance σ2, one estimator that is sometimes used is the maximum likelihood estimator of the variance of a normal distribution
:
\widehat{\sigma}^2=
\frac{1}{n}\sum\left(
X_i-\overline{X}\right)^2.
Cochran's theorem shows that
:
\frac{n\widehat{\sigma}^2}{\sigma^2}\sim\chi^2_{n-1}
and the properties of the chi-squared distribution show that
:
E \left(\frac{n \widehat{\sigma}^2}{\sigma^2}\right) &= E \left(\chi^2_{n-1}\right) \\
\frac{n}{\sigma^2}E \left(\widehat{\sigma}^2\right) &= (n-1) \\
E \left(\widehat{\sigma}^2\right) &= \frac{\sigma^2 (n-1)}{n}
\end{align}
Alternative formulation
The following version is often seen when considering linear regression.{{Cite web|url=https://yangfengstat.github.io/assets/teaching/cochran's-theorem.pdf|title=Cochran's Theorem (A quick tutorial)}} Suppose that is a standard multivariate normal random vector (here denotes the n-by-n identity matrix), and if are all n-by-n symmetric matrices with . Then, on defining , any one of the following conditions implies the other two:
- (thus the are positive semidefinite)
- is independent of for
Statement
Let U1, ..., UN be i.i.d. standard normally distributed random variables, and . Let be symmetric matrices. Define ri to be the rank of . Define , so that the Qi are quadratic forms. Further assume .
Cochran's theorem states that the following are equivalent:
- ,
- the Qi are independent
- each Qi has a chi-squared distribution with ri degrees of freedom.{{Citation |title=Cochran's theorem |date=2008-01-01 |url=https://www.oxfordreference.com/view/10.1093/acref/9780199541454.001.0001/acref-9780199541454-e-294 |work=A Dictionary of Statistics |publisher=Oxford University Press |language=en |doi=10.1093/acref/9780199541454.001.0001 |isbn=978-0-19-954145-4 |access-date=2022-05-18 |last1=Upton |first1=Graham |last2=Cook |first2=Ian |url-access=subscription }}
Often it's stated as , where is idempotent, and is replaced by . But after an orthogonal transform, , and so we reduce to the above theorem.
= Proof =
Claim: Let be a standard Gaussian in , then for any symmetric matrices , if and have the same distribution, then have the same eigenvalues (up to multiplicity).
{{Math proof|title=Proof|proof=
Let the eigenvalues of be , then calculate the characteristic function of . It comes out to be
(To calculate it, first diagonalize , change into that frame, then use the fact that the characteristic function of the sum of independent variables is the product of their characteristic functions.)
For and to be equal, their characteristic functions must be equal, so have the same eigenvalues (up to multiplicity).
}}
Claim: .
{{Math proof|title=Proof|proof=
. Since is symmetric, and , by the previous claim, has the same eigenvalues as 0.
}}
Lemma: If , all symmetric, and have eigenvalues 0, 1, then they are simultaneously diagonalizable.
{{Math proof|title=Proof|proof=
Fix i, and consider the eigenvectors v of
such that . Then we have , so all . Thus we obtain a split of into , such that V is the 1-eigenspace of
, and in the 0-eigenspaces of all other
. Now induct by moving into .
}}
Now we prove the original theorem. We prove that the three cases are equivalent by proving that each case implies the next one in a cycle ().
{{Math proof|title=Proof|proof=
Case: All are independent
Fix some , define , and diagonalize by an orthogonal transform . Then consider . It is diagonalized as well.
Let , then it is also standard Gaussian. Then we have
Inspect their diagonal entries, to see that implies that their nonzero diagonal entries are disjoint.
Thus all eigenvalues of are 0, 1, so is a dist with degrees of freedom.
Case: Each is a distribution.
Fix any , diagonalize it by orthogonal transform , and reindex, so that . Then for some , a spherical rotation of .
Since , we get all . So all , and have eigenvalues .
So diagonalize them simultaneously, add them up, to find .
Case: .
We first show that the matrices B(i) can be simultaneously diagonalized by an orthogonal matrix and that their non-zero eigenvalues are all equal to +1. Once that's shown, take this orthogonal transform to this simultaneous eigenbasis, in which the random vector becomes , but all are still independent and standard Gaussian. Then the result follows.
Each of the matrices B(i) has rank ri and thus ri non-zero eigenvalues. For each i, the sum has at most rank . Since , it follows that C(i) has exactly rank N − ri.
Therefore B(i) and C(i) can be simultaneously diagonalized. This can be shown by first diagonalizing B(i), by the spectral theorem. In this basis, it is of the form:
:
\lambda_1 & 0 & 0 & \cdots & \cdots & & 0 \\
0 & \lambda_2 & 0 & \cdots & \cdots & & 0 \\
0 & 0 & \ddots & & & & \vdots \\
\vdots & \vdots & & \lambda_{r_i} & & \\
\vdots & \vdots & & & 0 & \\
0 & \vdots & & & & \ddots \\
0 & 0 & \ldots & & & & 0
\end{bmatrix}.
Thus the lower rows are zero. Since , it follows that these rows in C(i) in this basis contain a right block which is a unit matrix, with zeros in the rest of these rows. But since C(i) has rank N − ri, it must be zero elsewhere. Thus it is diagonal in this basis as well. It follows that all the non-zero eigenvalues of both B(i) and C(i) are +1. This argument applies for all i, thus all B(i) are positive semidefinite.
Moreover, the above analysis can be repeated in the diagonal basis for . In this basis is the identity of an vector space, so it follows that both B(2) and are simultaneously diagonalizable in this vector space (and hence also together with B(1)). By iteration it follows that all B-s are simultaneously diagonalizable.
Thus there exists an orthogonal matrix such that for all , is diagonal, where any entry with indices , , is equal to 1, while any entry with other indices is equal to 0.
}}
See also
- Cramér's theorem, on decomposing normal distribution
- Infinite divisibility (probability)
{{refimprove|date=July 2011}}
References
{{Experimental design|state=expanded}}
{{DEFAULTSORT:Cochran's Theorem}}