Simulation
Coin Flip Simulation
Goes with Section 5.1 Basic Probability
Flip a fair coin as many times as you like. After every flip, the empirical probability of heads is the number of heads divided by the number of flips. Watch what happens to it as the number of flips grows larger and larger.
| Number of coin flips | Number of Heads | Empirical Probability of getting Heads |
|---|
Empirical probability of headsTheoretical probability, 0.5
Sends your first 2,500 flips to STATBELT Utility: flip number, result, number of heads so far and the empirical probability. Make a scatterplot of Empirical Probability against Flip to draw a graph like Figure 5.8.