0
$\begingroup$

I have a question from an example problem in a book I'm reading and am trying to better understand what the author is doing. The example goes something like this:

Problem:

Suppose you have 100 widgets and they are made by 5 production lines, with each production line producing 20% of the total widgets, i.e each production line makes 20 widgets.

Then suppose the error rate for each production line to produce a bad widget is 2% for all the production lines, except for production line one which has a error rate of 5%.

Draw 3 widgets uniformly at random from the 100 widgets without replacement. Define event A as one of the three widgets being defective. Define event B as: the event that a widget was drawn from production line one.

Then what is P(A|B)?

Solution:

The book calculates P(A|B) = 3(.05)(.95)$^2$.

But if we consider a simple situation where we have 100 balls and 5 of them are bad, then we have the same percentages and we have:

100*99*98 possible combinations of balls in our 3 ball sample

and

3(5*95*95) possible draws where we have only one bad ball out of 3.

Then our probability is: 3(5*(95)$^2$) / 100 * 99 * 98 = 135375/970200 = .1395330

But the book yields a probability of: 3(.05)(.95)$^2$ = .135375

Which is correct? Is the book implicitly using "with replacement"?

$\endgroup$
  • $\begingroup$ Is event B AT LEAST one widget, or EXACTLY one widget being drawn from line one? $\endgroup$ – Sheridan Grant Aug 9 at 22:54
  • $\begingroup$ yes, just 1 widget out of 3. exactly one widget that is $\endgroup$ – H_1317 Aug 10 at 0:23
  • 1
    $\begingroup$ "each production line producing 20% of the total widgets" implies that # of widgets from each line is random. "each production line makes 20 widgets" says that # of widgets from each line is fixed number 20. Maybe you should copy/paste the original question. $\endgroup$ – user158565 Aug 10 at 2:34
  • $\begingroup$ @user158565 there were 100 widgets made in this batch. 20% came from each production line and there were 5 lines. hence each made 20 widgets. the number of widgets from each production line is not random as the total number of widgets made (100) is fixed. $\endgroup$ – H_1317 Aug 10 at 2:40
  • $\begingroup$ Suppose in the question, ", i.e each production line makes 20 widgets" is deleted, do you still think 20 widgets from each line? $\endgroup$ – user158565 Aug 10 at 3:02
2
$\begingroup$

Given that all three tested widgets were from production line one, i.e. from the $20$ widgets produced from production line one, the $3(.05)(.95)^2$ caculation presumes each widget has an error with probability $0.05$, independently of the other widgets, and that the three are selected without replacement. In effect the calculation is $0.05 \times 0.95 \times 0.95 + 0.95 \times 0.05 \times 0.95 + 0.95 \times 0.95 \times 0.05$

Another way of getting the same answer would be to say that there was exactly one of the $20$ widgets having an error, i.e. $\frac1{20}=5\%$, and the three to be tested were selected were chosen with replacement. But this is not suggested by the question, as for the other production lines $3\%$ of $20$ is not an integer

I do not see how you got your $3\frac{5\times 95^2}{100 \times 99 \times 98}$. If one out of $20$ had an error and your selected the tree to test without replacement then the probability of one error would be $\frac{3}{20}$ which you might have written $3\frac{1 \times 19 \times 18}{20 \times 19 \times 18}$ or $3\frac{5 \times 95 \times 90}{100 \times 95 \times 90}$

$\endgroup$
  • $\begingroup$ why is 3/20 not equal to P(A|B) in this instance? also why wouldn't the number of groups of 3 with "1 bad, 1 good, 1 good" be 5 * 95 * 94? it seems i could make that many unique 3-tuples. Thanks. $\endgroup$ – H_1317 Aug 10 at 1:05
  • $\begingroup$ $5 \times 95 \times 94$ does not make any sense to me. What do those numbers represent (especially the $94$) when production line one only produced $20$ widgets? $\endgroup$ – Henry Aug 10 at 1:29
  • $\begingroup$ I was looking to calculate the probability using values in a 100 point space instead of a 20 point space by scaling up fractions. I should be able to represent the 20 widget case as looking at the problem as 5/100 widgets are bad and 95 are good... so the total number of combinations i can make would be 100 * 99 * 98 (my denominator) and the fraction of those combinations that contain exactly one good widget would be: 3* (5*95*94). the 5 is the 5 good widgets, i can then make 5*95 unique 2-tuples. then since in each 2-tuple i used one good widget already, i can use the remaining 94 for 3-tups $\endgroup$ – H_1317 Aug 10 at 2:03
  • $\begingroup$ any idea what i am doing wrong in the above? $\endgroup$ – H_1317 Aug 10 at 17:42
1
$\begingroup$

Suppose 20 of 100 items come from line 1 with probability of bad item 0.05, other 80 items come from other lines with probability of bad item being 0.02. Event B is 1 item from line 1 and 2 items from other lines. Event A is 1 of 3 items is bad.

Suppose B already happened. Let check the probability of A, i.e., P(A|B).

Given B, A can be split into two mutually exclusive events, bad one come from line 1 (C1) and bad one from other line (C2).

Probability of C1 is 0.05*0.98$^2$ (0.05 = probability the one from line 1 is bad, 0.98$^2 = probability that 2 from other lines are good)

Probability of C2 is 0.95*2*0.98*0.02 (0.95 = probability the one from line 1 is good, 2*0.98*0.02 = probability that 1 is good and 1 is bad from other lines.)

So P(A|B) = 0.05*0.98$^2$ + 0.95*2*0.98*0.02

$\endgroup$
  • $\begingroup$ P(A|B) should be the scenario where we assume the 100 fuses come from production line B. So given we are picking from production line 1, what is the probability that 1 out 3 fuses are bad? Maybe I didn't make that clear in the original post, sorry. $\endgroup$ – H_1317 Aug 10 at 17:39
  • $\begingroup$ In fact, I re-wrote your question in the first paragraph based on my understanding. So comparing my first paragraph to you question, see where the different are? $\endgroup$ – user158565 Aug 10 at 18:00
  • $\begingroup$ it should be "suppose 100 items come from production line 1, then what is the probability that we draw 1 out 3 as bad fuses" without replacement $\endgroup$ – H_1317 Aug 10 at 18:02
  • 1
    $\begingroup$ That is equivalent to "Given probability of success is 0.05, what is the probability of 1 success out of 3 draws". Following Binomial distribution, the answer in the book is correct. $\endgroup$ – user158565 Aug 10 at 18:08
  • $\begingroup$ This is the correct answer to the problem as stated and clarified in response to my original comment. @H_1317 you might want to edit your original question to clarify that the 100 widgets come from production line one, which is very different from "exactly one of the three widgets come from line one." $\endgroup$ – Sheridan Grant Aug 12 at 6:40

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.