koşullu OLS tahmincisinin


17

Bunu biliyorum ^ β 0 = ˉ y - ^ β 1 ˉ x

β0^=y¯β1^x¯
ve bu ı varyans hesaplanan zaman var ne kadar geçerli:

V a r ( ^ β 0 )= V a r ( ˉ y - ^ β 1 ˉ x )= V a r ( ( - ˉ x ) ^ β 1 + ˉ y )=Var((ˉx)^β1)+Var(ˉy)=(ˉx)2Var(^β1)+0=(ˉx)2Var(^β1)+0=σ2(ˉx)2n i = 1 (xi- ˉ x )2

Var(β0^)=Var(y¯β1^x¯)=Var((x¯)β1^+y¯)=Var((x¯)β1^)+Var(y¯)=(x¯)2Var(β1^)+0=(x¯)2Var(β1^)+0=σ2(x¯)2i=1n(xix¯)2

ama bu benim sahip olduğum kadar uzak. Hesaplamaya çalıştığım son formül

V a r ( ^ β 0 )= σ 2 n - 1 n i = 1 x 2 in i = 1 (xi- ˉ x )2

Var(β0^)=σ2n1i=1nx2ii=1n(xix¯)2

Nasıl alınacağından emin değilim ( ˉ x ) 2 = 1n n Σ i = 1 x 2 i

(x¯)2=1ni=1nx2i
matematik orada doğru yukarı olduğunu varsayarak.

Bu doğru yol mu?

( ˉ x ) 2= ( 1nni=1xi)2=1n2(ni=1xi)2

(x¯)2=(1ni=1nxi)2=1n2(i=1nxi)2

I'm sure it's simple, so the answer can wait for a bit if someone has a hint to push me in the right direction.


2
This is not the right path. The 4th equation doesn't hold. For example, with x1=1x1=1, x2=0x2=0, and x3=1x3=1, the left term is zero, whilst the right term is 2/32/3. The problem comes from the step where you split the variance (3rd line of second equation). See why?
QuantIbex

Hint towards Quantlbex point: variance is not a linear function. It violates both additivity and scalar multiplication.
David Marx

