0% found this document useful (0 votes)
53 views9 pages

Final Exam 2023 - Solutions

Uploaded by

laurensrobbe
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
53 views9 pages

Final Exam 2023 - Solutions

Uploaded by

laurensrobbe
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 9

Probability Theory – Final Exam 2023 – Solutions

dr. A. Zocca

1st June 2023, 15:30 – 17:30 (+30 min for extra timers)

The exam consists of six exercises worth a total of 95 points = 10 + 15 + 25 + 15 + 10 + 20. The midterm
exam grade is calculated as 1 + (your points)/10 (the maximum is thus 10.5). The exam lasts for
2h (+ 30 min for extra timers). Do not forget to add the name of the formula you are using and/or
explanations next to your algebraic/numerical solutions. No book and no notes, you are allowed to use
only a simple calculator.

Exercise 1 [10 points = 2 + 3 + 5]


Let X be an exponentially distributed random variable with parameter 15 .
(a) [2 points] What does it mean that the random variable X is memoryless?
(b) [3 points] Calculate P(1 ≤ X ≤ 2).
x
(c) [5 points] Derive the density function of the random variable Y = g(X) with g(x) := e− 5 .

Solution:
(a) It means that P(X > s + t | X > t) = P(X > s) for every s, t ≥ 0.
1
(b) The density of X is given by fX (x) = 15 e− 5 x 1{x≥0} .
The required probability can be calculated as
Z 2
1 2 1
P(1 ≤ X ≤ 2) = fX (x)dx = [−e− 5 x ]21 = −e− 5 + e− 5 ≈ 0.1484.
1

(c) Solution using densities:


