温莎日记 23

Importance of Cochran’s Theorem

Cochran’s theorem tells us about the distributions of partitioned sums of squares of normally distributed random variables. Traditional linear regression analysis relies upon making statistical claims about the distribution of sums of squares of normally distributed random variables In the simple normal regression model:

\frac{SSE}{\sigma^2 } =\frac{\sum{(Y_i-\hat{Y}_i)}^2  }{\sigma^2} ∼ \chi ^2 (n-2)   .

Where does this come from?

- Establish the fact that the multivariate Gaussian sum of squares is \chi ^2(n) distributed. 

- Provide intuition for Cochran’s theorem.

- Prove a lemma in support of Cochran’s theorem.

- Prove Cochran’s theorem.

- Connect Cochran’s theorem back to matrix linear regression.

Theorem 1 for \chi ^2(n): SupposeZ_iare i.i.d. N(0, 1), we have \sum_{i=1}^n  Z_{i}^2  ∼ \chi ^2(n).

Proof: 

Z_i^2 ∼ \chi ^2(n). If Y_{1:n}are i.i.d. random variables with the MGFm_{Y_{1:n}}(t) . 

MGF for U=Y_1+Y_2+...+Y_nism_U(t)=m_{Y_1}(t) \times m_{Y_2}(t) \times ...\times m_{Y_n}(t)

MGF fully characterize the distribution, and the MGF for \chi ^2(n) is {(1-2t)}^{-n/2} .

- Quadratic forms of normal random variables are important in many branches of statistics: Least Squares, ANOVA, Regression Analysis. 

- General idea: Split the sum of the squares of observations into a of quadratic forms where each corresponds to some cause of variation.

- The conclusion of Cochran’s theorem is that, under the assumption of normality, the various quadratic forms are independent and χ^2 distributed. This fact is the foundation upon which many statistical tests rest.

Preliminaries: A Common Quadratic Form

Let X ∼ N(µ, Λ). Consider the quadratic form that appears in the exponent of the normal density (X − \mu )′Λ^{−1}(X − \mu ). In the special case of µ = 0 and Λ = I, this reduces to X′X which by what we just proved we know is \chi ^2(n) distributed. Let’s prove it holds in the general case.

Lemma 1: Let X ∼ N(µ, Λ) , with |Λ| > 0 , then (X −\mu )′Λ^{−1}(X − \mu ) ∼ χ^2(n).

人工神经网络:explorations in the micro-structure cognition | Perceptron

Cochran’s Theorem: Let X_{1:n}  be i.i.d. N(0,\sigma ^2) distributed random variables, and suppose that \sum_{i=1}^n X_{i}^2 =Q_1+Q_2+...+Q_k, where Q_{1:k}  are positive semi-definite quadratic forms in X_{1:n} . Set r_i =rank(A_i). If r_1+r_2+...+r_k=n , then Q_{1:k} is independent, and Q_i ∼  \sigma ^2\chi ^2(r_i).

X be a normal random vector. The components of X are independent iff they are uncorrelated. Let X ∼ N(µ, Λ), then Y = C′X ∼ N(C′µ, C′ΛC). We can find an orthogonal matrix C such that D = C′ΛC is a diagonal matrix. The components of Y will be independent and var(Y_k)=\lambda _k, where \lambda _{1:n} are the eigenvalues of Λ. 

Lemma 2:  Let X_{1:n}be real numbers. Suppose that \Sigma X_{i}^2  can be split into a sum of positive semi-definite quadratic forms, that is \Sigma X_{i}^2 =Q_1+Q_2+...+Q_k, where Qi=X'AiX with rank(A_i)=r_i. If \Sigma r_i=n, then there exists an orthogonal matrix C such that, with X = CY, we have Q_1=Y_1^2 + Y_2^2 +...+Y_{r_1}^2 Q_2=Y_{r_1+1}^2 + Y_{r_1+2}^2 +...+Y_{r_1+r_2}^2 ; ......; Q_k=Y_{n-r_k+1}^2 + Y_{n-r_k+2}^2 +...+Y_{n}^2 .

Different quadratic forms contain different Y -variables and that the number of terms in each Q_i equals that rank, r_i, of Q_i. The Y_i^2 end up in different sums, we have to use this to prove the  independence of the different quadratic forms. Just prove for k = 2 case, the general case can be obtained by induction.

