Chapter 5: Discrete Probability Distributions

1. If 85% of vehicles arriving at the Lincoln Tunnel (connecting New Jersey and New York City) have either New York or New Jersey license plates, what is the probability that, of the next 20 vehicles, 2 or fewer (that is, 0, 1, or 2) will bear license plates from states other than New Jersey or New York?

Use R to find the solution.

Answer:

Using capture5.jpg, setting n = 20 and p = 0.15, find f(0), f(1), and f(2), and sum. The answer is 0.4049.

capture6.jpg

capture7.jpg

Note: in using R to find this probability, both dbinom() and pbinom() .

#Comment1. use the function dbinom(x,n,p) for x=0,1, and 2; sum

dbinom(0, 20, 0.15) + dbinom(1, 20, 0.15) + dbinom(2, 20, 0.15)

##   [1]   0.4048963

#Comment2. Use function pbinom(x,n,p) to find cumulative binomial

#probabilities. When n=20 and p=0.15, then p(x=0)+p(x=1)+p(x=2) is:

#pbinom(2,20,0.15)=dbinom(0,20,0.15)+dbinom(1,20,0.15)+

#dbinom(2,20,0.15).

pbinom(2, 20, 0.15)

##   [1]   0.4048963

2. At a certain university, half the students enrolled in a statistics class take the course on a pass-fail basis; the other half take it for a normal grade of A,...,F.

a. If 20 students are selected at random, what is the probability that 12 (of the 20) are taking the course pass-fail?

Answer:

0.1201

dbinom(12, 20, 0.50)

##   [1]   0.1201344

b. What is the probability that no more than 5 students are taking the course for a normal grade of A,...,F?

Answer:

0.02069

pbinom(5, 20, 0.50)

##   [1]   0.02069473

c. What is the expected number who are taking the course on a pass-fail basis?

Answer:

E(x) = np = (20)(0.50) = 10 students.

3. Calls arrive at a customer-service toll-free number at the rate of 20 per hour. Use R to find the solutions to the following questions.

a. What is the probability of five or more calls in a 15-minute period?

Answer:

0.5595

#Comment1. convert 20 calls/60 minutes to 5 calls/15 minutes;

#use 1 minus Poisson probability of 4 or fewer calls.

1 - ppois(4, 5)

##  [1]   0.5595067

#Comment2. or subtract from 1 the probabilities of x=0,1,2,3,

#and 4 calls

1 - (dpois(0, 5) + dpois(1, 5) + dpois(2, 5) + dpois(3, 5) + dpois(4, 5))

##   [1]   0.5595067

b. What is the probability that between 7 and 12 calls, inclusive, will arrive in the next 30 minutes?

Answer: 0.6614.

#Comment1. convert 20 calls/60 minutes to 10 calls/30 minutes;

#subtract cumulative probability of 6 calls from the cumulative

#probability of 12 calls.

ppois(12, 10) - ppois(6, 10)
##  [1]  0.6614151

#Comment2. or sum the probabilities of x=7,8,9,10,11,12.
sum(dpois(7 : 12, 10))
##  [1]  0.6614151

c. If one particular caller has a difficult problem to resolve and requires 15 minutes of the customer-service representative’s time, how many callers would we expect to be waiting on hold once the call has been completed?

Answer:

Since 20 calls every 60 minutes is equivalent to 5 calls every 15 min-utes, we would expect 5 callers to be waiting their turn.

d. If the customer-service representative wishes to take a five- minute coffee break, what is the probability that no calls will be awaiting him once he returns?

Answer: 0.1882

#Comment. converting 20 calls/60 minutes into 1.67 calls/5

#minutes, the probability of 0 calls over a 5-minute period

#is found using dpois(0, 1.67)
dpois(0, 1.67)

##  [1]  0.1882471

4. A manufacturer is concerned with the quality of AA batteries being delivered by a certain supplier. Recently, the average battery life has fallen below the manufacturer’s standard, and so the manufacturer has begun to test the life of the batteries from this particular supplier more closely. To do this, the quality control inspectors randomly select small samples of batteries from each shipping carton of 100. Even if 1 of the batteries fails the test, the entire box of 100 is rejected and returned to the supplier. Suppose that unbeknownst to inspectors, a carton of 100 batteries contains 15 defective batteries. Use R to answer all questions.

a. What is the probability the carton will be returned if a sample of five batteries is selected and tested?

Answer: 0.5643

One way to approach this question is to re-express it as 1 minus the hypergeo-metric probability the  shipment will not be returned, or 1 minus the probability that no defective batteries are detected.

1-dhyper(0, 15, 85, 5)

##  [1]   0.5643167

b. What is the probability the carton will be returned if the sample size is 10?

Answer:  0.8192

Using the same reasoning as that used in part (a), we frame the question in terms of finding 1 minus the probability the shipment will not be returned.

1 - dhyper(0, 15, 85, 10)
##   [1]   0.8192313

c. If the quality control department has decided that it wants (roughly) a 0.85 probability of correctly identifying at least 1 of the 15 defective batteries in the shipping carton, what sample size should they use?

Answer: A sample size of n = 11 results in nearly 0.85 probability that at least one defective item is identified. This answer can be checked in the same manner as that used in parts (a) and (b).

1 - dhyper(0, 15, 85, 11)
##   [1]   0.8493594

5.Suppose we select a random sample of 5 balls from an urn containing 4 red, 3 white, and 2 blue balls. What is the probability that we draw 2 blue and at least 1 red ball? Use R to find the solution..

Answer: 0.2698

Sum the probabilities of the different ways one could get 2 blue and at least 1 red.

(choose(3, 2) * choose(4, 1) * choose(2, 2) + choose(3, 1) * choose(4, 2) * choose(2, 2) +
choose(3, 0) * choose(4, 3) * choose(2, 2)) / (choose(9, 5))

##  [1]   0.2698413