@DavidMarx That step should be =Var((ˉx)^β1+ˉy)=(ˉx)2Var(^β1)+ˉy
=Var((x¯)β1^+y¯)=(x¯)2Var(β1^)+y¯
, I think, and then once I substitute in for ^β1β1^ and ˉyy¯ (not sure what to do for this but I'll think about it more), that should put me on the right path I hope.
M T

This is not correct. Think about the condition required for the variance of a sum to be equal to the sum of the variances.
QuantIbex

2
No, ˉyy¯ is random since yi=β0+β1xi+ϵyi=β0+β1xi+ϵ, where ϵϵ denotes the (random) noise. But OK, my previous comment was maybe misleading. Also, Var(aX+b)=a2Var(X)Var(aX+b)=a2Var(X), if aa and bb denote constants.
QuantIbex

Yanıtlar:


19

This is a self-study question, so I provide hints that will hopefully help to find the solution, and I'll edit the answer based on your feedbacks/progress.

The parameter estimates that minimize the sum of squares are ˆβ0=ˉyˆβ1ˉx,ˆβ1=ni=1(xiˉx)yini=1(xiˉx)2.

β^0β^1=y¯β^1x¯,=ni=1(xix¯)yini=1(xix¯)2.
To get the variance of ˆβ0β^0, start from its expression and substitute the expression of ˆβ1β^1, and do the algebra Var(ˆβ0)=Var(ˉYˆβ1ˉx)=
Var(β^0)=Var(Y¯β^1x¯)=

Edit:
We have Var(ˆβ0)=Var(ˉYˆβ1ˉx)=Var(ˉY)+(ˉx)2Var(ˆβ1)2ˉxCov(ˉY,ˆβ1).

Var(β^0)=Var(Y¯β^1x¯)=Var(Y¯)+(x¯)2Var(β^1)2x¯Cov(Y¯,β^1).
The two variance terms are Var(ˉY)=Var(1nni=1Yi)=1n2ni=1Var(Yi)=σ2n,
Var(Y¯)=Var(1ni=1nYi)=1n2i=1nVar(Yi)=σ2n,
and Var(ˆβ1)=1[ni=1(xiˉx)2]2ni=1(xiˉx)2Var(Yi)=σ2ni=1(xiˉx)2,
Var(β^1)=1[ni=1(xix¯)2]2i=1n(xix¯)2Var(Yi)=σ2ni=1(xix¯)2,
and the covariance term is Cov(ˉY,ˆβ1)=Cov{1nni=1Yi,nj=1(xjˉx)Yjni=1(xiˉx)2}=1n1ni=1(xiˉx)2Cov{ni=1Yi,nj=1(xjˉx)Yj}=1nni=1(xiˉx)2ni=1(xjˉx)nj=1Cov(Yi,Yj)=1nni=1(xiˉx)2ni=1(xjˉx)σ2=0
Cov(Y¯,β^1)=Cov{1ni=1nYi,nj=1(xjx¯)Yjni=1(xix¯)2}=1n1ni=1(xix¯)2Cov{i=1nYi,j=1n(xjx¯)Yj}=1nni=1(xix¯)2i=1n(xjx¯)j=1nCov(Yi,Yj)=1nni=1(xix¯)2i=1n(xjx¯)σ2=0
since ni=1(xjˉx)=0ni=1(xjx¯)=0.
And since ni=1(xiˉx)2=ni=1x2i2ˉxni=1xi+ni=1ˉx2=ni=1x2inˉx2,
i=1n(xix¯)2=i=1nx2i2x¯i=1nxi+i=1nx¯2=i=1nx2inx¯2,
we have Var(ˆβ0)=σ2n+σ2ˉx2ni=1(xiˉx)2=σ2nni=1(xiˉx)2{ni=1(xiˉx)2+nˉx2}=σ2ni=1x2inni=1(xiˉx)2.
Var(β^0)=σ2n+σ2x¯2ni=1(xix¯)2=σ2nni=1(xix¯)2{i=1n(xix¯)2+nx¯2}=σ2ni=1x2inni=1(xix¯)2.

Edit 2

Why do we have var(ni=1Yi)=ni=1Var(Yi)var(ni=1Yi)=ni=1Var(Yi)?

The assumed model is Yi=β0+β1Xi+ϵiYi=β0+β1Xi+ϵi, where the ϵiϵi are independant and identically distributed random variables with E(ϵi)=0E(ϵi)=0 and var(ϵi)=σ2var(ϵi)=σ2.

Once we have a sample, the XiXi are known, the only random terms are the ϵiϵi. Recalling that for a random variable ZZ and a constant aa, we have var(a+Z)=var(Z)var(a+Z)=var(Z). Thus, var(ni=1Yi)=var(ni=1β0+β1Xi+ϵi)=var(ni=1ϵi)=ni=1nj=1cov(ϵi,ϵj)=ni=1cov(ϵi,ϵi)=ni=1var(ϵi)=ni=1var(β0+β1Xi+ϵi)=ni=1var(Yi).

var(i=1nYi)=var(i=1nβ0+β1Xi+ϵi)=var(i=1nϵi)=i=1nj=1ncov(ϵi,ϵj)=i=1ncov(ϵi,ϵi)=i=1nvar(ϵi)=i=1nvar(β0+β1Xi+ϵi)=i=1nvar(Yi).
The 4th equality holds as cov(ϵi,ϵj)=0cov(ϵi,ϵj)=0 for ijij by the independence of the ϵiϵi.

I think I got it! The book has suggested steps, and I was able to prove each step separately (I think). It's not as satisfying as just sitting down and grinding it out from this step, since I had to prove intermediate conclusions for it to help, but I think everything looks good.
M T

See edit for the development of the suggested approach.
QuantIbex

The variance of the sum equals the sum of the variances in this step: Var(ˉY)=Var(1nni=1Yi)=1n2ni=1Var(Yi)
Var(Y¯)=Var(1ni=1nYi)=1n2i=1nVar(Yi)
because since the XiXi are independent, this implies that the YiYi are independent as well, right?
M T

Also, you can factor out a constant from the covariance in this step: 1n1ni=1(xiˉx)2Cov{ni=1Yi,nj=1(xjˉx)Yj}
1n1ni=1(xix¯)2Cov{i=1nYi,j=1n(xjx¯)Yj}
even though it's not in both elements because the formula for covariance is multiplicative, right?
M T

1
@oort, in the numerator you have the sum of nn terms that are identical (and equal to σ2σ2), so the numerator is nσ2nσ2.
QuantIbex

1

I got it! Well, with help. I found the part of the book that gives steps to work through when proving the Var(ˆβ0)Var(β^0) formula (thankfully it doesn't actually work them out, otherwise I'd be tempted to not actually do the proof). I proved each separate step, and I think it worked.

I'm using the book's notation, which is: SSTx=ni=1(xiˉx)2,

SSTx=i=1n(xix¯)2,
and uiui is the error term.

1) Show that ˆβ1β^1 can be written as ˆβ1=β1+ni=1wiuiβ^1=β1+i=1nwiui where wi=diSSTxwi=diSSTx and di=xiˉxdi=xix¯.

This was easy because we know that

