Class LogLogistic

All Implemented Interfaces:
Serializable, Copyable

public class LogLogistic extends ContinuousDistribution implements Serializable
Log-logistic (Fisk) distribution with scale alpha (the median) and shape beta, F(t) = 1 / (1 + (t/alpha)^(-beta)) for t >= 0.

Its hazard rate is decreasing for beta <= 1 and unimodal for beta > 1, a shape the Weibull and Gamma families cannot produce. Moment k exists only for k < beta, E[X^k] = alpha^k b/sin(b) with b = k*pi/beta, and the SCV is tan(b)/b - 1 with b = pi/beta. See K. S. Trivedi, A. Bobbio, "Reliability and Availability Engineering", Cambridge Univ. Press, 2017, Sec. 3.2.7.

See Also:
  • Constructor Details

    • LogLogistic

      public LogLogistic(double shape, double scale)
      Parameters:
      shape - shape beta > 0
      scale - scale alpha > 0, the median
  • Method Details

    • fitMeanAndSCV

      public static LogLogistic fitMeanAndSCV(double mean, double scv)
      Fit shape and scale to a mean and an SCV. The SCV tan(b)/b - 1, b = pi/beta, rises monotonically from 0 to Inf on b in (0, pi/2), so the shape follows from a bracketed root search and the scale from the mean, alpha = MEAN*sin(b)/b.
    • getScale

      public double getScale()
    • getShape

      public double getShape()
    • getMoment

      public double getMoment(int k)
      Raw moment E[X^k], Inf when k >= beta.
    • getMean

      public double getMean()
      Description copied from class: Distribution
      Gets the mean (expected value) of this distribution.
      Specified by:
      getMean in class Distribution
      Returns:
      the mean value
    • getRate

      public double getRate()
      Description copied from class: Distribution
      Gets the rate of this distribution (inverse of mean).
      Overrides:
      getRate in class Distribution
      Returns:
      the rate value (1/mean)
    • getSCV

      public double getSCV()
      Description copied from class: Distribution
      Gets the squared coefficient of variation (SCV) of this distribution. SCV = Var(X) / E[X]^2.
      Specified by:
      getSCV in class Distribution
      Returns:
      the squared coefficient of variation
    • getVar

      public double getVar()
      Description copied from class: Distribution
      Gets the variance of this distribution. Computed as SCV * mean^2.
      Overrides:
      getVar in class Distribution
      Returns:
      the variance
    • getSkewness

      public double getSkewness()
      Description copied from class: Distribution
      Gets the skewness of this distribution. Skewness measures the asymmetry of the probability distribution.
      Specified by:
      getSkewness in class Distribution
      Returns:
      the skewness value
    • evalCDF

      public double evalCDF(double t)
      Description copied from class: Distribution
      Evaluates the cumulative distribution function (CDF) at the given point.
      Specified by:
      evalCDF in class Distribution
      Parameters:
      t - the point at which to evaluate the CDF
      Returns:
      the CDF value at point t
    • evalPDF

      public double evalPDF(double t)
    • evalInvCDF

      public double evalInvCDF(double u)
      Quantile alpha*(u/(1-u))^(1/beta).
    • evalLST

      public double evalLST(double s)
      E[exp(-sX)] = int_0^1 exp(-s Q(u)) du with the quantile Q: the integrand is bounded by one and needs no truncation of the power-law tail. Composite Gauss-Legendre on a grid graded toward u = 0, where Q varies fastest for small beta.
      Specified by:
      evalLST in class ContinuousDistribution
      Parameters:
      s - the Laplace domain variable
      Returns:
      the LST value at s
    • sample

      public double[] sample(int n, Random random)
      Description copied from class: Distribution
      Generates random samples from this distribution using the specified random generator.
      Specified by:
      sample in class Distribution
      Parameters:
      n - the number of samples to generate
      random - the random number generator to use
      Returns:
      array of random samples
    • sample

      public double[] sample(int n)
      Description copied from class: Distribution
      Generates random samples from this distribution using default random generator.
      Overrides:
      sample in class Distribution
      Parameters:
      n - the number of samples to generate
      Returns:
      array of random samples
    • getProcess

      public MatrixCell getProcess()
      Raw parameters {shape (beta), scale (alpha)}, the order of Weibull.getProcess.
      Specified by:
      getProcess in class ContinuousDistribution
      Returns:
      MatrixCell with distribution-specific parameters