Class BetaPD

All Implemented Interfaces:
Serializable, Cloneable

public class BetaPD extends ProbabilityDistribution implements Serializable, Cloneable
The beta probability distribution.
See Also:
  • 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:
      pdf in class ProbabilityDistribution
      Parameters:
      x - a double value in the range of X
      params - a double array containing the parameters, a and b. The parameters can also be given in the form pdf(x,a,b), where a and b are scalars.

      Note: The argument params is a variable length argument list (varargs).

      Returns:
      a double value equal to the probability density at x given the parameter values
    • getParameterLowerBounds

      public double[] getParameterLowerBounds()
      Returns the lower bounds of the parameters.
      Specified by:
      getParameterLowerBounds in class ProbabilityDistribution
      Returns:
      a double array containing the lower bounds
    • getParameterUpperBounds

      public double[] getParameterUpperBounds()
      Returns the upper bounds of the parameters.
      Specified by:
      getParameterUpperBounds in class ProbabilityDistribution
      Returns:
      a double array containing the upper bounds