Proof: For k = 2, we have Q = X′A_1X + X′A_2X. There exists an orthogonal matrix C such that C′A_1C = D, where D is a diagonal matrix with eigenvalues of A_1

Since rank(A_1) = r_1, r_1eigenvalues are positive and n − r_1eigenvalues are 0. Suppose without loss of generality, the first r_1eigenvalues are positive. Set X = CY, then we have X′X = Y′C′CY = Y′Y.

Therefore, Q=\sum_{i=1}^n Y_{i}^2 = \sum_{i=1}^{r_1} \lambda _i Y_i +  Y'C'A_2CY. Then, rearranging the terms, \sum_{i=1}^{r_1} (1-\lambda _i)Y_{i}^2+ \sum_{i=r_1+1}^n Y_{i}^2 =  Y'C'A_2CY. Since rank(A_2) = r_2 = n − r_1, we conclude that \lambda _1=\lambda _2=...=\lambda _{r_1}=1 ; Q_1=\sum_{i=1}^{r_1} Y_{i}^2 , Q_2=\sum_{i=r_1+1}^{r_1} Y_{i}^2 .

This lemma is about real numbers, not random variables. It says that \Sigma X_i^2can be split into a sum of positive semi-definite quadratic forms, then there is the orthogonal transformation X = CY such that each of the quadratic forms have nice properties: EachY_iappears in only one resulting sum of squares, which leads to the independence of the sum of squares.

Proof of Cochran’s Theorem:

Using the Lemma, Q_1, · · · , Q_k can be written using Y_i, they are independent. Furthermore, Q_1=\sum_{i=1}^{r_1} Y_{i}^2 ∼ \sigma ^2 \chi ^2(r_1). Other Q_is are the same.

 Applications:

Sample variance is independent from sample mean. RecallSSTO=(n-1)s^2(Y)

SSTO=\Sigma (Y_i -\hat{mean} )^2=\Sigma Y_i^2 -\frac{(\Sigma Y_i)^2}{n} .

Rearrange the term and express in matrix format 

\Sigma Y_i^2=\Sigma (Y_i-\hat{mean} )^2+\frac{(\Sigma Y_i)^2}{n}  ; Y'IY=Y'(I-\frac{1}{n} J)Y+Y'(\frac{1}{n} J)Y.

We know Y'IY ∼ \sigma ^2\chi ^2(n)rank(I-\frac{1}{n}J )=n-1 and rank(\frac{1}{n}J )=1. As a results, \Sigma (Y_i - \hat{mean} )^2 ∼ \sigma ^2 \chi ^2(n-1) , \frac{(\Sigma Y_i)^2 }{n}  ∼  \sigma ^2 \chi ^2(1).

Calculate rank(I-\frac{1}{n} J). First of all, we have 

rank(I-\frac{1}{n} J)\geq rank(I)-rank(\frac{1}{n}J )=n-1

On the other hand, since (I-\frac{1}{n}J )1=0, we have rank(I-\frac{1}{n}J ) \leq  n-1

Therefore, we have rank(I-\frac{1}{n}J ) = n-1

Another proof, noticing I-\frac{1}{n}J is also idempotent and symmetric, therefore, rank(I-\frac{1}{n}J ) =trace(I)-trace(\frac{1}{n}J ) =n-1.

ANOVA:

SSTO=Y'[1-\frac{1}{n}J ]Y ; SSE=Y[I-H]Y ; SSR=Y[H-\frac{1}{n}J ]Y.  

Under the null hypothesis, when \beta =0rank(H-\frac{1}{n}J )=p-1

From linear algebra: SSE~\sigma ^2 \chi ^2(n-p). Then we have: SSR ~ \sigma ^2 \chi ^2(p-1)

As a byproduct, MSE = SSE/(n − p) is an unbiased estimator of variance, since the mean of\chi ^2(n-p) is n-p.

