HOMEWORK 5
PSTAT 120A – Winter 2022
Instructor: Dr. Mouti
Assisted by: Ethan Marzban
Some Guidance on Self-Grading: When grading and providing feedback on your work,
please ask yourself the following questions:
• Was my notation clear? Did I define all events/random variables/relevant quantities?
• Does the flow of my logic make sense? Would another reader be able to follow my
arguments easily?
• Did I correctly identify the main topics being tested in these problems?
Next, assign yourself a grade (for each part of each problem) based on the following scale:
• 2pts: Fully correct
• 1pts: Correct approach, but with major pitfalls/errors
• 0pts: Not attempted, or completely incorrect approach
Note that each part of a question is worth 2 points. Thus, since there are 19 parts in total on
this homework, the maximum score you can receive is 38 points.
Finally, please add up your scores on the individual parts and write your total score
on the front page.
1. Write half a page with the main results of the chapter.
2.[ ] It is found that the lifetime T [in hours] of a GauchoBright-brand lightbulb is well-modeled by
the distribution with p.d.f. given by
fT (t) =
{
ce−2t if t ≥ 0
0 otherwise
(a) Find the value of c.
Solution: By integration, c = 2 .
(b) What is the probability that a randomly selected GauchoBright bulb is greater than 4
hours?
Solution: P(T > 4) =
∫ ∞
4
2e−2t dx = e−2·4 = e−8
(c) Suppose a sample of 100 GauchoBright bulbs is taken with replacement. What is the
probability that precisely 6 of these bulbs have lifetime greater than 4 hours?
Solution: Let N denote the number of GauchoBright bulbs, in the sample of 100,
that have lifetime greater than 4 hours. Then N ∼ Bin(100, e−8) and so
P(N = 6) =
(
100
6
)
e−48(1− e−8)94
(d) Approximate your probability from part (c), and argue whether or not your choice of
approximation is good.
Solution: The only approximation we know so far is the Poisson Approximation,
which states that N
·∼ Pois(100e−8), so that
P(N = 6) ≈ e−100e−8 · (100e
−8)6
6!
We see p = e−8 which is relatively small, and np = 100e−8 is also quite small. Thus,
a Poisson approximation would actually be quite poor.
3.[ ] For each of the following candidate functions, (i) identify whether it is a valid cumulative
distribution function (c.d.f.) and (ii) if it is, find the associated probability density function
(p.d.f.)
(a) F (x) =
{
1− e−x if x ≥ 0
0 otherwise
Solution: All of the conditions are satisfied,which are:
• 0 ≤ FX(x) ≤ 1
• non-decreasing,
• limx→+∞ FX(x) = 1 and limx→−∞ FX(x) = 0)
so it is a valid c.d.f. To find the associated p.d.f., we differentiate:
d
dx
(1− e−x) = e−x
and so, since we see that the state space is SX = [0,∞)
fX(x) =
{
e−x if x ≥ 0
0 otherwise
Page 2
(b) F (x) =
{
x2 if − 1 ≤ x ≤ 2
0 otherwise
Solution: This function is neither monotonically increasing, nor has a limit of 1 as
x→∞. Hence, it is not a valid c.d.f., and has no associated p.d.f.
4.[ ] Let X be a continuous random variable with density function
fX(x) =
{
3e−3x x > 0
0 else
(a) Verify that f is a density function.
(b) Calculate P(−1 < X < 1).
(c) Calculate P(X < 5).
(d) Calculate P(2 < X < 4 | X < 5)
(e) Find the cumulative distribution function of X.
Solution:
(a) We wish to compute
∫∞
0 3e
−3x dx. To do so, we make a u−substitution: u = 3x so
du = 3 dx, or dx = 1/3 du and so∫ ∞
−∞
fX(x) =
∫ ∞
0
3e
−u · 1
3
du =
[−e−u]u=∞
u=0
=
[
e−u
]u=0
u=∞ = 1− 0 = 1 ✓
(b) We wish to compute
∫ 1
−1 fX(x) dx. Note that fX(x) is nonzero only for x > 0, so∫ 1
−1
fX(x) dx =
∫ 0
−1
fX(x) dx+
∫ 1
0
fX(x) dx =
∫ 1
0
fX(x) dx
For all future parts, we can use the fact that the primary antiderivative of fX(x) =
3e−3x is −e−3x; thus,
P(−1 < X < 1) =
∫ 1
0
3e−3x dx =
[−e−3x]x=1
x=0
= 1− e−3
(c) P(X < 5) =
∫ 5
−∞
fX(x) dx =
∫ 5
0
3e−3x dx =
[−e−3x]x=5
x=0
= 1− e−15
Page 3
(d) We first apply the Multiplication Rule:
P(2 < X < 4 | X < 5) = P(2 < X < 4 , X < 5)
P(X < 5)
Of course, {2 < X < 4} ⊂ {X < 5} so the numerator is simly P(2 < X < 4), and
P(2 < X < 4 | X < 5) = P(2 < X < 4 , X < 5)
P(X < 5)
=
P(2 < X < 4)
P(X < 5)
=
∫ 4
2 3e
−3x dx
1− e−15
=
e−6 − e−12
1− e−15 =
e9 − e3
e15 − 1
(e) If x ≤ 0, then fX(x) = 0 and so FX(x) = P(X < x) = 0 as well. If x > 0, then
FX(x) =
∫ x
0
3e−3t dt =
[−e−3t]t=x
t=0
=
[
e−3t
]t=0
t=x
= 1− e−3x
Therefore, putting these two facts together,
FX(x) =
{
0 if x ≤ 0
1− e−3x if x > 0
5.[ ] Suppose X is a random variable with probability density function fX(x) and cumulative dis-
tribution function FX(x). Additionally, suppose X is positive- that is, P(X ≥ 0) = 1. Prove
the following equality: ∫ ∞
0
[1− FX(x)] dx =
∫ ∞
0
tfX(t) dt
Hint: Write [1 − FX(x)] as an integral of fT (t), to get a double integral on the LHS. Then,
switch the order of integration.
Solution: ∫ ∞
0
[1− FX(x)] dx =
∫ ∞
0
(∫ ∞
x
fX(t) dt
)
dx
=
∫ ∞
0
∫ t
0
fX(t) dx dt
=
∫ ∞
0
tfX(t) dt
Page 4
6.[ ] Let X be a continuous random variables with the following p.d.f
f(x) = ce−
x2
2
We are first going to try and calculate the constant c (which will require using double integrals).
(a) Is f a potential candidate to be a probability density function? Justify why.
Solution: It is clear that f(x) ≥ 0 for every x ∈ R; therefore, it is a potential
candidate to be a valid probability density function (p.d.f.).
(b) Consider the following double integral
I =
∫∫
R2
e−(x
2+y2)dxdy
Furthermore, consider the change of variables x = r cos(θ) and y = r sin(θ). Calculate I
and use this to deduce the value of
∫ +∞
−∞ e
−x2
2 dx
Solution: Using the Polar coordinates, we have dx = cos(θ)dr− r cos(θ)dθ and dy =
r sin(θ) and thus dxdy = rdrdθ. On the other hand x2 + y2 = r2 and the integration
bounds are r ∈ [0,+∞] and θ ∈ [0, 2π]. Therefore:
I =
∫∫
R2
e−(x
2+y2) dx dy
=
∫ 2π
0
∫ ∞
0
e−r
2 · rdr dθ
= 2π
(∫ ∞
0
re−r
2
dr
)
By another change of variable s = −r2 and thus rdr = −12ds, we have:
I = 2π
∫ 0
−∞
1
2
esds
= π
∫ 0
−∞
es
= π(e−∞ − e0) = π
(c) Returning to our expression for f(x), what must the value of c be? [You can verify that
your computed value of c matches with the description below, but you must clearly show
your work in order to receive full credit on this part.]
Hint:
(∫ b
a h(t) dt
)2
=
∫ b
a
∫ b
a [h(t) · h(s)] ds dt.
Solution: Denote by J
J :=
∫ ∞
−∞
e−
1
2
x2 dx
Page 5
First, substitute u = x√
2
, so that
J =
1√
2
·
∫ ∞
−∞
e−u
2
du
Note now that
J2 =
(√
2 ·
∫ ∞
−∞
e−u
2
du
)
·
(√
2 ·
∫ ∞
−∞
e−v
2
dv
)
= 2
∫∫
R2
e−(u
2+v2) dA
= 2 · π = 2π
Thus, taking the square root of both sides,
J =
√
2π
and so c = 1/(
√
2π)
The distribution with the above p.d.f is called the normal distribution, which we will discuss
in greater detail later in the course. It’s c.d.f. (which is so famous it has its own symbol Φ) is
defined as an integral:
Φ(x) :=
1√
2π
∫ x
−∞
e−
t2
2 dt
There are several ways one can calculate Φ(x) for any value x ∈ R ; oe of these methods [and
indeed the method we will investigate in this problem] is that of Taylor Series Expansions.
(d) Write down the formula for the Taylor Series Expansion of an arbitrary function g(x),
about the point 0 [often called the MacLaurin Series Expansion].
Solution: For a function f that is infinitely differential at a real number x0, Taylor’s
series is given by:
f(x0) +
f ′(x0)
1!
(x− x0) + f
′′(x0)
2!
(x− x0)2 + f
′′′(x0)
3!
(x− x0)3 + . . . =
∞∑
n=0
f (n)(x0)
n!
(x− x0)n
For the MacLaurin Series Expansion, we evaluate the previous sum at x0 = 0 (of the
course the function has to be infinitely differentiable at 0):
f(0) +
f ′(0)
1!
x+
f ′′(0)
2!
x2 +
f ′′′(0)
3!
x3 + . . . =
∞∑
n=0
f (n)(0)
n!
xn
You can verify the Maclaurin series for 11−x for example.
Approaching a function using the Maclaurin Series Expansion to the n term means
that you evaluate the unfinite series up to the n-th term (polynomial of order n).
(e) Write down the MacLaurin Series Expansion of ΦX up to the 5th non-zero term.
Page 6
Solution: For ΦX defined as:
ΦX(x) =
1√
2π
∫ x
−∞
e−
t2
2 dt
=
1√
2π
∫ 0
−∞
e−
t2
2 dt+
1√
2π
∫ x
0
e−
t2
2 dt
=
1√
2π
· 1
2
+
1√
2π
∫ x
0
e−
t2
2 dt because e−
t2
2 is symmetric
Now we can evaluate an approximation of 1√
2π
∫ x
0 e
− t2
2 dt using MSE but we will do
that through making a series expansion for e−
t2
2 and then integrating from 0 to x.
That is, from the expansion of the exponential:
ex =
∞∑
n=0
xn
n!
We have to the 5-th non zero term:
e−
t2
2 ≈ 1− t
2
2
+
t4
8
− t
6
48
+
t8
384
More generally, you can write:
e−
t2
2 =
∞∑
n=0
(−1)n
2nn!
t2n
We integrate that to find:∫ x
0
e−
t2
2 dt ≈ x− x
3
2 · 3 +
x5
8 · 5 −
x7
48 · 7 +
t9
384 · 9
And thus:
ΦX(x) ≈ 1
2
+
1√
2π
(
x− x
3
2 · 3 +
x5
8 · 5 −
x7
48 · 7 +
x9
384 · 9
)
Here we stopped at the 6-th non-zero term so stopping at x7 should be fine. Note
that the approximation needs more terms as x gets far away from 0. Also note that
Taylor expansion is usuayll very convenient when calculating complex limits around
for x→ 0.
More generally
ΦX(x) =
1√
2π
∫ x
−∞
e−
t2
2 dt =
1
2
+
1√
2π
·
∞∑
k=0
(−1)n x
2n+1
(2n+ 1) · 2n · n!
(f) Can we obtain a closed-form (i.e. not in summation form) expression for Φ(x)? Why or
why not?
Page 7
Solution: No, because f(x) = e−x2 does not have an elementary antiderivative.
Page 8