Monte Carlo Simulation

A business forecast often depends on quantities you do not know in advance, such as demand, delivery time, or material cost. Replacing each quantity with one forecast produces one outcome, but hides the range of possibilities. Monte Carlo simulation lets you describe uncertain inputs, generate many possible scenarios, and examine the resulting distribution of business outcomes.

Build a model of uncertainty

Monte Carlo simulation estimates outcomes by repeatedly sampling uncertain inputs from specified probability distributions and calculating the result for each sampled scenario. You first need a model connecting inputs to the outcome you care about. For example, a weekly profit model might be:


Π=pmin⁡(D,Q)−cQ−F\Pi=p\min(D,Q)-cQ-F


Here, Π\Pi is weekly profit, pp is selling price per unit, DD is weekly demand, QQ is the quantity purchased, cc is purchase cost per unit, and FF is weekly fixed cost. This model assumes unsold units have no recovery value and unmet demand produces no sales. Its purpose is to make the business assumptions explicit before you introduce randomness.


Choose input distributions using relevant records, contractual information, or clearly identified judgments. A discrete distribution can represent several possible demand levels. A continuous distribution can represent quantities that vary over a range. A convenient distribution is useful only if its possible values and probabilities reasonably describe the situation.


Relationships between inputs also matter. If demand and freight rates rise together during busy periods, sampling them independently discards that relationship. You can preserve dependence by resampling appropriate historical pairs or using a justified joint model. Historical patterns still need to be relevant to the period you are forecasting.

Generate repeated scenarios

A simulation trial is one complete set of sampled inputs and its calculated outcome. Within each trial, you sample the uncertain inputs while respecting their relationships, then apply the same business model. Across trials, you use new draws to represent alternative possible scenarios.


Four connected boxes show the stages of a Monte Carlo simulation.


Software typically uses pseudorandom numbers. Setting a seed makes a sequence reproducible, which helps you check calculations. It does not make the model more realistic or remove uncertainty from the business itself.



After NN trials, you have NN outcomes. Summarize them according to the question you need to answer.


Summary

What it describes

What it does not establish

Mean profit

Estimated average profit under the model

Profit guaranteed in a particular week

Fraction of loss trials

Estimated probability of negative profit

A certainty that future losses follow that exact fraction

Fifth percentile of profit

A lower-tail cutoff marking the bottom 5% of the profit distribution

The worst possible profit


For simulated outcomes, one common percentile convention selects the smallest profit value at which the cumulative fraction reaches at least 5%. For a continuous distribution, approximately 5% of outcomes lie below its fifth percentile. With discrete outcomes or ties, the fraction at or below the cutoff can be substantially larger. For example, if 15% of outcomes share the minimum profit, that minimum is also the fifth percentile under this convention.


For a loss defined as negative profit, the simulation estimate is:


P^(Π<0)=number of trials with Π<0N\widehat{P}(\Pi<0)=\frac{\text{number of trials with }\Pi<0}{N}


This frequency estimates a probability under your specified model. It is not automatically the true business probability.

Separate precision from credibility

Different random draws produce slightly different estimates. Increasing the trial count generally reduces this Monte Carlo sampling variability. For independent trials, the standard error of an estimated mean typically decreases in proportion to 1/N1/\sqrt{N}, provided the outcome has finite variance. Rare-event estimates may require many trials because few simulated outcomes enter the relevant tail.


More trials do not correct an unrealistic demand distribution, an omitted cost, or an uncertain parameter treated as known. Compare results across independent runs to assess simulation stability. Separately, check model calculations, input evidence, and performance against relevant observations. Vary uncertain assumptions to see whether your conclusions depend heavily on them.



What to remember

  • Define the outcome, input distributions, and input relationships before simulating.
  • Each trial represents one possible scenario under the model.
  • Read the distribution, including relevant downside outcomes, rather than relying only on its mean.
  • More trials reduce simulation noise; credible assumptions require separate evidence.

Example: Simulating a market stall's daily profit

A market stall buys 100 lunch boxes before opening. It sells each box for $15. Unsold boxes have no recovery value, and customers who arrive after the boxes sell out make no purchase. Other daily costs total $200.


For this illustrative model, daily demand and purchase cost per box are independent and have the following distributions:


Input

Possible value

Probability

Daily demand

80 boxes

0.60

Daily demand

120 boxes

0.40

Purchase cost

$7 per box

0.75

Purchase cost

$9 per box

0.25


Each trial uses two independent random draws uniformly distributed from 0 inclusive to 1 exclusive. The first draw selects demand; the second selects purchase cost. The following draws are supplied for five illustrative trials.


Trial

Demand draw

Cost draw

1

0.10

0.20

2

0.80

0.90

3

0.45

0.85

4

0.95

0.30

5

0.60

0.50


A flow diagram shows independent random draws feeding the daily profit model, followed by repetition and summarizing outcomes.


All monetary amounts are in dollars. Keep calculations exact and report mean profit to the nearest dollar and the estimated probability to the nearest whole percent.


a) Define the random-number intervals and write the daily profit model.


