Professional Documents
Culture Documents
Homework 4 – Solutions
1. Suppose that 1% of the employees of a certain company use illegal drugs. This company
performs random drug tests that return positive results 99% of the time if the person is a
drug user. However, it also has a 2% false positive rate. The results of the drug test are
known to be independent from test to test for a given person.
(a) Steve, an employee at the company, has a positive test. What is the probability he is a
drug user?
(b) Knowing he failed his first test, what is the probability that Steve will fail his next drug
test?
(c) Steve just failed his second drug test. Now what is the probability he is a drug user?
Solution. Define events: D = {Steve is a drug user}, A1 = {Steve fails the first drug test}
and A2 = {Steve fails the second drug test}. Assume that Steve is no more or less likely
to be a drug user than a random person from the company, so P (D) = 0.01. The data
about the reliability of the tests tells us that P (Ai |D) = 0.99 and P (Ai |Dc ) = 0.02 for
i = 1, 2, and conditional independence P (A1 A2 |D) = P (A1 |D)P (A2 |D) and also the same
under conditioning on Dc .
(a)
99 1
P (A1 |D)P (D) 100 · 100 1
P (D|A1 ) = = 99 1 2 99 =
P (A1 |D)P (D) + P (A1 |Dc )P (Dc ) 100 · 100 + 100 · 100
3
(b)
(c)
holds for all 2n possible choices A∗1 , . . . , A∗n . (Each A∗i can be either Ai or Aci .) Then A1 , . . . , An
are mutually independent.
Solution. We can assume that n ≥ 2 as the statement only makes sense for these values.
We will prove by induction. For n = 2 if we choose A∗1 = A1 and A∗2 = A2 in (1) then we get
P (A∗1 A∗2 . . . A∗n An+1 ) + P (A∗1 A∗2 . . . A∗n Acn+1 ) = P (A∗1 A∗2 . . . A∗n )
on the left side, because P (A) = P ((AB ∪ AB c ) = P (AB) + P (AB c ). (Here A = A∗1 A∗2 . . . A∗n
and B = An+1 .) On the right side we get
P (A∗1 )P (A∗2 ) . . . P (A∗n )P (An+1 ) + P (A∗1 )P (A∗2 ) . . . P (A∗n )P (Acn+1 ) = P (A∗1 )P (A∗2 ) . . . P (A∗n ),
3. An urn contains 3 red balls and 2 yellow balls. You draw a ball without replacement until
you get a red ball. Let X be the number of draws you made.
Solution.
(a) X is discrete and its possible values are {1, 2, 3}. The probabilities are found by counting.
3
P (X = 1) = .
5
2·3 3
P (X = 2) = P (first draw is yellow, second draw is read) = = .
5·4 10
2·1·3 1
P (X = 3) = P (draws 1 and 2 are yellow, draw 3 is red) = = .
5·4·3 10
(b) µX (B) can be computed Pby adding the probability mass function values for all i ∈ B
with 1 ≤ i ≤ 3: µX (B) = i∈B,1≤i≤3 P (X = i) = 35 1B (1) + 10
3 1
1B (2) + 10 1B (3)
(c) X is discrete, so its CDF will be piecewise constant with jumps at the possible values
1,2,3. The sizes of the jumps are equal to the PMF values.
0, x < 1
3, 1 ≤ x < 2
F (x) = 59
10 , 2 ≤ x < 3
1, x ≥ 3.
4. Parts (a)–(e) below describe five different probability spaces. In each case, define a function
X : Ω → R such that X has probability distribution given by P (X = 0) = 14 and P (X =
1) = 34 , or explain why this cannot be done.
1
(a) Ω = {0, 1, 2, 3}, P {ω} = 4 for ω ∈ Ω.
1
(b) Ω = {0, 1, 2, 3, 4}, P {ω} = 5 for ω ∈ Ω.
(c) Ω = {1, 2, 3, . . . }, P {ω} = 2−ω for ω ∈ Ω.
(d) Ω = [0, 1], P (I) = length of I for intervals I ⊂ Ω.
Rb
(e) Ω = R, P ((−∞, 0]) = 0, and P ((a, b)) = a e−x dx for intervals (a, b) ⊂ (0, ∞).
(a) E.g. B = {1, 2, 3} works. Then X(0) = 0 and X(ω) = 1 for ω ∈ {1, 2, 3}.
(b) Not possible because P (B) is multiple of 51 for each event B ⊂ Ω, and hence no event can
have probability 34 required for event B = {X = 1}.
(c) E.g. B = {1, 2} works. Then X(ω) = 1 for ω ∈ {1, 2} and X(ω) = 0 for ω ∈ {3, 4, 5, . . . }.
Then
P (X = 1) = P {1} + P {2} = 2−1 + 2−2 = 43
and P (X = 0) = 1 − P (X = 1) = 14 .
(d) E.g. B = [0, 1/4] works. Then
(
0, 0 ≤ ω ≤ 41
X(ω) = 1
1, 4 < ω ≤ 1.
R∞
(e) We can choose an interval [a, ∞) for B with 0 < a. Then we would need a e−x dx = 3/4,
which can be satisfied by a = log 43 .
Then X(ω) is defined as (
0, ω ≤ log 43
X(ω) =
1, ω > log 34 .
Then
4
Z log 3 4
P (X = 0) = P ((−∞, log ]) =4
3 e−x dx = 1 − e− log 3 = 1
4
0
and
Z ∞ 4
P (X = 1) = P ((log 4
3 , ∞)) = e−x dx = e− log 3 = 43 .
4
log 3
5. Drop a uniformly random point on the triangle with vertices at (0, 0), (5, 0) and (5, 2). Let
X be the x-coordinate of this random point. Find the CDF of X.
Solution. X takes its values in [0, 5]. Thus FX (x) = 0 for x ≤ 0 and FX (x) = 1 for x ≥ 5.
The area of the triangle is 5, and hence the probability of any (Borel) subset A of the triangle
is P (A) = 15 · area(A). For 0 ≤ x ≤ 5, the event {X ≤ x} happens if and only if the random
point falls in the triangle with vertices (0, 0), (x, 0) and (x, 2x/5), whose area is 12 ·x· 2x 2
5 = x /5.
Thus for 0 ≤ x ≤ 5,
x2 /5 x2
FX (x) = P (X ≤ x) = = .
5 25
Summary answer:
0,
x<0
x 2
FX (x) = 25 , 0 ≤ x < 5
1, x ≥ 5.
{X ≤ n} % Ω. (4)
Here is the argument. Since X ≤ n implies X ≤ n + 1, the events {X ≤ n} are nested
nondecreasing. Let ω ∈ Ω be arbitrary. Then X(ω) is some real number, and we can take a
large enough integer m such that X(ω) ≤ m. Then
∞
[
ω ∈ {X ≤ m} ⊂ {X ≤ n}.
n=1
S∞
Thus every sample point ω lies in n=1 {X ≤ n}. (4) is justified.
By (4) and the continuity of the probability measure we get F (n) = P (X ≤ n) → P (Ω) = 1
as n → ∞ along integers. Given ε > 0, pick n so that P (X ≤ n) ≥ 1 − ε. Then s ≥ n implies
1 ≥ F (s) ≥ F (n) ≥ 1 − ε. This proves lim F (s) = 1.
s→∞