201
ECON 626: Applied Microeconomics Lecture 2: Regression Basics and Heteroskedasticity Professors: Pamela Jakiela and Owen Ozier

ECON 626: Applied Microeconomicseconomics.ozier.com/econ626/lec/econ626-L02-slides-2019.pdfECON 626: Applied Microeconomics Lecture 2: Regression Basics and Heteroskedasticity Professors:

  • Upload
    others

  • View
    7

  • Download
    0

Embed Size (px)

Citation preview

Page 1: ECON 626: Applied Microeconomicseconomics.ozier.com/econ626/lec/econ626-L02-slides-2019.pdfECON 626: Applied Microeconomics Lecture 2: Regression Basics and Heteroskedasticity Professors:

ECON 626: Applied Microeconomics

Lecture 2:

Regression Basics and Heteroskedasticity

Professors: Pamela Jakiela and Owen Ozier

Page 2: ECON 626: Applied Microeconomicseconomics.ozier.com/econ626/lec/econ626-L02-slides-2019.pdfECON 626: Applied Microeconomics Lecture 2: Regression Basics and Heteroskedasticity Professors:

One piece of probability/statistics

Page 3: ECON 626: Applied Microeconomicseconomics.ozier.com/econ626/lec/econ626-L02-slides-2019.pdfECON 626: Applied Microeconomics Lecture 2: Regression Basics and Heteroskedasticity Professors:

Variance of mean

Recall: For any independent random variables X and Y :

Var(X + Y ) =

Var(X ) + Var(Y )

Recall: For any constants a and b and random variable X :

Var(aX + b) = a2Var(X )

Thus, for independent random variables Xi each with variance σ2:

Var

(i=N∑i=1

Xi

)= Nσ2

And so

Var

(1

N

i=N∑i=1

Xi

)=

1

Nσ2

UMD Economics 626: Applied Microeconomics Lecture 2: Regression Basics and Heteroskedasticity, Slide 3

Page 4: ECON 626: Applied Microeconomicseconomics.ozier.com/econ626/lec/econ626-L02-slides-2019.pdfECON 626: Applied Microeconomics Lecture 2: Regression Basics and Heteroskedasticity Professors:

Variance of mean

Recall: For any independent random variables X and Y :

Var(X + Y ) = Var(X ) + Var(Y )

Recall: For any constants a and b and random variable X :

Var(aX + b) = a2Var(X )

Thus, for independent random variables Xi each with variance σ2:

Var

(i=N∑i=1

Xi

)= Nσ2

And so

Var

(1

N

i=N∑i=1

Xi

)=

1

Nσ2

UMD Economics 626: Applied Microeconomics Lecture 2: Regression Basics and Heteroskedasticity, Slide 3

Page 5: ECON 626: Applied Microeconomicseconomics.ozier.com/econ626/lec/econ626-L02-slides-2019.pdfECON 626: Applied Microeconomics Lecture 2: Regression Basics and Heteroskedasticity Professors:

Variance of mean

Recall: For any independent random variables X and Y :

Var(X + Y ) = Var(X ) + Var(Y )

Recall: For any constants a and b and random variable X :

Var(aX + b) =

a2Var(X )

Thus, for independent random variables Xi each with variance σ2:

Var

(i=N∑i=1

Xi

)= Nσ2

And so

Var

(1

N

i=N∑i=1

Xi

)=

1

Nσ2

UMD Economics 626: Applied Microeconomics Lecture 2: Regression Basics and Heteroskedasticity, Slide 3

Page 6: ECON 626: Applied Microeconomicseconomics.ozier.com/econ626/lec/econ626-L02-slides-2019.pdfECON 626: Applied Microeconomics Lecture 2: Regression Basics and Heteroskedasticity Professors:

Variance of mean

Recall: For any independent random variables X and Y :

Var(X + Y ) = Var(X ) + Var(Y )

Recall: For any constants a and b and random variable X :

Var(aX + b) = a2Var(X )

Thus, for independent random variables Xi each with variance σ2:

Var

(i=N∑i=1

Xi

)= Nσ2

And so

Var

(1

N

i=N∑i=1

Xi

)=

1

Nσ2

UMD Economics 626: Applied Microeconomics Lecture 2: Regression Basics and Heteroskedasticity, Slide 3

Page 7: ECON 626: Applied Microeconomicseconomics.ozier.com/econ626/lec/econ626-L02-slides-2019.pdfECON 626: Applied Microeconomics Lecture 2: Regression Basics and Heteroskedasticity Professors:

Variance of mean

Recall: For any independent random variables X and Y :

Var(X + Y ) = Var(X ) + Var(Y )

Recall: For any constants a and b and random variable X :

Var(aX + b) = a2Var(X )

Thus, for independent random variables Xi each with variance σ2:

Var

(i=N∑i=1

Xi

)=

Nσ2

And so

Var

(1

N

i=N∑i=1

Xi

)=

1

Nσ2

UMD Economics 626: Applied Microeconomics Lecture 2: Regression Basics and Heteroskedasticity, Slide 3

Page 8: ECON 626: Applied Microeconomicseconomics.ozier.com/econ626/lec/econ626-L02-slides-2019.pdfECON 626: Applied Microeconomics Lecture 2: Regression Basics and Heteroskedasticity Professors:

Variance of mean

Recall: For any independent random variables X and Y :

Var(X + Y ) = Var(X ) + Var(Y )

Recall: For any constants a and b and random variable X :

Var(aX + b) = a2Var(X )

Thus, for independent random variables Xi each with variance σ2:

Var

(i=N∑i=1

Xi

)= Nσ2

And so

Var

(1

N

i=N∑i=1

Xi

)=

1

Nσ2

UMD Economics 626: Applied Microeconomics Lecture 2: Regression Basics and Heteroskedasticity, Slide 3

Page 9: ECON 626: Applied Microeconomicseconomics.ozier.com/econ626/lec/econ626-L02-slides-2019.pdfECON 626: Applied Microeconomics Lecture 2: Regression Basics and Heteroskedasticity Professors:

Variance of mean

Recall: For any independent random variables X and Y :

Var(X + Y ) = Var(X ) + Var(Y )

Recall: For any constants a and b and random variable X :

Var(aX + b) = a2Var(X )

Thus, for independent random variables Xi each with variance σ2:

Var

(i=N∑i=1

Xi

)= Nσ2

And so

Var

(1

N

i=N∑i=1

Xi

)=

1

Nσ2

UMD Economics 626: Applied Microeconomics Lecture 2: Regression Basics and Heteroskedasticity, Slide 3

Page 10: ECON 626: Applied Microeconomicseconomics.ozier.com/econ626/lec/econ626-L02-slides-2019.pdfECON 626: Applied Microeconomics Lecture 2: Regression Basics and Heteroskedasticity Professors:

Variance of mean

Recall: For any independent random variables X and Y :

Var(X + Y ) = Var(X ) + Var(Y )

Recall: For any constants a and b and random variable X :

Var(aX + b) = a2Var(X )

Thus, for independent random variables Xi each with variance σ2:

Var

(i=N∑i=1

Xi

)= Nσ2

And so

Var

(1

N

i=N∑i=1

Xi

)=

1

Nσ2

UMD Economics 626: Applied Microeconomics Lecture 2: Regression Basics and Heteroskedasticity, Slide 3

Page 11: ECON 626: Applied Microeconomicseconomics.ozier.com/econ626/lec/econ626-L02-slides-2019.pdfECON 626: Applied Microeconomics Lecture 2: Regression Basics and Heteroskedasticity Professors:

Linear Algebra (quick review)

Page 12: ECON 626: Applied Microeconomicseconomics.ozier.com/econ626/lec/econ626-L02-slides-2019.pdfECON 626: Applied Microeconomics Lecture 2: Regression Basics and Heteroskedasticity Professors:

Multiplication

k

[a1a2

]

=

[k · a1k · a2

]

[1 2

] [ 34

]= [1 · 3 + 2 · 4] = [11] = 11

[1 00 1

] [a bc d

]=

[a bc d

][

a bc d

] [1 00 1

]=

[a bc d

]

UMD Economics 626: Applied Microeconomics Lecture 2: Regression Basics and Heteroskedasticity, Slide 5

Page 13: ECON 626: Applied Microeconomicseconomics.ozier.com/econ626/lec/econ626-L02-slides-2019.pdfECON 626: Applied Microeconomics Lecture 2: Regression Basics and Heteroskedasticity Professors:

Multiplication

k

[a1a2

]=

[k · a1k · a2

]

[1 2

] [ 34

]= [1 · 3 + 2 · 4] = [11] = 11

[1 00 1

] [a bc d

]=

[a bc d

][

a bc d

] [1 00 1

]=

[a bc d

]

UMD Economics 626: Applied Microeconomics Lecture 2: Regression Basics and Heteroskedasticity, Slide 5

Page 14: ECON 626: Applied Microeconomicseconomics.ozier.com/econ626/lec/econ626-L02-slides-2019.pdfECON 626: Applied Microeconomics Lecture 2: Regression Basics and Heteroskedasticity Professors:

Multiplication

k

[a1a2

]=

[k · a1k · a2

]

[1 2

] [ 34

]=

[1 · 3 + 2 · 4] = [11] = 11

[1 00 1

] [a bc d

]=

[a bc d

][

a bc d

] [1 00 1

]=

[a bc d

]

UMD Economics 626: Applied Microeconomics Lecture 2: Regression Basics and Heteroskedasticity, Slide 5

Page 15: ECON 626: Applied Microeconomicseconomics.ozier.com/econ626/lec/econ626-L02-slides-2019.pdfECON 626: Applied Microeconomics Lecture 2: Regression Basics and Heteroskedasticity Professors:

Multiplication

k

[a1a2

]=

[k · a1k · a2

]

[1 2

] [ 34

]= [1 · 3 + 2 · 4]

= [11] = 11

[1 00 1

] [a bc d

]=

[a bc d

][

a bc d

] [1 00 1

]=

[a bc d

]

UMD Economics 626: Applied Microeconomics Lecture 2: Regression Basics and Heteroskedasticity, Slide 5

Page 16: ECON 626: Applied Microeconomicseconomics.ozier.com/econ626/lec/econ626-L02-slides-2019.pdfECON 626: Applied Microeconomics Lecture 2: Regression Basics and Heteroskedasticity Professors:

Multiplication

k

[a1a2

]=

[k · a1k · a2

]

[1 2

] [ 34

]= [1 · 3 + 2 · 4] = [11]

= 11

[1 00 1

] [a bc d

]=

[a bc d

][

a bc d

] [1 00 1

]=

[a bc d

]

UMD Economics 626: Applied Microeconomics Lecture 2: Regression Basics and Heteroskedasticity, Slide 5

Page 17: ECON 626: Applied Microeconomicseconomics.ozier.com/econ626/lec/econ626-L02-slides-2019.pdfECON 626: Applied Microeconomics Lecture 2: Regression Basics and Heteroskedasticity Professors:

Multiplication

k

[a1a2

]=

[k · a1k · a2

]

[1 2

] [ 34

]= [1 · 3 + 2 · 4] = [11] = 11

[1 00 1

] [a bc d

]=

[a bc d

][

a bc d

] [1 00 1

]=

[a bc d

]

UMD Economics 626: Applied Microeconomics Lecture 2: Regression Basics and Heteroskedasticity, Slide 5

Page 18: ECON 626: Applied Microeconomicseconomics.ozier.com/econ626/lec/econ626-L02-slides-2019.pdfECON 626: Applied Microeconomics Lecture 2: Regression Basics and Heteroskedasticity Professors:

Multiplication

k

[a1a2

]=

[k · a1k · a2

]

[1 2

] [ 34

]= [1 · 3 + 2 · 4] = [11] = 11

[1 00 1

] [a bc d

]=

[a bc d

][

a bc d

] [1 00 1

]=

[a bc d

]

UMD Economics 626: Applied Microeconomics Lecture 2: Regression Basics and Heteroskedasticity, Slide 5

Page 19: ECON 626: Applied Microeconomicseconomics.ozier.com/econ626/lec/econ626-L02-slides-2019.pdfECON 626: Applied Microeconomics Lecture 2: Regression Basics and Heteroskedasticity Professors:

Multiplication

k

[a1a2

]=

[k · a1k · a2

]

[1 2

] [ 34

]= [1 · 3 + 2 · 4] = [11] = 11

[1 00 1

] [a bc d

]=

[

a bc d

]

[a bc d

] [1 00 1

]=

[a bc d

]

UMD Economics 626: Applied Microeconomics Lecture 2: Regression Basics and Heteroskedasticity, Slide 5

Page 20: ECON 626: Applied Microeconomicseconomics.ozier.com/econ626/lec/econ626-L02-slides-2019.pdfECON 626: Applied Microeconomics Lecture 2: Regression Basics and Heteroskedasticity Professors:

Multiplication

k

[a1a2

]=

[k · a1k · a2

]

[1 2

] [ 34

]= [1 · 3 + 2 · 4] = [11] = 11

[1 00 1

] [a bc d

]=

[a b

c d

]

[a bc d

] [1 00 1

]=

[a bc d

]

UMD Economics 626: Applied Microeconomics Lecture 2: Regression Basics and Heteroskedasticity, Slide 5

Page 21: ECON 626: Applied Microeconomicseconomics.ozier.com/econ626/lec/econ626-L02-slides-2019.pdfECON 626: Applied Microeconomics Lecture 2: Regression Basics and Heteroskedasticity Professors:

Multiplication

k

[a1a2

]=

[k · a1k · a2

]

[1 2

] [ 34

]= [1 · 3 + 2 · 4] = [11] = 11

[1 00 1

] [a bc d

]=

[a bc d

]

[a bc d

] [1 00 1

]=

[a bc d

]

UMD Economics 626: Applied Microeconomics Lecture 2: Regression Basics and Heteroskedasticity, Slide 5

Page 22: ECON 626: Applied Microeconomicseconomics.ozier.com/econ626/lec/econ626-L02-slides-2019.pdfECON 626: Applied Microeconomics Lecture 2: Regression Basics and Heteroskedasticity Professors:

Multiplication

k

[a1a2

]=

[k · a1k · a2

]

[1 2

] [ 34

]= [1 · 3 + 2 · 4] = [11] = 11

[1 00 1

] [a bc d

]=

[a bc d

][

a bc d

] [1 00 1

]=

[a bc d

]

UMD Economics 626: Applied Microeconomics Lecture 2: Regression Basics and Heteroskedasticity, Slide 5

Page 23: ECON 626: Applied Microeconomicseconomics.ozier.com/econ626/lec/econ626-L02-slides-2019.pdfECON 626: Applied Microeconomics Lecture 2: Regression Basics and Heteroskedasticity Professors:

Multiplication

k

[a1a2

]=

[k · a1k · a2

]

[1 2

] [ 34

]= [1 · 3 + 2 · 4] = [11] = 11

[1 00 1

] [a bc d

]=

[a bc d

][

a bc d

] [1 00 1

]=

[

a bc d

]

UMD Economics 626: Applied Microeconomics Lecture 2: Regression Basics and Heteroskedasticity, Slide 5

Page 24: ECON 626: Applied Microeconomicseconomics.ozier.com/econ626/lec/econ626-L02-slides-2019.pdfECON 626: Applied Microeconomics Lecture 2: Regression Basics and Heteroskedasticity Professors:

Multiplication

k

[a1a2

]=

[k · a1k · a2

]

[1 2

] [ 34

]= [1 · 3 + 2 · 4] = [11] = 11

[1 00 1

] [a bc d

]=

[a bc d

][

a bc d

] [1 00 1

]=

[a b

c d

]

UMD Economics 626: Applied Microeconomics Lecture 2: Regression Basics and Heteroskedasticity, Slide 5

Page 25: ECON 626: Applied Microeconomicseconomics.ozier.com/econ626/lec/econ626-L02-slides-2019.pdfECON 626: Applied Microeconomics Lecture 2: Regression Basics and Heteroskedasticity Professors:

Multiplication

k

[a1a2

]=

[k · a1k · a2

]

[1 2

] [ 34

]= [1 · 3 + 2 · 4] = [11] = 11

[1 00 1

] [a bc d

]=

[a bc d

][

a bc d

] [1 00 1

]=

[a bc d

]

UMD Economics 626: Applied Microeconomics Lecture 2: Regression Basics and Heteroskedasticity, Slide 5

Page 26: ECON 626: Applied Microeconomicseconomics.ozier.com/econ626/lec/econ626-L02-slides-2019.pdfECON 626: Applied Microeconomics Lecture 2: Regression Basics and Heteroskedasticity Professors:

Multiplication, continued

[D11 0

0 D22

] [a bc d

]=

[D11a D11bD22c D22d

]

Suppose we want

[a bc d

]to be the inverse of

[D11 0

0 D22

].

That is, [D11a D11bD22c D22d

]=

[1 00 1

]Four (simple) equations, four unknowns.[

D11 00 D22

]−1=

[ ]

So inverting a diagonal matrix is easy. A general formula?

UMD Economics 626: Applied Microeconomics Lecture 2: Regression Basics and Heteroskedasticity, Slide 6

Page 27: ECON 626: Applied Microeconomicseconomics.ozier.com/econ626/lec/econ626-L02-slides-2019.pdfECON 626: Applied Microeconomics Lecture 2: Regression Basics and Heteroskedasticity Professors:

Multiplication, continued

[D11 0

0 D22

] [a bc d

]=

[

D11a D11bD22c D22d

]

Suppose we want

[a bc d

]to be the inverse of

[D11 0

0 D22

].

That is, [D11a D11bD22c D22d

]=

[1 00 1

]Four (simple) equations, four unknowns.[

D11 00 D22

]−1=

[ ]

So inverting a diagonal matrix is easy. A general formula?

UMD Economics 626: Applied Microeconomics Lecture 2: Regression Basics and Heteroskedasticity, Slide 6

Page 28: ECON 626: Applied Microeconomicseconomics.ozier.com/econ626/lec/econ626-L02-slides-2019.pdfECON 626: Applied Microeconomics Lecture 2: Regression Basics and Heteroskedasticity Professors:

Multiplication, continued

[D11 0

0 D22

] [a bc d

]=

[D11a D11b

D22c D22d

]

Suppose we want

[a bc d

]to be the inverse of

[D11 0

0 D22

].

That is, [D11a D11bD22c D22d

]=

[1 00 1

]Four (simple) equations, four unknowns.[

D11 00 D22

]−1=

[ ]

So inverting a diagonal matrix is easy. A general formula?

UMD Economics 626: Applied Microeconomics Lecture 2: Regression Basics and Heteroskedasticity, Slide 6

Page 29: ECON 626: Applied Microeconomicseconomics.ozier.com/econ626/lec/econ626-L02-slides-2019.pdfECON 626: Applied Microeconomics Lecture 2: Regression Basics and Heteroskedasticity Professors:

Multiplication, continued

[D11 0

0 D22

] [a bc d

]=

[D11a D11bD22c D22d

]

Suppose we want

[a bc d

]to be the inverse of

[D11 0

0 D22

].

That is, [D11a D11bD22c D22d

]=

[1 00 1

]Four (simple) equations, four unknowns.[

D11 00 D22

]−1=

[ ]

So inverting a diagonal matrix is easy. A general formula?

UMD Economics 626: Applied Microeconomics Lecture 2: Regression Basics and Heteroskedasticity, Slide 6

Page 30: ECON 626: Applied Microeconomicseconomics.ozier.com/econ626/lec/econ626-L02-slides-2019.pdfECON 626: Applied Microeconomics Lecture 2: Regression Basics and Heteroskedasticity Professors:

Multiplication, continued

[D11 0

0 D22

] [a bc d

]=

[D11a D11bD22c D22d

]

Suppose we want

[a bc d

]to be the inverse of

[D11 0

0 D22

].

That is, [D11a D11bD22c D22d

]=

[1 00 1

]Four (simple) equations, four unknowns.[

D11 00 D22

]−1=

[ ]

So inverting a diagonal matrix is easy. A general formula?

UMD Economics 626: Applied Microeconomics Lecture 2: Regression Basics and Heteroskedasticity, Slide 6

Page 31: ECON 626: Applied Microeconomicseconomics.ozier.com/econ626/lec/econ626-L02-slides-2019.pdfECON 626: Applied Microeconomics Lecture 2: Regression Basics and Heteroskedasticity Professors:

Multiplication, continued

[D11 0

0 D22

] [a bc d

]=

[D11a D11bD22c D22d

]

Suppose we want

[a bc d

]to be the inverse of

