Interactive explainer

Try Monte Carlo simulation

Use “Project planning” to explore how uncertain task durations and parallel work packages affect a deadline. The free calculator shows the median, P80, P90 and the chance of finishing on time. The π experiment also explains simulation accuracy.

Interactive

Try Monte Carlo simulation

This explainer requires JavaScript. Draw random inputs repeatedly, calculate the result for each draw and read probabilities from the resulting frequency distribution.

For a quick start, open “Project planning”, choose a deadline and compare it with P80. Change one task’s duration and simulate again. The five tasks form a fixed learning example; a real project also needs its additional dependencies and shared causes of delay represented. Your inputs stay locally in your browser.

How the explainer works

Estimating π. Random points (x,y)(x, y) are distributed uniformly across the unit square. A point lies in the quarter-circle if x2+y2≤1x^2 + y^2 \le 1. The quarter-circle has area π/4\pi/4, so each point is a hit with probability p=π/4p = \pi/4. This gives the estimator

π^=4⋅points in the quarter-circleN,SE⁡(π^)=4p(1−p)N≈1,64N\hat\pi = 4 \cdot \frac{\text{points in the quarter-circle}}{N}, \qquad \operatorname{SE}(\hat\pi) = 4\sqrt{\frac{p(1-p)}{N}} \approx \frac{1{,}64}{\sqrt{N}}

With 10,000 points, standard error is about 0.016. One extra decimal digit of accuracy takes roughly a hundred times as many points.

Project planning. Five tasks have uncertain durations represented by triangular distributions with minimum aa, most likely value cc and maximum bb; the mean is (a+b+c)/3(a + b + c)/3. Legal review runs in parallel with implementation and testing:

T=design+max⁡(implementation+testing,  legal review)+approvalT = \text{design} + \max(\text{implementation} + \text{testing},\; \text{legal review}) + \text{approval}

All durations are drawn again for each of 10,000 simulations. The histogram and S-curve show the probability of finishing by a given day. Tasks are assumed independent, a deliberate simplification.

Three things to try

  1. Planning with most likely durations. These values give a total of 28 days. Because the distributions are right-skewed, that plan succeeds in only about 7% of simulations; the median is just over 34 days.
  2. Make the parallel branch critical. Set legal review to 15, 21 and 35 days. The total based on most likely values stays at 28 days, but the median rises from just over 34 to about 36 days: the slower of the two parallel branches now determines completion in almost 40% of runs.
  3. Accuracy versus effort. Run the π estimate and watch the band. It narrows as NN increases, but ever more slowly: error shrinks only with 1/N1/\sqrt{N}.

The Monte Carlo simulation article provides more on the method, distribution choice and common mistakes.

From NyxAI

smartlytics is the learning hub of NyxAI GmbH.

Explore the methods we work with, explained openly, with sources and calculations you can reproduce.

Decision Core

NyxAI is developing a Decision Core for Decision Intelligence that combines optimisation, simulation, statistics and reinforcement learning: compare options, make uncertainty visible and learn from outcomes, with people in control.

Use case: identify and address material shortages with AI

DeepSquare

Explainable chess AI with human playing styles: NyxAI’s testing ground for understandable decisions under time pressure.