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
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 meancurve(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).