Monte Carlo Precision: How Many Samples? | Vose Software

ModelRisk example · General techniques

Precision Control: How Many Samples Are Enough

How precisely does a simulation know its mean, spread, percentiles and probabilities, and how many samples does each need?

  • Complexity: ★★★★★
  • Free Excel workbook (GU-26)
  • Needs ModelRisk: free trial

From the model’s saved run

The NPV

$ million.

MeasureUnitValue
Mean$ million171.1
Standard deviation$ million116.9
5th percentile$ million−3.1
Median$ million159.7
95th percentile$ million381.9
Chance of a negative NPV5.4%
Samples in the last runsamples10,000
The NPV

The business question

A small manufacturing project runs for nine years (2027–2035): sales start at an uncertain volume and grow at an uncertain rate, each unit sells at an uncertain price and costs an uncertain amount, and fixed costs are uncertain too. The NPV at 15% is simulated.

Before reporting it, the analyst sets precision requirements, for example 99% confident that the mean is known to within $5 million, and checks them with ModelRisk's precision functions, which also say how many more samples each still needs. With precision control switched on, VoseSimStop ends the simulation as soon as every requirement is met.

Who it is for
Anyone who runs simulations and must say how precise the results are, or choose the number of samples.
Main outputs
The project's NPV: mean, spread, percentiles and the chance of a loss · for four precision requirements: met or not, the precision achieved, the samples needed (by formula) and ModelRisk's estimate of the extra samples · the net cash flow by year.

How the model works

Four sheets after this one, read from left to right. Each one feeds the next.

  1. Inputs sheet

    Triangular ranges for variable cost, price, first-year volume, growth and fixed costs; the tax and discount rates; the strength of the link between the two costs; four precision requirements.

  2. Cash flow sheet

    Each year: volume × (price − variable cost) less fixed costs, after tax. The NPV discounts years 2028 on at 15%. Variable and fixed costs come from a rotated Frank copula: when one is high, the other tends to be low.

  3. Precision sheet

    Each requirement as a VosePrecision function over two cells: TRUE or FALSE, and the extra samples it needs. VoseSimStop turns each into a stop condition, active when the switch on the Inputs sheet is 1.

  4. Results sheet

    The NPV's statistics; for each requirement the precision achieved and the samples needed, by formula and as ModelRisk estimates them.

ModelRisk techniques

  • Precision targets VosePrecisionMean
  • Automatic stop VoseSimStop
  • Standard error VoseSimMSE
  • Rotated Frank copula VoseCopulaBiFrank

Find similar models

Product

The results in detail

Precision of each answer

Required, achieved by the last run, and samples needed: by formula and as ModelRisk estimates them.

Net cash flow by year — 10th / 50th / 90th percentile band
RequirementRequired ±Achieved ±Met?Samples neededExtra (ModelRisk)
Mean, at 99%5.03.0Yes3,626–
Standard deviation, at 95%10.01.6Yes272–
95th percentile, at 90%10.05.4Yes2,866–
Chance of a negative NPV, at 95%1.00%0.44%Yes1,955–

How to read these results

  • The project's NPV averages about 170 ($ million) with a 5.5% chance of being negative; nine times in ten it lies between about −4 and 380.
  • How many samples are enough depends on the question. Knowing the mean to ± 5 with 99% confidence needs about 3,600 samples. The 95th percentile to ± 10 at 90% about 2,500 to 3,000 (it depends on how dense the results are there); the chance of a loss to ± 1 point at 95% about 2,000.

    The standard deviation to ± 10 only a few hundred. 10,000 samples meet all four.

  • Report results with their precision, for example a mean NPV of 170 ± 3 ($ million, 99% confidence) after 10,000 samples. Halving the ± needs four times the samples.
  • The VosePrecision functions check a requirement and, over two cells, estimate the extra samples still needed. Set the switch on the Inputs sheet to 1, switch precision control on (P% on the ModelRisk ribbon) and VoseSimStop ends the simulation as soon as every requirement is met: here after about 3,700 samples.

    In the ModelRisk build this example was made with, a simulation stopped that way leaves its percentiles and probabilities unavailable on this sheet ('No simulation results'), so the example ships with the switch at 0.

  • The two costs are strongly opposite (rank correlation about −0.96): the original example's rotated Frank copula.