[D11 0

0 D22

].

That is, [D11a D11bD22c D22d

]=

[1 00 1

]

Four (simple) equations, four unknowns.[D11 0

0 D22

]−1=

[ ]

So inverting a diagonal matrix is easy. A general formula?

UMD Economics 626: Applied Microeconomics Lecture 2: Regression Basics and Heteroskedasticity, Slide 6

Page 32: ECON 626: Applied Microeconomicseconomics.ozier.com/econ626/lec/econ626-L02-slides-2019.pdfECON 626: Applied Microeconomics Lecture 2: Regression Basics and Heteroskedasticity Professors:

Multiplication, continued

[D11 0

0 D22

] [a bc d

]=

[D11a D11bD22c D22d

]

Suppose we want

[a bc d

]to be the inverse of

[D11 0

0 D22

].

That is, [D11a D11bD22c D22d

]=

[1 00 1

]Four (simple) equations, four unknowns.

[D11 0

0 D22

]−1=

[ ]

So inverting a diagonal matrix is easy. A general formula?

UMD Economics 626: Applied Microeconomics Lecture 2: Regression Basics and Heteroskedasticity, Slide 6

Page 33: ECON 626: Applied Microeconomicseconomics.ozier.com/econ626/lec/econ626-L02-slides-2019.pdfECON 626: Applied Microeconomics Lecture 2: Regression Basics and Heteroskedasticity Professors:

Multiplication, continued

[D11 0

0 D22

] [a bc d

]=

[D11a D11bD22c D22d

]

Suppose we want

[a bc d

]to be the inverse of

[D11 0

0 D22

].

That is, [D11a D11bD22c D22d

]=

[1 00 1

]Four (simple) equations, four unknowns.

[D11 0

0 D22

]−1=

[a =

]

So inverting a diagonal matrix is easy. A general formula?

UMD Economics 626: Applied Microeconomics Lecture 2: Regression Basics and Heteroskedasticity, Slide 6

Page 34: ECON 626: Applied Microeconomicseconomics.ozier.com/econ626/lec/econ626-L02-slides-2019.pdfECON 626: Applied Microeconomics Lecture 2: Regression Basics and Heteroskedasticity Professors:

Multiplication, continued

[D11 0

0 D22

] [a bc d

]=

[D11a D11bD22c D22d

]

Suppose we want

[a bc d

]to be the inverse of

[D11 0

0 D22

].

That is, [D11a D11bD22c D22d

]=

[1 00 1

]Four (simple) equations, four unknowns.

[D11 0

0 D22

]−1=

[1

D11

]

So inverting a diagonal matrix is easy. A general formula?

UMD Economics 626: Applied Microeconomics Lecture 2: Regression Basics and Heteroskedasticity, Slide 6

Page 35: ECON 626: Applied Microeconomicseconomics.ozier.com/econ626/lec/econ626-L02-slides-2019.pdfECON 626: Applied Microeconomics Lecture 2: Regression Basics and Heteroskedasticity Professors:

Multiplication, continued

[D11 0

0 D22

] [a bc d

]=

[D11a D11bD22c D22d

]

Suppose we want

[a bc d

]to be the inverse of

[D11 0

0 D22

].

That is, [D11a D11bD22c D22d

]=

[1 00 1

]Four (simple) equations, four unknowns.

[D11 0

0 D22

]−1=

[1

D11b =

]

So inverting a diagonal matrix is easy. A general formula?

UMD Economics 626: Applied Microeconomics Lecture 2: Regression Basics and Heteroskedasticity, Slide 6

Page 36: ECON 626: Applied Microeconomicseconomics.ozier.com/econ626/lec/econ626-L02-slides-2019.pdfECON 626: Applied Microeconomics Lecture 2: Regression Basics and Heteroskedasticity Professors:

Multiplication, continued

[D11 0

0 D22

] [a bc d

]=

[D11a D11bD22c D22d

]

Suppose we want

[a bc d

]to be the inverse of

[D11 0

0 D22

].

That is, [D11a D11bD22c D22d

]=

[1 00 1

]Four (simple) equations, four unknowns.

[D11 0

0 D22

]−1=

[1

D110]

So inverting a diagonal matrix is easy. A general formula?

UMD Economics 626: Applied Microeconomics Lecture 2: Regression Basics and Heteroskedasticity, Slide 6

Page 37: ECON 626: Applied Microeconomicseconomics.ozier.com/econ626/lec/econ626-L02-slides-2019.pdfECON 626: Applied Microeconomics Lecture 2: Regression Basics and Heteroskedasticity Professors:

Multiplication, continued

[D11 0

0 D22

] [a bc d

]=

[D11a D11bD22c D22d

]

Suppose we want

[a bc d

]to be the inverse of

[D11 0

0 D22

].

That is, [D11a D11bD22c D22d

]=

[1 00 1

]Four (simple) equations, four unknowns.

[D11 0

0 D22

]−1=

[1

D110

c =

]

So inverting a diagonal matrix is easy. A general formula?

UMD Economics 626: Applied Microeconomics Lecture 2: Regression Basics and Heteroskedasticity, Slide 6

Page 38: ECON 626: Applied Microeconomicseconomics.ozier.com/econ626/lec/econ626-L02-slides-2019.pdfECON 626: Applied Microeconomics Lecture 2: Regression Basics and Heteroskedasticity Professors:

Multiplication, continued

[D11 0

0 D22

] [a bc d

]=

[D11a D11bD22c D22d

]

Suppose we want

[a bc d

]to be the inverse of

[D11 0

0 D22

].

That is, [D11a D11bD22c D22d

]=

[1 00 1

]Four (simple) equations, four unknowns.

[D11 0

0 D22

]−1=

[1

D110

0

]

So inverting a diagonal matrix is easy. A general formula?

UMD Economics 626: Applied Microeconomics Lecture 2: Regression Basics and Heteroskedasticity, Slide 6

Page 39: ECON 626: Applied Microeconomicseconomics.ozier.com/econ626/lec/econ626-L02-slides-2019.pdfECON 626: Applied Microeconomics Lecture 2: Regression Basics and Heteroskedasticity Professors:

Multiplication, continued

[D11 0

0 D22

] [a bc d

]=

[D11a D11bD22c D22d

]

Suppose we want

[a bc d

]to be the inverse of

[D11 0

0 D22

].

That is, [D11a D11bD22c D22d

]=

[1 00 1

]Four (simple) equations, four unknowns.

[D11 0

0 D22

]−1=

[1

D110

0 d =

]

So inverting a diagonal matrix is easy. A general formula?

UMD Economics 626: Applied Microeconomics Lecture 2: Regression Basics and Heteroskedasticity, Slide 6

Page 40: ECON 626: Applied Microeconomicseconomics.ozier.com/econ626/lec/econ626-L02-slides-2019.pdfECON 626: Applied Microeconomics Lecture 2: Regression Basics and Heteroskedasticity Professors:

Multiplication, continued

[D11 0

0 D22

] [a bc d

]=

[D11a D11bD22c D22d

]

Suppose we want

[a bc d

]to be the inverse of

[D11 0

0 D22

].

That is, [D11a D11bD22c D22d

]=

[1 00 1

]Four (simple) equations, four unknowns.

[D11 0

0 D22

]−1=

[ 1D11

0

0 1D22

]

So inverting a diagonal matrix is easy. A general formula?

UMD Economics 626: Applied Microeconomics Lecture 2: Regression Basics and Heteroskedasticity, Slide 6

Page 41: ECON 626: Applied Microeconomicseconomics.ozier.com/econ626/lec/econ626-L02-slides-2019.pdfECON 626: Applied Microeconomics Lecture 2: Regression Basics and Heteroskedasticity Professors:

Multiplication, continued

[D11 0

0 D22

] [a bc d

]=

[D11a D11bD22c D22d

]

Suppose we want

[a bc d

]to be the inverse of

[D11 0

0 D22

].

That is, [D11a D11bD22c D22d

]=

[1 00 1

]Four (simple) equations, four unknowns.[

D11 00 D22

]−1=

[ 1D11

0

0 1D22

]

So inverting a diagonal matrix is easy. A general formula?

UMD Economics 626: Applied Microeconomics Lecture 2: Regression Basics and Heteroskedasticity, Slide 6

Page 42: ECON 626: Applied Microeconomicseconomics.ozier.com/econ626/lec/econ626-L02-slides-2019.pdfECON 626: Applied Microeconomics Lecture 2: Regression Basics and Heteroskedasticity Professors:

Multiplication, continued

[D11 0

0 D22

] [a bc d

]=

[D11a D11bD22c D22d

]

Suppose we want

[a bc d

]to be the inverse of

[D11 0

0 D22

].

That is, [D11a D11bD22c D22d

]=

[1 00 1

]Four (simple) equations, four unknowns.[

D11 00 D22

]−1=

[ 1D11

0

0 1D22

]

So inverting a diagonal matrix is easy. A general formula?

UMD Economics 626: Applied Microeconomics Lecture 2: Regression Basics and Heteroskedasticity, Slide 6

Page 43: ECON 626: Applied Microeconomicseconomics.ozier.com/econ626/lec/econ626-L02-slides-2019.pdfECON 626: Applied Microeconomics Lecture 2: Regression Basics and Heteroskedasticity Professors:

Inverses (2x2 case)

[a bc d

]−1=

1

ad − bc︸ ︷︷ ︸determinant

[d −b−c a

]

UMD Economics 626: Applied Microeconomics Lecture 2: Regression Basics and Heteroskedasticity, Slide 8

Page 44: ECON 626: Applied Microeconomicseconomics.ozier.com/econ626/lec/econ626-L02-slides-2019.pdfECON 626: Applied Microeconomics Lecture 2: Regression Basics and Heteroskedasticity Professors:

Inverses (2x2 case)

[a bc d

]−1=

1

ad − bc︸ ︷︷ ︸determinant

[d −b−c a

]

UMD Economics 626: Applied Microeconomics Lecture 2: Regression Basics and Heteroskedasticity, Slide 8

Page 45: ECON 626: Applied Microeconomicseconomics.ozier.com/econ626/lec/econ626-L02-slides-2019.pdfECON 626: Applied Microeconomics Lecture 2: Regression Basics and Heteroskedasticity Professors:

Transpose

Let A =

[1 2 34 5 6

]. Let B =

111

. AB = ?

[1 2 34 5 6

] 111

=

[6

15

]

BA = “conformability error” but B’A’ =

[1 1 1

] 1 42 53 6

=[

6 15]

Thus, B’A’ =(AB)’. (Note: A’ is sometimes written AT .)

UMD Economics 626: Applied Microeconomics Lecture 2: Regression Basics and Heteroskedasticity, Slide 9

Page 46: ECON 626: Applied Microeconomicseconomics.ozier.com/econ626/lec/econ626-L02-slides-2019.pdfECON 626: Applied Microeconomics Lecture 2: Regression Basics and Heteroskedasticity Professors:

Transpose

Let A =

[1 2 34 5 6

]. Let B =

111

. AB = ?

[1 2 34 5 6

] 111

=

[6

15

]

BA = “conformability error” but B’A’ =

[1 1 1

] 1 42 53 6

=[

6 15]

Thus, B’A’ =(AB)’. (Note: A’ is sometimes written AT .)

UMD Economics 626: Applied Microeconomics Lecture 2: Regression Basics and Heteroskedasticity, Slide 9

Page 47: ECON 626: Applied Microeconomicseconomics.ozier.com/econ626/lec/econ626-L02-slides-2019.pdfECON 626: Applied Microeconomics Lecture 2: Regression Basics and Heteroskedasticity Professors:

Transpose

Let A =

[1 2 34 5 6

]. Let B =

111

. AB = ?

[1 2 34 5 6

] 111

=

[

615

]

BA = “conformability error” but B’A’ =

[1 1 1

] 1 42 53 6

=[

6 15]

Thus, B’A’ =(AB)’. (Note: A’ is sometimes written AT .)

UMD Economics 626: Applied Microeconomics Lecture 2: Regression Basics and Heteroskedasticity, Slide 9

Page 48: ECON 626: Applied Microeconomicseconomics.ozier.com/econ626/lec/econ626-L02-slides-2019.pdfECON 626: Applied Microeconomics Lecture 2: Regression Basics and Heteroskedasticity Professors:

Transpose

Let A =

[1 2 34 5 6

]. Let B =

111

. AB = ?

[1 2 34 5 6

] 111

=

[6

15

]

BA = “conformability error” but B’A’ =

[1 1 1

] 1 42 53 6

=[

6 15]

Thus, B’A’ =(AB)’. (Note: A’ is sometimes written AT .)

UMD Economics 626: Applied Microeconomics Lecture 2: Regression Basics and Heteroskedasticity, Slide 9

Page 49: ECON 626: Applied Microeconomicseconomics.ozier.com/econ626/lec/econ626-L02-slides-2019.pdfECON 626: Applied Microeconomics Lecture 2: Regression Basics and Heteroskedasticity Professors:

Transpose

Let A =

[1 2 34 5 6

]. Let B =

111

. AB = ?

[1 2 34 5 6

] 111

=

[6

15

]

BA = “conformability error” but B’A’ =

[1 1 1

] 1 42 53 6

=[

6 15]

Thus, B’A’ =(AB)’. (Note: A’ is sometimes written AT .)

UMD Economics 626: Applied Microeconomics Lecture 2: Regression Basics and Heteroskedasticity, Slide 9

Page 50: ECON 626: Applied Microeconomicseconomics.ozier.com/econ626/lec/econ626-L02-slides-2019.pdfECON 626: Applied Microeconomics Lecture 2: Regression Basics and Heteroskedasticity Professors:

Transpose

Let A =

[1 2 34 5 6

]. Let B =

111

. AB = ?

[1 2 34 5 6

] 111

=

[6

15

]

BA =

“conformability error” but B’A’ =

[1 1 1

] 1 42 53 6

=[

6 15]

Thus, B’A’ =(AB)’. (Note: A’ is sometimes written AT .)

UMD Economics 626: Applied Microeconomics Lecture 2: Regression Basics and Heteroskedasticity, Slide 9

Page 51: ECON 626: Applied Microeconomicseconomics.ozier.com/econ626/lec/econ626-L02-slides-2019.pdfECON 626: Applied Microeconomics Lecture 2: Regression Basics and Heteroskedasticity Professors:

Transpose

Let A =

[1 2 34 5 6

]. Let B =

111

. AB = ?

[1 2 34 5 6

] 111

=

[6

15

]

BA = “conformability error”

but B’A’ =

[1 1 1

] 1 42 53 6

=[

6 15]

Thus, B’A’ =(AB)’. (Note: A’ is sometimes written AT .)

UMD Economics 626: Applied Microeconomics Lecture 2: Regression Basics and Heteroskedasticity, Slide 9

Page 52: ECON 626: Applied Microeconomicseconomics.ozier.com/econ626/lec/econ626-L02-slides-2019.pdfECON 626: Applied Microeconomics Lecture 2: Regression Basics and Heteroskedasticity Professors:

Transpose

Let A =

[1 2 34 5 6

]. Let B =

111

. AB = ?

[1 2 34 5 6

] 111

=

[6

15

]

BA = “conformability error” but B’A’ =

[1 1 1

] 1 42 53 6

=[

6 15]

Thus, B’A’ =(AB)’. (Note: A’ is sometimes written AT .)

UMD Economics 626: Applied Microeconomics Lecture 2: Regression Basics and Heteroskedasticity, Slide 9

Page 53: ECON 626: Applied Microeconomicseconomics.ozier.com/econ626/lec/econ626-L02-slides-2019.pdfECON 626: Applied Microeconomics Lecture 2: Regression Basics and Heteroskedasticity Professors:

Transpose

Let A =

[1 2 34 5 6

]. Let B =

111

. AB = ?

[1 2 34 5 6

] 111

=

[6

15

]

BA = “conformability error” but B’A’ =

[1 1 1

] 1 42 53 6

=

[6 15

]

Thus, B’A’ =(AB)’. (Note: A’ is sometimes written AT .)

UMD Economics 626: Applied Microeconomics Lecture 2: Regression Basics and Heteroskedasticity, Slide 9

Page 54: ECON 626: Applied Microeconomicseconomics.ozier.com/econ626/lec/econ626-L02-slides-2019.pdfECON 626: Applied Microeconomics Lecture 2: Regression Basics and Heteroskedasticity Professors:

Transpose

Let A =

[1 2 34 5 6

]. Let B =

111

. AB = ?

[1 2 34 5 6

] 111

=

[6

15

]

BA = “conformability error” but B’A’ =

[1 1 1

] 1 42 53 6

=[

6 15

]

Thus, B’A’ =(AB)’. (Note: A’ is sometimes written AT .)

UMD Economics 626: Applied Microeconomics Lecture 2: Regression Basics and Heteroskedasticity, Slide 9

Page 55: ECON 626: Applied Microeconomicseconomics.ozier.com/econ626/lec/econ626-L02-slides-2019.pdfECON 626: Applied Microeconomics Lecture 2: Regression Basics and Heteroskedasticity Professors:

Transpose

Let A =

[1 2 34 5 6

]. Let B =

111

. AB = ?

[1 2 34 5 6

] 111

=

[6

15

]

BA = “conformability error” but B’A’ =

[1 1 1

] 1 42 53 6

=[

6

15

]

Thus, B’A’ =(AB)’. (Note: A’ is sometimes written AT .)

UMD Economics 626: Applied Microeconomics Lecture 2: Regression Basics and Heteroskedasticity, Slide 9

Page 56: ECON 626: Applied Microeconomicseconomics.ozier.com/econ626/lec/econ626-L02-slides-2019.pdfECON 626: Applied Microeconomics Lecture 2: Regression Basics and Heteroskedasticity Professors:

Transpose

Let A =

[1 2 34 5 6

]. Let B =

111

. AB = ?

[1 2 34 5 6

] 111

=

[6

15

]

BA = “conformability error” but B’A’ =

[1 1 1

] 1 42 53 6

=[

6 15]

Thus, B’A’ =(AB)’. (Note: A’ is sometimes written AT .)

UMD Economics 626: Applied Microeconomics Lecture 2: Regression Basics and Heteroskedasticity, Slide 9

Page 57: ECON 626: Applied Microeconomicseconomics.ozier.com/econ626/lec/econ626-L02-slides-2019.pdfECON 626: Applied Microeconomics Lecture 2: Regression Basics and Heteroskedasticity Professors:

Transpose

Let A =

[1 2 34 5 6

]. Let B =

111

. AB = ?

[1 2 34 5 6

] 111

=

[6

15

]

BA = “conformability error” but B’A’ =

[1 1 1

] 1 42 53 6

=[

6 15]

Thus, B’A’ =(AB)’. (Note: A’ is sometimes written AT .)

UMD Economics 626: Applied Microeconomics Lecture 2: Regression Basics and Heteroskedasticity, Slide 9

Page 58: ECON 626: Applied Microeconomicseconomics.ozier.com/econ626/lec/econ626-L02-slides-2019.pdfECON 626: Applied Microeconomics Lecture 2: Regression Basics and Heteroskedasticity Professors:

Regression

Page 59: ECON 626: Applied Microeconomicseconomics.ozier.com/econ626/lec/econ626-L02-slides-2019.pdfECON 626: Applied Microeconomics Lecture 2: Regression Basics and Heteroskedasticity Professors:

Recall the basic regression (estimation) formula

β = (X ′X )−1X ′y

But what is (X ′X )−1? What does (X ′X )−1X ′ do to y?

UMD Economics 626: Applied Microeconomics Lecture 2: Regression Basics and Heteroskedasticity, Slide 11

Page 60: ECON 626: Applied Microeconomicseconomics.ozier.com/econ626/lec/econ626-L02-slides-2019.pdfECON 626: Applied Microeconomics Lecture 2: Regression Basics and Heteroskedasticity Professors:

Recall the basic regression (estimation) formula

β = (X ′X )−1X ′y

But what is (X ′X )−1? What does (X ′X )−1X ′ do to y?

UMD Economics 626: Applied Microeconomics Lecture 2: Regression Basics and Heteroskedasticity, Slide 11

Page 61: ECON 626: Applied Microeconomicseconomics.ozier.com/econ626/lec/econ626-L02-slides-2019.pdfECON 626: Applied Microeconomics Lecture 2: Regression Basics and Heteroskedasticity Professors:

Matrices’ easy interpretation in “treatment” context

Suppose that we are interested in the relationship between outcome Yi

and a treatment indicator Di . Regress the outcome on...

the treatmentindicator and a constant.

