W6PS

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

Statistics for data science - II

Week 6 practice assignment solutions

1.
4. The joint density function of two continuous random variables X and Y is given as

kxy 0 < x < 4, 0 < y < 1
fXY (x, y) =
0 otherwise

Find the value of k. Enter your answer correct to two decimals accuracy.
Solution: �∞ �∞
We know that for joint PDF, −∞ −∞ fXY (x, y)dxdy = 1
Since fXY (x, y) is nonzero in the region 0 < x < 4, 0 < y < 1.
� 1� 4
⇒ fXY (x, y)dxdy = 1
0 0
� 1� 4
⇒ kxy dxdy = 1
0 0
� 1
y 2 ��4
⇒ kx � dx = 1
0 2 0
� 1
⇒ 8kxdx = 1
0
x2 ��1
⇒ 8k � = 1
2 0
1
⇒ k = = 0.25
4

2.
5. Let (X, Y ) ∼ Uniform(D), where D = {(x, y) : x + y < 4, x > 0, y > 0}. Find the value
of P (2X + Y > 2).
1
a) 8
7
b) 8
3
c) 4
1
d) 4

Solution:

(X, Y ) ∼ Uniform(D), therefore



1
8
(x, y) ∈ D
fXY (x, y) =
0 otherwise

1
1
Area of the lower shaded region (A) will be 2
×1×2=1

P (2X + Y > 2) = 1 − P (2X + Y ≤ 2)


|A|
=1−
|D|
1
=1−
8
7
=
8

3.
6. The joint density function of the random variables X and Y is given by

x + y 0 < x < 1, 0 < y < 1
fXY (x, y) =
0 otherwise

Find the value of P (X + Y < 1).


1
a) 3
2
b) 3
1
c) 6
3
d) 4

Solution:

2
� 1 � 1−y
P (X + Y < 1) = (x + y)dxdy
0 0
� 1� 2 ��
x �1−y
= + xy � dy
0 2 0
� 1� �
(1 − y)2
= + (1 − y)y dy
0 2
� �� 1
(1 − y)3 y 2 y 3 ��
= − + − �
6 2 3 �
0
� � � �
1 1 1
= − − −
2 3 6
1
=
3
4.
7. The joint PDF of two continuous random variables X and Y is given by

2
(5x + 2y) 0 ≤ x ≤ 1, 0 ≤ y ≤ 1
fXY (x, y) = 7
0 otherwise
Find the marginal PDF of X.
a) �
2x 0 ≤ x ≤ 1
fX (x) =
0 otherwise
b) �
2
7
(5x + 1) 0 ≤ x ≤ 1
fX (x) =
0 otherwise
c) �
2
7
(3x + 2) 0 ≤ x ≤ 1
fX (x) =
0 otherwise

3
d) �
2
7
(5y + 1) 0 ≤ x ≤ 1
fX (x) =
0 otherwise

Solution:
For 0 ≤ x ≤ 1
� 1
2
fX (x) = (5x + 2y)dy
0 7
� �� 1
2 2y 2 ��
= 5xy + �
7 2 �
0
2
= (5x + 1)
7

5.
8. Let X and Y be jointly continuous random variables with joint PDF

k(2 − y) 0 < x < 4, 0 < y < 1
fXY (x, y) =
0 otherwise

Find the marginal PDF of Y.

a) �
3
2
y(2 − y) 0 < y < 1
fY (y) =
0 otherwise

b) �
2y 0<y<1
fY (y) =
0 otherwise

c) �
3
2
(1 − y2) 0 < y < 1
fY (y) =
0 otherwise

d) �
2
3
(2 − y) 0 < y < 1
fY (y) =
0 otherwise

Solution: �∞ �∞
We know that for joint PDF, −∞ −∞ fXY (x, y)dxdy = 1

4
Since fXY (x, y) is nonzero in the region 0 < x < 4, 0 < y < 1.
� 1� 4
⇒ fXY (x, y)dxdy = 1
0 0
� 1� 4
⇒ k(2 − y)dxdy = 1
0 0
� 1 �4

⇒ k(2 − y)x� dy = 1
0 0
� 1
⇒ 4k(2 − y)dy = 1
0
� �� 1
y 2 ��
⇒ 4k 2y − � =1
2 �
0
3
⇒ 4k × = 1
2
1
⇒k=
6
For 0 < y < 1
� 4
1
fY (y) = (2 − y)dx
0 6
1 �4

= (2 − y)x�
6 0
2
= (2 − y)
3

