Package com.imsl.stat.distributions
Class GammaPD
java.lang.Object
com.imsl.stat.distributions.ProbabilityDistribution
com.imsl.stat.distributions.GammaPD
- All Implemented Interfaces:
Serializable,Cloneable
The gamma probability distribution.
- See Also:
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptiondouble[]Returns the lower bounds of the parameters.double[]Returns the upper bounds of the parameters.doublepdf(double x, double... params) Returns the value of the gamma probability density function.Methods inherited from class com.imsl.stat.distributions.ProbabilityDistribution
getNumberOfParameters, getPDFGradientApproximation, getPDFHessianApproximation, getRangeOfX, setRangeOfX
-
Constructor Details
-
GammaPD
public GammaPD()Constructor for the gamma probability distribution.
-
-
Method Details
-
pdf
public double pdf(double x, double... params) Returns the value of the gamma probability density function.The probability density function of the gamma distribution is
$$ f(x; a, b) = x^{a - 1} \frac{1}{{b^{a} \Gamma (a)}} e^{ - {x}/{b}} $$
where \( a > 0\) and \( b> 0\) are the shape and scale parameters, respectively.- Specified by:
pdfin classProbabilityDistribution- Parameters:
x- adouble, the value (quantile) at which to evaluate the pdfparams- adoublearray specifying the parameters,aandb. The parameters can also be given in the formpdf(x,a,b), whereaandbare scalars.- Returns:
- a
double, the probability density atxgiven the parameter values
-
getParameterLowerBounds
public double[] getParameterLowerBounds()Returns the lower bounds of the parameters.- Specified by:
getParameterLowerBoundsin classProbabilityDistribution- Returns:
- a
doublearray containing the lower bounds for \( a > 0\) and \( b> 0\)
-
getParameterUpperBounds
public double[] getParameterUpperBounds()Returns the upper bounds of the parameters.- Specified by:
getParameterUpperBoundsin classProbabilityDistribution- Returns:
- a
doublearray containing the upper bounds for \( a > 0\) and \( b> 0\)
-