Statistics I Exam Dec6 2024 Solutions
Statistics I Exam Dec6 2024 Solutions
December 6, 2024
Question 1. Probability
(a) A bag contains 10 red balls, 8 blue balls, and 6 green balls. We successively draw 2 balls at random
without replacement. What is the probability that the first ball drawn is red and the second ball is
blue?
Answer: P (1st ball red) = 10/24, P (2nd ball blue|1st ball red) = 8/23. P (1st ball red and then 2nd ball b
(10/24)(8/23). We could also have used permutations: P110 P18 /P224 = 10 × 8/(24 × 23)
(b) A shelf has 5 science books, 4 history books, and 3 art books. Three books are selected at random
one after another without replacement. What is the probability that the first book is a science book,
the second is a history book, and the third is an art book?
Answer: P (1st book science) = 5/12, P (2nd book history|1st book science) = 4/11,
P (3rd book art|previous 2 books are science and history) = 3/10. So,
5 4 3
P (1st book is science, then the 2nd is history and the 3rd is art) = 12 11 10
.
(c) In a software application, two types of bugs may occur. Bug A occurs 11% of the time, and Bug B
occurs 8% of the time. Additionally, 14% of the time, either Bug A or Bug B occurs. Compute the
probability that a randomly encountered software issue involves both Bug A and Bug B.
Answer: P (A) = 0.11, P (B) = 0.08, P (A ∪ B) = 0.14,
X 0 10 20
Y
0 0.05 0.15 0.10
10 0.10 0.10 0.30
20 0.05 0.05 0.10
1
(a) Calculate the marginal probability functions of X and Y , fX (x) and fY (y) respectively.
Answer:
X 0 10 20 P (Y = y)
Y
0 0.05 0.15 0.10 0.30
10 0.10 0.10 0.30 0.50
20 0.05 0.05 0.10 0.20
P (X = x) 0.20 0.30 0.50 1
(b) Calculate the joint cumulative probabilities FX,Y (10, 10) and FX,Y (0, 10).
Answer:
(e) Derive (find) the conditional cumulative distribution function of Y given X = 10, FY |X=10 (y).
Answer:
0, y<0
1,
0 ≤ y < 10
FY |X=10 (y) = 12 1 .
2
+ 3 = 56 , 10 ≤ y < 20
1 1 1
2
+ 3 + 6 = 1, y ≥ 20
2
(a) Derive (find) the moment generating function of the random variable X, MX (t).
Answer:
3
X
MX (t) = etx fX (x) = 0.2(1 + e3t ) + 0.5et + 0.1e2t .
x=0
(b) Using the moment generating function from (a), derive (find) E(X) and E(X 2 ).
Answer:
E(X) = MX′ (0) = 0.5e0 + 0.2e0 + 0.6e0 = 0.5 + 0.2 + 0.6 = 1.3.
′′
MX (t) = 1.8e3t + 0.5et + 0.4e2t ,
′′
E(X 2 ) = MX (0) = 0.5e0 + 0.4e0 + 1.8e0 = 0.5 + 0.4 + 1.8 = 2.7.
(c) Let Y be another random variable independent of X having the same moment generating function
as X, MX (t) = MY (t). Define Z = X + Y . Derive (find) the moment generating function of the new
random variable Z, FZ (z).
Answer: MZ (t) = [MX (t)]2 = 0.04e0t + 0.2e1t + 0.29e2t + 0.18e3t + 0.21e4t + 0.04e5t + 0.04e6t
(d) Find the probability function of the random variable Z defined in question (c), fZ (z).
Answer: The probability function is given by the coefficients of the exponential ezt from (c): P (Z =
0) = 0.04, P (Z = 1) = 0.2, P (Z = 2) = 0.29, P (Z = 3) = 0.18, P (Z = 4) = 0.21, P (Z = 5) = 0.04,
P (Z = 6) = 0.04.
3
(b) Compute E(X).
Answer: From the law of iterated expectations (alsoR y+3 known as the tower property) we have: E(X) =
1
E(E(X|Y )). First we calculate E(X|Y = y) = y x 3 dx = y + 3/2. So E(X|Y ) = Y + 3/2 which
is a random variable. The expectation of this random variable is E(Y + 3/2) = E(Y ) + 3/2 =
1/3 + 3/2 = 11/6 = E(X), where E(Y ) was calculated in (a). Another possibility is to calculate the
joint density fX,Y (x, y) and use it to calculate E(X).
(c) Derive (find) the marginal probability function of the new random variable Z = Y 2 , fZ (z).
Answer: Since Y ∈ (0, 1), it follows that Z ∈ (0, 1). We need the cumulative distribution function
of Z:
FZ (z) = P (Z ≤ z) = P (Y 2 ≤ z)
√ √
= P (− z ≤ Y ≤ z)
√ √ √
= FY ( z) − FY (− z) + P (Y = − z)
for z ≥ 0.
So we need FY (y). Given the the density of Y , fY (y) = 2(1 − y) for y ∈ (0, 1), the CDF of Y is:
Z y y
2(1 − t) dt = 2t − t2 0 = 2y − y 2 .
FY (y) =
0
√ √
from where we can see that P (Y = − z) = 0 (because Y is continuous), and FY (− z) = 0. So,
√ √
FZ (z) = P (Y ≤ z) = FY ( z).
√
Substituting y = z into FY (y):
√ √ √ √
FZ (z) = FY ( z) = 2 z − ( z)2 = 2 z − z.
We are asked to find fZ (z). To find the density fZ (z), differentiate FZ (z) with respect to z:
d √
fZ (z) = 2 z−z .
dz
The derivative is:
d √ d 2 1
fZ (z) = (2 z) − (z) = √ − 1 = √ − 1.
dz dz 2 z z
Therefore, the PDF of Z = Y 2 is:
(
√1 − 1, 0 < z < 1,
z
fZ (z) =
0, otherwise.