ˆβ1=β1+ni=1(xiˉx)uiSSTx=β1+ni=1diSSTxui=β1+ni=1wiui

β^1=β1+i=1n(xix¯)uiSSTx=β1+i=1ndiSSTxui=β1+i=1nwiui

2) Use part 1, along with ni=1wi=0i=1nwi=0 to show that ^β1β1^ and ˉuu¯ are uncorrelated, i.e. show that E[(^β1β1)ˉu]=0E[(β1^β1)u¯]=0.

E[(^β1β1)ˉu]=E[ˉuni=1wiui]=ni=1E[wiˉuui]=ni=1wiE[ˉuui]=1nni=1wiE(uinj=1uj)=1nni=1wi[E(uiu1)++E(uiuj)++E(uiun)]

E[(β1^β1)u¯]=E[u¯i=1nwiui]=i=1nE[wiu¯ui]=i=1nwiE[u¯ui]=1ni=1nwiE(uij=1nuj)=1ni=1nwi[E(uiu1)++E(uiuj)++E(uiun)]

and because the uu are i.i.d., E(uiuj)=E(ui)E(uj)E(uiuj)=E(ui)E(uj) when jiji.

When j=ij=i, E(uiuj)=E(u2i)E(uiuj)=E(u2i), so we have:

=1nni=1wi[E(ui)E(u1)++E(u2i)++E(ui)E(un)]=1nni=1wiE(u2i)=1nni=1wi[Var(ui)+E(ui)E(ui)]=1nni=1wiσ2=σ2nni=1wi=σ2nSSTxni=1(xiˉx)=σ2nSSTx(0)=0

=1ni=1nwi[E(ui)E(u1)++E(u2i)++E(ui)E(un)]=1ni=1nwiE(u2i)=1ni=1nwi[Var(ui)+E(ui)E(ui)]=1ni=1nwiσ2=σ2ni=1nwi=σ2nSSTxi=1n(xix¯)=σ2nSSTx(0)=0

3) Show that ^β0β0^ can be written as ^β0=β0+ˉuˉx(^β1β1)β0^=β0+u¯x¯(β1^β1). This seemed pretty easy too:

^β0=ˉy^β1ˉx=(β0+β1ˉx+ˉu)^β1ˉx=β0+ˉuˉx(^β1β1).

β0^=y¯β1^x¯=(β0+β1x¯+u¯)β1^x¯=β0+u¯x¯(β1^β1).

4) Use parts 2 and 3 to show that Var(^β0)=σ2n+σ2(ˉx)2SSTxVar(β0^)=σ2n+σ2(x¯)2SSTx: Var(^β0)=Var(β0+ˉuˉx(^β1β1))=Var(ˉu)+(ˉx)2Var(^β1β1)=σ2n+(ˉx)2Var(^β1)=σ2n+σ2(ˉx)2SSTx.

Var(β0^)=Var(β0+u¯x¯(β1^β1))=Var(u¯)+(x¯)2Var(β1^β1)=σ2n+(x¯)2Var(β1^)=σ2n+σ2(x¯)2SSTx.

I believe this all works because since we provided that ˉuu¯ and ^β1β1β1^β1 are uncorrelated, the covariance between them is zero, so the variance of the sum is the sum of the variance. β0β0 is just a constant, so it drops out, as does β1β1 later in the calculations.

5) Use algebra and the fact that SSTxn=1nni=1x2i(ˉx)2SSTxn=1ni=1nx2i(x¯)2:

Var(^β0)=σ2n+σ2(ˉx)2SSTx=σ2SSTxSSTxn+σ2(ˉx)2SSTx=σ2SSTx(1nni=1x2i(ˉx)2)+σ2(ˉx)2SSTx=σ2n1ni=1x2iSSTx

Var(β0^)=σ2n+σ2(x¯)2SSTx=σ2SSTxSSTxn+σ2(x¯)2SSTx=σ2SSTx(1ni=1nx2i(x¯)2)+σ2(x¯)2SSTx=σ2n1i=1nx2iSSTx

There might be a typo in point 1; I think var(ˆβ)var(β^) should read ˆββ^.
QuantIbex

You might want to clarify notations, and specify what uiui and SSTxSSTx are.
QuantIbex

uiui is the error term and SSTxSSTx is the total sum of squares for xx (defined in the edit).
M T

1
In point 1, the term β1β1 is missing in the last two lines.
QuantIbex

1
In point 2, you can't take ˉuu¯ out of the expectation, it's not a constant.
QuantIbex
Sitemizi kullandığınızda şunları okuyup anladığınızı kabul etmiş olursunuz: Çerez Politikası ve Gizlilik Politikası.
Licensed under cc by-sa 3.0 with attribution required.