Xi = [

Di 1

]

Suppose that half of N observations have Di = 1 and half have Di = 0.

X =

D1 1D2 1... ...D N

21

D N2 +1 1

D N2 +2 1

... ...DN 1

=

0 10 1... ...0 11 11 1... ...1 1

; Y =

Y1

Y2

...Y N

2

Y N2 +1

Y N2 +2

...YN

UMD Economics 626: Applied Microeconomics Lecture 2: Regression Basics and Heteroskedasticity, Slide 12

Page 62: ECON 626: Applied Microeconomicseconomics.ozier.com/econ626/lec/econ626-L02-slides-2019.pdfECON 626: Applied Microeconomics Lecture 2: Regression Basics and Heteroskedasticity Professors:

Matrices’ easy interpretation in “treatment” context

Suppose that we are interested in the relationship between outcome Yi

and a treatment indicator Di . Regress the outcome on... the treatmentindicator and a constant.

Xi = [

Di 1

]

Suppose that half of N observations have Di = 1 and half have Di = 0.

X =

D1 1D2 1... ...D N

21

D N2 +1 1

D N2 +2 1

... ...DN 1

=

0 10 1... ...0 11 11 1... ...1 1

; Y =

Y1

Y2

...Y N

2

Y N2 +1

Y N2 +2

...YN

UMD Economics 626: Applied Microeconomics Lecture 2: Regression Basics and Heteroskedasticity, Slide 12

Page 63: ECON 626: Applied Microeconomicseconomics.ozier.com/econ626/lec/econ626-L02-slides-2019.pdfECON 626: Applied Microeconomics Lecture 2: Regression Basics and Heteroskedasticity Professors:

Matrices’ easy interpretation in “treatment” context

Suppose that we are interested in the relationship between outcome Yi

and a treatment indicator Di . Regress the outcome on... the treatmentindicator and a constant.

Xi = [Di 1]

Suppose that half of N observations have Di = 1 and half have Di = 0.

X =

D1 1D2 1... ...D N

21

D N2 +1 1

D N2 +2 1

... ...DN 1

=

0 10 1... ...0 11 11 1... ...1 1

; Y =

Y1

Y2

...Y N

2

Y N2 +1

Y N2 +2

...YN

UMD Economics 626: Applied Microeconomics Lecture 2: Regression Basics and Heteroskedasticity, Slide 12

Page 64: ECON 626: Applied Microeconomicseconomics.ozier.com/econ626/lec/econ626-L02-slides-2019.pdfECON 626: Applied Microeconomics Lecture 2: Regression Basics and Heteroskedasticity Professors:

Matrices’ easy interpretation in “treatment” context

Suppose that we are interested in the relationship between outcome Yi

and a treatment indicator Di . Regress the outcome on... the treatmentindicator and a constant.

Xi = [Di 1]

Suppose that half of N observations have Di = 1 and half have Di = 0.

X =

D1 1D2 1... ...D N

21

D N2 +1 1

D N2 +2 1

... ...DN 1

=

0 10 1... ...0 11 11 1... ...1 1

; Y =

Y1

Y2

...Y N

2

Y N2 +1

Y N2 +2

...YN

UMD Economics 626: Applied Microeconomics Lecture 2: Regression Basics and Heteroskedasticity, Slide 12

Page 65: ECON 626: Applied Microeconomicseconomics.ozier.com/econ626/lec/econ626-L02-slides-2019.pdfECON 626: Applied Microeconomics Lecture 2: Regression Basics and Heteroskedasticity Professors:

Matrices’ easy interpretation in “treatment” context

Suppose that we are interested in the relationship between outcome Yi

and a treatment indicator Di . Regress the outcome on... the treatmentindicator and a constant.

Xi = [Di 1]

Suppose that half of N observations have Di = 1 and half have Di = 0.

X =

D1 1D2 1... ...D N

21

D N2 +1 1

D N2 +2 1

... ...DN 1

=

0 10 1... ...0 11 11 1... ...1 1

; Y =

Y1

Y2

...Y N

2

Y N2 +1

Y N2 +2

...YN

UMD Economics 626: Applied Microeconomics Lecture 2: Regression Basics and Heteroskedasticity, Slide 12

Page 66: ECON 626: Applied Microeconomicseconomics.ozier.com/econ626/lec/econ626-L02-slides-2019.pdfECON 626: Applied Microeconomics Lecture 2: Regression Basics and Heteroskedasticity Professors:

Matrices’ easy interpretation in “treatment” context

Suppose that we are interested in the relationship between outcome Yi

and a treatment indicator Di . Regress the outcome on... the treatmentindicator and a constant.

Xi = [Di 1]

Suppose that half of N observations have Di = 1 and half have Di = 0.

X =

D1 1D2 1... ...D N

21

D N2 +1 1

D N2 +2 1

... ...DN 1

=

0 10 1... ...0 1

1 11 1... ...1 1

; Y =

Y1

Y2

...Y N

2

Y N2 +1

Y N2 +2

...YN

UMD Economics 626: Applied Microeconomics Lecture 2: Regression Basics and Heteroskedasticity, Slide 12

Page 67: ECON 626: Applied Microeconomicseconomics.ozier.com/econ626/lec/econ626-L02-slides-2019.pdfECON 626: Applied Microeconomics Lecture 2: Regression Basics and Heteroskedasticity Professors:

Matrices’ easy interpretation in “treatment” context

Suppose that we are interested in the relationship between outcome Yi

and a treatment indicator Di . Regress the outcome on... the treatmentindicator and a constant.

Xi = [Di 1]

Suppose that half of N observations have Di = 1 and half have Di = 0.

X =

D1 1D2 1... ...D N

21

D N2 +1 1

D N2 +2 1

... ...DN 1

=

0 10 1... ...0 11 11 1... ...1 1

; Y =

Y1

Y2

...Y N

2

Y N2 +1

Y N2 +2

...YN

UMD Economics 626: Applied Microeconomics Lecture 2: Regression Basics and Heteroskedasticity, Slide 12

Page 68: ECON 626: Applied Microeconomicseconomics.ozier.com/econ626/lec/econ626-L02-slides-2019.pdfECON 626: Applied Microeconomics Lecture 2: Regression Basics and Heteroskedasticity Professors:

Matrices’ easy interpretation in “treatment” context

Suppose that we are interested in the relationship between outcome Yi

and a treatment indicator Di . Regress the outcome on... the treatmentindicator and a constant.

Xi = [Di 1]

Suppose that half of N observations have Di = 1 and half have Di = 0.

X =

D1 1D2 1... ...D N

21

D N2 +1 1

D N2 +2 1

... ...DN 1

=

0 10 1... ...0 11 11 1... ...1 1

; Y =

Y1

Y2

...Y N

2

Y N2 +1

Y N2 +2

...YN

UMD Economics 626: Applied Microeconomics Lecture 2: Regression Basics and Heteroskedasticity, Slide 12

Page 69: ECON 626: Applied Microeconomicseconomics.ozier.com/econ626/lec/econ626-L02-slides-2019.pdfECON 626: Applied Microeconomics Lecture 2: Regression Basics and Heteroskedasticity Professors:

Matrices’ easy interpretation in “treatment” context

Suppose that we are interested in the relationship between outcome Yi

and a treatment indicator Di . Regress the outcome on... the treatmentindicator and a constant.

Xi = [Di 1]

Suppose that half of N observations have Di = 1 and half have Di = 0.

X =

D1 1D2 1... ...D N

21

D N2 +1 1

D N2 +2 1

... ...DN 1

=

0 10 1... ...0 11 11 1... ...1 1

; Y =

Y1

Y2

...Y N

2

Y N2 +1

Y N2 +2

...YN

UMD Economics 626: Applied Microeconomics Lecture 2: Regression Basics and Heteroskedasticity, Slide 12

Page 70: ECON 626: Applied Microeconomicseconomics.ozier.com/econ626/lec/econ626-L02-slides-2019.pdfECON 626: Applied Microeconomics Lecture 2: Regression Basics and Heteroskedasticity Professors:

Matrices’ easy interpretation in “treatment” context

Recall that we’re afterβ = (X ′X )−1X ′y

Set up X ′X :

[0 0 ... 0 1 1 ... 11 1 ... 1 1 1 ... 1

]

0 10 1... ...0 11 11 1... ...1 1

=

N2

N2

N2 N

UMD Economics 626: Applied Microeconomics Lecture 2: Regression Basics and Heteroskedasticity, Slide 13

Page 71: ECON 626: Applied Microeconomicseconomics.ozier.com/econ626/lec/econ626-L02-slides-2019.pdfECON 626: Applied Microeconomics Lecture 2: Regression Basics and Heteroskedasticity Professors:

Matrices’ easy interpretation in “treatment” context

Recall that we’re afterβ = (X ′X )−1X ′y

Set up X ′X :

[0 0 ... 0 1 1 ... 11 1 ... 1 1 1 ... 1

]

0 10 1... ...0 11 11 1... ...1 1

=

N2

N2

N2 N

UMD Economics 626: Applied Microeconomics Lecture 2: Regression Basics and Heteroskedasticity, Slide 13

Page 72: ECON 626: Applied Microeconomicseconomics.ozier.com/econ626/lec/econ626-L02-slides-2019.pdfECON 626: Applied Microeconomics Lecture 2: Regression Basics and Heteroskedasticity Professors:

Matrices’ easy interpretation in “treatment” context

Recall that we’re afterβ = (X ′X )−1X ′y

Set up X ′X :

[0 0 ... 0 1 1 ... 11 1 ... 1 1 1 ... 1

]

0 10 1... ...0 11 11 1... ...1 1

=

N2

N2

N2 N

UMD Economics 626: Applied Microeconomics Lecture 2: Regression Basics and Heteroskedasticity, Slide 13

Page 73: ECON 626: Applied Microeconomicseconomics.ozier.com/econ626/lec/econ626-L02-slides-2019.pdfECON 626: Applied Microeconomics Lecture 2: Regression Basics and Heteroskedasticity Professors:

Matrices’ easy interpretation in “treatment” context

Recall that we’re afterβ = (X ′X )−1X ′y

Set up X ′X :

[0 0 ... 0 1 1 ... 11 1 ... 1 1 1 ... 1

]

0 10 1... ...0 11 11 1... ...1 1

=

N2

N2

N2 N

UMD Economics 626: Applied Microeconomics Lecture 2: Regression Basics and Heteroskedasticity, Slide 13

Page 74: ECON 626: Applied Microeconomicseconomics.ozier.com/econ626/lec/econ626-L02-slides-2019.pdfECON 626: Applied Microeconomics Lecture 2: Regression Basics and Heteroskedasticity Professors:

Matrices’ easy interpretation in “treatment” context

Recall that we’re afterβ = (X ′X )−1X ′y

Set up X ′X :

[0 0 ... 0 1 1 ... 11 1 ... 1 1 1 ... 1

]

0 10 1... ...0 11 11 1... ...1 1

=

N2

N2

N2 N

UMD Economics 626: Applied Microeconomics Lecture 2: Regression Basics and Heteroskedasticity, Slide 13

Page 75: ECON 626: Applied Microeconomicseconomics.ozier.com/econ626/lec/econ626-L02-slides-2019.pdfECON 626: Applied Microeconomics Lecture 2: Regression Basics and Heteroskedasticity Professors:

Matrices’ easy interpretation in “treatment” context

Recall that we’re afterβ = (X ′X )−1X ′y

Set up X ′X :

[0 0 ... 0 1 1 ... 11 1 ... 1 1 1 ... 1

]

0 10 1... ...0 11 11 1... ...1 1

=

N2

N2

N2

N

UMD Economics 626: Applied Microeconomics Lecture 2: Regression Basics and Heteroskedasticity, Slide 13

Page 76: ECON 626: Applied Microeconomicseconomics.ozier.com/econ626/lec/econ626-L02-slides-2019.pdfECON 626: Applied Microeconomics Lecture 2: Regression Basics and Heteroskedasticity Professors:

Matrices’ easy interpretation in “treatment” context

Recall that we’re afterβ = (X ′X )−1X ′y

Set up X ′X :

[0 0 ... 0 1 1 ... 11 1 ... 1 1 1 ... 1

]

0 10 1... ...0 11 11 1... ...1 1

=

N2

N2

N2 N

UMD Economics 626: Applied Microeconomics Lecture 2: Regression Basics and Heteroskedasticity, Slide 13

Page 77: ECON 626: Applied Microeconomicseconomics.ozier.com/econ626/lec/econ626-L02-slides-2019.pdfECON 626: Applied Microeconomics Lecture 2: Regression Basics and Heteroskedasticity Professors:

Matrices’ easy interpretation in “treatment” context

Recall that we’re afterβ = (X ′X )−1X ′y

Set up X ′X :

[0 0 ... 0 1 1 ... 11 1 ... 1 1 1 ... 1

]

0 10 1... ...0 11 11 1... ...1 1

=

N2

N2

N2 N

UMD Economics 626: Applied Microeconomics Lecture 2: Regression Basics and Heteroskedasticity, Slide 13

Page 78: ECON 626: Applied Microeconomicseconomics.ozier.com/econ626/lec/econ626-L02-slides-2019.pdfECON 626: Applied Microeconomics Lecture 2: Regression Basics and Heteroskedasticity Professors:

Matrices’ easy interpretation in “treatment” context

Recall, [a bc d

]−1=

1

ad − bc

[d −b−c a

]So:

N2

N2

N2 N

−1

=1

N2

2 −N2

4

N − N2

− N2

N2

=2

N

[2 −1−1 1

]

Easy way:

N2

N2

2

N

[1 11 2

]−1=

2

N

[2 −1−1 1

] N2

N2

UMD Economics 626: Applied Microeconomics Lecture 2: Regression Basics and Heteroskedasticity, Slide 14

Page 79: ECON 626: Applied Microeconomicseconomics.ozier.com/econ626/lec/econ626-L02-slides-2019.pdfECON 626: Applied Microeconomics Lecture 2: Regression Basics and Heteroskedasticity Professors:

Matrices’ easy interpretation in “treatment” context

Recall, [a bc d

]−1=

1

ad − bc

[d −b−c a

]So: N

2N2

N2 N

−1 =1

N2

2 −N2

4

N − N2

− N2

N2

=2

N

[2 −1−1 1

]

Easy way:

N2

N2

2

N

[1 11 2

]−1=

2

N

[2 −1−1 1

] N2

N2

UMD Economics 626: Applied Microeconomics Lecture 2: Regression Basics and Heteroskedasticity, Slide 14

Page 80: ECON 626: Applied Microeconomicseconomics.ozier.com/econ626/lec/econ626-L02-slides-2019.pdfECON 626: Applied Microeconomics Lecture 2: Regression Basics and Heteroskedasticity Professors:

Matrices’ easy interpretation in “treatment” context

Recall, [a bc d

]−1=

1

ad − bc

[d −b−c a

]So: N

2N2

N2 N

−1 =

1N2

2 −N2

4

N − N2

− N2

N2

=2

N

[2 −1−1 1

]

Easy way:

N2

N2

2

N

[1 11 2

]−1=

2

N

[2 −1−1 1

] N2

N2

UMD Economics 626: Applied Microeconomics Lecture 2: Regression Basics and Heteroskedasticity, Slide 14

Page 81: ECON 626: Applied Microeconomicseconomics.ozier.com/econ626/lec/econ626-L02-slides-2019.pdfECON 626: Applied Microeconomics Lecture 2: Regression Basics and Heteroskedasticity Professors:

Matrices’ easy interpretation in “treatment” context

Recall, [a bc d

]−1=

1

ad − bc

[d −b−c a

]So: N

2N2

N2 N

−1 =1

N2

2 −N2

4

N − N2

− N2

N2

=2

N

[2 −1−1 1

]

Easy way:

N2

N2

2

N

[1 11 2

]−1=

2

N

[2 −1−1 1

] N2

N2

UMD Economics 626: Applied Microeconomics Lecture 2: Regression Basics and Heteroskedasticity, Slide 14

Page 82: ECON 626: Applied Microeconomicseconomics.ozier.com/econ626/lec/econ626-L02-slides-2019.pdfECON 626: Applied Microeconomics Lecture 2: Regression Basics and Heteroskedasticity Professors:

Matrices’ easy interpretation in “treatment” context

Recall, [a bc d

]−1=

1

ad − bc

[d −b−c a

]So: N

2N2

N2 N

−1 =1

N2

2 −N2

4

N − N2

− N2

N2

=2

N

[2 −1−1 1

]

Easy way:

N2

N2

2

N

[1 11 2

]−1=

2

N

[2 −1−1 1

] N2

N2

UMD Economics 626: Applied Microeconomics Lecture 2: Regression Basics and Heteroskedasticity, Slide 14

Page 83: ECON 626: Applied Microeconomicseconomics.ozier.com/econ626/lec/econ626-L02-slides-2019.pdfECON 626: Applied Microeconomics Lecture 2: Regression Basics and Heteroskedasticity Professors:

Matrices’ easy interpretation in “treatment” context

Recall, [a bc d

]−1=

1

ad − bc

[d −b−c a

]So: N

2N2

N2 N

−1 =1

N2

2 −N2

4

N

− N2

− N2

N2

=2

N

[2 −1−1 1

]

Easy way:

N2

N2

2

N

[1 11 2

]−1=

2

N

[2 −1−1 1

] N2

N2

UMD Economics 626: Applied Microeconomics Lecture 2: Regression Basics and Heteroskedasticity, Slide 14

Page 84: ECON 626: Applied Microeconomicseconomics.ozier.com/econ626/lec/econ626-L02-slides-2019.pdfECON 626: Applied Microeconomics Lecture 2: Regression Basics and Heteroskedasticity Professors:

Matrices’ easy interpretation in “treatment” context

Recall, [a bc d

]−1=

1

ad − bc

[d −b−c a

]So: N

2N2

N2 N

−1 =1

N2

2 −N2

4

N − N2

− N2

N2

=2

N

[2 −1−1 1

]

Easy way:

N2

N2

2

N

[1 11 2

]−1=

2

N

[2 −1−1 1

] N2

N2

UMD Economics 626: Applied Microeconomics Lecture 2: Regression Basics and Heteroskedasticity, Slide 14

Page 85: ECON 626: Applied Microeconomicseconomics.ozier.com/econ626/lec/econ626-L02-slides-2019.pdfECON 626: Applied Microeconomics Lecture 2: Regression Basics and Heteroskedasticity Professors:

Matrices’ easy interpretation in “treatment” context

Recall, [a bc d

]−1=

1

ad − bc

[d −b−c a

]So: N

2N2

N2 N

−1 =1

N2

2 −N2

4

N − N2

− N2

N2

=2

N

[2 −1−1 1

]

Easy way:

N2

N2

2

N

[1 11 2

]−1=

2

N

[2 −1−1 1

] N2

N2

UMD Economics 626: Applied Microeconomics Lecture 2: Regression Basics and Heteroskedasticity, Slide 14

Page 86: ECON 626: Applied Microeconomicseconomics.ozier.com/econ626/lec/econ626-L02-slides-2019.pdfECON 626: Applied Microeconomics Lecture 2: Regression Basics and Heteroskedasticity Professors:

Matrices’ easy interpretation in “treatment” context

Recall, [a bc d

]−1=

1

ad − bc

[d −b−c a

]So: N

2N2

N2 N

−1 =1

N2

2 −N2

4

N − N2

− N2

N2

=2

N

[2 −1−1 1

]

Easy way:

N2

N2

2

N

[1 11 2

]−1=

2

N

[2 −1−1 1

] N2

N2

UMD Economics 626: Applied Microeconomics Lecture 2: Regression Basics and Heteroskedasticity, Slide 14

Page 87: ECON 626: Applied Microeconomicseconomics.ozier.com/econ626/lec/econ626-L02-slides-2019.pdfECON 626: Applied Microeconomics Lecture 2: Regression Basics and Heteroskedasticity Professors:

Matrices’ easy interpretation in “treatment” context

Recall, [a bc d

]−1=

1

ad − bc

[d −b−c a

]So: N

2N2

N2 N

−1 =1

N2

2 −N2

4

N − N2

− N2

N2

=

2

N

[2 −1−1 1

]

Easy way:

N2

N2

2

N

[1 11 2

]−1=

2

N

[2 −1−1 1

] N2

N2

UMD Economics 626: Applied Microeconomics Lecture 2: Regression Basics and Heteroskedasticity, Slide 14

