Causality & Simulation Lecture Examples

Rolling Dice

Lets play 5 times

We can now simulate five bets on the dice and collect the results in an array that we will call the collection array.

Let us rewrite the cell with the for statement unrolled:

We can see the variation in the results of 300 bets by running exactly the same code for 300 bets instead of five.

Monty Hall Simulation