MST470S Fisa 2022 09 April Memo Marked

You might also like

Download as pdf or txt
Download as pdf or txt
You are on page 1of 10

TOTAL 100 MARKS

MST470S MEMO FISA


QUESTION 1 [15 marks]

Let X be a random variable having the following probability mass function (p.m.f ).

 cx2 for x = 0, 1, 2, 3, 4
60
fX (x) =
0 otherwise
i) [3 marks] Determine the value of c.

Answer: The total probability adds up to 1. Thus we have


h i h i
1 4 9 16 30
c 0+ 30
+ 60
+ 60
+ 60
= 1 which implies that c 60
leading to c = 2.

ii) [8 marks] Find the cumulative distribution of X.

Answer:
P
FX (x) = t≤x fX (t)

We can see that FX (x) = 0 for x ≤ 0 and FX (x) = 1 for x > 4. Otherwise,

x x
x
" #
X 1 X X t2
x(x + 1)(2x + 1) [x(x + 1)(2x + 1)]
FX (x) = fX (t) = = =
t=1 t=1 30 30 t=1 6 180
We now have

0

 if x ≤ 0
[x(x+1)(2x+1)]
FX (x) =  180
if 1 ≤ x ≤ 4


1 otherwise

iii) [4 marks] Derive the probability mass function of Y = X.

Answer:

X = Y2
gY (y) = fX (y 2 )
((y 2 )2
=
30
Thus,
 4 √ √
y for y = 0, 1, 2, 3, 2.
30
gY (y) ==
0 otherwise

1
QUESTION 2 [37 marks]

Suppose that the random variables X and Y have a joint density function given by

c(2x + y) if 2 < x < 6, 0 < y < 5
fX,Y (x, y) = 
0 otherwise
i) [4 marks] Find The value of the constant c.

Answer: The total probability is given by

" #5
Z 6 Z 5 Z 6 y2
c(2x + y)dydx = c 2xy + dx
x=2 y=0 x=2 2 0
Z 6
25
 
= c 10x + dx
x=2 2
25 6
 
2
= c 5x + x
2 2
= c [180 + 75 − 20 − 25]
= c [160 + 50]

Since the total probability is equal to 1. Thus, c = 1/210.

ii)[5 marks] Determine P (X + Y > 4) and show a sketch of the required probability.

Answer:
ZZ
P (X + Y > 4) = f (x, y)dxdy
R

where R is the shaded region in the figure below. Note that is convenient to write
ZZ
P (X + Y > 4) = 1 − P (X + Y ≤ 4) = 1 − f (x, y)dxdy
R0

where R0 is the cross-hatched region of figure below.

2
We now have:

1 Z 4 Z 4−x
P (X + Y ≤ 4) = (2x + y)dydx
210 x=2 y=0
1 Z4 y2
= [2xy + ]4−x dx
210 x=2 2 0
1 Z4 (4 − x)2
= [2x(4 − x) + ]dx
210 x=2 2
1 Z 4
1
= [8x − 2x2 + (16 − 8x + x2 )]dx
210 x=2 2
1 2 x3
= [4x2 − x3 + 8x − 2x2 + ]42
210 3 6
1 2 1 3 4
= [2x − x + 8x]2
210 2
1 12 2
= [(32 − 32 + 32) − (8 − 4 + 16)] = =
210 210 35
Thus,
33
P (X + Y > 4) = .
35
iii) [5 marks] Find E(X).

Answer:

3
1 Z6 Z5 1 Z6 Z5
E(X) = x(2x + y)dydx = (2x2 + xy)dydx
210 x=2 y=0 210 x=2 y=0
1 Z6 1 2 5
 
2
= 2x y + xy dx
210 x=2 2 0
1 Z6 25
= (10x2 + x)dx
210 x=2 2
1 10 3 25 2 6
 
= x + x
210 3 4 2
!
1 8(10)
= 720 + 225 − − 25
210 3
1 2680
 
=
210 3
268
= = 4.2540
63
iv) [5 marks] Find E(Y ).

Answer:

1 Z6 Z5 1 Z6 Z5
E(Y ) = y(2x + y)dydx = (2xy + y 2 )dydx
210 x=2 y=0 210 x=2 y=0
1 Z6 1 5
 