Page 88: ECON 626: Applied Microeconomicseconomics.ozier.com/econ626/lec/econ626-L02-slides-2019.pdfECON 626: Applied Microeconomics Lecture 2: Regression Basics and Heteroskedasticity Professors:

Matrices’ easy interpretation in “treatment” context

Recall, [a bc d

]−1=

1

ad − bc

[d −b−c a

]So: N

2N2

N2 N

−1 =1

N2

2 −N2

4

N − N2

− N2

N2

=2

N

[2 −1−1 1

]

Easy way:

N2

N2

2

N

[1 11 2

]−1=

2

N

[2 −1−1 1

] N2

N2

UMD Economics 626: Applied Microeconomics Lecture 2: Regression Basics and Heteroskedasticity, Slide 14

Page 89: ECON 626: Applied Microeconomicseconomics.ozier.com/econ626/lec/econ626-L02-slides-2019.pdfECON 626: Applied Microeconomics Lecture 2: Regression Basics and Heteroskedasticity Professors:

Matrices’ easy interpretation in “treatment” context

Recall, [a bc d

]−1=

1

ad − bc

[d −b−c a

]So: N

2N2

N2 N

−1 =1

N2

2 −N2

4

N − N2

− N2

N2

=2

N

[2 −1−1 1

]

Easy way:

N2

N2

2

N

[1 11 2

]−1=

2

N

[2 −1−1 1

] N2

N2

UMD Economics 626: Applied Microeconomics Lecture 2: Regression Basics and Heteroskedasticity, Slide 14

Page 90: ECON 626: Applied Microeconomicseconomics.ozier.com/econ626/lec/econ626-L02-slides-2019.pdfECON 626: Applied Microeconomics Lecture 2: Regression Basics and Heteroskedasticity Professors:

Matrices’ easy interpretation in “treatment” context

Recall, [a bc d

]−1=

1

ad − bc

[d −b−c a

]So: N

2N2

N2 N

−1 =1

N2

2 −N2

4

N − N2

− N2

N2

=2

N

[2 −1−1 1

]

Easy way: N2

N2

2

N

[1 11 2

]−1=

2

N

[2 −1−1 1

] N2

N2

UMD Economics 626: Applied Microeconomics Lecture 2: Regression Basics and Heteroskedasticity, Slide 14

Page 91: ECON 626: Applied Microeconomicseconomics.ozier.com/econ626/lec/econ626-L02-slides-2019.pdfECON 626: Applied Microeconomics Lecture 2: Regression Basics and Heteroskedasticity Professors:

Matrices’ easy interpretation in “treatment” context

Recall, [a bc d

]−1=

1

ad − bc

[d −b−c a

]So: N

2N2

N2 N

−1 =1

N2

2 −N2

4

N − N2

− N2

N2

=2

N

[2 −1−1 1

]

Easy way: N2

N2

N2 N

=N

2

[1 11 2

]1

2

N

[1 11 2

]−1=

2

N

[2 −1−1 1

] N2

N2

UMD Economics 626: Applied Microeconomics Lecture 2: Regression Basics and Heteroskedasticity, Slide 14

Page 92: ECON 626: Applied Microeconomicseconomics.ozier.com/econ626/lec/econ626-L02-slides-2019.pdfECON 626: Applied Microeconomics Lecture 2: Regression Basics and Heteroskedasticity Professors:

Matrices’ easy interpretation in “treatment” context

Recall, [a bc d

]−1=

1

ad − bc

[d −b−c a

]So: N

2N2

N2 N

−1 =1

N2

2 −N2

4

N − N2

− N2

N2

=2

N

[2 −1−1 1

]

Easy way: N2

N2

(N

2

[1 11 2

])−1=

2

N

[1 11 2

]−1=

2

N

[2 −1−1 1

] N2

N2

UMD Economics 626: Applied Microeconomics Lecture 2: Regression Basics and Heteroskedasticity, Slide 14

Page 93: ECON 626: Applied Microeconomicseconomics.ozier.com/econ626/lec/econ626-L02-slides-2019.pdfECON 626: Applied Microeconomics Lecture 2: Regression Basics and Heteroskedasticity Professors:

Matrices’ easy interpretation in “treatment” context

Recall, [a bc d

]−1=

1

ad − bc

[d −b−c a

]So: N

2N2

N2 N

−1 =1

N2

2 −N2

4

N − N2

− N2

N2

=2

N

[2 −1−1 1

]

Easy way: N2

N2

(N

2

[1 11 2

])−1=

2

N

[1 11 2

]−1=

2

N

[2 −1−1 1

] N2

N2

UMD Economics 626: Applied Microeconomics Lecture 2: Regression Basics and Heteroskedasticity, Slide 14

Page 94: ECON 626: Applied Microeconomicseconomics.ozier.com/econ626/lec/econ626-L02-slides-2019.pdfECON 626: Applied Microeconomics Lecture 2: Regression Basics and Heteroskedasticity Professors:

Matrices’ easy interpretation in “treatment” context

Recall, [a bc d

]−1=

1

ad − bc

[d −b−c a

]So: N

2N2

N2 N

−1 =1

N2

2 −N2

4

N − N2

− N2

N2

=2

N

[2 −1−1 1

]

Easy way: N2

N2

(N

2

[1 11 2

])−1=

2

N

[1 11 2

]−1=

2

N

[2 −1−1 1

] N2

N2

UMD Economics 626: Applied Microeconomics Lecture 2: Regression Basics and Heteroskedasticity, Slide 14

Page 95: ECON 626: Applied Microeconomicseconomics.ozier.com/econ626/lec/econ626-L02-slides-2019.pdfECON 626: Applied Microeconomics Lecture 2: Regression Basics and Heteroskedasticity Professors:

Matrices’ easy interpretation in “treatment” context

Recall, [a bc d

]−1=

1

ad − bc

[d −b−c a

]So: N

2N2

N2 N

−1 =1

N2

2 −N2

4

N − N2

− N2

N2

=2

N

[2 −1−1 1

]

Easy way: N2

N2

(N

2

[1 11 2

])−1=

2

N

[1 11 2

]−1=

2

N

[2 −1−1 1

] N2

N2

UMD Economics 626: Applied Microeconomics Lecture 2: Regression Basics and Heteroskedasticity, Slide 14

Page 96: ECON 626: Applied Microeconomicseconomics.ozier.com/econ626/lec/econ626-L02-slides-2019.pdfECON 626: Applied Microeconomics Lecture 2: Regression Basics and Heteroskedasticity Professors:

Matrices’ easy interpretation in “treatment” context

Recall we wanted to find: β = (X ′X )−1X ′y . What about X ′y?

[0 0 ... 0 1 1 ... 11 1 ... 1 1 1 ... 1

]

Y1

Y2

...Y N

2

Y N2 +1

Y N2 +2

...YN

=

N∑i= N

2 +1

Yi

N∑i=1

Yi

=

∑T

Yi

∑T

Yi +∑C

Yi

UMD Economics 626: Applied Microeconomics Lecture 2: Regression Basics and Heteroskedasticity, Slide 16

Page 97: ECON 626: Applied Microeconomicseconomics.ozier.com/econ626/lec/econ626-L02-slides-2019.pdfECON 626: Applied Microeconomics Lecture 2: Regression Basics and Heteroskedasticity Professors:

Matrices’ easy interpretation in “treatment” context

Recall we wanted to find: β = (X ′X )−1X ′y . What about X ′y?

[0 0 ... 0 1 1 ... 11 1 ... 1 1 1 ... 1

]

Y1

Y2

...Y N

2

Y N2 +1

Y N2 +2

...YN

=

N∑i= N

2 +1

Yi

N∑i=1

Yi

=

∑T

Yi

∑T

Yi +∑C

Yi

UMD Economics 626: Applied Microeconomics Lecture 2: Regression Basics and Heteroskedasticity, Slide 16

Page 98: ECON 626: Applied Microeconomicseconomics.ozier.com/econ626/lec/econ626-L02-slides-2019.pdfECON 626: Applied Microeconomics Lecture 2: Regression Basics and Heteroskedasticity Professors:

Matrices’ easy interpretation in “treatment” context

Recall we wanted to find: β = (X ′X )−1X ′y . What about X ′y?

[0 0 ... 0 1 1 ... 11 1 ... 1 1 1 ... 1

]

Y1

Y2

...Y N

2

Y N2 +1

Y N2 +2

...YN

=

N∑i= N

2 +1

Yi

N∑i=1

Yi

=

∑T

Yi

∑T

Yi +∑C

Yi

UMD Economics 626: Applied Microeconomics Lecture 2: Regression Basics and Heteroskedasticity, Slide 16

Page 99: ECON 626: Applied Microeconomicseconomics.ozier.com/econ626/lec/econ626-L02-slides-2019.pdfECON 626: Applied Microeconomics Lecture 2: Regression Basics and Heteroskedasticity Professors:

Matrices’ easy interpretation in “treatment” context

Recall we wanted to find: β = (X ′X )−1X ′y . What about X ′y?

[0 0 ... 0 1 1 ... 11 1 ... 1 1 1 ... 1

]

Y1

Y2

...Y N

2

Y N2 +1

Y N2 +2

...YN

=

N∑i= N

2 +1

Yi

N∑i=1

Yi

=

∑T

Yi

∑T

Yi +∑C

Yi

UMD Economics 626: Applied Microeconomics Lecture 2: Regression Basics and Heteroskedasticity, Slide 16

Page 100: ECON 626: Applied Microeconomicseconomics.ozier.com/econ626/lec/econ626-L02-slides-2019.pdfECON 626: Applied Microeconomics Lecture 2: Regression Basics and Heteroskedasticity Professors:

Matrices’ easy interpretation in “treatment” context

Recall we wanted to find: β = (X ′X )−1X ′y . What about X ′y?

[0 0 ... 0 1 1 ... 11 1 ... 1 1 1 ... 1

]

Y1

Y2

...Y N

2

Y N2 +1

Y N2 +2

...YN

=

N∑i= N

2 +1

Yi

N∑i=1

Yi

=

∑T

Yi

∑T

Yi +∑C

Yi

UMD Economics 626: Applied Microeconomics Lecture 2: Regression Basics and Heteroskedasticity, Slide 16

Page 101: ECON 626: Applied Microeconomicseconomics.ozier.com/econ626/lec/econ626-L02-slides-2019.pdfECON 626: Applied Microeconomics Lecture 2: Regression Basics and Heteroskedasticity Professors:

Matrices’ easy interpretation in “treatment” context

Recall we wanted to find: β = (X ′X )−1X ′y . What about X ′y?

[0 0 ... 0 1 1 ... 11 1 ... 1 1 1 ... 1

]

Y1

Y2

...Y N

2

Y N2 +1

Y N2 +2

...YN

=

N∑

i= N2 +1

Yi

N∑i=1

Yi

=

∑T

Yi

∑T

Yi +∑C

Yi

UMD Economics 626: Applied Microeconomics Lecture 2: Regression Basics and Heteroskedasticity, Slide 16

Page 102: ECON 626: Applied Microeconomicseconomics.ozier.com/econ626/lec/econ626-L02-slides-2019.pdfECON 626: Applied Microeconomics Lecture 2: Regression Basics and Heteroskedasticity Professors:

Matrices’ easy interpretation in “treatment” context

Recall we wanted to find: β = (X ′X )−1X ′y . What about X ′y?

[0 0 ... 0 1 1 ... 11 1 ... 1 1 1 ... 1

]

Y1

Y2

...Y N

2

Y N2 +1

Y N2 +2

...YN

=

N∑

i= N2 +1

Yi

N∑i=1

Yi

=

∑T

Yi

∑T

Yi +∑C

Yi

UMD Economics 626: Applied Microeconomics Lecture 2: Regression Basics and Heteroskedasticity, Slide 16

Page 103: ECON 626: Applied Microeconomicseconomics.ozier.com/econ626/lec/econ626-L02-slides-2019.pdfECON 626: Applied Microeconomics Lecture 2: Regression Basics and Heteroskedasticity Professors:

Matrices’ easy interpretation in “treatment” context

Recall we wanted to find: β = (X ′X )−1X ′y . What about X ′y?

[0 0 ... 0 1 1 ... 11 1 ... 1 1 1 ... 1

]

Y1

Y2

...Y N

2

Y N2 +1

Y N2 +2

...YN

=

N∑

i= N2 +1

Yi

N∑i=1

Yi

=

∑T

Yi

∑T

Yi +∑C

Yi

UMD Economics 626: Applied Microeconomics Lecture 2: Regression Basics and Heteroskedasticity, Slide 16

Page 104: ECON 626: Applied Microeconomicseconomics.ozier.com/econ626/lec/econ626-L02-slides-2019.pdfECON 626: Applied Microeconomics Lecture 2: Regression Basics and Heteroskedasticity Professors:

Matrices’ easy interpretation in “treatment” context

We can now compute:β = (X ′X )−1X ′y

2

N

[2 −1−1 1

] ∑T

Yi

∑T

Yi +∑C

Yi

=2

N

2∑T

Yi −∑T

Yi −∑C

Yi

−∑T

Yi +∑T

Yi +∑C

Yi

=2

N

∑T

Yi −∑C

Yi

∑C

Yi

=

YT − YC

YC

=

[β1β2

]= β

We just ran a regression. Now, on to the standard error!What will the dimensions of the variance-covariance matrix be?

UMD Economics 626: Applied Microeconomics Lecture 2: Regression Basics and Heteroskedasticity, Slide 17

Page 105: ECON 626: Applied Microeconomicseconomics.ozier.com/econ626/lec/econ626-L02-slides-2019.pdfECON 626: Applied Microeconomics Lecture 2: Regression Basics and Heteroskedasticity Professors:

Matrices’ easy interpretation in “treatment” context

We can now compute:β = (X ′X )−1X ′y

2

N

[2 −1−1 1

]

∑T

Yi

∑T

Yi +∑C

Yi

=2

N

2∑T

Yi −∑T

Yi −∑C

Yi

−∑T

Yi +∑T

Yi +∑C

Yi

=2

N

∑T

Yi −∑C

Yi

∑C

Yi

=

YT − YC

YC

=

[β1β2

]= β

We just ran a regression. Now, on to the standard error!What will the dimensions of the variance-covariance matrix be?

UMD Economics 626: Applied Microeconomics Lecture 2: Regression Basics and Heteroskedasticity, Slide 17

Page 106: ECON 626: Applied Microeconomicseconomics.ozier.com/econ626/lec/econ626-L02-slides-2019.pdfECON 626: Applied Microeconomics Lecture 2: Regression Basics and Heteroskedasticity Professors:

Matrices’ easy interpretation in “treatment” context

We can now compute:β = (X ′X )−1X ′y

2

N

[2 −1−1 1

] ∑T

Yi

∑T

Yi +∑C

Yi

=2

N

2∑T

Yi −∑T

Yi −∑C

Yi

−∑T

Yi +∑T

Yi +∑C

Yi

=2

N

∑T

Yi −∑C

Yi

∑C

Yi

=

YT − YC

YC

=

[β1β2

]= β

We just ran a regression. Now, on to the standard error!What will the dimensions of the variance-covariance matrix be?

UMD Economics 626: Applied Microeconomics Lecture 2: Regression Basics and Heteroskedasticity, Slide 17

Page 107: ECON 626: Applied Microeconomicseconomics.ozier.com/econ626/lec/econ626-L02-slides-2019.pdfECON 626: Applied Microeconomics Lecture 2: Regression Basics and Heteroskedasticity Professors:

Matrices’ easy interpretation in “treatment” context

We can now compute:β = (X ′X )−1X ′y

2

N

[2 −1−1 1

] ∑T

Yi

∑T

Yi +∑C

Yi

=

2

N

2∑T

Yi −∑T

Yi −∑C

Yi

−∑T

Yi +∑T

Yi +∑C

Yi

=2

N

∑T

Yi −∑C

Yi

∑C

Yi

=

YT − YC

YC

=

[β1β2

]= β

We just ran a regression. Now, on to the standard error!What will the dimensions of the variance-covariance matrix be?

UMD Economics 626: Applied Microeconomics Lecture 2: Regression Basics and Heteroskedasticity, Slide 17

Page 108: ECON 626: Applied Microeconomicseconomics.ozier.com/econ626/lec/econ626-L02-slides-2019.pdfECON 626: Applied Microeconomics Lecture 2: Regression Basics and Heteroskedasticity Professors:

Matrices’ easy interpretation in “treatment” context

We can now compute:β = (X ′X )−1X ′y

2

N

[2 −1−1 1

] ∑T

Yi

∑T

Yi +∑C

Yi

=2

N

2∑T

Yi −∑T

Yi −∑C

Yi

−∑T

Yi +∑T

Yi +∑C

Yi

=2

N

∑T

Yi −∑C

Yi

∑C

Yi

=

YT − YC

YC

=

[β1β2

]= β

We just ran a regression. Now, on to the standard error!What will the dimensions of the variance-covariance matrix be?

UMD Economics 626: Applied Microeconomics Lecture 2: Regression Basics and Heteroskedasticity, Slide 17

Page 109: ECON 626: Applied Microeconomicseconomics.ozier.com/econ626/lec/econ626-L02-slides-2019.pdfECON 626: Applied Microeconomics Lecture 2: Regression Basics and Heteroskedasticity Professors:

Matrices’ easy interpretation in “treatment” context

We can now compute:β = (X ′X )−1X ′y

2

N

[2 −1−1 1

] ∑T

Yi

∑T

Yi +∑C

Yi

=2

N

2∑T

Yi −∑T

Yi −∑C

Yi

−∑T

Yi +∑T

Yi +∑C

Yi

=2

N

∑T

Yi −∑C

Yi

∑C

Yi

=

YT − YC

YC

=

[β1β2

]= β

We just ran a regression. Now, on to the standard error!What will the dimensions of the variance-covariance matrix be?

UMD Economics 626: Applied Microeconomics Lecture 2: Regression Basics and Heteroskedasticity, Slide 17

Page 110: ECON 626: Applied Microeconomicseconomics.ozier.com/econ626/lec/econ626-L02-slides-2019.pdfECON 626: Applied Microeconomics Lecture 2: Regression Basics and Heteroskedasticity Professors:

Matrices’ easy interpretation in “treatment” context

We can now compute:β = (X ′X )−1X ′y

2

N

[2 −1−1 1

] ∑T

Yi

∑T

Yi +∑C

Yi

=2

N

2∑T

Yi −∑T

Yi −∑C

Yi

−∑T

Yi +∑T

Yi +∑C

Yi

=2

N

∑T

Yi −∑C

Yi

∑C

Yi

=

YT − YC

YC

=

[β1β2

]= β

We just ran a regression. Now, on to the standard error!What will the dimensions of the variance-covariance matrix be?

UMD Economics 626: Applied Microeconomics Lecture 2: Regression Basics and Heteroskedasticity, Slide 17

Page 111: ECON 626: Applied Microeconomicseconomics.ozier.com/econ626/lec/econ626-L02-slides-2019.pdfECON 626: Applied Microeconomics Lecture 2: Regression Basics and Heteroskedasticity Professors:

Matrices’ easy interpretation in “treatment” context

We can now compute:β = (X ′X )−1X ′y

2

N

[2 −1−1 1

] ∑T

Yi

∑T

Yi +∑C

Yi

=2

N

2∑T

Yi −∑T

Yi −∑C

Yi

−∑T

Yi +∑T

Yi +∑C

Yi

=

2

N

∑T

Yi −∑C

Yi

∑C

Yi

=

YT − YC

YC

=

[β1β2

]= β

We just ran a regression. Now, on to the standard error!What will the dimensions of the variance-covariance matrix be?

UMD Economics 626: Applied Microeconomics Lecture 2: Regression Basics and Heteroskedasticity, Slide 17

Page 112: ECON 626: Applied Microeconomicseconomics.ozier.com/econ626/lec/econ626-L02-slides-2019.pdfECON 626: Applied Microeconomics Lecture 2: Regression Basics and Heteroskedasticity Professors:

Matrices’ easy interpretation in “treatment” context

We can now compute:β = (X ′X )−1X ′y

2

N

[2 −1−1 1

] ∑T

Yi

∑T

Yi +∑C

Yi

=2

N

2∑T

Yi −∑T

Yi −∑C

Yi

−∑T

Yi +∑T

Yi +∑C

Yi

=2

N

∑T

Yi −∑C

Yi

∑C

Yi

=

YT − YC

YC

=

[β1β2

]= β

We just ran a regression. Now, on to the standard error!What will the dimensions of the variance-covariance matrix be?

UMD Economics 626: Applied Microeconomics Lecture 2: Regression Basics and Heteroskedasticity, Slide 17