6.
9. Let X and Y be two independent continuous random variables with PDFs fX (x) and
fY (y) given as

1 0≤x<1
fX (x) =
0 otherwise

y/2 0 ≤ y < 2
fY (y) =
0 otherwise
Find the value of P (2X + Y > 1).
1
a) 24
11
b) 12
1
c) 12
23
d) 24

5
Solution:
Given that X and Y be two independent continuous random variables,
therefore fXY (x, y) = fX (x)fY (y).

y/2 0 ≤ x < 1, 0 ≤ y < 2
fXY (x, y) =
0 otherwise
We have to find the value of P (2X + Y > 1).
And
P (2X + Y > 1) = 1 − P (2X + Y ≤ 1)
� 1 � 1−y
2 y
P (2X + Y ≤ 1) = dxdy
2
�0 1 0
y �� 2
1−y

= x� dy
2 0
�0 1
1
= y(1 − y)dy
0 4
� �� 1
1 y 2 y 3 ��
= − �
4 2 3 �
0
1
=
24
1 23
⇒ P (2X + Y > 1) = 1 − 24
= 24

7 The joint density function of two random variables X and Y is given by


10.

8xy 0 ≤ x ≤ 1, 0 ≤ y ≤ x
fXY (x, y) =
0 otherwise

Are X and Y independent?

6
a) Yes
b) No

Solution:

� x
fX (x) = 8xy dy
0
�x
y 2 ��
= 8x �
2�
0
3
= 4x

� 1
fY (y) = 8xy dx
0
�1
x2 ��
= 8y �
2�
0
= 4y

fX (x)fY (y) = 4x3 × 4y = 16x3 y �= fXY (x, y).


Hence X and Y are not independent.

8 Let (X, Y ) ∼ Uniform(D), where D = [3, 5] × [2, 4]. Are X and Y independent?
11.

a) Yes
b) No

Solution:
(X, Y ) ∼ Uniform(D), therefore

7

1
4
3 ≤ x ≤ 5, 2 ≤ y ≤ 4
fXY (x, y) =
0 otherwise

� 4
1
fX (x) = dy
2 4
�4
1 ��
= y�
4 �
2
1
=
2

� 5
1
fY (y) = dx
3 4
�5
1 ��
= x�
4 �
3
1
=
2
fX (x)fY (y) = 12 × 12 = 14 = fXY (x, y).
Hence X and Y are independent.

9 The joint PDF of two random variables X and Y is given by


12.

4xy 0 < x < 1, 0 < y < 1
fXY (x, y) =
0 otherwise

Find the distribution of X | Y = 0.5. (fX|Y =0.5 (x))

a) �
2x 0 < x < 1
fX|Y =0.5 (x) =
0 otherwise

b) �
3x2 0<x<1
fX|Y =0.5 (x) =
0 otherwise

c) �
4x3 0<x<1
fX|Y =0.5 (x) =
0 otherwise

10

8
d) �
1 0<x<1
fX|Y =0.5 (x) =
0 otherwise
Solution:
For 0 < y < 1
� 1
fY (y) = 4xy dx
0
�1
x2 ��
= 4y �
2�
0
= 2y
The distribution of X | Y = 0.5, (0 < x < 1) is given by

fXY (x, 0.5)


fX|Y =0.5 (x) =
fY (0.5)
4x × 0.5
=
2 × 0.5
= 2x

10.
13. The joint PDF of two random variables X and Y is given by

xy
x2 + 3
0 ≤ x ≤ 1, 0 ≤ y ≤ 2
fXY (x, y) =
0 otherwise

Find the value of P ( 14 < X < 1


2
| Y = 1).
83
a) 96
13
b) 96
13
c) 48
35
d) 48

Solution:
For 0 < y < 1
� �
1
xy �
fY (y) = x2 +dx
0 3
� 3 �� 1
x x2 y ��
= + �
3 6 �
0
1 1
= + y
3 6

11

9
fXY (x, 1)
fX|Y =1 (x) =
fY (1)
x + x×1
2
= 1 1 3
3
+ ×1
� 6 x�
= 2 x2 +
3

� � � 1/2 �
1 1 x�
P <X< |Y =1 = 2 x2 + dx
4 2 1/4 3
� 3 ��1/2
x x2 ��
=2 + �
3 6 �
1/4
�� � � ��
1 1 1 1
=2 + − +
24 24 192 96
� �
1 1
=2 −
12 64
13
=
96

12

10

You might also like