You are on page 1of 4

N ATIONAL U NIVERSITY OF S INGAPORE

D EPARTMENT OF S TATISTICS & DATA S CIENCE


ST2334 P ROBABILITY AND S TATISTICS
S EMESTER II, AY 2023/2024

Tutorial 05: Suggested Solutions

Exam-Like Questions

1. The answers are (a) and (c).


Using results from the lectures, we have
V (Z) = V (−2X + 4Y − 3) = V (−2X + 4Y ) = (−2)2V (X) + 42V (Y ) + 2(−2)(4) cov(X,Y )
= 4V (X) + 16V (Y ) − 16 cov(X,Y ) = 20 + 48 − 16 cov(X,Y ) = 68 − 16 cov(X,Y ).

If X and Y are independent, then cov(X,Y ) = 0, which gives V (Z) = 68. So (a) is true.
From the above, V (Z) > 68 if and only if cov(X,Y ) < 0. So (c) is true, but (b) is not.
2. The answer is 13/21.
The marginal probability density function of X is given by
1
y2
Z 1 
1
fX (x) = (x + y) dy = xy + = x+ , 0 ≤ x ≤ 1.
0 2 y=0 2
To compute E(Y |X = 0.2), we need to obtain fY |X (y|0.2) first.
It is clear that fY |X (y|0.2) = 0 for y ∈
/ [0, 1]. For 0 ≤ y ≤ 1,
f (0.2, y) 0.2 + y 2 + 10y
fY |X (y|x = 0.2) = = = .
fX (0.2) 0.2 + 0.5 7

Therefore 1
10y3
Z 1   
2 + 10y 12 13
E(Y |X = 0.2) = y dy = y +
7 = 21 .
0 7 3 0

3. The answer is (a).


Let X ∼ Bin(n, 0.02) be the number of red marbles drawn in n draws. We want the least n so that
P(X ≥ 1) > 0.5 or
P(X = 0) = (1 − 0.02)n < 0.5.
This means that
n > log(0.5)/ log(0.98) = 34.31.

So we need n to be at least 35.


4. The answer is (a), (b) and (c).
(a) is correct. Since X 2 and Y 4 are independent, we have
√ √
P(X 2 > 2;Y 4 > 0) = P(X 2 > 2)P(Y 4 > 0) = P(X < − 2 or X > 2)P(Y 6= 0)
√ √
= [P(X < − 2) + P(X > 2)][1 − P(Y = 0)]
√ √
= [P(X < − 2) + P(X > 2)][1 − (P(Y ≤ 0) − P(Y < 0))]
√ √
= [FX (− 2−) + 1 − P(X ≤ 2)][1 − FY (0) + FY (0−)]
√ √
= [1 − FX ( 2) + FX (− 2−)][1 − FY (0) + FY (0−)]).

1
(b) is correct. P(X ≥ x;Y ≤ y) = P(X ≥ x)P(Y ≤ y) = (1 − FX (x−))FY (y).
(c) is correct. Note that X 2 − E(X 2 ) and g(Y ) are independent; thus
   
E (X 2 − E(X 2 ))g(Y ) = E X 2 − E(X 2 ) E(g(Y )) = (E(X 2 ) − E(X 2 ))E(g(Y )) = 0.

Long Form Questions

1. The marginal distributions are added to the table.

x
f (x, y) 2 4 fY (y)
1 0.10 0.15 0.25
y 3 0.20 0.30 0.50
5 0.10 0.15 0.25
fX (x) 0.40 0.60 1

(a) It can be verified that

f (x, y) = fX (x) fY (y) for x = 2, 4 and y = 1, 3, 5.

Hence X and Y are independent.


(b) The conditional probability function fY |2 (y|2) is given by

y 1 3 5
fY |X (y|2) 0.10/0.40 = 1/4 0.20/0.40 = 2/4 0.10/0.40 = 1/4

Thus E(Y |X = 2) = 1(1/4) + 3(2/4) + 5(1/4) = 3.


Alternatively, since X and Y are independent,

E(Y |X = 2) = E(Y ) = 1(0.25) + 3(0.5) + 5(0.25) = 3.

(c) The conditional probability function fX|Y (x|3) is given by

x 2 4
fX|Y (x|3) 0.20/0.50 = 2/5 0.30/0.50 = 3/5

Thus E(X|Y = 3) = 2(2/5) + 4(3/5) = 16/5 = 3.2.


Alternatively, since X and Y are independent,

