Class LogisticPD

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

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

    • LogisticPD

      public LogisticPD()
      Constructor for the logistic probability distribution.
  • Method Details

    • getParameterLowerBounds

      public double[] getParameterLowerBounds()
      Returns the lower bounds of the parameters.
      Specified by:
      getParameterLowerBounds in class ProbabilityDistribution
      Returns:
      a double array of length 2 containing the lower bounds for \(\mu\in\mathbb{R}\) and \(\sigma\gt0\)
    • getParameterUpperBounds

      public double[] getParameterUpperBounds()
      Returns the upper bounds of the parameters.
      Specified by:
      getParameterUpperBounds in class ProbabilityDistribution
      Returns:
      a double array of length 2 containing the upper bounds for \(\mu\in\mathbb{R}\) and \(\sigma\gt0\)
    • pdf

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

      The probability density function of the logistic distribution is

      $$f(x,\mu,\sigma)=\frac{e^{-(x-\mu)/\sigma}} {\sigma\left (1+e^{-(x-\mu)/\sigma} \right )^{2}}$$

      where \(\mu\) is the location parameter and \(\sigma \gt 0\) is the scale parameter.

      Specified by:
      pdf in class ProbabilityDistribution
      Parameters:
      x - a double, the value (quantile) at which to evaluate the pdf
      params - a double array containing the location and scale parameters. The parameters can also be given in the form pdf(x,a,b), where a=\(\mu\) and b=\(\sigma\) are scalars.
      Returns:
      a double, the value of the probability density function evaluated at x given the parameters
    • 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
      params - a double array containing the parameters
      Returns:
      a double array containing the first partial derivatives of the pdf with respect to the parameters
    • 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
      params - a double array containing the parameters
      Returns:
      a double matrix containing the second partial derivatives of the pdf with respect to the parameters
    • getMethodOfMomentsEstimates

      public double[] getMethodOfMomentsEstimates(double[] x)
      Returns the method-of-moments estimates given the sample data.
      Specified by:
      getMethodOfMomentsEstimates in interface com.imsl.stat.distributions.MethodOfMomentsInterface
      Parameters:
      x - a double array containing the data
      Returns:
      a double array containing method-of-moments estimates for \(\mu\) and \(\sigma\), the parameters of the logistic distribution