Sample size

Attribute counts and measured variables

🔒 All your data stays on your device. Nothing is sent.

Pass/fail counts, or a measured mean and a t-test.

Sample size59Jump to result

What are you sizing?

This chooses the kind of question. Counting pass or fail is a different sum from measuring a length.More detail. Switches among the success-run plan, proportion interval, proportion test, mean interval, one-sample t, and two-sample t.

How many items to test when only a small number of failures is allowed, including the zero-failure success run.

95 means about 95 ranges out of 100 would cover the true number. This one range still might not.
The lower bound you want to claim.
0 is the success-run test. 1 or 2 allows that many failures.

Sample size

items, with zero failures allowed
59
Attribute — reliability demonstration, c = 0

The formula does not know how easy the items are to collect.

Formula

Formula. n = ln(1 − confidence) / ln(reliability), then round up to the next whole item.

With these inputs. n = ln(1 − 0.95) / ln(0.95) = 58.404, which rounds up to 59.

reliability^59 = 0.0485, which is at or below 0.05. At n = 58 it is still 0.051.

Assumptions and references

Assumptions

  • Success-run and allowed-failure plans use the binomial distribution. For zero failures the closed form is n = ln(1 − confidence) / ln(reliability), rounded up. The familiar 95% / 95% plan is 59.
  • Proportion formulas use the normal approximation, with no continuity correction. They get rough when n × p is small. Unknown p defaults, in the example, to 0.5.
  • A finite population uses n / (1 + (n − 1) / N) on the unrounded estimate, then rounds up.
  • Mean and t-test plans replace z with Student-t critical values and take the smallest n that satisfies the formula. Groups in the two-sample plan are equal and share one planning standard deviation.
  • That t method usually matches textbook tables. Software that integrates a non-central t can differ by a sample or two.

How this is calculated

  • With failures allowed, n is the smallest whole number whose binomial probability of c or fewer failures, at failure rate 1 − reliability, is at most 1 − confidence.
  • Proportion interval: n = z² × p × (1 − p) / E².
  • Proportion test: n = [z_α √(p0(1−p0)) + z_power √(p1(1−p1))]² / (p1 − p0)².
  • Mean interval: smallest n with t_(1−α/2, n−1) × σ / √n ≤ E.
  • One-sample t: n ≥ (t_α + t_power)² × σ² / δ², df = n − 1.
  • Two-sample t: n per group ≥ 2 × (t_α + t_power)² × σ² / δ², df = 2n − 2. For d = 0.5, two-sided 5% and 80% power, this is 64 per group.
Methods and references
  • Zero failures: n = ln(1 − confidence) / ln(reliability), rounded up. With failures allowed, n is the smallest integer whose binomial probability of c or fewer failures is at most 1 − confidence. That is the classical success-run reliability demonstration. The 95% / 95% plan is n = 59 when c = 0.
  • A proportion interval uses n = z² p (1 − p) / E², the large-sample formula in NIST/SEMATECH e-Handbook section 3.3.3.3, then the finite-population correction when a lot size is typed, then rounding up. There is no continuity correction. With p = 0.5, a 95% interval and a margin of 0.05, this is 385.
  • A proportion test uses the normal approximation in NIST/SEMATECH section 7.2.4.2, which cites Fleiss, Levin and Paik for the derivation. NIST’s worked case (p0 = 0.10, p1 = 0.20, one-sided 5%, 90% power) is about 102 before their continuity correction. This page does not add that correction.
  • A mean interval is the smallest n with t(1−α/2, n−1) × σ / √n ≤ E. A one-sample t plan is the smallest n with n ≥ (tα + tpower)² σ² / δ². NIST/SEMATECH section 7.2.2.2 writes that t form when the standard deviation is estimated. The two-sample plan uses the equal-group form with 2 in the numerator and df = 2n − 2. These are not a noncentral-t integral. For a standardised difference of 0.5, a two-sided 5% test and 80% power, the two-sample rule gives 64 per group.