You are on page 1of 8

Homework 10

Section 4.2
Problems: 1, 4, 5, 7
4.2-1 The joint p.m.f. in tabular form is:

Therefore, the mean of X is:


2    
X 14 18 50 25
E(X) = xf (x) = 1 +2 = =
x=1
32 32 32 16

And, the mean of Y is:


4        
X 5 7 9 11 90 45
E(Y ) = yf (y) = 1 +2 +3 +4 = =
y=1
32 32 32 32 32 16

To calculate the variance of X, first calculate the expected value of X 2 :


2    
X 14 18 86 43
E(X 2 ) = x2 f (x) = 1 +4 = =
x=1
32 32 32 16

Therefore, the variance of X is:


 2
2 2 43 25 688 − 625 63
σX = E(X ) − µ2X = − = =
16 16 256 256

To calculate the variance of Y , first calculate the expected value of Y 2 :


4        
2
X
2 5 7 9 11 290 145
E(Y ) = y f (y) = 1 +4 +9 + 16 = =
y=1
32 32 32 32 32 16

Therefore, the variance of Y is:


 2
145 45 2320 − 2025 295
σY2 = E(Y ) −2
µ2Y = − = =
16 16 256 256
To calculate the correlation between X and Y , first calculate the expected value of XY :
2 X 4        
X 2 3 5 6 140 70
E(XY ) = xyf (x, y) = (1)(1) + (1)(2) + ... + (2)(3) + (2)(4) = =
x=1 y=1
32 32 32 32 32 16

Therefore, the covariance between X and Y is:


  
70 25 45 1120 − 1125 −5
Cov(X, Y ) = E(XY ) − µX µY = − = =
16 16 16 256 256
And that makes the correlation between X and Y therefore:
Cov(X, Y ) −5/256 −5
ρ= =p p =√ √ = −0.0367
σX σY 63/256 295/256 63 295
The correlation coefficient indicates that X and Y are dependent, as we previously illustrated using different
methodology in problem 4.1-3g.
4.2-4 (a) The random variable X is a binomial random variable with n = 3 and p = 1/6. Therefore, the mean of X
is:
 
1 1
µX = np = 3 =
6 2
(b) The random variable Y is binomial random variable with n = 3 and p = 1/2. Therefore, the mean of Y
is:
 
1 3
µY = np = 3 =
2 2
(c) The random variable X is a binomial random variable with n = 3 and p = 1/6. Therefore, the variance
of X is:
  
2 1 1 15 5
σX = np(1 − p) = 3 1− = =
6 6 36 12
(d) The random variable Y is a binomial variable with n = 3 and p = 1/2. Therefore, the variance of Y is:
  
1 1 3
σY2 = np(1 − p) = 3 1− =
2 2 4
(e) In order to find the covariance between X and Y , we need to use the trinomial p.m.f. to find some
probabilities:
 1  1  1
3! 1 3 2 36
f (1, 1) = =
1!1!1! 6 6 6 216
 1  2  0
3! 1 3 2 27
f (1, 2) = =
1!2!0! 6 6 6 216
 2  1  0
3! 1 3 2 9
f (2, 1) = =
2!1!0! 6 6 6 216
Now, to first find the expected value of XY :
36 54 18 108
E(XY ) = (1)(1)f (1, 1) + (2)(1)f (2, 1) + (1)(2)f (1, 2) = + + =
216 216 216 216
And, therefore, the covariance is:
  
108 1 3 108 − 162 54 1
Cov(X, Y ) = E(XY ) − µX µY = − = =− =−
216 2 2 216 216 4

(f) The correlation between X and Y is:


Cov(X, Y ) = 1/4
ρ= =p p = −0.45
σX σY 15/36 3/4

4.2-5 First, rewrite K(a, b) as:

K(a, b) = E (Y − (a + bX))2 = E(Y 2 ) − 2aE(Y ) − 2bE(Y ) + E((a + bX)2 )




Now, changing the notation a bit, and simplifying yet more, we get:

