How to use this calculator
Enter the number of successes (such as defective parts) and the sample size for each sample, the confidence level, and for a test the hypothesized proportion and the alternative.
Formulas
Intervalp̂ ± zα/2√(p̂(1 − p̂)/n)
Testz0 = (p̂ − p0)/√(p0(1 − p0)/n)
Two samplesz0 = (p̂1 − p̂2)/√(p̂(1 − p̂)(1/n1 + 1/n2)), pooled p̂
Sample sizen = (zα/2/E)² p(1 − p)
Worked example
13 defective in a sample of 300; is the defect rate below 5%? (Montgomery Example 9-10, one-sided)
- p̂ = 13/300 = 0.0433.
- z0 = (0.0433 − 0.05)/√(0.05 × 0.95/300) = −0.53.
- P = Φ(−0.53) = 0.298, so we fail to reject H₀: there isn’t evidence that the rate is below 5%.
Frequently asked questions
When does the normal approximation work?
When np and n(1 − p) are both at least about 5 (some books say 10). For smaller samples use the binomial distribution directly.
Why is the test pooled but the interval not?
Under H₀ the two proportions are equal, so the test uses one pooled estimate. The interval doesn’t assume they are equal.