Sol So23
Sol So23
(a) [1 Point]
Let Ω be the sample space of all such codes. Write down Ω and give its cardinality |Ω|.
Solution:
An elementary event (or particular code) is
ω = (ω1 , ω2 , ω3 ) with ωi ∈ {0, 1, 2, 3, 4} for i ∈ {1, 2, 3}.
Thus, Ω = {(ω1 , ω2 , ω3 ) : ωi ∈ {0, 1, 2, 3, 4}} = {0, 1, 2, 3, 4}3 .
|Ω| = 53 .
In the following questions b)-d), we assume that the distribution of the codes follows a Laplace
model.
(b) [1 Point]
Compute the probability that all the digits are equal.
Solution:
Let E denote this event.
Then E = {(0, 0, 0); (1, 1, 1); (2, 2, 2); (3, 3, 3); (4, 4, 4)}.
Under the Laplace model assumption, we have that
|E| 5 1
P(E) = = 3 = .
|Ω| 5 25
(c) [1 Point]
Compute the probability that the 1st and the 3rd digits are equal.
Solution:
Let F denote this event.
Then, F = {(ω, ω2 , ω) : (ω, ω2 ) ∈ {0, 1, 2, 3, 4}} with |F | = 52 .
52
Hence, P(F ) = 53
= 15 .
(d) [1 Point]
Compute the probability that the digits are all different.
Solution:
Page 1 of 15
Probability and Statistics
Prof. Dr. F. Balabdaoui
14.08.2023
Question 2
In this question, we consider 4 people. We are interested in the days of the week on which they
were born. For example, (Monday, Monday, Wednesday, Sunday) is a possible answer when the 4
people are asked about this day of the week. We assume that all such possible answers have the same
probability to be given.
(a) [1 Point]
Write down Ω and give its cardinality |Ω|.
Solution:
Ω = {(day 1, day 2, day 3, day 4), day i ∈ {Mon, Tue, Wed, Thur, Fr, Sat, Sun}}.
|Ω| = 74 .
(b) [1 Point]
Compute the probability that all the 4 people were born on Monday.
Solution:
(c) [1 Point]
Compute the probability that all the 4 people were born on the same day of the week.
Solution:
(d) [1 Point]
Compute the probability that the 4 people were born on different days of the week.
Solution:
Page 2 of 15
Probability and Statistics
Prof. Dr. F. Balabdaoui
14.08.2023
(e) [2 Points]
Conclude from d) that the probability that at least 2 people were born on the same day of the
week is larger than 0.6.
Solution:
It is clear that the event that at least 2 people were born on the same weekday is Gc .
120 120 2
Then P(Gc ) = 1 − P(G) = 1 − 343
. Note that 343
< 0.4 = 5
since 600 < 343 × 2.
c
Therefore, P(G ) > 1 − 0.4 = 0.6.
Question 3
A school teacher has 2 boxes which contain books. We will call these boxes Box #1 and Box #2.
Box #1 contains: 1 English, 2 German and 2 French books.
Box #2 contains: 2 English, 3 German and 1 French books.
For her reading course, the teacher selects a box and then takes 2 books from this selected box.
In all the questions a)-c), it is assumed that each of the boxes can be selected with the same probability.
Also, from each of the boxes, the books can be selected with the same probability.
(a) [2 Points]
Compute the probability that the selected books are French and German books.
Solution:
Page 3 of 15
Probability and Statistics
Prof. Dr. F. Balabdaoui
14.08.2023
1 3 3
P(E) = 2
× 5
= 10
.
(b) [2 Points]
Compute the probability that the selected books are German books.
Solution:
Let F denote this event.
1
P(F ) = P(F |B1 ) + P(F |B2 )
2
2
2 1
P(F |B1 ) =
5
= .
10
2
3
2 3 1
P(F |B2 ) =
6
= = .
15 5
2
1 1 1 3
P(F ) = + = .
2 10 5 20
(c) [3 Points]
Let S = {The selected books are of the same language}. Given S, compute the conditional pro-
bability that Box #1 was selected.
Solution:
n
S = {Ger#1 #1 #1 #1
1 , Ger2 }, {Fr1 , Fr2 },
o
{Eng#2 #2 #2 #2 #2 #2 #2 #2
1 , Eng2 }, {Ger1 , Ger2 }, {Ger1 , Ger3 }, {Ger2 , Ger3 } .
P(S|B1 )P(B1 )
P(B1 |S) =
P(S|B1 )P(B1 ) + P(S|B2 )P(B2 )
with
|{{Ger1 , Ger2 }, {Fr1 , Fr2 }}| 2 1
P(S|B1 ) =
5
= 5 = ,
5
2 2
3
|A| + |B| 1+ 2 4
P(S|B2 ) =
6
=
6
= ,
15
2 2
where A = {Eng1 , Eng2 }, B = {{Ger1 , Ger2 }, {Ger1 , Ger3 }, {Ger2 , Ger3 }}.
1
Thus, P(B1 |S) = 1
5
+ 4 = 73 .
5 15
Question 4
Consider two random variables X and Y such that X and Y are independent and X ∼ Pois(λ),
Y ∼ Pois(µ) for λ ∈ (0, ∞) and µ ∈ (0, ∞).
Page 4 of 15
Probability and Statistics
Prof. Dr. F. Balabdaoui
14.08.2023
(a) [1 Point]
Write down the mathematical definition of independence of X and Y .
Solution:
(b) [2 Points]
Let S = X + Y . Show that S has a Poisson distribution and determine its parameter.
Solution:
Let s ∈ N0 .
P(S = s) = P(X + Y = s)
s
X
= P(X = x, Y = s − x)
x=0
Xs
= P(X = x)P(Y = s − x)
x=0
s
X λx e−λ µs−x e−µ
=
x=0 x! (s − x)!
s
e−λ−µ X
!
s
= λx µs−x
s! x=0 x
e−λ−µ
= (λ + µ)s .
s!
Thus, S ∼ Pois(λ + µ).
(c) [2 Points]
Fix s ∈ N0 . Determine the conditional distribution of X given the event {S = s}, that is, determine
P(X = x|S = s), x ∈ N0 .
Solution:
Page 5 of 15
Probability and Statistics
Prof. Dr. F. Balabdaoui
14.08.2023
(d) [2 Points]
Give E(X|S = s) and deduce E(X|S).
Solution:
λ λ
E(X|S = s) = λ+µ
s. E(X|S) = λ+µ
S.
(e) [2 Points]
If λ = µ, determine E(X|S) using only the symmetry in the problem and the properties of
conditional expectation.
Solution:
If λ = µ, E(X|S) = E(Y |S). Hence, S = E((X + Y )|S) = 2E(X|S) ⇒ E(X|S) = S/2.
Question 5
Consider a sequence of random variables (Xn )n≥1 such that
1 1
P(Xn = 0) = 1 − and P(Xn = nα ) =
n2 n2
for some α > 0.
(a) [1 Point]
Recall the definition of convergence in probability of some sequence of random variables (Xn )n≥1
to a random variable X.
Solution:
P
Xn →
− X if ∀ε > 0 n→∞
lim P(|Xn − X| > ε) = 0.
(b) [1 Point]
Show that the sequence (Xn )n≥1 converges to 0 in probability.
Solution:
Page 6 of 15
Probability and Statistics
Prof. Dr. F. Balabdaoui
14.08.2023
1
Hence, P(|Xn − 0| > ε) = P(Xn = nα ) = n2
↘ 0 as n → ∞.
(c) [1 Point]
lim E(Xnr ) = 0 if and only if r < α2 .
For r > 0, show that n→∞
Solution:
1 1
E(Xnr ) = 1 − n2
·0+ n2
· nα·r = nα·r−2 ↘ 0 as n → ∞ iff α · r < 2.
(d) [2 Points]
Does (Xn )n≥1 converge to 0 almost surely? Justify your answer.
Solution:
P(Xn = nα )
X X
P(|Xn − 0| > ε) =
n: n>ε1/α n: n>ε1/α
X 1
= < ∞.
n: n>ε1/α
n2
a.s.
By the result in the lecture, we conclude that Xn −−→ 0.
Question 6
The 2-dimensional movement in a unit square of some particle is random. The random position
(X, Y ) of the particle has a joint distribution that admits the density
with respect to Lebesgue measure on BR2 (the Borel σ-algebra on R2 ), for some c > 0.
(a) [1 Point]
Determine c.
Solution:
We must have ZZ
f (x, y) dx dy = 1,
R2
Page 7 of 15
Probability and Statistics
Prof. Dr. F. Balabdaoui
14.08.2023
1
and hence c = RR x2 y dx dy
.
[0,1]2
ZZ Z 1 Z 1 1 1 1
x2 y dx dy = x2 dx y dy = · = .
0 0 3 2 6
[0,1]2
Thus, c = 6.
(b) [2 Points]
Compute the marginal densities of X and Y , respectively.
Are X and Y independent? Justify your answer.
Solution:
Z Z 1
x2 y dy 1{0≤x≤1} = 3x2 1{0≤x≤1} .
fX (x) = f (x, y) dy = 6
R 0
Z Z 1
x2 y dx 1{0≤y≤1} = 2y 1{0≤y≤1} .
fY (y) = f (x, y) dx = 6
R 0
Since f (x, y) = fX (x)fY (y) ∀(x, y) ∈ R2 , we conclude that X and Y are independent.
(c) [2 Points]
Compute P(X ≤ 21 ) and P(max(X, Y ) ≤ 21 ).
Solution:
1 1
1 Z
2 2 1
P X≤ =3 x2 dx = x3 = ,
2 0 0 8
1 1 1 1 1
P max(X, Y ) ≤ = P X ≤ ,Y ≤ =P X≤ P Y ≤ ,
2 2 2 2 2
Z 1 1
1 2 2 1
P Y ≤ = 2y dy = y 2 = ,
2 0 0 4
1 1 1 1
⇒ P max(X, Y ) ≤ = · = .
2 8 4 32
(d) [2 Points]
Suppose that the particle can only move in the lower triangle {0 ≤ y ≤ x ≤ 1} and the density of
the random position is
f (x, y) = c′ x2 y 1{0≤y≤x≤1}
for some c′ > 0. Determine c′ .
Solution:
Page 8 of 15
Probability and Statistics
Prof. Dr. F. Balabdaoui
14.08.2023
ZZ Z 1Z x
x y 1{0≤y≤x≤1} dx dy =
2
y dy x2 dx
0 0
Z 1
x2 2 1Z 1 4 1
= x dx = x dx = .
0 2 2 0 10
Thus, c′ = 10.
Page 9 of 15
Probability and Statistics
Prof. Dr. F. Balabdaoui
14.08.2023
Hence,
n
1X
lX′ (λ) = −n + Xi = 0 ⇐⇒ λ = X̄n .
λ i=1
lX is strictly concave (λ 7→ −nλ is linear and λ 7→ log(λ) is strictly concave) and hence X̄n is
the global maximizer of l(X). In other words, the MLE is X̄n .
(b) [1 Point]
Write down the CLT for X̄n .
Solution:
√ d
Since E(Xi ) = λ0 and V(Xi ) = λ0 , we have that n(X̄n − λ0 ) −→ N (0, λ0 ).
(c) [3 Points]
Using the relevant theorems, show that
√
n(X̄n − λ0 ) d
−→ N (0, 1)
h(X̄n )
for some function h on (0, ∞) and specify the function h.
Solution:
Page 10 of 15
Probability and Statistics
Prof. Dr. F. Balabdaoui
14.08.2023
√
X̄n −λ0 )
n(√ d
We have λ0
−→ N (0, 1).
√ √ s
n(X̄n − λ0 ) n(X̄n − λ0 ) λ0
q = √ .
X̄n λ0 X̄n
q
λ0
Define f (x) = x
on (0, ∞). Since f is continuous, it follows from the WLLN and the
q
λ0 P
continuous mapping theorem that X̄n
−→ 1.
By the Slutsky’s Theorem, √
n(X̄n − λ0 ) d
q −→ N (0, 1).
X̄n
(d) [2 Points]
Deduce from c) a two-sided and symmetric confidence interval for λ0 with asymptotic level α,
α ∈ (0, 1).
Solution:
q q
z1−α/2 X̄n z1−α/2 X̄n
X̄n − √ , X̄n + √
n n
Question 8
The delay of some train is a random variable which we denote here by T . We assume that T admits
an absolutely continuous distribution with density which belongs to the parametric family
2(θ − t)
1t∈[0,θ] ,
n o
pθ (t) = θ ∈ (0, ∞) .
θ2
(a) [2 Points]
For a positive integer k ∈ N, show that
2θk
Eθ (T k ) = .
(k + 1)(k + 2)
Solution:
Page 11 of 15
Probability and Statistics
Prof. Dr. F. Balabdaoui
14.08.2023
Z
Eθ (T k ) = tk pθ (t) dt
R
2 Zθ k
= 2 t (θ − t) dt
θ 0
2 θk+1 θk+2
= 2 θ· −
θ k+1 k+2
k + 2 − (k + 1)
= 2θk
(k + 1)(k + 2)
2θk
= .
(k + 1)(k + 2)
(b) [2 Points]
Deduce from a) the expectation and variance of T when T ∼ pθ .
Solution:
2θ θ
Eθ (T ) = = .
2·3 3
Vθ (T ) = Eθ (T ) − (Eθ (T ))2
2
2θ2 θ2
= −
3·4 9
2 2
θ θ θ2
= − = .
6 9 18
(c) [2 Points]
Let T1 , . . . , Tn be i.i.d. delays of this train. We denote by θ0 the true unknown parameter.
Determine θ̂n the moment estimator of θ0 based on the observed delays.
Solution:
θ θ̂n
Eθ (T ) = 3
=⇒ X̄n = 3
=⇒ θ̂n = 3X̄n .
(d) [2 Points]
1 Pn
Recall the CLT for T̄n = n i=1 Ti and show that it implies that ∀z ∈ R
n
θ0 z √ θ0 1 Z +∞ − x2
X
Pθ0 Ti > √ n + n −−−−→ √ e 2 dx.
3 2 3 n→
− ∞ 2π z
i=1
Solution:
By the CLT, √ θ0
n(T̄n − 3
) d
q −→ N (0, 1),
θ02
18
Page 12 of 15
Probability and Statistics
Prof. Dr. F. Balabdaoui
14.08.2023
√ θ0
n(T̄n − ) Rz x2
√1 − 2
which means ∀z ∈ R Pθ0 3
≤ z −−−−→ −∞ e dx.
n→
−∞
θ0
√ 2π
3 2
√ θ0
√ θ0
n(T̄n − ) n(T̄n − ) R +∞ − x2
⇒ ∀z ∈ R Pθ0 3
> z = 1 − Pθ0 3
≤ z −−−−→ √1 e 2 dx
n→
−∞ z
θ0 θ0
√ √ 2π
3 2 3 2
Note that √ Pn
θ0 θ0 n
n(T̄n − 3
) 1 i=1 Ti − 3
θ√0 =√ θ√0
3 2
n 3 2
√ θ0 √
n(T̄n − ) Pn nθ0 θ0 n
and hence θ0
√
3
> z ⇐⇒ i=1 Ti >
√
3 2
z + 3
3 2
(e) [2 Points]
In this question, we assume that θ0 = 9 (minutes), and that the number of working days in a
month of an employee who takes this train is 20.
Show that the probability that the employee loses in a month more than 1 hour because of the
train delay is approximately 12 . (We assume that n = 20 is big enough for the convergence in d)
to hold).
Solution:
P20 1
With z = 0, Pθ0 ( i=1 Ti > 60) ≈ 2
(60 min = 1 hour).
Question 9
Let X denote either a random variable or a random sample. We assume that X admits a distribution
that has a density p with respect to a σ-finite dominating measure µ.
H0 : p = p0 versus H1 : p = p1 (⋆)
(a) [1 Point]
Recall the definition of a UMP test of level α ∈ (0, 1) for the testing problem in (⋆).
Solution:
ϕ : X → [0, 1] (X = X(Ω))
is a UMP test of level α if Ep0 [ϕ(X)] ≤ α and if for any other test ϕ̃ : X → [0, 1] such that
Ep0 [ϕ̃(X)] ≤ α we have that
Ep1 [ϕ̃(X)] ≤ Ep1 [ϕ(X)].
Page 13 of 15
Probability and Statistics
Prof. Dr. F. Balabdaoui
14.08.2023
(b) [2 Points]
Give the Neyman-Pearson test of level α for the problem in (⋆) by specifying all the quantities on
which it depends.
Solution:
p1 (X)
where kα is the (1 − α)-quantile of the distribution of p0 (X)
under H0 and qα ∈ [0, 1] is such
that Ep0 [ϕN P (X)] = α that is
! !
p1 (X) p1 (X)
Pp0 > kα + qα Pp0 = kα = α.
p0 (X) p0 (X)
(c) [2 Points]
Show that the Neyman-Pearson test is UMP of level α.
Solution:
Thus,
Z Z
ϕN P (x) − ϕ̃(x) p1 (x) dµ(x) ≥ kα ϕN P (x) − ϕ̃(x) p0 (x) dµ(x).
Ep1 [ϕN P (X)] − Ep1 [ϕ̃(X)] ≥ kα Ep0 [ϕN P (X)] − Ep0 [ϕ̃(X)] = kα α − Ep0 [ϕ̃(X)] ≥ 0.
Question 10
Let X1 , . . . , Xn be i.i.d. ∼ N (θ, σ 2 ) for (θ, σ 2 ) ∈ Θ = R × (0, ∞).
We want to test
H0 : θ = 0 versus H1 : θ ̸= 0.
Page 14 of 15
Probability and Statistics
Prof. Dr. F. Balabdaoui
14.08.2023
(a) [1 Point]
If σ = σ0 is known, construct a suitable test of level α.
Solution:
(b) [1 Point]
If σ is not known, construct a suitable test of level α.
Solution:
(c) [1 Point]
If H1 : θ > 0 and σ = σ0 is known, construct a suitable test of level α.
Solution:
Page 15 of 15