Week-1_GA_Solution_Jan25
Week-1_GA_Solution_Jan25
1. Three fair coins are tossed. If the first head occurs on the first toss, you score 1 point.
If the first head occurs on toss 2 or on toss 3, you score 2 or 3 points, respectively. If
no heads appear, you lose 1 point (that is score −1 point). Let X denote the number
of heads and Y denote the points scored. What is the probability that fewer than three
heads will occur and you will score 1 or less? Write your answer correct to two decimal
places.
Solution:
Given that X denotes the number of heads and Y denotes the point scored.
Clearly, TX = {0, 1, 2, 3} and TY = {−1, 1, 2, 3}.
To find: P (X < 3, Y ≤ 1).
Outcome X Y
HHH 3 1
HHT 2 1
HTH 2 1
THH 2 2
HTT 1 1
THT 1 2
TTH 1 3
TTT 0 −1
The outcomes HHT, HTH, HTT, TTT correspond to the event (X < 3, Y ≤ 1).
Therefore,
P (X < 3, Y ≤ 1) = P ({HHT, HTH, HTT, TTT})
4 1
= =
8 2
2. Contracts for two construction jobs are each assigned uniformly at random to one or
more of three firms, A, B, and C. Let X denote the number of contracts assigned to firm
A and Y the number of contracts assigned to firm B. Find the value of fX|Y =0 (2). Write
your answer correct to two decimal places.
Solution:
Given that X denotes the number of contracts assigned to firm A and Y denotes the
number of contracts assigned to firm B.
Since each job is randomly assigned to one or more of the three firms, probability of
1
assigning one job to any of the three firms is . (Notice that one firm can be assigned
3
either 0 or 1 or 2 jobs).
Clearly, TX = TY = {0, 1, 2} Therefore,
P (X = 2, Y = 0) = P (Both the jobs are assigned to firm A)
1 1 1
= . =
3 3 9
Similarly,
P (X = 1, Y = 0) = P (one job is assigned to firm A and no job is assigned to firm B)
= P (one job is assigned to firm A and other job is assigned to firm C)
1 1 2
=2 . =
3 3 9
and
P (X = 0, Y = 0) = P (Both the jobs are assigned to firm C)
1 1 1
= . =
3 3 9
Therefore,
P (Y = 0) = P (X = 0, Y = 0) + P (X = 1, Y = 0) + P (X = 2, Y = 0)
1 2 1
= + +
9 9 9
4
=
9
Now,
P (X = 2, Y = 0)
fX|Y =0 (2) =
P (Y = 0)
1/9
=4
/9
1
=
4
Page 2
3. Joint distribution of two random variables X and Y is given as:
X
0 1
Y
1 1
1
4 8
1
2 k
4
1
3 0
8
X
fXY (x, y) = 1
x∈TX ,y∈TY
1 1 1 1
⇒ + + +k+0+ =1
4 8 4 8
3 1
⇒k = 1 − =
4 4
Now,
fXY (1, 2)
fY |X=1 (2) =
fX (1)
fXY (1, 2)
=
fXY (1, 1) + fXY (1, 2) + fXY (1, 3)
1
4
= 1 1 1
8
+ + 4 8
1
4 1
= 1 =
2
2
4. Customers at a fast-food restaurant buy both sandwiches and drinks. The following
joint distribution summarizes the numbers of sandwiches (X) and drinks (Y ) purchased
by customers.
Page 3
X
1 2
Y
1 0.4 0.2
2 0.1 0.25
3 0 0.05
Find the probability that a customer will buy two sandwiches given that he has bought
three drinks.
Solution:
X denotes the number of sandwiches purchased by a customer and Y denotes the num-
ber of drinks purchased by a customer.
To find: fX|Y =3 (2)
Now,
fXY (2, 3)
fX|Y =3 (2) = =
fY (3)
fXY (2, 3)
=
fXY (1, 3) + fXY (2, 3)
0.05
=
0 + 0.05
=1
5. Akshat draws a card randomly from a well-shuffled pack of 52 cards. If the drawn card
is a face card, then he draws two balls randomly from bag A which contains k Red, k + 1
Black and 14 − 2k Green balls. If the drawn card is not a face card, then he draws three
balls randomly from bag B which contains t Red, t + 2 Black and 18 − 2t Green balls.
Let two random variables X and Y are defined as:
(
0 if the drawn card is a face card
X=
1 if the drawn card is not a face card
and Y be the number of Red balls drawn. Find the value of fY (1). Write your answer
correct up to two decimal places.
Parameters: k = 4, 5, 6
t = 6, 7, 8
Page 4
k(15 − k) t(20 − t)(19 − t)
Answer: +
455 2964
Solution:
Akshat draws a card randomly from a well-shuffled pack of 52 cards. Random variable
X is defined as (
0 if the drawn card is a face card
X=
1 if the drawn card is not a face card
If the drawn card is a face card, then he draws two balls randomly from bag A which
contains k Red, k + 1 Black and 14 − 2k Green balls. If the drawn card is not a face
card, then he draws three balls randomly from bag B which contains t Red, t + 2 Black
and 18 − 2t Green balls. Random variable Y is the number of Red balls drawn.
To find: fY (1)
We know that
fY (1) = fXY (0, 1) + fXY (1, 1)
= fY |X=0 (1).fX (0) + fY |X=1 (1).fX (1)
k
C1 15−k C1 12 t C1 20−t C2 40
= 15 C
. + 20 .
2 52 C3 52
k(15 − k) t(20 − t)(19 − t)
= +
455 2964
fXY (x, y) = fX (x).fY (y) is true only when X and Y are independent. Therefore, option
(d) need not to be always true.
Page 5
7. Two random variables X and Y are jointly distributed with joint pmf
fXY (x, y) = a(bx + y),
where x and y are integers in 0 ≤ x ≤ 2 and 0 ≤ y ≤ 3 such that P (X ≥ 1, Y ≤ 2) = 47 .
Find the value of fXY (x, y). [2 marks]
We know that
X
fXY (x, y) = 1
x∈TX ,y∈TY
⇒fXY (0, 0) + fXY (0, 1) + fXY (0, 2) + fXY (0, 3) + fXY (1, 0) + fXY (1, 1) + fXY (1, 2)
+ fXY (1, 3) + fXY (2, 0) + fXY (2, 1) + fXY (2, 2) + fXY (2, 3) = 1
Page 6
8. A fair coin is tossed 4 times. Let X be the total number of heads and Y be the number
of heads before the first tail (If there is no tail in all the four tosses, then Y = 4). What
is the value of fY |X=2 (0)? [2 marks]
5
(a)
16
1
(b)
8
9
(c)
16
1
(d)
2
Parameter: k = 4, 5, 6, 7, 8
k−2
Answer:
k
Solution:
A fair coin is tossed k times. X denotes the number of heads and Y denotes the number
of heads before first tail (If there is no tail in all the k tosses, then Y = k). Clearly,
X ∼ Binomial(k, 21 ).
Now,
fXY (2, 0)
fY |X=2 (0) =
fX (2)
fX|Y =0 (2).fY (0)
= ..(1)
fX (2)
Now, event Y = 0 shows that there is no head before first tail that is first outcome is
tail.
It implies that fY (0) = 21
And k
fX (2) = k C2 12
Putting the values in the equation (1), we get
Page 7
1 k
k−1
C2 2
fY |X=2 (0) =
1 k
kC
2 2
k−2
=
k
Parameter: k = 3, 4, 5, 6, 7, 8
2k
Answer:
9k − 12
Solution:
Given that X denotes the number of party A members in selected two member’s commit-
tee and Y denotes the number of party B members in selected two member’s committee.
fXY (1, 1) = P (X = 1, Y = 1)
3
C 1 .2 C 1
= 6
C2
3×2
=
15
= 0.4
10. A fair coin is tossed k times, and the number of heads, N , is counted. The coin is then
tossed N more times. Find the probability that heads will appear for a total of four
times in this process. Write your answer correct to two decimal places.
Parameter:k =4, 5, 6, 7, 8
1 k(k − 1) k(k − 1)(k − 2) k(k − 1)(k − 2)(k − 3)
Answer: k+2 + +
2 2 4 96
Solution:
Given that N denotes the number of heads in five tosses of a coin.
Clearly, N ∼ Binomial(k, 1/2).
Page 8
Let X denotes the number of heads in N tosses.
Then, X|(N = n) ∼ Binomial(n, 1/2)
It implies that
P (Total four heads will appear) = P (N = 2, X = 2) + P (N = 3, X = 1) + P (N = 4, X = 0)
= P (N = 2).P (X = 2|N = 2) + P (N = 3).P (X = 1|N = 3)
+ P (N = 4).P (X = 0|N = 4)
5 1 2 1 5 1 3 1 5 1 4 1
= C2 5 C2 2 + C3 5 C1 3 + C4 5 C0 4
2 2 2 2 2 2
10 30 5
= 7 + 8 + 9
2 2 2
1
= 7 [10 + 15 + 1.25]
2
= 0.20
11. Suppose a fair six sided die is rolled five times independently. Let X denote the number
of times a 1 is obtained and let Y denote the number of times a 6 is obtained. Find
Pr(X = 1, Y = 1). Enter the answer correct to three decimal places.
Answer: 0.164
Solution:
Probability of getting a 1, p1 = 16 .
Probability of getting a 6, p6 = 16 .
Probability of getting any other number (2, 3, 4, or 5), pother = 46 = 23 .
To compute the joint probability Pr(X = 1, Y = 1), we need exactly one 1 and one 6 in
the five rolls.
3
5 1 4 1 2
P r(X = 1, Y = 1) = C1 C1
6 6 3
5 4 8
=
6 6 27
160
=
972
= 0.164
12. Let random variables X and Y be uniformly distributed over the set of integers x and y
satisfying
−1 ≤ y ≤ 1, − 2 ≤ x + y ≤ 2.
Page 9
(i) Find the marginal PMF of X.
Solution:
Since, −1 ≤ y ≤ 1 and −2 ≤ x + y ≤ 2 =⇒ x ≤ 2 − y and x ≥ −2 − y
For y : −1, x : −1, 0, 1, 2, 3
For y : 0, x : −2, −1, 0, 1, 2
For y : 1, x : −3, −2, −1, 0, 1
So, Tx = {−3, −2, −1, 0, 1, 2, 3}
y\x -3 -2 -1 0 1 2 3 fY (y)
1 1 1 1 1 5
-1 0 0
15 15 15 15 15 15
1 1 1 1 1 5
0 0 0
15 15 15 15 15 15
1 1 1 1 1 5
1 0 0
15 15 15 15 15 15
1 2 3 3 3 2 1
fX (x)
15 15 15 15 15 15 15
Table 1: Joint probability distribution table
1/15, if x = −3, 3
2/15, if x = −2, 2
f (x) =
3/15, if x = −1, 0, 1
0, otherwise
(ii) Find the marginal PMF of Y .
Solution:
Since, −1 ≤ y ≤ 1 =⇒ Ty = {−1, 0, 1}
(
1/3, if y = −1, 0, 1
f (y) =
0, otherwise
13. The joint PMF of two discrete random variables X and Y is given by:
1 (3x + y), x, y ∈ {0, 1, 2},
fXY (x, y) = 36
0, otherwise.
Page 10
Now,
2
X
P (Y = 2) = fY (2) = fXY (x, 2)
x=0
5
=
12
1
P (X = 1, Y = 2) = fXY (1, 2) = (3 · 1 + 2)
36
5
=
36
Therefore,
5
1
P (0 < X < 2 | Y > 1) = 36 = = 0.33
5 3
12
14. A fair coin is tossed three times. Let X denote the number of heads obtained, and let
Y be defined as:
0, if no heads are obtained,
1, if the first head appears on the first toss,
Y =
2, if the first head appears on the second toss,
3, if the first head appears on the third toss.
Solution: Given:
X is the total number of heads obtained in three tosses of a fair coin and
0, if no heads are obtained,
1, if the first head appears on the first toss,
Y =
2, if the first head appears on the second toss,
3, if the first head appears on the third toss.
Page 11
3. P (X = 1, Y = 2):
1
P (X = 1, Y = 2) = P (THT) = .
8
4. P (X = 1, Y = 3):
1
P (X = 1, Y = 3) = P (TTH) = .
8
5. P (X = 2, Y = 1):
1 1 1
P (X = 2, Y = 1) = P (HHT or HTH) = + = .
8 8 4
6. P (X = 2, Y = 2):
1
P (X = 2, Y = 2) = P (THH) = .
8
7. P (X = 3, Y = 1):
1
P (X = 3, Y = 1) = P (HHH) = .
8
Joint PMF Table:
The joint PMF of X and Y is given in the following table:
X
0 1 2 3
Y
1
0 0 0 0
8
1 1 1
1 0
8 4 8
1 1
2 0 0
8 8
1
3 0 0 0
8
15. In a classroom, there are three boxes labeled Box 1, Box 2, and Box 3. A teacher places
three candies into these boxes, with each candy independently and uniformly likely to
go into any box. Let Xi represent the number of candies in Box i (i = 1, 2, 3), and let
N denote the number of boxes occupied (contain at least one candy).
Page 12
N
1 2 3
X1
2 6
0 0
27 27
2 6
1 0
(a) 27 27
6
2 0 0
27
1 4
3 0
27 27
N
1 2 3
X1
2 6
0 0
27 27
6 6
1 0
(b) 27 27
6
2 0 0
27
1
3 0 0
27
Page 13
N
1 2 3
X1
2 5
0 0
27 27
6 5
1 0
(c) 27 27
8
2 0 0
27
1
3 0 0
27
N
1 2 3
X1
2 6
0 0
27 27
6 5
1 0
(d) 27 27
7
2 0 0
27
1
3 0 0
27
Answer : b
Solution :
In this we have to obtain the joint distribution of (X1 , N ) where X1 represents
number of candies in Box 1 i.e X1 can take values 0,1,2,3 and N denotes the
number of boxes occupied i.e N can take values 1,2,3 as there are three boxes.
Now, we will calculate the probabilities for each cases:
Here, Total outcome = 33 = 27
(a) P (X1 = 0, N = 1) : This is the case when there is 0 candy in Box 1 and only
1 box is occupied, so the 3 candies can be filled in either of the 2 boxes, which
Page 14
means that there are 2 choices to fill all the three candies.
2
= .
27
(b) P (X1 = 0, N = 2) : This is the case when there is 0 candy in Box 1 and 2
boxes are occupied , so the 3 candies are to be splitted to be filled in box 2 and
box 3. So, we can have 2 cases that are:
Page 15
(l) P (X1 = 3, N = 3): Here, Box 1 is containing 3 candies but 3 boxes are to be
occupied which is not possible. Hence the probability is 0.
Hence option b) is the correct answer.
Page 16
(ii). Obtain the joint distribution of (X1 , X2 ).
X2
0 1 2 3
X1
1 3 3 1
0
27 27 27 27
3 6 3
1 0
(a) 27 27 27
3 3
2 0 0
27 27
1
3 0 0 0
27
X1
0 1 2 3
X2
1 3 3 1
0
27 27 27 27
3 3 6
1 0
(b) 27 27 27
3 3
2 0 0
27 27
1
3 0 0 0
27
Page 17
X2
0 1 2 3
X1
1 3 3
0 0
27 27 27
3 6 3 1
1
(c) 27 27 27 27
3 3
2 0 0
27 27
1
3 0 0 0
27
(a) P (X1 = 0, X2 = 0) : In this case, there are 0 candy in both Box 1 and 2. So
there is only one 1 possible way that the 3 candies can be filled in box 3.
1
=
27
(b) P (X1 = 0, X2 = 1) : In this case, there are 0 candies in Box 1 and 1 candy in
Box 2. So we have to choose 2 out of 3 candies to go into Box 3.
Number of ways to do this = 3 C2 = 3
3
hence, the probability =
27
(c) P (X1 = 0, X2 = 2) :In this case, there are 0 candies in Box 1 and 2 candy
in Box 2. So we have to choose 2 out of 3 candies to go into Box 2 and the
remaining candy will be in Box 3
Number of ways to do this = 3 C2 = 3
3
hence, the probability =
27
(d) P (X1 = 0, X2 = 3) :In this case, there are 0 candies in Box 1 and 3 candy in
Box 2. So there is only one 1 possible way that the 3 candies can be filled in
box 2.
1
=
27
Page 18
Similarly we will do for all the cases :
(a) P (X1 = 1, X2 = 0) :In this case, there is 1 candy in Box 1 and 0 candies in
3
Box 2. That means remaining 2 candies should go in Box 3 =
27
(b) P (X1 = 1, X2 = 1) :In this case, there is 1 candy in both Box 1 and 2. That
6
means remaining 1 candy should go in Box 3 =
27
(c) P (X1 = 1, X2 = 2) :In this case, there is 1 candy in Box 1 and 2 candy in Box
3
2. So we have to choose 2 out of 3 candies to go into Box 2 =
27
(d) P (X1 = 1, X2 = 3): In this case, there is 1 candy in Box 1 and 3 candies in Box
2 making the total number of balls 4, which is wrong. hence the probability
will be = 0
(e) P (X1 = 2, X2 = 0): In this case, there are 2 candies in Box 1 and 0 candies
in Box 2. So we have to choose 2 out of 3 candies to go into Box 1 and the
3
remaining candy will be in Box 3 =
27
(f) P (X1 = 2, X2 = 1): In this case, there are 2 candies in Box 1 and 1 candy in
3
Box 2. So we have to choose 2 out of 3 candies to go into Box 1 =
27
(g) P (X1 = 2, X2 = 2): In this case, there are 2 candies in both Box 1 and 2
making the total number of balls 4, which is wrong. hence the probability will
be = 0
(h) P (X1 = 2, X2 = 3): In this case, there are 2 candies in Box 1 and 3 candies in
Box 2 making the total number of balls 5, which is wrong. Hence the probability
will be= 0
(i) P (X1 = 3, X2 = 0):In this case, there are 3 candies in Box 1 and 0 candies in
Box 2. So there is only one 1 possible way that the 3 candies can be filled in
1
box 1 =
27
(j) P (X1 = 3, X2 = 1):In this case, there are 3 candies in Box 1 and 1 candy in Box
2 making the total number of balls 4, which is wrong. hence the probability
will be = 0
(k) P (X1 = 3, X2 = 2): In this case, there are 3 candies in Box 1 and 2 candies in
Box 2 making the total number of balls 5, which is wrong. hence the probability
will be = 0
(l) P (X1 = 3, X2 = 3): In this case, there are 3 candies in both Box 1 and 2
making the total number of balls 6, which is wrong. hence the probability will
be = 0
Hence option a) is the correct answer.
Page 19