Como calculo a variação do estimador OLS , condicional em ?


17

Eu sei que e foi assim que cheguei quando calculei a variação:

β0^=y¯−β1^x¯

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¯)2∑i=1n(xi−x¯)2

mas é isso que eu cheguei. A fórmula final que estou tentando calcular é

Var(β0^)=σ2n−1∑i=1nxi2∑i=1n(xi−x¯)2

Não sei como obter

(x¯)2=1n∑i=1nxi2
assumindo que minhas contas estão corretas até lá .

Esse é o caminho certo?

(x¯)2=(1n∑i=1nxi)2=1n2(∑i=1nxi)2

Tenho certeza de que é simples, então a resposta pode esperar um pouco se alguém tiver uma dica para me empurrar na direção certa.


2
Este não é o caminho certo. A quarta equação não se aplica. Por exemplo, com , e , o termo esquerdo é zero, enquanto o termo direito é . O problema vem da etapa em que você divide a variação (terceira linha da segunda equação). Veja porque? x 2 = 0 x 3 = 1 2 / 3x1=−1x2=0x3=12/3
— QuantIbex

Dica para o ponto Quantlbex: a variação não é uma função linear. Ele viola a aditividade e a multiplicação escalar.
— David Marx

@DavidMarx Essa etapa deve ser
=Var((−x¯)β1^+y¯)=(x¯)2Var(β1^)+y¯
, eu acho, e depois que eu substituir em para β1^ e y¯ (não sei o que fazer para isso, mas eu vou pensar sobre isso mais), que deve me colocar na esperança certo caminho que eu.
— MT

Isso não está correto. Pense na condição necessária para que a variação de uma soma seja igual à soma das variações.
— QuantIbex

2
Não, y¯ é aleatório, pois yi=β0+β1xi+ϵ , onde ϵ denota o ruído (aleatório). Mas tudo bem, meu comentário anterior foi talvez enganador. Além disso, Var(aX+b)=a2Var(X) , se a e b denotam constantes.
— Identifique-se em:

Respostas:


19

Esta é uma pergunta de auto-estudo, por isso forneço dicas que ajudarão a encontrar a solução e editarei a resposta com base em seus feedbacks / progresso.

As estimativas dos parâmetros que minimizam a soma dos quadrados são β 0 Para obter a variância deβ0, começar a partir da sua expressão e substituir a expressão deβ1, e fazer o álgebra Vumr(β0)=Vumr(ˉY-β1ˉx)=...

β^0=y¯−β^1x¯,β^1=∑i=1n(xi−x¯)yi∑i=1n(xi−x¯)2.
β^0β^1
Var(β^0)=Var(Y¯−β^1x¯)=…

Editar:
Nós temos Os dois termos de variância são Var( ˉ Y )=Var( 1

Var(β^0)=Var(Y¯−β^1x¯)=Var(Y¯)+(x¯)2Var(β^1)−2x¯Cov(Y¯,β^1).
e V um r ( β 1 )
Var(Y¯)=Var(1n∑i=1nYi)=1n2∑i=1nVar(Yi)=σ2n,
e o termo é covariância COv( ˉ Y , β 1)
Var(β^1)=1[∑i=1n(xi−x¯)2]2∑i=1n(xi−x¯)2Var(Yi)=σ2∑i=1n(xi−x¯)2,
pois∑ n i = 1 (xj- ˉ x )=0. E como n ∑ i = 1 (xi- ˉ x )2= n ∑ i = 1 x 2 i -2 ˉ x n ∑ i = 1 xi+ n ∑ i = 1 ˉ x
Cov(Y¯,β^1)=Cov{1n∑i=1nYi,∑j=1n(xj−x¯)Yj∑i=1n(xi−x¯)2}=1n1∑i=1n(xi−x¯)2Cov{∑i=1nYi,∑j=1n(xj−x¯)Yj}=1n∑i=1n(xi−x¯)2∑i=1n(xj−x¯)∑j=1nCov(Yi,Yj)=1n∑i=1n(xi−x¯)2∑i=1n(xj−x¯)σ2=0
∑i=1n(xj−x¯)=0
∑i=1n(xi−x¯)2=∑i=1nxi2−2x¯∑i=1nxi+∑i=1nx¯2=∑i=1nxi2−nx¯2,
Var(β^0)=σ2n+σ2x¯2∑i=1n(xi−x¯)2=σ2n∑i=1n(xi−x¯)2{∑i=1n(xi−x¯)2+nx¯2}=σ2∑i=1nxi2n∑i=1n(xi−x¯)2.

Edit 2

Why do we have var(∑i=1nYi)=∑i=1nVar(Yi)?

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

Once we have a sample, the Xi are known, the only random terms are the ϵi. Recalling that for a random variable Z and a constant a, we have var(a+Z)=var(Z). Thus,

var(∑i=1nYi)=var(∑i=1nβ0+β1Xi+ϵi)=var(∑i=1nϵi)=∑i=1n∑j=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)=0 for i≠j by the independence of the ϵ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(1n∑i=1nYi)=1n2∑i=1nVar(Yi)
because since the Xi are independent, this implies that the Yi are independent as well, right?
— M T

Also, you can factor out a constant from the covariance in this step:
1n1∑i=1n(xi−x¯)2Cov{∑i=1nYi,∑j=1n(xj−x¯)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 n terms that are identical (and equal to σ2), so the numerator is nσ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) 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=∑i=1n(xi−x¯)2,
and ui is the error term.

1) Show that β^1 can be written as β^1=β1+∑i=1nwiui where wi=diSSTx and di=xi−x¯.

This was easy because we know that

β^1=β1+∑i=1n(xi−x¯)uiSSTx=β1+∑i=1ndiSSTxui=β1+∑i=1nwiui

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

E[(β1^−β1)u¯]=E[u¯∑i=1nwiui]=∑i=1nE[wiu¯ui]=∑i=1nwiE[u¯ui]=1n∑i=1nwiE(ui∑j=1nuj)=1n∑i=1nwi[E(uiu1)+⋯+E(uiuj)+⋯+E(uiun)]

and because the u are i.i.d., E(uiuj)=E(ui)E(uj) when j≠i.

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

=1n∑i=1nwi[E(ui)E(u1)+⋯+E(ui2)+⋯+E(ui)E(un)]=1n∑i=1nwiE(ui2)=1n∑i=1nwi[Var(ui)+E(ui)E(ui)]=1n∑i=1nwiσ2=σ2n∑i=1nwi=σ2n⋅SSTx∑i=1n(xi−x¯)=σ2n⋅SSTx(0)=0

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

β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¯)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 u¯ and β1^−β1 are uncorrelated, the covariance between them is zero, so the variance of the sum is the sum of the variance. β0 is just a constant, so it drops out, as does β1 later in the calculations.

5) Use algebra and the fact that SSTxn=1n∑i=1nxi2−(x¯)2:

Var(β0^)=σ2n+σ2(x¯)2SSTx=σ2SSTxSSTxn+σ2(x¯)2SSTx=σ2SSTx(1n∑i=1nxi2−(x¯)2)+σ2(x¯)2SSTx=σ2n−1∑i=1nxi2SSTx

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

You might want to clarify notations, and specify what ui and SSTx are.
— QuantIbex

ui is the error term and SSTx is the total sum of squares for x (defined in the edit).
— M T

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

1
In point 2, you can't take u¯ out of the expectation, it's not a constant.
— QuantIbex
Ao utilizar nosso site, você reconhece que leu e compreendeu nossa Política de Cookies e nossa Política de Privacidade.
Licensed under cc by-sa 3.0 with attribution required.