Functions to compute the probability density function, cumulative distribution function, and quantile function for the Pareto distribution.
Usage
pareto_distribution(scale = 1, shape = 1)
pareto_pdf(x, scale = 1, shape = 1)
pareto_lpdf(x, scale = 1, shape = 1)
pareto_cdf(x, scale = 1, shape = 1)
pareto_lcdf(x, scale = 1, shape = 1)
pareto_quantile(p, scale = 1, shape = 1)Value
A single numeric value with the computed probability density, log-probability density, cumulative distribution, log-cumulative distribution, or quantile depending on the function called.
See also
Boost Documentation for more details on the mathematical background.
Examples
# Pareto distribution with scale = 10, shape = 5
dist <- pareto_distribution(10, 5)
# Apply generic functions
cdf(dist, 0.5)
#> [1] 0
logcdf(dist, 0.5)
#> [1] -Inf
pdf(dist, 0.5)
#> [1] 0
logpdf(dist, 0.5)
#> [1] -Inf
hazard(dist, 0.5)
#> [1] 0
chf(dist, 0.5)
#> [1] 0
mean(dist)
#> [1] 12.5
median(dist)
#> [1] 11.48698
mode(dist)
#> [1] 10
range(dist)
#> [1]  0.000000e+00 1.797693e+308
quantile(dist, 0.2)
#> [1] 10.4564
standard_deviation(dist)
#> [1] 3.227486
support(dist)
#> [1]  1.000000e+01 1.797693e+308
variance(dist)
#> [1] 10.41667
skewness(dist)
#> [1] 4.64758
kurtosis(dist)
#> [1] 73.8
kurtosis_excess(dist)
#> [1] 70.8
# Convenience functions
pareto_pdf(1)
#> [1] 1
pareto_lpdf(1)
#> [1] 0
pareto_cdf(1)
#> [1] 0
pareto_lcdf(1)
#> [1] -Inf
pareto_quantile(0.5)
#> [1] 2