# What is Monte Carlo Simulation? [Explained with Example]

Author: Daniel Croft

Daniel Croft is an experienced continuous improvement manager with a Lean Six Sigma Black Belt and a Bachelor's degree in Business Management. With more than ten years of experience applying his skills across various industries, Daniel specializes in optimizing processes and improving efficiency. His approach combines practical experience with a deep understanding of business fundamentals to drive meaningful change.

## What is Monte Carlo Simulation? [Explained with Example]

Monte Carlo Simulation (MCS) is a method that uses randomness and probability to predict outcomes. To help you understand this better, let’s break down the name and the concept:

## Why “Monte Carlo”?

Think of the city Monte Carlo in Monaco. It’s famous for its casinos, where games of chance like roulette, dice, and slot machines are played. These games rely on randomness and luck, just like the Monte Carlo Simulation relies on randomness to predict results.

## What is “Simulation”?

A simulation is like a virtual experiment. Instead of doing something in real life and seeing what happens, you create a computer model and “simulate” or mimic what might happen under different conditions.

## Bringing it Together:

So, when we say “Monte Carlo Simulation,” we’re talking about a computer-based method that uses randomness, just like casino games, to predict various outcomes.

Imagine you’re trying to guess the number of candies in a jar. You could make a single guess, say 150 candies. But what if you could make thousands of guesses, each time slightly adjusting your guess based on certain rules? After thousands of guesses, you’d have a list of possible answers. Some guesses might be close to each other, like 145, 147, 148, while others might be far off, like 50 or 300. This range of guesses gives you a better idea of the most likely number of candies in the jar.

Similarly, MCS doesn’t give you just one answer. It gives you a range of possible answers, making it easier to understand risks and uncertainties.

### Why Use MCS?

In real life, many things are uncertain. For instance, think of the weather. Even with advanced tools, meteorologists don’t give a single temperature for tomorrow. They might say, “There’s a 70% chance it will be between 20-25°C.” This range and probability are more useful than a single number, right?

In the same way, in areas like business, finance, and engineering, there are many uncertainties. Using MCS, we can predict a range of outcomes instead of just one, helping decision-makers be more prepared.

## Why Use Monte Carlo in Manufacturing?

Manufacturing is a complex process with many moving parts. Just like cooking a meal can be affected by the quality of ingredients, the efficiency of your stove, or even how focused you are, manufacturing has its own set of variables that can influence the outcome.

### Uncertainties in Manufacturing:

Raw Material Quality: Let’s say you’re manufacturing wooden furniture. The quality of wood you receive can vary. Sometimes it might be top-notch, while other times it might have imperfections. This variability can affect the final product’s quality and the number of products that pass quality control.

Machine Downtimes: Machines don’t always work perfectly. They can break down or need routine maintenance. Think of it like a car; sometimes it runs smoothly, but occasionally it might need a repair. Unexpected downtimes can reduce the production for the day.

Labor Efficiency: Not every worker will have the same efficiency every day. Factors like health, morale, training, and even simple human error can lead to variability in how much a worker produces in a day.

### Role of MCS in Addressing These Uncertainties:

Predicting the Impact of Risk: MCS can simulate thousands of scenarios considering the above uncertainties. For instance, it can predict what happens if 20% of the raw materials are of lower quality, machines break down 10% of the time, and worker efficiency varies. By understanding these risks, manufacturers can better prepare for adverse situations.

Making Informed Decisions: Let’s say you’re deciding how much inventory to keep. Too little, and you might not meet demand. Too much, and you’re tying up money in unsold goods. MCS can simulate various scenarios, like varying sales figures, to help decide the optimal inventory level. It’s like trying out different strategies in a game to see which one works best.

Evaluating Feasibility of Targets: Imagine setting a goal to produce 10,000 units this month. But is this goal realistic? MCS can simulate the month’s production considering all uncertainties. If in most simulations you achieve only 8,000 units, then the target might be too ambitious.

### Visualizing MCS in Manufacturing:

Imagine you’re throwing darts at a board. Each throw represents a day of production. The uncertainties (like raw material quality or machine downtimes) are like blindfolds or distractions. They make your throw (or daily production) unpredictable. After many throws (or simulated days), you’ll see a pattern of where most darts land. This pattern gives you a clearer idea of what to expect in real production.

