Package com.imsl.stat.distributions
Class InverseGaussianPD
java.lang.Object
com.imsl.stat.distributions.ProbabilityDistribution
com.imsl.stat.distributions.InverseGaussianPD
- All Implemented Interfaces:
ClosedFormMaximumLikelihoodInterface,PDFGradientInterface,PDFHessianInterface,Serializable,Cloneable
public class InverseGaussianPD
extends ProbabilityDistribution
implements PDFHessianInterface, ClosedFormMaximumLikelihoodInterface, Serializable, Cloneable
The inverse Gaussian (Wald) probability distribution.
- See Also:
-
Constructor Summary
ConstructorsConstructorDescriptionConstructor for the inverse Gaussian probability distribution. -
Method Summary
Modifier and TypeMethodDescriptiondouble[]getClosedFormMLE(double[] x) Returns the closed form maximum likelihood estimates.double[]getClosedFormMlStandardError(double[] x) Returns the standard errors of the closed form maximum likelihood estimates.double[]Returns the lower bounds of the parameters.double[]Returns the upper bounds of the parameters.double[]getPDFGradient(double x, double... params) Returns the analytic gradient of the pdf.double[][]getPDFHessian(double x, double... params) Returns the analytic Hessian matrix of the pdf.doublepdf(double x, double... params) Returns the value of the inverse Gaussian probability density function.Methods inherited from class com.imsl.stat.distributions.ProbabilityDistribution
getNumberOfParameters, getPDFGradientApproximation, getPDFHessianApproximation, getRangeOfX, setRangeOfX
-
Constructor Details
-
InverseGaussianPD
public InverseGaussianPD()Constructor for the inverse Gaussian probability distribution.
-
-
Method Details
-
getParameterLowerBounds
public double[] getParameterLowerBounds()Returns the lower bounds of the parameters.- Specified by:
getParameterLowerBoundsin classProbabilityDistribution- Returns:
- a
doublearray containing the lower bounds for \(\mu \gt 0\) and \(\lambda \gt 0\)
-
getParameterUpperBounds
public double[] getParameterUpperBounds()Returns the upper bounds of the parameters.- Specified by:
getParameterUpperBoundsin classProbabilityDistribution- Returns:
- a
doublearray containing the upper bounds for \(\mu \gt 0\) and \(\lambda \gt 0\)
-
pdf
public double pdf(double x, double... params) Returns the value of the inverse Gaussian probability density function.The probability density function for an inverse Gaussian distribution is given by $$f(x; \mu,\lambda) = \sqrt{\frac{\lambda}{2 \pi x^3}} \exp^{-\frac{\lambda (x - \mu)^2}{2 \mu^2 x}} $$ where \(\mu > 0\) and \(\lambda > 0\) are the mean and shape of the random variable.
- Specified by:
pdfin classProbabilityDistribution- Parameters:
x- adouble, a strictly positive value at which to evaluate the pdfparams- adoublearray containing values of the parameters, \(\mu\) and \(\lambda\). The parameters can also be given in the formpdf(x,a,b), wherea=\(\mu\) andb=\(\lambda\) are scalars.- Returns:
- a
double, the probability density atxgiven the parameter values
-
getPDFGradient
public double[] getPDFGradient(double x, double... params) Returns the analytic gradient of the pdf.- Specified by:
getPDFGradientin interfacePDFGradientInterface- Parameters:
x- adouble, the value at which to evaluate the gradientparams- adoublearray containing the parameters- Returns:
- a
doublearray containing the partial derivatives of the pdf with respect to the parameters
-
getPDFHessian
public double[][] getPDFHessian(double x, double... params) Returns the analytic Hessian matrix of the pdf.- Specified by:
getPDFHessianin interfacePDFHessianInterface- Parameters:
x- adouble, the value at which to evaluate the Hessianparams- adoublearray containing the parameters- Returns:
- a
doublematrix containing the second partial derivatives of the pdf with respect to the parameters
-
getClosedFormMLE
public double[] getClosedFormMLE(double[] x) Returns the closed form maximum likelihood estimates.- Specified by:
getClosedFormMLEin interfaceClosedFormMaximumLikelihoodInterface- Parameters:
x- adoublearray containing the data- Returns:
- a
doublearray containing the maximum likelihood estimates for \(\mu\) and \(\lambda\)
-
getClosedFormMlStandardError
public double[] getClosedFormMlStandardError(double[] x) Returns the standard errors of the closed form maximum likelihood estimates.- Specified by:
getClosedFormMlStandardErrorin interfaceClosedFormMaximumLikelihoodInterface- Parameters:
x- adoublearray containing the data- Returns:
- a
doublearray containing the standard errors for the estimates of \(\mu\) and \(\lambda\)
-