Drawing marbles from a vase
A vase with coloured marbles is the classic model for chance in school mathematics. It turns every question about drawing, choosing or sampling into a picture you can count.
The urn model
In probability a vase, or urn, holds a known number of marbles of different colours. You draw one or more without looking, so every marble still in the vase has the same chance of being drawn. Jacob Bernoulli used the model around 1700, and it has been the standard example ever since: drawing lottery balls, dealing cards, choosing people for a survey and checking a batch of products for faults all work like drawing marbles from a vase.
Without replacement, step by step
Take a vase with 5 red and 4 blue marbles, 9 in total, and draw two without putting them back. The first marble is red with chance 5/9. If it was red, 8 marbles remain, 4 of them red, so the second is red with chance 4/8 = 1/2. The chance that both are red is 5/9 × 4/8 = 20/72 = 5/18 ≈ 27.8%.
The tree diagram
A tree diagram draws every way the draws can go. From the start, one branch leads to red and one to blue, each labelled with its chance: 5/9 and 4/9. From each of those, two new branches lead to the second marble, with the chances that apply after the first: 4/8 and 4/8 after red, 5/8 and 3/8 after blue. Each path ends in a leaf. Multiply the chances along a path to get its chance: 20/72, 20/72, 20/72 and 12/72. Together the leaves make 72/72 = 1.
Adding paths and the complement
When a question is answered by several leaves, add their chances. Exactly one red: red-blue or blue-red, 20/72 + 20/72 = 40/72 = 5/9. Both the same colour: 20/72 + 12/72 = 32/72 = 4/9. At least one red is everything except blue-blue: 1 − 12/72 = 60/72 = 5/6. Subtracting the opposite, the complement rule, is often the quickest way.
With replacement
If you put each marble back before the next draw, the vase is the same every time and the draws are independent. Both red then has chance 5/9 × 5/9 = 25/81 ≈ 30.9%. Without replacement the chance is smaller, because taking out a red marble leaves fewer red ones. In a large vase the difference almost disappears, which is why a survey of 1,000 people from a country of millions can treat every answer as independent.
Counting with combinations
You can also count instead of drawing a tree. There are C(9, 2) = 36 equally likely pairs of marbles, and C(5, 2) = 10 of them are two red ones: 10/36 = 5/18, the same answer. With more draws, counting is quicker than a tree: the chance of exactly k red marbles in n draws without replacement is C(red, k) × C(blue, n − k) / C(total, n), the hypergeometric distribution.
Explore it in PictorX
Open Marbles from a vase and a vase with 5 red and 4 blue marbles is waiting. Click it to draw a marble: it lifts out of the vase into a dish, the marbles left settle, and the message tells you what remains and what the chance of red is now. The tree diagram lights up the branch you took and shows the product at every leaf; the leaves that answer the question are shaded, and their calculation stands below the tree. Choose 1 to 10 marbles of each colour, two or three draws, with or without replacement, and one of five questions. Draw automatically runs up to 100,000 rounds at up to 10,000 a second, and the chart shows the share of yes settling at the chance from the tree.
Frequently asked questions
What does without replacement mean?
That a marble you have drawn is not put back before the next draw. The vase gets one marble smaller with every draw, and the chances change.
What is the chance of two red marbles from 5 red and 4 blue?
5/9 × 4/8 = 20/72 = 5/18, about 27.8%, without replacement. With replacement it is 5/9 × 5/9 = 25/81, about 30.9%.
Why do the leaves of a tree diagram add up to 1?
Because every round ends in exactly one leaf. The branches leaving each node add up to 1, for example 4/8 + 4/8, so multiplying along the paths shares the whole chance of 1 out over the leaves.
Is drawing two marbles at once the same as one after the other?
Yes. Grabbing two marbles at once gives the same chances as drawing them one after the other without replacement; you just do not know which one came first.
What is the urn model used for?
For any situation where items are picked at random from a fixed group: lotteries, card games, quality control, surveys and genetics. The hypergeometric distribution that follows from it is also the basis of Fisher's exact test in statistics.
Ready to try it?
Open PictorX in your browser — no install, no credit card required to start.
Draw marbles from a vase