Week 11 - GS
Week 11 - GS
Week 11 Questions
GRADED QUESTIONS
1. (1 point) The number of hours Messi spends each day practicing in ground is modelled
by the continuous random variable X, with p.d.f. f (x) defined by
(
a(x − 1)(6 − x) for 1 < x < 6
fX (x) =
0 otherwise
Find the probability that Messi will practice between 2 and 5 hours in ground on a
randomly selected day.
Answer: 0.80
R∞
We know that −∞ f (x)dx = 1
6
Solving above equation taking required f (x), value of a can be calculated. i.e a =
125
R5
Then calculate P (2 ≤ X ≤ 5) = 2 f (x)dx
2. (1 point) Let X be a continuous random variable with PDF
ax
for 0 < x < 2
fX (x) = a(4 − x) for 2 ≤ x ≤ 4
0 otherwise
Calculate P (1 ≤ x ≤ 3)
Answer: 0.75
R∞
We know that −∞ f (x)dx = 1
1
Solving above equation taking required f (x), value of a can be calculated. i.e a =
4
R2
Then calculate P (1 ≤ X ≤ 2) = 1 f (x)dx
3. (1 point) The probability density function of X is given by
x
for 0 < x < 1
fX (x) = 2 − x for 1 < x < 2
0 otherwise
Course: Machine Learning - Foundations Page 2 of 13
Calculate E(X)
Answer: 1
Solution: R∞
We know that −∞ f (x)dx = 1
R2
E(X) = 0
xf (x)dx
4. (1 point) The distribution of the lengths of a cricket bat is uniform between 80 cm and
100 cm. There is no cricket bat outside this range. The mean and variance of the lengths
of the the cricket ball is a and b. Calculate a + b
Answer: 127.33
(h − l)2
V (X) =
12
(h + l)
E(X) =
2
5. ( points) Suppose that random variable X is uniformly distributed between 0 and 10.
10
Then find P (X + ≥ 7). (Write answer upto two decimal places)
X
Answer: 0.7
10
Solve this quadratic equation, X + ≥7
X
get the values of X for this X ≥ 0.
Answer: A, B, C, D
Option A: Standard normal variate(distributions) have a mean of 0 and variance of 1.
SD is the squared root of variance.
Option C: The normal distribution resembles a bell curve. The maximum concentration
is around the mean value/middle portion.
Option D: The spread of the distribution will change based on the SD. Hence, the
shape is dependent on the standard deviation.
—————————————————————————————————————-.
Let X and Y be continuous random variables with joint density
(
cxy for 0 < x < 2, 1 < y < 3
fXY (x, y)
0 otherwise
1
Answer:
8
Solution: R∞ R∞
We know that −∞ −∞ fXY (x, y)dydx = 1
R2R3
0 1
cxydydx = 1
c can be calculated from above equation.
3
Answer:
32
Solution:
R1R2 1
P (0 < X < 1, 1 < Y < 2) = 0 1
xydydx
8
9. ( points) Calculate P (0 < X < 1, Y > 2)
Course: Machine Learning - Foundations Page 4 of 13
5
Answer:
32
Solution:
R1R3 1
P (0 < X < 1, Y > 2) = 0 2
xydydx
8
10. ( points) Calculate P ((X + Y ) < 3)
Answer: 0.25
Solution:
R 2 R 3−x 1
= 0 1
xydydx
8
11. ( points) Calculate FX (1)
Answer: 0.25
Solution:
3
Answer:
8
Solution:
Answer: 0.25
FX,Y = FX (x) × FY (y)
Course: Machine Learning - Foundations Page 5 of 13
14. (1 point) Suppose a random variable X is best described by a uniform probability dis-
tribution with range 1 to 5. Find the value of a such that P (X ≤ a) = 0.5
Answer: 3
Solution: P (X ≤ 3) = 0.5, From the area of Uniform distribution curve.
15. (1 point) If X is an exponential random variable with rate parameter λ then which of
the following statement(s) is(are) correct.
1
a) E[X] = λ
1
b) V ar[X] = λ2
c) P (X > x + k|X > k) = P (X > x) for k, x ≥ 0.
d) P (X > x + k|X > k) = P (X > k) for k, x ≥ 0.
Answer: A, B, C
Solution :
Options (a) and (b) are correct for Exponential distribution.
16. (1 point) (Multiple Select) For three events, A, B, and C, with P (C) > 0, Which of
the following is/are correct?
A. P (Ac |C)= 1 - P (A|C)
B. P (ϕ|C) = 0
C. P (A|C) ≤ 1
D. if A ⊂ B then P (A|C) ≤ P (B|C)
Answer: A, B, C, D
Option A: Using standard probability properties. If we have an event E, then:
P (E) = 1 − P (E C )
Course: Machine Learning - Foundations Page 6 of 13
Option B: The option asks for the probability of getting a null set given that an event
C has already occurred. It is also given to us that the probability of the occurrence of
the event C is not zero. Hence, P (ϕ|C) = 0
Option C: The probability of an event given to another with non-zero probability will
always be less than or equal to 1 because the total probability can only be 1.
Option D: The probability of getting a bigger set is more than a smaller set. A is a
smaller set than B, hence P (A|C) ≤ P (B|C)
17. (2 points) (Multiple Select) Let the random experiment be tossing an unbiased coin
two times. Let A be the event that the first toss results in a head, B be the event that
the second toss results in a tail and C be the event that on both the tosses, the coin
landed on the same side. Choose the correct statements from the following:
A. A and C are independent events.
B. A and B are independent events.
C. B and C are independent events.
D. A, B, and C are independent events.
Answer: A, B, C
Solution:
A = {HT, HH}
B = {HT, T T }
C = {T T, HH}
1
P (A) =
2
1
P (B) =
2
1
P (C) =
2
P (A ∩ B) = {HT }
P (C ∩ B) = {T T }
P (A ∩ C) = {HH}
P (A ∩ B) = P (A) × P (B) Hence, option B is correct
P (A ∩ C) = P (A) × P (C) Hence, option A is correct
P (C ∩ B) = P (C) × P (B) Hence, option C is correct
18. (2 points) (Multiple Select) If A1 , A2 , A3 , , An are non empty disjoint sets and subsets
of sample space S, and a set An+1 is also a subset of S, then which of the following
statements are true?
Course: Machine Learning - Foundations Page 7 of 13
A. The sets A1 ∩ An+1 , A2 ∩ An+1 , A3 ∩ An+1 , , An ∩ An+1 are disjoint.
B. If An+1 , An are disjoint then A1 , A2 , , An−1 are disjoint with An+1 .
C. The sets A1 , A2 , A3 , , An , ϕ are disjoint.
D. The sets A1 , A2 , A3 , , An , S are disjoint.
Answer: A,C
Option A: Consider two sets Ai ∩ An+1 and Aj ∩ An+1 , where i ̸= j. The intersection of
these two sets is
Hence, Ai ∩ An+1 and Aj ∩ An+1 are disjoint sets for all i ̸= j. Therefore, the sets
A1 ∩ An+1 , A2 ∩ An+1 , A3 ∩ An+1 , , An ∩ An+1 are disjoint.
Option B: Again, if An+1 is disjoint with An , it doesn’t mean that it’ll be disjoint with
other n-1 sets as well. Take this example:
you have 3 sets, A1 , A2 , A3 , you can have A4 = A1 + A2 Now, A4 is disjoint with A3 but
not with the other two.
Option C: A1 , ...An are disjoint with each other(given). Every n set will also be disjoint
with ϕ (Intersection will give empty set)
Option D: Every n set is a subset of S. So, it’ll result in something when taken an
intersection with S. Hence, not disjoint.
19. (3 points) A triangular spinner having three outcomes can lands on one of the numbers
0, 1 and 2 with probabilities shown in table.
Outcome 0 1 2
Probability 0.7 0.2 0.1
The spinner is spun twice. The total of the numbers on which it lands is denoted by X.
The the probability distribution of X is.
x 2 3 4 5 6
A. 49 28 1 4 18
P (X = x)
100 100 100 100 100
x 2 3 4 5 6
B. 28 49 18 1 4
P (X = x)
100 100 100 100 100
Course: Machine Learning - Foundations Page 8 of 13
x 0 1 2 3 4
C. 49 28 18 4 1
P (X = x)
100 100 100 100 100
x 2 3 4 5 6
D. 28 49 18 4 1
P (X = x)
100 100 100 100 100
Answer: C
The maximum sum you can get is 4 (2+2).
1
P (X = 4) = P (2 and 2) = P (2) ∗ P (2) = 0.1 ∗ 0.1 =
100
18
P (X = 2) =
100
28
P (X = 1) = P (X = 2) =
100
49
P (X = 0) =
100
20. (1 point) When throwing a fair die, what is the variance of the number of throws needed
to get a 1?
Answer: 30
Solution:
1−p
= V ar(X) =
p2
1
1−
= 6
12
6
= 30
Course: Machine Learning - Foundations Page 9 of 13
21. (1 point) Joint pmf of two random variables X and Y are given in Table
y
1 2 3 fX (x)
x
1 0.05 0 a1 0.15
2 0.1 0.2 a3 a2
3 a4 0.2 a5 0.45
fY (y) 0.3 0.4 a6
Answer: 0.22
Solution:
P
fXY (x, y) = 1 ............. (i)
P
fX (x) = fXY (x, y) .............(ii)
y∈Ry
P
fY (y) = fXY (x, y) ...............(iii)
x∈RX
22. (1 point) (Multiple Select) Which of the following options is/are correct?
A. If Cov[X, Y ] = 0, then X and Y are independent random variables.
B. Cov[X, X] = V ar(X)
C. If X andPY are two independent random variables and Z = X + Y then
fZ (z) = x fX (x) × fY (z − x)
D. If X andPY are two independent random variables and Z = X + Y then
fZ (z) = y fX (x) × fY (z − x)
Answer: B, C
Solution:
Option B
Course: Machine Learning - Foundations Page 10 of 13
Cov[X, X] is the covariance between X and X i.e V ar(X)
Answer: B, C
Solution:
For k
FX (3) = 1
x3 + k
=1
40
We will get
14
P (X = 1) =
40
7
P (X = 2) =
40
19
P (X = 3) =
40
Course: Machine Learning - Foundations Page 11 of 13
259
Now easily with V ar(X) equation we will get V ar(X) =
320
24. (1 point) In a game of Ludo, Player A needs to repeatedly throw an unbiased die till
he gets a 6. What is the probability that he needs fewer than 4 throws? (Answer the
question correct to two decimal points.)
Solution:
1
P (6) =
6
25. (1 point) (Multiple Select) Let X and Y be two random variables with joint PMF
fXY (x, y) given in Table 10.3.
y
0 1 2
x
1 1 1
0 6 4 8
1 1 1
1 8 6 6
Which of the following options is/are correct for fXY (x, y) given in Table 10.1.
5
A. P (X = 0, Y ≤ 1) =
12
7
B. P (X = 0, Y ≤ 1) =
12
C. X and Y are independent.
D. X and Y are dependent.
Answer: A, D
1 1 10 5
P (X = 0, Y ≤ 1) = P (X = 0 and Y = 0) or P (X = 0 and Y = 1) = + = =
6 4 24 12
1 1 1 13
P (X = 0) = + + =
6 4 8 24
1 1 7
P (Y = 0) = + =
6 8 24
Course: Machine Learning - Foundations Page 12 of 13
Now, if they are independent, then the product of the marginal should be equal to the
joint probability.
13 7 91
PXY (0, 0) = ∗ = ≈ 0.158 (If independent)
24 24 576
1
Also, the tables says that PXY (0, 0) = = 0.1667
6
Because the two are not equal, we can conclude that they are not independent.
26. (1 point) A discrete random variables X has the probability function as given in table
10.4.
x 1 2 3 4 5 6
P (X) a a a b b 0.3
Answer: 0.3
P
P (X = x) = 1
3a + 2b = 0.7
P
E(X) = P (X = xi ) × xi
6a + 9b = 2.4
27. (1 point) A discrete random variable X has the probability function as follows.
(
k × (1 − x)2 , for x = 1, 2, 3
P (X = x) =
0, otherwise
Evaluate E(X)
Answer: 2.8
Course: Machine Learning - Foundations Page 13 of 13
Solution:
P
P (X = x) = 1
k + 4k = 1
k = 0.2
P
E(X) = P (X = xi ) × xi
0.2 × 2 + 0.8 × 3