Professional Documents
Culture Documents
Statistics 100A Homework 6 Solutions: Ryan Rosario
Statistics 100A Homework 6 Solutions: Ryan Rosario
Homework 6 Solutions
Ryan Rosario
Chapter 5
32. The time (in hours) required to repair a machine is an exponential distributed random variable
with paramter λ = 12 . What is
Let X denote the time (in hours) required to repair a machine. X ∼ Exp 21 . The PDF for
f (x) = λe−λx
(a) the probability that a repair time exceeds 2 hours;
P (X > 2) = 1 − P (X ≤ 2)
Z 2
1 −1x
= 1− e 2 dx
0 2
h 1 i2
= 1 + e− 2 x
0
= e−1
(b) the conditional probability that a repair takes at least 10 hours, given that its duration
exceeds 9 hours?
We want to find P (X ≥ 10|X > 9).
P (X ≥ 10)
P (X ≥ 10|X > 9) =
P (X > 9)
R ∞ 1 − 1 xdx
10 2 e
2
= R ∞ 1 − 1 xdx
9 2e
2
1
2e− 2 |∞
10
= 1
2e− 2 |∞
9
1
− limx→∞ e− 2 x + 12 e−5
= 1 9
− limx→∞ e− 2 x + 21 e− 2
1 −5
2e
=
1 − 92
2e
1
= e− 2
1
33. The number of years a radio functions is exponentially distributed with parameter λ = 81 . If
Jones buys a used radio, what is the probability that it will be working after an additional 8
years?
The phrase additional may seem confusing because we do not know how long the radio has
already been “alive.” Let t be the number of years that the radio has been alive. We want to
find P (X > 8|X > t).
But t does not matter! This is the memoryless property of the exponential distribution.
That is, for some t and some shift s,
Z ∞
1 −1x
P (X > 8) = e 8 dx
8 8
Z ∞
1 1
= e− 8 x dx
8 8
1h 1
i
= − lim −8e− 8 x − 8e−1
8 x→∞
1
= − −8e−1
8
= e−1
34. Jones figures that the total number of thousands of miles that an auto can be driven before it
1
would need to be junked is an exponential random variable with parameter λ = 20 . Smith has
a used car that he claims has been driven only 10,000 miles. If Jones purchases the car, what
is the probability that she would get at least 20,000 additional miles out of it? Repeat under
the assumption that the lifetime mileage of the car is not exponentially distributed but rather
is (in thousands of miles) uniformly distributed over (0, 40).
Let X be the number of miles the car can be driven before being junked.
(a) First, let X ∼ Exp 21 .
We know that the car has been driven 10,000 miles and we want to find the proba-
bility that it will last an additional 20,000 miles. We use the memoryless property of
exponential distribution, where t = 10000 and s = 20000.
Then, P (X ≥ 10000 + 20000|X > 10000) = P (X ≥ 20000).
= e−1
2
(b) Let X ∼ U (0, 40). We want to find P (X > 30|X > 10). By Bayes’ Rule,
P (X > 30)
P (X > 30|X > 10) =
P (X > 10)
R 40 1
40 dx
= R30
40 1
10 40 dx
x]40
30
=
x]40
10
40 − 30
=
40 − 10
1
= 3
40. If X is uniformly distributed over (0, 1), find the density function of Y = eX .
First, we start with the cumulative density function F (y), since we want to find the distribu-
tion function for Y .
FY (y) = P (Y ≤ y)
= P (eX ≤ y)
since Y = eX . Next, isolate X
= P (X ≤ ln y)
= FX (ln y)
which is the cumulative density function with respect to X, but we are not done yet. We
want the PDF, so take the derivative.
d 1
FX0 (ln y)
fX (x) = = fX (ln y) · ln y = fX (ln y)
dy y
But fX (ln y) = 1 because X ∼ U (0, 1). Also, note that the domain of y is 1 < y < e (which
is positive) because the domain of x is 0 < x < 1 and Y = eX . So,
1
fY (y) = y, 1<y<e
0, elsewhere
3
Chapter 5 Theoretical Exercises
12c. The median of a continuous random variable having distribution function F is that value m
such that F (m) = 12 . The is, a random variable is just as likely to be larger than its median
as it is to be smaller. Find the median of X if X is exponential with rate λ.
Recall that f (x) = λe−λx . To find percentiles, we must find the cumulative density function
F (x) and set it equal to 21 .
Z x
1 1 −1x
= e 2 dx
2 0 2
h 1 ix
= − e− 2 x
h 1 0 i
= − e− 2 x − 1
1
= 1 − e− 2 x
1 1
= e− 2 x
2
1
− ln 2 = − x
2
2 ln 2 = x
P (X ≤ x) = 1 − e−λx
x
P (cX ≤ x) = P X ≤
c
−λ( xc )
= 1−e
Then take the derivative to get the PDF of our new random variable.
x h x
i0
f = 1 − e−λ( c )
c
c −λ( x )
= e c
λ
= Exp λc
4
1
√
20. Show that Γ 2 = π.
This is one of those problems that can be solved using what I call the “meet in the middle”
method. We start on the left hand side Γ 21 , do some massaging, and then move to the right
hand side (or in this case, use an intermediary step), do some work and then note that both
computations yield the same result.
Z ∞
1 1
Γ = e−x x− 2 dx
2 0
√
Let y = x. Then dy = √1 .
2x
√ Z ∞ − y2
= 2 e 2 dy
0
2
− y2
R∞
That was the left hand side. Now we consider the fact that √1
−∞ 2π e dy = 1.
Z ∞
1 y2
1 = √ e− 2 dy
−∞ 2π
√ Z ∞
y2
2π = 2 e− 2 dy
−∞
by symmetry.
√ √ Z ∞ − y2
π = 2 e 2 dy
0
√
by dividing both sides by 2 and rationalizing.
Note that the two bolded expressions above are equal, thus we have “met in the middle.” We
√ R ∞ y2 √
have proven that Γ 12 = 2 0 e− 2 dy = π.
5
Chapter 6
2. Suppose that 3 balls are chosen without replacement from an urn consisting of 5 white and 8
red balls. Let Xi equal 1 if the ith ball selected is white and let it equal 0 otherwise. Give the
joint probability mass function of
(a) X1 , X2 ;
We must enumerate every combination of 0/1 values for X1 and X2 and determine the
combination of draws that result in those values.
First consider p(0, 0) : X1 = 0, X2 = 0. This means that the first ball drawn is not white
and the second ball drawn is not white. This means both balls drawn are red. Initially,
there are 8 red balls in the urn and 13 balls today. On the second draw, there are 7 red
8·7
balls and 12 balls total. So, p(0, 0) = 13·12 = 14
39 .
Note that the denominator will always be the same since on each draw we draw one ball,
so I will exclude this from my derivation.
p(0, 1) : X1 = 0, X2 = 1 means that the first ball is not white and the second ball is
white. Initially there are 8 red balls. On the second draw, we draw a white ball of which
8·5
there are 5 since none of them had been drawn yet. So p(0, 1) = 13·12 = 1039 .
p(1, 1) : X1 = 1, X2 = 1 means that the first ball is white and the second ball is white.
Initially there are 5 white balls in the urn. On the second draw, after one of the white
5·4 5
balls is chosen, there are 4 remaining. So p(1, 1) = 13·12 = 39 .
P (1, 0) : X1 = 1, X2 = 0 means that the first ball is white and the second ball is
red. Initially there are 5 white balls. On the second draw there are 8 red balls. So
5·8
p(0, 1) = 13·12 = 10
39 .
(b) X1 , X2 , X3
Now we are working with the joint distribution of 3 discrete random variables, but the
premise is the same as with part (a). We consider all possible combinations of 0/1 values
for Xi and compute the corresponding probabilities.
8·7·6 28 5·8·4 40
p(0, 0, 0) = 13·12·11 = 143 p(1, 0, 1) = 13·12·11 = 429
8·7·5 70 5·4·8 40
p(0, 0, 1) = 13·12·11 = 429 p(1, 1, 0) = 13·12·11 = 429
8·5·7 70 5·4·3 5
p(0, 1, 0) = 13·12·11 = 429 p(1, 1, 1) = 13·12·11 = 143
5·8·7 70 8·5·4 40
p(1, 0, 0) = 13·12·11 = 429 p(0, 1, 1) = 13·12·11 = 429
6
8. The joint probability density function of X and Y is given by
(a) Find c.
To find c, just integrate the double integral using the appropriate limits of integration,
set the result equal to 0 and solve for c. Suppose we integrate with respect to x first.
Note that −y ≤ x ≤ y so those should be our limits for integration. Additionally, note
that 0 < y < ∞, so 0 and ∞ are our limits of integration when we integrate with respect
to y.
Z ∞ Z y Z ∞ Z y
c y 2 − x2 e−y dxdy y 2 e−y − x2 e−y dxdy
` ´
= c
0 −y 0 −y
∞
˛y
x3 −y ˛˛
Z
= c xy 2 e−y + e ˛ dy
0 3 −y
Z ∞ y 3 −y y 3 −y
= c y 3 e−y − e + y 3 e−y − e dy
0 3 3
Z ∞ y 3 −y
= 2c y 3 e−y − e dy
0 3
4
Z ∞
= c y 3 e−y dy
3 0
Let u = y 3 , dv = e−y so du = 3y 2 , v = −e−y
» Z –∞
4
= c −y 3 e−y + 3 y 2 e−y dy
3 0
Let u = y 2 , dv = e−y so du = 2y, v = −e−y
» „ Z «–∞
4
= c −y 3 e−y + 3 −y 2 e−y + 2 ye−y dy
3 0
Let u = y, dv = −e−y so du = dy, v = −e−y .
4 ˆ 3 −y ¯´˜∞
+ 3 −y 2 e−y + 2 −ye−y − e−y
` ˘
= c −y e 0
3
4 ˆ 3 −y ∞
− 3y 2 e−y − 6ye−y − 6e−y 0
˜
= c −y e
3
4 ˆ −y ˘ 3 ¯˜∞
= c −e y + 3y 2 + 6y + 6 0
3
» ff–∞
1 3
= −4c −e−y y + y 2 + 2y + 2
3 0
» ff–
−y 1 3 2
= 0 − 4c −e y + y + 2y + 2
3 x=0
8c = 1
1
c =
8
1
Thus, c = 8 .
7
Z ∞
1 2
y − x2 e−y dy
fX (x) =
|x| 8
1 2 −y 1 2 −y
= y e − x e dy
8Z 8
1 ∞ 2 −y
Z ∞
1
= y e dy − x2 e−y dy
8 |x| 8 |x|
Let u = y 2 , dv = e−y , so du = 2ydy, v = −e−y .
Z ∞
1 2 −y −y 1 ∞
= −y e − −2ye dy − x2 −e−y |x|
8 |x| 8
Z ∞
1 1 ∞
= −y 2 e−y + 2 ye−y dy + x2 e−y |x|
8 |x| 8
Z
1 2 −y −y −y 1
= −y e + 2 −ye − −e dy − x2 e−|x|
8 |x| 8
1 2 −y ∞ 1
= −y e − 2ye−y − 2e−y |x| − x2 e−|x|
8 8
1h i 1
= − −|x|2 e−|x| − 2|x|e−|x| − 2e−|x| − x2 e−|x|
8 8
Note that x2 = |x|2 .
1 1
= |x|e−|x| + e−|x|
4 4
1 −|x|
= 4e (|x| + 1)
To find the marginal density of Y , integrate out X and choose limits of integration that
result in a function in terms of y. We have the domain is −y ≤ x ≤ y so integrate from
−y to y.
1 y 2
Z
y − x2 e−y dx
fY (y) =
8 −y
1 y 2 −y
Z
= y e − x2 e−y dx
8 −y
y
x3 −y
1 2 −y
= xy e − e
8 3 −y
3 y 3 −y
1 3 −y y −y 3 −y
= y e − e − −y e + e
8 3 3
1 2
= 2y 3 e−y − y 3 e−y
8 3
1 −y 3
= 6e y
8
(c) Find E(X).
To find the expected value of X we use the marginal distribution of X and integrate
over the domain (0, ∞).
Z ∞
1 −|x| 1 −|x|
E(X) = x e |x| + e dx
0 4 4
x, x ≥ 0
|x| =
−x, x < 0
Z ∞
1 −|x|
E(X) = xe (|x| + 1)
0 4
Z ∞
1 −x
= xe (x + 1)dx
0 4
Z ∞
1 2 −x 1 −x
= x e + xe dx
0 4 4
Z ∞
1 ∞ −x
Z
1 2 −x
= x e dx + xe dx
4 0 4 0
For the first integral, let u = x2 , dv = e−x so du = 2xdx, v = −e−x
For the second integral, let u = x, dv = e−x so du = dx, v = −e−x .
= ...
1 2 −x ∞
= −x e − 3e−x (x + 1) 0
4
1 x2 + 3(x + 1)
= − lim
4 x→∞ ex
which is indeterminate so apply l’Hôpital’s Rule once, and then once more.
L0 H 2
===== 0
So E(X) = 0 .
9
9. The joint probability density function of X and Y is given by
6 2 xy
f (x, y) = x + 0 < x < 1, 0 < y < 2
7 2
(a) Verify that this is indeed a joint density function.
Proof. To show f (x, y) is a joint PDF, we show that the double integral is equal to 0.
2Z 1 Z 2 3 1
x2 y
Z
6 2 xy 6 x
x + dxdy = + dy
0 0 7 2 0 7 3 4 0
Z 2
6 1 y
= + dy
0 7 3 4
2
y2
6 1
= y+
7 3 8 0
= 1
Z 1Z x
6 2 xy
P (X > Y ) = x + dydx
0 0 7 2
Z 1 x
6 xy 2
= x2 y + dx
0 7 4 0
Z 1
x3
6 3
= x + dx
0 7 4
6 5 4 1
= x
7 16 0
15
= 56
10
(d) Find P Y > 12 |X < 1
2 .
Using Bayes’ Rule how we would usually use it would produce the following expression.
P Y > 12 ∩ X < 12
1 1
P Y > X < =
P X < 21
2 2
In terms of the joint distribution, the intersection in the numerator is just the integral
of the joint over the restricted domain. The denominator is also the integral of the joint,
where the limit for integration over x is restricted by X < 12 and the limit for integrating
over y is free to vary over its entire domain. That is,
P Y > 21 ∩ X < 12
1 1
P Y > X < =
P X < 12
2 2
R 2 R 12 6 2 xy
1
2
0 7 x + 2 dxdy
= 1
R 2 R2 6
2 xy
0 0 7 x + 2 dydx
R 2 x3 x2 y 12
1
2
3 + 4 0
= R 12 2
2 xy 2
0 x y+ 4 dx
0
R2 1 y
1
2
24 + 16 dy
= R 12
2
0 2x + xdx
1 1 2 2
24 y + 32 y | 1
2
= 1
2 3 x2 2
3x + 2 |0
69
= 80
Z b
E(X) = xfX (x)dx
a
Z 1
6
2x2 + x dx
E(X) = x
0 7
Z 1
6
= 2x3 + x2 dx
7 0
1
6 x4 x3
= +
7 2 3 0
5
= 7
11
(f) Find E(Y ).
Recall that
Z b
E(Y ) = xfY (y)dy
a
But we do not know fY (y) so we must find it. Yay! We integrate out x from the joint
density and integrate from 0 to 1, the domain of x which will give us a function in terms
of y.
Z 1
6 2 xy
fY (y) = x + dx
0 7 2
3 1
6 x x2 y
= +
7 3 4 0
1
6 1 y 6 4 + 3y
= + =
7 3 4 0 7 12
2
6 4y + 3y 2
Z
E(Y ) = dy
0 7 12
Z 2
1
= 4y + 3y 2 dy
14 0
1 2 2
= 2y + y 3 0
14
8
= 7
12
10. The joint probability density function of X and Y is given by
Find
(a) P (X < Y )
This is the opposite of problem 9c. Since X < Y , we integrate x from 0 to y, and y is
free to vary on its domain. Then,
Z ∞Z y
P (X < Y ) = e−(x+y) dxdy
Z0 ∞ 0
y
= −e−(x+y) dy
0
Z0 ∞
= −e−2y + e−y dy
Z0 ∞
= e−y − e−2y dy
0
1 −2y ∞
−y
= −e + e
2 0
1
= 2
(b) P (X < a)
To find P (X < a) integrate the joint density with respect to y over its domain and with
respect to x from its domain’s lower bound, 0, to a, some constant.
Z aZ ∞
P (X < a) = e−(x+y) dydx
0 0
Z ah i∞
= −e−(x+y) dx
0 0
Z a
= e−x dx
0
= −e−x |a0
= 1 − e−a
13