Mathwords logoMathwords

Urn Problem — Definition, Formula & Example

An urn problem is a probability question about drawing colored balls at random from a container, called an urn. You use it to model any situation where you pick items from a fixed collection and care about what types you get.

An urn model is a probability experiment in which an urn holds a finite number of balls of known types and balls are drawn at random under a stated rule: with replacement, without replacement, or with a rule that adds or removes balls after each draw. The draw rule fixes the sample space and the probability distribution. Drawing with replacement gives independent trials and a binomial distribution. Drawing without replacement gives dependent trials and a hypergeometric distribution.

Key Formula

P(X=k)=(Kk)(N−Kn−k)(Nn)P(X = k) = \frac{\binom{K}{k}\binom{N-K}{n-k}}{\binom{N}{n}}
Where:
  • NN = total number of balls in the urn
  • KK = number of balls of the color you are counting
  • nn = number of balls drawn without replacement
  • kk = number of drawn balls of that color
  • XX = random variable counting balls of that color in the draw

Worked Example

Problem: An urn holds 6 red balls and 4 blue balls. You draw 3 balls without replacement. What is the probability that exactly 2 are red? How does the answer change if you replace each ball before the next draw?
Step 1: Count every equally likely set of 3 balls you could draw from the 10 balls.
(103)=10×9×83×2×1=120\binom{10}{3} = \frac{10 \times 9 \times 8}{3 \times 2 \times 1} = 120
Step 2: Count the favorable sets. Choose 2 of the 6 red balls and 1 of the 4 blue balls. Then divide by the total.
(62)(41)=15×4=60,P=60120=12\binom{6}{2}\binom{4}{1} = 15 \times 4 = 60, \qquad P = \frac{60}{120} = \frac{1}{2}
Step 3: With replacement, every draw has the same chance of red, 6 out of 10. The draws are independent, so the binomial formula applies.
(32)(0.6)2(0.4)=3×0.36×0.4=0.432\binom{3}{2}(0.6)^2(0.4) = 3 \times 0.36 \times 0.4 = 0.432
Answer: Without replacement, the probability of exactly 2 red balls is 1/2 (50%). With replacement, it is 0.432 (43.2%). The draw rule changes the answer.

Why It Matters

Urn models are the standard setup for sampling without replacement. Quality inspectors use them when they test a few parts from a shipment. Statisticians use them in Fisher's exact test, and lottery odds come from the same calculation. In a college probability course, urn problems are also the usual first examples for Bayes' theorem, where you work out which urn a ball probably came from.

Common Mistakes

Mistake: Using the binomial formula when balls are drawn without replacement.
Correction: Removing a ball changes the makeup of the urn, so the draws are not independent. Use the hypergeometric count shown above instead. The binomial formula is a good approximation only when the urn is very large compared with the number of draws.

Related Terms