# Triangular distribution

(Redirected from CumTriangularInv)

Release: 4.6  •  5.0  •  5.1  •  5.2  •  5.3  •  5.4  •  6.0  •  6.1  •  6.2  •  6.3  •  6.4

The triangular is a continuous, bounded, unimodal probability distribution serves as a convenient way to express your uncertainty by providing the minimum «min», most likely «mode», and maximum «max» values. The «mode» is the most likely value, and space of all possible values is bounded by «min» and «max». The density has a triangular shape, with a linear increase from «min» to the highest value at «mode», followed by a linear decrease to 0 at «max». When «mode» is equal to «min» or «max», a ramp shape results.

Triangular(2, 7, 10) Use the triangular distribution when you have the bounds and the mode, but have little other information about the uncertain quantity. The UncertainLMH and Pert distributions use similar parameters but produce more bell-shaped distributions.

## Functions

The functions all specify the distribution using:

• «min»: The lower bound.
• «mode»: The most likely value. «min» <= «mode» <= «max»
• «max»: The upper bound.

### Triangular(min, mode, max, over)

The distribution function. Use this to define a chance variable or uncertain quantity as having a triangular distribution.

To define independent and identically distributed distributions over one or more indexes, list the indexes in the optional «over» parameter.

### DensTriangular(x, min, mode, max)

The analytic probability density at «x».

### CumTriangular(x, min, mode, max)

The analytic cumulative probability at «x», equal to

$\displaystyle{ F(x) = \int_{«min»}^x p(t ; «min», «mode», «max») dt }$

where $\displaystyle{ p(t ; «min», «mode», «max») }$ is the analytic density at t.

### CumTriangularInv(p, min, mode, max)

The analytic inverse cumulative probability, aka quantile function. Returns the «p»th fractile/quantile/percentile.

## Independent Samples

Like all Analytica distribution functions, Triangular generates independent distributions across any dimensions occurring in the input parameters. If you want to generate the same triangular distribution independently over additional dimensions, use the optional «Over» parameter, e.g.:

Triangular(2, 7, 10, Over: I, J)

## Parameter Estimation

An approximate, but quick and dirty, method for estimating the parameters of a triangular distribution from sample data is as follows:

«min» := Min(data, I)
«mode» := 3*Mean(data, I) - Max(data, I) - Min(data, I)
«max» := Max(data, I)

Note that if your data is obtained from Monte Carlo simulation, you'll need to use Max(Sample(data), Run) and Min(Sample(data), Run) in the above.

To see why the above is approximate, consider a data set with 100 points. The smallest data point is expected to occur around the 0.5% fractile, so we end up using a point around the 0.5% fractile as the «min», which of course is not the true min of the underlying distribution. Although some heuristic adjustments to «min» and «max» can be made in an attempt to compensate, in general a search is required to locate the maximum likelihood estimator (but for a given «min» and «max» guess, the «mode» estimate above based on the mean can be used, eliminating the need to search over a third parameter as well).