This article explains how ranges and Monte Carlo simulations as well as different distribution shapes are used in Lucanet xP&A (Extended Planning & Analysis) to model uncertainty in formulas, enabling more realistic and probabilistic forecasting.

When variables in Lucanet xP&A are in the format of a range (e.g. 0 to 100, uniform(0,100), a Monte Carlo simulation is run to estimate the possible outcomes of an uncertain event. Monte Carlo will randomly pick a value from the distribution and compute the whole model as if it were that random constant value. This process is repeated multiple times to generate distributions for the output variables.

The use of the simulation allows xP&A to perform computations using values with uncertainty that are not possible without it. Due to this method of handling uncertainty, you may notice that the range of the cell and the value are not the numbers you input or would expect, but only by a trivial amount.

Shows a 'Range' variable cell in Lucanet xP&A displaying the value 50.3 with the underlying range '0.7 – 98.3'.
Range with Monte Carlo method

There are many different types of distribution shapes for values with uncertainty. Here are three examples of distributions that xP&A supports:

In Lucanet xP&A, values in the format of '# to #' produce a triangle distribution where the center value is the most likely value, while the edges of the range are the least likely:

Shows the 'Triangle Distribution' panel in Lucanet xP&A for 'Range 1' with 'Range: 0.0000 – 100.0000' and 'Average: 50.0000', and a triangular-shaped chart peaking around 51.2.
Chart with a Triangular Distribution

In Lucanet xP&A, using the function uniform(from, to), a uniform distribution can be produced:

Shows the 'Uniform Distribution' panel in Lucanet xP&A for the 'uniform' function with 'Range: 0 – 100' and 'Average: 50', and a flat-topped chart spanning roughly 20 to 90.
Chart with a Uniform Distribution

In Lucanet xP&A, using the function poisson(lambda), a poisson distribution will be produced:

Shows the 'Poisson Distribution' panel in Lucanet xP&A for the 'Poisson' function with 'Range: 0 – 100' and 'Average: 40', and a right-skewed chart peaking around 35-40.
Chart with a Poisson Distribution

The sample function in Lucanet xP&A takes a random sample from the provided numbers. For example, sample(1,2,3) may return 1, 2 or 3 with equal probability.

Shows the 'Sample' panel in Lucanet xP&A for 'Outputs / New Variable' in 'Dec '21' with 'Range: 1 – 3', 'Average: 1.98', 'Variance 0.7', 'P5' 1, 'P10' 1, 'Median' 2, 'P90' 3, and 'P95' 3, with three small peaks in the chart around 1, 2, and 3.
Chart with Sample function

This content was generated using AI and reviewed by Lucanet subject matter experts before publication.