The production of a computer model of something, especially for the purpose of study.
Simulations are used to estimate probabilities.
To perform a random experiment on the computer, we use np.random.choice(options).
The input, options, is a list or array to choose from.
The output is a random element in options. By default, all elements are equally likely to be chosen.
By default, np.random.choice selects with replacement.
What is the probability of getting 60 or more heads if we flip 100 coins?
Plan:
Figure out how to run the experiment (flipping 100 coins) once.
Repeat the experiment many times.
Find the proportion of experiments in which the number of heads was 60 or more.