Page 113: ECON 626: Applied Microeconomicseconomics.ozier.com/econ626/lec/econ626-L02-slides-2019.pdfECON 626: Applied Microeconomics Lecture 2: Regression Basics and Heteroskedasticity Professors:

Matrices’ easy interpretation in “treatment” context

We can now compute:β = (X ′X )−1X ′y

2

N

[2 −1−1 1

] ∑T

Yi

∑T

Yi +∑C

Yi

=2

N

2∑T

Yi −∑T

Yi −∑C

Yi

−∑T

Yi +∑T

Yi +∑C

Yi

=2

N

∑T

Yi −∑C

Yi

∑C

Yi

=

YT − YC

YC

=

[β1β2

]= β

We just ran a regression. Now, on to the standard error!What will the dimensions of the variance-covariance matrix be?

UMD Economics 626: Applied Microeconomics Lecture 2: Regression Basics and Heteroskedasticity, Slide 17

Page 114: ECON 626: Applied Microeconomicseconomics.ozier.com/econ626/lec/econ626-L02-slides-2019.pdfECON 626: Applied Microeconomics Lecture 2: Regression Basics and Heteroskedasticity Professors:

Matrices’ easy interpretation in “treatment” context

We can now compute:β = (X ′X )−1X ′y

2

N

[2 −1−1 1

] ∑T

Yi

∑T

Yi +∑C

Yi

=2

N

2∑T

Yi −∑T

Yi −∑C

Yi

−∑T

Yi +∑T

Yi +∑C

Yi

=2

N

∑T

Yi −∑C

Yi

∑C

Yi

=

YT − YC

YC

=

[β1β2

]= β

We just ran a regression. Now, on to the standard error!What will the dimensions of the variance-covariance matrix be?

UMD Economics 626: Applied Microeconomics Lecture 2: Regression Basics and Heteroskedasticity, Slide 17

Page 115: ECON 626: Applied Microeconomicseconomics.ozier.com/econ626/lec/econ626-L02-slides-2019.pdfECON 626: Applied Microeconomics Lecture 2: Regression Basics and Heteroskedasticity Professors:

Matrices’ easy interpretation in “treatment” context

We can now compute:β = (X ′X )−1X ′y

2

N

[2 −1−1 1

] ∑T

Yi

∑T

Yi +∑C

Yi

=2

N

2∑T

Yi −∑T

Yi −∑C

Yi

−∑T

Yi +∑T

Yi +∑C

Yi

=2

N

∑T

Yi −∑C

Yi

∑C

Yi

=

YT − YC

YC

=

[β1β2

]= β

We just ran a regression. Now, on to the standard error!What will the dimensions of the variance-covariance matrix be?

UMD Economics 626: Applied Microeconomics Lecture 2: Regression Basics and Heteroskedasticity, Slide 17

Page 116: ECON 626: Applied Microeconomicseconomics.ozier.com/econ626/lec/econ626-L02-slides-2019.pdfECON 626: Applied Microeconomics Lecture 2: Regression Basics and Heteroskedasticity Professors:

Matrices’ easy interpretation in “treatment” context

We can now compute:β = (X ′X )−1X ′y

2

N

[2 −1−1 1

] ∑T

Yi

∑T

Yi +∑C

Yi

=2

N

2∑T

Yi −∑T

Yi −∑C

Yi

−∑T

Yi +∑T

Yi +∑C

Yi

=2

N

∑T

Yi −∑C

Yi

∑C

Yi

=

YT − YC

YC

=

[β1β2

]= β

We just ran a regression. Now, on to the standard error!What will the dimensions of the variance-covariance matrix be?

UMD Economics 626: Applied Microeconomics Lecture 2: Regression Basics and Heteroskedasticity, Slide 17

Page 117: ECON 626: Applied Microeconomicseconomics.ozier.com/econ626/lec/econ626-L02-slides-2019.pdfECON 626: Applied Microeconomics Lecture 2: Regression Basics and Heteroskedasticity Professors:

Matrices’ easy interpretation in “treatment” context

We can now compute:β = (X ′X )−1X ′y

2

N

[2 −1−1 1

] ∑T

Yi

∑T

Yi +∑C

Yi

=2

N

2∑T

Yi −∑T

Yi −∑C

Yi

−∑T

Yi +∑T

Yi +∑C

Yi

=2

N

∑T

Yi −∑C

Yi

∑C

Yi

=

YT − YC

YC

=

[β1β2

]= β

We just ran a regression. Now, on to the standard error!What will the dimensions of the variance-covariance matrix be?

UMD Economics 626: Applied Microeconomics Lecture 2: Regression Basics and Heteroskedasticity, Slide 17

Page 118: ECON 626: Applied Microeconomicseconomics.ozier.com/econ626/lec/econ626-L02-slides-2019.pdfECON 626: Applied Microeconomics Lecture 2: Regression Basics and Heteroskedasticity Professors:

Matrices’ easy interpretation in “treatment” context

We can now compute:β = (X ′X )−1X ′y

2

N

[2 −1−1 1

] ∑T

Yi

∑T

Yi +∑C

Yi

=2

N

2∑T

Yi −∑T

Yi −∑C

Yi

−∑T

Yi +∑T

Yi +∑C

Yi

=2

N

∑T

Yi −∑C

Yi

∑C

Yi

=

YT − YC

YC

=

[β1β2

]= β

We just ran a regression. Now, on to the standard error!What will the dimensions of the variance-covariance matrix be?

UMD Economics 626: Applied Microeconomics Lecture 2: Regression Basics and Heteroskedasticity, Slide 17

Page 119: ECON 626: Applied Microeconomicseconomics.ozier.com/econ626/lec/econ626-L02-slides-2019.pdfECON 626: Applied Microeconomics Lecture 2: Regression Basics and Heteroskedasticity Professors:

Matrices’ easy interpretation in “treatment” context

We can now compute:β = (X ′X )−1X ′y

2

N

[2 −1−1 1

] ∑T

Yi

∑T

Yi +∑C

Yi

=2

N

2∑T

Yi −∑T

Yi −∑C

Yi

−∑T

Yi +∑T

Yi +∑C

Yi

=2

N

∑T

Yi −∑C

Yi

∑C

Yi

=

YT − YC

YC

=

[β1β2

]= β

We just ran a regression. Now, on to the standard error!What will the dimensions of the variance-covariance matrix be?

UMD Economics 626: Applied Microeconomics Lecture 2: Regression Basics and Heteroskedasticity, Slide 17

Page 120: ECON 626: Applied Microeconomicseconomics.ozier.com/econ626/lec/econ626-L02-slides-2019.pdfECON 626: Applied Microeconomics Lecture 2: Regression Basics and Heteroskedasticity Professors:

Matrices’ easy interpretation in “treatment” context

We can now compute:β = (X ′X )−1X ′y

2

N

[2 −1−1 1

] ∑T

Yi

∑T

Yi +∑C

Yi

=2

N

2∑T

Yi −∑T

Yi −∑C

Yi

−∑T

Yi +∑T

Yi +∑C

Yi

=2

N

∑T

Yi −∑C

Yi

∑C

Yi

=

YT − YC

YC

=

[β1β2

]= β

We just ran a regression.

Now, on to the standard error!What will the dimensions of the variance-covariance matrix be?

UMD Economics 626: Applied Microeconomics Lecture 2: Regression Basics and Heteroskedasticity, Slide 17

Page 121: ECON 626: Applied Microeconomicseconomics.ozier.com/econ626/lec/econ626-L02-slides-2019.pdfECON 626: Applied Microeconomics Lecture 2: Regression Basics and Heteroskedasticity Professors:

Matrices’ easy interpretation in “treatment” context

We can now compute:β = (X ′X )−1X ′y

2

N

[2 −1−1 1

] ∑T

Yi

∑T

Yi +∑C

Yi

=2

N

2∑T

Yi −∑T

Yi −∑C

Yi

−∑T

Yi +∑T

Yi +∑C

Yi

=2

N

∑T

Yi −∑C

Yi

∑C

Yi

=

YT − YC

YC

=

[β1β2

]= β

We just ran a regression. Now, on to the standard error!What will the dimensions of the variance-covariance matrix be?

UMD Economics 626: Applied Microeconomics Lecture 2: Regression Basics and Heteroskedasticity, Slide 17

Page 122: ECON 626: Applied Microeconomicseconomics.ozier.com/econ626/lec/econ626-L02-slides-2019.pdfECON 626: Applied Microeconomics Lecture 2: Regression Basics and Heteroskedasticity Professors:

Homoskedastic error

Page 123: ECON 626: Applied Microeconomicseconomics.ozier.com/econ626/lec/econ626-L02-slides-2019.pdfECON 626: Applied Microeconomics Lecture 2: Regression Basics and Heteroskedasticity Professors:

Recall the basic regression (estimation) formula

What is the variance of β = (X ′X )−1X ′y ?First, re-write β:

y = Xβ + e

β = (X ′X )−1X ′y = (X ′X )−1X ′(Xβ + e)

= β + (X ′X )−1X ′e

UMD Economics 626: Applied Microeconomics Lecture 2: Regression Basics and Heteroskedasticity, Slide 19

Page 124: ECON 626: Applied Microeconomicseconomics.ozier.com/econ626/lec/econ626-L02-slides-2019.pdfECON 626: Applied Microeconomics Lecture 2: Regression Basics and Heteroskedasticity Professors:

Recall the basic regression (estimation) formula

What is the variance of β = (X ′X )−1X ′y ?First, re-write β:

y = Xβ + e

β = (X ′X )−1X ′y = (X ′X )−1X ′(Xβ + e)

= β + (X ′X )−1X ′e

UMD Economics 626: Applied Microeconomics Lecture 2: Regression Basics and Heteroskedasticity, Slide 19

Page 125: ECON 626: Applied Microeconomicseconomics.ozier.com/econ626/lec/econ626-L02-slides-2019.pdfECON 626: Applied Microeconomics Lecture 2: Regression Basics and Heteroskedasticity Professors:

Recall the basic regression (estimation) formula

What is the variance of β = (X ′X )−1X ′y ?First, re-write β:

y = Xβ + e

β = (X ′X )−1X ′y = (X ′X )−1X ′(Xβ + e)

= β + (X ′X )−1X ′e

UMD Economics 626: Applied Microeconomics Lecture 2: Regression Basics and Heteroskedasticity, Slide 19

Page 126: ECON 626: Applied Microeconomicseconomics.ozier.com/econ626/lec/econ626-L02-slides-2019.pdfECON 626: Applied Microeconomics Lecture 2: Regression Basics and Heteroskedasticity Professors:

Recall the basic regression (estimation) formula

What is the variance of β = (X ′X )−1X ′y ?First, re-write β:

y = Xβ + e

β = (X ′X )−1X ′y = (X ′X )−1X ′(Xβ + e)

= β + (X ′X )−1X ′e

UMD Economics 626: Applied Microeconomics Lecture 2: Regression Basics and Heteroskedasticity, Slide 19

Page 127: ECON 626: Applied Microeconomicseconomics.ozier.com/econ626/lec/econ626-L02-slides-2019.pdfECON 626: Applied Microeconomics Lecture 2: Regression Basics and Heteroskedasticity Professors:

Structure of the error term, homoskedasticity

Ways of writing second term, (X ′X )−1X ′e:

(X ′X )−1X ′u (CT 4.11) with E [u|X ] = 0 (assumption ii p.73)[∑XiX

′i

]−1∑Xiei (AP p.45) with E [Xiei ] = 0 (mechanically)

Before proceeding to estimate variance, independent observations (CTp.73 assumption ii) (assumptions and implication):

E [uu′|X ] = Ω = Diag [σ2i ]

Under homoskedasticity, σ2i ≡ σ2 ∀i . Thus,

Ω = σ2I

A reasonable estimator, σ2, for σ2: 1N−K

∑N

u2i = 1N−K

(∑T

u2 +∑C

u2)

.

(In this example, K = 2.)

UMD Economics 626: Applied Microeconomics Lecture 2: Regression Basics and Heteroskedasticity, Slide 20

Page 128: ECON 626: Applied Microeconomicseconomics.ozier.com/econ626/lec/econ626-L02-slides-2019.pdfECON 626: Applied Microeconomics Lecture 2: Regression Basics and Heteroskedasticity Professors:

Structure of the error term, homoskedasticity

Ways of writing second term, (X ′X )−1X ′e:

(X ′X )−1X ′u (CT 4.11) with E [u|X ] = 0 (assumption ii p.73)[∑XiX

′i

]−1∑Xiei (AP p.45) with E [Xiei ] = 0 (mechanically)

Before proceeding to estimate variance, independent observations (CTp.73 assumption ii) (assumptions and implication):

E [uu′|X ] = Ω = Diag [σ2i ]

Under homoskedasticity, σ2i ≡ σ2 ∀i . Thus,

Ω = σ2I

A reasonable estimator, σ2, for σ2: 1N−K

∑N

u2i = 1N−K

(∑T

u2 +∑C

u2)

.

(In this example, K = 2.)

UMD Economics 626: Applied Microeconomics Lecture 2: Regression Basics and Heteroskedasticity, Slide 20

Page 129: ECON 626: Applied Microeconomicseconomics.ozier.com/econ626/lec/econ626-L02-slides-2019.pdfECON 626: Applied Microeconomics Lecture 2: Regression Basics and Heteroskedasticity Professors:

Structure of the error term, homoskedasticity

Ways of writing second term, (X ′X )−1X ′e:

(X ′X )−1X ′u (CT 4.11) with E [u|X ] = 0 (assumption ii p.73)[∑XiX

′i

]−1∑Xiei (AP p.45) with E [Xiei ] = 0 (mechanically)

Before proceeding to estimate variance, independent observations (CTp.73 assumption ii) (assumptions and implication):

E [uu′|X ] = Ω = Diag [σ2i ]

Under homoskedasticity, σ2i ≡ σ2 ∀i . Thus,

Ω = σ2I

A reasonable estimator, σ2, for σ2: 1N−K

∑N

u2i = 1N−K

(∑T

u2 +∑C

u2)

.

(In this example, K = 2.)

UMD Economics 626: Applied Microeconomics Lecture 2: Regression Basics and Heteroskedasticity, Slide 20

Page 130: ECON 626: Applied Microeconomicseconomics.ozier.com/econ626/lec/econ626-L02-slides-2019.pdfECON 626: Applied Microeconomics Lecture 2: Regression Basics and Heteroskedasticity Professors:

Structure of the error term, homoskedasticity

Ways of writing second term, (X ′X )−1X ′e:

(X ′X )−1X ′u (CT 4.11) with E [u|X ] = 0 (assumption ii p.73)[∑XiX

′i

]−1∑Xiei (AP p.45) with E [Xiei ] = 0 (mechanically)

Before proceeding to estimate variance, independent observations (CTp.73 assumption ii) (assumptions and implication):

E [uu′|X ] = Ω = Diag [σ2i ]

Under homoskedasticity, σ2i ≡ σ2 ∀i . Thus,

Ω = σ2I

A reasonable estimator, σ2, for σ2:

1N−K

∑N

u2i = 1N−K

(∑T

u2 +∑C

u2)

.

(In this example, K = 2.)

UMD Economics 626: Applied Microeconomics Lecture 2: Regression Basics and Heteroskedasticity, Slide 20

Page 131: ECON 626: Applied Microeconomicseconomics.ozier.com/econ626/lec/econ626-L02-slides-2019.pdfECON 626: Applied Microeconomics Lecture 2: Regression Basics and Heteroskedasticity Professors:

Structure of the error term, homoskedasticity

Ways of writing second term, (X ′X )−1X ′e:

(X ′X )−1X ′u (CT 4.11) with E [u|X ] = 0 (assumption ii p.73)[∑XiX

′i

]−1∑Xiei (AP p.45) with E [Xiei ] = 0 (mechanically)

Before proceeding to estimate variance, independent observations (CTp.73 assumption ii) (assumptions and implication):

E [uu′|X ] = Ω = Diag [σ2i ]

Under homoskedasticity, σ2i ≡ σ2 ∀i . Thus,

Ω = σ2I

A reasonable estimator, σ2, for σ2: 1N−K

∑N

u2i

= 1N−K

(∑T

u2 +∑C

u2)

.

(In this example, K = 2.)

UMD Economics 626: Applied Microeconomics Lecture 2: Regression Basics and Heteroskedasticity, Slide 20

Page 132: ECON 626: Applied Microeconomicseconomics.ozier.com/econ626/lec/econ626-L02-slides-2019.pdfECON 626: Applied Microeconomics Lecture 2: Regression Basics and Heteroskedasticity Professors:

Structure of the error term, homoskedasticity

Ways of writing second term, (X ′X )−1X ′e:

(X ′X )−1X ′u (CT 4.11) with E [u|X ] = 0 (assumption ii p.73)[∑XiX

′i

]−1∑Xiei (AP p.45) with E [Xiei ] = 0 (mechanically)

Before proceeding to estimate variance, independent observations (CTp.73 assumption ii) (assumptions and implication):

E [uu′|X ] = Ω = Diag [σ2i ]

Under homoskedasticity, σ2i ≡ σ2 ∀i . Thus,

Ω = σ2I

A reasonable estimator, σ2, for σ2: 1N−K

∑N

u2i = 1N−K

(∑T

u2 +∑C

u2)

.

(In this example, K = 2.)

UMD Economics 626: Applied Microeconomics Lecture 2: Regression Basics and Heteroskedasticity, Slide 20

Page 133: ECON 626: Applied Microeconomicseconomics.ozier.com/econ626/lec/econ626-L02-slides-2019.pdfECON 626: Applied Microeconomics Lecture 2: Regression Basics and Heteroskedasticity Professors:

The variance-covariance matrix

For the variance, we write this quadratic form of the estimation error:((X ′X )−1X ′u

) ((X ′X )−1X ′u

)′

(X ′X )−1X ′u u′X (X ′X )−1

(X ′X )−1X ′ΩX (X ′X )−1 (CT 4.21)

Under homoskedasticity, our estimate, Ω = σ2I .

(X ′X )−1X ′σ2IX (X ′X )−1

(X ′X )−1X ′IX (X ′X )−1σ2

(X ′X )−1X ′X (X ′X )−1σ2

(X ′X )−1σ2

2N

[2 −1−1 1

]σ2 =

(2

N(N−K)

)[ 2 −1−1 1

](∑T

u2 +∑C

u2)

We have an estimator for the basic variance-covariance matrix underhomoskedasticity. What about heteroskedasticity?

UMD Economics 626: Applied Microeconomics Lecture 2: Regression Basics and Heteroskedasticity, Slide 21

Page 134: ECON 626: Applied Microeconomicseconomics.ozier.com/econ626/lec/econ626-L02-slides-2019.pdfECON 626: Applied Microeconomics Lecture 2: Regression Basics and Heteroskedasticity Professors:

The variance-covariance matrix

For the variance, we write this quadratic form of the estimation error:((X ′X )−1X ′u

) ((X ′X )−1X ′u

)′(X ′X )−1X ′u u′X (X ′X )−1

(X ′X )−1X ′ΩX (X ′X )−1 (CT 4.21)

Under homoskedasticity, our estimate, Ω = σ2I .

(X ′X )−1X ′σ2IX (X ′X )−1

(X ′X )−1X ′IX (X ′X )−1σ2

(X ′X )−1X ′X (X ′X )−1σ2

(X ′X )−1σ2

2N

[2 −1−1 1

]σ2 =

(2

N(N−K)

)[ 2 −1−1 1

](∑T

u2 +∑C

u2)

We have an estimator for the basic variance-covariance matrix underhomoskedasticity. What about heteroskedasticity?

UMD Economics 626: Applied Microeconomics Lecture 2: Regression Basics and Heteroskedasticity, Slide 21

Page 135: ECON 626: Applied Microeconomicseconomics.ozier.com/econ626/lec/econ626-L02-slides-2019.pdfECON 626: Applied Microeconomics Lecture 2: Regression Basics and Heteroskedasticity Professors:

The variance-covariance matrix

For the variance, we write this quadratic form of the estimation error:((X ′X )−1X ′u

) ((X ′X )−1X ′u

)′(X ′X )−1X ′u u′X (X ′X )−1

(X ′X )−1X ′ΩX (X ′X )−1 (CT 4.21)

Under homoskedasticity, our estimate, Ω = σ2I .

(X ′X )−1X ′σ2IX (X ′X )−1

(X ′X )−1X ′IX (X ′X )−1σ2

