Econ 251 PS1 Solutions
Econ 251 PS1 Solutions
Econ 251 PS1 Solutions
Problem Set #1
SOLUTIONS
Note: We solved a very similar example in class; you may find it helpful to consult your notes
when solving this problem.
𝔼(𝑋) = 1
𝔼(𝑌) = −1
𝑣𝑎𝑟(𝑋) = 4
𝑣𝑎𝑟(𝑌) = 1
𝑐𝑜𝑣(𝑋, 𝑌) = −2.
Now suppose you generate two new variables equal to (2X+Y) and (X+4Y).
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:
𝑐𝑜𝑣(𝑋, 𝑋) = 𝑣𝑎𝑟(𝑋)
𝑐𝑜𝑣(𝐴𝑋, 𝐷𝑌) = 𝐴𝐷. 𝑐𝑜𝑣(𝑋, 𝑌)
𝑐𝑜𝑣(𝐴𝑋 + 𝐵𝑌, 𝐶𝑋 + 𝐷𝑌) = 𝐴𝐶𝑣𝑎𝑟(𝑋) + 𝐵𝐷𝑣𝑎𝑟(𝑌) + (𝐴𝐷 + 𝐵𝐶)𝑐𝑜𝑣 (𝑋, 𝑌).
(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.
∑(𝑋𝑖 − 𝑋̅) = 0
𝑖=1
Solution:
𝑁
∑(𝑋𝑖 − 𝑋̅) =
𝑖=1
𝑁 𝑁
𝑁
∑𝑁
𝑖=1 𝑋𝑖
∑ 𝑋𝑖 – 𝑁 = (𝑢𝑠𝑖𝑛𝑔 𝑡ℎ𝑒 𝑑𝑒𝑓𝑖𝑛𝑖𝑡𝑖𝑜𝑛 𝑜𝑓 𝑋̅)
𝑁
𝑖=1
2
𝑁 𝑁
1
∑ 𝑋𝑖 – ∑ 𝑋𝑖 = (𝑐𝑎𝑛𝑐𝑒𝑙𝑙𝑖𝑛𝑔 𝑜𝑢𝑡 𝑁 𝑤𝑖𝑡ℎ )
𝑁
𝑖=1 𝑖=1
= 0.
∑ 𝑋𝑖 𝑌𝑖 ≠ ∑ 𝑋𝑖 ∑ 𝑌𝑖
𝑖=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
𝑁 𝑁
∑ 𝑁
𝑋𝑖
(iii) Prove that given data on a variable X, and its sample mean 𝑋̅ (defined as 𝑋̅ = 𝑖=1 ) the
𝑁
following holds:
𝑁 𝑁
𝑖=1 𝑖=1
Hint: You solved virtually the same example during sections, except that then you had two
variables X and Y:
𝑁 𝑁
Solution:
𝑁
∑(𝑋𝑖 − 𝑋̅)2 =
𝑖=1
3
𝑁
∑ 𝑋𝑖2 − 2𝑋̅ ∑ 𝑋𝑖 + 𝑁𝑋̅ 2 = (𝑢𝑠𝑖𝑛𝑔 𝑡ℎ𝑒 𝑓𝑎𝑐𝑡 𝑡ℎ𝑎𝑡 𝑋̅ 𝑎𝑛𝑑 𝑋̅ 2 𝑎𝑟𝑒 𝑐𝑜𝑛𝑠𝑡𝑎𝑛𝑡𝑠)
𝑖=1 𝑖=1
𝑁 𝑁
∑ 𝑋𝑖2 − 𝑁𝑋̅ 2
𝑖=1
(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 ̅̅̅
𝑋∗.
∑ 𝑁
𝑋𝑖
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.
Solution:
Following the hint:
LHS=
𝑁
∑(𝑋𝑖∗ − ̅̅̅
𝑋 ∗ )2 =
𝑖=1
∑(𝐵𝑋𝑖 − 𝐵𝑋̅)2 =
𝑖=1
𝑁
∑[𝐵(𝑋𝑖 − 𝑋̅)]2 =
𝑖=1
𝑁
∑ 𝐵 2 (𝑋𝑖 − 𝑋̅)2 =
𝑖=1
𝑁
𝐵 ∑(𝑋𝑖 − 𝑋̅)2 =
2
𝑖=1
= RHS