We have trace(H)=trace[X(X'X)^{-1}X']=trace[(X'X)(X'X)^{-1}X']=trace(I_p)=p

Then, rank(I-H)=trace(I-H)=trace(I)-trace(H)=n-p.

First, since we have H1 = 1 (This amounts to do a multiple linear regression with the response always equal to 1 and therefore, the fitted value is still 1 because we can just use the constant to perfectly fit the model), then it is straightforward to check thatH-\frac{1}{n} Jis an idempotent and symmetric matrix. Then, we have rank(H-\frac{1}{n} J)=trace(H)-trace(\frac{1}{n} J)=p-1.

最后编辑于
©著作权归作者所有,转载或内容合作请联系作者
  • 序言:七十年代末,一起剥皮案震惊了整个滨河市,随后出现的几起案子,更是在滨河造成了极大的恐慌,老刑警刘岩,带你破解...
    沈念sama阅读 204,293评论 6 478
  • 序言:滨河连续发生了三起死亡事件,死亡现场离奇诡异,居然都是意外死亡,警方通过查阅死者的电脑和手机,发现死者居然都...
    沈念sama阅读 85,604评论 2 381
  • 文/潘晓璐 我一进店门,熙熙楼的掌柜王于贵愁眉苦脸地迎上来,“玉大人,你说我怎么就摊上这事。” “怎么了?”我有些...
    开封第一讲书人阅读 150,958评论 0 337
  • 文/不坏的土叔 我叫张陵,是天一观的道长。 经常有香客问我,道长,这世上最难降的妖魔是什么? 我笑而不...
    开封第一讲书人阅读 54,729评论 1 277
  • 正文 为了忘掉前任,我火速办了婚礼,结果婚礼上,老公的妹妹穿的比我还像新娘。我一直安慰自己,他们只是感情好,可当我...
    茶点故事阅读 63,719评论 5 366
  • 文/花漫 我一把揭开白布。 她就那样静静地躺着,像睡着了一般。 火红的嫁衣衬着肌肤如雪。 梳的纹丝不乱的头发上,一...
    开封第一讲书人阅读 48,630评论 1 281
  • 那天,我揣着相机与录音,去河边找鬼。 笑死,一个胖子当着我的面吹牛,可吹牛的内容都是我干的。 我是一名探鬼主播,决...
    沈念sama阅读 38,000评论 3 397
  • 文/苍兰香墨 我猛地睁开眼,长吁一口气:“原来是场噩梦啊……” “哼!你这毒妇竟也来了?” 一声冷哼从身侧响起,我...
    开封第一讲书人阅读 36,665评论 0 258
  • 序言:老挝万荣一对情侣失踪,失踪者是张志新(化名)和其女友刘颖,没想到半个月后,有当地人在树林里发现了一具尸体,经...
    沈念sama阅读 40,909评论 1 299
  • 正文 独居荒郊野岭守林人离奇死亡,尸身上长有42处带血的脓包…… 初始之章·张勋 以下内容为张勋视角 年9月15日...
    茶点故事阅读 35,646评论 2 321
  • 正文 我和宋清朗相恋三年,在试婚纱的时候发现自己被绿了。 大学时的朋友给我发了我未婚夫和他白月光在一起吃饭的照片。...
    茶点故事阅读 37,726评论 1 330
  • 序言:一个原本活蹦乱跳的男人离奇死亡,死状恐怖,灵堂内的尸体忽然破棺而出,到底是诈尸还是另有隐情,我是刑警宁泽,带...
    沈念sama阅读 33,400评论 4 321
  • 正文 年R本政府宣布,位于F岛的核电站,受9级特大地震影响,放射性物质发生泄漏。R本人自食恶果不足惜,却给世界环境...
    茶点故事阅读 38,986评论 3 307
  • 文/蒙蒙 一、第九天 我趴在偏房一处隐蔽的房顶上张望。 院中可真热闹,春花似锦、人声如沸。这庄子的主人今日做“春日...
    开封第一讲书人阅读 29,959评论 0 19
  • 文/苍兰香墨 我抬头看了看天上的太阳。三九已至,却和暖如春,着一层夹袄步出监牢的瞬间,已是汗流浃背。 一阵脚步声响...
    开封第一讲书人阅读 31,197评论 1 260
  • 我被黑心中介骗来泰国打工, 没想到刚下飞机就差点儿被人妖公主榨干…… 1. 我叫王不留,地道东北人。 一个月前我还...
    沈念sama阅读 44,996评论 2 349
  • 正文 我出身青楼,却偏偏与公主长得像,于是被迫代替她去往敌国和亲。 传闻我的和亲对象是个残疾皇子,可洞房花烛夜当晚...
    茶点故事阅读 42,481评论 2 342

推荐阅读更多精彩内容