pert function

The (Modified) PERT Distribution

The (Modified) PERT Distribution

Density, distribution function, quantile function and random generation for the PERT (aka Beta PERT) distribution with minimum equals to min , mode equals to mode

(or, alternatively, mean equals to mean ) and maximum equals to max .

dpert(x, min = -1, mode = 0, max = 1, shape = 4, log = FALSE, mean = 0) ppert( q, min = -1, mode = 0, max = 1, shape = 4, lower.tail = TRUE, log.p = FALSE, mean = 0 ) qpert( p, min = -1, mode = 0, max = 1, shape = 4, lower.tail = TRUE, log.p = FALSE, mean = 0 ) rpert(n, min = -1, mode = 0, max = 1, shape = 4, mean = 0)

Arguments

  • x, q: Vector of quantiles.
  • min: Vector of minima.
  • mode: Vector of modes.
  • max: Vector of maxima.
  • shape: Vector of scaling parameters. Default value: 4.
  • log, log.p: Logical; if TRUE , probabilities p are given as log(p) .
  • mean: Vector of means, can be specified in place of mode as an alternative parametrization.
  • lower.tail: Logical; if TRUE (default), probabilities are P[X <= x] , otherwise, P[X > x]
  • p: Vector of probabilities
  • n: Number of observations. If length(n) > 1, the length is taken to be the number required.

Returns

dpert gives the density, ppert gives the distribution function, qpert gives the quantile function, and rpert generates random deviates.

Details

The PERT distribution is a Beta distribution extended to the domain [min, max] with mean

mean=min+shape×mode+maxshape+2mean=(min+shapemode+max)/(shape+2) mean=\frac{min+shape\times mode+max}{shape+2}mean = (min + shape * mode + max)/(shape + 2)

The underlying beta distribution is specified by shape1shape1 and shape2shape2 defined as

α1=(meanmin)(2×modeminmax)(modemean)(maxmin)shape1=(meanmin)(2modeminmax)/((modemean)(maxmin)) \alpha_{1}=\frac{(mean-min)(2\times mode-min-max)}{(mode-mean)(max-min)}shape1=(mean - min)*(2 mode-min-max)/((mode-mean)*(max - min)) α2=α1×(maxmean)meanminshape2=shape1(maxmean)/(meanmin) \alpha_{2}=\frac{\alpha_{1}\times (max-mean)}{mean-min}shape2=shape1*(max - mean)/(mean - min)

mode or mean can be specified, but not both. Note: mean is the last parameter for back-compatibility. A warning will be provided if some combinations of min , mean and max leads to impossible mode.

David Vose (See reference) proposed a modified PERT distribution with a shape parameter different from 4.

The PERT distribution is frequently used (with the triangular distribution) to translate expert estimates of the min, max and mode of a random variable in a smooth parametric distribution.

Examples

curve(dpert(x,min=3,mode=5,max=10,shape=6), from = 2, to = 11, lty=3,ylab="density") curve(dpert(x,min=3,mode=5,max=10), from = 2, to = 11, add=TRUE) curve(dpert(x,min=3,mode=5,max=10,shape=2), from = 2, to = 11, add=TRUE,lty=2) legend(x = 8, y = .30, c("Default: 4","shape: 2","shape: 6"), lty=1:3) ## Alternatie parametrization using mean curve(dpert(x,min=3,mean=5,max=10), from = 2, to = 11, lty=2 ,ylab="density") curve(dpert(x,min=3,mode=5,max=10), from = 2, to = 11, add=TRUE) legend(x = 8, y = .30, c("mode: 5","mean: 5"), lty=1:2)

References

Vose D. Risk Analysis - A Quantitative Guide (2nd and 3rd editions, John Wiley and Sons, 2000, 2008).

See Also

Beta

Author(s)

Regis Pouillot and Matthew Wiener

  • Maintainer: Regis Pouillot
  • License: GPL (>= 2)
  • Last published: 2024-06-05

Useful links