Econ 251 PS1 Solutions

Download as pdf or txt
Download as pdf or txt
You are on page 1of 5

Econ 251

Problem Set #1

SOLUTIONS

Part I: Expected value, variance and covariance (8 points in total)


This exercise illustrates the properties of expected value, variance and covariance that we are
going to use further in this course.

Note: We solved a very similar example in class; you may find it helpful to consult your notes
when solving this problem.

Suppose that for variables X and Y the following holds:

𝔼(𝑋) = 1
𝔼(𝑌) = −1
𝑣𝑎𝑟(𝑋) = 4
𝑣𝑎𝑟(𝑌) = 1
𝑐𝑜𝑣(𝑋, 𝑌) = −2.

Now suppose you generate two new variables equal to (2X+Y) and (X+4Y).

(i) Show that 𝔼(2𝑋 + 𝑌) = 1 and 𝔼(𝑋 + 4𝑌) = −3.


(ii) Show that 𝑣𝑎𝑟(2𝑋 + 𝑌) =9.
(iii) Show that 𝑐𝑜𝑣(2𝑋 + 𝑌, 𝑋 + 4𝑌) = −6.
(iv) In part (iii) you showed that 𝑐𝑜𝑣(2𝑋 + 𝑌, 𝑋 + 4𝑌) < 0.
Intuitively, what does this imply for the relationship between the two variables (2X+Y) and
(X+4Y)?
(2 points each, 8 points in total)

Solution:
(i)
This illustrates an important property of expected value that we are going to use in this
course – the expected value passes through a linear function, i.e. for variables X and Y, and
constants (parameters) A and B:
𝔼(𝐴𝑋 + 𝐵𝑌) = 𝐴𝔼(𝑋) + 𝐵𝔼(𝑌).
In our case A=2, B=1. So:
𝔼(2𝑋 + 𝑌)= 2𝔼(𝑋) + 𝔼(𝑌) = 2 · 1 + (−1) = 1
By analogy
𝔼(𝑋 + 4𝑌)=𝔼(𝑋) + 4𝔼(𝑌) = 1 + 4 · (−1) = −3

(ii) This is just an application of the property of the variance discussed in class:
𝑣𝑎𝑟(𝐴𝑋 + 𝐵𝑌) = 𝐴2 𝑣𝑎𝑟(𝑋) + 𝐵 2 𝑣𝑎𝑟(𝑌) + 2𝐴𝐵𝑐𝑜𝑣(𝑋, 𝑌).
𝑣𝑎𝑟(2𝑋 + 𝑌) = 22 𝑣𝑎𝑟(𝑋) + 12 𝑣𝑎𝑟(𝑌) + 2 · 2 · 1 𝑐𝑜𝑣(𝑋, 𝑌) = 4 · 4 + 1 · 1 + 2 · 2 · (−2) = 9

1
(iii)
Again this is meant to illustrate the application of the property of the covariance discussed
in class:
𝑐𝑜𝑣(𝑋, 𝑋) = 𝑣𝑎𝑟(𝑋)
𝑐𝑜𝑣(𝐴𝑋, 𝐷𝑌) = 𝐴𝐷. 𝑐𝑜𝑣(𝑋, 𝑌)
𝑐𝑜𝑣(𝐴𝑋 + 𝐵𝑌, 𝐶𝑋 + 𝐷𝑌) = 𝐴𝐶𝑣𝑎𝑟(𝑋) + 𝐵𝐷𝑣𝑎𝑟(𝑌) + (𝐴𝐷 + 𝐵𝐶)𝑐𝑜𝑣 (𝑋, 𝑌).

𝑐𝑜𝑣(2𝑋 + 𝑌, 𝑋 + 4𝑌) = 𝑐𝑜𝑣(2𝑋, 𝑋) + 𝑐𝑜𝑣(2𝑋, 4𝑌) + 𝑐𝑜𝑣(𝑌, 𝑋) + 𝑐𝑜𝑣(𝑌, 4𝑌) =


2 𝑐𝑜𝑣(𝑋, 𝑋) + 2 · 4 𝑐𝑜𝑣(𝑋, 𝑌) + 𝑐𝑜𝑣(𝑌, 𝑋) + 4 𝑐𝑜𝑣(𝑌, 𝑌) =
2 𝑣𝑎𝑟(𝑋) + 9 𝑐𝑜𝑣(𝑋, 𝑌) + 4 𝑣𝑎𝑟(𝑌) = 2·4 + 9·(-2) + 4·1 = -6

(iv)
𝒄𝒐𝒗(𝟐𝑿 + 𝒀, 𝑿 + 𝟒𝒀) = −𝟔 < 0
(And, of course, 𝒄𝒐𝒓𝒓(𝟐𝑿 + 𝒀, 𝑿 + 𝟒𝒀) < 0 as well, since the correlation is just the rescaled
covariance).
Intuitively this means that the two variables move in the opposite direction: when one of
them increases, the other one decreases. The concept of covariance is going to be key in this
course.

