Sta347 Midterm

Download as pdf or txt
Download as pdf or txt
You are on page 1of 6

STA347 - Probability I - Term Test - 2019 Summer

Last Name: First Name and Initials:


Student Number:
A non-programmable calculator is allowed
Instruction
1. Don’t forget writing your name and student number.
2. If you do not have enough space, use the other side and refer it correctly.
3. Some problems could be wrong. If it happens, correct questions by yourself after
arguing why the problem is wrong.
4. There are 4 questions on 4 pages, and the total marks is 100.
5. You can use either pen or pencil for the test. But please be aware that you are
not allowed to dispute any credit after the test is returned if you use pencil.
6. Pages 3–4 can be used as a scratch space.
7. Please hand in your paper when the time is up.

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


k = 0, 1, . . . , n and zero otherwise.


5. X ∼ beta(α, β) has probability density function pdfX (x) = 1(0 < x < 1)[Γ(α +
β)/(Γ(α)Γ(β))]xα−1 (1 − x)β−1 .
6. A random variable W has exponential distribution with parameter λ > 0 if its proba-
bility density function is pdfW (w) = λ exp(−λw) for w > 0.

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

which is the density of beta(2, 3) given by


Γ(2 + 3) 2−1 4!
x (1 − x)3−1 1(0 < x < 1) = x(1 − x)2 1(0 < x < 1) = 12x(1 − x)2 1(0 < x < 1).
Γ(2)Γ(3) 1!2!
(c) Consider g(x, y) = (x, y/(1 − x)). The inverse of g is given by g −1 (x, z) = (x, z(1 − x)).
The Jacobean is
∂(x, y)
1 0

= = 1 − x.

∂(x, z) −z 1 − x

Hence the joint probability density of X, Z is


pdfX,Z (x, z) = pdfX,Y (x, z(1 − x))(1 − x)
= 24x · z(1 − x) · 1(0 < x < 1, 0 < z(1 − x) < 1, 0 < x + z(1 − x) < 1) · (1 − x)
= 12x(1 − x)2 1(0 < x < 1) · 2z1(0 < z < 1).
By integrating x out, the marginal density of Z is given by
Z Z 1
pdfZ (z) = pdfX,Z (x, z) dx = 2z1(0 < z < 1) 12x(1 − x)2 dx = 2z1(0 < z < 1).
0

(d) Any proves P (X ∈ A, Y ∈ B) 6= P (X ∈ A)P (Y ∈ B) is good.


Since the pdf is continuous in both x and y, the probabilities P (X > 1/2), P (Y > 1/2) are
positive. While P (X + Y > 1) = 0 < P (X > 1/2)P (Y > 1/2) which contradicts if X and
Y are independent. Hence X and Y are dependent.

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).

Solution. (a) It is enough to show that P (A ∩ B | C) 6= P (A | C)P (B | C).

P (A ∩ B ∩ C) P (A ∩ B) P (A)P (B) P (A)P (B)


P (A ∩ B | C) = = = < = P (A | C)P (B | C).
P (C) P (C) P (C) P (C)P (C)

(b) The probability can be shown directly, that is,

P (A ∩ B ∩ C) P (A ∩ B) P (A)P (B) P (A)


P (A | B, C) = = = = P (A) < = P (A | C).
P (B ∩ C) P (B) P (B) P (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.

Problem 4. Suppose X ∼ exponential(2).


(a) [8 marks] Compute P (X > x + y | X > x) and P (X > y) for x > 0, y > 0 and compare
the values. R∞
(b) [8 marks] Compute 0 P (X > z) dz.
(c) [8 marks] Compute the third quartile of X.
(d) [4 marks] Compute the skewness of X.

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

(a) Using the cumulative distribution function, P (X > y) = 1 − P (X ≤ y) = 1 − [1 − e−2y ] =


e−2y . Then P (X > x + y | X > x) = P (X > x + y)/P (X > x) = e−2(x+y) /e−2x = e−2y .
Hence both probabilities are the same.
(b) Solution I: The direct ingetral shows
Z ∞ Z ∞
P (X > x) dx = e−2x dx = −e−2x /2|∞
0 = 1/2.
0 0
R∞
Solution II: It is known that for X ≥ 0, 0 P (X > x) dx = E(X). Hence the integeral is
equivalent to
Z ∞ Z ∞
−2x −2x ∞ 1
E(X) = x · 2e dx = −xe |0 + e−2x dx = .
0 0 2

(c) The third quartile is the solution to cdfX (x) = 0.75, that is,

1 − e−2x = 0.75

Hence the solution is log(0.25)/(−2) = log(2) = 0.6931.


(d) The skewness is the third moment of standardized random variable. Note that
Z ∞
k
E[X ] = xk · 2e−2x dx
0

Change of variable z = 2x implies


Z ∞
−k
=2 z k · e−z dx = 2−k Γ(k + 1) = k!/2k .
0

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.

You might also like