---
title: "Values with Uncertainty"
description: "This article explains how ranges and Monte Carlo simulations as well as different distribution shapes are used in xP&A to model uncertainty in formulas, enabling more realistic and probabilistic forecasting."
source_url: https://support.lucanet.com/en/documentation/xp-a---extended-planning-and-analysis/modeling-your-data/create-andedit-formulas/values-with-uncertainty
language: en
last_updated: 2026-05-01
---
# Values With Uncertainty in Lucanet xP&A

## Overview

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.

## Ranges and the Monte Carlo Method in Lucanet xP&A

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'.](https://support.lucanet.com/assets/docs-images/xp-a---extended-planning-and-analysis/modeling-your-data/create-andedit-formulas/values-with-uncertainty/_images/en/range.png)
Range with Monte Carlo method

## Distribution Shapes in Lucanet xP&A

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

## Triangular Distribution in Lucanet xP&A

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.](https://support.lucanet.com/assets/docs-images/xp-a---extended-planning-and-analysis/modeling-your-data/create-andedit-formulas/values-with-uncertainty/_images/en/triangular-distribution.png)
Chart with a Triangular Distribution

## Uniform Distribution in Lucanet xP&A

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.](https://support.lucanet.com/assets/docs-images/xp-a---extended-planning-and-analysis/modeling-your-data/create-andedit-formulas/values-with-uncertainty/_images/en/uniform-distribution.png)
Chart with a Uniform Distribution

## Poisson Distribution in Lucanet xP&A

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.](https://support.lucanet.com/assets/docs-images/xp-a---extended-planning-and-analysis/modeling-your-data/create-andedit-formulas/values-with-uncertainty/_images/en/poisson-distribution.png)
Chart with a Poisson Distribution

## Sample in Lucanet xP&A

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.](https://support.lucanet.com/assets/docs-images/xp-a---extended-planning-and-analysis/modeling-your-data/create-andedit-formulas/values-with-uncertainty/_images/en/sample.png)
Chart with Sample function
