Risk and Uncertainty, October 8, 2024
Fourth practice session R&U - Discrete and continuous random variables.
Discrete random variables
1. A fair die is rolled once.
(a) Let X be the random variable equal to the number on the die. Find the distribution of X
and its expectation.
(b) Suppose we receive 15 euros if we obtain 1, 5 euros if we obtain 5 or 6 and nothing if we
obtain 2, 3 or 4. Let Y be the random variable equal to the payo of this game. What is
the distribution of Y ? What is the average payo (i.e. the expectation of Y ) ?
(c) We now assume that we receive 25 euros if we obtain 1 and nothing otherwise. Do you
prefer to play to the previous game or to this one ? Why ?
2. A fair die is rolled three times in a row. Let X be the random variable representing the number
of distinct values obtained (i.e. if we obtain ω = (4, 4, 5), X(ω) = 2).
(a) compute X(Ω) and the distribution of X ;
(b) compute the cdf of X ;
(c) compute its expectation and variance.
3. Let F : R → [0, 1] be the function dened by
a if t < 0
if 0 ≤ t < 1
b
F (t) =
2b + c if 1 ≤ t < 2
if t ≥ 2
d
Under which conditions on a, b, c and d, is F a cdf ? Let us assume now that F is the cdf of a
random variable X .
(a) Compute the following probabilities as a function of a, b, c and d : P (X ≤ 3), P (X > 1),
P (0.5 < X ≤ 1) ;
(b) Consider P (X > 1) = 0.3 and P (0.5 < X ≤ 1) = 0.6. Compute a, b, c and d.
(c) Using the values of a, b, c and d previously computed, determine the distribution of X , its
expectation and its variance.
4. Let p ∈ (0, 1) and let X be the discrete random variable with distribution
0 1
X= .
1−p p
Compute the distribution of Y = X(2 − X). Compute in two dierent ways E(Y ) and then
compute V (Y ).
Continuous random variables
5. Let
if x ∈ [0, 3]
(
1
f (x) = 3
0 otherwise.
Verify that f is indeed the density of a random variable, compute the cdf, the expectation and
the variance.
6. (Optional) Let a, b ∈ R and let FX be the cdf of a continuous random variable X
if z ≤ 0
0
FX (z) = az + bz(ln(z) − 1) if 0 < z < 1
if z ≥ 1.
1
(a) Which conditions do a and b need to satisfy ?
(b) Compute the density fX of the random variable X and its expectation E(X).
(c) Compute a and b if E(X) = 21 .
7. The density of X , a random variable representing the lifespan in years of a certain electrical
component, is given by
cxe− 2 x if x > 0
1
(
f (x) =
0 otherwise
(a) Compute the cdf of X as a function of c. Deduce c.
(b) What is the average life of this component ? What is the probability that the component
has a longer life than this average ?
Page 2
To practice at home
1. Using the composite function derivation theorem, show that
The primitive of f (x) = is F (x) = ln[g(x)]
g 0 (x)
g(x)
The primitive of f (x) = g (x)[g(x)] is F (x) = [g(x)]
0 α 1
α+1
α+1
The primitive of f (x) = g (x)e is F (x) = e
0 g(x) g(x)
2. Using the results of the previous question, the rule of integration by parts and the formula for change
of variable, compute the following integrals.
(a) R4 x+1
0 x2 +2x+2
dx [sol : ln(13)]
1
(g) dx [sol : 4 − 2 ln 3]
2
4
(b) dx [sol : 2]
1√
R
R4 x− 21 0 1+ x
√
1 x2 −x+4
(c) 2x − 1dx [sol : ]
R √
5 26 (h) R
(x + 1)e dx [sol : 2 − 3e ]
1
0
−x −1
1 3
(d) R
e
dx [sol : 1 + ln(2)]
e2 1+ln(x)
x ln(x)
(i) R
x
√
1
0
1 + x dx [sol : (2 − 1)]
2 3 2
9
3
2
(e) R1
0
√x
1+x
dx [sol :
√
4−2 2
3 ] (j) R x ln(x)dx [sol : 2 ln 2 − ]
2
1
3
4
(f) R dx [sol : ]
2 x2
0 2+x3
ln 5
3 (k) R x ln(x)dx
1
2
Page 3