Operations Management and Strategic Management · Simulation and Line Balancing
Monte Carlo Simulation Technique: Steps and Solved Problems
Updated 10 October 2026 · Fact-checked
Monte Carlo simulation imitates a random process by using random numbers. You list the outcomes with their probabilities, build cumulative probabilities, assign random number ranges to each outcome, draw random numbers, read off the outcome for each trial, and then average the results over all trials.
Understand Monte Carlo Simulation Technique
Some business problems have uncertain inputs, such as daily demand, lead time or customer arrivals. Solving them with a formula can be hard. Monte Carlo simulation solves them by running an artificial experiment many times on paper.
The idea is simple. If demand is 10 units on 20% of days, then 20% of your random numbers should map to 10 units. You build that link with a table. Then each random number you draw gives you one demand value, just like one real day.
The link is built in three columns: probability, cumulative probability and random number range. The cumulative probability is the running total of the probabilities. It ends at 1.00. The random number range is the set of numbers that stand for that outcome. If you use two-digit random numbers (00 to 99), there are 100 numbers in all, and each 1% of probability gets one number.
Once the table is ready, you take the random numbers given in the question, in the given order. For each one you find the range it falls in and note the outcome. Repeat for every trial, then compute what the question asks, for example total demand, average demand, stock-outs or total cost.
Simulation gives an estimate, not an exact answer. More trials give a more reliable estimate. In the exam you usually run only 5 to 15 trials, so you are tested on the method and not on accuracy of the estimate.
Key rules to remember
- Probability from frequency
- Probability = Frequency of outcome ÷ Total frequency
- Use when the question gives counts or days instead of probabilities. Probabilities must add up to 1.
- Cumulative probability
- Cumulative probability of an outcome = Sum of probabilities up to and including that outcome
- The last value must equal 1.00. Check this before moving on.
- Random number range (two-digit)
- Lower limit = previous cumulative probability × 100; Upper limit = (cumulative probability × 100) − 1
- The first range starts at 00. Example: cumulative 0.20 gives 00-19; next cumulative 0.50 gives 20-49.
- Expected value (for comparison)
- Expected value = Σ (outcome × probability)
- Use it to check that the simulated average is close to the theoretical average.
- Simulated average
- Average = Total of simulated values ÷ Number of trials
- Divide by the number of trials you actually ran.
How to solve Monte Carlo Simulation Technique questions
Use this sequence for any Monte Carlo question. Write each step as a table so the examiner can award step marks.
- 1Read the question and identify each uncertain variable, such as demand or lead time. Each variable needs its own table.
- 2Convert frequencies to probabilities if needed. Check that the total is 1.
- 3Compute the cumulative probability column. Check that it ends at 1.00.
- 4Assign random number ranges from the cumulative column. Use two digits for probabilities in whole percents and three digits if the probabilities have three decimals. Start at 00 (or 000).
- 5Draw the random numbers in the exact order given. For each trial, find the range it falls in and write the outcome.
- 6Carry out the calculation the question needs for each trial, such as opening stock, demand, closing stock, shortage or cost.
- 7Total the columns and compute the average or total cost asked for.
- 8State the result in a line and add a short remark that it is an estimate from a small number of trials.
Quickest way: Table-first shortcut
When to use it: Use this when time is short and the question has one uncertain variable with a clean probability table.
- Write the outcomes and cumulative probabilities in one small table.
- Convert cumulative values to the upper limit of each range by multiplying by 100 and subtracting 1.
- Write the ranges next to the outcomes, such as 00-19, 20-49.
- Run down the random numbers and write the outcome beside each, without rewriting the table.
- Total and average at the end, then check that the average is near the expected value.
Common mistakes in Monte Carlo Simulation Technique
Starting the first random number range at 01 instead of 00
Students are used to counting from 1.
Fix: With two-digit numbers, 00 to 99 gives 100 numbers. Start at 00 and end at 99.
Using probability instead of cumulative probability to set the ranges
The ranges look like they should match each probability only.
Fix: Always build the cumulative column first. The range of each outcome ends one below its cumulative value times 100.
Overlapping or gapped ranges, such as 20-40 followed by 42-60
Careless arithmetic when subtracting 1 from the upper limit.
Fix: Each lower limit is the previous upper limit plus 1. The last range must end at 99.
Using random numbers out of order or reusing them
Students pick numbers that look convenient.
Fix: Use the numbers exactly in the order given, one per trial. If a trial needs two variables and two numbers are given, use the sequence stated in the question.
Dividing the total by the wrong count when finding the average
Students divide by the number of outcomes in the table rather than the number of trials.
Fix: Divide by the number of trials run, such as 10 days.
Not carrying closing stock forward in inventory simulations
Each trial is treated as independent.
Fix: Opening stock of one day is closing stock of the previous day. Add receipts and subtract demand in a clear column layout.
Worked examples
Example 1
Daily demand for a product at a Pune stockist follows this pattern: 10 units on 20% of days, 20 units on 30% of days, 30 units on 40% of days and 40 units on 10% of days. Using the random numbers 12, 85, 47, 63, 04, simulate demand for five days and find the average daily demand.
Show the solution
- Probabilities are 0.20, 0.30, 0.40 and 0.10. They total 1.00.
- Cumulative probabilities: 0.20, 0.50, 0.90, 1.00.
- Random number ranges: 10 units = 00-19; 20 units = 20-49; 30 units = 50-89; 40 units = 90-99.
- Day 1: 12 falls in 00-19, so demand is 10.
- Day 2: 85 falls in 50-89, so demand is 30.
- Day 3: 47 falls in 20-49, so demand is 20.
- Day 4: 63 falls in 50-89, so demand is 30.
- Day 5: 04 falls in 00-19, so demand is 10.
- Total demand = 10 + 30 + 20 + 30 + 10 = 100 units.
- Average = 100 ÷ 5 = 20 units per day.
- Check: expected demand = 10×0.20 + 20×0.30 + 30×0.40 + 40×0.10 = 2 + 6 + 12 + 4 = 24 units. The simulated value differs because only five trials were run.
Answer: Simulated demand for the five days is 10, 30, 20, 30 and 10 units. Average simulated daily demand is 20 units, against an expected 24 units.
Example 2
A shop sells a product whose daily demand is 2 units (probability 0.3), 3 units (0.5) or 4 units (0.2). The shop has 10 units at the start of day 1 and does not reorder during the five days. Using random numbers 41, 08, 77, 95, 60, simulate the five days and find the closing stock after day 5 and any shortage.
Show the solution
- Cumulative probabilities: 0.3, 0.8, 1.0.
- Ranges: 2 units = 00-29; 3 units = 30-79; 4 units = 80-99.
- Day 1: 41 gives demand 3. Opening 10, closing 10 − 3 = 7.
- Day 2: 08 gives demand 2. Opening 7, closing 7 − 2 = 5.
- Day 3: 77 gives demand 3. Opening 5, closing 5 − 3 = 2.
- Day 4: 95 gives demand 4. Opening 2, demand 4, so 2 units are sold and shortage is 2. Closing stock is 0.
- Day 5: 60 gives demand 3. Opening 0, so shortage is 3. Closing stock is 0.
- Total demand = 3 + 2 + 3 + 4 + 3 = 15 units. Stock available was 10, so total shortage = 15 − 10 = 5 units (2 on day 4 and 3 on day 5).
Answer: Closing stock after day 5 is 0. Total unmet demand over the five days is 5 units, 2 on day 4 and 3 on day 5.
Exam tips
- Always show the three-column table of probability, cumulative probability and random number range. It carries step marks even if later arithmetic goes wrong.
- Read how many digits the random numbers have. Two-digit numbers need ranges of 00-99. Three-digit numbers need 000-999.
- Use the random numbers strictly in the given order, and say so in one line.
- For an MCQ, find the range first and then locate the number. Do not simulate all trials if only one is asked.
- Add one line that simulation gives an estimate. Compare it with the expected value where the data allows.
Practice questions from Simulation and Line Balancing
- A hospital in Pune builds a computer model of its outpatient clinic and runs it repeatedly with randomly generated patient arrival times to …
- A tea stall's daily demand has this distribution: 20 cups (probability 0.30), 30 cups (0.50), 40 cups (0.20). Random numbers 00-99 are assig…
- Which statement about using simulation for inventory and queuing problems is correct?
- A line has a cycle time of 5 minutes and total task time of 18 minutes per unit. Using the minimum whole number of workstations, what is the…
- A line is balanced with 5 workstations and a cycle time of 6 minutes. The task times total 24 minutes. What are the balance delay (idle time…
Monte Carlo Simulation Technique in other exams
The same ground in other exams, if you are preparing for more than one or want another angle on it.
Monte Carlo Simulation Technique: frequently asked questions
How do I assign random number ranges in Monte Carlo simulation?
Compute the cumulative probability for each outcome. Multiply by 100 for two-digit random numbers. The first range starts at 00 and each range ends one below its cumulative value times 100. The next range starts one above the previous end.
Why do we use cumulative probability in simulation?
Cumulative probability stops ranges from overlapping. Each outcome gets a block of random numbers equal in size to its probability, so a random number always falls in exactly one block.
Will my simulated average match the expected value?
Usually not exactly. A small number of trials gives a rough estimate. The more trials you run, the closer the simulated average gets to the expected value.
What if the random number list is longer than the trials needed?
Use only as many as the number of trials, starting from the first one given. If the question says to start from a particular position, follow that instruction.