K(a, b) = (σY2 + µ2Y ) − 2aµY − 2b(µX µY + ρσX σY ) + E(a2 + 2abX + b2 X 2 )

And simplifying even a bit more:

K(a, b) = σY2 + µ2Y − 2aµY − 2bµX µY − 2bρσX σY + a2 + 2abµX + b2 (σX


2
+ µ2X )

Now, taking the partial derivative of K(a, b) first with respect to a, and setting it equal to 0, we get:
∂K(a, b)
= −2µY + 2a + 2bµX ≡ 0
∂a
And solving for a:

a = µY − bµX

Now, taking the partial derivative of K(a, b) first with respect to b:


∂K(a, b) 2
= −2µX µY − 2ρσX σY + 2aµX + 2bσX + 2bµ2X
∂b
Substituting in what we know about a now:
∂K(a, b) 2
= −2µX µY − 2ρσX σY + 2(−µY − bµX )µX + 2bσX + 2bµ2X
∂b
And simplifying, and setting to 0, we get:
∂K(a, b) 2
= −2ρσX σY + 2bσX ≡0
∂b
And solving for b, we get:
ρσX σY ρσY
b= 2 =
σX σX
4.2-7 (a) The joint p.m.f. in tabular form is:

Therefore, the random variables X and Y must be dependent, because the support is not rectangular.

(b) The expected value of XY is:


       
1 1 1 1
E(XY ) = (0)(0) + (1)(−1) + (1)(1) + (2)(0) =0
4 4 4 4

Therefore, the covariance between X and Y is:


  
2 2 1 1
Cov(X, Y ) = E(XY ) − µX µY = 0 − 0 + + − +0+ =0−0=0
4 4 4 4

And, therefore the correlation between X and Y is:


Cov(X, Y ) 0
ρ= = =0
σX σY σX σY
Section 4.3
Problems: 1, 2, 3

4.3-1 (a) We previously showed (in problem 4.2.1) that the joint PMF of X and Y in tabular form is:

f (x, y) 1 2 3 4 fx (x)
2 3 4 5 14
X 1 32 32 32 32 32
3 4 5 6 18
2 32 32 32 32 32
5 7 9 11
fY (y) 32 32 32 32 1
Although the above table presents the marginal PMFs of X and Y in tabular form, we also showed (in
problem 4.2.1) that the formula for the marginal PMF of X is:
4
X x+y 4x + 10
fX (x) = =
y=1
32 32

and the formula for the marginal PMF of Y is:


2
X x+y 2y + 3
fY (y) = =
x=1
32 32

(b) The conditional distribution of X given Y is:

f (x, y) x + y 2y + 3 x+y
g(x|y) = = ÷ =
fY (y) 32 32 2y3

for x = 1, 2 and y = 1, 2, 3, 4. Therefore, the conditional distribution of X given Y in tabular form is:

g(x|y) 1 2 3 4
2 3 4 5
X 1 5 7 9 11
3 4 5 6
2 5 7 9 11
1 1 1 1

(c) The conditional distribution of Y given X is:

f (x, y) x + y 4x + 10 x+y
h(y|x) = = ÷ =
fX (x) 32 32 4x + 10

for x = 1, 2 and y = 1, 2, 3, 4. Therefore, the conditional distribution of Y given X in tabular form is:

h(x|y) 1 2 3 4
2 3 4 5
X 1 14 14 14 14
3 4 5 6
2 18 18 18 18
1 1 1 1
(d) The probability that Y is between 1 and 3 (inclusive) given that X is 1 is:
2 3 4 9
P (1 ≤ Y ≤ 3|X = 1) = + + =
14 14 14 14
The probability that Y is at most 2 given that X is 2 is:
3 4 7
P (Y ≤ 2|X = 2) = + =
18 18 18
The probability that X is 2 given that Y is 3 is:
5
P (X = 2|Y = 2) = g(2|3) =
9
(e) The conditional mean of Y given that X = 1 is:
       
X 2 3 4 5 40 20
yh(y|1) = 1 +2 +3 +4 = =
y
14 14 14 14 14 7

