Pareto | R Documentation |
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)
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 |
vector of probabilities. |
n |
number of observations. If |
Probability density function
f(x) = \frac{ab^a}{x^{a+1}}
Cumulative distribution function
F(x) = 1 - \left(\frac{b}{x}\right)^a
Quantile function
F^{-1}(p) = \frac{b}{(1-p)^{1-a}}
Krishnamoorthy, K. (2006). Handbook of Statistical Distributions with Applications. Chapman & Hall/CRC
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)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.