[Stable]

dist_exponential(rate)

Arguments

rate

vector of rates.

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] 2.13355833 0.48945077 0.05086240 0.81858946 1.57431505 0.18464411
#>  [7] 0.01440250 0.02248677 0.26211091 1.16679479
#> 
#> [[2]]
#>  [1] 1.4543557 0.6193924 0.1187665 0.4674594 1.0919291 0.2501386 1.5347682
#>  [8] 0.3615972 0.5812940 1.7873707
#> 
#> [[3]]
#>  [1] 1.60629495 0.78257469 0.69331094 0.11753783 0.05830031 1.30747085
#>  [7] 0.33089887 3.75555750 4.31148627 0.49767236
#> 

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