Mirai-X: overview

MIRAI-X

The Monte Carlo method, from its history to the engine.

Where the technique behind Mirai-X comes from, and what its engine does from the moment you enter your estimates to the moment you read the result. With an example on real numbers.

The story

Born from a game of solitaire, named after a casino.

From a needle dropped on a floor to the first electronic computers, all the way to business decisions.

  1. 1777
    Georges-Louis Leclerc de Buffon

    He publishes the needle problem: drop a needle on a floor made of strips, what is the chance it crosses a line? The answer contains π. Laplace later notes that by throwing many needles and counting you can estimate π: a number obtained from chance.

  2. 1930s
    Enrico Fermi · Rome

    To understand how neutrons slow down in matter, Fermi follows single paths by hand, picking direction and collision at random, one after another. He never publishes it, but that is already the method.

  3. 1946
    Stanisław Ulam · Los Alamos

    While convalescing, Ulam tries to work out the chance of winning a game of solitaire: there are too many combinations for an exact calculation. He realises you can estimate it by playing many random games and counting the wins, and that the new electronic computers can do this for far more serious problems, such as neutron diffusion.

  4. 1947–1949
    John von Neumann · Nicholas Metropolis · ENIAC

    Von Neumann writes the first computing plan for neutrons, and in 1948 ENIAC runs the first simulations. Metropolis picks the name Monte Carlo, after the casino where Ulam's uncle used to gamble. In 1949 Metropolis and Ulam publish “The Monte Carlo Method”.

  5. 1964
    David B. Hertz · Harvard Business Review

    With “Risk Analysis in Capital Investment” the method enters business decisions: instead of a single expected return, the distribution of every possible return of an investment.

  6. Today
    Finance, large projects, healthcare, energy, climate

    Since 1977 it has been used to price options; NASA asks for programme costs and schedules to be set with a 70% probability of being met; it is used for drugs, power grids and climate scenarios. It has almost always remained a tool for specialists. Mirai-X brings it to the people who make decisions in an SME.

The method

What the engine does, step by step

From your estimates to the result, in eight steps. The grey box gives the technical detail, for those who want to check.

  1. 1

    The model

    The decision becomes a formula: the result you care about, calculated from the items that drive it. Some items are known, others uncertain.

    e.g. margin = units × (price − unit cost) − fixed costs · every uncertain item is a random variable

  2. 2

    The distributions

    Every uncertain item gets a shape, which says which values it can take and how often. With three estimates the usual choice is PERT, which gives little weight to the extremes; for costs with a long upper tail, lognormal; with historical data, empirical, meaning your data as it is.

    16 shapes: constant, uniform, triangular, PERT, normal, truncated normal, lognormal, beta, gamma, exponential, Weibull, Poisson, binomial, Bernoulli, discrete, empirical

  3. 3

    Sampling

    A pseudo-random generator produces numbers between 0 and 1. Each one becomes the value of an item through its quantile function: close to 0 gives a low value, close to 1 a high one. The generator starts from a seed: same seed, same sequence.

    xoshiro256** generator · simple random sampling · table-based inversion of the cumulative distribution

  4. 4

    Dependencies

    If two items tend to move together, you state it with a coefficient from −1 to +1. The engine links the random numbers before transforming them: each item keeps its shape and the pair keeps its link, iteration by iteration.

    rank correlation (Spearman) → Gaussian copula · Pearson ρ = 2·sin(π·ρs/6)

  5. 5

    Risks and events

    A risk that either happens or not works like a loaded coin: with probability p it is worth its impact, otherwise zero. Repeating events, such as breakdowns in a year, are a random number of events, each with its own cost.

    binary risk: Bernoulli(p) × impact · compound risk: sum of N severities, with N drawn from the frequency distribution (e.g. Poisson)

  6. 6

    Iterations and precision

    Each iteration draws every item and computes the formula. The error of the estimate falls with the square root of the number of iterations: halving it takes four times as many. With 10,000 iterations a 10% probability is known to ±0.6 points, with 1,000,000 to ±0.06.

    standard error = σ/√N · 95% CI of the mean = mean ± 1.96·σ/√N · percentile CIs from order statistics

  7. 7

    Reading the result

    The results are sorted. The 10th percentile is the value below which 1 iteration in 10 falls; the probability of exceeding a threshold is the share of iterations above it. Budgets, dates and margins are read this way, as “how many times out of 100”.

    P10 · P50 · P90 · P(X > threshold) = iterations above threshold / N · exceedance curve

  8. 8

    Sensitivity and value of information

    To find out which estimate matters, the engine moves one item at a time to its 10th and 90th percentile, with the same random numbers, and measures how far the result moves. For the value of information it reruns the calculation as if an item were known, over 9 of its possible values, and measures how much the range narrows.

    tornado chart (quantiles 0.1 and 0.9, common random numbers) · input–result rank correlation · residual P10–P90 width

An example with real numbers

With the traditional method, risk is underestimated.

A project with four independent risks. The classic method budgets the expected monetary value (EMV), the sum of probability × impact. But a risk either happens or it doesn't: the EMV matches no real project.

example
RiskProbabilityImpactEMV
A15%€60,000€9,000
B15%€70,000€10,500
C10%€80,000€8,000
D10%€90,000€9,000
Risk budget with the classic method€36,500
41 in 100

projects exceed the €36,500 budget. In 58 out of 100 nothing is paid; when a risk does happen it costs at least €60,000, almost twice the budget.

How much to budget to cover X projects out of 100

CoverageFixed estimatesUncertain estimates (PERT)
80 in 100€80,000€82,000
90 in 100€90,000€111,000
95 in 100€140,000€150,000
99 in 100€170,000€202,000

Probabilities and impacts are estimates too, though. With a range instead of a fixed number the average cost rises from €36,500 to €39,212 (+7.4%), and covering 9 projects in 10 takes €111,000 instead of €90,000. That is what the expected value alone does not show.

Exact calculation over the 16 combinations of the four risks, checked against 1,000,000 simulated projects (seed 26019). Uncertain estimates with a PERT distribution: probabilities A and B 8–15–25%, C and D 5–10–18%; impacts A €45/60/100k, B €50/70/120k, C €55/80/150k, D €60/90/160k.

Stated limits

  • The same seed and the same data give the same numbers on the same device.
  • The tornado chart does not yet take correlated items into account.
  • Sampling is simple random sampling: techniques that reduce the iterations needed, such as Latin hypercube, are not available yet.
  • Confidence intervals assume independent iterations, as is the case with simple sampling.
  • The result is only as good as the estimates: the engine does not fix a wrong estimate, it shows you how much it weighs.

Coming soon

We are working on an assistant that reads documents and emails to prepare the estimates for you, and on a direct connection to your management software and databases. Today you enter the estimates yourself or import them from tables and plain text.

Launching in