Class ExponentialPD

All Implemented Interfaces:
ClosedFormMaximumLikelihoodInterface, com.imsl.stat.distributions.MethodOfMomentsInterface, PDFGradientInterface, PDFHessianInterface, Serializable, Cloneable

public class ExponentialPD extends ProbabilityDistribution implements Serializable, Cloneable, PDFHessianInterface, ClosedFormMaximumLikelihoodInterface, com.imsl.stat.distributions.MethodOfMomentsInterface
The exponential probability distribution.
See Also:
  • Constructor Details

    • ExponentialPD

      public ExponentialPD()
      Constructs an exponential probability distribution.
  • Method Details

    • getParameterLowerBounds

      public double[] getParameterLowerBounds()
      Returns the lower bound for the parameter.
      Specified by:
      getParameterLowerBounds in class ProbabilityDistribution
      Returns:
      a double array of length 1 containing the lower bound. b is strictly positive.
    • getParameterUpperBounds

      public double[] getParameterUpperBounds()
      Returns the upper bound for the parameter.
      Specified by:
      getParameterUpperBounds in class ProbabilityDistribution
      Returns:
      a double array of length 1 containing the upper bound. b is strictly positive.
    • pdf

      public double pdf(double x, double... params)
      Returns the value of the exponential probability density function.

      The probability density function of the exponential distribution is $$f(x|b)=\Gamma\left(x|1,b\right)=\frac{1}{b}e^{-\frac{x}{b}}$$ where b is a scale parameter.

      Specified by:
      pdf in class ProbabilityDistribution
      Parameters:
      x - a double, the value (quantile) at which to evaluate the pdf. x must be non negative.
      params - a double, the scale parameter.
      Returns:
      a double, the probability density at x given the parameter value
    • getPDFGradient

      public double[] getPDFGradient(double x, double... params)
      Returns the analytic gradient of the pdf.
      Specified by:
      getPDFGradient in interface PDFGradientInterface
      Parameters:
      x - a double, the value at which to evaluate the gradient. x must be non-negative.
      params - a double array containing values of the parameter
      Returns:
      a double array containing the first partial derivative of the pdf with respect to the parameter
    • getPDFHessian

      public double[][] getPDFHessian(double x, double... params)
      Returns the analytic Hessian of the pdf.
      Specified by:
      getPDFHessian in interface PDFHessianInterface
      Parameters:
      x - a double, the value at which to evaluate the Hessian. x must be non-negative.
      params - a double array containing value of the parameter
      Returns:
      a double matrix containing the second partial derivatives of the pdf with respect to the parameter
    • getClosedFormMLE

      public double[] getClosedFormMLE(double[] x)
      Returns the closed form maximum likelihood estimates.
      Specified by:
      getClosedFormMLE in interface ClosedFormMaximumLikelihoodInterface
      Parameters:
      x - a double array containing the data
      Returns:
      a double array containing maximum likelihood estimates
    • getClosedFormMlStandardError

      public double[] getClosedFormMlStandardError(double[] x)
      Returns the standard error based on the closed form maximum likelihood estimates.
      Specified by:
      getClosedFormMlStandardError in interface ClosedFormMaximumLikelihoodInterface
      Parameters:
      x - a double array containing the data
      Returns:
      a double array containing the standard errors