[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] 0.3620434 0.2970583 9.8434778 0.2781229 1.5397929 1.8134447 2.6579525
#>  [8] 0.9543816 0.8148574 5.2257562
#> 
#> [[2]]
#>  [1]  2.5899156  0.2809901  0.6808136  0.3263158  0.6075532  2.4331013
#>  [7]  1.0643810  0.2300943  0.8836484 16.2897973
#> 
#> [[3]]
#>  [1] 2.7930686 0.1773980 0.2725314 0.4099371 0.3643719 1.8479583 2.9409804
#>  [8] 0.3786963 1.5398281 0.2859241
#> 
#> [[4]]
#>  [1] 1.11837201 0.18499720 0.14664009 0.09354527 0.46269138 0.09512952
#>  [7] 0.06068681 0.22607309 0.24991861 3.02549221
#> 
#> [[5]]
#>  [1]  1.32618446  0.13947897  0.09600442  0.16431278  0.23358113  0.08237379
#>  [7]  0.23799920  0.40156839  0.30964933 16.81294142
#> 

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