Package com.imsl.stat.distributions
Class BetaPD
java.lang.Object
com.imsl.stat.distributions.ProbabilityDistribution
com.imsl.stat.distributions.BetaPD
- All Implemented Interfaces:
Serializable,Cloneable
The beta 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 beta probability density function.Methods inherited from class com.imsl.stat.distributions.ProbabilityDistribution
getNumberOfParameters, getPDFGradientApproximation, getPDFHessianApproximation, getRangeOfX, setRangeOfX
-
Constructor Details
-
BetaPD
public BetaPD()Constructor for the beta probability distribution.
-
-
Method Details
-
pdf
public double pdf(double x, double... params) Returns the value of the beta probability density function.The probability density function of the beta distribution is $$ f(x; a, b) = x^{a - 1} (1 - x)^{b - 1} \frac{1}{{B(a,b) }} $$ where a>0 and b>0 are shape parameters and the beta function is $$ B(a,b) = \frac{\Gamma(a,b)}{\Gamma(a)\Gamma(b)} $$
- Specified by:
pdfin classProbabilityDistribution- Parameters:
x- adoublevalue in the range ofXparams- adoublearray containing the parameters,aandb. The parameters can also be given in the formpdf(x,a,b), whereaandbare scalars.Note: The argument
paramsis a variable length argument list (varargs).- Returns:
- a
doublevalue equal to 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
-
getParameterUpperBounds
public double[] getParameterUpperBounds()Returns the upper bounds of the parameters.- Specified by:
getParameterUpperBoundsin classProbabilityDistribution- Returns:
- a
doublearray containing the upper bounds
-