The function g maps [0, +∞) onto the interval (0, 1], is differentiable, one-to-one, and its derivative is
always nonzero.
x
The inverse of the function g(x) = e− 5 is thus defined only for y ∈ (0, 1]. and its algebraic expression is
g −1 (y) = −5 ln y.
We are thus applying the following formula (cf. fact 5.24)
(
fX (g −1 (y)) · |g′ (g−1
1
(y))|
if g −1 (y) exists and g ′ (g −1 (y)) ̸= 0,
fY (y) =
0 otherwise.

Applied to the functions above, this gives


(
1
fX (−5 ln y) · |− y5 |
if 0 < y ≤ 1,
fY (y) =
0 otherwise,

which further simplifies into (


1 if 0 < y ≤ 1,
fY (y) =
0 otherwise.

Alternative solution using CDFs:


In view of the fact that Y can take values only (0, 1], we can conclude that FY (y) = 1 for y ≥ 1 and
FY (y) = 0 for y ≤ 0. In the case y ∈ (0, 1], we have

FY (y) = P(Y ≤ y) = P(e−X/5 ≤ y) = P(−X/5 ≤ log y) = P(X ≥ −5 log y) = 1 − FX (−5 log y).
and, hence,
d d −5
fY (y) = FY (y) = (1 − FX (−5 log y)) = −fX (−5 log y) · = · · · = 1.
dy dy y

Exercise 2 [15 points = 2 + 4 + 3 + 6]


Let X1 , . . . , X100 be independent standard normal random variables.
(a) [2 points] For a generic index i, what is the value of P(Xi > 0)?
(b) [4 points] Using the table provided, calculate the probability
 X1 + X2 + X3 + X4 
P −1≤ ≤1 .
4

(c) [3 points] Let Y be equal to the number of indices i ∈ {1, 2, . . . , 100} for which Xi > 0. Using (a),
conclude which is the distribution of Y .
(d) [6 points] Using the Central Limit Theorem and the continuity correction, give an approximation of
the probability P(45 < Y ≤ 52).

Solution:
(a) Since Xi is a standard normal r.v., whose density is symmetric around the origin, we can immediately
conclude that P(Xi > 0) = 12 .
(b) The sum of four independent normal r.v.’s is itself normal , and specifically X1 + X2 + X3 + X4 ∼
N (0, 4).
 X1 + X2 + X3 + X4   
P −1≤ ≤ 1 = P − 4 ≤ X1 + X2 + X3 + X4 ≤ 4
4
 X1 + X2 + X3 + X4 
=P −2≤ √ ≤2
4
= Φ(2) − Φ(−2)
= Φ(2) − (1 − Φ(2))
= 2Φ(2) − 1
≈ 2 · 0.9772 − 1 = 0.9544

(c) Thanks to the independence assumption about the Xi ’s , Y is a binomial distribution with n = 100
and, in view of (a), p = 12 . In symbols, Y ∼ Bin(100, 21 ) .
(d) Using the continuity correction, P(45 < Y ≤ 52) = P(45.5 ≤ Y ≤ 52.5). Y is a r.v. with mean
np = 50 and variance np(1 − p) = 25 . Therefore,
 45.5 − 50 Y − 50 52.5 − 50 
P(45.5 ≤ Y ≤ 52.5) = P √ ≤ √ ≤ √
25 25 25
≈ Φ(0.5) − Φ(−0.9)
= Φ(0.5) − (1 − Φ(0.9))
≈ 0.6915 − (1 − 0.8159) = 0.5074
Exercise 3 [25 points = 5 + 5 + 5 + 5 + 5]
Let (X, Y ) be the random vectors, whose components describe the two coordinates of a point distributed
uniformly at random over the set D ⊂ R2 defined as

D := {(x, y) ∈ R2 | 0 < y < ex , 0 < x < 2}.

(a) [5 points] Draw the set D, calculate its area, and derive an explicit expression for the joint probability
density fX,Y (x, y).
X
(b) [5 points] Calculate P(Y > e 2 ).
(c) [5 points] Calculate E[XY ]. Are X and Y independent?
(d) [5 points] Calculate the density of the random variable Z = X + Y .
(e) [5 points] Calculate Cov(2X − 1, −Y + 2) and Cov(Z, X).
Hint: You do not need the answer to question (d) to make these calculations!

Solution:
(a) The set D is drawn in the figure below.

0.5 1.0 1.5 2.0

Its area is given by Z Z 2 Z ex


Area(D) = 1 dxdy = 1 dxdy = [ex ]20 = e2 − 1.
D 0 0

1
The joint density corresponding to the uniform distribution over D is equal to fX,Y (x, y) = Area(D) =
1
e2 −1
.
X
(b) We can think of the event {Y > e 2 } as a subset of points in the plane, say B = {(x, y) ∈ D : ex/2 <
y < ex , 0 < x < 2} ⊂ D ⊂ R2 . Then,
Z
X
P(Y > e 2 ) = fX,Y (x, y) dxdy
B
Z 2 Z ex
1 1 h x x/2
i2
= 2
dydx = e − 2e
0 ex/2 e − 1 e2 − 1 0
1 − 2e + e 2 e−1
= = ≈ 0.4621.
e2 − 1 e+1
(c) We first calculate
Z
E[XY ] = x · y · fX,Y (x, y) dxdy
R2
Z 2 Z ex Z 2 ex
xy xy 2
= dydx = dx
0 0 e2 − 1 0 2 (e2 − 1) 0
"  #2
2
e2x x e2x x2 − 41
Z
= dx =
0 2 (e2 − 1) 2 (e2 − 1)
0
1 + 3e4
= ≈ 3.224
8 (e2 − 1)

X and Y are not independent.


To prove that X and Y are not independent, we first calculate
2 Z ex 2 e x 2
ex x
Z Z Z Z
x xy
EX = x · fX,Y (x, y) dxdy = dydx = dx = dx
R2 0 0 e2 − 1 0 e2 − 1 0 0 e2−1
2
ex (x e2

− 1) 1+
= = ≈ 1.313,
e2 − 1 0 e2 − 1

and
2 Z ex 2 ex 2
y2 e2x
Z Z Z Z
y
EY = y · fX,Y (x, y) dxdy = 2
dydx = dx = dx
R2 0 0 e −1 0 2 (e2 − 1) 0 0 2 (e2 − 1)
2
e2x

1
1 + e2 ≈ 2.097.

= =
4 (e2 − 1) 0 4
2
(1+e2 )·(1+e2 ) (1+e2 )
Therefore, EX · EY = (e2 −1)4
= 4(e2 −1)
≈ 2.754, so in particular E[XY ] ̸= EX · EY , so X and Y
are not independent.
(d) In view of the geometry of the subset D and the fact that Z = X + Y , we must have Z ∈ [0, 2 + e2 ].
The density fZ (z) must then be equal to zero for z < 0 and for z > 2 + e2 .
Consider
Z +∞ now the case z ∈ (0, 2 + e2 ). We calculate the required density using the formula fZ (z) =
f (x, z − x) dx which yields
−∞
Z 2
1
fZ (z) = 1 1 x dx.
0 e2 − 1 {z−x>0} {z−x<e }

Let x∗ (z) ∈ R be the unique real number that solves the equation z − x = ex . The fact that this point
exists and is unique can be proved graphically by checking for the intersection of the line y = z − x and
of the function y = ex . The integral above then becomes
Z 2
1
fZ (z) = 2
1{x<z} 1{x>x∗ (z)} dx
0 e −1
Z min{2,z}
1
= 2
dx
max{0,x∗ (z)} e − 1

z
 e2 −1
 if z ≤ 1,
1 ∗ 1 ∗
= 2 (min{2, z} − max{0, x (z)}) = e2 −1 (z − x (z)) if 1 < z ≤ 2,
e −1 
(2 − x∗ (z)) if 2 < z ≤ 2 + e2 .
 1
e2 −1

The plot of fZ (z) looks as follows:


0.25

0.20

0.15

0.10

0.05

-2 2 4 6 8 10

(e) Using the bilinearity of the covariance operator , we can conclude that

Cov(2X − 1, −Y + 2) = −2 · Cov(X, Y ) = −2(E[XY ] − EX · EY ) ≈ −2 · (3.224 − 2.754) [= −0.94].

Using again the bilinearity of the covariance operator, we can conclude that

Cov(Z, X) = Cov(X + Y, X) = Cov(X, X) + Cov(X, Y ) = Var(X) + Cov(X, Y )

To obtain the final answer, we need to calculate the variance of X, for which we need to obtain the
second moment of X (since we already calculated EX). Thus,
Z 2 Z ex Z 2  2 ex Z 2 x 2
x2
Z
2 2 x y e x
E(X ) = x · fX,Y (x, y) dxdy = 2
dydx = 2
dx = 2
dx
R2 0 0 e −1 0 e −1 0 0 e −1
"  #2
ex x2 − 2x + 2
= =2
e2 − 1
0

The variance is then Var(X) = E(X 2 ) − (EX)2 ≈ 2 − 1.313 = 0.687 and Cov(Z, X) ≈ 0.687 + 0.47 = 1.157.

Exercise 4 [15 points = 4 + 5 + 6]


A continuous random variable X has probability density function f (x) given by:

5 5x
3e
 if x ≤ 0,
f (x) := c x 2 if 0 < x ≤ 21 ,

 13
64x4
if x > 12 .

(a) [4 points] Find the value of c such that f is a well-defined probability density.
(b) [5 points] Calculate the expected value of X and its variance.
X2
(c) [6 points] Derive the probability density function fY (y) of the random variable Y = 3 .

Solution:
R +∞
(a) We must have −∞ f (x) dx = 1, therefore
1
Z +∞ Z 0 Z Z +∞
5 5x 2 13 1 c 13
1= f (x) dx = e dx + cx2 dx + 4
dx = + + .
−∞ −∞ 3 0 1 64x 3 24 24
2
Solving for c, gives c = 3. This is a valid value because the resulting density is always non-negative.
(b)
R +∞
Using the formula EX = −∞ x · f (x) dx , we get
1
Z 0 Z Z +∞
5 2 13 1 3 13 371
EX = x e5x dx + 2
x · 3x dx + x 4
dx = − + + = ≈ 0.3865.
−∞ 3 0 1
2
64x 15 64 32 960

R +∞
We first calculate the second moment of X. Since E(X 2 ) = −∞ x2 · f (x) dx , we get
1
Z 0 Z Z +∞
5 2 13 2 3 13 271
E(X 2 ) = x2 e5x dx + x2 · 3x2 dx + x2 4
dx = + + = ≈ 0.4516.
−∞ 3 0 1 64x 75 160 32 600
2

271 371 2 55723


Therefore, Var(X) = E(X 2 ) − (EX)2 =

600 − 960 = 184320 ≈ 0.302.
(c)
Solution using CDF:
We first derive the CDF FY (y). For y ≤ 0, clearly FY (y) = P(Y ≤ y) = P(X 2 ≤ 3y) = 0 , and we obtain
d
the pdf fY (y) as fY (y) = dy FY (y), so that

fY (y) = 0, ∀ y ≤ 0.

For y > 0, we can argue as follows:

FY (y) = P(Y ≤ y) = P(X 2 ≤ 3y)


p p
= P(− 3y ≤ X ≤ 0) + P(0 ≤ X ≤ 3y)
Z 0 Z √3y
= √ fX (x) dx + fX (x) dx
− 3y 0
√ √
Z 0 Z min{ 3y, 12 } Z 3y
5 5x 2 13
= √
e dx + 3x dx + √
dx
− 3y 3 0 min{ 3y, 12 } 64x4
 5x 0
 imin{√3y, 1 }  √3y
e h 13 2
= + x3 + −
3 − 3y√ 0 192x3 min{√3y, 1 }
2
(
1 −5

3y
√ 3/2 1
(1 − e ) + 3 3y if 0 ≤ y ≤ 12 ,
= 31 −5

3y 1 13 13 1
3 (1 − e ) + 8 + 24 − 576√3y3/2 if y > 12 .

We can then obtain the expressions of the pdf fY (y) for y > 0 by taking the first derivative of FY (y), i.e.,
 √
5e−5 3y 9p 1
if 0 < y ≤ 12


 2 √ + 3y ,
d 
3 3y

2
fY (y) = FY (y) =
dy  5e−5 3y 13 1
 2√ + if y > 12 .

 p
3 3y 384 3y 5

Solution using densities:


2
The function g(x) = x3 is differentiable everywhere and its derivative g ′ (x) = 23 x is always nonzero except
for the point x = 0.
We are thus applying the following formula (cf. fact 5.27)
1
 X

 fX (x) · ′ if at least one such x exists,
fY (y) = x:g(x)=y, g′ (x)̸=0 |g (x)|

0 otherwise.

x2
For the specific function g(x) = 3 , this formula gives

1
 X

 fX (x) · 2 if y > 0,
fY (y) = x:x2 =3y 3x

0 if y ≤ 0.

 p
fX (− 3y) · 1 p 1
2√ + fX ( 3y) · 2√ if y > 0,
= − 3 3y 3 3y
0 if y ≤ 0.

Focusing only on the y > 0 case, we need to distinguish two cases, depending on whether the argument
√ √
3y of fX (·) is above or below 12 , since the density fX is defined differently. Solving 3y = 12 yields the
1
threshold value y = 12 . Then,
√ √
fX (− 3y) fX ( 3y)

1
 √ + 2√ if 0 < y ≤ 12 ,
− 23 √3y

3y

fY (y) = 3 √
fX (− 3y) fX ( 3y) 1
√ + 2√ if y > 12 ,


− 23 3y

3 3y
 5 −5√3y √
 3e√ 3( 3y)2 1
+ 2√ if 0 < y ≤ 12 ,

 2 3y

3y
3
= 5 −5√3y 3
13

3e 64( 3y)4
 1
 2√ + 2√ if y > 12 ,


3 3y 3 3y
 √
5e−5 3y 9p 1
if 0 < y ≤ 12

 2√ + 3y ,


3 3y

2
=
 5e−5 3y 13 1
 2√ + if y > 12 .

 p
3 3y 384 3y 5

Exercise 5 [10 points = 5 + 5]


To celebrate the end of the course, 10 Business Analytics students and 6 Mathematics students go out for
dinner to an Italian restaurant, where they randomly seat at a round table with 16 seats. Let X be the
number of Business Analytics students with exactly one neighbor who is a Business Analytics student
and one neighbor who is a Mathematics student.
(a) [5 points] Express the random variable X as a sum of suitable binary random variables.
(b) [5 points] Use the representation in (a) to calculate the expected value of X.

Solution:
First solution method
(a) The random variable X rewrites as X = X1 + · · · + X16 where Xi is the binary random variable
defined as
(
1 if BA student is seated at chair i with one Math and one BA neighbor,
Xi =
0 otherwise.

These 16 random variables are identically distributed, by symmetry of the seats. .


(b) Using the linearity of expectation, EX = E(X1 + · · · + X16 ) = EX1 + · · · + EX16 = 16 · EXi . Since
all Xi are identically distributed (cf. (a)), we can calculate
10 9 6 9
EXi = P(Xi = 1) = · · ·2= ,
16 15 14 28
since on chair i there is a BA student w.p. 10 9 6
16 , and with probability 15 · 14 his/her two neighbors are one
Math and one BA, and the factor 2 accounts for the two possible permutations of these two neighbors.
9 36
Therefore EX = 16 · EXi = 16 · 28 = 7 ≈ 5.143.
Second solution method
Number the BA students from 1 to 10. The random variable X rewrites as X = Y1 + · · · + Y10 where Yi
is the binary random variable defined as
(
1 if the i-th BA student has one Math and one BA neighbor,
Yi =
0 otherwise.
9 6 18
In this case, EYi = P(Yi = 1) = 15 · 14 ·2= 35 , which then leads to the same answer EX = 10 · EYi =
· · · = 36
7 ≈ 5.143.

Exercise 6 [20 points = 5 + 5 + 5 + 5]


Suppose the joint probability density of X and Y is given by
  
 −2 xy +y −1
4e y if x, y > 0,
fX,Y (x, y) :=
0 otherwise.

(a) [5 points] Derive the marginal density fY (y). What is the distribution of Y ?
(b) [5 points] Derive the conditional density fX|Y (x|y).
(c) [5 points] Calculate P(X > 1 | Y = y).
(d) [5 points] Calculate E(X | Y = y).
Hint: You can use (without proving it) that for every a, b ̸= 0 the antiderivative of the function
a
ax · ebx is the function 2 ebx (bx − 1).
b

Solution:
R +∞
(a) Since fY (y) = −∞ fX,Y (x, y) dx, we get that for y ≤ 0 fY (y) = 0 , while for y > 0
Z +∞      +∞
x
−2 +y −1 −2 x +y
fY (y) = 4e y
y dx = −2e y
= 2e−2y .
−∞ −∞

Therefore Y is an exponential distribution with parameter λ = 2.


(b) The conditional density can be calculated only for y > 0 (since otherwise fY (y) = 0). For such values
of y,
fX,Y (x, y)
fX|Y (x|y) =
fY (y)
−2 x
(
2e y y −1 if x > 0,
=
0 otherwise.

(c) We can calculate


Z +∞ Z +∞
−2 x − 2x +∞
h i
P(X > 1 | Y = y) = fX|Y (x|y) dx = 2e y −1
y = −e y = e−2/y .
1 1 1

Alternative solution:
The same answer could also be obtained by noticing from (b) that r.v. X|Y = y is exponentially distributed
with parameter y2 and using the well-known CDF of the exponential distribution.
(d) We can calculate
Z +∞ Z +∞  +∞
−2 x
y −1
1 − 2x y
E(X | Y = y) = x · fX|Y (x|y) dx = x · 2e y = − e y (2x + y) = .
−∞ 0 2 0 2

Alternative solution:
The same answer could also be obtained by noticing from (b) that r.v. X|Y = y is exponentially
distributed with parameter λ = y2 and using the well-known formula for the expected value of the
exponential distribution, we get E(X|Y = y) = λ1 = y2 .

You might also like