0% found this document useful (0 votes)
71 views11 pages

Stats 2 Week1-2 Mock

Stats 2 Week1-2 Mock IIT NADRAS BS DEGREE IN DATA SCIENCE

Uploaded by

Adi
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
71 views11 pages

Stats 2 Week1-2 Mock

Stats 2 Week1-2 Mock IIT NADRAS BS DEGREE IN DATA SCIENCE

Uploaded by

Adi
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 11

Statistics for Data Science - II

Mock weeks 1-2


Sept 2022 term

1. The joint probability mass function of two discrete random variables X and Y is given
by

X
1 2 3
Y

1 0.1 0.2 0.1

2 0.2 0.3 0.1

(i) Find the distribution of S = X + Y . [2 marks]

s 2 3 4 5
(a)
P (X + Y = s) 0.1 0.3 0.5 0.1
s 2 3 4 5
(b)
P (X + Y = s) 0.1 0.4 0.4 0.1
s 1 2 3 4 5
(c)
P (X + Y = s) 0.1 0.2 0.1 0.5 0.1
s 1 2 3 4 5
(d)
P (X + Y = s) 0.1 0.2 0.1 0.4 0.2

(ii) Find the distribution of Z1 = max(X, Y ). [2 marks]

z1 1 2 3
(a)
P (max(X, Y ) = z1 ) 0.1 0.4 0.5
z1 1 2 3
(b)
P (max(X, Y ) = z1 ) 0.3 0.4 0.3
z1 1 2 3
(c)
P (max(X, Y ) = z1 ) 0.1 0.7 0.2
z1 1 2 3
(d)
P (max(X, Y ) = z1 ) 0.4 0.4 0.2

(iii) Find the distribution of Z2 = min(X, Y ). [2 marks]

z2 1 2
(a)
P (min(X, Y ) = z2 ) 0.6 0.4
z2 1 2
(b)
P (min(X, Y ) = z2 ) 0.4 0.6
z2 1 2
(c)
P (min(X, Y ) = z2 ) 0.9 0.1
z2 1 2 3
(d)
P (min(X, Y ) = z2 ) 0.3 0.5 0.2

Solution:
We will use the table method to compute the distribution of max(X, Y ), min(X, Y )
and X + Y .

X Y fXY (x, y) max(X, Y ) min(X, Y ) X +Y


1 1 0.1 1 1 2
1 2 0.2 2 1 3
2 1 0.2 2 1 3
2 2 0.3 2 2 4
3 1 0.1 3 1 4
3 2 0.1 3 2 5

(i) Range of X + Y = {2, 3, 4, 5}

P (X +Y = 2) = fXY (1, 1) = 0.1


P (X +Y = 3) = fXY (1, 2) + fXY (2, 1) = 0.2 + 0.2 = 0.4
P (X +Y = 4) = fXY (2, 2) + fXY (3, 1) = 0.3 + 0.1 = 0.4
P (X +Y = 5) = fXY (3, 2) = 0.1

Therefore the distribution of X + Y is

s 2 3 4 5
P (X + Y = s) 0.1 0.4 0.4 0.1

(ii) Range of max(X, Y ) = {1, 2, 3}

P (max(X, Y ) = 1) = fXY (1, 1) = 0.1


P (max(X, Y ) = 2) = fXY (1, 2) + fXY (2, 1) + fXY (2, 2) = 0.2 + 0.2 + 0.3 = 0.7
P (max(X, Y ) = 3) = fXY (3, 1) + fXY (3, 2) = 0.1 + 0.1 = 0.2

Therefore the distribution of max(X, Y ) is

z1 1 2 3
P (max(X, Y ) = z1 ) 0.1 0.7 0.2

Page 2
(iii) Range of min(X, Y ) = {1, 2}

P (min(X, Y ) = 1) = fXY (1, 1) + fXY (1, 2) + fXY (2, 1) + fXY (3, 1) = 0.1 + 0.2 +
0.2 + 0.1 = 0.6
P (min(X, Y ) = 2) = fXY (2, 2) + fXY (3, 2) = 0.3 + 0.1 = 0.4

Therefore the distribution of min(X, Y ) is

z2 1 2
P (min(X, Y ) = z2 ) 0.6 0.4

