View source: R/dist_inverse_gaussian.R
| dist_inverse_gaussian | R Documentation |
dist_inverse_gaussian(mean, shape)
mean, shape |
parameters. Must be strictly positive. Infinite values are supported. |
The inverse Gaussian distribution (also known as the Wald distribution) is commonly used to model positive-valued data, particularly in contexts involving first passage times and reliability analysis.
We recommend reading this documentation on pkgdown which renders math nicely. https://pkg.mitchelloharawild.com/distributional/reference/dist_inverse_gaussian.html
In the following, let X be an Inverse Gaussian random variable with
parameters mean = \mu and shape = \lambda.
Support: (0, \infty)
Mean: \mu
Variance: \frac{\mu^3}{\lambda}
Probability density function (p.d.f):
f(x) = \sqrt{\frac{\lambda}{2\pi x^3}}
\exp\left(-\frac{\lambda(x - \mu)^2}{2\mu^2 x}\right)
Cumulative distribution function (c.d.f):
F(x) = \Phi\left(\sqrt{\frac{\lambda}{x}}
\left(\frac{x}{\mu} - 1\right)\right) +
\exp\left(\frac{2\lambda}{\mu}\right)
\Phi\left(-\sqrt{\frac{\lambda}{x}}
\left(\frac{x}{\mu} + 1\right)\right)
where \Phi is the standard normal c.d.f.
Moment generating function (m.g.f):
E(e^{tX}) = \exp\left(\frac{\lambda}{\mu}
\left(1 - \sqrt{1 - \frac{2\mu^2 t}{\lambda}}\right)\right)
for t < \frac{\lambda}{2\mu^2}.
Skewness: 3\sqrt{\frac{\mu}{\lambda}}
Excess Kurtosis: \frac{15\mu}{\lambda}
Quantiles: No closed-form expression, approximated numerically.
actuar::InverseGaussian
dist <- dist_inverse_gaussian(mean = c(1,1,1,3,3), shape = c(0.2, 1, 3, 0.2, 1))
dist
mean(dist)
variance(dist)
support(dist)
generate(dist, 10)
density(dist, 2)
density(dist, 2, log = TRUE)
cdf(dist, 4)
quantile(dist, 0.7)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.