Documentation of 'smile.stat.distribution.WeibullDistribution' Java class
WeibullDistribution
smile.stat.distribution

Class WeibullDistribution

  • All Implemented Interfaces:
    Distribution


    public class WeibullDistribution
    extends AbstractDistribution
    The Weibull distribution is one of the most widely used lifetime distributions in reliability engineering. It is a versatile distribution that can take on the characteristics of other types of distributions, based on the value of the shape parameter. The distribution has two parameters: k > 0 is the shape parameter and λ > 0 is the scale parameter of the distribution. The probability density function is f(x;λ,k) = k/λ (x/λ)k-1e-(x/λ)k for x ≥ 0.

    The Weibull distribution is often used in the field of life data analysis due to its flexibility - it can mimic the behavior of other statistical distributions such as the normal and the exponential. If the failure rate decreases over time, then k < 1. If the failure rate is constant over time, then k = 1. If the failure rate increases over time, then k > 1.

    An understanding of the failure rate may provide insight as to what is causing the failures:

    • A decreasing failure rate would suggest "infant mortality". That is, defective items fail early and the failure rate decreases over time as they fall out of the population.
    • A constant failure rate suggests that items are failing from random events.
    • An increasing failure rate suggests "wear out" - parts are more likely to fail as time goes on.
    Under certain parameterizations, the Weibull distribution reduces to several other familiar distributions:
    • When k = 1, it is the exponential distribution.
    • When k = 2, it becomes equivalent to the Rayleigh distribution, which models the modulus of a two-dimensional uncorrelated bivariate normal vector.
    • When k = 3.4, it appears similar to the normal distribution.
    • As k goes to infinity, the Weibull distribution asymptotically approaches the Dirac delta function.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method and Description
      double cdf(double x)
      Cumulative distribution function.
      double entropy()
      Shannon entropy of the distribution.
      double logp(double x)
      The density at x in log scale, which may prevents the underflow problem.
      double mean()
      The mean of distribution.
      int npara()
      The number of parameters of the distribution.
      double p(double x)
      The probability density function for continuous distribution or probability mass function for discrete distribution at x.
      double quantile(double p)
      The quantile, the probability to the left of quantile is p.
      double rand()
      Generates a random number following this distribution.
      double sd()
      The standard deviation of distribution.
      java.lang.String toString() 
      double var()
      The variance of distribution.
      • Methods inherited from class java.lang.Object

        equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
    • Constructor Detail

      • WeibullDistribution

        public WeibullDistribution(double shape)
        Constructor. The default scale parameter is 1.0.
        Parameters:
        shape - the shape parameter.
      • WeibullDistribution

        public WeibullDistribution(double shape,
                                   double scale)
        Constructor.
        Parameters:
        shape - the shape parameter.
        scale - the scale parameter.
    • Method Detail

      • npara

        public int npara()
        Description copied from interface: Distribution
        The number of parameters of the distribution.
      • mean

        public double mean()
        Description copied from interface: Distribution
        The mean of distribution.
      • var

        public double var()
        Description copied from interface: Distribution
        The variance of distribution.
      • sd

        public double sd()
        Description copied from interface: Distribution
        The standard deviation of distribution.
      • entropy

        public double entropy()
        Description copied from interface: Distribution
        Shannon entropy of the distribution.
      • toString

        public java.lang.String toString()
        Overrides:
        toString in class java.lang.Object
      • rand

        public double rand()
        Description copied from interface: Distribution
        Generates a random number following this distribution.
      • p

        public double p(double x)
        Description copied from interface: Distribution
        The probability density function for continuous distribution or probability mass function for discrete distribution at x.
      • logp

        public double logp(double x)
        Description copied from interface: Distribution
        The density at x in log scale, which may prevents the underflow problem.
      • cdf

        public double cdf(double x)
        Description copied from interface: Distribution
        Cumulative distribution function. That is the probability to the left of x.
      • quantile

        public double quantile(double p)
        Description copied from interface: Distribution
        The quantile, the probability to the left of quantile is p. It is actually the inverse of cdf.

DataMelt 3.0 © DataMelt by jWork.ORG

You see the box below because you did not login.