[LA] Centering a data set

1. Centering data set

If we have a data set XRn×p (each row is a sample), then column mean of this data set can be expressed in

X¯=1nXT1n

So the centered data set is
Xc=X1nX¯T=X1n1n1TnX=(I1n1n1Tn)X

The matrix

C=(I1n1p1Tp)

is called centering matrix.

2. Application

Note that this is a more complex decomposition by centering matrix

Proof of Proposition 1 in
http://blog.csdn.net/comeyan/article/details/50514596

proof: Firstly we express mean of full data set by group means,

μ¯=g=1NngNμ¯g=1N(n1μ¯1,n2μ¯2,,ngμ¯G)(n1,n2,,nG)T

Let K=(n1,n2,,nG)T , then using the formula of between covariance matrix, we have

(n1μ¯1n1μ¯,n2μ¯2n2μ¯,,nGμ¯GnGμ¯)=(n1μ¯1,n2μ¯2,,nGμ¯G)μ¯(n1,n2,,nG)=(n1μ¯1,n2μ¯2,,nGμ¯G)(I1NKKT)

ngμ¯g=ng1ngXT1g=1ngXT1g

Σ^b=1Ng=1Gng(μ¯gμ¯)(μ¯gμ¯)T=1Ng=1Gng(μ¯gμ¯)ng(μ¯gμ¯)T=1N(n1μ¯1,n2μ¯2,,nGμ¯G)(I1NKKT)(n1μ¯1,n2μ¯2,,nGμ¯G)T=1NXT(1ng1g)N×G(I1NKKT)(1ng1g)TN×GX=1NXT(1ng1g)N×GC(1ng1g)TN×GX

Claim that C=H~TH~ , where H~RG1×G . That is to say

C=(I1NKKT)=H~H~T

so (K,H~T) is an orthogonal matrix. From the theory of orthogonal contrasts for unbalanced data , we have the G1 orthogonal contrasts have the following form:

δr=nr+1(h=1rnh(μ¯hμ¯r+1))

Denoted by hr the r th row of H~. Then from the definition of orthogonal contrasts, for some constant Cr ,

XT(1ng)hTr=Crδr

which can be rewritten as

j=1Ghrhnjμ¯j=Crnr+1j=1rnj(μ¯jμ¯r+1)

Then

hrjnjhrr+1nr+1hri=Crnr+1nj=Crnr+1t=1rnt=0forj=1,2,,r

which gives

hrjhrr+1hri=Crnr+1nj=Crt=1rnt=0forj=1,2,,r

To making hr2=1 , set

C2ri=1rnr+1ni+j=1rnj2=1

Cr=1ri=1nir+1j=1nj

Now

XT(1ng1g)hr=nr+1ri=1nir+1j=1nj(h=1rnh(μ¯hμ¯r+1))

So

Σ^b=1NXT(1ng1g)N×GC(1ng1g)TN×GX=1NXT(1ng1g)N×GH~TH~(1ng1g)TN×GX=ΔΔT

where Δ=1NXT(1ng1g)N×GH~T
and
Δr=nr+1Nri=1nir+1j=1nj(h=1rnh(μ¯hμ¯r+1))

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值