Defective Shirts

This one is taken from a lecture by Eddie Woon, available online. Two friends, Ammie and Becky, make shirts. Ammie makes 20 shirts a day and has a defect rate of 2%. Becky is 50% faster but causes twice the defects. If they sell 30 shirts per day, what is the probability that the daily pack (received by the buyer) has two or fewer defects?

The first step is to calculate the defect probability.

P(D) = Proportion of shirt by Annie x Defect rate of Annie + Proportion of shirt by Becky x Defect rate of Becky
P(D) = (20/50)(2/100) + (30/50)(4/100) = 0.032.

Now, we apply the binomial equation to calculate the probability of having two or fewer defects inside the pack of 30- shirts.

the probability of s success in n rounds is
nCs x ps x q(n-s)

30C0 x 0.0320 x (1- 0.032)30 + 30C1 x 0.0321 x (1- 0.032)29 + 30C2 x 0.0322 x (1- 0.032)28 = 0.93 or 93%

The R code is

pbinom(2, 30, 0.032)

Binomial Probability: Eddie Woo