Part II: The summation operator (10 points in total)


This exercise illustrates the properties of the summation operator that we are going to use further
in this course.
∑𝑁 𝑋
(i) Prove that given data on a variable X, and its sample mean 𝑋̅ (defined as 𝑋̅ = 𝑖=1 𝑖 ) the
𝑁
following holds: the sum of the deviations from the sample mean is always zero, i.e.
𝑁

∑(𝑋𝑖 − 𝑋̅) = 0
𝑖=1

Hint: We demonstrated this in class.

Solution:
𝑁

∑(𝑋𝑖 − 𝑋̅) =
𝑖=1

𝑁 𝑁

∑ 𝑋𝑖 – ∑ 𝑋̅ = (𝑟𝑒𝑔𝑟𝑜𝑢𝑝𝑖𝑛𝑔 𝑡ℎ𝑒 𝑠𝑢𝑚𝑚𝑎𝑡𝑖𝑜𝑛 𝑡𝑒𝑟𝑚𝑠)


𝑖=1 𝑖=1
𝑁

∑ 𝑋𝑖 – 𝑁𝑋̅ = (𝑢𝑠𝑖𝑛𝑔 𝑡ℎ𝑒 𝑓𝑎𝑐𝑡 𝑋̅ 𝑖𝑠 𝑎 𝑐𝑜𝑛𝑠𝑡𝑎𝑛𝑡)


𝑖=1

𝑁
∑𝑁
𝑖=1 𝑋𝑖
∑ 𝑋𝑖 – 𝑁 = (𝑢𝑠𝑖𝑛𝑔 𝑡ℎ𝑒 𝑑𝑒𝑓𝑖𝑛𝑖𝑡𝑖𝑜𝑛 𝑜𝑓 𝑋̅)
𝑁
𝑖=1

2
𝑁 𝑁
1
∑ 𝑋𝑖 – ∑ 𝑋𝑖 = (𝑐𝑎𝑛𝑐𝑒𝑙𝑙𝑖𝑛𝑔 𝑜𝑢𝑡 𝑁 𝑤𝑖𝑡ℎ )
𝑁
𝑖=1 𝑖=1

= 0.

(ii) Prove that


𝑁 𝑁 𝑁

∑ 𝑋𝑖 𝑌𝑖 ≠ ∑ 𝑋𝑖 ∑ 𝑌𝑖
𝑖=1 𝑖=1 𝑖=1

Hint: Provide a counterexample (easiest for N=2). You solved a similar example during your
Section #1.

Solution:
Let N=2.
X1 = 1, X2 = 2
Y1 = 3, and Y2 = 4.
Then
𝑁

∑ 𝑋𝑖 𝑌𝑖 = 𝑋1 𝑌1 + 𝑋2 𝑌2 = 1 · 3 + 2 · 4 = 11
𝑖=1
𝑁 𝑁

∑ 𝑋𝑖 ∑ 𝑌𝑖 = (𝑋1 + 𝑋2 )(𝑌1 + 𝑌2 ) = (1 + 2)(3 + 4) = 21


𝑖=1 𝑖=1

Clearly 11 ≠ 21, so the claim is false.

∑ 𝑁
𝑋𝑖
(iii) Prove that given data on a variable X, and its sample mean 𝑋̅ (defined as 𝑋̅ = 𝑖=1 ) the
𝑁
following holds:
𝑁 𝑁

∑(𝑋𝑖 − 𝑋̅) = ∑ 𝑋𝑖2 − 𝑁𝑋̅ 2


2

𝑖=1 𝑖=1

Hint: You solved virtually the same example during sections, except that then you had two
variables X and Y:
𝑁 𝑁

∑(𝑋𝑖 − 𝑋̅) (𝑌𝑖 − 𝑌̅) = ∑ 𝑋𝑖 𝑌𝑖 − 𝑁 𝑋̅𝑌̅,


𝑖=1 𝑖=1

while in this example X=Y.

Solution:
𝑁

∑(𝑋𝑖 − 𝑋̅)2 =
𝑖=1

3
𝑁

∑(𝑋𝑖2 − 2𝑋𝑖 𝑋̅ + 𝑋̅ 2 ) = (𝑚𝑢𝑙𝑡𝑖𝑝𝑙𝑦𝑖𝑛𝑔 𝑡ℎ𝑒 𝑡𝑒𝑟𝑚𝑠)


𝑖=1
𝑁 𝑁 𝑁

∑ 𝑋𝑖2 − ∑ 2𝑋𝑖 𝑋̅ + ∑ 𝑋̅ 2 = (𝑟𝑒𝑔𝑟𝑜𝑢𝑝𝑖𝑛𝑔 𝑡ℎ𝑒 𝑠𝑢𝑚𝑚𝑎𝑡𝑖𝑜𝑛 𝑡𝑒𝑟𝑚𝑠)


