This is an HTML version of an attachment to the Freedom of Information request 'BSc Mathematics: Past Exam Papers'.


MATH40005 
BSc, MSci and MSc EXAMINATIONS (MATHEMATICS)
May-June 2020 
This paper is also taken for the relevant examination for the  
Associateship of the Royal College of Science 
Probability and Statistics 
Date: 14th May 2020 
Time: 09.00am – 12.00 noon (BST) 
Time Allowed: 3 Hours 
Upload Time Allowed: 30 Minutes 
This paper has 6 Questions. 
Candidates should start their solutions to each question on a new sheet of paper.
Each sheet of paper should have your CID, Question Number and Page Number on the 
top.
Only use 1 side of the paper.
Allow margins for marking. 
Any required additional material(s) will be provided. 
Credit will be given for all questions attempted.  
Each question carries equal weight.
SUBMIT YOUR ANSWERS AS SEPARATE PDFs TO THE RELEVANT DROPBOXES ON 
BLACKBOARD (ONE FOR EACH QUESTION) WITH COMPLETED COVERSHEETS WITH 
YOUR CID NUMBER, QUESTION NUMBERS ANSWERED AND PAGE NUMBERS PER 
QUESTION. 
© 2020 Imperial College London
Page 1 

Throughout the exam, we assume that (ΩP) denotes a probability space.
Please remember to justify all your answers and state carefully which results from the
lectures you apply in your proofs.

1. (a)
Define a σ-algebra.
(3 marks)
(b)
Define a probability measure on (ΩF ).
(3 marks)
(c)
A diagnostic test has a probability 0.9 of giving a positive result when applied to a person
suffering from a certain disease, and a probability 0.2 of giving a (false) positive when applied
to a non-sufferer. It is estimated that 10 % of the population are sufferers. Suppose that the
test is now administered to a person about whom we have no relevant information relating
to the disease (apart from the fact that he/she comes from this population). Calculate the
following probabilities:
(i)
that the test result will be positive;
(3 marks)
(ii)
that, given a positive result, the person is a sufferer;
(3 marks)
(d)
How many possibilities are there to write the number 7 as an ordered sum of 3 positive
integers? [E.g. 7=1+3+3 would be one possible case and 7=3+1+3 would be another case.]
(4 marks)
(e)
Let k, n ∈ N = {12, . . .}. How many possibilities are there to write the number as an
ordered sum of positive integers?
(4 marks)
(Total: 20 marks)
MATH40005 Probability and Statistics (2020)
Page 2

2. (a)
Let (ΩP) be a probability space with Ω = {12, . . . , 10} and F = P(Ω) (the power
σ-algebra of Ω). Let : Ω → R with X(ω) = ω + 5. Prove that is a discrete random
variable.
(3 marks)
(b)
Let (ΩP) be a probability space with Ω = {12, . . . , 100} and F = P(Ω) (the power σ-
algebra of Ω). Consider a discrete random variable on this probability space with probability
mass function given by P(= 3) = 1 P(= 5) = 1 P(= 100) = 3 P(x) = 0 for
2
5
10
6∈ {35100}. Find the cumulative distribution function FX of X.
(4 marks)
(c)
Let and denote independent geometric random variables with parameters p1 and p2,
respectively, where p1, p2 ∈ (01). (Please refer to the hint below for the probability mass
function of a geometric random variable.)
(i)
Derive the cumulative distribution functions of and .
(3 marks)
(ii)
Show that = min{X, Y } follows a geometric distribution and find the corresponding
parameter.
(4 marks)
(d)
Imagine you toss a fair coin repeatedly. You denote by the outcome Heads and by the
outcome Tails. How many times, on average, do you need to toss the coin to see the pattern
HT (i.e. Heads followed by Tails) for the first time?
(6 marks)
(Total: 20 marks)
Hint:
If is geometrically distributed with parameter ∈ (01), then its probability mass function
pX is given by



(1 − p)x−1p,
for = 12, . . . ,

pX(x) =


0,
otherwise.

MATH40005 Probability and Statistics (2020)
Page 3

3. (a)
Which properties does a function : R → R need to satisfy in order to be a valid probability
density function?
(2 marks)
(b)
For each of the functions (x) given below determine whether (x) is a valid probability
density function (p.d.f.). If (x) is not a valid p.d.f., determine if there exists a constant
such that cf (x) is a valid p.d.f.. Note that in each case, (x) = 0 for all not in the
interval(s) specified.
(i)
(x) = 3for 0 < x < 1,
(2 marks)
(ii)
(x) = −1 for 0 < x < 1,
(2 marks)
(iii)
(x) = 1 for 0 < x < 1 and (x) = −1 for 1 < x < 2.
(2 marks)
(c)
Consider three jointly continuous random variables X, Y, Z with joint probability density
function given by



