Professional Documents
Culture Documents
Tutorial #4 Chapter 5
Contents
Exercise 1
(a) . . .
(b) . . .
(c) . . .
(d) . . .
(e) . . .
(f) . . .
(g) . . .
(h) . . .
(i) . . .
(j) . . .
(problem 5-2)
. . . . . . . . . .
. . . . . . . . . .
. . . . . . . . . .
. . . . . . . . . .
. . . . . . . . . .
. . . . . . . . . .
. . . . . . . . . .
. . . . . . . . . .
. . . . . . . . . .
. . . . . . . . . .
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
3
3
3
3
4
4
4
5
5
5
5
Exercise 2
(a) . . .
(b) . . .
(c) . . .
(d) . . .
(e) . . .
(f) . . .
(problem 5-5)
. . . . . . . . . .
. . . . . . . . . .
. . . . . . . . . .
. . . . . . . . . .
. . . . . . . . . .
. . . . . . . . . .
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
6
6
8
8
8
8
9
Exercise 3
(a) . . .
(b) . . .
(c) . . .
(d) . . .
(e) . . .
(f) . . .
(g) . . .
(h) . . .
(i) . . .
(j) . . .
(k) . . .
(problem 5-14)
. . . . . . . . . .
. . . . . . . . . .
. . . . . . . . . .
. . . . . . . . . .
. . . . . . . . . .
. . . . . . . . . .
. . . . . . . . . .
. . . . . . . . . .
. . . . . . . . . .
. . . . . . . . . .
. . . . . . . . . .
.
.
.
.
.
.
.
.
.
.
.
10
10
11
11
12
12
13
13
13
14
14
14
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
15
Page 2 of 15
3. f (x, y) = P (X = x, Y = y)
This means that parameter c should be greatet or equal to 0 and such that:
3 P
3
P
c(x + y) = 1
x=1 y=1
That is
c = P3
1
P3
1
= (1+1)+(1+2)+(1+3)+(2+1)+(2+2)+(2+3)+(3+1)+(3+2)+(3+3)
(x
+
y)
x=1
y=1
1
1
=
=
2+3+4+3+4+5+4+5+6
36
(a)
P (X = 1, Y < 4)
Solution:
We need to sum up all the probabilitytes with X = 1 and Y < 4.
P (X = 1, Y < 4) = P (X = 1, Y = 1) + P (X = 1, Y = 2) + P (X = 1, Y = 3) = f (1, 1) + f (1, 2) + f (1, 3)
1
1
1
9
= 36
(1 + 1) + 36
(1 + 2) + 36
(1 + 3) = 2+3+4
= 36
= 0.25
36
(b)
P (X = 1)
Solution:
This is marginal probability for X = 1. That we need to sum up all the probabilitytes with X = 1.
P (X = 1, Y < 4) = P (X = 1, Y = 1) + P (X = 1, Y = 2) + P (X = 1, Y = 3) = f (1, 1) + f (1, 2) + f (1, 3)
1
1
1
9
= 36
(1 + 1) + 36
(1 + 2) + 36
(1 + 3) = 2+3+4
= 36
= 0.25
36
(c)
P (Y = 1)
Solution:
This is marginal probability for Y = 2. That we need to sum up all the probabilitytes with Y = 2.
P (Y = 2) = P (X = 1, Y = 2) + P (X = 2, Y = 2) + P (X = 3, Y = 2) = f (1, 2) + f (2, 2) + f (3, 2)
1
1
1
= 36
(1 + 2) + 36
(2 + 2) + 36
(3 + 2) = 3+4+5
= 12
36
36 = 0.3333333
Page 3 of 15
(d)
P (X < 2, Y < 2)
Solution:
We need to sum up all the probabilitytes with X < 2 and Y < 2.
1
2
P (X < 2, Y < 2) = P (X = 1, Y = 1) = 36
(1 + 1) = 36
= 0.055555556
(e)
E(X), E(Y ), V (X), and V (Y )
Solution:
3
P
E(X) =
x P (X = x) = 1 P (X = 1) + 2 P (X = 2) + 3 P (X = 3)
x=1
= 1 (f (1, 1) + f (1, 2) + f (1, 3)) + 2 (f (2, 1) + f (2, 2) + f (2, 3)) + 3 (f (3, 1) + f (3, 2) + f (3, 3))
1
1
1
1
1
1
= 1 36
(1 + 1) + 36
(1 + 2) + 36
(1 + 3) + 2 36
(2 + 1) + 36
(2 + 2) + 36
(2 + 3)
1
1
1
+3 36
(3 + 1) + 36
(3 + 2) + 36
(3 + 3) =
1
= 36 (1 (2 + 3 + 4) + 2 (3 + 4 + 5) + 3 (4 + 5 + 6) = 9+24+45
= 2.166666667
36
3
P
V (X) =
x2 P (X = x) [E(X)]2 = 1 P (X = 1) + 4 P (X = 2) + 9 P (X = 3) [E(X)]2
=
x=1
1
36 (1
E(Y ) =
3
P
(2 + 3 + 4) + 4 (3 + 4 + 5) + 9 (4 + 5 + 6) =
9+48+135
36
(2.166666667)2 = 0.638888889
y P (Y = y) = 1 P (Y = 1) + 2 P (Y = 2) + 3 P (Y = 3)
y=1
= 1 (f (1, 1) + f (2, 1) + f (3, 1)) + 2 (f (1, 2) + f (2, 2) + f (3, 2)) + 3 (f (1, 3) + f (2, 3) + f (3, 3))
1
1
1
1
1
1
= 1 36
(1 + 1) + 36
(2 + 1) + 36
(3 + 1) + 2 36
(1 + 2) + 36
(2 + 2) + 36
(3 + 2)
1
1
1
+3 36
(1 + 3) + 36
(2 + 3) + 36
(3 + 3) =
1
= 36
(1 (2 + 3 + 4) + 2 (3 + 4 + 5) + 3 (4 + 5 + 6) = 9+24+45
= 2.166666667
36
3
P
V (Y ) =
y 2 P (Y = y) [E(Y )]2 = 1 P (Y = 1) + 4 P (Y = 2) + 9 P (Y = 3) [E(Y )]2
=
y=1
1
36 (1
(2 + 3 + 4) + 4 (3 + 4 + 5) + 9 (4 + 5 + 6) =
9+48+135
36
(2.166666667)2 = 0.638888889
(f )
Marginal probability distribution of the random variable X
Solution:
Themarginal probability distribution for X is computed as follows:
P (X = 1) = P (X = 1, Y = 1) + P (X = 1, Y = 2) + P (X = 1, Y = 3) = f (1, 1) + f (1, 2) + f (1, 3)
1
1
9
1
= 36
(1 + 1) + 36
(1 + 2) + 36
(1 + 3) = 2+3+4
= 36
= 0.25
36
P (X = 2) = P (X = 2, Y = 1) + P (X = 2, Y = 2) + P (X = 2, Y = 3) = f (2, 1) + f (2, 2) + f (2, 3)
1
1
1
= 36
(2 + 1) + 36
(2 + 2) + 36
(2 + 3) = 3+4+5
= 12
36
36 = 0.3333333
P (X = 3) = P (X = 3, Y = 1) + P (X = 3, Y = 2) + P (X = 3, Y = 3) = f (3, 1) + f (3, 2) + f (3, 3)
1
1
1
= 36
(3 + 1) + 36
(3 + 2) + 36
(3 + 3) = 4+5+6
= 15
36
36 = 0.41666666
Page 4 of 15
(g)
Conditional probability distribution of Y given that X = 1.
Solution:
The conditional probability distribution of Y given
that X = 1 is computed as follows:
P (X = 1, Y = 1)
1+1
9
2
P (Y = 1 | X = 1) =
=
=
P (X = 1)
36
36
9
1+2
9
3
P (X = 1, Y = 2)
=
=
P (Y = 2 | X = 1) =
P (X = 1)
36
36
9
P (X = 1, Y = 3)
1+3
9
4
P (Y = 3 | X = 1) =
=
=
P (X = 1)
36
36
9
(h)
Conditional probability distribution of X given that Y = 2.
Solution:
The conditional probability distribution of Y given
that X = 1 is computed as follows:
1 + 2 12
3
P (X = 1, Y = 2)
=
=
P (X = 1 | Y = 2) =
P (Y = 2)
36
36
12
2 + 2 12
4
P (X = 2, Y = 2)
=
=
P (X = 2 | Y = 2) =
P (Y = 2)
36
36
12
P (X = 3, Y = 2)
3 + 2 12
5
P (X = 3 | Y = 2) =
=
=
P (Y = 2)
36
36
12
(i)
E(Y | X = 1)
Solution:
Expectd value of Y for given X = 1 can be comuted using the conditional probability distribution obtained
in part (g):
23
34
E(Y | X = 1) = 1 P (Y = 1 | X = 1) + 2 P (Y = 2 | X = 1) + 3 P (Y = 3 | X = 1) = 12
9 + 9 + 9 =
2+6+12
= 2.222222222
9
(j)
Are X and Y independent?
Solution:
The variable are NOT independent. This can be shown bt comparison of P (Y = 1 | X = 1) with marginal
P (Y = 1) or by comparison of P (X = 1, Y = 1) with P (X = 1) P (Y = 1):
9
P (Y = 1 | X = 1) = 29 6= P (Y = 1) = 36
or
2
1
9
9
1
P (X = 1, Y = 1) = 36
= 18
6= P (X = 1) P (Y = 1) = 36
36
= 16
Page 5 of 15
(a)
fXY (x, y)
Page 6 of 15
Solution:
The possible sequences of bits and the corresponding probabilities can be written as follows: (HHH):
with probability: 0.01 0.01 0.01 = 0.000001
(HHM ): with probability: 0.01 0.01 0.04 = 0.000004
(HM H): with probability: 0.01 0.04 0.01 = 0.000004
(M HH): with probability: 0.04 0.01 0.01 = 0.000004
(HHL): with probability: 0.01 0.01 0.95 = 0.000095
(HLH): with probability: 0.01 0.95 0.01 = 0.000095
(LHH): with probability: 0.95 0.01 0.01 = 0.000095
(HM M ): with probability: 0.01 0.04 0.04 = 0.000016
(M HM ): with probability: 0.04 0.01 0.04 = 0.000016
(M M H): with probability: 0.04 0.04 0.01 = 0.000016
(HM L): with probability: 0.01 0.04 0.95 = 0.00038
(HLM ): with probability: 0.01 0.95 0.04 = 0.00038
(M HL): with probability: 0.04 0.01 0.95 = 0.00038
(LHM ): with probability: 0.01 0.01 0.04 = 0.00038
(M LH): with probability: 0.04 0.95 0.01 = 0.00038
(LM H): with probability: 0.95 0.04 0.01 = 0.00038
(HLL): with probability: 0.01 0.95 0.95 = 0.009025
(LHL): with probability: 0.95 0.01 0.95 = 0.009025
(LLH): with probability: 0.95 0.95 0.01 = 0.009025
(M M L): with probability: 0.04 0.04 0.95 = 0.00152
(M LM ): with probability: 0.04 0.95 0.04 = 0.00152
(LM M ): with probability: 0.95 0.04 0.04 = 0.00152
(M LL): with probability: 0.04 0.95 0.95 = 0.0361
(LM L): with probability: 0.95 0.04 0.95 = 0.0361
(LLM ): with probability: 0.95 0.95 0.04 = 0.0361
(M M M ): with probability: 0.04 0.04 0.04 = 0.000064
(LLL): with probability: 0.95 0.95 0.95 = 0.857375
Now we need to sum up the states such that the numbers of bits with high (X) and moderate (Y )
distortions take the following values:
(X = 0, Y = 0), (X = 0, Y = 1), (X = 0, Y = 2), (X = 0, Y = 3),
(X = 1, Y = 0), (X = 1, Y = 1), (X = 1, Y = 2),
X + Y cannot exceed 3.
(X = 2, Y = 0), (X = 2, Y = 1),
(X = 3, Y = 0),
These probabilities can be presented in the following table:
X
0
1
2
3
0 0.857375 0.027075 0.000285 0.000001
1
0.1083
0.00228 0.000012
Y
2
0.00456 0.000048
3 0.000064
Please note that these probabilities can be also computed as multinomial distribution using the following
expression:
3!
fXY (x, y) = P (X = x, Y = y) =
0.01x 0.04y 0.953xy
x!y!(3 x y)!
Page 7 of 15
(b)
fX (x)
Solution:
Here we need to sum up the probabilities for fixed values of X
fX (0) = P (X = 0) = P (X = 0, Y = 0) + P (X = 0, Y = 1) + P (X = 0, Y = 2) + P (X = 0, Y = 3)
= 0.857375 + 0.1083 + 0.00456 + 0.000064 = 0.970299
fX (1) = P (X = 1) = P (X = 1, Y = 0) + P (X = 1, Y = 1) + P (X = 1, Y = 2)
= 0.027075 + 0.00228 + 0.000048 = 0.029403
fX (2) = P (X = 2) = P (X = 2, Y = 0) + P (X = 2, Y = 1) = 0.000285 + 0.000012 = 0.000297
fX (3) = P (X = 3) = P (X = 3, Y = 0) = 0.000001
Please not you can also compute these probabilities using multinomial (binomial) distribution:
3!
fX (x) = P (X = x) =
0.01x (1 0.01)3x
x!(3 x)!
(c)
E(X)
Solution:
Here we can use the marginal probabilities obtained in the part (b):
3
P
E(X) =
x P (X = x) = 0 P (X = 0) + 1 P (X = 1) + 2 P (X = 2) + 3 P (X = 3)
x=0
(d)
fY |1 (y)
Solution:
P (X = 1, Y = 0)
0.027075
=
= 0.920824406
P (X = 1)
0.029403
0.00228
P (X = 1, Y = 1)
=
= 0.077543108
fY |1 (1) = P (Y = 1|X = 1) =
P (X = 1)
0.029403
P (X = 1, Y = 2)
0.000048
fY |1 (2) = P (Y = 2|X = 1) =
=
= 0.001632486
P (X = 1)
0.029403
fY |1 (0) = P (Y = 0|X = 1) =
(e)
E(Y |X = 1)
Solution:
Here we can use the conditional probabilities obtained in the part (d):
3
P
E(Y |X = 1) =
x P (Y = y|X = 1) = 0 P (Y = 0|X = 1) + 1 P (Y = 1|X = 1) + 2 P (Y = 2|X = 1)
y=0
Page 8 of 15
(f )
Are X and Y independent?
Solution:
X and Y are not independent. This can be shown using one of the following comparisons:
P (X = 0) P (Y = 0) = 0.970299 (0.857375 + 0.027075 + 0.000285 + 0.000001) = 0.858458456
6= P (X = 0, Y = 0) = 0.857375
0.857375
= 0.969074391
0.857375 + 0.027075 + 0.000285 + 0.000001
P (X = 0) = 0.970299
P (X = 0|Y = 0) =
6=
P (Y = 0|X = 1) = 0.920824406
6= P (Y = 0) = 0.857375 + 0.027075 + 0.000285 + 0.000001 = 0.884736
Page 9 of 15
1
.
24
(a)
P (X < 1, Y < 2)
Solution:
In this case we need to find the
probability on the following area
y
5.0
4.0
3.0
2.0
1.0
0.0
0.0 1.0 2.0 3.0 x
R1
R1
1
(2x x ) + (2 12 x2 )dx = 24
(2x + 2 23 x2 )dx
0
0
3 1
1
1
= 24
(x2 + 2x x2 ) = 24
(1 + 2 0.5) = 2.5/24
=
1
24
= 0.104166666667
Page 10 of 15
(b)
P (1 < X < 2)
Solution:
In this case we need to find the
probability on the following area
y
5.0
4.0
3.0
=
1
24
2.0
1.0
R2
(2x + 2x + 2)dx =
1
24 (10
1
24 (4x
2
+ 2)
1
6) = 1/6
0.0
0.0 1.0 2.0 3.0 x
(c)
P (Y > 1)
Solution:
In this case we need to find the
probability on the following area
y
5.0
4.0
1
24
R1
(x + 1/2 x2 x2 /2)dx
1
(x2 /2 + 1/2x x3 /2)
3.0
=1
2.0
=1
1
24
=1
1
24 (1/2
=1
1
48
1.0
0.0
0.0 1.0 2.0 3.0 x
0
+ 1/2 1/2)
= 0.9791666667
Page 11 of 15
(d)
P (X < 2, Y < 2)
Solution:
In this case we need to find the
probability on the following area
y
5.0
4.0
R2
1
24
1
24 (4
4
24
(2x + 2 x2 x2 /2)dx
0
2
1
2
3
= 24 (x + 2x x /2)
3.0
2.0
1.0
+ 4 8/2)
= 1/6
0.0
0.0 1.0 2.0 3.0 x
(e)
E(X)
Solution:
Here we need to compute an integral of xfXY (x, y) on the total region:
Z3 x+2
Z
Z3
x+2
1
1
E(X) =
x(x + y)dydx =
(x2 y + xy 2 /2)
dx
24
24
x
0
1
=
24
=
Z3
1
24
1
x (x + 2) + x(x + 2) /2 x x /2) dx =
24
0
3
1
4x3 /3 + x2 = 24
(36 + 9)
45
24
Z3
4x2 + 2x dx
15
8
Page 12 of 15
(f )
V (X)
Solution:
Here we need to compute first an integral of x2 fXY (x, y) on the total region:
Z3 x+2
Z
Z3
x+2
1 2
1
2
3
2 2
E(X ) =
x (x + y)dydx =
(x y + x y /2)
dx
24
24
x
0
1
=
24
=
1
24
Z3
1
x (x + 2) + x (x + 2) /2 x x /2) dx =
24
0
3
1
99
x4 + 2x3 /3 = 24
(81 + 18) = 24
3
Z3
4x3 + 2x2 dx
(g)
Marginal probability distribution of X
Solution:
1
fX (x) is the integral of 24
(x + y) over y:
x+2
Z
x+2
1
1
1
1
(x + y)dy =
(xy + y 2 /2)
=
(x(x + 2) + (x + 2)2 /2 x2 x2 /2)) =
(4x + 2)
fX (x) =
24
24
24
24
x
x
(h)
Conditional probability distribution of Y given that X = 1
Solution:
fXY (1, y)
=
fX (1)
1+y
=
,
6
fY |1 (y) =
1
24 (1 + y)
1
24 (4 1 + 2)
1<y<3
Page 13 of 15
(i)
E(Y |X = 1)
Solution:
We can compute the conditional expectation E(Y |X = 1) using the density function fY |1 (y) obtained
above:
3
R3
R3
1
1 2
2
3
E(Y |X = 1) = y 1+y
dy
=
(y
+
y
)dy
=
(y
/2
+
y
/3)
= 61 (9/2 + 27/3 1/2 1/3)
6
6
6
1
= 2.111111111
(j)
P (Y > 2|X = 1)
Solution:
We can compute this probability using the density function fY |1 (y) obtained above:
3
R3
R3
1
1
2
(1
+
y)dy
=
dy
=
(y
+
y
/2)
P (Y > 2|X = 1) = 1+y
= 61 (3 + 9/2 2 4/2) = 61 (9/2 1)
6
6
6
2
= 0.5833333
(k)
Conditional probability distribution of X given that Y = 2
Solution:
fXY (x, 2)
and we need first to find fY (2)
fY (2)
which is determined by integrating over x.
There are three regions of integration.
For 0 < y < 2 the integration is from 0 to y.
For 2 < y < 3 the integration is from y 2 to y.
For 3 < y < 5 the integration is from y to 3.
Because the condition is y = 2, only the first integration is needed.
Ry
2
1
fY (y) = 24
(x + y)dx = y16 , 0 < y < 2
fX|2 (x) =
That is we get:
1
(x + 2)
x+2
fX|2 (x) = 24 22
=
,
6
16
0<x<3
Page 14 of 15
Solution:
Compute first the means and the variances:
E(X) = 1 1/8 + (0.5) 1/4 + 0.5 1/2 + 1 1/8 = 1/8
E(Y ) = 2 1/8 + (1) 1/4 + 1 1/2 + 2 1/8 = 1/4
V (X) = (1)2 1/8 + (0.5)2 1/4 + (0.5)2 1/2 + 12 1/8 (1/8)2
= 1/8 + 1/16 + 1/8 + 1/8 (1/8)2 = 7/16 1/64 = 0.421875
V (Y ) = (2)2 1/8 + (1)2 1/4 + 12 1/2 + 22 1/8 (1/4)2
= 1/2 + 1/4 + 1/2 + 1/2 (1/4)2 = 7/4 1/16 = 1.6875
Compute now E(XY ):
E(XY ) = (1) (2) 1/8 + (0.5) (1) 1/4 + 0.5 1 1/2 + 1 2 1/8 = 1/4 + 1/8 + 1/4 + 1/4 = 7/8
Covariance cov(X, Y ) is equal to:
cov(X, Y ) = E(XY ) E(X) E(Y ) = 7/8 1/8 1/4 = 27/32
Correlation coefficient XY is then computed as:
cov(X, Y )
0.84375
XY = p
=1
=
0.421875 1.6875
V (X) V (Y )
Page 15 of 15