SSJ API Documentation
Stochastic Simulation in Java
Loading...
Searching...
No Matches
umontreal.ssj.probdist.WeibullDist Class Reference

This class extends the class ContinuousDistribution for the Weibull distribution [95]  (page 628) with shape parameter \(\alpha> 0\), location parameter \(\delta\), and scale parameter \(\lambda> 0\). More...

Inheritance diagram for umontreal.ssj.probdist.WeibullDist:
umontreal.ssj.probdist.ContinuousDistribution umontreal.ssj.probdist.Distribution

Public Member Functions

 WeibullDist (double alpha)
 Constructs a WeibullDist object with parameters \(\alpha\) = alpha, \(\lambda\) = 1, and \(\delta\) = 0.
 WeibullDist (double alpha, double lambda, double delta)
 Constructs a WeibullDist object with parameters \(\alpha=\) alpha, \(\lambda\) = lambda, and \(\delta\) = delta.
double density (double x)
 Returns \(f(x)\), the density evaluated at \(x\).
double cdf (double x)
 Returns the distribution function \(F(x)\).
double barF (double x)
 Returns the complementary distribution function.
double inverseF (double u)
 Returns the inverse distribution function \(x = F^{-1}(u)\).
double getMean ()
 Returns the mean.
double getVariance ()
 Returns the variance.
double getStandardDeviation ()
 Returns the standard deviation.
double getAlpha ()
 Returns the parameter \(\alpha\).
double getLambda ()
 Returns the parameter \(\lambda\).
double getDelta ()
 Returns the parameter \(\delta\).
void setParams (double alpha, double lambda, double delta)
 Sets the parameters \(\alpha\), \(\lambda\) and \(\delta\) for this object.
double[] getParams ()
 Return a table containing the parameters of the current distribution.
String toString ()
 Returns a String containing information about the current distribution.
Public Member Functions inherited from umontreal.ssj.probdist.ContinuousDistribution
double inverseBrent (double a, double b, double u, double tol)
 Computes the inverse distribution function \(x = F^{-1}(u)\), using the Brent-Dekker method.
double inverseBisection (double u)
 Computes and returns the inverse distribution function \(x = F^{-1}(u)\), using bisection.
double getXinf ()
 Returns \(x_a\) such that the probability density is 0 everywhere outside the interval \([x_a, x_b]\).
double getXsup ()
 Returns \(x_b\) such that the probability density is 0 everywhere outside the interval \([x_a, x_b]\).
void setXinf (double xa)
 Sets the value \(x_a=\) xa, such that the probability density is 0 everywhere outside the interval \([x_a, x_b]\).
void setXsup (double xb)
 Sets the value \(x_b=\) xb, such that the probability density is 0 everywhere outside the interval \([x_a, x_b]\).

Static Public Member Functions

static double density (double alpha, double lambda, double delta, double x)
 Computes the density function.
static double density (double alpha, double x)
 Same as density (alpha, 1, 0, x).
static double cdf (double alpha, double lambda, double delta, double x)
 Computes the distribution function.
static double cdf (double alpha, double x)
 Same as cdf (alpha, 1, 0, x).
static double barF (double alpha, double lambda, double delta, double x)
 Computes the complementary distribution function.
static double barF (double alpha, double x)
 Same as barF (alpha, 1, 0, x).
static double inverseF (double alpha, double lambda, double delta, double u)
 Computes the inverse of the distribution function.
static double inverseF (double alpha, double x)
 Same as inverseF (alpha, 1, 0, x).
static double[] getMLE (double[] x, int n)
 Estimates the parameters \((\alpha, \lambda)\) of the Weibull distribution, assuming that \(\delta= 0\), using the maximum likelihood method, from the \(n\) observations \(x[i]\), \(i = 0, 1, …, n-1\).
static WeibullDist getInstanceFromMLE (double[] x, int n)
 Creates a new instance of a Weibull distribution with parameters.
static double getMean (double alpha, double lambda, double delta)
 Computes and returns the mean \(E[X] = \delta+ \Gamma(1 + 1/\alpha)/\lambda\) of the Weibull distribution with parameters \(\alpha\),.
static double getVariance (double alpha, double lambda, double delta)
 Computes and returns the variance.
static double getStandardDeviation (double alpha, double lambda, double delta)
 Computes and returns the standard deviation of the Weibull distribution with parameters \(\alpha\), \(\lambda\) and.

Detailed Description

This class extends the class ContinuousDistribution for the Weibull distribution [95]  (page 628) with shape parameter \(\alpha> 0\), location parameter \(\delta\), and scale parameter \(\lambda> 0\).

The density function is

\[ f(x) = \alpha\lambda^{\alpha}(x-\delta)^{\alpha-1} e^{-(\lambda(x-\delta))^{\alpha}} \qquad\mbox{for }x>\delta, \tag{fweibull} \]

the distribution function is

\[ F(x) = 1 - e^{-(\lambda(x - \delta))^{\alpha}} \qquad\mbox{for }x>\delta, \tag{Fweibull} \]

and the inverse distribution function is

