Binomial Distribution via Coin Flips
Contributed by: Adam J. Johnston and Rachael L. Baumann (May 2017)
Additional contributions by: John L. Falconer
(University of Colorado Boulder, Department of Chemical and Biological Engineering)
Open content licensed under CC BY-NC-SA
To generate the bar graph, first a list is made of 100 possible outcomes. A "1" in the list means heads and a "0" means tails. If the probability of flipping heads is 50%, then the list contains 50 ones and 50 zeros. If the probability of flipping heads is 70%, then the list contains 70 ones and 30 zeros. Numbers are then randomly selected from the list. If 5 is selected for "coin flips per trial," then a number is selected from the list five times, and these numbers are summed. For example, for five flips in a trial, if the random numbers selected from the list are 1, 0, 0, 1, 1, then the number of heads in that trial is three. This process is repeated for each trial.