Suppose a family has five children. What's the probability that at least two of those five are girls?
You could figure this out in a tree diagram, but that would be an unwieldy tree diagram. You can use a simulation to figure out complicated problems like this one. This is also called the Monte Carlo method, named after Monte Carlo Casino because it uses physical objects like dice.
Let's approximate the probability using a simulation. Get five dice out and let the boys and girls be equally likely. Let's have faces 1 through 3 represent girls, and 4 through 6 represent boys.
On the first roll, you get two girls (the 1 and the 2).
One the second roll, this situation has four girls in it--the 2, 3, 3, and 1. Redo this many times, and the relative frequency of getting two or more girls will approximate the probability.
Suppose you do this 20 times, then analyze the results in the chart below.
|Trial||Die 1||Die 2||Die 3||Die 4||Die 5||Girls|
As you can see in the chart, in the first trial, you got a 6, 4, 1, 2, and 6, which represented two girls. In one situation, you didn't get any girls in your group of five.
This is the histogram of the number of girls per family.
It is fairly unusual that you didn't get exactly one girl in any of the simulations. The most common was two girls; three and four were also very common. You got at least two girls in 19 of the 20 simulations. Your guess for the probability of having at least two girls in a family is 19 out of 20, or 95%. Your best guess is that you have a 95% probability of getting at least two girls in a family.
However, that is not the right answer. If you had done more simulations, you would have gotten a more correct answer because things would have started to even out. The graph below shows an approximation based on 10,000 simulations where 8,127 of the 10,000 had 2 or more girls.
The right answer is, in fact, 0.8125, about 81% of the time. If you simulated more than 20 times with the dice, you would have gotten a more accurate response. So our sample of 20 was not truly representative. Apparently, having four girls is fairly uncommon. Two and three are very common.
Source: Adapted from Sophia tutorial by Jonathan Osters.