## How Does Monte Carlo Simulation Work?

### Define a Model:

What it means:

Creating a model is like setting up the rules for a board game. Just as a game has certain steps, moves, and outcomes, a model outlines how different factors come together to produce a result.

In our context:

If you’re looking at a manufacturing unit, your model might be a simple equation that multiplies machine efficiency, worker productivity, and raw material availability to predict daily output.

Think of it like:

Cooking a recipe. The recipe (model) outlines how different ingredients (factors) come together in specific ways to produce a dish (outcome).

## Assign Distributions:

What it means:

In the real world, things don’t always happen the same way every time. Sometimes machines work at 90% efficiency, other times at 85%. This variability is described using probability distributions. A probability distribution is a mathematical function that describes the likelihood of different outcomes.

In our context:

If we know from past data that a machine works at an average of 90% efficiency with a variation of about 5%, we might use a “normal distribution” centered at 90% with a spread of 5%.

Think of it like:

Rolling a dice. The outcome isn’t fixed; you could get any number from 1 to 6. This randomness is described by a probability distribution.

### c. Perform Random Sampling:

What it means:

Once we have our distributions set up, we need to “sample” or pick values from them. This is done randomly, which mimics the real-world unpredictability.

In our context:

For each day of our simulation, we might pick a random efficiency value for our machine from the distribution we set in step b.

Think of it like:

Drawing cards from a shuffled deck. You don’t know which card you’ll get next; it’s random. Each draw is a sample.

### Compute the Model:

What it means:

Now that we’ve randomly picked values for our uncertain factors, we plug them into our model (like the recipe or board game rules) to see what outcome they produce.

In our context:

If on a simulated day, our machine works at 87% efficiency, our workers are 95% productive, and we have enough raw materials for 100 widgets, our model will give us the output for that day.

Think of it like:

Following a recipe with a specific amount of ingredients. If you change the amount slightly (like using a bit more salt), the taste (outcome) might be different.

### Repeat:

What it means:

One simulation doesn’t tell us much. It’s just one possibility out of many. To get a full picture, we need to repeat the simulation many times, each time with different randomly sampled values.

In our context:

We might simulate 1000 days of production to see the range of possible outputs over that period.

Think of it like:

Tossing a coin. One toss only gives heads or tails. But if you toss it 100 times, you’ll start to see a pattern, maybe 50 heads and 50 tails or something close.

## Example: Predicting Daily Output of a Manufacturing Unit

Let’s assume we want to predict the daily output of a manufacturing unit that produces widgets. The production is affected by:

Machine Efficiency: Normally distributed with mean = 90% and standard deviation = 5%.

Raw Material Availability: 80% of days, we have enough raw material for 100 widgets. 20% of days, we only have enough for 70 widgets.

Worker Productivity: Normally distributed with mean = 95 widgets/day and standard deviation = 10 widgets/day.

We want to simulate the daily output for 1000 days.

Steps:

For each day, randomly sample:

Machine efficiency from its normal distribution.

Raw material availability (either 100 or 70 widgets).

Worker productivity from its normal distribution.

Compute daily output as:

Output=Machine Efficiency×Raw Material Availability×Worker Productivity

Repeat the above for 1000 days to get a distribution of possible outputs.

The histogram above shows the distribution of daily outputs over 1000 simulated days. As you can see, the majority of the outputs lie in a particular range, but there are also days where the output is significantly lower or higher. This variation can be attributed to the uncertainties in machine efficiency, raw material availability, and worker productivity.

We can then expand on the example by diving deeper into each factor, providing a more comprehensive analysis and adding some visuals to understand the individual distributions. We’ll follow this plan:

Individual Distributions: Understand the distributions of machine efficiency, raw material availability, and worker productivity separately.

Combined Simulation: Analyze the combined effect on the daily output, as we’ve already seen.

Results Interpretation: Delve deeper into understanding the results and the implications for the manufacturing unit.

## Individual Distributions:

Machine Efficiency:

