Your Equation

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

Solve for
20200
020
120
010
  • 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.

Probability of exactly x () current value 0.4226
KItems of the type in the lot KKey driver
00.431
xCount x of the type in the sample
0
nSample size n
0.07580.429
NLot size N
0.1730.437
  • 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

VariableTypical rangeLowest resultHighest resultSwing ()Local stepChange in result
K Items of the type in the lot K0 to 20 00.43130.4313+1 +1.79 %
x Count x of the type in the sample0 to 10 00.42260.4226+1 −64.1 %
n Sample size n1 to 20 0.075840.42860.3528+1 +1.33 %
N Lot size N20 to 200 0.17310.43680.2637+1 −0.553 %

Sweep of Sample size n

Sample size nProbability of exactly x
10.16
3.3750.3532
5.750.4243
8.1250.4016
10.50.3442
12.880.275
15.250.1857
17.630.13
200.07584

Sweep one variable

Probability of exactly x ()Hover, touch, or use the arrow keys on the chart
0.10.20.30.4 5101520 Sample size n now 0.4226

Variables and how each one contributes

P

Probability of exactly x

Result ·

What the equation gives you. Everything else feeds it.

N

Lot size N

· typical 20 to 200

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.

K

Items of the type in the lot K

· typical 0 to 20

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.

n

Sample size n

· typical 1 to 20

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.

x

Count x of the type in the sample

· typical 0 to 10

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

  1. Ways to choose x of the K: C(8, 1) = 8; ways to choose the rest: C(42, 4) = 111,930.
  2. Ways to choose any sample: C(50, 5) = 2,118,760.
  3. 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

Related formulas

Practise this formula