# Binomial distribution of number defective in a sample of 25 randomly selected

I'm having difficulty answering the essay" statistics questions I keep encountering in my practical work. Here are questions and answers in particular:

A manufacturer buys many thousands of a particular component and has agreed with the supplier that only 1% should be defective. To check the quality of a particular batch of components, the manufacturers take a random sample of 25 and thoroughly test them.

i) They find out that two in the sample are defective. If it is true that only 1% of the supplier's output of these components is defective, what is the probability of this happening?

1% of 25 = 0.25

P(r =2) = ${}^{25}C_2$ * 0.25$^2$ * 0.75$^{23}$ = 0.03

This is question I am having difficulty answering. The value of 0.03 obtained in i) seems correct but how would I tackle the below question?

ii) You will now need to consider how you will react to your findings in part (i). There will be variation, between sample size samples, in the number defective if these samples are randomly selected. The probability you calculated tells you how likely it is that you could exactly two defective components out of a randomly selected sample of 25 if, and only if 1% of the output is defective.

In this particular case, would you consider an event with a probability of 0.05 or less to be "unusual", and therefore requiring action, or would you go for a different cut off point? Accordingly, how would you interpret the probability calculated in part (i)? Other than the statistics, what else might you take into consideration? Finally what action would you take if any?

-
Surely your course material did not give the answer $\binom{25}{2}(0.25)^2(0.75)^{23}$ to question i). That answer is not correct. Is it your answer? If so, I can correct it and try to tackle the other part. They should not be saying exactly $2$, but it makes no big difference. – André Nicolas Mar 14 '12 at 21:33
The probability of a defective item is 0.01! – Juan S Mar 14 '12 at 21:37
@AndréNicolas That's the answer I worked out myself. I would really appreciate some help. – methuselah Mar 14 '12 at 21:38
@JuanS please show me how you worked it out. – methuselah Mar 14 '12 at 21:39

The question asks you to find the probability of getting $2$ defective in the sample of $25$ if the true proportion of output that is defective is $1$%, that is, $0.01$. So the correct answer is $$\binom{25}{2}(0.01)^2(0.99)^{23}.$$ This seems to be roughly $0.0238$.

Part ii) has to do with hypothesis testing. Roughly speaking, we have the Null Hypothesis that indeed the supplier's output is only $1$% defective. We have performed an experiment. Even if the supplier's output is only $1$% defective, by bad luck there could be $2$ defectives in the batch of $25$ that was tested.

But this would not happen very often. If the Null Hypothesis holds, then only about $2.38$% of batches of $25$ would have exactly $2$ defectives. So on the "$1$%" hypothesis, something rather unusual has happened. Not impossible, but unusual.

In hypothesis testing, it is common to set a significance level, moderately often $5$%, or $1$%. If in testing something happens which (under the Null Hypothesis) would happen with probability less than $0.05$, then at significance level $0.05$, one rejects the Null Hypothesis. So at significance level $0.05$, the experimental result described is enough to reject the Null Hypothesis.

By the way, a real statistician would calculate the probability of getting $\ge 2$ defective under the Null Hypothesis. This is about $0.02576$. Still well under $0.05$. I am somewhat troubled that the problem setter focused on exactly $2$, this is the wrong approach to hypothesis testing.

Further comments: To me, using level of significance $0.05$ seems unsuitable, I would want stronger evidence to reject the Null Hypothesis. After all, if you have a long-established relationship with a supplier, it seems foolish to dump it on weakish evidence. Also, it is hard to select $25$ items really randomly. Even if overall output is only $1$% defective, there can be non-random day to day variation.

More sensible is to consider the test results as a warning that something might be wrong. So I would at least recommend that more testing be done, since the Null Hypothesis certainly did not get a clean bill of health.

-