Stable lifecycle

dist_exponential(rate)

Arguments

rate

vector of rates.

See also

Examples

dist <- dist_exponential(rate = c(2, 1, 2/3)) dist
#> <distribution[3]> #> [1] Exp(2) Exp(1) Exp(0.67)
mean(dist)
#> [1] 0.5 1.0 1.5
variance(dist)
#> [1] 0.25 1.00 2.25
skewness(dist)
#> [1] 2 2 2
kurtosis(dist)
#> [1] 6 6 6
generate(dist, 10)
#> [[1]] #> [1] 1.56939694 0.39818383 0.36904869 0.04383117 0.98915030 0.14505477 #> [7] 0.25023985 0.38852926 0.01589016 0.60868731 #> #> [[2]] #> [1] 1.852790795 0.133738117 0.009199867 1.259315609 2.298262546 0.293562610 #> [7] 0.347437994 0.204289540 1.157935977 1.268258058 #> #> [[3]] #> [1] 0.1538720 2.1504978 0.1209291 2.1796241 0.2117541 1.0816183 0.3420168 #> [8] 1.1450588 1.1755979 0.4610982 #>
density(dist, 2)
#> [1] 0.03663128 0.13533528 0.17573143
density(dist, 2, log = TRUE)
#> [1] -3.306853 -2.000000 -1.738798
cdf(dist, 4)
#> [1] 0.9996645 0.9816844 0.9305165
quantile(dist, 0.7)
#> [1] 0.6019864 1.2039728 1.8059592