de.lmu.ifi.dbs.elki.math.statistics.distribution

## Class InverseGaussianDistribution

• All Implemented Interfaces:
Distribution

@Alias(value={"invgauss","wald","de.lmu.ifi.dbs.elki.math.statistics.distribution.WaldDistribution"})
public class InverseGaussianDistribution
extends AbstractDistribution
Inverse Gaussian distribution aka Wald distribution. Beware that SciPy uses a different location parameter. InverseGaussian(a, x) ~ scipy.stats.invgauss(a/x, x) Our parameter scheme is in line with common literature. SciPy naming scheme has comparable notion of location and scale across distributions. So both have their benefits.
Since:
0.6.0
Author:
Erich Schubert
• ### Nested Class Summary

Nested Classes
Modifier and Type Class and Description
static class  InverseGaussianDistribution.Parameterizer
Parameterization class
• ### Field Summary

Fields
Modifier and Type Field and Description
private double mean
Location value
private double shape
Shape parameter
• ### Fields inherited from class de.lmu.ifi.dbs.elki.math.statistics.distribution.AbstractDistribution

random
• ### Constructor Summary

Constructors
Constructor and Description
InverseGaussianDistribution(double mean, double shape)
Constructor for Gaussian distribution
InverseGaussianDistribution(double mean, double shape, java.util.Random random)
Constructor for wald distribution
InverseGaussianDistribution(double mean, double shape, RandomFactory random)
Constructor for wald distribution
• ### Method Summary

All Methods
Modifier and Type Method and Description
double cdf(double val)
Return the cumulative density function at the given value.
static double cdf(double x, double mu, double shape)
Cumulative probability density function (CDF) of a Wald distribution.
double getMean()
Mean parameter.
double getShape()
Shape parameter.
double logpdf(double val)
Return the log density of an existing value
static double logpdf(double x, double mu, double shape)
Probability density function of the Wald distribution.
double nextRandom()
Generate a new random value
double pdf(double val)
Return the density of an existing value
static double pdf(double x, double mu, double shape)
Probability density function of the Wald distribution.
double quantile(double q)
Deprecated.
NOT YET IMPLEMENTED.
static double quantile(double x, double mu, double shape)
Deprecated.
NOT YET IMPLEMENTED.
java.lang.String toString()
Describe the distribution
• ### Methods inherited from class java.lang.Object

clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
• ### Field Detail

• #### mean

private double mean
Location value
• #### shape

private double shape
Shape parameter
• ### Constructor Detail

• #### InverseGaussianDistribution

public InverseGaussianDistribution(double mean,
double shape,
java.util.Random random)
Constructor for wald distribution
Parameters:
mean - Mean
shape - Shape parameter
random - Random generator
• #### InverseGaussianDistribution

public InverseGaussianDistribution(double mean,
double shape,
RandomFactory random)
Constructor for wald distribution
Parameters:
mean - Mean
shape - Shape parameter
random - Random generator
• #### InverseGaussianDistribution

public InverseGaussianDistribution(double mean,
double shape)
Constructor for Gaussian distribution
Parameters:
mean - Mean
shape - Shape parameter
• ### Method Detail

• #### getMean

public double getMean()
Mean parameter.
Returns:
Mean
• #### getShape

public double getShape()
Shape parameter.
Returns:
Shape
• #### pdf

public double pdf(double val)
Description copied from interface: Distribution
Return the density of an existing value
Parameters:
val - existing value
Returns:
distribution density
• #### logpdf

public double logpdf(double val)
Description copied from interface: Distribution
Return the log density of an existing value
Parameters:
val - existing value
Returns:
log distribution density
• #### cdf

public double cdf(double val)
Description copied from interface: Distribution
Return the cumulative density function at the given value.
Parameters:
val - existing value
Returns:
cumulative density
• #### quantile

@Deprecated
public double quantile(double q)
Deprecated. NOT YET IMPLEMENTED.
Description copied from interface: Distribution
Quantile aka probit (for normal) aka inverse CDF (invcdf, cdf^-1) function.
Parameters:
q - Quantile to find
Returns:
Quantile position
• #### nextRandom

public double nextRandom()
Description copied from interface: Distribution
Generate a new random value
Specified by:
nextRandom in interface Distribution
Overrides:
nextRandom in class AbstractDistribution
Returns:
new random value
• #### toString

public java.lang.String toString()
Description copied from interface: Distribution
Describe the distribution
Specified by:
toString in interface Distribution
Overrides:
toString in class java.lang.Object
Returns:
description
• #### pdf

public static double pdf(double x,
double mu,
double shape)
Probability density function of the Wald distribution.
Parameters:
x - The value.
mu - The mean.
shape - Shape parameter
Returns:
PDF of the given Wald distribution at x.
• #### logpdf

public static double logpdf(double x,
double mu,
double shape)
Probability density function of the Wald distribution.
Parameters:
x - The value.
mu - The mean.
shape - Shape parameter
Returns:
log PDF of the given Wald distribution at x.
• #### cdf

public static double cdf(double x,
double mu,
double shape)
Cumulative probability density function (CDF) of a Wald distribution.
Parameters:
x - value to evaluate CDF at
mu - Mean value
shape - Shape parameter
Returns:
The CDF of the given Wald distribution at x.
• #### quantile

@Deprecated
public static double quantile(double x,
double mu,
double shape)
Deprecated. NOT YET IMPLEMENTED.
Inverse cumulative probability density function (probit) of a Wald distribution.
Parameters:
x - value to evaluate probit function at
mu - Mean value
shape - Shape parameter
Returns:
The probit of the given Wald distribution at x.