Sta347 Midterm
Sta347 Midterm
Sta347 Midterm
Useful Information
1. Talyor expansions of exponential and log functions are
x0 x1 x2 z z2 z3
ex = + + + · · · and log(1 − z) = − − − − ···
0! 1! 2! 1 2 3
for x ∈ R and |z| < 1.
R∞
2. The gamma function is defined by Γ(α) = 0 xα−1 e−x dx for α > 0 and satisfies
Γ(α + 1) = αΓ(α) and Γ(n + 1) = n! for any positive integer n.
3. X ∼ Poisson(µ) has probability mass function P (X = k) = e−µ µk /k! if k = 0, 1, . . .
and zero otherwise.
4. X ∼ binomial(n, p) has probability mass function P (X = k) = nk pk (1 − p)n−k if
1
Problem 1. Two random variables X and Y have the joint probability density function
pdfX,Y (x, y) = c · xy1(x > 0, y > 0, x + y < 1).
(a) [8 marks] Find the value of the constant c.
(b) [8 marks] Show that the marginal distribution of X is beta(2, 3).
(c) [8 marks] Find the density of Z = Y /(1 − X).
(d) [8 marks] Prove or disprove X and Y are independent.
Solution. (a) Axiom 2 implies
Z 1 Z 1−x Z 1 Z 1
cx 2 1−x c
1= c · xy dy dx = y dx = x(1 − x)2 dx
0 0 0 2 0 0 2
ch 1 1 i1 c 1 1 c
= − (1 − x)3 + (1 − x)4 = [ − ] = .
2 3 4 0 2 3 4 24
Hence c = 24.
(b) The marginal density can be derived by integrating with respect to y, that is,
Z 1−x
pdfX (x) = 24xy1(0 < x < 1) dy = 12x(1 − x)2 1(0 < x < 1)
0
2
Problem 2. Assume two independent events A and B satisfy P (A ∩ B) > 0 and P (C) < 1
for C = A ∪ B.
(a) [8 marks] Show that A and B are conditionally dependent given C.
(b) [8 marks] Prove that P (A | B, C) < P (A | C).
Problem 3. In a class, there are 20 female and 40 male students. Independently each
student has 20% chance of getting A+. Let F and M be the number of female and male
students having A+.
(a) [8 marks] Find the distribution of F + M .
(b) [8 marks] Compute the variance of M − F .
(c) [8 marks] Can M − F be a binomial distribution? Answer with details.
Solution. Two random variables M and F are sum of independent Bernoulli trials with
success probability 0.20, that is, F ∼ binomial(20, 0.2) and M ∼ binomial(40, 0.2).
(a) Since there are 20+40 = 60 students with 20% probability of getting A+, it is a binomial
distribution with parameters 60 and 0.2, that is, F + M ∼ binomial(60, 0.2).
(b) By noting that M and F are independent, Var(M − F ) = Var(M ) + Var(F ) = 40 · 0.2 ·
0.8 + 20 · 0.2 · 0.8 = 9.6.
(c) Solution I: P (M − F < 0) ≥ P (M = 0, F = 1) = 40 .2 0.8 0 × 20
0 4 1 19
0 1
0.2 0.8 > 0,
hence, it cannot be binomial distribution because binomial distribution is only defined on
non-negative integers.
Solution II: Mean of E(M −F ) = 40·0.2−20·0.2 = 4 is smaller than variance Var(M −F ) =
9.6. If M − F ∼ binomial(k, q), then 4 = kq and 9.6 = kq(1 − q) has solution q = −1.4
which is out of bound 0 ≤ q ≤ 1. Hence M − F cannot be a binomial.
3
Solution. The cumulative distribution function of X is
Z x
cdfX (x) = P (X ≤ x) = 2 exp(−2z) dz = −e−2z |x0 = 1 − e−2x .
0
(c) The third quartile is the solution to cdfX (x) = 0.75, that is,
1 − e−2x = 0.75
Hence µ = E(X) = 1!/21 = 1/2, E(X 2 ) = 2!/22 = 1/2, and E(X 3 ) = 3!/23 = 3/4. Then the
variance is σ 2 = Var(X) = E(X 2 ) − E(X)2 = 1/2 − (1/2)2 = 1/4. Then the skewness is
X − µ 3 E(X 3 ) − 3µE(X 2 ) + 3µ2 E(X) − µ3
E =
σ σ3
3/4 − 3(1/2)(1/2) + 3(1/2)2 (1/2) − (1/2)3 1/4
= 3/2
= = 2.
(1/4) 1/8
4
You can use this page as a scratch space.
5
You can use this page as a scratch space.