2. Consider two random variables X and Y with Joint PMF given in Table 1.1.

X 0 1 2
Y
0 1 1 1
12 8 24
1 1 3 1
4 8 8

Table 1.1: Joint PMF of X and Y

(i) Which of the following options are true? [3 marks]


(a) X and Y are independent random variables.
(b) X and Y are dependent random variables.
5
(c) P (X ≤ 1) =
6
1
(d) P (Y = 1|X = 2) =
4
1
(ii) Find the value of . [2 marks]
P (X ≤ 1, Y = 0) + P (X = 2, Y = 1)

Solution:

(i) • We can see from the table that fXY (x, y) = fX (x)fY (y) for all (x, y). There-
fore X and Y are independent.

Page 3

P (X ≤ 1) =P (X = 0) + P (X = 1)
   
1 1 1 3
= + + +
12 4 8 8
4 4 5
= + =
12 8 6

fXY (2, 1)
P (Y = 1 | X = 2) =
fX (2)
1/8 3
= =
4/24 4

Therefore, option (a) and (c) are correct.


(ii)

P (X ≤ 1, Y = 0) + P (X = 2, Y = 1) =fXY (0, 0) + fXY (1, 0) + fXY (2, 1)


1 1 1 8
= + + =
12 8 8 24
1 1
Therefore, = = 3.
P (X ≤ 1, Y = 0) + P (X = 2, Y = 1) 1/3

3. In a book store, there are two types of books (Type 1 and Type 2). Let X denote the
number of books of Type 1 that is sold in a week. Let Y denote the number of books of
Type 2 that is sold in a week. Suppose X and Y follows the Poisson distribution with
parameters 2 and 3, respectively. Let Z denote the total number of books of Type 1
and Type 2 sold in a week. Assume that X and Y are independent.

(i) Which of the following options are true? [2 marks]


 
2
(a) (Y |Z = 5) ∼ Binomial 5, .
5
 
2
(b) (X|Z = 5) ∼ Binomial 5, .
5
 
3
(c) (X|Z = 5) ∼ Binomial 5, .
5
 
3
(d) (Y |Z = 5) ∼ Binomial 5, .
5
(ii) Find the value of P (X = 1|Z = 5). Enter the answer correct to two decimal
places. [3 marks]

Page 4
Solution:
Z represent the total number of books of Type I and Type II sold in a week.

If X denote the number of books of Type I that is sold in a week, then (X | Z) ∼


Binomial(5, 2/5).

If Y denote the number of books of Type II that is sold in a week, then (Y | Z) ∼


Binomial(5, 3/5).
Since (X | Z = 5) ∼ Binomial(5, 2/5), we have
 
5
P (X = 1 | Z = 5) = (2/5)1 (3/5)4
1
 4
2 3
=5 × ×
5 5
=0.2592

