Skip to contents

Functions to compute the probability density function, cumulative distribution function, and quantile function for the Inverse Gaussian distribution.

Usage

inverse_gaussian_pdf(x, mu, lambda)

inverse_gaussian_lpdf(x, mu, lambda)

inverse_gaussian_cdf(x, mu, lambda)

inverse_gaussian_lcdf(x, mu, lambda)

inverse_gaussian_quantile(p, mu, lambda)

Arguments

x

quantile

mu

mean parameter (mu > 0)

lambda

scale (precision) parameter (lambda > 0)

p

probability (0 <= p <= 1)

Value

A single numeric value with the computed probability density, log-probability density, cumulative distribution, log-cumulative distribution, or quantile depending on the function called.

See also

Boost Documentation for more details on the mathematical background.

Examples

# Inverse Gaussian distribution with mu = 3, lambda = 4
inverse_gaussian_pdf(2, 3, 4)
#> [1] 0.2524295
inverse_gaussian_lpdf(2, 3, 4)
#> [1] -1.376623
inverse_gaussian_cdf(2, 3, 4)
#> [1] 0.4512408
inverse_gaussian_lcdf(2, 3, 4)
#> [1] -0.7957542
inverse_gaussian_quantile(0.5, 3, 4)
#> [1] 2.202698