(X ′X )−1X ′X (X ′X )−1σ2

(X ′X )−1σ2

2N

[2 −1−1 1

]σ2 =

(2

N(N−K)

)[ 2 −1−1 1

](∑T

u2 +∑C

u2)

We have an estimator for the basic variance-covariance matrix underhomoskedasticity. What about heteroskedasticity?

UMD Economics 626: Applied Microeconomics Lecture 2: Regression Basics and Heteroskedasticity, Slide 21

Page 136: ECON 626: Applied Microeconomicseconomics.ozier.com/econ626/lec/econ626-L02-slides-2019.pdfECON 626: Applied Microeconomics Lecture 2: Regression Basics and Heteroskedasticity Professors:

The variance-covariance matrix

For the variance, we write this quadratic form of the estimation error:((X ′X )−1X ′u

) ((X ′X )−1X ′u

)′(X ′X )−1X ′u u′X (X ′X )−1

(X ′X )−1X ′ΩX (X ′X )−1 (CT 4.21)

Under homoskedasticity, our estimate, Ω = σ2I .

(X ′X )−1X ′σ2IX (X ′X )−1

(X ′X )−1X ′IX (X ′X )−1σ2

(X ′X )−1X ′X (X ′X )−1σ2

(X ′X )−1σ2

2N

[2 −1−1 1

]σ2 =

(2

N(N−K)

)[ 2 −1−1 1

](∑T

u2 +∑C

u2)

We have an estimator for the basic variance-covariance matrix underhomoskedasticity. What about heteroskedasticity?

UMD Economics 626: Applied Microeconomics Lecture 2: Regression Basics and Heteroskedasticity, Slide 21

Page 137: ECON 626: Applied Microeconomicseconomics.ozier.com/econ626/lec/econ626-L02-slides-2019.pdfECON 626: Applied Microeconomics Lecture 2: Regression Basics and Heteroskedasticity Professors:

The variance-covariance matrix

For the variance, we write this quadratic form of the estimation error:((X ′X )−1X ′u

) ((X ′X )−1X ′u

)′(X ′X )−1X ′u u′X (X ′X )−1

(X ′X )−1X ′ΩX (X ′X )−1 (CT 4.21)

Under homoskedasticity, our estimate, Ω = σ2I .

(X ′X )−1X ′σ2IX (X ′X )−1

(X ′X )−1X ′IX (X ′X )−1σ2

(X ′X )−1X ′X (X ′X )−1σ2

(X ′X )−1σ2

2N

[2 −1−1 1

]σ2 =

(2

N(N−K)

)[ 2 −1−1 1

](∑T

u2 +∑C

u2)

We have an estimator for the basic variance-covariance matrix underhomoskedasticity. What about heteroskedasticity?

UMD Economics 626: Applied Microeconomics Lecture 2: Regression Basics and Heteroskedasticity, Slide 21

Page 138: ECON 626: Applied Microeconomicseconomics.ozier.com/econ626/lec/econ626-L02-slides-2019.pdfECON 626: Applied Microeconomics Lecture 2: Regression Basics and Heteroskedasticity Professors:

The variance-covariance matrix

For the variance, we write this quadratic form of the estimation error:((X ′X )−1X ′u

) ((X ′X )−1X ′u

)′(X ′X )−1X ′u u′X (X ′X )−1

(X ′X )−1X ′ΩX (X ′X )−1 (CT 4.21)

Under homoskedasticity, our estimate, Ω = σ2I .

(X ′X )−1X ′σ2IX (X ′X )−1

(X ′X )−1X ′IX (X ′X )−1σ2

(X ′X )−1X ′X (X ′X )−1σ2

(X ′X )−1σ2

2N

[2 −1−1 1

]σ2 =

(2

N(N−K)

)[ 2 −1−1 1

](∑T

u2 +∑C

u2)

We have an estimator for the basic variance-covariance matrix underhomoskedasticity. What about heteroskedasticity?

UMD Economics 626: Applied Microeconomics Lecture 2: Regression Basics and Heteroskedasticity, Slide 21

Page 139: ECON 626: Applied Microeconomicseconomics.ozier.com/econ626/lec/econ626-L02-slides-2019.pdfECON 626: Applied Microeconomics Lecture 2: Regression Basics and Heteroskedasticity Professors:

The variance-covariance matrix

For the variance, we write this quadratic form of the estimation error:((X ′X )−1X ′u

) ((X ′X )−1X ′u

)′(X ′X )−1X ′u u′X (X ′X )−1

(X ′X )−1X ′ΩX (X ′X )−1 (CT 4.21)

Under homoskedasticity, our estimate, Ω = σ2I .

(X ′X )−1X ′σ2IX (X ′X )−1

(X ′X )−1X ′IX (X ′X )−1σ2

(X ′X )−1X ′X (X ′X )−1σ2

(X ′X )−1σ2

2N

[2 −1−1 1

]σ2 =

(2

N(N−K)

)[ 2 −1−1 1

](∑T

u2 +∑C

u2)

We have an estimator for the basic variance-covariance matrix underhomoskedasticity. What about heteroskedasticity?

UMD Economics 626: Applied Microeconomics Lecture 2: Regression Basics and Heteroskedasticity, Slide 21

Page 140: ECON 626: Applied Microeconomicseconomics.ozier.com/econ626/lec/econ626-L02-slides-2019.pdfECON 626: Applied Microeconomics Lecture 2: Regression Basics and Heteroskedasticity Professors:

The variance-covariance matrix

For the variance, we write this quadratic form of the estimation error:((X ′X )−1X ′u

) ((X ′X )−1X ′u

)′(X ′X )−1X ′u u′X (X ′X )−1

(X ′X )−1X ′ΩX (X ′X )−1 (CT 4.21)

Under homoskedasticity, our estimate, Ω = σ2I .

(X ′X )−1X ′σ2IX (X ′X )−1

(X ′X )−1X ′IX (X ′X )−1σ2

(X ′X )−1X ′X (X ′X )−1σ2

(X ′X )−1σ2

2N

[2 −1−1 1

]σ2 =

(2

N(N−K)

)[ 2 −1−1 1

](∑T

u2 +∑C

u2)

We have an estimator for the basic variance-covariance matrix underhomoskedasticity. What about heteroskedasticity?

UMD Economics 626: Applied Microeconomics Lecture 2: Regression Basics and Heteroskedasticity, Slide 21

Page 141: ECON 626: Applied Microeconomicseconomics.ozier.com/econ626/lec/econ626-L02-slides-2019.pdfECON 626: Applied Microeconomics Lecture 2: Regression Basics and Heteroskedasticity Professors:

The variance-covariance matrix

For the variance, we write this quadratic form of the estimation error:((X ′X )−1X ′u

) ((X ′X )−1X ′u

)′(X ′X )−1X ′u u′X (X ′X )−1

(X ′X )−1X ′ΩX (X ′X )−1 (CT 4.21)

Under homoskedasticity, our estimate, Ω = σ2I .

(X ′X )−1X ′σ2IX (X ′X )−1

(X ′X )−1X ′IX (X ′X )−1σ2

(X ′X )−1X ′X (X ′X )−1σ2

(X ′X )−1σ2

2N

[2 −1−1 1

]σ2 =

(2

N(N−K)

)[ 2 −1−1 1

](∑T

u2 +∑C

u2)

We have an estimator for the basic variance-covariance matrix underhomoskedasticity. What about heteroskedasticity?

UMD Economics 626: Applied Microeconomics Lecture 2: Regression Basics and Heteroskedasticity, Slide 21

Page 142: ECON 626: Applied Microeconomicseconomics.ozier.com/econ626/lec/econ626-L02-slides-2019.pdfECON 626: Applied Microeconomics Lecture 2: Regression Basics and Heteroskedasticity Professors:

The variance-covariance matrix

For the variance, we write this quadratic form of the estimation error:((X ′X )−1X ′u

) ((X ′X )−1X ′u

)′(X ′X )−1X ′u u′X (X ′X )−1

(X ′X )−1X ′ΩX (X ′X )−1 (CT 4.21)

Under homoskedasticity, our estimate, Ω = σ2I .

(X ′X )−1X ′σ2IX (X ′X )−1

(X ′X )−1X ′IX (X ′X )−1σ2

(X ′X )−1X ′X (X ′X )−1σ2

(X ′X )−1σ2

2N

[2 −1−1 1

]σ2

=(

2N(N−K)

)[ 2 −1−1 1

](∑T

u2 +∑C

u2)

We have an estimator for the basic variance-covariance matrix underhomoskedasticity. What about heteroskedasticity?

UMD Economics 626: Applied Microeconomics Lecture 2: Regression Basics and Heteroskedasticity, Slide 21

Page 143: ECON 626: Applied Microeconomicseconomics.ozier.com/econ626/lec/econ626-L02-slides-2019.pdfECON 626: Applied Microeconomics Lecture 2: Regression Basics and Heteroskedasticity Professors:

The variance-covariance matrix

For the variance, we write this quadratic form of the estimation error:((X ′X )−1X ′u

) ((X ′X )−1X ′u

)′(X ′X )−1X ′u u′X (X ′X )−1

(X ′X )−1X ′ΩX (X ′X )−1 (CT 4.21)

Under homoskedasticity, our estimate, Ω = σ2I .

(X ′X )−1X ′σ2IX (X ′X )−1

(X ′X )−1X ′IX (X ′X )−1σ2

(X ′X )−1X ′X (X ′X )−1σ2

(X ′X )−1σ2

2N

[2 −1−1 1

]σ2 =

(2

N(N−K)

)[ 2 −1−1 1

](∑T

u2 +∑C

u2)

We have an estimator for the basic variance-covariance matrix underhomoskedasticity. What about heteroskedasticity?

UMD Economics 626: Applied Microeconomics Lecture 2: Regression Basics and Heteroskedasticity, Slide 21

Page 144: ECON 626: Applied Microeconomicseconomics.ozier.com/econ626/lec/econ626-L02-slides-2019.pdfECON 626: Applied Microeconomics Lecture 2: Regression Basics and Heteroskedasticity Professors:

The variance-covariance matrix

For the variance, we write this quadratic form of the estimation error:((X ′X )−1X ′u

) ((X ′X )−1X ′u

)′(X ′X )−1X ′u u′X (X ′X )−1

(X ′X )−1X ′ΩX (X ′X )−1 (CT 4.21)

Under homoskedasticity, our estimate, Ω = σ2I .

(X ′X )−1X ′σ2IX (X ′X )−1

(X ′X )−1X ′IX (X ′X )−1σ2

(X ′X )−1X ′X (X ′X )−1σ2

(X ′X )−1σ2

2N

[2 −1−1 1

]σ2 =

(2

N(N−K)

)[ 2 −1−1 1

](∑T

u2 +∑C

u2)

We have an estimator for the basic variance-covariance matrix underhomoskedasticity.

What about heteroskedasticity?

UMD Economics 626: Applied Microeconomics Lecture 2: Regression Basics and Heteroskedasticity, Slide 21

Page 145: ECON 626: Applied Microeconomicseconomics.ozier.com/econ626/lec/econ626-L02-slides-2019.pdfECON 626: Applied Microeconomics Lecture 2: Regression Basics and Heteroskedasticity Professors:

The variance-covariance matrix

For the variance, we write this quadratic form of the estimation error:((X ′X )−1X ′u

) ((X ′X )−1X ′u

)′(X ′X )−1X ′u u′X (X ′X )−1

(X ′X )−1X ′ΩX (X ′X )−1 (CT 4.21)

Under homoskedasticity, our estimate, Ω = σ2I .

(X ′X )−1X ′σ2IX (X ′X )−1

(X ′X )−1X ′IX (X ′X )−1σ2

(X ′X )−1X ′X (X ′X )−1σ2

(X ′X )−1σ2

2N

[2 −1−1 1

]σ2 =

(2

N(N−K)

)[ 2 −1−1 1

](∑T

u2 +∑C

u2)

We have an estimator for the basic variance-covariance matrix underhomoskedasticity. What about heteroskedasticity?

UMD Economics 626: Applied Microeconomics Lecture 2: Regression Basics and Heteroskedasticity, Slide 21

Page 146: ECON 626: Applied Microeconomicseconomics.ozier.com/econ626/lec/econ626-L02-slides-2019.pdfECON 626: Applied Microeconomics Lecture 2: Regression Basics and Heteroskedasticity Professors:

Heteroskedasticity

Page 147: ECON 626: Applied Microeconomicseconomics.ozier.com/econ626/lec/econ626-L02-slides-2019.pdfECON 626: Applied Microeconomics Lecture 2: Regression Basics and Heteroskedasticity Professors:

Structure of the error term, revisited

Ways of writing second term, (X ′X )−1X ′e:

(X ′X )−1X ′u (CT 4.11) with E [u|X ] = 0 (assumption ii p.73)[∑XiX

′i

]−1∑Xiei (AP p.45) with E [Xiei ] = 0 (mechanically)

Before proceeding to estimate variance, independent observations (CTp.73 assumption ii) (assumptions and implication):

E [uu′|X ] = Ω = Diag [σ2i ]

So a reasonable estimator:

Ω = Diag [u2i ] (CT notation) = Diag [e2i ] (AP notation)

UMD Economics 626: Applied Microeconomics Lecture 2: Regression Basics and Heteroskedasticity, Slide 23

Page 148: ECON 626: Applied Microeconomicseconomics.ozier.com/econ626/lec/econ626-L02-slides-2019.pdfECON 626: Applied Microeconomics Lecture 2: Regression Basics and Heteroskedasticity Professors:

Structure of the error term, revisited

Ways of writing second term, (X ′X )−1X ′e:

(X ′X )−1X ′u (CT 4.11) with E [u|X ] = 0 (assumption ii p.73)[∑XiX

′i

]−1∑Xiei (AP p.45) with E [Xiei ] = 0 (mechanically)

Before proceeding to estimate variance, independent observations (CTp.73 assumption ii) (assumptions and implication):

E [uu′|X ] = Ω = Diag [σ2i ]

So a reasonable estimator:

Ω = Diag [u2i ] (CT notation) = Diag [e2i ] (AP notation)

UMD Economics 626: Applied Microeconomics Lecture 2: Regression Basics and Heteroskedasticity, Slide 23

Page 149: ECON 626: Applied Microeconomicseconomics.ozier.com/econ626/lec/econ626-L02-slides-2019.pdfECON 626: Applied Microeconomics Lecture 2: Regression Basics and Heteroskedasticity Professors:

Structure of the error term, revisited

Ways of writing second term, (X ′X )−1X ′e:

(X ′X )−1X ′u (CT 4.11) with E [u|X ] = 0 (assumption ii p.73)[∑XiX

′i

]−1∑Xiei (AP p.45) with E [Xiei ] = 0 (mechanically)

Before proceeding to estimate variance, independent observations (CTp.73 assumption ii) (assumptions and implication):

E [uu′|X ] = Ω = Diag [σ2i ]

So a reasonable estimator:

Ω = Diag [u2i ] (CT notation) = Diag [e2i ] (AP notation)

UMD Economics 626: Applied Microeconomics Lecture 2: Regression Basics and Heteroskedasticity, Slide 23

Page 150: ECON 626: Applied Microeconomicseconomics.ozier.com/econ626/lec/econ626-L02-slides-2019.pdfECON 626: Applied Microeconomics Lecture 2: Regression Basics and Heteroskedasticity Professors:

Why heteroskedasticity?

For the variance, we write this quadratic form of the estimation error:((X ′X )−1X ′u

) ((X ′X )−1X ′u

)′

(X ′X )−1X ′u u′X (X ′X )−1

(X ′X )−1X ′ΩX (X ′X )−1 (CT 4.21)

= (∑

xix′i )−1∑

ui2xix

′i (∑

xix′i )−1

(CT 4.21)

Note that AP 3.1.7 is written in expectations, in a formulation that leadsto the variance of

√N · β, just as CT 4.17 does:

(notation swap) E [XiX′i ]−1E [XiX

′i e

2i ]E [XiX

′i ]−1 (AP 3.1.7)

UMD Economics 626: Applied Microeconomics Lecture 2: Regression Basics and Heteroskedasticity, Slide 24

Page 151: ECON 626: Applied Microeconomicseconomics.ozier.com/econ626/lec/econ626-L02-slides-2019.pdfECON 626: Applied Microeconomics Lecture 2: Regression Basics and Heteroskedasticity Professors:

Why heteroskedasticity?

For the variance, we write this quadratic form of the estimation error:((X ′X )−1X ′u

) ((X ′X )−1X ′u

)′(X ′X )−1X ′u u′X (X ′X )−1

(X ′X )−1X ′ΩX (X ′X )−1 (CT 4.21)

= (∑

xix′i )−1∑

ui2xix

′i (∑

xix′i )−1

(CT 4.21)

Note that AP 3.1.7 is written in expectations, in a formulation that leadsto the variance of

√N · β, just as CT 4.17 does:

(notation swap) E [XiX′i ]−1E [XiX

′i e

2i ]E [XiX

′i ]−1 (AP 3.1.7)

UMD Economics 626: Applied Microeconomics Lecture 2: Regression Basics and Heteroskedasticity, Slide 24

Page 152: ECON 626: Applied Microeconomicseconomics.ozier.com/econ626/lec/econ626-L02-slides-2019.pdfECON 626: Applied Microeconomics Lecture 2: Regression Basics and Heteroskedasticity Professors:

Why heteroskedasticity?

For the variance, we write this quadratic form of the estimation error:((X ′X )−1X ′u

) ((X ′X )−1X ′u

)′(X ′X )−1X ′u u′X (X ′X )−1

(X ′X )−1X ′ΩX (X ′X )−1 (CT 4.21)

= (∑

xix′i )−1∑

ui2xix

′i (∑

xix′i )−1

(CT 4.21)

Note that AP 3.1.7 is written in expectations, in a formulation that leadsto the variance of

√N · β, just as CT 4.17 does:

(notation swap) E [XiX′i ]−1E [XiX

′i e

2i ]E [XiX

′i ]−1 (AP 3.1.7)

UMD Economics 626: Applied Microeconomics Lecture 2: Regression Basics and Heteroskedasticity, Slide 24

Page 153: ECON 626: Applied Microeconomicseconomics.ozier.com/econ626/lec/econ626-L02-slides-2019.pdfECON 626: Applied Microeconomics Lecture 2: Regression Basics and Heteroskedasticity Professors:

Why heteroskedasticity?

For the variance, we write this quadratic form of the estimation error:((X ′X )−1X ′u

) ((X ′X )−1X ′u

)′(X ′X )−1X ′u u′X (X ′X )−1

(X ′X )−1X ′ΩX (X ′X )−1 (CT 4.21)

= (∑

xix′i )−1∑

ui2xix

′i (∑

xix′i )−1

(CT 4.21)

Note that AP 3.1.7 is written in expectations, in a formulation that leadsto the variance of

√N · β, just as CT 4.17 does:

(notation swap) E [XiX′i ]−1E [XiX

′i e

2i ]E [XiX

′i ]−1 (AP 3.1.7)

UMD Economics 626: Applied Microeconomics Lecture 2: Regression Basics and Heteroskedasticity, Slide 24

Page 154: ECON 626: Applied Microeconomicseconomics.ozier.com/econ626/lec/econ626-L02-slides-2019.pdfECON 626: Applied Microeconomics Lecture 2: Regression Basics and Heteroskedasticity Professors:

Why heteroskedasticity?

For the variance, we write this quadratic form of the estimation error:((X ′X )−1X ′u

) ((X ′X )−1X ′u

)′(X ′X )−1X ′u u′X (X ′X )−1

(X ′X )−1X ′ΩX (X ′X )−1 (CT 4.21)

= (∑

xix′i )−1∑

ui2xix

′i (∑

xix′i )−1

(CT 4.21)

Note that AP 3.1.7 is written in expectations, in a formulation that leadsto the variance of

√N · β, just as CT 4.17 does:

(notation swap) E [XiX′i ]−1E [XiX

′i e

2i ]E [XiX

′i ]−1 (AP 3.1.7)

UMD Economics 626: Applied Microeconomics Lecture 2: Regression Basics and Heteroskedasticity, Slide 24

Page 155: ECON 626: Applied Microeconomicseconomics.ozier.com/econ626/lec/econ626-L02-slides-2019.pdfECON 626: Applied Microeconomics Lecture 2: Regression Basics and Heteroskedasticity Professors:

Why heteroskedasticity?

For the variance, we write this quadratic form of the estimation error:((X ′X )−1X ′u

) ((X ′X )−1X ′u

)′(X ′X )−1X ′u u′X (X ′X )−1

