20 Introduction to Simulations

The Monte Carlo method

What is a simulation?

Let’s roll a lot of dice. Every time we roll, that’s a simulation. This allows us to find experimental probabilities:

[latex]P(\textrm{rolling a }6) = \frac{ \textrm{Number of sixes}}{\textrm{Number of total rolls}}[/latex]

 

Law of Large Numbers (or law of averages)

As the total number of simulations gets larger, the experimental probability gets closer to the theoretical probability:

\[P(\textrm{rolling a 6})\rightarrow \frac{1}{6}\]

Can computers find random numbers?

Not exactly! But what they can do is generate large amounts of pseudorandom numbers. That is, a computer will use complex algorithms to find something that is close enough to random to satisfy most mathematicians.

EXCEL:

Our major tools will be the Excel functions: RAND() and RANDBETWEEN(a,b). To simulate a large lumber of dice rolls, we use the function RANDBETWEEN(1,6), which randomly chooses a number between 1 and 6.

R:

R is easier: we will use “r” commands (rnorm(), rpois(), rbinom(), ect) to generate strings of random numbers.

Examples of simulations in Business

Simulations can do more than let us roll pretend dice. They can be used to model various real-world situations such as:

  • Product demand
  • Lead time for orders to arrive
  • Time between customers, machine breakdowns, or any other event
  • Service Time
  • Tim to complete a project or activity
  • Number of employees absent on a certain day
  • Stock market performance1

Advantages to using simulation instead of other methods

  • Simulations rely less on theoretical knowledge (and fun Statistics theorems like the Central Limit theorem), making them easier to understand.
  • Can analyze complex real world problems like State economies and world food systems that can’t be solved using pure math.
  • We don’t have to actually try out potentially disruptive experiments to see what will happen. For example, we can simulate our production with a new machine before actually purchasing the machine.
  • We can look at the effects of different variables, all from the comfort of our desk chairs.
  • We can look at things over time without a time machine.

Disadvantages to Simulation

  • It can be very expensive and time consuming to produce
  • Our model rests on any underlying assumptions we have made. In the dice rolling experiment, we assumed that we were working with a fair six-sided die. What if we weren’t?

E

Example

MG hotdogs sells three types of hotdogs, at three different prices. They estimate that customers choose the different hotdogs at the following rates:

Type of Hotdog

Price

Probability

Kosher

$5.50

0.5

Ordinary

$4.25

0.4

Vegetarian

$4.75

0.1

They are providing hotdogs to a conference of 35 people. Model the average revenue by running 200 replications of a Monte Carlo Simulation.

 

Why not just use the Expected Value formula?

Good question! The mean, or expected value of this distribution is:

\[E(X)=\Sigma X P(X)=\$5.50 \times 0.5 +\$4.25\times 0.4+\$4.75\times 0.1=\$4.93\]

But this is the long range average. On any given conference, we won’t have exactly $4.93 per person (or $172.38 total revenue) When we are forecasting demand over a short time period, things can be much more volatile.

Exercise

MG hot dogs runs a concession stand at a local sports arena. Because of the way kitchen facilities work, they need to decide how many hotdogs to prepare for each football game ahead of time. From the stadium, they know that the number of spectators at a football game is normally distributed with a mean of 30,000 fans and a standard deviation of 7,000 fans. From past experience, they estimate that between 25% and 35% of spectators will buy a hotdog, following a continuous uniform distribution. Each hotdog costs $2.25 to prepare, and sells for $4.50. Any hotdog not sold at the end of the game will be thrown out.

a) Say S&C prepares 10,000 hotdogs. The Excel worksheet is MOSTLY set up to create a Monte Carlo Simulation with 500 replications to find the average profit. Your job is to complete the sheet by filling in the empty cells (Each empty cell that is coloured should be filled in). If you want to set up the sheet yourself from scratch differently, you may do so. Note that in this problem the Data Table is already set up, you just need to activate by pressing F9 or calculate now)

b)Using the result from (a), do you think that 10,000 hotdogs is a good number to order? Why?

c)Using either a two-variable data table OR the simulation manager (or a third EXPLAINED method), find the average profit when MG prepares 8,000; 9,000; 10,000; 11,000 and 12,000 hotdogs.

Number Prepared

Average Profit

8,000

9,000

10,000

11,000

12,000

d) Using the results from part c), how many hotdogs would you advise MG to prepare?

 

1 Don’t try this at home kids, unless you have money to burn! If there was a concrete way to beat the market, we wouldn’t see the crashes that happen. So proceed with caution.

License

Icon for the Creative Commons Attribution-NonCommercial 4.0 International License

Business Analytics Copyright © by Amy Goldlist is licensed under a Creative Commons Attribution-NonCommercial 4.0 International License, except where otherwise noted.

Share This Book