= xy 2 + y 3 dx
210 x=2 3 0
1 Z 6
125
= (25x + )dx
210 x=2 3
6
1 25 2 125

= x + x
210 2 3 2
1 250
 
= 450 + 250 − 50 −
210  3
1 1700

=
210 3
170
= = 2.6984
63

v) [8 marks] Determine the covariance of X and Y and comment on the relationship be-
tween them.

Answer:

4
1 Z6 Z5 1 Z6 Z5
E(XY ) = xy(2x + y)dydx = (2x2 y + xy 2 )dydx
210 x=2 y=0 210 x=2 y=0
1 Z6 1 3 5
 
2 2
= x y + xy dx
210 x=2 3 0
1 Z6 125
= (25x2 + x)dx
210 x=2 3
1 25 3 125 2 6
 
= x + x
210 3 6 2
1 200 250
 
= 1800 + 750 − −
210  3 3
1 7200

=
210 3
240 80
= = = 11.4287
21 7

Cov(XY ) = 11.4287 − (4.2540)(2.6984) = −0.0503.


There exists a negative correlation between X and Y .

vi) [5 marks] Derive the marginal probability density function of X.

Answer:

1 Z5
gX (x) = (2x + y)dy
210 0
" #5
1 y2
= 2xy +
210 2 0
1 25
 
= 10x +
210 2
(4x + 5)
=
84
Thus,

 (4x+5) if 2 < x < 6.
84
gX (x) =
0 otherwise
vii) [5 marks] Derive the conditional probability density function of Y given that X = 1.

5
Answer:

fX,Y (1, y)
νY |X (y|1) =
gX (1)
(2+y)
210
= 9
84

Thus,

(2+y)
 210 if 0 < y < 5.

9
νY |X (y|1) = 84
0

otherwise
QUESTION 3 [14 marks]

i) [8] (a) Let RX (t) = ln MX (t), show from the definition of moment generating function
0 00
that RX (0) = µ and RX (0) = σ 2 . (b) Find the mean and the variance of a random variable
X having the moment-generating function
1 t
MX (t) = e 2 (e −1) .
Answer:
a) By definition of MGF, we have that: MX0 (0) = µ, MX00 (0) = σ 2 + µ2 and MX (0) = 1.
Proof.

0 MX0 (t)
RX (t) =
MX (t) 1/2

0 MX0 (0)
RX (0) =
MX (0)
0 µ
RX (0) = = µ 1/2
1

00 MX00 (t)MX (t) − MX0 (t)MX0 (t) 1/2


RX (t) =
(MX (t))2
00 MX00 (0)MX (0) − MX0 (0)MX0 (0)
RX (0) =
(MX (0))2
00 (σ 2 + µ2 )1 − µ × µ
RX (0) =
12
00
RX (0) = σ 2 1/2

6
1 t
b) Now, we find the mean and variance of MX (t) = e 2 (e −1) as follows:
Mean µ

1 t 1 (et −1)
MX0 (t) = e e2
2
1 0 1 (e0 −1)
MX0 (0) = e e2
2
1
MX0 (0) = µ =
2
Variance σ 2

1 t 1 (et −1) 1 t 1 t 1 (et −1)


MX00 (t) = e e2 + e e e2
2 2 2
1 1 0 1 1 1 0
MX00 (0) = e0 e 2 (e −1) + e0 e0 e 2 (e −1)
2 2 2
1 1
MX00 (0) = +
2 4
Note that since MX00 (0) = σ 2 + µ2 and µ = 12 , we deduce that

1 1
σ 2 + µ2 = +
2 4
 2
1 1 1 1
σ2 = + − = .
2 4 2 2
ii) [6 marks] If X ∼ a discrete uniform(k), show that the mean and variance of X are
2
respectively (k+1)
2
and (k 12−1) .

Answer:

X
E(X) = xfX (x; k)
x∈ω
k
" #
1X 1 k(k + 1) k+1
= x= =
k x=1 k 2 2
E(X 2 ) = x2 fX (x; k)
X

x∈ω
" #
X 1 k(k + 1)(2k + 1)
2
= x =
x∈ω k 6