Assign intervals with lengths equal to the specified probabilities. Use half-open intervals so a boundary value belongs to exactly one outcome.

  • Demand draw UDU_D: if 0≤UD<0.600\leq U_D<0.60, assign demand of 80 boxes. This interval has length 0.60.
  • Demand draw UDU_D: if 0.60≤UD<10.60\leq U_D<1, assign demand of 120 boxes. This interval has length 0.40.
  • Cost draw UcU_c: if 0≤Uc<0.750\leq U_c<0.75, assign purchase cost of $7 per box. This interval has length 0.75.
  • Cost draw UcU_c: if 0.75≤Uc<10.75\leq U_c<1, assign purchase cost of $9 per box. This interval has length 0.25.

The stall sells the smaller of demand and its 100-box inventory. It pays for all 100 boxes, including any left unsold. Let DD be demand in boxes and cc be purchase cost per box. Therefore:


Π=($15/box)min⁡(D,100 boxes)−c(100 boxes)−$200.\Pi=\left(\$15/\text{box}\right)\min(D,100\ \text{boxes})-c(100\ \text{boxes})-\$200.


Multiplying a price or cost per box by a number of boxes gives dollars, so every term has the units of daily profit.


b) Calculate profit in each trial.


Map each supplied draw to its interval, determine boxes sold, and subtract both purchase cost and other daily costs. In particular, the demand draw of 0.60 belongs to the 120-box interval because its lower endpoint is included. In the calculations below, demand and sales are measured in boxes, unit prices are dollars per box, and profit is in dollars.


Trial 1: The demand draw 0.10 selects ________ boxes, and the cost draw 0.20 selects $________ per box. Sales are min⁡(80,100)=80\min(80,100)=80 boxes.


Π1=15(80)−7(100)−200=1200−700−200=300.\Pi_1=15(80)-7(100)-200=1200-700-200=300.


Daily profit is $300.


Trial 2: The demand draw 0.80 selects ________ boxes, and the cost draw 0.90 selects $________ per box. Sales are min⁡(120,100)=100\min(120,100)=100 boxes.


Π2=15(100)−9(100)−200=1500−900−200=400.\Pi_2=15(100)-9(100)-200=1500-900-200=400.


Daily profit is $400.


Trial 3: The demand draw 0.45 selects 80 boxes, and the cost draw 0.85 selects $9 per box. Sales are min⁡(80,100)=80\min(80,100)=80 boxes.


Π3=15(80)−9(100)−200=1200−900−200=100.\Pi_3=15(80)-9(100)-200=1200-900-200=100.


Daily profit is $100.


Trial 4: The demand draw 0.95 selects 120 boxes, and the cost draw 0.30 selects $7 per box. Sales are min⁡(120,100)=100\min(120,100)=100 boxes.


Π4=15(100)−7(100)−200=1500−700−200=600.\Pi_4=15(100)-7(100)-200=1500-700-200=600.


Daily profit is $600.


Trial 5: The demand draw 0.60 selects 120 boxes, and the cost draw 0.50 selects $7 per box. Sales are min⁡(120,100)=100\min(120,100)=100 boxes.


Π5=15(100)−7(100)−200=1500−700−200=600.\Pi_5=15(100)-7(100)-200=1500-700-200=600.


Daily profit is $600. Demand above 100 boxes does not generate additional revenue because the stall has no extra inventory. Purchase cost always applies to all 100 boxes.


c) Estimate mean daily profit and the probability that daily profit is strictly below $200. Explain what these five trials establish.


Add the five daily profit outcomes and divide by the number of trials:


Π‾=$300+$400+$100+$600+$6005=$20005=$400.\overline{\Pi}=\frac{\$300+\$400+\$100+\$600+\$600}{5}=\frac{\$2000}{5}=\$400.


Only trial 3 has profit strictly below $200. The estimated probability is therefore:


P^(Π<$200)=15=0.20=20%.\widehat{P}(\Pi<\$200)=\frac{1}{5}=0.20=20\%.


This illustrative run gives mean daily profit of $400 and an estimated 20% probability of profit below $200. Five trials demonstrate the procedure but provide little evidence of simulation stability. Additional independent trials would improve computational precision, while checking the demand probabilities, costs, and independence assumption would address the model's credibility. Neither estimate is a guaranteed future outcome.

A catering company has probability distributions for event attendance and ingredient prices. It wants to estimate the distribution of profit for an upcoming event. Which procedure is a Monte Carlo simulation?

Choose an answer

Create a free account to get started

Unlock full course notes by signing up

  • Video lessons taught by top educators
  • Practice questions with guided solutions
  • Written review notes for reference
  • Expert answers anytime from course tutors

An analyst checks reproducibility: whether repeating a computation reproduces its results. A Monte Carlo model uses a pseudorandom number generator. The analyst keeps the software version, generator algorithm, model, input distributions, trial count and order of random draws unchanged.


To reproduce the original sequence of draws, the analyst must also reuse the same random .

Create a free account to get started

Unlock full course notes by signing up

  • Video lessons taught by top educators
  • Practice questions with guided solutions
  • Written review notes for reference
  • Expert answers anytime from course tutors

An online retailer is simulating monthly profit. Relevant historical records show that high order volumes tend to occur in the same months as high freight rates. The analyst has paired monthly observations and judges them suitable for forecasting. Which sampling approach best preserves the observed relationship?

Choose an answer

Create a free account to get started

Unlock full course notes by signing up

  • Video lessons taught by top educators
  • Practice questions with guided solutions
  • Written review notes for reference
  • Expert answers anytime from course tutors

Extra Practice