E(X|Y = 3) = E(X) = 2(0.4) + 4(0.6) = 3.2.

(d) E(X) = 3.2 and E(Y ) = 3; therefore E(2X − 3Y ) = 2E(X) − 3E(Y ) = 2(3.2) − 3(3) = −2.6.
(e) E(XY ) = (2)(1)(0.10)+(2)(3)(0.20)+(2)(5)(0.10)+(4)(1)(0.15)+(4)(3)(0.30)+(4)(5)(0.15) =
9.6.
Alternatively, since X and Y are independent, we have

E(XY ) = E(X)E(Y ) = (3.2)(3) = 9.6.

(f) E(X 2 ) = 22 (0.4) + 42 (0.6) = 11.2; thus V (X) = E(X 2 ) − [E(X)]2 = 11.2 − (3.2)2 = 0.96.
E(Y 2 ) = 12 (0.25) + 32 (0.5) + 52 (0.25) = 11; thus V (Y ) = E(Y 2 ) − [E(Y )]2 = 11 − 32 = 2.

2
2. The marginal distributions for X and Y are
1
y3
Z 1   
3 3 2 3 2 1
fX (x) = (x2 + y2 ) dy =
x y+ = x + , for 0 ≤ x ≤ 1;
0 2 2 3 y=0 2 3
1
3 x3
Z 1   
3 2 2 2 3 1 2
fY (y) = (x + y ) dx = + xy = +y , for 0 ≤ y ≤ 1.
0 2 2 3 x=0 2 3

(a) X and Y are dependent, since f (x, y) 6= fX (x) fY (y).


Alternatively, note that f (x, y) cannot be factorized as Cg1 (x)g2 (y).
(b) For X,
 4 1
x2
Z 1  
3 1 2 3 x
E(X) = 2x x + dx = 2 + = 85 ;
0 3 4 6 0
Z 1    5 3
1
1 x x
E(X 2 ) = 32 x2 x2 + dx = 32 + = 7;
0 3 5 9 0 15
V (X) = E(X 2 ) − [E(X)]2 = 73
960 .

The joint probability density function is symmetrical in x and y: that is, f (x, y) = f (y, x). So

E(Y ) = E(X) = 58 , V (Y ) = V (X) = 73


960 .

(c)
Z 1Z 1 Z 1Z 1
2 2
E(XY ) = 3
2 xy(x + y ) dx dy = (x3 y + xy3 ) dx dy
3
2
0 0 0 0
Z 1 4 1
x y x2 y3 y y3
Z 1 
3 3
=2 + dy = 2 + dy
0 4 2 x=0 0 4 2
 2 1
3 y y4
=2 + = 3.
8 8 0 8

Thus cov(X,Y ) = E(XY ) − E(X)E(Y ) = 38 − 58 · 85 = − 64


1
.
(d) E(X +Y ) = E(X) + E(Y ) = 85 + 85 = 45 .
V (X +Y ) = V (X) +V (Y ) + 2 cov(X,Y ) = 73
960
73
+ 960 + 2 · −1
64 =
29
240 .

3. Let X ∼ Bin(20, 0.3) be the number of pipework failures caused by operator error out of 20
pipework failures. We can use a calculator,

• Radiant — https://vnijs.shinyapps.io/radiant/; or
• Snippets — https://rdrr.io/snippets/

to obtain the required probabilities.

(a) P(X ≥ 10) = 1 − P(X ≤ 9) = 1 − 0.9520 = 0.0480.


R command: 1 - pbinom(9,20,0.3)
(b) P(X ≤ 4) = 0.2375.
R command: pbinom(4,20,0.3)
(c) P(X = 5) = 0.1789.
R command: dbinom(5,20,0.3)

3
4. Let X ∼ Bin(10000, 0.001) be the number of forms with error amongst the 10,000. As n is large
and p is small, we can use the Poisson approximation to get X ≈ Poisson(λ = np = 10).

(a) P(6 ≤ X ≤ 8) = P(X ≤ 8) − P(X ≤ 5) = 0.2657.


R command: ppois(8,10) - ppois(5,10)
(b) E(X) = np = 10, V (X) = npq = 9.99.

5. Let X be the number of children born until they have two sons. Then X ∼ NB(k = 2, p = 0.5).

(a) P(X = 7) = 7−1


 2 7−2
2−1 p (1 − p) = 0.0469.
R command: dnbinom(7-2, 2, 0.5)
(b) E(X) = k/p = 2/0.5 = 4.

You might also like