\[ F^{-1}(u) = (-\ln(1-u))^{1/\alpha}/\lambda+ \delta\qquad\mbox{for } 0 \le u < 1. \]

Definition at line 49 of file WeibullDist.java.

Constructor & Destructor Documentation

◆ WeibullDist() [1/2]

umontreal.ssj.probdist.WeibullDist.WeibullDist ( double alpha)

Constructs a WeibullDist object with parameters \(\alpha\) = alpha, \(\lambda\) = 1, and \(\delta\) = 0.

Definition at line 97 of file WeibullDist.java.

◆ WeibullDist() [2/2]

umontreal.ssj.probdist.WeibullDist.WeibullDist ( double alpha,
double lambda,
double delta )

Constructs a WeibullDist object with parameters \(\alpha=\) alpha, \(\lambda\) = lambda, and \(\delta\) = delta.

Definition at line 105 of file WeibullDist.java.

Member Function Documentation

◆ barF() [1/3]

double umontreal.ssj.probdist.WeibullDist.barF ( double alpha,
double lambda,
double delta,
double x )
static

Computes the complementary distribution function.

Definition at line 191 of file WeibullDist.java.

◆ barF() [2/3]

double umontreal.ssj.probdist.WeibullDist.barF ( double alpha,
double x )
static

Same as barF (alpha, 1, 0, x).

Definition at line 211 of file WeibullDist.java.

◆ barF() [3/3]

double umontreal.ssj.probdist.WeibullDist.barF ( double x)

Returns the complementary distribution function.

The default implementation computes \(\bar{F}(x) = 1 - F(x)\).

Parameters
xvalue at which the complementary distribution function is evaluated
Returns
complementary distribution function evaluated at x

Reimplemented from umontreal.ssj.probdist.ContinuousDistribution.

Definition at line 117 of file WeibullDist.java.

◆ cdf() [1/3]

double umontreal.ssj.probdist.WeibullDist.cdf ( double alpha,
double lambda,
double delta,
double x )
static

Computes the distribution function.

Definition at line 165 of file WeibullDist.java.

◆ cdf() [2/3]

double umontreal.ssj.probdist.WeibullDist.cdf ( double alpha,
double x )
static

Same as cdf (alpha, 1, 0, x).

Definition at line 184 of file WeibullDist.java.

◆ cdf() [3/3]

double umontreal.ssj.probdist.WeibullDist.cdf ( double x)

Returns the distribution function \(F(x)\).

Parameters
xvalue at which the distribution function is evaluated
Returns
distribution function evaluated at x

Implements umontreal.ssj.probdist.Distribution.

Definition at line 113 of file WeibullDist.java.

◆ density() [1/3]

double umontreal.ssj.probdist.WeibullDist.density ( double alpha,
double lambda,
double delta,
double x )
static

Computes the density function.

Definition at line 140 of file WeibullDist.java.

◆ density() [2/3]

double umontreal.ssj.probdist.WeibullDist.density ( double alpha,
double x )
static

Same as density (alpha, 1, 0, x).

Definition at line 158 of file WeibullDist.java.

◆ density() [3/3]

double umontreal.ssj.probdist.WeibullDist.density ( double x)

Returns \(f(x)\), the density evaluated at \(x\).

Parameters
xvalue at which the density is evaluated
Returns
density function evaluated at x

Reimplemented from umontreal.ssj.probdist.ContinuousDistribution.

Definition at line 109 of file WeibullDist.java.

◆ getAlpha()

double umontreal.ssj.probdist.WeibullDist.getAlpha ( )

Returns the parameter \(\alpha\).

Definition at line 375 of file WeibullDist.java.

◆ getDelta()

double umontreal.ssj.probdist.WeibullDist.getDelta ( )

Returns the parameter \(\delta\).

Definition at line 389 of file WeibullDist.java.

◆ getInstanceFromMLE()

WeibullDist umontreal.ssj.probdist.WeibullDist.getInstanceFromMLE ( double[] x,
int n )
static

Creates a new instance of a Weibull distribution with parameters.

\(\alpha\), \(\lambda\) and \(\delta= 0\) estimated using the maximum likelihood method based on the \(n\) observations \(x[i]\), \(i = 0, 1, …, n-1\).

Parameters
xthe list of observations to use to evaluate parameters
nthe number of observations to use to evaluate parameters

Definition at line 316 of file WeibullDist.java.

◆ getLambda()

double umontreal.ssj.probdist.WeibullDist.getLambda ( )

Returns the parameter \(\lambda\).

Definition at line 382 of file WeibullDist.java.

◆ getMean() [1/2]

double umontreal.ssj.probdist.WeibullDist.getMean ( )

Returns the mean.

Returns
the mean

Reimplemented from umontreal.ssj.probdist.ContinuousDistribution.

Definition at line 125 of file WeibullDist.java.

◆ getMean() [2/2]

double umontreal.ssj.probdist.WeibullDist.getMean ( double alpha,
double lambda,
double delta )
static

Computes and returns the mean \(E[X] = \delta+ \Gamma(1 + 1/\alpha)/\lambda\) of the Weibull distribution with parameters \(\alpha\),.

