HW04_sol
HW04_sol
Homework 4 – Solutions
Out: Oct 9, 2019 ; Due: Oct 17, 2019 by 5pm
Submit in box outside instructor’s office (9-219A SBA SSE)
No late or electronic submission allowed
These problems should be attempted individually, but you may (optionally) choose to
partner with up to three others (a group of max 4) to submit a single write up. We allow
discussion with (but not copying from) other students. If there are confusions or questions,
see your TA or Instructor. Attempting the problems individually is important for a thorough
understanding of the course material and also for successfully attempting the exams.
Problem 5: Figure shows the CDF of a mixed type of random variable. Find the following
probabilities listed below:
FX (x)
P {X < − 1/2}
P {X < 0} 1
P {X ≤ 0}
0.75
P {1/4 ≤ X < 1}
P {1/4 ≤ X ≤ 1} 0.5
P {X > 1/2}
0.25
P {X ≥ 5}
P {X < 5} x
0 .5 1 1.5
Solution:
1 1 1
P X<− = lim F − − =0
2 n→∞ 2 n
1
P {X < 0} = lim F 0 − =0
n→∞ n
1
P {X ≤ 0} = F (0) =
4
1 1 1 1 1 5 3
P ≤ X < 1 = lim F 1 − − lim F − = − =
4 n→∞ n n→∞ 4 n 2 16 16
1 1 1 5 11
P ≤ X ≤ 1 = F (1) − lim F − =1− =
4 n→∞ 4 n 16 16
1 1 3 5
P X> =1−F =1− =
2 2 8 8
1
P {X ≥ 5} = 1 − lim F 5 − =1−1=0
n→∞ n
1
P {X < 5} = lim F 5 − =1
n→∞ n
Problem 6: A random variable X , which represents the weight (in ounces) of an article,
has density function given by:
z − 8 8 ≤ z ≤ 9
fX (z) = 10 − z 9 < z ≤ 10
0 otherwise
(b) The manufacturer sells the article for a fixed price of $2.00. He guarantees to refund the
purchase money to any customer who finds the weight of his article to be less than 8.25 oz.
His cost of production is related to the weight of the article by the relation x/15 + .35. Find
the expected profit per article.
Solution: Let profit be a function g(x) of X:
(
x
−( 15 + 0.35) 8 ≤ x ≤ 8.25
g(x) = x
2 − ( 15 + 0.35) 8.25 ≤ x ≤ 10
Z 10
E[g(X)] = g(x)f (x) dx
8
Z 8.25 Z 10 Z 10
x x
=− ( + 0.35)f (x) dx + 2 f (x) dx − ( + 0.35)f (x) dx
15 8.25 15
Z8 10 Z8.25
10
x X
=− + 0.35 f (x) dx + 2 f (x) dx = −E + 0.35 + 2P {X ≥ 8.25}
8 15 8.25 15
Z 8.25
E[X] 79
=− − 0.35 + 2 1 − (x − 8) dx =
15 8 80
Problem 7: The time it takes to repair a personal computer is a random variable whose
density, in hours, is given by f (x) = 12 ; 0 < x < 2. The cost of the repair depends on the
√
time it takes and is equal to 40 + 30 x when the time is x. Compute the expected cost to
repair a personal computer.
√
Solution: Let the cost of repair be g(x) = 40 + 30 x then we have to find E[g(X)].
2 2 2
√
Z Z
1 h 3
i
E[g(X)] = g(x)f (x) dx = (40 + 30 x) dx = 10x 2 + 20x = 68.2843
0 0 2 0
Problem 8: You arrive at a bus stop at 10 oclock, knowing that the bus will arrive at
some time uniformly distributed between 10 and 10:30. What is the probability that you
will have to wait longer than 10 minutes? If at 10:15 the bus has not yet arrived, what is
the probability that you will have to wait at least an additional 10 minutes?
Solution: Let X be the time in minutes you have to wait, then:
1 2
First P {X > 10} = 1 − P {X ≤ 10} = 1 − =
3 3
P {X > 25, X > 15}
Then, P {X > 25|X > 15} =
P {X > 15}
5
P {X > 25} 1
= = 30
15 =
P {X > 15} 30
3
Problem 8a: In the 1980s, an average of 121.95 workers died on the job each week. Give
estimates of the following quantities:
(i) the proportion of weeks having 130 deaths or more;
(ii) the proportion of weeks having 100 deaths or less.
Explain your reasoning.
Solution: Let Y is the random variable equal to the number of weekly deaths; it is reason-
able to assume that Y is a Poisson random variable with parameter λ = 121.95.
(i) We need P {Y ≥ 130}. Using Poisson to solve this will require too much computation.
Let us approximate this by using a Normal random variable X with the same mean and
variance as Y . Noting that E[Y ] = Var(Y ) = 121.95, we have X ∼ N (121.95, 121.95).
Therefore,
Problem 9: The Scholastic Aptitude Test mathematics test scores across the population of
high school seniors follow a normal distribution with mean 500 and standard deviation 100.
If five seniors are randomly chosen, find the probability that:
(a) all scored below 600
600−500
Solution: P {X < 600} = P {Z < 100
} = P {Z < 1} = Φ(1) = 0.8413. The desired
probability is then 0.84135 = 0.4215
(b) exactly three of them scored above 640
Solution: P {X > 640} = P {Z > 640−500
100
} = P {Z > 1.4} = 1−Φ(1.4) = 0.0808. Therefore,
5
the desired probability is 3 (0.0808) (1 − 0.0808)2 = 0.00223
3
Problem 10: A manufacturer produces bolts that are specified to be between 1.19 and
1.21 inches in diameter. If its production process results in a bolts diameter being normally
distributed with mean 1.20 inches and standard deviation .005, what percentage of bolts will
not meet specifications?
Solution: We have X ∼ N (1.2, 0.0052 ). The percentage of bolts that meet the specifications
is:
1.19 − 1.2 1.21 − 1.2
P {1.19 ≤ X ≤ 1.21} = P ≤Z≤
0.005 0.005
= P {−2 ≤ Z ≤ 2} = Φ(2) − Φ(−2)
= Φ(2) − (1 − Φ(2)) = 2Φ(2) − 1 = 0.9544
Therefore, 1 − 0.9544 = 4.56% bolts are rejected.
Problem 11: A random variable X is said to have a lognormal distribution if log X is
normally distributed. If X is lognormal with E[logX] = µ and V ar(log X) = σ 2 , determine
the cumulative distribution function of X. That is, what is P {X ≤ x}?
Solution: Let Y = log(X) then eY = X, where Y ∼ N (µ, σ 2 )
FX (x) = P {X ≤ x} = P {eY ≤ x}
= P {Y ≤ log(x)} = FY (log(x))
Z log x
1 2 2
=√ e−(z−µ) /2σ dz
2πσ −∞
log x − µ
=Φ Note: Φ(·) ≡ standard Normal CDF.
σ
Problem 12: The lifetime of a color television picture tube is a normal random variable
with mean 8.2 years and standard deviation 1.4 years. What percentage of such tubes lasts:
(a) more than 10 years;
Solution: We use X ∼ N (8.2, 1.42 ) as the lifetime of the picture tube. Then, P {X > 10} =
P Z > 10−8.2
1.4
= 1 − P {Z ≤ 1.2857} = 1 − Φ(1.2857) = 0.0993
(b) less than 5 years;
5−8.2
Solution: P {X < 5} = P Z < 1.4
= P {Z < −2.2857} = 1 − P {Z < 2.2857} = 0.0111
(c) between 5 and 10 years?
Solution: P {5 < X < 10} = 1 − P {X > 10} − P {X < 5} = 0.8896
Problem 13: An IQ test produces scores that are normally distributed with mean value
100 and standard deviation 14.2. The top 1 percent of all scores are in what range?
Solution: Given X ∼ N (100, 14.22 ), we need to find c such that P {X > c} = 0.01, which
implies P {Z > c−100
14.2
} = 0.01. Thus, we require P {Z < c−100
14.2
} = 0.99. But from the table
for the CDF of standard Normal table, P {Z < 2.33} = Φ(2.33) = 0.99. Therefore, we can
write c−100
14.2
= 2.33 which yields c = 133.
Problem 14: If X is a chi-square random variable with 6 degrees of freedom, find: (a)
P {X ≤ 6};
Solution: In this problem X ∼ χ26 . Then P {X < 6} = 0.5768 (Using chi2cdf in MATLAB
or Wolfram alpha)
(b) P {3 ≤ X ≤ 9}
Solution: P {3 ≤ X ≤ 9} = P {X ≤ 9} − P {X < 3} = 0.6353
Problem 15: If X ∼ U nif orm(0, 1), calculate E[X n ] and Var(X n ).
Solution:
1 1
xn+1
Z
n n 1
E[X ] = x dx = =
0 n+1 0 n+1
n 2n n 2
Var(X ) = E[X ] − E[X ]
2
n2
1 1
= − =
2n + 1 n+1 (n + 1)2 (2n + 1)
Problem 16: If X is normally distributed with mean 1 and variance 4, use the tables to
find P {2 < X < 3}.
Solution: P {2 < X < 3} = P 2−1 < Z < 3−1 = P 12 < Z < 1 = Φ(1) − Φ(0.5) =
2 2
0.1498
Problem 17: A total of r keys are to be put, one at a time, in k boxes, with each key
independently being put in box i with probability pi , ki=1 pi = 1. Each time a key is put
P
in a nonempty box, we say that a collision occurs. Find the expected number of collisions.
Solution: Let X be the number of collisions. Define Xi as follows:
(
1 if a collision occurs in box i
Xi =
0 otherwise
Therefore X = X1 + X2 + . . . + Xk
and, E[X] = E[X1 ] + E[X2 ] + . . . + E[Xk ]
k
X k
X
= E[Xi ] = P {Xi = 1}
i=1 i=1
Problem 18: 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
(b) What is the probability that the sum of the next 2 years’ rainfall will exceed 84 inches?
Solution: We have X ∼ N (40.14, 8.72 ) for next year’s annual rainfall and Y ∼ N (40.14, 8.72 )
for next to next year’s annual rainfall. Here X is independent of Y , therefore
X + Y ∼ N (40.14 + 40.14, 8.72 + 8.72 ) = N (80.28, 12.32 ).
84 − 80.28
P {X + Y > 84} = P Z > = 1 − P {Z < 0.3024}
12.3
= 1 − Φ(0.3024) = 0.3821
(c) What is the probability that the sum of the next 3 years’ rainfall will exceed 126 inches?
Solution: Similarly X + Y + W ∼ N (3 × 40.14, 3 × 8.72 ) = N (120.42, 15.072 ) .
126 − 120.42
P {X + Y + W > 126} = P Z > = 1 − P {Z < 0.3703}
15.07
= 1 − Φ(0.3703) = 0.3556
(d) For parts (b) and (c), what independence assumptions are you making?
Solution: Annual rainfalls in two different years are independent of each other.
Problem 23: Let X be a normal random variable with mean 12 and variance 4. Find the
value of c such that P {X > c} = .10
Solution:
P {X > c} = 0.10
P { X−12
2
> c−12
2
} = 0.10
P {Z > c−122
} = 0.10
1 − P {Z < c−12 2
} = 0.10
c−12
1 − Φ( 2 ) = 0.10
Φ( c−12
2
) = 0.90
c−12
2
≈ 1.28
c ≈ 14.56
Problem 24: Two chips are being considered for use in a certain system. The lifetime
of chip-I is modeled by a Gaussian random variable with mean 20000 hours and standard
deviation 4000 hours. Consider that the probability of negative lifetime is negligible. The
lifetime of chip-II is also a Gaussian random variable but with mean 22000 hours and standard
deviation l000 hours. Which chip is preferred if the target lifetime of the system is 20000
hours? 24000 hours?
Solution: Let X1 be the lifetime of chip-I and X2 be the lifetime of chip-II, then:
For the target lifetime of 20000 hours:
20000 − 20000
P {X1 < 20000} = P Z < = P {Z < 0} = Φ(0) = 0.5
4000
20000 − 22000
P {X2 < 20000} = P Z < = P {Z < −2} = 1 − Φ(2) = 0.0228
1000
Here chip-II is preferred (higher chance that chip-I will not meet target).
Now for the target lifetime of 24000 hours:
24000 − 20000
P {X1 < 24000} = P Z < = P {Z < 1} = Φ(1) = 0.8413
4000
24000 − 22000
P {X2 < 24000} = P Z < = P {Z < 2} = Φ(2) = 0.9772
1000
Here chip-I is preferred (higher chance that chip-II will not meet target).
Problem 25: The exam grades X in a certain class has a Normal pdf with mean m and
standard deviation σ. The instructor wants to scale the distribution for ease of grading and
wants to generate Y = aX + b such that Y has a mean m̂ and standard deviation σ̂. Find
a and b, the constants of linear transformation.
Solution: First m0 = E[Y ] = aE[X]+b = am+b. Then, σ 0 2 = Var(Y ) = a2 Var(X) = a2 σ 2 .
0 0
Solving for a and b, we get a = ± σσ and b = m0 ∓ σσ m.
Problem 26: The lifetime X of a light bulb is a random variable with:
1
P {X > t} = ; t≥0
1+t
Suppose three such light bulbs are installed at time t = 0. It is known that at t = 1, all
three light bulbs are still working. Find the probability that at least one light bulb is still
working at t = 9.
Solution: If X1 , X2 , X3 are the lifetimes of the three light bulbs then using independence,
the desired probability is: = 1 − P {X1 ≤ 9|X1 ≥ 1}3 . Using conditional probability:
P {X1 ≤ 9, X1 ≥ 1}
P {X1 ≤ 9|X1 ≥ 1} =
P {X1 ≥ 1}
1
From the given expression: P {X1 ≥ 1} = 1+1
= 12 . Furthermore,
1 1 2
P {X1 ≤ 9, X1 ≥ 1} = P {X1 ≥ 1} − P {X1 ≥ 9} = − =
1+1 1+9 5
The desired probability is, therefore given by:
3
3 2/5
1 − P {X1 ≤ 9|X1 ≥ 1} = 1 − = 0.488
1/2
f (x, y) = c y 2 − x2 e−y
− y ≤ x ≤ y, 0 < y < ∞
Problem 30: (Optional) Let X = cos Θ and Y = sin Θ, where Θ is a random variable
uniformly distributed in the interval (0, 2π). Find the conditional density fY |X (y|x) and
E[Y |X].
Solution: X = cos Θ and Y = sin Θ
fX,Y (x, y)
fY |X (y|x) =
fX (x)
X fΘ (θ)
fX (x) = dx
x dθ θ=θx
1 1 1
= √ + √ = √
2π 1 − x 2 2π 1 − x 2 π 1 − x2
√
We realize that Y = sin Θ = sin cos−1 X implies Y = ± 1 − X 2 i.e., Y is a function of X.
1 √ 1 √
fY |X (y|x) = δ(y − 1 − x2 ) + δ(y + 1 − x2 )
2 2
1√ 1 √
E[Y |X = x] = 1 − x2 − 1 − x2 = 0
2 2
=⇒ E[Y |X] = 0