Hello, dear friend, you can consult us at any time if you have any questions, add WeChat: daixieit

Department of Computer & Mathematical Sciences
STAB52H3 Introduction to Probability
Term Test 2
November 16, 
2020
Duration: 60 minutes
Examination aids allowed: Open notes-books
Instructions:
• Read the questions carefully and answer only what is being asked.
• Answer all questions directly on the examination paper; use the last pages if you need
more space, and provide clear pointers to your work.
• Show your intermediate work, and write clearly and legibly.
Question: 1 2 3 4 5 6 7 8 9 10 Total
Points: 20 20 20 20 20 20 20 20 20 20 200
Score:
1. (20 points) Consider two random variables X and Y that are binary valued, i.e., the set
of possible values is {0, 1}. Let the marginal distribution of X be
P(X = 0) = p, P(X = 1) = 1− p.
It is given that the conditional distribution of Y given X is
P(Y = 0|X = 0) = 3
4
, P(Y = 1|X = 0) = 1
4
,
P(Y = 1|X = 1) = 1
2
, P(Y = 0|X = 1) = 1
2
.
(a) (10 points) Find the value of p ∈ [0, 1] such that the marginal distributions of X
and Y are the same.
(b) (10 points) For the value of p given in (a), find the conditional distribution of X
given Y .
Solution: (a) By the law of total probability, we have
P(Y = 0) = P(Y = 0|X = 0)P(X = 0) + P(Y = 0|X = 0)P(X = 0)
=
3
4
p+
1
2
(1− p).
We require that X and Y have the same marginal distribution. So
P(Y = 0) =
3
4
p+
1
2
(1− p) = p = P(X = 0).
Solving gives p = 2
3
. Since X and Y are binary valued, if p = 2
3
then they have the
same marginal distributions.
(b) We have
P(X = 0|Y = 0) = P(Y = 0|X = 0)P(X = 0)
P(Y = 0)
= P(Y = 0|X = 0) = 3
4
,
P(X = 1|Y = 0) = 1− P(X = 0|Y = 0) = 1
4
,
P(X = 1|Y = 1) = P(Y = 1|X = 1)P(X = 1)
P(Y = 1)
= P(Y = 1|X = 1) = 1
2
,
P(X = 0|Y = 1) = 1− P(X = 1|Y = 1) = 1
2
.
(Note that the transition probabilities from X to Y are the same as those from Y to
X.)
2. (20 points) Consider two random variables X and Y that are binary valued, i.e., the set
of possible values is {0, 1}. Let the marginal distribution of X be
P(X = 0) = p, P(X = 1) = 1− p.
It is given that the conditional distribution of Y given X is
P(Y = 0|X = 0) = 2
3
, P(Y = 1|X = 0) = 1
3
,
P(Y = 1|X = 1) = 1
2
, P(Y = 0|X = 1) = 1
2
.
(a) (10 points) Find the value of p ∈ [0, 1] such that the marginal distributions of X
and Y are the same.
(b) (10 points) For the value of p given in (a), find the conditional distribution of X
given Y .
Solution: (a) By the law of total probability, we have
P(Y = 0) = P(Y = 0|X = 0)P(X = 0) + P(Y = 0|X = 0)P(X = 0)
=
2
3
p+
1
2
(1− p).
We require that X and Y have the same marginal distribution. So
P(Y = 0) =
2
3
p+
1
2
(1− p) = p = P(X = 0).
Solving gives p = 3
5
. Since X and Y are binary valued, if p = 3
5
then they have the
same marginal distributions.
(b) We have
P(X = 0|Y = 0) = P(Y = 0|X = 0)P(X = 0)
P(X = 0)
= P(Y = 0|X = 0) = 2
3
,
P(X = 1|Y = 0) = 1− P(X = 0|Y = 0) = 1
3
,
P(X = 1|Y = 1) = P(Y = 1|X = 1)P(X = 1)
P(Y = 1)
= P(Y = 1|X = 1) = 1
2
,
P(X = 0|Y = 1) = 1− P(X = 1|Y = 1) = 1
2
.
(Note that the transition probabilities from X to Y are the same as those from Y to
X.)
3. (20 points) Let (X, Y ) be a random vector whose distribution is given by
P((X, Y ) = (0, 0)) = P((X, Y ) = (0, 1)) = P((X, Y ) = (1, 1)) =
1
3
.
(a) (4 points) Find the marginal distributions of X and Y , and give their name and
parameters.
(b) (16 points) Find the correlation coefficient Cor(X, Y ) = ρXY between X and Y .
Solution: (a) We have X ∼ Bernoulli(1
3
) and Y ∼ Bernoulli(2
3
).
(b) The covariance is given by
Cov(X, Y ) = E[XY ]− E[X]E[Y ].
We have
E[XY ] =
1
3
0 · 0 + 1
3
0 · 1 + 1
3
1 · 1 = 1
3
,
Recall that if Z ∼ Bernoulli(p) then E[Z] = p and Var(Z) = p(1− p). So
E[X] =
1
3
, E[Y ] =
2
3
,
and we have
Cov(X, Y ) =
1
3
− 1
3
2
3
=
1
9
.
Also
Var(X) =
1
2
2
3
=
2
9
, Var(Y ) =
2
3
1
3
=
2
9
.
Thus
Cor(X, Y ) =
Cov(X, Y )√
Var(X)

Var(Y )
=
1
2
.
4. (20 points) Let (X, Y ) be a random vector whose distribution is given by
P((X, Y ) = (0, 1)) = P((X, Y ) = (1, 0)) = P((X, Y ) = (1, 1)) =
1
3
.
(a) (4 points) Find the marginal distributions of X and Y , and give their name and
parameters.
(b) (16 points) Find Var(X + Y ).
Solution: (a) We have X ∼ Bernoulli(2
3
) and Y ∼ Bernoulli(2
3
).
(b) We have
Var(X + Y ) = Var(X) + 2Cov(X, Y ) + Var(Y ).
The covariance is given by
Cov(X, Y ) = E[XY ]− E[X]E[Y ].
We have
E[XY ] =
1
3
0 · 1 + 1
3
1 · 0 + 1
3
1 · 1 = 1
3
,
Recall that if Z ∼ Bernoulli(p) then E[Z] = p and Var(Z) = p(1− p). So
E[X] =
2
3
, E[Y ] =
2
3
,
and we have
Cov(X, Y ) =
1
3
− 2
3
2
3
=
−1
9
.
Also
Var(X) = Var(Y ) =
2
3
1
3
=
2
9
.
Thus
Var(X + Y ) =
2
9
− 21
9
+
2
9
=
2
9
.
5. (20 points) Consider two independent Exponential RVs: X ∼ Exponential(1) and Y ∼
Exponential(2). Find the probability P(X > Y ).
6. (20 points) Consider two independent and identically distributed Exponential RVsX, Y ∼
Exponential(1). Find the probability P(X > 2Y ).