4. Two chess games are played between Anand and Kasparov. The probability that
Anand wins the first game against Kasparov is 0.6, the probability that Anand wins
the second game given that he won the first is 0.8 and the probability that Anand wins
the second game given that he lost the first is 0.5. No game is drawn. Let X1 , X2 be
two random variables defined as
(
1 if Anand wins the i-th game
Xi =
0 if Kasparov wins the i-th game

for i ∈ {1, 2}.

(i) Find the joint PMF of X1 and X2 . [3 marks]


X1 0 1
X2
1 1
(a) 0 5 5

3 12
1 25 25

X1 0 1
X2
1 12
(b) 0 5 25

1 3
1 5 25

Page 5
X1 0 1
X2
1 3
(c) 0 5 25

1 12
1 5 25

X1 0 1
X2
1 1
(d) 0 5 5

12 3
1 25 25

Answer: (c)
Solution:
Let X1 = 0 represents Anand loses first game against Kasparov and X1 = 1
represents Anand wins first game against Kasparov.
Similarly, X2 = 0 represents Anand loses second game against Kasparov and
X2 = 1 represents Anand wins second game against Kasparov.

Given, P (X1 = 1) = 0.6, P (X2 = 1|X1 = 1) = 0.8 and P (X2 = 1|X1 = 0) = 0.5.
Now,
P (X1 = 0) = 1 − P (X1 = 1)
= 1 − 0.6 = 0.4
Also,
P (X2 = 1, X1 = 1)
P (X2 = 1|X1 = 1) =
P (X1 = 1)
P (X2 = 1, X1 = 1)
0.8 =
0.6
P (X2 = 1, X1 = 1) = 0.8 × 0.6
12
P (X2 = 1, X1 = 1) = 0.48 =
25
The event X2 = 0|X1 = 1 is the complement of the event X2 = 1|X1 = 1.
Hence, P (X2 = 0|X1 = 1) = 1 − P (X2 = 1|X1 = 1) = 1 − 0.8 = 0.2.
Now,
P (X2 = 0, X1 = 1)
P (X2 = 0|X1 = 1) =
P (X1 = 1)
P (X2 = 0, X1 = 1)
0.2 =
0.6
P (X2 = 0, X1 = 1) = 0.2 × 0.6
3
P (X2 = 0, X1 = 1) = 0.12 =
25

Page 6
Similarly,
P (X2 = 1, X1 = 0)
P (X2 = 1|X1 = 0) =
P (X1 = 0)
P (X2 = 1, X1 = 0)
0.5 =
0.4
P (X2 = 1, X1 = 0) = 0.5 × 0.4
1
P (X2 = 1, X1 = 1) = 0.20 =
5
We can find the P (X2 = 0|X1 = 0) from the complement of event X2 = 1|X1 = 0
or from the properties of joint PMF that the sum of all joint probabilities will be
equal to 1.
1
Therefore, the P (X2 = 0|X1 = 0) = .
5
The above calculated joint probabilities are tabulated as follows:

X1 0 1
X2
1 3
0 5 25

1 12
1 5 25

Hence, option c is the correct option.


(ii) Find the probability that Kasparov loses the second game. Enter the answer
correct to two decimal places. [2 marks]
Answer: 0.68
Solution:
We have to find the Probability that Kasparov loses the second game that means
Anand wins the second game which is P (X2 = 1).
The marginal probability that X2 = 1 is,

P (X2 = 1) = P (X2 = 1, X1 = 0) + P (X2 = 1, X1 = 0 = 1)


1 12
= +
5 25
17
= = 0.68
25
5. Suppose that the number of customers visiting a KFC on a particular day is N ∼
Poisson(5). Assume that each customer purchases a Classic Chicken Zingers with
probability 0.3, independent of other customers and independent of the value of N .
Let X denote the number of customers who purchase a Classic Chicken Zingers in a
day. Let Y denote the number of customers who do not purchase a Classic Chicken
Zingers.

Page 7
(i) Find the marginal distributions of X and Y . [3 marks]
(a) X ∼ Bernoulli(0.3) and Y ∼ Bernoulli(0.7)
(b) X ∼ Poisson(0.3) and Y ∼ Poisson(0.7)
(c) X ∼ Poisson(1.5) and Y ∼ Poisson(3.5)
(d) X ∼ Poisson(1.5) and Y ∼ Poisson(1.5)
solution:
Given, the number of customers visiting a KFC on a particular day is, N ∼
Poisson(5).
Given, the probability that a customer purchases a Classic Chicken Zingers is 0.3
which means the probability that a customer does not purchase a Classic Chicken
Zingers is 0.7. (Note that it is a Bernoulli trial).
Therefore, P (X = x|N = n) ∼ Binomial(N, 0.3) and P (Y = y|N = n) ∼
Binomial(N, 0.7).
Now, the marginal distribution of X is,
X ∼ Poisson(5 × 0.3)
X ∼ Poisson(1.5)

Similarly, the marginal distribution of Y is,


Y ∼ Poisson(5 × 0.7)
Y ∼ Poisson(3.5)
Hence, option c is the correct.
(ii) Find P (X = 3, Y = 3). (Enter the answer correct to three decimal places) [3
marks]
Answer: 0.027, [0.023, 0.031]
Solution:
We know from previous question, X ∼ Poisson(1.5) and Y ∼ Poisson(3.5).
Since X and Y are independent of each other,

e−1.5 1.53 e−3.5 3.53


P (X = 3, Y = 3) = P (X)P (Y ) = × = 0.027
3! 3!
 
2
6. Suppose X1 , X2 , . . . , X10 are 10 i.i.d. Bernoulli samples. Let Y be a random
3
variable defined as Y = X1 + X2 + · · · + X10 .

(i) Which of the following options are true? [2 marks]


 
1
(a) Y ∼ Binomial 10, .
3
 
2
(b) Y ∼ Binomial 10, .
3
 
1
(c) Y ∼ Geometric .
3

Page 8
 
2
(d) Y ∼ Geometric .
3
(e) Range of Y is {0, 1, 2, . . . , 10}
(f) Range of Y is {1, 2, 3, . . . }.
Solution:
Since X1 , X2 , · · · , X10 are i.i.d Bernoulli trials, Y = X1 +X2 +· · ·+X10 is number
of successes in 10 trials, which implies Y is a binomial distribution with n = 10
2
and p = .
3
The range of binomial distribution is {0, 1, · · · , ..n} so the range of Y is {0, 1, 2, · · · , 10}.

(ii) Find the value of P (X1 = 0 | Y = 8). Enter the answer correct to one decimal
place. [3 marks]
Answer: 0.2

Solution:

P (X1 = 0 and Y = 8)
P (X1 = 0|Y = 8) =
P (Y = 8)

P (X1 = 0 and Y = 8) means that first trail failed and 8 among the remaining 9 trials
are success.
 
1 9 2 81
P (X1 = 0 and Y = 8) = ( )
3 8 3 3
 
10 2 8 1 2
P (Y = 8) = ( )( )
8 3 3

1 9 2 8 1
8
( )
⇒ P (X1 = 0|Y = 8) = 3 3 3
10
 2 1
8
( )8 ( )2
3 3
9!
= 8! = 0.2
10!
8! × 2!
 
1
7. Suppose X1 , X2 are two i.i.d. Binomial 10, samples. Let Y, Z be two random
3
variables defined as Y = X1 + X2 and Z = X1 X2 respectively. Which of the following
options are true? [4 marks]

Page 9
 
1
(a) Y ∼ Binomial 20,
3
 
1
(b) Y ∼ Binomial 10,
3
15! × 10!
(c) fZ|Y =15 (50) =
20! × 5!
15! × 10!
(d) fZ|Y =15 (50) = 2 ×
20! × 5!
Solution:
1
Given X1 and X2 are two i.i.d Binomial (10, ) samples, which means that each are
3
Bernoulli experiments with ten trials.
1
Y = X1 + X2 is similar to having to 20 Bernoulli trials with p = .
3
Given Z = X1 X2 , if X1 + X2 = 15, then the only way Z = 50 will happen is if
X1 = 5, X2 = 10 or X1 = 10, X2 = 5

2 × P (X1 = 5 and X2 )
fZ|Y =15 (50) =
P (Y = 15)
 1 5 2 5 10 1 10
2 × 105
( ) ( ) 10 ( )
= 3 3 3
20 1 15 2 5

15
( ) ( )
10
 3 3
2× 5
= 20

15
2 × 10! × 15!
=
20! × 5!

8. A 2-digit number from 00 to 99 is selected at random. Let X be the digit in units


place and Y be the digit in tens place. A new random variable Z is defined as

Z = max(X, Y ) − min(X, Y )

Find the value of P (Z ≥ 2). Enter the answer correct to two decimal places. [4
marks]

Solution:
Given, the random variable
X represents the units place of a two digit number,
Y represents the tens place of a two digit number.

Page 10
Now, Z = max(X, Y ) − min(X, Y ).
Observe that, max(X, Y ) − min(X, Y ) is equivalent to | X − Y |.
P (Z ≥ 2) = 1 − P (Z = 1) − P (Z = 0)
Z = 0 occurs when X = Y so, X can take 0, 1, 2, · · · , 10
10
P (Z = 0) =
100
Z = 1 occurs X − Y = 1 or Y − X = 1
Let us consider X − Y = 1, this can occur if (X, Y ) = (1, 0), (2, 1), · · · , (8, 7), (9, 8).
So, X − Y = 1 occurs in 9 cases. Same cases for Y − X = 1 scenario.
9∗2
⇒ P (Z = 1) =
100
⇒ P (Z ≥ 2) = 1 − 0.1 − 0.18 = 0.72.

Page 11

You might also like