Monte Carlo Simulation
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:
Here, Π is weekly profit, p is selling price per unit, D is weekly demand, Q is the quantity purchased, c is purchase cost per unit, and F 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.
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 N trials, you have N 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:
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/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 |
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 UD: if 0≤UD<0.60, assign demand of 80 boxes. This interval has length 0.60.
- Demand draw UD: if 0.60≤UD<1, assign demand of 120 boxes. This interval has length 0.40.
- Cost draw Uc: if 0≤Uc<0.75, assign purchase cost of $7 per box. This interval has length 0.75.
- Cost draw Uc: if 0.75≤Uc<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 D be demand in boxes and c be purchase cost per box. Therefore:
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 boxes.
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 boxes.
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 boxes.
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 boxes.
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 boxes.
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:
Only trial 3 has profit strictly below $200. The estimated probability is therefore:
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.
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 .
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?