[Stable]

The Inverse Exponential distribution is used to model the reciprocal of exponentially distributed variables.

dist_inverse_exponential(rate)

Arguments

rate

an alternative way to specify the scale.

Details

We recommend reading this documentation on pkgdown which renders math nicely. https://pkg.mitchelloharawild.com/distributional/reference/dist_inverse_exponential.html

In the following, let \(X\) be an Inverse Exponential random variable with parameter rate = \(\lambda\).

Support: \(x > 0\)

Mean: Does not exist, returns NA

Variance: Does not exist, returns NA

Probability density function (p.d.f):

$$ f(x) = \frac{\lambda}{x^2} e^{-\lambda/x} $$

Cumulative distribution function (c.d.f):

$$ F(x) = e^{-\lambda/x} $$

Quantile function (inverse c.d.f):

$$ F^{-1}(p) = -\frac{\lambda}{\log(p)} $$

Moment generating function (m.g.f):

Does not exist (divergent integral).

Examples

dist <- dist_inverse_exponential(rate = 1:5)
dist
#> <distribution[5]>
#> [1] InvExp(1) InvExp(2) InvExp(3) InvExp(4) InvExp(5)

mean(dist)
#> [1] NA NA NA NA NA
variance(dist)
#> [1] NA NA NA NA NA
support(dist)
#> <support_region[5]>
#> [1] (0,Inf) (0,Inf) (0,Inf) (0,Inf) (0,Inf)
generate(dist, 10)
#> [[1]]
#>  [1]   3.7289241   1.8427866 283.4880701   2.3664297   0.3921852   0.4473592
#>  [7]   0.9352792   3.0449565   1.1365656   1.2905664
#> 
#> [[2]]
#>  [1] 0.1892165 6.9010945 0.4938597 0.3872013 1.2552939 0.3564493 0.2452058
#>  [8] 1.2569995 3.4619965 0.9481243
#> 
#> [[3]]
#>  [1] 0.52281677 0.63829494 0.50716041 0.07846697 0.13330234 1.15327284
#>  [7] 0.82493743 0.19906400 0.27667419 1.24847088
#> 
#> [[4]]
#>  [1] 0.2000799 0.1756323 0.3004266 0.1745511 0.3087060 0.1359730 0.7107662
#>  [8] 0.2890130 0.1725553 0.1151172
#> 
#> [[5]]
#>  [1] 0.15455446 0.18475655 0.08399890 0.06545874 0.26151303 0.26712686
#>  [7] 0.10958132 0.33902945 3.42426406 0.16564102
#> 

density(dist, 2)
#> [1] 0.15163266 0.09735010 0.07054014 0.05515606 0.04524187
density(dist, 2, log = TRUE)
#> [1] -1.886294 -2.329442 -2.651573 -2.897589 -3.095732

cdf(dist, 4)
#> [1] 0.7788008 0.8824969 0.9200444 0.9394131 0.9512294

quantile(dist, 0.7)
#> [1] 2.8036733 1.4018366 0.9345578 0.7009183 0.5607347