Library / Probability distributions / PRD-42
Probability distributions
Sampling without replacement: exact count
Probability of finding exactly x items of a given type in a sample of n drawn without replacement from a lot of N items that contains K of that type.
- Ref
- PRD-42
- Rev
- v1
- Field
- Probability distributions
- Result
- P
The probability of exactly x items of the type in a sample of n drawn without replacement from a lot of N containing K of them is the number of ways to choose them, divided by the number of ways to choose any sample. It is zero outside the possible range, between max(0, n + K − N) and min(n, K).
Probability of finding exactly x items of a given type in a sample of n drawn without replacement from a lot of N items that contains K of that type.
Calculator
- Expected count, nK/N0.8
- Probability of none, C(N − K, n)/C(N, n)0.4015
- Probability of at least one0.5985
What drives the result
Each variable is moved across its typical range while the others stay at the values above. The longest bar is the key driver.
- The chance of finding exactly 1 of the 8 in a sample of 5 from a lot of 50 is 42.3 %.
- The expected count is 0.8, so 1 is above the average outcome.
Chart data as tables
Ranked variables
| Variable | Typical range | Lowest result | Highest result | Swing () | Local step | Change in result |
|---|---|---|---|---|---|---|
| K Items of the type in the lot K | 0 to 20 | 0 | 0.4313 | 0.4313 | +1 | +1.79 % |
| x Count x of the type in the sample | 0 to 10 | 0 | 0.4226 | 0.4226 | +1 | −64.1 % |
| n Sample size n | 1 to 20 | 0.07584 | 0.4286 | 0.3528 | +1 | +1.33 % |
| N Lot size N | 20 to 200 | 0.1731 | 0.4368 | 0.2637 | +1 | −0.553 % |
Sweep of Sample size n
| Sample size n | Probability of exactly x |
|---|---|
| 1 | 0.16 |
| 3.375 | 0.3532 |
| 5.75 | 0.4243 |
| 8.125 | 0.4016 |
| 10.5 | 0.3442 |
| 12.88 | 0.275 |
| 15.25 | 0.1857 |
| 17.63 | 0.13 |
| 20 | 0.07584 |
Sweep one variable
Variables and how each one contributes
Probability of exactly x
What the equation gives you. Everything else feeds it.
Lot size N
The lot size (a count): the total number of items. A larger lot behaves more like sampling with replacement. Raising it by 10 (to 60) moves the result by −6.17 %, from 0.4226 to 0.3966.
Items of the type in the lot K
The number of items of the specified type in the lot (a count), such as defectives. More items of the type raise the chance of finding them. Raising it by 1 (to 9) moves the result by +1.79 %, from 0.4226 to 0.4302.
Sample size n
The sample size (a count): the number of distinct items drawn. A larger sample finds more of the type and reduces the variance. Raising it by 1 (to 6) moves the result by +1.33 %, from 0.4226 to 0.4283.
Count x of the type in the sample
The number of items of the type found in the sample (a count). Moves the count at which the probability is read. Raising it by 1 (to 2) moves the result by −64.1 %, from 0.4226 to 0.1517.
Worked example with the values above
- Ways to choose x of the K: C(8, 1) = 8; ways to choose the rest: C(42, 4) = 111,930.
- Ways to choose any sample: C(50, 5) = 2,118,760.
- P = (8 × 111,930) / 2,118,760 = 0.42262.
Assumptions and limits
- Items are drawn at random without replacement from a finite lot, and every item is equally likely to be chosen.
- N, K, n and x are whole numbers with 0 ≤ K, n ≤ N.
Common mistakes
- Using the binomial formula for a large share of a small lot: the finite-population correction matters when n/N is above about 10 %.
- Sampling convenient items instead of choosing at random.
- Entering an x outside the possible range: the probability is then exactly zero.
Statistics and uncertainty
The inputs are parameters, usually fitted to data, and their estimation error carries into the result. The probability or density is a smooth function of the parameters, so the sweep chart shows how sensitive it is: where the curve is steep, a small error in a parameter makes a large difference. The formula treats the parameters as exact, so it gives no confidence interval on its own.
Where it is used
- Acceptance sampling and inspection of finite lots.
- Quality audits, card-style problems and capture–recapture estimates.
Maths you need
- Combinations: ways of choosing items, C(n, k)
- Sampling without replacement: draws that remove the item chosen