pert: The (Modified) PERT Distribution

Description Usage Arguments Details Value Author(s) References See Also Examples

Description

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.

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
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.

Details

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

mean = (min + shape * mode + max)/(shape + 2)

The underlying beta distribution is specified by shape1 and shape2 defined as

shape1=(mean - min)*(2 mode-min-max)/((mode-mean)*(max - 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.

Value

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

Author(s)

Regis Pouillot and Matthew Wiener

References

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

See Also

Beta

Examples

1
2
3
4
5
6
7
8
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)

mc2d documentation built on July 5, 2021, 5:09 p.m.