The conditional expectation of Y 2 given that X = 1 is:


       
X
2 2 2 2 3 2 4 2 5 130
y h(y|1) = 1 +2 +3 +4 =
y
14 14 14 14 14

Therefore, the conditional variance of Y given that X = 1 is:


 2
2 130 2 40 1820 − 1600 220
Var(Y |X = 1) = E(Y |X = 1) − (E(Y |X = 1)) = − = =
14 14 196 196

4.3-2 The joint p.m.f. of X and Y is:

h(x|y) 1 2 fX (x)
3 1 4
X 1 8 8 8
1 3 4
2 8 8 8
4 4 1
fY (y) 8 8 8

Using the following formula to find the conditional PMF of X given Y is:

f (x, y)
g(x|y) =
fY (y)
we get that the conditional PMF of X given Y is:

g(x|y) 1 2
3 1
X 1 4 4
1 3
2 4 4
1 1
Then, the conditional expectation of X given Y = 1 is:

2    
X 3 1 5
E(X|Y = 1) = xg(x|1) = 1 +2 =
x=1
4 4 4

And, the conditional expectation of X given Y = 2 is:


2    
X 1 3 7
E(X|Y = 2) = xg(x|2) = 1 +2 =
x=1
4 4 4

Now, using the following formula to find the conditional PMF of Y given X is:

f (x, y)
h(y|x) =
fX (x)

we get that the conditional p.m.f. of Y given X is:

h(x|y) 1 2
3 1
X 1 4 4
1 3
2 4 4
1 1

Then, the conditional expectation of Y given X = 1 is:


2    
X 3 1 5
E(Y |X = 1) = xg(x|1) = 1 +2 =
x=1
4 4 4

Then, the conditional expectation of Y given X = 2 is:


2    
X 1 3 7
E(Y |X = 2) = xg(x|2) = 1 +2 =
x=1
4 4 4

4.3-3 (a) The joint p.m.f. of X and Y is the trinomial p.m.f. with n = 50 and p1 = 0.02 and p2 = 0.90. That is:

50!
f (x, y) = 0.02x 0.90y 0.0850−x−y
x!y!(50 − x − y)!

where x and y are nonnegative integers with x + y ≤ 50.


(b) The marginal p.m.f. of Y is the binomial p.m.f. with n = 50 and p = 0.90. (And, the marginal p.m.f. of
X is the binomial p.m.f. with n = 50 and p = 0.02).
(c) The conditional p.m.f. of Y given that X = x is:

f (x, y) 50! 50!


h(y|x) = = 0.02x 0.90y 0.0850−x−y ÷ 0.02x 0.9850−x
fX (x) x!y!(50 − x − y)! x!(50 − x)!
Canceling out the things that we can, we get:

(50 − x)!
h(y|x) = 0.90y 0.0850−x−y ÷ 0.9850−x
y!(50 − x − y)!

Now, rearranging and then multiplying by 1, we get:

(50 − x)! 0.90y 0.0850−x−y 0.98−y


h(y|x) = ÷
y!(50 − x − y)! 0.9850−x 0.98−y

And, collecting like terms, we finally get:


 y  50−x−y
(50 − x)! 0.90 0.08
h(y|x) = ×
y!(50 − x − y)! 0.98 0.98

for y = 0, 1, 2, . . . , 50−x. That is, Y given X = 3 is binomial with n = 50−3 = 47 and p = 0.90/0.98 =
0.918.
(d) The conditional mean of Y given X = 3 is np = 47(0.918) = 43.16.
(e) Using the formula for the correlation coefficient between trinomial X and Yas derived in Example 4.3.3 on
p. 201, we get:
r s
p1 p2 0.02(0.90)
ρ=− =− = −0.429
(1 − p1 )(1 − p2 ) (0.98)(0.10)

It shouldnt be too much of a surprise that the correlation coefficient is negative, as youd expect that as one
of the variables, say X, goes up, the other one, say Y, goes down.

You might also like