(X ′X )−1X ′ΩX (X ′X )−1 (CT 4.21)

= (∑

xix′i )−1∑

ui2xix

′i (∑

xix′i )−1

(CT 4.21)

Note that AP 3.1.7 is written in expectations, in a formulation that leadsto the variance of

√N · β, just as CT 4.17 does:

(notation swap) E [XiX′i ]−1E [XiX

′i e

2i ]E [XiX

′i ]−1 (AP 3.1.7)

UMD Economics 626: Applied Microeconomics Lecture 2: Regression Basics and Heteroskedasticity, Slide 24

Page 156: ECON 626: Applied Microeconomicseconomics.ozier.com/econ626/lec/econ626-L02-slides-2019.pdfECON 626: Applied Microeconomics Lecture 2: Regression Basics and Heteroskedasticity Professors:

Why heteroskedasticity?

For the variance, we write this quadratic form of the estimation error:((X ′X )−1X ′u

) ((X ′X )−1X ′u

)′(X ′X )−1X ′u u′X (X ′X )−1

(X ′X )−1X ′ΩX (X ′X )−1 (CT 4.21)

= (∑

xix′i )−1∑

ui2xix

′i (∑

xix′i )−1

(CT 4.21)

Note that AP 3.1.7 is written in expectations, in a formulation that leadsto the variance of

√N · β, just as CT 4.17 does:

(notation swap) E [XiX′i ]−1E [XiX

′i e

2i ]E [XiX

′i ]−1 (AP 3.1.7)

UMD Economics 626: Applied Microeconomics Lecture 2: Regression Basics and Heteroskedasticity, Slide 24

Page 157: ECON 626: Applied Microeconomicseconomics.ozier.com/econ626/lec/econ626-L02-slides-2019.pdfECON 626: Applied Microeconomics Lecture 2: Regression Basics and Heteroskedasticity Professors:

Why heteroskedasticity?

X ′ΩX

=

[0 0 ... 0 1 1 ... 11 1 ... 1 1 1 ... 1

]Diag [u2i ]

0 10 1... ...0 11 11 1... ...1 1

UMD Economics 626: Applied Microeconomics Lecture 2: Regression Basics and Heteroskedasticity, Slide 25

Page 158: ECON 626: Applied Microeconomicseconomics.ozier.com/econ626/lec/econ626-L02-slides-2019.pdfECON 626: Applied Microeconomics Lecture 2: Regression Basics and Heteroskedasticity Professors:

Why heteroskedasticity?

X ′ΩX

=

[0 0 ... 0 1 1 ... 11 1 ... 1 1 1 ... 1

]

Diag [u2i ]

0 10 1... ...0 11 11 1... ...1 1

UMD Economics 626: Applied Microeconomics Lecture 2: Regression Basics and Heteroskedasticity, Slide 25

Page 159: ECON 626: Applied Microeconomicseconomics.ozier.com/econ626/lec/econ626-L02-slides-2019.pdfECON 626: Applied Microeconomics Lecture 2: Regression Basics and Heteroskedasticity Professors:

Why heteroskedasticity?

X ′ΩX

=

[0 0 ... 0 1 1 ... 11 1 ... 1 1 1 ... 1

]Diag [u2i ]

0 10 1... ...0 11 11 1... ...1 1

UMD Economics 626: Applied Microeconomics Lecture 2: Regression Basics and Heteroskedasticity, Slide 25

Page 160: ECON 626: Applied Microeconomicseconomics.ozier.com/econ626/lec/econ626-L02-slides-2019.pdfECON 626: Applied Microeconomics Lecture 2: Regression Basics and Heteroskedasticity Professors:

Why heteroskedasticity?

X ′ΩX

=

[0 0 ... 0 1 1 ... 11 1 ... 1 1 1 ... 1

]Diag [u2i ]

0 10 1... ...0 11 11 1... ...1 1

UMD Economics 626: Applied Microeconomics Lecture 2: Regression Basics and Heteroskedasticity, Slide 25

Page 161: ECON 626: Applied Microeconomicseconomics.ozier.com/econ626/lec/econ626-L02-slides-2019.pdfECON 626: Applied Microeconomics Lecture 2: Regression Basics and Heteroskedasticity Professors:

My big fat greek ... diagonal matrix

ΩX =

u21 0 ... 0 0 0 ... 00 u22 ... 0 0 0 ... 0... ... ... ... ... ... ... ...0 0 ... u2N

2

0 0 ... 0

0 0 ... 0 u2N2 +1

0 ... 0

0 0 ... 0 0 u2N2 +2

... 0

... ... ... ... ... ... ... ...0 0 ... 0 0 0 ... u2N

0 10 1... ...0 11 11 1... ...1 1

UMD Economics 626: Applied Microeconomics Lecture 2: Regression Basics and Heteroskedasticity, Slide 26

Page 162: ECON 626: Applied Microeconomicseconomics.ozier.com/econ626/lec/econ626-L02-slides-2019.pdfECON 626: Applied Microeconomics Lecture 2: Regression Basics and Heteroskedasticity Professors:

Why heteroskedasticity?

ΩX =

0 u210 u22... ...0 u2N

2

u2N2 +1

u2N2 +1

u2N2 +2

u2N2 +2

... ...u2N u2N

UMD Economics 626: Applied Microeconomics Lecture 2: Regression Basics and Heteroskedasticity, Slide 27

Page 163: ECON 626: Applied Microeconomicseconomics.ozier.com/econ626/lec/econ626-L02-slides-2019.pdfECON 626: Applied Microeconomics Lecture 2: Regression Basics and Heteroskedasticity Professors:

Why heteroskedasticity?

X ′ΩX =

[0 0 ... 0 1 1 ... 11 1 ... 1 1 1 ... 1

]

0 u210 u22... ...0 u2N

2

u2N2 +1

u2N2 +1

u2N2 +2

u2N2 +2

... ...u2N u2N

=

N∑i= N

2 +1

u2iN∑

i= N2 +1

u2i

N∑i= N

2 +1

u2iN∑

i=1

u2i

=

∑T

u2∑T

u2

∑T

u2∑T

u2 +∑C

u2

UMD Economics 626: Applied Microeconomics Lecture 2: Regression Basics and Heteroskedasticity, Slide 28

Page 164: ECON 626: Applied Microeconomicseconomics.ozier.com/econ626/lec/econ626-L02-slides-2019.pdfECON 626: Applied Microeconomics Lecture 2: Regression Basics and Heteroskedasticity Professors:

Why heteroskedasticity?

X ′ΩX =

[0 0 ... 0 1 1 ... 11 1 ... 1 1 1 ... 1

]

0 u210 u22... ...0 u2N

2

u2N2 +1

u2N2 +1

u2N2 +2

u2N2 +2

... ...u2N u2N

=

N∑i= N

2 +1

u2iN∑

i= N2 +1

u2i

N∑i= N

2 +1

u2iN∑

i=1

u2i

=

∑T

u2∑T

u2

∑T

u2∑T

u2 +∑C

u2

UMD Economics 626: Applied Microeconomics Lecture 2: Regression Basics and Heteroskedasticity, Slide 28

Page 165: ECON 626: Applied Microeconomicseconomics.ozier.com/econ626/lec/econ626-L02-slides-2019.pdfECON 626: Applied Microeconomics Lecture 2: Regression Basics and Heteroskedasticity Professors:

Why heteroskedasticity?

X ′ΩX =

[0 0 ... 0 1 1 ... 11 1 ... 1 1 1 ... 1

]

0 u210 u22... ...0 u2N

2

u2N2 +1

u2N2 +1

u2N2 +2

u2N2 +2

... ...u2N u2N

=

N∑i= N

2 +1

u2iN∑

i= N2 +1

u2i

N∑i= N

2 +1

u2iN∑

i=1

u2i

=

∑T

u2∑T

u2

∑T

u2∑T

u2 +∑C

u2

UMD Economics 626: Applied Microeconomics Lecture 2: Regression Basics and Heteroskedasticity, Slide 28

Page 166: ECON 626: Applied Microeconomicseconomics.ozier.com/econ626/lec/econ626-L02-slides-2019.pdfECON 626: Applied Microeconomics Lecture 2: Regression Basics and Heteroskedasticity Professors:

Why heteroskedasticity?

X ′ΩX =

[0 0 ... 0 1 1 ... 11 1 ... 1 1 1 ... 1

]

0 u210 u22... ...0 u2N

2

u2N2 +1

u2N2 +1

u2N2 +2

u2N2 +2

... ...u2N u2N

=

N∑

i= N2 +1

u2i

N∑i= N

2 +1

u2i

N∑i= N

2 +1

u2iN∑

i=1

u2i

=

∑T

u2∑T

u2

∑T

u2∑T

u2 +∑C

u2

UMD Economics 626: Applied Microeconomics Lecture 2: Regression Basics and Heteroskedasticity, Slide 28

Page 167: ECON 626: Applied Microeconomicseconomics.ozier.com/econ626/lec/econ626-L02-slides-2019.pdfECON 626: Applied Microeconomics Lecture 2: Regression Basics and Heteroskedasticity Professors:

Why heteroskedasticity?

X ′ΩX =

[0 0 ... 0 1 1 ... 11 1 ... 1 1 1 ... 1

]

0 u210 u22... ...0 u2N

2

u2N2 +1

u2N2 +1

u2N2 +2

u2N2 +2

... ...u2N u2N

=

N∑

i= N2 +1

u2iN∑

i= N2 +1

u2i

N∑i= N

2 +1

u2iN∑

i=1

u2i

=

∑T

u2∑T

u2

∑T

u2∑T

u2 +∑C

u2

UMD Economics 626: Applied Microeconomics Lecture 2: Regression Basics and Heteroskedasticity, Slide 28

Page 168: ECON 626: Applied Microeconomicseconomics.ozier.com/econ626/lec/econ626-L02-slides-2019.pdfECON 626: Applied Microeconomics Lecture 2: Regression Basics and Heteroskedasticity Professors:

Why heteroskedasticity?

X ′ΩX =

[0 0 ... 0 1 1 ... 11 1 ... 1 1 1 ... 1

]

0 u210 u22... ...0 u2N

2

u2N2 +1

u2N2 +1

u2N2 +2

u2N2 +2

... ...u2N u2N

=

N∑

i= N2 +1

u2iN∑

i= N2 +1

u2i

N∑i= N

2 +1

u2i

N∑i=1

u2i

=

∑T

u2∑T

u2

∑T

u2∑T

u2 +∑C

u2

UMD Economics 626: Applied Microeconomics Lecture 2: Regression Basics and Heteroskedasticity, Slide 28

Page 169: ECON 626: Applied Microeconomicseconomics.ozier.com/econ626/lec/econ626-L02-slides-2019.pdfECON 626: Applied Microeconomics Lecture 2: Regression Basics and Heteroskedasticity Professors:

Why heteroskedasticity?

X ′ΩX =

[0 0 ... 0 1 1 ... 11 1 ... 1 1 1 ... 1

]

0 u210 u22... ...0 u2N

2

u2N2 +1

u2N2 +1

u2N2 +2

u2N2 +2

... ...u2N u2N

=

N∑

i= N2 +1

u2iN∑

i= N2 +1

u2i

N∑i= N

2 +1

u2iN∑

i=1

u2i

=

∑T

u2∑T

u2

∑T

u2∑T

u2 +∑C

u2

UMD Economics 626: Applied Microeconomics Lecture 2: Regression Basics and Heteroskedasticity, Slide 28

Page 170: ECON 626: Applied Microeconomicseconomics.ozier.com/econ626/lec/econ626-L02-slides-2019.pdfECON 626: Applied Microeconomics Lecture 2: Regression Basics and Heteroskedasticity Professors:

Why heteroskedasticity?

X ′ΩX =

[0 0 ... 0 1 1 ... 11 1 ... 1 1 1 ... 1

]

0 u210 u22... ...0 u2N

2

u2N2 +1

u2N2 +1

u2N2 +2

u2N2 +2

... ...u2N u2N

=

N∑

i= N2 +1

u2iN∑

i= N2 +1

u2i

N∑i= N

2 +1

u2iN∑

i=1

u2i

=

∑T

u2∑T

u2

∑T

u2∑T

u2 +∑C

u2

UMD Economics 626: Applied Microeconomics Lecture 2: Regression Basics and Heteroskedasticity, Slide 28

Page 171: ECON 626: Applied Microeconomicseconomics.ozier.com/econ626/lec/econ626-L02-slides-2019.pdfECON 626: Applied Microeconomics Lecture 2: Regression Basics and Heteroskedasticity Professors:

Why heteroskedasticity?

X ′ΩX =

[0 0 ... 0 1 1 ... 11 1 ... 1 1 1 ... 1

]

0 u210 u22... ...0 u2N

2

u2N2 +1

u2N2 +1

u2N2 +2

u2N2 +2

... ...u2N u2N

=

N∑

i= N2 +1

u2iN∑

i= N2 +1

u2i

N∑i= N

2 +1

u2iN∑

i=1

u2i

=

∑T

u2∑T

u2

∑T

u2∑T

u2 +∑C

u2

UMD Economics 626: Applied Microeconomics Lecture 2: Regression Basics and Heteroskedasticity, Slide 28

Page 172: ECON 626: Applied Microeconomicseconomics.ozier.com/econ626/lec/econ626-L02-slides-2019.pdfECON 626: Applied Microeconomics Lecture 2: Regression Basics and Heteroskedasticity Professors:

Why heteroskedasticity?

X ′ΩX =

[0 0 ... 0 1 1 ... 11 1 ... 1 1 1 ... 1

]

0 u210 u22... ...0 u2N

2

u2N2 +1

u2N2 +1

u2N2 +2

u2N2 +2

... ...u2N u2N

=

N∑

i= N2 +1

u2iN∑

i= N2 +1

u2i

N∑i= N

2 +1

u2iN∑

i=1

u2i

=

∑T

u2∑T

u2

∑T

u2

∑T

u2 +∑C

u2

UMD Economics 626: Applied Microeconomics Lecture 2: Regression Basics and Heteroskedasticity, Slide 28

Page 173: ECON 626: Applied Microeconomicseconomics.ozier.com/econ626/lec/econ626-L02-slides-2019.pdfECON 626: Applied Microeconomics Lecture 2: Regression Basics and Heteroskedasticity Professors:

Why heteroskedasticity?

X ′ΩX =

[0 0 ... 0 1 1 ... 11 1 ... 1 1 1 ... 1

]

0 u210 u22... ...0 u2N

2

u2N2 +1

u2N2 +1

u2N2 +2

u2N2 +2

... ...u2N u2N

=

N∑

i= N2 +1

u2iN∑

i= N2 +1

u2i

N∑i= N

2 +1

u2iN∑

i=1

u2i

=

∑T

u2∑T

u2

∑T

u2∑T

u2 +∑C

u2

UMD Economics 626: Applied Microeconomics Lecture 2: Regression Basics and Heteroskedasticity, Slide 28

Page 174: ECON 626: Applied Microeconomicseconomics.ozier.com/econ626/lec/econ626-L02-slides-2019.pdfECON 626: Applied Microeconomics Lecture 2: Regression Basics and Heteroskedasticity Professors:

Why heteroskedasticity?

(X ′X )−1X ′ΩX (X ′X )−1 (CT 4.21)

(2

N

)[2 −1−1 1

]∑T

u2∑T

u2

∑T

u2∑T

u2 +∑C

u2

( 2

N

)[2 −1−1 1

]

=

(4

N2

)

∑T

u2∑T

u2 −∑C

u2

0∑C

u2

[ 2 −1−1 1

]

=

(4

N2

)

∑T

u2 +∑C

u2 −∑C

u2

−∑C

u2∑C

u2

CT p.75: DOF correction w/ empirical (not theoretical) basis, N/(N-K)

UMD Economics 626: Applied Microeconomics Lecture 2: Regression Basics and Heteroskedasticity, Slide 29

Page 175: ECON 626: Applied Microeconomicseconomics.ozier.com/econ626/lec/econ626-L02-slides-2019.pdfECON 626: Applied Microeconomics Lecture 2: Regression Basics and Heteroskedasticity Professors:

Why heteroskedasticity?

(X ′X )−1X ′ΩX (X ′X )−1 (CT 4.21)

(2

N

)[2 −1−1 1

]∑T

u2∑T

u2

∑T

u2∑T

u2 +∑C

u2

( 2

N

)[2 −1−1 1

]

=

(4

N2

)

∑T

u2∑T

u2 −∑C

u2

0∑C

u2

[ 2 −1−1 1

]

=

(4

N2

)

∑T

u2 +∑C

u2 −∑C

u2

−∑C

u2∑C

u2

CT p.75: DOF correction w/ empirical (not theoretical) basis, N/(N-K)

UMD Economics 626: Applied Microeconomics Lecture 2: Regression Basics and Heteroskedasticity, Slide 29

Page 176: ECON 626: Applied Microeconomicseconomics.ozier.com/econ626/lec/econ626-L02-slides-2019.pdfECON 626: Applied Microeconomics Lecture 2: Regression Basics and Heteroskedasticity Professors:

Why heteroskedasticity?

(X ′X )−1X ′ΩX (X ′X )−1 (CT 4.21)

(2

N

)[2 −1−1 1

]∑T

u2∑T

u2

∑T

u2∑T

u2 +∑C

u2

( 2

N

)[2 −1−1 1

]

=

(4

N2

)

∑T

u2∑T

u2 −∑C

u2

0∑C

u2

[ 2 −1−1 1

]

=

(4

N2

)

∑T

u2 +∑C

u2 −∑C

u2

−∑C

u2∑C

u2

CT p.75: DOF correction w/ empirical (not theoretical) basis, N/(N-K)

UMD Economics 626: Applied Microeconomics Lecture 2: Regression Basics and Heteroskedasticity, Slide 29

Page 177: ECON 626: Applied Microeconomicseconomics.ozier.com/econ626/lec/econ626-L02-slides-2019.pdfECON 626: Applied Microeconomics Lecture 2: Regression Basics and Heteroskedasticity Professors:

Why heteroskedasticity?

(X ′X )−1X ′ΩX (X ′X )−1 (CT 4.21)

(2

N

)[2 −1−1 1

]∑T

u2∑T

u2

∑T

u2∑T

u2 +∑C

u2

( 2

N

)[2 −1−1 1

]

=

(4

N2

) ∑T

u2

∑T

u2 −∑C

u2

0∑C

u2

[ 2 −1−1 1

]

=

(4

N2

)

∑T

u2 +∑C

u2 −∑C

u2

−∑C

u2∑C

u2

CT p.75: DOF correction w/ empirical (not theoretical) basis, N/(N-K)

UMD Economics 626: Applied Microeconomics Lecture 2: Regression Basics and Heteroskedasticity, Slide 29

Page 178: ECON 626: Applied Microeconomicseconomics.ozier.com/econ626/lec/econ626-L02-slides-2019.pdfECON 626: Applied Microeconomics Lecture 2: Regression Basics and Heteroskedasticity Professors:

Why heteroskedasticity?

(X ′X )−1X ′ΩX (X ′X )−1 (CT 4.21)

(2

N

)[2 −1−1 1

]∑T

u2∑T

u2

∑T

u2∑T

u2 +∑C

u2

( 2

N

)[2 −1−1 1

]

=

(4

N2

) ∑T

u2∑T

u2 −∑C

u2

0∑C

u2

[ 2 −1−1 1

]

=

(4

N2

)

∑T

u2 +∑C

u2 −∑C

u2

−∑C

u2∑C

u2

CT p.75: DOF correction w/ empirical (not theoretical) basis, N/(N-K)

UMD Economics 626: Applied Microeconomics Lecture 2: Regression Basics and Heteroskedasticity, Slide 29

Page 179: ECON 626: Applied Microeconomicseconomics.ozier.com/econ626/lec/econ626-L02-slides-2019.pdfECON 626: Applied Microeconomics Lecture 2: Regression Basics and Heteroskedasticity Professors:

Why heteroskedasticity?

(X ′X )−1X ′ΩX (X ′X )−1 (CT 4.21)

(2

N

)[2 −1−1 1

]∑T

u2∑T

u2

∑T

u2∑T

u2 +∑C

u2

( 2

N

)[2 −1−1 1

]

=

(4

N2

) ∑T

u2∑T

u2 −∑C

u2

0

∑C

u2

[ 2 −1−1 1

]

=

(4

N2

)

∑T

u2 +∑C

u2 −∑C

u2

−∑C

