Session Ready
Exercise

Should we buy?

In the last exercise, we simulated the random drawing of the lottery ticket once. In this exercise, we complete the simulation process by repeating the process multiple times.

Repeating the process gives us multiple outcomes. We can think of this as multiple universes where the same lottery drawing occurred. We can then determine the average winnings across all these universes. If the average winnings are greater than what we pay for the ticket then it makes sense to buy it, otherwise, we might not want to buy the ticket.

This is typically how simulations are used for evaluating business investments. After completing this exercise, you will have the basic tools required to use simulations for decision-making.

Instructions
100 XP
  • Set the size parameter, which controls the number of simulations, to 2000.
  • Set payoffs equal to a list containing how much you could lose and how much you could win.
  • Set probs equal to a list of probabilities of losing and winning.
  • Calculate the mean of outcomes and assign it to answer.