Class Defective

All Implemented Interfaces:
Serializable, Copyable

public class Defective extends ContinuousDistribution implements Serializable
A defective law: infinite with probability pInf, otherwise distributed as an inner continuous law G, so F(t) = (1-pInf) G(t) tends to 1-pInf < 1.

In reliability it models a unit that never fails with probability pInf. The mean is Inf whenever pInf > 0, so every solver refuses it as a service or interarrival time. L(0) = 1-pInf, the total finite mass. See K. S. Trivedi, A. Bobbio, "Reliability and Availability Engineering", Cambridge Univ. Press, 2017, Sec. 3.2.11.

See Also:
  • Constructor Details

    • Defective

      public Defective(Distribution dist, double pInf)
      Parameters:
      dist - continuous law on [0,Inf) used with probability 1-pInf
      pInf - probability of the mass at infinity, in [0,1)
  • Method Details

    • getInner

      public Distribution getInner()
    • getPInf

      public double getPInf()
    • 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
    • getConditionalMean

      public double getConditionalMean()
      E[X | X < Inf], the mean of the inner law.
    • 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
    • evalLST

      public double evalLST(double s)
      E[exp(-sX)] with exp(-s*Inf) = 0, so L(0) = 1-pInf.
      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 {pInf} followed by the inner law's process cells.
      Specified by:
      getProcess in class ContinuousDistribution
      Returns:
      MatrixCell with distribution-specific parameters