c,
for 0 < x < y < z < 1,

fX,Y,Z(x, y, z) =


0,
otherwise,

for a constant ∈ R.
(i)
Show that = 6.
(3 marks)
(ii)
Find E(XY Z).
(3 marks)
(d) (i)
Define a partition of the sample space Ω and give an example of (ΩF ) with a valid
partition.
(3 marks)
(ii)
Prove the law of the total expectation for a discrete random variable X. I.e. consider
a partition {Bi ∈ I} of Ω with P(Bi0 for all ∈ I. Let denote a discrete
random variable with finite expectation. Show that
E(X) = X E(X|Bi)P(Bi),
i∈I
whenever the sum converges absolutely.
(3 marks)
(Total: 20 marks)
MATH40005 Probability and Statistics (2020)
Page 4

4. (a)
Suppose that the random variables X1, X2, . . . , Xn are independent and each follows a normal
distribution with mean µ and variance σ2. We define the following estimators
n
1
n
n
=
X
X
X
i,
S2 =
(Xi − X)2,
=
(Xi − X)2,
n
− 1
n
i=1
i=1
i=1
where is an estimator of µ, and S2 and are estimators of σ2. Carefully justifying all your
steps and stating any results used:
(i)
Find the distribution of X.
(3 marks)
(ii)
Given that E(S2) = σ2, compute E(Z).
(1 mark)
2σ4
(iii)
Given that Var(S2) =
, compute Var(Z).
(1 mark)
− 1
(iv)
Compute the bias of Z.
(1 mark)
(v)
Compute the mean squared error of Z.
(2 marks)
(vi)
Choose a constant so that the quantity bZ has a chi-squared distribution,
and state the degrees of freedom for this chi-squared distribution.
(2 marks)
(vii)
Compute Cov(X, Z).
(2 marks)
(b)
Markov’s inequality states that if a random variable can only take nonnegative values, then
E(X)
P(≥ a) ≤
,
for all a > 0.
a
Prove Markov’s inequality.
(4 marks)
(c)
Suppose that a medical research lab is testing for the association of different genetic variants
with a particular disease. The research team decides in advance that a significance threshold
of α = 0.01 will be used for each test. A total of 100 genetic variants are tested for association
based on the data the team has available. The following table lists the five smallest p-values
(in decreasing order) and the genetic variants for which these p-values were found:
Genetic variant
A
B
C
D
E
p-value from test
3 × 10−2
9 × 10−3
4 × 10−4
2 × 10−5
5 × 10−6
Which of the genetic variants in the table (if any) should the research team declare to be
significantly associated with the disease given the data, the statistical test and the significance
threshold that were used? Provide justification and state any results used.
(4 marks)
(Total: 20 marks)
MATH40005 Probability and Statistics (2020)
Page 5

5. (a)
Given a sample of real-valued observations x1, x2, . . . , xn, prove that for any constant ∈ R
n
n
X(x
X
− x)2 ≤
(xi − a)2,
i=1
i=1
where = 1 Pn
x
n
i=1
is the sample mean of the observations.
(4 marks)
(b)
Given pairs of observations (x1, y1)(x2, y2), . . . , (xn, yn) for quantities and , define
the sample means = 1 Pn
x
Pn
y
n
i=1
and = 1
n
i=1
and define
n
n
n
S
X
X
X
xx =
(xi − x)2,
Syy =
(yi − y)2,
Sxy =
(xi − x)(yi − y).
i=1
i=1
i=1
Consider the model given by
yi β0 + β1xi ei,
∈ {12, . . . , n},
where the ei∈ {12, . . . , n}, are unobservable errors. Find the estimates b
β0 and b
β1 of the
parameters β0 and β1, respectively, such that
n
n
X(y
X
− b
β0 − b
β1xi)2 = min
(yi − b0 − b1xi)2.
b
i=1
0,bi=1
(7 marks)
(c)
Suppose we have two samples of data, independent observations x1, x2, . . . , xn of the random
variable and independent observations y1, y2, . . . , ym of the random variable . We wish
to use the two-sample t-test to decide whether or not µX = E(X) and µY = E() are equal.
(i)
What is the null hypothesis for the t-test in this case?
(1 mark)
(ii)
What assumptions are required in order to have theoretical justification for conducting
the t-test in this case?
(2 marks)
(d)
Suppose that the random variables X1, X2, . . . , Xn are independent and identically distributed
according to a uniform distribution on the closed interval [0, θ], for some parameter θ > 0,
where the exact value of the parameter θ is unknown. Given that = (X1, X2, . . . Xn)
is observed as = (x1, x2, . . . , xn), find the maximum likelihood estimator of θ. Provide
justification for all of your steps.
(6 marks)
(Total: 20 marks)
Hint:
If is uniformly distributed on the interval [a, b], with a < b, then its probability density
function fX is given by


1

,
for ∈ [a, b],

f
ba
(x) =


0,
otherwise.

MATH40005 Probability and Statistics (2020)
Page 6

Note that this question is split over two pages. Please turn the page to see the rest of
Question 6.

6. (a)
Suppose that the random variables Y1, Y2, . . . , Yn are independent and identically distributed
according to a distribution FY , which has an unknown mean µ that we wish to estimate.
Suppose that = (Y1, Y2, . . . , Yn) is observed as = (y1, y2, . . . , yn), and we are given that
n
1
n
=
y
X
= 5,
(yi − y)2 = 4,
= 10.
n
− 1
i=1
i=1
Noting that you have access to Tables 1 and 2 below:
(i)
If we can assume that the random variables Y1, Y2, . . . , Yn are normally distributed with
variance Var() = σ2 = 9, construct a 90% confidence interval for the unknown mean
µ based on the data y.
(2 marks)
(ii)
If we can assume that the random variables Y1, Y2, . . . , Yn are normally distributed but the
variance Var() = σ2 is unknown, construct a 95% confidence interval for the unknown
mean µ based on the data y.
(2 marks)
(iii)
If we cannot assume that the random variables Y1, Y2, . . . , Yn are normally distributed but
we can assume that the variance is Var() = σ2 = 16, construct a confidence interval
for the unknown mean µ = E() which has coverage probability at least 0.99, whatever
the distribution of FY .
(2 marks)
Table 1: Partial table showing values of
Table 2: Partial table showing
for P(T < t), where has Student’s
values of for P(Z < z), where
t-distribution with ν degrees of freedom
has a standard normal distribution
ν
0.90
0.95
0.975
0.99
z
P(Z < z)
7
1.415
1.895
2.365
2.998
1.281
0.900
8
1.397
1.860
2.306
2.896
1.645
0.950
9
1.383
1.833
2.262
2.821
1.960
0.975
10
1.372
1.812
2.228
2.764
2.326
0.990
[IMPORTANT: Question 6 continues on the next page.]
MATH40005 Probability and Statistics (2020)
Page 7

[Question 6 continues on this page]
(b)
Suppose one fits a simple linear regression model to the data (x1, y1)(x2, y2), . . . , (xn, yn)
as
Yi β0 + β1g(xi) + i,
∈ {12, . . . , n},
where : R → R is some univariate transformation and = 20.
(i)
What joint distribution are the errors assumed to follow?
(1 mark)
(ii)
For two different choices of transformation g, one has two models with the fitted residuals
byi − b
β0 − b
β1g(xi) shown in the figures below. For each model, state whether the
model fits the data well or not and justify your answer.
(4 marks)
Model 1
Model 2
0.8
0.4
0.6
 i
 i
b
b
0.4
value
0.2
value
0.2
0.0
Residual
Residual
0.0
-0.2
-0.4
-0.2
0
20
40
60
0
20
40
60
Value of xi
Value of xi
(c)
Suppose that the random variables Z1, Z2, . . . , Zn are independent and identically distributed
as an exponential distribution with unknown parameter θ, which has probability density
function
(z) = θ exp(−θz),
with support z > 0.
Following a Bayesian approach and assuming that θ is a random variable with a Γ(α, β) prior
which has probability density function
βα
π(θ) =
θα−1 exp(−βθ),
with support θ > 0,
Γ(α)
and given that = (Z1, Z2, . . . , Zn) is observed as = (z1, z2, . . . , zn), find the posterior
distribution of θ given and give the name of this distribution.
(3 marks)
(d)
Suppose that a random variable has mean E(X) = 2, another random variable has
mean E() = 3, and it is known that E(XY ) = 4. It is also known that 2 ≤ ≤ 5. Find a
nontrivial lower bound on the standard deviation of X.
(6 marks)
(Total: 20 marks)
MATH40005 Probability and Statistics (2020)
Page 8

BSc and MSci EXAMINATIONS (MATHEMATICS)
May 2020
This paper is also taken for the relevant examination for the Associateship.
M40005
Probability and Statistics (Solutions)
Setter’s signature
Checker’s signature
Editor’s signature
. . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . .
c
 2020 Imperial College London
M40005
Page 1 of 16

seen ⇓
1.
(a)
Let Ω be a set. A collection of subsets of Ω denoted by F is called a σ-algebra if
1. ∅ ∈ F ,
2. F is closed under complements, i.e. A ∈ F ⇒ Ac ∈ F , and
3. F is closed under countable union, i.e. A1, A2, · · · ∈ F ⇒ ∪∞ A
i=1
i ∈ F .
3, A
(b)
A mapping P : F → R is called a probability measure on (Ω, F) if it satisfies three
seen ⇓
conditions:
(i) P(A) ≥ 0 for all events A ∈ F ,
(ii) P(Ω) = 1,
(iii) For any sequence of disjoint events A1, A2, A3, · · · ∈ F we have
  ∞
!

[
X
P
Ai
=
P(Ai).
i=1
i=1
[Note that by ”disjoint events” we mean that Ai ∩ Aj = ∅ for all i 6= j.]
3, A
(c)
Let T ≡ “Test positive”, S ≡ “Sufferer”. Then P(T |S) = 0.9, P(T |Sc) = 0.2,
sim. seen ⇓
P(S) = 0.1.
(i)
Using the law of total probability, we have
9
1
2
9
P(T ) = P(T |S)P(S) + P(T |Sc)P(Sc) =
×
+
×
= 0.27.
10
10
10
10
3, B
(ii)
By Bayes’ formula, we have
P(T |S)P(S)
9 × 1
1
P(S|T ) =
= 10
10 = .
P(T )
27
3
100
3, B
(d)
We present an elementary solution here, followed by the general solution in Part
(b): We can write down all possible 3-tuples of numbers which sum up to 7:
unseen ⇓
∗ (1, 3, 3) with 3!/2! = 3 possible arrangements (where we adjusted for over-
counting since the number 3 appears twice),
∗ (1, 1, 5) with 3!/2! = 3 possible arrangements,
∗ (2, 2, 3) with 3!/2! = 3 possible arrangements,
∗ (1, 2, 4) with 3! = 6 possible arrangements.
Hence there are 3 + 3 + 3 + 6 = 15 possibilities of writing the number 7 as a sum
of 3 positive integers.
4, B
(e)
We can use a stars and bars argument:
unseen ⇓
1, C
Clearly, there are 0 possibilities if k < n. Suppose that k ≥ n. Then we represent
the number k as k stars which we would like to place in n bins such that each
bin contains at least one object (since we have the restriction that all addends are
positive integers). We can first write the k stars in one line. Then there are k − 1
possible gaps between the stars, where a bar could be inserted to separate the bins.
We need to select n − 1 gaps out of the k − 1 gaps, to create the n bins, so in
total we have k−1 possibilities.
3, D
n−1
E.g. in the case of Part (a), one possible configuration is ∗| ∗ ∗ ∗ | ∗ ∗∗, where we
have 1 star in the first bin, followed by 3 stars in the next bin, followed by 3 stars
in the last bin.
M40005 Probability and Statistics (Solutions) (2020)
Page 2 of 16

meth seen ⇓
2.
(a)
We check the two defining properties of a discrete random variable:
∗ ImX is a countable subset of R since ImX = {ω + 5 : ω ∈ Ω} = {6, 7, . . . , 15}
is a finite set.
∗ X−1(x) ∈ F for all x ∈ R since,
1, C
· for all x ∈ ImX, we have X−1(x) = {ω ∈ Ω : X(ω) = x} = {x − 5} ∈ Ω
and since F = P(Ω), we have that X−1(x) ∈ F , and
· for all x ∈ R \ ImX, we have X−1(x) = ∅ ∈ F.
2, C
(b)
The cumulative distribution function is given by
meth seen ⇓

0,
for x ∈ (−∞, 3),



1

,
for x ∈ [3, 5),
F
2
X (x) = P(X ≤ x) =
7 ,
for x ∈ [5, 100),

10



1,
for x ∈ [100, ∞).
4, A
(c) (i)
First we derive the cumulative distribution function of a geometric distribution.
meth seen ⇓
Let k ∈ N, then
k
k−1
X
X
FX (k) = P(X ≤ k) =
(1 − p1)x−1p1 =
(1 − p1)xp1
x=1
x=0
geom. series
1 − (1 − p1)k
=
p1
= 1 − (1 − p1)k.
1 − (1 − p1)
So, in general we have
2, A
(
0,
if x < 1,
FX (x) =
1 − (1 − p1)bxc,
if x ≥ 1.
Hence P(X > x) = (1 − p1)bxc for x ≥ 1. Similarly,
(
0,
if y < 1,
FY (y) =
1 − (1 − p2)byc,
if y ≥ 1.
1, B
(ii)
Then, for z < 1 we have FZ(z) = 0 and for z ≥ 1, we have
unseen ⇓
P(Z ≤ z) = 1 − P(Z > z) = 1 − P(X > z, Y > z)
X,Y independent
=
1 − P(X > z)P(Y > z)
= 1 − (1 − p1)bzc(1 − p2)bzc = 1 − {1 − [1 − (1 − p1)(1 − p2)]}bzc.
Hence we deduced that Z follows the geometric distribution with parameter
1 − (1 − p1)(1 − p2).
4, C
M40005 Probability and Statistics (Solutions) (2020)
Page 3 of 16

(d)
We recall that the geometric distribution (as defined in the hint) arises when we
count the number of independent Bernoulli trials needed to obtain the first success.
Here we first need to wait until we see the first Heads appearing. This waiting time
can hence be described by a geometric random variable X, say, with parameter 0.5
(since the coin is fair). After we have obtained Heads for the first time, we need to
continue tossing the coin until we obtain Tails for the first time after having tossed
Heads. Again, this waiting time can be described by a geometric random variable
Y , say, with success probability 0.5.
3, D
We need to compute the mean of a geometric distribution:



X
X
X
E(X) =
xP(X = x) =
x(1 − p)x−1p = p
x(1 − p)x−1.
x=1
x=1
x=1
Note that
1, B


X
d X
x(1 − p)x−1 = (−1)
(1 − p)x
dp
x=1
x=0
geom. series
d
1
d
=
(−1)
= −
p−1 = p−2.
dp 1 − (1 − p)
dp
Hence
E(X) = p × p−2 = p−1.
Overall, we get that, on average, we need to wait for
1, C
E(X) + E(Y ) = 2 + 2 = 4
tosses.
1, A
M40005 Probability and Statistics (Solutions) (2020)
Page 4 of 16

seen ⇓
3.
(a)
We need that f (x) ≥ 0 for all x ∈ R and that R ∞ f (x)dx = 1.
−∞
1
(b) (i)
We have R 1 3xdx = 3 x2 = 3 . Hence, f is not a valid p.d.f.. However, if we
0
2
0
2
2, A
choose c = 2 , then cf (x) ≥ 0 for all x ∈
cf (x)dx = 1.
3
R and R ∞
−∞
meth seen ⇓
(ii)
f is not a valid p.d.f. since it takes negative values. However, if we choose
c = −1, then cf (x) ≥ 0 for all x ∈
cf (x)dx = 1.
2, A
R and R ∞
−∞
(iii)
f is not a valid p.d.f. since it takes negative values. Since it takes positive and
2, A
negative values we cannot find a constant c which ensures that cf (x) ≥ 0 for
all x ∈ R.
2, A
(c) (i)
We compute
meth seen ⇓
Z
∞ Z ∞ Z ∞
Z
1 Z z Z y
Z
1 Z z
fX,Y,Z(x, y, z)dxdydz =
cdxdydz =
cydydz
−∞
−∞
−∞
0
0
0
0
0
Z
1 c
c
=
z2dz =
.
0
2
6
Hence, we need to choose c = 6 to obtain a nonnegative function which
integrates to 1.
3, D
unseen ⇓
(ii)
We use the three-dimensional law of the unconscious statistician to conclude
that
Z
∞ Z ∞ Z ∞
Z
1 Z z Z y
E(XY Z) =
xyzfX,Y,Z(x, y, z)dxdydz = 6
xyzdxdydz
−∞
−∞
−∞
0
0
0
Z
1 Z z 1
Z
1 1
3
1
= 6
y3zdydz = 3
z5dz =
=
.
0
0
2
0
4
4 × 6
8
3, D
seen ⇓
(d) (i)
A partition of the sample space Ω is a collection {Bi : i ∈ I} (for a countable
index set I) of disjoint events (meaning that Bi ∈ F and Bi ∩ Bj = ∅ for
i 6= j) such that Ω = Si∈I Bi.
2, A
Example: Ω = {0, 1}, F = {∅, {0}, {1}, Ω} and partition {{0}, {1}}.
1, A
seen ⇓
(ii)
First we use the definition of the expectation, followed by the law of total
probability:
X
X
X
E(X) =
xP(X = x) =
x
P(X = x|Bi)P(Bi)
x
x
i∈I
X
X
X
=
P(Bi)
xP(X = x|Bi) =
P(Bi)E(X|Bi).
i∈I
x
i∈I
We use the fact that the series is absolutely convergent to justify that we are
allowed to change the order of summation.
3, B
M40005 Probability and Statistics (Solutions) (2020)
Page 5 of 16

4.
(a) (i)
By a result in lectures (can be shown using moment generating functions)
seen ⇓
Each Xi is normally distributed,
1
⇒Each
Xi is normally distributed,
n
n


X
1
⇒X =
Xi
is normally distributed.
n
i=1
Using the linearity of expectation,
1, A
n
n
1 X
1 X
1
E(X) =
E(Xi) =
µ =
(nµ) = µ.
n
n
n
i=1
i=1
Since the Xi are independent, using properties of the variance operator,
1, A
n
n
1 X
1 X
1
σ2
Var(X) =
Var(Xi) =
σ2 =
(nσ2) =
.
n2
n2
n2
n
i=1
i=1
1, A
(It would also be acceptable to state that E(X) = µ and Var(X) = σ2
n
by a result proved in lectures, since the X1, X2, . . . , Xn are independent and
identically distributed.) Therefore, X ∼ N(µ, σ2 ).
n
meth seen ⇓
(ii)
Noticing that Z = n−1 S2 and using the linearity of expectation,
n
 n − 1

n − 1
 n − 1 
E(Z) = E
S2
=
E S2 =
σ2.
n
n
n
1, A
meth seen ⇓
(iii)
Noticing that Z = n−1 S2 and using the property of the variance,
n
 n − 1

 n − 1 2
 n − 1 2 2σ4
Var(Z) = Var
S2
=
Var S2 =
n
n
n
n − 1
2(n − 1)σ4
⇒ Var(Z) =
.
n2
1, A
sim. seen ⇓
(iv)
The bias of an estimator b
Θ of a parameter θ is defined as bθ( b
Θ) = E( b
Θ) − θ.
Therefore, using the result from (ii), the bias of Z estimating σ2 is
 n − 1 
 −1 
bσ2( b
Z) = E(Z) − σ2 =
σ2 − σ2 =
σ2.
n
n
1, A
M40005 Probability and Statistics (Solutions) (2020)
Page 6 of 16

(v)
A theorem was proved in lectures which stated that, for any estimator b
Θ of a
meth seen ⇓
parameter θ, the mean squared error of b
Θ is
h
i2
E[( b
Θ − θ)2] = bθ( b
Θ)
+ Var( b
Θ),
where bθ( b
Θ) is the bias b
Θ. Therefore, using the results from (iii) and (iv),
E[(Z − σ2)2] = [bσ2(Z)]2 + Var(Z)
 −1 
2
2(n − 1)σ4
=
σ2
+
n
n2
σ4
(2n − 2)σ4
(2n − 1)σ4
=
+
=
.
n2
n2
n2
2, A
sim. seen ⇓
(vi)
Since the X1, X2, . . . , Xn are i.i.d. N(µ, σ2), a theorem from lectures states
that
(n − 1)S2 ∼ χ2
σ2
n−1,
where χ2
is a chi-squared distribution with n − 1 degrees of freedom. Then,
n−1
taking b = n > 0,
σ2
nZ
(n − 1)S2
bZ =
=
∼ χ2
σ2
σ2
n−1.
2, B
sim. seen ⇓
(vii)
Since the X1, X2, . . . , Xn are i.i.d. N(µ, σ2), a theorem from lectures states
that X and S2 are independent.
Therefore, using the (bi)linearity of the
covariance,
n − 1
n − 1
n − 1
Cov(X, Z) = Cov(X,
S2) =
Cov(X, S2) =
× 0 = 0
n
n
n
since the covariance of two independent random variables is 0 (by another
result in lectures).
2, B
M40005 Probability and Statistics (Solutions) (2020)
Page 7 of 16

seen ⇓
(b)
Fix a positive number a > 0, and define the random variable
(0,
if X < a,
Ya =
a,
if X ≥ a.
This definition of Ya ensures that Ya ≤ X for all values of a and X. Therefore:
E(Ya) ≤ E(X).
2, B
On the other hand, since Ya is a discrete random variable, one can computes its
expectation as
E(Ya) = 0 × P(X < a) + a × P(X ≥ a).
1, A
Combining the above equations, one obtains
a × P(X ≥ a) ≤ E(X),
from which the Markov inequality follows.
1, A
sim. seen ⇓
(c)
Although four of the five p-values in the table are below the threshold α = 0.01,
we need to account for the multiple testing and include a correction for multiple
hypothesis testing.
1, C
Since there are 100 tests, if we use the Bonferroni correction the adjusted
significance threshold would be α0 = α/100 = 0.0001 = 10−4.
2, C
Comparing the p-values in the table to this adjusted threshold, we see that only
2 × 10−5 < α0 and 5 × 10−6 < α0. Therefore, the research team should only
conclude that two of the genetic variants, Genetic variant D and Genetic variant
E, are significantly associated with the disease.
1, C
M40005 Probability and Statistics (Solutions) (2020)
Page 8 of 16

seen ⇓
5.
(a)
n
n
X
X
(xi − a)2 =
[(xi − x) + (x − a)]2
i=1
i=1
n
X
=
[(xi − x)2 + 2(xi − x)(x − a) + (x − a)2]
i=1
n
n
n
X
X
X
=
(xi − x)2 + 2(x − a)
(xi − x) +
(x − a)2
i=1
i=1
i=1
n
X
=
(xi − x)2 + 2(x − a) × 0 + n(x − a)2
i=1
n
X
=
(xi − x)2 + n(x − a)2,
i=1
where between the third line and the fourth line we used
1, A
n
n
n
X
X
X
(xi − x) =
xi −
x = nx − nx = 0.
i=1
i=1
i=1
Since n(x − a)2 ≥ 0,
1, A
n
n
X
X
(xi − a)2 ≥
(xi − x)2,
i=1
i=1
with equality only when x = a, which proves the result.
2, A
M40005 Probability and Statistics (Solutions) (2020)
Page 9 of 16

seen ⇓
(b)
Define G(b0, b1) := Pn [y
i=1
i − b0 − b1xi]2. Then
n
n
X
X
G(b0, b1) =
[yi − (b0 + b1xi)]2 =
[(yi − b1xi) − b0]2.
i=1
i=1
1, A
Using 2 (a), this is minimised when
n
1 X
b0 =
(yi − b1xi) = y − b1x.
n i=1
2, A
Returning to the expression for G(b0, b1), and substituting in the value we have
just found for b0,
n
X
G(b0, b1) =
[(yi − b1xi) − b0]2
i=1
n
X
=
[(yi − b1xi) − (y − b1x)]2
i=1
n
X
=
[(yi − y) − b1(xi − x)]2
i=1
n
X
=
[(yi − y)2 − 2b1(xi − x)(yi − y) + b21(xi − x)2] = Syy − 2b1Sxy + b21Sxx.
i=1
Completing the square,
1, A
G(b0, b1) = Syy − 2b1Sxy + b21Sxx

S

xy
Syy
= Sxx b2 −
1
2b1
+
Sxx
Sxx
 
S

2

2 !
xy
Sxy
Syy
Sxy
= Sxx
b2 −

1
2b1
+
+
Sxx
Sxx
Sxx
Sxx
 
S
2

2 !
xy
Syy
Sxy
= Sxx
b1 −
+

Sxx
Sxx
Sxx

S
2
xy
(Sxy)2
= Sxx b1 −
+ Syy −
Sxx
Sxx
which shows that G(b0, b1) is minimised when b1 = Sxy . Therefore, the parameter
2, B
Sxx
values that minimise G(b0, b1) are
 S

xy
b
β0 = y − b
β1x = y −
x,
Sxx
Sxy
b
β1 =
.
Sxx
1, A
Note that a calculus-based solution is also acceptable, provided it proves that b
β0
and b
β1 minimise G(b0, b1) globally.
M40005 Probability and Statistics (Solutions) (2020)
Page 10 of 16

seen ⇓
(c) (i)
The null hypothesis is that the means µX and µY are equal, i.e.
H0 : µX = µY .
1, A
(ii)
In order to use the t-test with full theoretical justification, it must be assumed
that the random variables X and Y follow normal distributions and that
Var(X) = Var(Y ).
2, B
(The t-test can be applied in the case that Var(X) 6= Var(Y ) by using an
approximation, but then the test is not exact.)
unseen ⇓
(d)
The probability density function f (xi|θ) for observation xi, where i ∈ {1, 2, . . . n},
has the form
(
1 ,
if 0 ≤ x
f (x
θ
i ≤ θ,
i|θ) =
0,
otherwise.
Since the random variables X1, X2, . . . , Xn are independent, the joint probability
density function f (x|θ) of X1, X2, . . . , Xn can be written as
n
(
1
Y
,
if 0 ≤ x
f (x|θ) =
f (x
θn
i ≤ θ, for all i ∈ {1, 2, . . . n},
i|θ) =
0,
otherwise.
i=1
2, D
Since the joint likelihood L(θ|x) = f (x|θ), the maximum likelihood estimate of θ
must be a value of θ such that (i) xi ≤ θ for i ∈ {1, 2, . . . n} and (ii) this value
maximises 1/θn among all possible values for θ.
Since 1/θn is a decreasing function of θ, the maximum likelihood estimate will be
the smallest value of θ such that xi ≤ θ for i ∈ {1, 2, . . . n}.
Therefore, the maximum likelihood estimate of θ is b
θ = max{x1, x2, . . . , xn}, and
the maximum likelihood estimator is b
θ = max{X1, X2, . . . , Xn}.
4, D
M40005 Probability and Statistics (Solutions) (2020)
Page 11 of 16

meth seen ⇓
6.
(a)
Confidence intervals:
(i)
Since Y ∼ N (µ, σ2 ), and for Z ∼ N (0, 1) it is given in the table that
n
P(−1.645 < Z < 1.645) ≈ 0.90, we can construct a 90% confidence interval
for µ as
σ
σ
3
3
(y − 1.645 √ , y + 1.645 √ ) = (5 − 1.645 √
, 5 + 1.645 √
).
n
n
10
10
2, A
(ii)
If we cannot assume the variance is known, we can use the t-distribution with
the sample variance, which in this case is given as s2 = 4.
1, A
Using the table, we need to look up the value for 10−1 = 9 degrees of freedom.
The table gives this value as 2.262 (since for a 95% confidence interval,
P(−2.262 < T < 2.262) ≈ 0.95). Therefore, a 95% confidence interval is
s
s
2
2
(y − 2.262 √ , y + 2.262 √ ) = (5 − 2.262 √
, 5 + 2.262 √
).
n
n
10
10
1, B
(iii)
In the case we do not know the distribution, we can use Chebyshev’s inequality
which states that for any k > 0,
σ
1
P(|Y − µ| < k √ ) ≥ 1 −
n
k2

σ
σ 
1
⇒ Y − k √
< µ < Y + k √
≥ 1 −
.
n
n
k2
Taking k = 10, we have the 99% confidence interval
4
4
(5 − 10 √
< µ < 5 + 10 √
)
10
10


= (5 − 4 10 < µ < 5 + 4 10).
2, C
M40005 Probability and Statistics (Solutions) (2020)
Page 12 of 16

(b) (i)
Each 
seen ⇓
i is assumed to follow a normal distribution with mean 0 and unknown
variance σ2, for i ∈ {1, 2, . . . , n}, and the i are also assumed to be
independent. In other words,  = (1, 2, . . . , n) follows a joint (multivariate)
1, B
Gaussian distribution with mean 0 = (0, 0, . . . , 0)T and covariance


σ2
0
. . .
0
 0
σ2
. . .
0 
Σ = 

 ..
..
. .
.. 
 .
.
.
. 


0
0
. . .
σ2
(i.e. a covariance matrix with each entry on the diagonal equal to σ2 and all
other entries 0).
sim. seen ⇓
(ii)
Model 1 does not appear to fit the data well.
1, B
The reason is that there is clearly trend in the residuals (or: they appear to
follow a ”U”-shape), and they do not appear to be independently normally
distributed.
1, C
Model 2 appears to fit the data well.
1, B
The reason is that the residuals appear to be normally distributed around 0,
and they appear to be independent of each other.
1, B
M40005 Probability and Statistics (Solutions) (2020)
Page 13 of 16

Pn
seen ⇓
(c)
Since the random variables Zi are independent and since z = 1
z
n
i=1
i, the joint
probability density function of Z = (Z1, Z2, . . . , Zn) given θ is
n
n
 
n
!
Y
Y
X
f (z|θ) =
f (zi|θ) =
θ exp(−θzi) = θn exp −θ
zi
= θn exp(−θnz),
i=1
i=1
i=1
for z1, z2, . . . , zn > 0, otherwise f (z|θ) = 0.
Note that this is the same as the likelihood of θ given the data z.
The posterior
1, A
probability density function is proportional to the product of the prior and the
likelihood:
βα
π(θ|z) ∝ f (z|θ)π(θ) = θn exp(−θnz)
θα−1 exp(−βθ)
Γ(α)
1, C
∝ θn+α−1 exp(−θ(nz + β))
 (nz + β)n+α 

θn+α−1 exp(−θ(nz + β)).
Γ(n + α)
This last expression is the probability density function of a Γ(n + α, nz + β)
distribution, which shows that the posterior distribution of θ is a Γ(n + α, nz + β)
distribution.
1, C
M40005 Probability and Statistics (Solutions) (2020)
Page 14 of 16

unseen ⇓
(d)
It can be shown (for any two random variables X and Y ) that
Cov(X, Y ) = E(XY ) − E(X)E(Y ).
This follows from the definition of covariance and was also shown in a problem
sheet. Therefore, Cov(X, Y ) = 4 − 2 × 3 = −2.
2, D
The correlation between X and Y , denoted ρXY , is defined as
Cov(X, Y )
ρXY =
.
pVar(X)pVar(Y )
It was also proved in lectures that −1 ≤ ρXY ≤ 1. Therefore,
[Cov(X, Y )]2 = (ρXY )2 ≤ 1.
Var(X)Var(Y )
1, D
Therefore,
[Cov(X, Y )]2
4
Var(X) ≥
=
.
Var(Y )
Var(Y )
Since Y is bounded on the interval [2, 5], it is a theorem in the notes (proved in
Problem Sheet 8), that Var(Y ) ≤ (5−2)2 = 9 , which implies
1, D
4
4
1
4

Var(Y )
9
4
4
16
⇒Var(X) ≥
≥ 4 ×
=
.
Var(Y )
9
9
Therefore, the standard deviation of X is bounded below by 4 , i.e. pVar(X) ≥ 4 .
3
3
2, D
M40005 Probability and Statistics (Solutions) (2020)
Page 15 of 16

Review of mark distribution:
Total A marks: 48 of 48 marks
Total B marks: 30 of 30 marks
Total C marks: 18 of 18 marks
Total D marks: 24 of 24 marks
Total marks: 120 of 120 marks
M40005 Probability and Statistics (Solutions) (2020)
Page 16 of 16

Document Outline