11520

# Binomial Distribution via Coin Flips

In this Demonstration, you can 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 normal distribution as the number of trials and the number of coin flips per trial increase. AS the sample size increases, the distribution more closely resembles a true binomial distribution. 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, the probability distribution (also known as the probability mass function), or the binomial distribution. The probability mass function is the number of flips in a trial that resulted in heads divided by the number of flips.

### DETAILS

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.

### PERMANENT CITATION

 Share: Embed Interactive Demonstration New! Just copy and paste this snippet of JavaScript code into your website or blog to put the live Demonstration on your site. More details » Download Demonstration as CDF » Download Author Code »(preview ») Files require Wolfram CDF Player or Mathematica.

#### Related Topics

 RELATED RESOURCES
 The #1 tool for creating Demonstrations and anything technical. Explore anything with the first computational knowledge engine. The web's most extensive mathematics resource. An app for every course—right in the palm of your hand. Read our views on math,science, and technology. The format that makes Demonstrations (and any information) easy to share and interact with. Programs & resources for educators, schools & students. Join the initiative for modernizing math education. Walk through homework problems one step at a time, with hints to help along the way. Unlimited random practice problems and answers with built-in step-by-step solutions. Practice online or make a printable study sheet. Knowledge-based programming for everyone.