2. Covariance (15 points)
(Some portions of this problem are covered in Section 5.3 of the book. Regardless of that fact, be sure you include all details of your derivations for the following questions.) For any two random variables X, Y the covariance is defined as
Cov(X, Y) = E[(X − E[X])(Y − E[Y])].
In this problem, if you prefer, you may assume that X and Y are discrete random variables.
(a) [3 Points] Show that
Cov(X, Y) = E[XY] − E[X]E[Y].
(b) [3 Points] Show that for any two random variables
Var(X + Y) = Var(X) + Var(Y) + 2Cov(X, Y).
(c) [3 Points] If E[Y | X = x] = x show that Cov(X, Y) = Var(X).
(d) [3 Points] If X, Y are independent show that Cov(X, Y) = 0.
(e) [3 Points] If X and Y have Cov(X, Y) > 0, we say that X and Y are positively correlated. If Cov(X, Y) < 0, we say that X and Y are negatively correlated. Suppose that ̢X = {0, 1}, ̢Y = {0, 1} and ̢X,Y = {(0, 0), (0, 1), (1, 0), (1, 1)}. Give a valid joint probability mass function for X and Y for which X and Y are positively correlated. Then give a different joint probability mass function for X and Y (same ranges) for which X and Y are negatively correlated.