7
" # !2
2 2 (k + 1)(2k + 1) k+1
Var(X) = E(X ) − (E(X)) = −
6 2
" # " #
2k + 1 k + 1 4(2k + 1) − 6(k + 1)
= (x + 1) − = (x + 1)
6 4 24
" #
8k + 4 − 6k − 6
= (k + 1)
24
" #
2k − 2 (k − 1) k2 − 1
= (k + 1) = (k + 1) = .
24 12 12

QUESTION 4 [11 marks]

i) [5 marks] In a certain town city, 20% of individuals prefer vaccine candidate A, 35%
for vaccine candidate B, and the remaining have no preference. You randomly sample 20
eligible for vaccination. What is the probability that 5 will prefer vaccine candidate A, 7
will prefer vaccine candidate B, and the remaining will have no preference?

Answer: Let Xa be the number of individuals for candidate A in the n sample and Xb be
the number of individuals for candidate B.

Then (Xa , Xb ) ∼Multinomial (n, 0.20, 0.35). Thus,


20!
P r(Xa = 5 ∩ Xb = 7) = (0.20)5 (0.35)7 (0.45)8 = 0.03454.
5!7!8!
ii) [6 marks] An empirical observation of a random variable having a binomial distribution
is used to test the null hypothesis p = 0.45 against the alternative hypothesis ρ < 0.45.
Let X be the number of successes in a random sample of size 12. The researchers decide
to reject the null hypothesis if X ≤ 2. Determine the type I error probability of this test.

Answer:

α = P (X ≤ 2|p = 0.45)
2
!
12
(0.45)k (0.55)12−k
X
=
k=0 k
! ! !
12 12 12
= (0.45)0 (0.55)12 + (0.45)1 (0.55)12−1 + (0.45)2 (0.55)12−2
0 1 2
= 0.04214

8
QUESTION 5 [12 marks]

If X1 , X2, ..., Xn are a random sample from a geometrically distributed population with
parameter p, find an estimator for p using
i) [5 marks] The method of moments.

Answer:
We have µ01 = E(Xi ) = p1 . Thus,

1
m01 = x̄ =
p
1
p =

Thus our estimator is p̂ = x̄1 .

ii) [7 marks] The method of maximum likelihood

Answer:

L(p) = Πni=1 fxi (xi ; p) = Πni=1 pk (1 − p)xi −1


Pn
= pn (1 − p) i=1 (xi −n) = pn (1 − p)nx̄−n
log L(p) = n log p + n(x̄ − n)log(1 − p)
d log L(p) n n(1 − x̄)
= + =0
dp p 1−p
n(1 − p) + np(1 − x̄)
= 0
p(1 − p)
n − np + np − npx̄
= 0
p(1 − p)
1 − px̄ = 0 provided that p 6= 0 and p 6= 1
1
p =

Thus the method of maximum likelihood yields the same estimate as the method of mo-
ments .in this case. Exercise.

QUESTION 6 [11 marks]

If X is a continuous
 random variable having the probability density function
2xe−x2 for x > 0
fX (x) =
0 otherwise

9
[4 marks] i) Verify the requirements of probability density function.

Answer:
R∞
It is clear that fX (x) ≥ 0 for x > 0. We need to check also that −∞ fX (x) = 1. It follows
thatR
∞ −x2
= 0∞ eu du if we let u = x2 , then du = 2xdx.
R
0 2xe

R∞
We have 0 e−u du = [−e−u ]∞
0 = [−e
−∞
+ e0 ] = [0 + 1] = 1.

[4 marks] ii) Apply the cumulative distribution technique to find the probability distribu-
tion of Y = X 2 .

Answer:

GY (y) = P (Y ≤ y)
= P (X 2 ≤ y)

= P (X ≤ y)

Z y 2
= 2xe−x dx
0

Integration by substitution follows that: u = x2 , du = 2xdx as in i) which also implies


squaring the bounds of integration.

Z y
GY (y) = e−u du
0
= [−e−u ]y0
= 1 − e−y

We have gY (y) = dGdy


Y (y)
= e−y .
Thus,
e−y for y > 0 1/2

gY (y) =
0 otherwise 1/2

10

You might also like