Binomial Distribution via Coin Flips

Requires a Wolfram Notebook System

Interact on desktop, mobile and cloud with the free Wolfram CDF Player or other Wolfram Language products.

Requires a Wolfram Notebook System

Edit on desktop, mobile and cloud with any Wolfram Language product.

[more]

descriptionSectionParagraph

[less]

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


Snapshots


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.



Feedback (field required)
Email (field required) Name
Occupation Organization
Note: Your message & contact information may be shared with the author of any specific Demonstration for which you give feedback.
Send