Documentation of 'umontreal.iro.lecuyer.probdist.ErlangDist' Java class
ErlangDist
umontreal.iro.lecuyer.probdist

Class ErlangDist

  • All Implemented Interfaces:
    Distribution


    public class ErlangDist
    extends GammaDist
    Extends the class GammaDist for the special case of the Erlang distribution with shape parameter k > 0 and scale parameter λ > 0. This distribution is a special case of the gamma distribution for which the shape parameter k = α is an integer.
    • Constructor Summary

      Constructors 
      Constructor and Description
      ErlangDist(int k)
      Constructs a ErlangDist object with parameters k = k and λ = 1.
      ErlangDist(int k, double lambda)
      Constructs a ErlangDist object with parameters k = k and λ = lambda.
    • Method Summary

      All Methods Static Methods Instance Methods Concrete Methods 
      Modifier and Type Method and Description
      static double barF(int k, double lambda, int d, double x)
      Computes the complementary distribution function.
      static double cdf(int k, double lambda, int d, double x)
      Computes the distribution function using the gamma distribution function.
      static double density(int k, double lambda, double x)
      Computes the density function.
      static ErlangDist getInstanceFromMLE(double[] x, int n)
      Creates a new instance of an Erlang distribution with parameters k and λ estimated using the maximum likelihood method based on the n observations x[i], i = 0, 1,…, n - 1.
      int getK()
      Returns the parameter k for this object.
      static double getMean(int k, double lambda)
      Computes and returns the mean, E[X] = k/λ, of the Erlang distribution with parameters k and λ.
      static double[] getMLE(double[] x, int n)
      Estimates the parameters (k, λ) of the Erlang distribution using the maximum likelihood method, from the n observations x[i], i = 0, 1,…, n - 1.
      double[] getParams()
      Return a table containing parameters of the current distribution.
      static double getStandardDeviation(int k, double lambda)
      Computes and returns the standard deviation of the Erlang distribution with parameters k and λ.
      static double getVariance(int k, double lambda)
      Computes and returns the variance, Var[X] = k/λ2, of the Erlang distribution with parameters k and λ.
      static double inverseF(int k, double lambda, int d, double u)
      Returns the inverse distribution function.
      void setParams(int k, double lambda, int d)
      Sets the parameters k and λ of the distribution for this object.
      java.lang.String toString() 
      • Methods inherited from class java.lang.Object

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

      • ErlangDist

        public ErlangDist(int k)
        Constructs a ErlangDist object with parameters k = k and λ = 1.
      • ErlangDist

        public ErlangDist(int k,
                          double lambda)
        Constructs a ErlangDist object with parameters k = k and λ = lambda.
    • Method Detail

      • density

        public static double density(int k,
                                     double lambda,
                                     double x)
        Computes the density function.
      • cdf

        public static double cdf(int k,
                                 double lambda,
                                 int d,
                                 double x)
        Computes the distribution function using the gamma distribution function.
      • barF

        public static double barF(int k,
                                  double lambda,
                                  int d,
                                  double x)
        Computes the complementary distribution function.
      • inverseF

        public static double inverseF(int k,
                                      double lambda,
                                      int d,
                                      double u)
        Returns the inverse distribution function.
      • getMLE

        public static double[] getMLE(double[] x,
                                      int n)
        Estimates the parameters (k, λ) of the Erlang distribution using the maximum likelihood method, from the n observations x[i], i = 0, 1,…, n - 1. The estimates are returned in a two-element array, in regular order: [k, λ].
        Parameters:
        x - the list of observations used to evaluate parameters
        n - the number of observations used to evaluate parameters
        Returns:
        returns the parameters [hat(k), hat(λ)]
      • getInstanceFromMLE

        public static ErlangDist getInstanceFromMLE(double[] x,
                                                    int n)
        Creates a new instance of an Erlang distribution with parameters k and λ estimated using the maximum likelihood method based on the n observations x[i], i = 0, 1,…, n - 1.
        Parameters:
        x - the list of observations to use to evaluate parameters
        n - the number of observations to use to evaluate parameters
      • getMean

        public static double getMean(int k,
                                     double lambda)
        Computes and returns the mean, E[X] = k/λ, of the Erlang distribution with parameters k and λ.
        Returns:
        the mean of the Erlang distribution E[X] = k/λ
      • getVariance

        public static double getVariance(int k,
                                         double lambda)
        Computes and returns the variance, Var[X] = k/λ2, of the Erlang distribution with parameters k and λ.
        Returns:
        the variance of the Erlang distribution Var[X] = k/λ2
      • getStandardDeviation

        public static double getStandardDeviation(int k,
                                                  double lambda)
        Computes and returns the standard deviation of the Erlang distribution with parameters k and λ.
        Returns:
        the standard deviation of the Erlang distribution
      • getK

        public int getK()
        Returns the parameter k for this object.
      • setParams

        public void setParams(int k,
                              double lambda,
                              int d)
        Sets the parameters k and λ of the distribution for this object. Non-static methods are computed with a rough target of d decimal digits of precision.
      • getParams

        public double[] getParams()
        Return a table containing parameters of the current distribution. This table is put in regular order: [k, λ].
        Specified by:
        getParams in interface Distribution
        Overrides:
        getParams in class GammaDist
      • toString

        public java.lang.String toString()
        Overrides:
        toString in class GammaDist

DMelt 3.0 © DataMelt by jWork.ORG

You see the box below because you did not login.