Introduction to Probability A
Solutions to Mock Exam
Question 1. Let A be the event there are twins. Let B be the event that there are no girls. The
information is:
P[B|A] =
1
4
and
P[B|Ac ] = 38 .
Also, P[A] = 1/8.
• The event that there is exactly one boy is B ∩ Ac . Since B = (B ∩ A) ] (B ∩ Ac ) we have
So
P[B ∩ Ac ] = P[B|Ac ] P[Ac ] =
3
8
·
7
8
21
64 .
=
• The event that there are no girls is B. Using the law of total probability,
P[B] = P[B|A] P[A] + P[B|Ac ] P[Ac ] =
1
4
·
1
8
+
3
8
·
7
8
=
23
64 .
=
37
64 .
• Let C be the event that there are no boys. The information is
P[C|A] =
1
4
and
P[C|Ac ] = 58 .
By the law of total probability
P[C] = P[C|A] P[A] + P[C|Ac ] P[Ac ] =
1
4
·
·
64
37
1
8
+
5
8
·
7
8
Using Bayes’ formula
P[A|C] =
P[C|A] P[A]
=
P[C]
1
4
·
1
8
=
2
37 .
t
u
Question 2.
• The range for X and for Y is {0, 1, 2}. So the range for (X, Y ) is
2
{0, 1, 2} = {(a, b) : a, b ∈ {0, 1, 2}} .
• The joint density is
fX,Y
X \Y
0
=
1
2
1
0
1
2
4
9
2
9
0
0
2
9
0
0
0
1
9
2
Why? This is because:
If Noga passes 2 green lights (Y = 2), which happens with probability (1/3)2 =
1/9, then she also passes 2 lights until school without seeing a red light (X = 2). So
fX,Y (2, 2) = 1/9.
If Noga passes 1 green light (Y = 1), then either the first is green and the second red,
or the first is red and the second green.
If the first is red and the second green, then Y = 1 and X = 0, and this has probability
2
3
·
1
3
= 29 . So fX,Y (0, 1) = 2/9.
If the first is green and the second is red, then Y = 1 and X = 1, and this has
probability
1
3
·
2
3
= 29 . So fX,Y (1, 1) = 29 .
We are left with the case that Noga passes 2 red lights (Y = 0). In this case, Noga
sees a red light immediately, so X = 0. This has probability fX,Y (0, 0) = (2/3)2 = 4/9.
• For the expectations we get the marginal density of X and of Y :
fX (0) =
4
9
fY (0) =
4
9
+
2
9
6
9
=
fY (1) =
fX (1) =
2
9
fX (2) = 19 .
2
9
4
9
fY (2) = 19 .
+
2
9
=
Thus,
E[X] =
E[Y ] =
4
9
2
9
+2·
+2·
1
9
1
9
= 49 .
=
6
9
= 23 .
The covariance is done similarly using the joint density:
E[XY ] = 1 · fX,Y (1, 1) + 2 · fX,Y (1, 2) + 2 · fX,Y (1, 2) + 4 · fX,Y (2, 2) = 1 ·
Cov[X, Y ] = E[XY ] − E[X] · E[Y ] =
2
3
−
4
9
·
2
3
=
2
3
·
5
9
=
2
9
+4·
1
9
=
6
9
= 23 .
10
27 .
t
u
Question 3.
• For f to be a density we need that f is non-negative, so C ≥ 0, and mainly that
Calculate
Z
∞
Z
0
f (s)ds =
−∞
So C = 2.
−∞
0
Ce2s ds = C 21 e2s −∞
=
C
2.
R
f = 1.
3
• Calculate: For t < 0,
Z
t
FX (t) =
Z
t
fX (s)ds =
−∞
−∞
t
2e2s ds = e2s −∞
= e2t .
For t ≥ 0,
Z
0
2e2s ds = 1.
FX (t) =
−∞
So
e2t
FX (t) =
1
t<0
t ≥ 0.
• First, expectation: Using integration by parts:
Z ∞
Z 0
0
E[X] =
sfX (s)ds =
s2e2s ds = se2s −∞
−∞
−∞
Z
−
0
1
e2s ds = − .
2
−∞
The variance is done by first computing the second moment, again using integration by
parts:
E[X 2 ] =
Z
0
−∞
0
s2 2e2s ds = s2 e2s −∞
Z
0
−
2se2s ds = 0 − E[X]
−∞
(the first term is 0 and the last term is exactly the expectation) so E[X 2 ] =
1
2.
Thus,
Var[X] = E[X 2 ] − (E[X])2 = 14 .
t
u
Question 4. Let X be the number of rounds until the first player stops. Let Y be the number
of rounds until the second player stops.
• Note that the first player stops at every round with probability 1/3, independently at
every round. Thus, X ∼ Geo(1/3).
Similarly, the second player stops at every round with probability 1/2, so Y ∼
Geo(1/2).
So, E[X] = 3 and E[Y ] = 2.
• Using the independence of the different tosses, both X and Y are independent.
Recall that for a geometric random variable, we have that for all k,
P[Y > k] =
∞
X
P[Y = m] =
m=k+1
=
∞
X
m=k+1
∞
X
( 21 )m−1 12
m=k+1
−(m−(k+1)) −(k+1)
2
2
−(k+1)
=2
·
∞
X
n=0
2−n = 2−(k+1) ·
1
= 2−k .
1 − 2−1
4
Using the law of total probability,
P[Y > X] =
∞
X
P[Y > X, X = k] =
k=1
=
∞
X
1
6
·
P[Y > k, X = k] =
k=1
2−k · ( 32 )k−1 13 =
1
3·2
·
∞
X
P[Y > k] · P[X = k]
k=1
∞
X
( 23 · 12 )k−1
k=1
k=1
=
∞
X
∞
X
3−m =
m=0
1
6
·
1
1
=
1 − 3−1
4
where we have used that X and Y are independent.
• Consider the k-th round. Let Ak be the event that the first player gets a number that is
divisible by 3 at this round, and let Bk be the event that the second player gets a number
that is even at this round. We know that all the events (Ak , Bk )k are independent.
Also, the event that there is a win or draw at the k-th round is Ak ∪ Bk . That is, at
every round, there is a win or draw with probability P[Ak ∪ Bk ] independently. Since
Ak , Bk are independent,
P[Ak ∪ Bk ] = 1 − P[Ack ∩ Bkc ] = 1 − P[Ack ] P[Bkc ] = 1 −
2
3
·
1
2
= 32 .
Thus, the number of rounds until there is a win or draw has Geo(2/3) distribution. Thus,
the expectation of the number of rounds until there is a win or draw is 3/2.
t
u
Question 5.
• Let X be the gain in one game. So P[X = 100] =
E[X] = 100 ·
1
102
+ (−1) ·
101
102
1
102
and P[X = −1] =
101
102 .
Thus,
1
= − 102
.
To compute the variance we first compute the second moment:
E[X 2 ] = 1002 ·
1
102
+ (−1)2 ·
101
102
=
10101
102 .
Thus,
Var[X] = E[X 2 ] − (E[X])2 =
10101 −
102
1
102
.
• Let Xk be the gain in the k-th game. Then SN = X1 + X2 + · · · + XN is the total
1
gain up to the N -th game. Thus E[SN ] = −N 102
. Since all Xk are independent,
Var[SN ] = Var[X1 ] + Var[X2 ] + · · · + Var[XN ] = N ·
1
10101− 102
102
.
5
Note that pN = P[SN ≥ 1]. The event SN ≥ 1 implies the event |SN − E[SN ]| >
1 − E[SN ]. So, using Chebychev’s inequality,
10101−
pN
1
102
N·
Var[SN ]
1
102
≤ P[|SN − E[SN ]| ≥ 1 + N 102
]≤
=
→ 0.
2
(1 + N/102)
(1 + N/102)2
t
u
© Copyright 2026 Paperzz