\(\lambda\) and \(\delta\).

Returns
the mean of the Weibull distribution \(E[X] = \delta+ \Gamma(1 + 1/\alpha) / \lambda\)

Definition at line 330 of file WeibullDist.java.

◆ getMLE()

double[] umontreal.ssj.probdist.WeibullDist.getMLE ( double[] x,
int n )
static

Estimates the parameters \((\alpha, \lambda)\) of the Weibull distribution, assuming that \(\delta= 0\), 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: [ \(\alpha\), \(\lambda\)]. The maximum likelihood estimators are the values \((\hat{\alpha}\), \(\hat{\lambda})\) that satisfy the equations

\begin{align*} \frac{\sum_{i=1}^n x_i^{\hat{\alpha}} \ln(x_i)}{\sum_{i=1}^n x_i^{\hat{\alpha}}} - \frac{1}{\hat{\alpha}} & = \frac{\sum_{i=1}^n \ln(x_i)}{n} \\ \hat{\lambda} & = \left( \frac{n}{\sum_{i=1}^n x_i^{\hat{\alpha}}} \right)^{1/\hat{\alpha}} \end{align*}

See [114]  (page 303).

Parameters
xthe list of observations to use to evaluate parameters
nthe number of observations to use to evaluate parameters
Returns
returns the parameter [ \(\hat{\alpha}\), \(\hat{\lambda}\), \(\hat{\delta}\) = 0]

Definition at line 303 of file WeibullDist.java.

◆ getParams()

double[] umontreal.ssj.probdist.WeibullDist.getParams ( )

Return a table containing the parameters of the current distribution.

This table is put in regular order: [ \(\alpha\), \(\lambda\), \(\delta\)].

Implements umontreal.ssj.probdist.Distribution.

Definition at line 413 of file WeibullDist.java.

◆ getStandardDeviation() [1/2]

double umontreal.ssj.probdist.WeibullDist.getStandardDeviation ( )

Returns the standard deviation.

Returns
the standard deviation

Reimplemented from umontreal.ssj.probdist.ContinuousDistribution.

Definition at line 133 of file WeibullDist.java.

◆ getStandardDeviation() [2/2]

double umontreal.ssj.probdist.WeibullDist.getStandardDeviation ( double alpha,
double lambda,
double delta )
static

Computes and returns the standard deviation of the Weibull distribution with parameters \(\alpha\), \(\lambda\) and.

\(\delta\).

Returns
the standard deviation of the Weibull distribution

Definition at line 368 of file WeibullDist.java.

◆ getVariance() [1/2]

double umontreal.ssj.probdist.WeibullDist.getVariance ( )

Returns the variance.

Returns
the variance

Reimplemented from umontreal.ssj.probdist.ContinuousDistribution.

Definition at line 129 of file WeibullDist.java.

◆ getVariance() [2/2]

double umontreal.ssj.probdist.WeibullDist.getVariance ( double alpha,
double lambda,
double delta )
static

Computes and returns the variance.

\(\mbox{Var}[X] = | \Gamma(2/\alpha+ 1) - \Gamma^2(1/\alpha+ 1) | /\lambda^2\) of the Weibull distribution with parameters \(\alpha\), \(\lambda\) and \(\delta\).

Returns
the variance of the Weibull distribution \(\mbox{Var}[X] = 1 / \lambda^2 | \Gamma(2/\alpha+ 1) - \Gamma^2(1/\alpha+ 1) |\)

Definition at line 349 of file WeibullDist.java.

◆ inverseF() [1/3]

double umontreal.ssj.probdist.WeibullDist.inverseF ( double alpha,
double lambda,
double delta,
double u )
static

Computes the inverse of the distribution function.

Definition at line 218 of file WeibullDist.java.

◆ inverseF() [2/3]

double umontreal.ssj.probdist.WeibullDist.inverseF ( double alpha,
double x )
static

Same as inverseF (alpha, 1, 0, x).

Definition at line 242 of file WeibullDist.java.

◆ inverseF() [3/3]

double umontreal.ssj.probdist.WeibullDist.inverseF ( double u)

Returns the inverse distribution function \(x = F^{-1}(u)\).

Restrictions: \(u \in[0,1]\).

Parameters
uvalue at which the inverse distribution function is evaluated
Returns
the inverse distribution function evaluated at u
Exceptions
IllegalArgumentExceptionif \(u\) is not in the interval \([0,1]\)

Reimplemented from umontreal.ssj.probdist.ContinuousDistribution.

Definition at line 121 of file WeibullDist.java.

◆ setParams()

void umontreal.ssj.probdist.WeibullDist.setParams ( double alpha,
double lambda,
double delta )

Sets the parameters \(\alpha\), \(\lambda\) and \(\delta\) for this object.

Definition at line 397 of file WeibullDist.java.

◆ toString()

String umontreal.ssj.probdist.WeibullDist.toString ( )

Returns a String containing information about the current distribution.

Definition at line 421 of file WeibullDist.java.


The documentation for this class was generated from the following file: