We take as our null hypothesis that the proportion of defectives . The number of defectives in a sample of under the null hypothesis has a binomial distribution , and so the probability of or more defectives in such a sample is:

Now there are a number of ways of evaluating this, we can do it directly if we have a suitable binomial calculator, or use the normal or Poisson approximations. I will use the normal approximation as it is more intuitive (I do have a binomial calculator here but use of that will be completely opaque on you).

For the normal approximation we need the mean and SD of the number of failures under the null hypothesis. As we have a binomial we know the mean is , and . Under this approximation or more translates into more than to allow for the needed continuity correction, and this corresponds to a z-score:

The critical z-score for a level of significance is , so as we reject the hypothesis that the proportion of defectives is at this level of significance.

(For a standard normal distribution this is the p-value for this sample)

For the test as formulated here a type I error is rejecting the null hypothesis when it is in fact true. The way we have designed this test that has been set at or .

The type II error is that of accepting the null hypothesis when in fact the alternative is true, and so depends on what we think the alternative is

RonL