See it move. Open the workbook, change an input on the Inputs sheet and run the simulation: every table and chart on this page updates in Excel.

Inputs and assumptions

Every assumption in the model, with its uncertainty and where it comes from. The figures are illustrative.

Costs, price and volume 5 inputs

Triangular ranges: low, most likely, high.

AssumptionUnitUncertaintyLowMost likelyHigh
Variable cost per unitLinked to the fixed costs (Cash flow sheet)$ thousandTriangle · copula107.0109.0114.0
Sales price per unit$ thousandTriangle236.0253.0259.0
Sales volume in 2027unitsTriangle8501,1501,600
Sales growth a yearApplied every year after the firstTriangle−5.0%3.0%12.0%
Fixed costs a yearHigh when the variable cost is low (copula)$ millionTriangle · copula135.0137.0146.0
Tax, discounting and the link between the costs 4 inputs
AssumptionUnitValue
Tax rate35%
Discount rateYears from 2028 discounted; 2027 counts in full15%
Frank copula parameter θ20: a strong link20
Copula direction1: both costs high together; 2: rotated, opposite2
Precision requirements on the NPV 9 inputs

Precision ± in $ million (a probability for the chance of a loss).

AssumptionUnitValue
Mean: precision$ million5.0
Mean: confidence99%
Standard deviation: precision$ million10.0
Standard deviation: confidence95%
95th percentile: precision$ million10.0
95th percentile: confidence90%
Chance of a negative NPV: precision± 1 percentage point1.0%
Chance of a negative NPV: confidence95%
Stop the simulation when all are metNeeds precision control on (P% on the ModelRisk ribbon); see the Precision sheet1 = yes0

Units and conventions

$ thousand per unit, $ million
Price and variable cost per unit in $ thousand; fixed costs, cash flows and the NPV in $ million.
Precision ± p at confidence c
The true value (with endlessly many samples) lies within ± p of the simulated value with probability c.

Key assumptions and limitations

Cash flow
Net cash flow = (volume × (price − variable cost) ÷ 1,000 − fixed costs) × (1 − tax). The original's formula floored it at zero but compared amounts in different units, so the floor never applied: a loss year counts in full here too, as in the original's results.
Years
2027–2035 (the original ran 2012–2020).
Precision formulas
The samples needed by formula use the normal approximation for the mean and the probability, the kurtosis for the standard deviation, and the density at the percentile.
Data
The ranges, the copula (Frank 20, rotated) and the requirements are those of ModelRisk's earlier Precision Control example.
ModelRisk build
In the build this example was made with, a simulation ended early by VoseSimStop leaves VoseSimPercentile and VoseSimProbability without results ('No simulation results'), although the samples are saved. The stop conditions are therefore behind a switch, off by default.

How to use it

  1. Set the requirements on the Inputs sheet: a precision (in the NPV's units, or a probability) and a confidence.
  2. Run a simulation (10,000 samples with a fixed seed are set) and read which requirements are met. To stop automatically, switch precision control on (P% on the ModelRisk ribbon), set a large number of samples and start: the simulation ends when every VoseSimStop condition is met.
  3. Report each result with its precision, for example: mean NPV 170 ± 3 ($ million, 99% confidence).

ModelRisk functions used

VoseTriangle
The five uncertain quantities, two of them through the copula's U.
VoseCopulaBiFrank
Two linked probabilities; direction 2 rotates the copula, so the link is opposite.
VosePrecisionMean, VosePrecisionStdev, VosePrecisionPercentile, VosePrecisionProbability
Whether a statistic is known to a precision with a confidence; over two cells, the extra samples needed.
VoseSimStop
Ends a simulation once all its conditions are met (precision control switched on).
VoseSimMSE
The standard error of the simulated mean.
VoseSimMean, VoseSimStdev, VoseSimKurtosis, VoseSimPercentile, VoseSimProbability
Statistics of the simulation.

Further reading