Machine efficiency is normally distributed with a mean of 90% and a standard deviation of 5%. This means that most of the time, machine efficiency will be around 90%, but there will be days when it’s as low as 85% or even 80%, and days when it’s as high as 95% or even 100%.

Raw Material Availability:

On 80% of days, there’s enough raw material for 100 widgets. On 20% of days, there’s only enough for 70 widgets. Think of this as having two boxes to draw from: one labeled “100 widgets” (80% full) and one labeled “70 widgets” (20% full). Each day, you randomly draw from one of these boxes.

Worker Productivity:

Worker productivity, like machine efficiency, is also normally distributed. With a mean of 95 widgets/day and a standard deviation of 10 widgets/day, most days workers will produce around 95 widgets. However, there can be days with exceptional productivity (over 105 widgets) and days with low productivity (less than 85 widgets).

Let’s visualize these individual distributions to get a clearer picture.

### Distribution of Machine Efficiencies:

The first histogram shows the distribution of machine efficiencies over 1000 simulated days. As expected, most days have efficiencies clustered around 90%. Still, there are days when efficiency drops below 85% or even climbs above 95%.

### Distribution of Raw Material Availability:

The second histogram shows that on the majority of days (around 800 out of 1000), we have enough raw material for 100 widgets. On the remaining days, the availability is limited to 70 widgets.

### Distribution of Worker Productivity:

The third histogram displays worker productivity. The bell-shaped curve indicates that productivity often hovers around the 95 widgets/day mark. But, there are days when it dips below 85 or rises above 105.

## Combined Simulation:

Now, using these factors, we want to compute the daily output. As mentioned:

Output = Machine Efficiency × Raw Material Availability × Worker Productivity

We’ve already simulated this earlier. Let’s analyze the results in more depth:

• Central Tendency: What is the most common output? This can be found using the median or mode.
• Spread: How much variation is there in the output? The standard deviation will provide insights into this.
• Tail Risks: What are the extreme (lowest and highest) outputs we observed?

Central Tendency:

• Mean (Average) Output: Approximately 8080.76 widgets/day
• Median (Middle Value) Output: Approximately 8270.34 widgets/day
• Mode (Most Common) Output: Approximately 4487.43 widgets/day

• Standard Deviation: Approximately 1439.72 widgets/day. This value indicates the average variation or spread of the outputs around the mean. A higher standard deviation means more variability.

Tail Risks:

• Minimum (Lowest) Output: 4487.43 widgets/day
• Maximum (Highest) Output: 12607.19 widgets/day

## Results Interpretation:

Given the above statistics, here’s what we can infer:

• Variability: There’s significant variability in production, as indicated by the substantial standard deviation. This variability can be attributed to the uncertainties we modeled: machine efficiency, raw material availability, and worker productivity.
• Typical Production: On an average day, the manufacturing unit produces around 8080 widgets. However, the mode suggests there were multiple days where the production was significantly lower at around 4487 widgets. This could indicate frequent occurrences of certain adverse conditions, like machine downtime or raw material shortages.
• Production Extremes: The production ranged from a low of 4487 widgets on some days to a high of 12607 widgets on particularly good days. This wide range indicates the importance of preparing for both best-case and worst-case scenarios.

In a real-world setting, understanding these patterns would be crucial for decision-makers. For instance, they might decide to invest in additional machinery or backup raw material suppliers to reduce the days when production is at the lower end. Similarly, they might explore training programs to enhance worker productivity on days when it lags.

Thanks for your feedback!

## Author

#### Daniel Croft

Daniel Croft is a seasoned continuous improvement manager with a Black Belt in Lean Six Sigma. With over 10 years of real-world application experience across diverse sectors, Daniel has a passion for optimizing processes and fostering a culture of efficiency. He's not just a practitioner but also an avid learner, constantly seeking to expand his knowledge. Outside of his professional life, Daniel has a keen Investing, statistics and knowledge-sharing, which led him to create the website www.learnleansigma.com, a platform dedicated to Lean Six Sigma and process improvement insights.

### Free Lean Six Sigma Templates

Improve your Lean Six Sigma projects with our free templates. They're designed to make implementation and management easier, helping you achieve better results.