Binomial Distribution Via Coin Flips

In this simulation, set the number of coin flips per trial to 5, 10, or 20, and the number of heads is recorded. Set the total number of trials (from 1 to 10,000) with a button. When the probability of heads is 50%, the distribution closely resembles a binomial distribution as the number of trials and the number of coin flips per trial increase. Make a weighted coin by changing the probability of landing on heads using the slider; 0% means the coin always lands on tails and 100% means the coin always lands on heads. Click “flip coins” to generate a new set of coin flips. Use buttons to view a bar chart of the coin flips or the probability distribution (also known as the probability mass function). The probability mass function is the number of flips in a trial that resulted in x heads divided by the number of flips.

This simulation runs on desktop using the free Wolfram Player. Download the Wolfram Player here.

This simulation was made at the University of Colorado Boulder, Department of Chemical and Biological Engineering.  Authors: Adam J. Johnston and Rachael L. Baumann

View the source code for this simulation