How to Use Monte Carlo Simulation to Help Decision Making
By: François St-Amant
Tags: Decision Making, Editors Pick, Simulation, Python, Monte Carlo

How to Use Monte Carlo Simulation to Help Decision Making

Recently, I was faced with a very difficult decision to make. I had to choose between various job offers that were all interesting, for different reasons. After a couple of sleepless nights, I realized one thing: why not use the tools at my disposal to help me make the decision?

This article will show you how you can build a Monte Carlo simulation to help you make any type of decision in life. I will be comparing three different job offers, similar to the problem I was facing. Obviously, all the information presented is 100% fictional and does not represent the reality I faced. In other words, it is just an example!

Let’s begin!

What is a Monte Carlo Simulation?

Monte Carlo Simulation is a mathematical technique used to estimate all possible outcomes when you are dealing with uncertainty in said outcomes. The idea is simple.

Let’s say you need to decide between two roads to get back home. The first one takes on average 20 minutes. It has very few lights and very little traffic. Chances are very good you will always arrive exactly when you expect it. The second one takes on average 15 minutes. However, there often is much more traffic, lights, etc. There is a lot of uncertainty and it could take you anywhere between 10 and 45 minutes.

Monte Carlo Simulation builds a model of possible results by leveraging a probability distribution. By simulating the experiment say 10,000 times, you get a good idea of how risky the various options are. You can then decide which road works better for you.

Setting Up the Simulation

Let’s say you are dealing with various job offers. The challenge in making a decision is that there always is some uncertainty. For instance, you do not always know exactly what you will be doing, who will be your colleagues, how this job will help in your career advancement, etc.

That’s where Monte Carlo comes in. Here are the three steps to follow to set up the experiment.

Define all the variables that go into making a decision (salary, conditions, location, work-life balance, etc.) Define the importance (weight) of each variable. In other words, what is most important to you? For each option, define, for every variable, a range of possibility on whatever scale you feel is appropriate (out of 10 in this example). Of course, the wider the range, the more uncertain it means you are with the grade you have given to this variable! The range represents the probability distribution of the variable.

Of course, part 2 and 3 require a more qualitative approach. Grades are given based on your perception of things, your opinion. What someone defines as a 10/10 working environment is different for everybody and there is no easy universal way to quantify this.

However, what is interesting with this approach is that it can help you figure out some bias you might subconsciously have about the various options. Indeed, by grading all the variables on their own, you might realize that an option comes out on top in most aspects.

The code

Here is the Python code I used to create the Monte Carlo simulation.

On line 6 is where I define all the variables that are taken into account.

On line 10 is where all the weights are assigned to the different variables.

Line 14 is very important. It is where a random value is generated based on the range you have provided for this variable.

Lines 20–22 contain the lists of lists, with the grade range for every variable. For instance, for A, the first list [4,9] means that the work variable can find itself anywhere between a grade of 4 and 9 in the simulation.

Results

Here are the resulting distributions after 10,000 iterations.

We see that there seems to be two favorites, jobs A and C. What is interesting here is that job A has a much larger distribution, while job C seems to be more secure, likely because there is less uncertainty.

The simulation has allowed us to compare the various options over multiple iterations to determine how risky those options really are. It is then the task of the user to decide if the extra risk associated with an option is worth the reward.

Conclusion

Monte Carlo simulation can assist in making decisions when there is uncertainty because we do not know the exact outcome of a variable in advance. It is a very simple and powerful technique. Feel free to re-use and adapt the code for any given real life problem.

Thanks a lot for reading!