Vous êtes sur la page 1sur 4

SOLUTIONS

MATH 441 – HOMEWORK 6

#1: The flow of traffic at certain street corners can sometimes be modeled as a sequence of
Bernoulli trials be assuming that the probability of a car passing during any given second is a
constant p and that there is no interaction between the passing of cars at different seconds. If we
treat seconds as indivisible time units (trials), the Bernoulli model applies. Suppose a pedestrian
can cross the street only if no car is to pass during the next 3 seconds. Find the probability that
the pedestrian has to wait exactly 4 seconds before starting to cross.

Solution: If we let S = the event a car does not pass and F = the event a car passes, then in
the seven seconds in question, we must have the final three events be S, and at least one of the
first four and the fourth event be F .
Then, we have

P (at least one F in the first 3) = 1 − P (all S in the first 3))


= 1 − (1 − p)3 .

Also, we see

P (all S in the last 3) = (1 − p)3 .

Therefore, the desired probability is

P (___F SSS) = (1 − (1 − p)3 )p(1 − p)3 .

QED

#2: A man with n keys want to open his door and tries the keys at random. Exactly one key
will open the door. Find the mean number of trials if
(a) Unsuccessful keys are not eliminated from further selection.
(b) Unsuccessful keys are eliminated.

Solution: If we let X be the random variable representing the number of trials it takes to open
the door, then we have:
(a) X ∼ Geom(1/n), which has pdf
( ¡ ¢ ¡ ¢
n−1 x−1 1
n n , x = 1, 2, . . . , n
fX (x) = .
0, otherwise

Then, the mean number of trials would be given by E(X) = n, since X ∼ Geom(1/n),
and we recall the expectation is

1 − 1/n
E(X) = + 1 = n − 1 + 1 = n. ¤
1/n
1
(b) Now, since we are selecting keys after replacing the bad ones, if we let Ai = the event
that a good key is selceted on trial i, we see
1
P (X = 1) = P (A1 ) = ,
n µ ¶ µ ¶
¡ ¯ c¢ 1 n−1 1
c ¯
P (X = 2) = P (A1 ∩ A2 ) = P A2 A1 · P (A1 ) = c
· = ,
n−1 n n
¡ ¯ ¢ ¡ ¯ ¢
P (X = 3) = P (Ac1 ∩ Ac2 ∩ A3 ) = P A3 ¯Ac1 ∩ Ac2 · P Ac2 ¯Ac1 · P (Ac1 )
µ ¶ µ ¶ µ ¶
1 n−2 n−1 1
= · · = ,
n−2 n−1 n n
..
.
1
P (X = x) = .
n
Thus, (
1
fX (x) = n , x = 1, 2, . . . , n .
0, otherwise
Therefore, the mean number of trials is
Xn µ ¶
1 1 n(n − 1) n−1
E(X) = x· = = . ¤
n n 2 2
x=1
QED

#3: A standard drug is known to be effective 80% of cases in which it is used. A new drug is
tested on 100 patients and found to be effective in 85 cases. Is the new drug superior? (Hint:
Evaluate the probability of observing 85 or more successes assuming that the new and old drugs
are equally effective.)
Solution: Let us define the drug being effective as success. Then the probability of success is
80%, and we can assume that the individual patients are independent of one another. Then, for
n = 100 and p = 0.8, if we let Y = the number successful out of n, we see that Y ∼ Binom(n =
100, p = 0.8). Thus, the pmf is given by
 Ã !

 100
(0.8)y (0.2)100−y , y = 1, 2, . . . , 100
fY (y) = y .


0, otherwise
Then the probability of the new drug being effective in 85 of 100 cases if the effectiveness is
the same as the standard drug is
100
à !
X 100
P (Y ≥ 85) = (0.8)y (0.2)100−y = 0.1285.
y=85
y
This is not very likely, so it quite possible the new drug is more effective than the second.
However, the 85 cases could have easily occurred simply by random variation, but the chance of
that is very small.
QED

#4: A large number of insects are expected to be attracted to a certain variety of rose plant. A
commercial insecticide is advertised as being 90% effective. Suppose 2,000 insects infest a rose
garden where the insecticide has been applied, and let X = number of surviving insects.
(a) What probability distribution might provide a reasonable model for this experiment?
(b) Write down, but do not evaluate, an expression for the probability that fewer than 100
insects survive, using the model in part (4a).
2
(c) Evaluate an approximation to the probability in part (4b).

Solution:
(a)
(b) The probability of fewer than 100 insects surviving would be
99
à !
X 2000
P (X < 100) = (0.1)x (0.9)2000−x . ¤
x=0
x
(c) Since we know that the mean of this binomial distribution is E(X) = np = 200, we can
use the Poisson approximation to the binomial, i.e
·
X ∼ Binom(n = 200, p = 0.1) ∼ Poisson(np = 200).

Then, the exact probability given by the binomial distribution is


99
à !
X 2000
P (X < 100) = (0.1)x (0.9)2000−x = 1.113973 × 10−16 ≈ 0.
x=0
x
The approximated probability given by the Poisson distribution is
99 −200
X e 200x
P (X < 100) = = 1.843894 × 10−15 ≈ 0.
x!
x=0

We can see the approximation is very close. The R-code for the calculations is given
below.
# Exact
pbinom(99,2000,0.1)

# Approximation
ppois(99,200)
¤
QED

#5: Let the number of chocolate chips in a certain type of cookie have a Poisson distribution.
We want the probability that a randomly chosen cookie has a least two chocolate chips to be
greater than 0.99. Find the smallest value of the mean of the distribution that ensures this
probability.

Solution: Let X ∼ Poisson(λ). Then the pmf of X is


( −λ x
e λ
fX (x) = x! , x = 1, 2, . . . .
0 otherwise
Recall that E(X) = λ.
Then the probability of having at least two chocolate chips is P (X ≥ 2).
Observe,
e−λ λ0 e−λ λ1
P (X = 0, 1) = + = e−λ (1 + λ).
0! 1!
Then,
P (X ≥ 2) = 1 − P (X = 0, 1) = 1 − e−λ (1 + λ).
For a desired probability of over 99%, we would have

1 − e−λ (1 + λ) ≥ 0.99
⇒ 0.01 ≥ e−λ (1 + λ)
⇒ λ ≥ 6.63835 (via computer).
3
Therefore, the smallest value for the mean of the distribution ensuring this probability is
6.63835.
QED

#6: Two movie theaters compete for the business of 1,000 customers. Assume that each customer
chooses between the movie theaters independently and with "indifference." Let N denote the
number of seats in each theater.
(a) Using the binomial model, find an expression for N that will guarantee that the proba-
bility of turning away a customer (because of a full house) is less than 1%.
(b) Write R-script to get a numerical value for N .

Solution:
(a) We know N will be the number of seats in each theater and the probability of an individual
going to a specific theater is 1/2. WLOG, let X = the number of people choosing theater
1 (note: this means that 1000 − X people choose theater 2.) Then
X ∼ Binom(1000, 1/2).
Since a value of X over N would mean that theater 1 would turn people away, and a
value of X under 1000 − X would mean that theater 2 would turn people away, we would
want to find the probability that theatre 1 has between 1000 − N and N people choosing
it (note: this would mean that between 1000 − N and 1000 − (1000 − N ) = N people
would choose theater 2). Therefore, we have
P (neither theater is too full) = P (1000 − N ≤ X ≤ N )
N
à !
X 1000
= (1/2)x (1/2)1000−x
x=1000−N
x
N
à !
X 1000
= (1/2)1000 .
x=1000−N
x
Since we want the probability of turning people away to be less than 1%, we then have
the expression à !
XN
1000
(1/2)1000 ≥ 0.99. ¤
x=1000−N
x
(b) The R-script below will solve for N . [Note: the three lines commented out with # could
be used if one does not know the R-function pbinom in the next line.]

N <- 1000
stop <- 0
while (stop==0)
{ N <- N-1
#y <- seq(1000-N,N)
#x <- choose(1000,y)*2^(-1000)
#if (sum(x)<0.99) {stop <- 1}
if ( (pbinom(N,1000,.5)-pbinom(1000-N-1,1000,.5))<0.99 ) {stop <- 1}
}
N
This gives a value of N = 540, so each theatre must be able to house at least 540
customers to ensure that on a night with 1000 choosing indifferently the probability of
turning a customer away (due to a full house) is less than 1%. ¤
QED
4