Pareto function

Pareto distribution

Pareto distribution

Density, distribution function, quantile function and random generation for the Pareto distribution.

dpareto(x, a = 1, b = 1, log = FALSE) ppareto(q, a = 1, b = 1, lower.tail = TRUE, log.p = FALSE) qpareto(p, a = 1, b = 1, lower.tail = TRUE, log.p = FALSE) rpareto(n, a = 1, b = 1)

Arguments

  • x, q: vector of quantiles.

  • a, b: positive valued scale and location parameters.

  • log, log.p: logical; if TRUE, probabilities p are given as log(p).

  • lower.tail: logical; if TRUE (default), probabilities are P[Xx]P[X \le x]

    otherwise, P[X>x]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

Probability density function

f(x)=abaxa+1f(x)=(aba)/x(a+1) f(x) = \frac{ab^a}{x^{a+1}}f(x) = (a*b^a) / x^(a+1)

Cumulative distribution function

F(x)=1(bx)aF(x)=1(b/x)a F(x) = 1 - \left(\frac{b}{x}\right)^aF(x) = 1 - (b/x)^a

Quantile function

F1(p)=b(1p)1aF1(p)=b/(1p)(1a) F^{-1}(p) = \frac{b}{(1-p)^{1-a}}F^-1(p) = b/(1-p)^(1-a)

Examples

x <- rpareto(1e5, 5, 16) hist(x, 100, freq = FALSE) curve(dpareto(x, 5, 16), 0, 200, col = "red", add = TRUE) hist(ppareto(x, 5, 16)) plot(ecdf(x)) curve(ppareto(x, 5, 16), 0, 200, col = "red", lwd = 2, add = TRUE)

References

Krishnamoorthy, K. (2006). Handbook of Statistical Distributions with Applications. Chapman & Hall/CRC

  • Maintainer: Tymoteusz Wolodzko
  • License: GPL-2
  • Last published: 2023-11-30