𝑖=1 𝑖=1 𝑖=1
𝑁 𝑁

∑ 𝑋𝑖2 − 2𝑋̅ ∑ 𝑋𝑖 + 𝑁𝑋̅ 2 = (𝑢𝑠𝑖𝑛𝑔 𝑡ℎ𝑒 𝑓𝑎𝑐𝑡 𝑡ℎ𝑎𝑡 𝑋̅ 𝑎𝑛𝑑 𝑋̅ 2 𝑎𝑟𝑒 𝑐𝑜𝑛𝑠𝑡𝑎𝑛𝑡𝑠)
𝑖=1 𝑖=1
𝑁 𝑁

∑ 𝑋𝑖2 − 2𝑋̅(𝑁𝑋̅) + 𝑁𝑋 = (𝑢𝑠𝑖𝑛𝑔 𝑡ℎ𝑒 𝑑𝑒𝑓𝑖𝑛𝑖𝑡𝑖𝑜𝑛 𝑜𝑓 𝑋̅ , 𝑎𝑛𝑑 𝑒𝑥𝑝𝑟𝑒𝑠𝑠𝑖𝑛𝑔 ∑ 𝑋𝑖 )


̅2
𝑖=1 𝑖=1
𝑁

∑ 𝑋𝑖2 − 2𝑁𝑋̅ 2 + 𝑁𝑋̅ 2 =


𝑖=1
𝑁

∑ 𝑋𝑖2 − 𝑁𝑋̅ 2
𝑖=1

This completes the proof.

(iv) Suppose that you have data on a variable X. Denote the sample mean of the data by 𝑋̅.
Suppose that you multiply every observation in the data by a constant B and you add another
constant A, such that you obtain a new observation 𝑋𝑖∗ = 𝐴 + 𝐵𝑋𝑖 (this is often called a linear
transformation). Denote the sample mean of the new data by ̅̅̅
𝑋∗.

a) Show that ̅̅̅


𝑋 ∗ = 𝐴 + 𝐵𝑋̅.

∑ 𝑁
𝑋𝑖
Hint: The sample mean of the original data is defined as: 𝑋̅ = 𝑖=1 . The sample mean of the
𝑁
∑𝑁 ∗ 𝑁
𝑖=1 𝑋𝑖 ∑𝑖=1(𝐴+𝐵𝑋𝑖 ) ∑𝑁
𝑖=1(𝐴+𝐵𝑋𝑖 )
new data is defined as: ̅̅̅
𝑋∗ = = . Now simply show that = 𝐴 + 𝐵𝑋̅.
𝑁 𝑁 𝑁

Solution:
∑ 𝑁
𝑋𝑖
The sample mean of the original data is defined as: 𝑋̅ = 𝑖=1 .
𝑁
The sample mean of the new data is defined as:
∑𝑁 𝑋 ∗
̅̅̅
𝑋 ∗ = 𝑖=1 𝑖 =
𝑁

∑𝑁
𝑖=1(𝐴 + 𝐵𝑋𝑖 )
=
𝑁

∑𝑁 𝑁
𝑖=1 𝐴 + ∑𝑖=1 𝐵𝑋𝑖
=
𝑁

4
𝑁𝐴 + 𝐵 ∑𝑁 𝑖=1 𝑋𝑖
=
𝑁
(as A, B – constants)

𝑖∑𝑁 𝑋
𝐴 + 𝐵 𝑖=1 =
𝑁
𝐴 + 𝐵𝑋̅ (using the definition of 𝑋̅)

b) Show that
𝑁 𝑁

∑(𝑋𝑖∗ − ̅̅̅
𝑋 ∗ )2 = 𝐵 2 ∑(𝑋𝑖 − 𝑋̅)2
𝑖=1 𝑖=1

Hint: Use the result from a) and substitute 𝑋𝑖∗ and ̅̅̅
𝑋 ∗ = 𝐴 + 𝐵𝑋̅ into the left hand side.

(2 points each, 10 points in total)

Solution:
Following the hint:

LHS=
𝑁

∑(𝑋𝑖∗ − ̅̅̅
𝑋 ∗ )2 =
𝑖=1

∑[(𝐴 + 𝐵𝑋𝑖 ) − (𝐴 + 𝐵𝑋̅)]2 =


𝑖=1
𝑁

∑(𝐴 + 𝐵𝑋𝑖 − 𝐴 − 𝐵𝑋̅)2 =


𝑖=1
𝑁

∑(𝐵𝑋𝑖 − 𝐵𝑋̅)2 =
𝑖=1
𝑁

∑[𝐵(𝑋𝑖 − 𝑋̅)]2 =
𝑖=1
𝑁

∑ 𝐵 2 (𝑋𝑖 − 𝑋̅)2 =
𝑖=1
𝑁

𝐵 ∑(𝑋𝑖 − 𝑋̅)2 =
2

𝑖=1
= RHS

This completes the proof.

You might also like