u2∑C

u2

CT p.75: DOF correction w/ empirical (not theoretical) basis, N/(N-K)

UMD Economics 626: Applied Microeconomics Lecture 2: Regression Basics and Heteroskedasticity, Slide 29

Page 180: ECON 626: Applied Microeconomicseconomics.ozier.com/econ626/lec/econ626-L02-slides-2019.pdfECON 626: Applied Microeconomics Lecture 2: Regression Basics and Heteroskedasticity Professors:

Why heteroskedasticity?

(X ′X )−1X ′ΩX (X ′X )−1 (CT 4.21)

(2

N

)[2 −1−1 1

]∑T

u2∑T

u2

∑T

u2∑T

u2 +∑C

u2

( 2

N

)[2 −1−1 1

]

=

(4

N2

) ∑T

u2∑T

u2 −∑C

u2

0∑C

u2

[ 2 −1−1 1

]

=

(4

N2

)

∑T

u2 +∑C

u2 −∑C

u2

−∑C

u2∑C

u2

CT p.75: DOF correction w/ empirical (not theoretical) basis, N/(N-K)

UMD Economics 626: Applied Microeconomics Lecture 2: Regression Basics and Heteroskedasticity, Slide 29

Page 181: ECON 626: Applied Microeconomicseconomics.ozier.com/econ626/lec/econ626-L02-slides-2019.pdfECON 626: Applied Microeconomics Lecture 2: Regression Basics and Heteroskedasticity Professors:

Why heteroskedasticity?

(X ′X )−1X ′ΩX (X ′X )−1 (CT 4.21)

(2

N

)[2 −1−1 1

]∑T

u2∑T

u2

∑T

u2∑T

u2 +∑C

u2

( 2

N

)[2 −1−1 1

]

=

(4

N2

) ∑T

u2∑T

u2 −∑C

u2

0∑C

u2

[ 2 −1−1 1

]

=

(4

N2

)

∑T

u2 +∑C

u2 −∑C

u2

−∑C

u2∑C

u2

CT p.75: DOF correction w/ empirical (not theoretical) basis, N/(N-K)

UMD Economics 626: Applied Microeconomics Lecture 2: Regression Basics and Heteroskedasticity, Slide 29

Page 182: ECON 626: Applied Microeconomicseconomics.ozier.com/econ626/lec/econ626-L02-slides-2019.pdfECON 626: Applied Microeconomics Lecture 2: Regression Basics and Heteroskedasticity Professors:

Why heteroskedasticity?

(X ′X )−1X ′ΩX (X ′X )−1 (CT 4.21)

(2

N

)[2 −1−1 1

]∑T

u2∑T

u2

∑T

u2∑T

u2 +∑C

u2

( 2

N

)[2 −1−1 1

]

=

(4

N2

) ∑T

u2∑T

u2 −∑C

u2

0∑C

u2

[ 2 −1−1 1

]

=

(4

N2

) ∑T

u2 +∑C

u2

−∑C

u2

−∑C

u2∑C

u2

CT p.75: DOF correction w/ empirical (not theoretical) basis, N/(N-K)

UMD Economics 626: Applied Microeconomics Lecture 2: Regression Basics and Heteroskedasticity, Slide 29

Page 183: ECON 626: Applied Microeconomicseconomics.ozier.com/econ626/lec/econ626-L02-slides-2019.pdfECON 626: Applied Microeconomics Lecture 2: Regression Basics and Heteroskedasticity Professors:

Why heteroskedasticity?

(X ′X )−1X ′ΩX (X ′X )−1 (CT 4.21)

(2

N

)[2 −1−1 1

]∑T

u2∑T

u2

∑T

u2∑T

u2 +∑C

u2

( 2

N

)[2 −1−1 1

]

=

(4

N2

) ∑T

u2∑T

u2 −∑C

u2

0∑C

u2

[ 2 −1−1 1

]

=

(4

N2

) ∑T

u2 +∑C

u2 −∑C

u2

−∑C

u2∑C

u2

CT p.75: DOF correction w/ empirical (not theoretical) basis, N/(N-K)

UMD Economics 626: Applied Microeconomics Lecture 2: Regression Basics and Heteroskedasticity, Slide 29

Page 184: ECON 626: Applied Microeconomicseconomics.ozier.com/econ626/lec/econ626-L02-slides-2019.pdfECON 626: Applied Microeconomics Lecture 2: Regression Basics and Heteroskedasticity Professors:

Why heteroskedasticity?

(X ′X )−1X ′ΩX (X ′X )−1 (CT 4.21)

(2

N

)[2 −1−1 1

]∑T

u2∑T

u2

∑T

u2∑T

u2 +∑C

u2

( 2

N

)[2 −1−1 1

]

=

(4

N2

) ∑T

u2∑T

u2 −∑C

u2

0∑C

u2

[ 2 −1−1 1

]

=

(4

N2

) ∑T

u2 +∑C

u2 −∑C

u2

−∑C

u2

∑C

u2

CT p.75: DOF correction w/ empirical (not theoretical) basis, N/(N-K)

UMD Economics 626: Applied Microeconomics Lecture 2: Regression Basics and Heteroskedasticity, Slide 29

Page 185: ECON 626: Applied Microeconomicseconomics.ozier.com/econ626/lec/econ626-L02-slides-2019.pdfECON 626: Applied Microeconomics Lecture 2: Regression Basics and Heteroskedasticity Professors:

Why heteroskedasticity?

(X ′X )−1X ′ΩX (X ′X )−1 (CT 4.21)

(2

N

)[2 −1−1 1

]∑T

u2∑T

u2

∑T

u2∑T

u2 +∑C

u2

( 2

N

)[2 −1−1 1

]

=

(4

N2

) ∑T

u2∑T

u2 −∑C

u2

0∑C

u2

[ 2 −1−1 1

]

=

(4

N2

) ∑T

u2 +∑C

u2 −∑C

u2

−∑C

u2∑C

u2

CT p.75: DOF correction w/ empirical (not theoretical) basis, N/(N-K)

UMD Economics 626: Applied Microeconomics Lecture 2: Regression Basics and Heteroskedasticity, Slide 29

Page 186: ECON 626: Applied Microeconomicseconomics.ozier.com/econ626/lec/econ626-L02-slides-2019.pdfECON 626: Applied Microeconomics Lecture 2: Regression Basics and Heteroskedasticity Professors:

Why heteroskedasticity?

(X ′X )−1X ′ΩX (X ′X )−1 (CT 4.21)

(2

N

)[2 −1−1 1

]∑T

u2∑T

u2

∑T

u2∑T

u2 +∑C

u2

( 2

N

)[2 −1−1 1

]

=

(4

N2

) ∑T

u2∑T

u2 −∑C

u2

0∑C

u2

[ 2 −1−1 1

]

=

(4

N2

) ∑T

u2 +∑C

u2 −∑C

u2

−∑C

u2∑C

u2

CT p.75: DOF correction w/ empirical (not theoretical) basis, N/(N-K)

UMD Economics 626: Applied Microeconomics Lecture 2: Regression Basics and Heteroskedasticity, Slide 29

Page 187: ECON 626: Applied Microeconomicseconomics.ozier.com/econ626/lec/econ626-L02-slides-2019.pdfECON 626: Applied Microeconomics Lecture 2: Regression Basics and Heteroskedasticity Professors:

All formulas together, before plugging in K.

Estimated coefficients:

β =

YT − YC

YC

Estimated VCV matrix under homoskedasticity:(

2

N(N − K )

)[2 −1−1 1

](∑T

u2 +∑

C

u2

)

Estimated VCV matrix under heteroskedasticity:

(4

N(N − K )

)∑T

u2 +∑C

u2 −∑C

u2

−∑C

u2∑C

u2

UMD Economics 626: Applied Microeconomics Lecture 2: Regression Basics and Heteroskedasticity, Slide 30

Page 188: ECON 626: Applied Microeconomicseconomics.ozier.com/econ626/lec/econ626-L02-slides-2019.pdfECON 626: Applied Microeconomics Lecture 2: Regression Basics and Heteroskedasticity Professors:

All formulas together, before plugging in K.

Estimated coefficients:

β =

YT − YC

YC

Estimated VCV matrix under homoskedasticity:(2

N(N − K )

)[2 −1−1 1

](∑T

u2 +∑

C

u2

)

Estimated VCV matrix under heteroskedasticity:

(4

N(N − K )

)∑T

u2 +∑C

u2 −∑C

u2

−∑C

u2∑C

u2

UMD Economics 626: Applied Microeconomics Lecture 2: Regression Basics and Heteroskedasticity, Slide 30

Page 189: ECON 626: Applied Microeconomicseconomics.ozier.com/econ626/lec/econ626-L02-slides-2019.pdfECON 626: Applied Microeconomics Lecture 2: Regression Basics and Heteroskedasticity Professors:

All formulas together, before plugging in K.

Estimated coefficients:

β =

YT − YC

YC

Estimated VCV matrix under homoskedasticity:(

2

N(N − K )

)[2 −1−1 1

](∑T

u2 +∑

C

u2

)

Estimated VCV matrix under heteroskedasticity:

(4

N(N − K )

)∑T

u2 +∑C

u2 −∑C

u2

−∑C

u2∑C

u2

UMD Economics 626: Applied Microeconomics Lecture 2: Regression Basics and Heteroskedasticity, Slide 30

Page 190: ECON 626: Applied Microeconomicseconomics.ozier.com/econ626/lec/econ626-L02-slides-2019.pdfECON 626: Applied Microeconomics Lecture 2: Regression Basics and Heteroskedasticity Professors:

All formulas together, before plugging in K.

Estimated coefficients:

β =

YT − YC

YC

Estimated VCV matrix under homoskedasticity:(

2

N(N − K )

)[2 −1−1 1

](∑T

u2 +∑

C

u2

)

Estimated VCV matrix under heteroskedasticity:

(4

N(N − K )

)∑T

u2 +∑C

u2 −∑C

u2

−∑C

u2∑C

u2

UMD Economics 626: Applied Microeconomics Lecture 2: Regression Basics and Heteroskedasticity, Slide 30

Page 191: ECON 626: Applied Microeconomicseconomics.ozier.com/econ626/lec/econ626-L02-slides-2019.pdfECON 626: Applied Microeconomics Lecture 2: Regression Basics and Heteroskedasticity Professors:

All formulas together.

Estimated coefficients:

β =

YT − YC

YC

Estimated VCV matrix under homoskedasticity:(

2

N(N − 2)

)[2 −1−1 1

](∑T

u2 +∑

C

u2

)

Estimated VCV matrix under heteroskedasticity:

(4

N(N − 2)

)∑T

u2 +∑C

u2 −∑C

u2

−∑C

u2∑C

u2

UMD Economics 626: Applied Microeconomics Lecture 2: Regression Basics and Heteroskedasticity, Slide 31

Page 192: ECON 626: Applied Microeconomicseconomics.ozier.com/econ626/lec/econ626-L02-slides-2019.pdfECON 626: Applied Microeconomics Lecture 2: Regression Basics and Heteroskedasticity Professors:

General case, treating fraction p.

(X ′X ) = N

[p pp 1

](X ′X )−1 =

1

p(1− p)N

[1 −p−p p

]

UMD Economics 626: Applied Microeconomics Lecture 2: Regression Basics and Heteroskedasticity, Slide 32

Page 193: ECON 626: Applied Microeconomicseconomics.ozier.com/econ626/lec/econ626-L02-slides-2019.pdfECON 626: Applied Microeconomics Lecture 2: Regression Basics and Heteroskedasticity Professors:

All formulas together, general case.

Estimated coefficients:

β =

YT − YC

YC

Estimated VCV matrix under homoskedasticity:(

1

p(1− p)N(N − 2)

)[1 −p−p p

](∑T

u2 +∑

C

u2

)

Estimated VCV matrix under heteroskedasticity:

(1

p2(1− p)2N(N − 2)

)(1− p)2

∑T

u2 + p2∑C

u2 −p2∑C

u2

−p2∑C

u2 p2∑C

u2

UMD Economics 626: Applied Microeconomics Lecture 2: Regression Basics and Heteroskedasticity, Slide 33

Page 194: ECON 626: Applied Microeconomicseconomics.ozier.com/econ626/lec/econ626-L02-slides-2019.pdfECON 626: Applied Microeconomics Lecture 2: Regression Basics and Heteroskedasticity Professors:

Focus on the coefficient on treatment.

Estimated coefficient: β1 = YT − YC

Estimated variance of β1 under homoskedasticity:∑T

u2 +∑C

u2

p(1− p)N(N − 2)

=

∑T

u2 +∑C

u2

(N − 2)︸ ︷︷ ︸variance

Estimated variance of β1 under heteroskedasticity:

(1− p)2∑T

u2 + p2∑C

u2

p2(1− p)2N(N − 2)

=

UMD Economics 626: Applied Microeconomics Lecture 2: Regression Basics and Heteroskedasticity, Slide 34

Page 195: ECON 626: Applied Microeconomicseconomics.ozier.com/econ626/lec/econ626-L02-slides-2019.pdfECON 626: Applied Microeconomics Lecture 2: Regression Basics and Heteroskedasticity Professors:

Focus on the coefficient on treatment.

Estimated coefficient: β1 = YT − YC

Estimated variance of β1 under homoskedasticity:∑T

u2 +∑C

u2

p(1− p)N(N − 2)=

∑T

u2 +∑C

u2

(N − 2)︸ ︷︷ ︸variance

(1

p(1− p)N

)

Estimated variance of β1 under heteroskedasticity:

(1− p)2∑T

u2 + p2∑C

u2

p2(1− p)2N(N − 2)

=

UMD Economics 626: Applied Microeconomics Lecture 2: Regression Basics and Heteroskedasticity, Slide 34

Page 196: ECON 626: Applied Microeconomicseconomics.ozier.com/econ626/lec/econ626-L02-slides-2019.pdfECON 626: Applied Microeconomics Lecture 2: Regression Basics and Heteroskedasticity Professors:

Focus on the coefficient on treatment.

Estimated coefficient: β1 = YT − YC

Estimated variance of β1 under homoskedasticity:

∑T

u2 +∑C

u2

p(1− p)N(N − 2)=

∑T

u2 +∑C

u2

(N − 2)︸ ︷︷ ︸variance

1

pN︸︷︷︸averages

+︸︷︷︸difference of

1

(1− p)N︸ ︷︷ ︸averages

Estimated variance of β1 under heteroskedasticity:

(1− p)2∑T

u2 + p2∑C

u2

p2(1− p)2N(N − 2)

=

UMD Economics 626: Applied Microeconomics Lecture 2: Regression Basics and Heteroskedasticity, Slide 34

Page 197: ECON 626: Applied Microeconomicseconomics.ozier.com/econ626/lec/econ626-L02-slides-2019.pdfECON 626: Applied Microeconomics Lecture 2: Regression Basics and Heteroskedasticity Professors:

Focus on the coefficient on treatment.

Estimated coefficient: β1 = YT − YC

Estimated variance of β1 under homoskedasticity:

∑T

u2 +∑C

u2

p(1− p)N(N − 2)=

∑T

u2 +∑C

u2

(N − 2)︸ ︷︷ ︸variance

1

pN︸︷︷︸averages

+︸︷︷︸difference of

1

(1− p)N︸ ︷︷ ︸averages

Estimated variance of β1 under heteroskedasticity:

(1− p)2∑T

u2 + p2∑C

u2

p2(1− p)2N(N − 2)=

∑T

u2

p2N(N − 2)+

∑C

u2

(1− p)2N(N − 2)

UMD Economics 626: Applied Microeconomics Lecture 2: Regression Basics and Heteroskedasticity, Slide 34

Page 198: ECON 626: Applied Microeconomicseconomics.ozier.com/econ626/lec/econ626-L02-slides-2019.pdfECON 626: Applied Microeconomics Lecture 2: Regression Basics and Heteroskedasticity Professors:

Focus on the coefficient on treatment.

Estimated coefficient: β1 = YT − YC

Estimated variance of β1 under homoskedasticity:

∑T

u2 +∑C

u2

p(1− p)N(N − 2)=

∑T

u2 +∑C

u2

(N − 2)︸ ︷︷ ︸variance

1

pN︸︷︷︸averages

+︸︷︷︸difference of

1

(1− p)N︸ ︷︷ ︸averages

Estimated variance of β1 under heteroskedasticity:

(1− p)2∑T

u2 + p2∑C

u2

p2(1− p)2N(N − 2)=

∑T

u2

p(N − 2)︸ ︷︷ ︸variance

(1

pN

)︸ ︷︷ ︸averages

+︸︷︷︸difference of

∑C

u2

(1− p)(N − 2)︸ ︷︷ ︸variance

(1

(1− p)N

)︸ ︷︷ ︸

averages

UMD Economics 626: Applied Microeconomics Lecture 2: Regression Basics and Heteroskedasticity, Slide 34

Page 199: ECON 626: Applied Microeconomicseconomics.ozier.com/econ626/lec/econ626-L02-slides-2019.pdfECON 626: Applied Microeconomics Lecture 2: Regression Basics and Heteroskedasticity Professors:

Focus on the coefficient on treatment.

Estimated coefficient: β1 = YT − YC

Estimated variance of β1 under homoskedasticity:

∑T

u2 +∑C

u2

p(1− p)N(N − 2)=

∑T

u2 +∑C

u2

(N − 2)︸ ︷︷ ︸variance

1

pN︸︷︷︸averages

+︸︷︷︸difference of

1

(1− p)N︸ ︷︷ ︸averages

Estimated variance of β1 under heteroskedasticity:

(1− p)2∑T

u2 + p2∑C

u2

p2(1− p)2N(N − 2)=

∑T

u2

p(N − 2)︸ ︷︷ ︸variance

(1

pN

)︸ ︷︷ ︸averages

+︸︷︷︸difference of

∑C

u2

(1− p)(N − 2)︸ ︷︷ ︸variance

(1

(1− p)N

)︸ ︷︷ ︸

averages

UMD Economics 626: Applied Microeconomics Lecture 2: Regression Basics and Heteroskedasticity, Slide 34

Page 200: ECON 626: Applied Microeconomicseconomics.ozier.com/econ626/lec/econ626-L02-slides-2019.pdfECON 626: Applied Microeconomics Lecture 2: Regression Basics and Heteroskedasticity Professors:

Focus on the coefficient on treatment.

Estimated coefficient: β1 = YT − YC

Estimated variance of β1 under homoskedasticity:

∑T

u2 +∑C

u2

p(1− p)N(N − 2)=

∑T

u2 +∑C

u2

(N − 2)︸ ︷︷ ︸variance

1

pN︸︷︷︸averages

+︸︷︷︸difference of

1

(1− p)N︸ ︷︷ ︸averages

Estimated variance of β1 under heteroskedasticity:

(1− p)2∑T

u2 + p2∑C

u2

p2(1− p)2N(N − 2)=

∑T

u2

p(N − 2)︸ ︷︷ ︸variance

(1

pN

)︸ ︷︷ ︸averages

+︸︷︷︸difference of

∑C

u2

(1− p)(N − 2)︸ ︷︷ ︸variance

(1

(1− p)N

)︸ ︷︷ ︸

averages

UMD Economics 626: Applied Microeconomics Lecture 2: Regression Basics and Heteroskedasticity, Slide 34

Page 201: ECON 626: Applied Microeconomicseconomics.ozier.com/econ626/lec/econ626-L02-slides-2019.pdfECON 626: Applied Microeconomics Lecture 2: Regression Basics and Heteroskedasticity Professors:

Focus on the coefficient on treatment.

Estimated coefficient: β1 = YT − YC

Estimated variance of β1 under homoskedasticity:

∑T

u2 +∑C

u2

p(1− p)N(N − 2)=

∑T

u2 +∑C

u2

(N − 2)︸ ︷︷ ︸variance

1

pN︸︷︷︸averages

+︸︷︷︸difference of

1

(1− p)N︸ ︷︷ ︸averages

Estimated variance of β1 under heteroskedasticity:

(1− p)2∑T

u2 + p2∑C

u2

p2(1− p)2N(N − 2)=

∑T

u2

p(N − 2)︸ ︷︷ ︸variance

(1

pN

)︸ ︷︷ ︸averages

+︸︷︷︸difference of

∑C

u2

(1− p)(N − 2)︸ ︷︷ ︸variance

(1

(1− p)N

)︸ ︷︷ ︸

averages

UMD Economics 626: Applied Microeconomics Lecture 2: Regression Basics and Heteroskedasticity, Slide 34