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

THIS CLASS HAS BEEN RENAMED InverseGammaDist . More...

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

Public Member Functions

 Pearson5Dist (double alpha, double beta)
 THIS CLASS HAS BEEN RENAMED InverseGammaDist .
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 \(\alpha\) parameter of this object.
double getBeta ()
 Returns the \(\beta\) parameter of this object.
void setParam (double alpha, double beta)
 Sets the parameters \(\alpha\) and \(\beta\) of 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 beta, double x)
 Computes the density function of a Pearson V distribution with shape parameter \(\alpha\) and scale parameter \(\beta\).
static double cdf (double alpha, double beta, double x)
 Computes the density function of a Pearson V distribution with shape parameter \(\alpha\) and scale parameter \(\beta\).
static double barF (double alpha, double beta, double x)
 Computes the complementary distribution function of a Pearson V distribution with shape parameter \(\alpha\) and scale parameter \(\beta\).
static double inverseF (double alpha, double beta, double u)
 Computes the inverse distribution function of a Pearson V distribution with shape parameter \(\alpha\) and scale parameter \(\beta\).
static double[] getMLE (double[] x, int n)
 Estimates the parameters \((\alpha,\beta)\) of the Pearson V distribution using the maximum likelihood method, from the \(n\) observations \(x[i]\), \(i = 0, 1,…, n-1\).
static Pearson5Dist getInstanceFromMLE (double[] x, int n)
 Creates a new instance of a Pearson V distribution with parameters.
static double getMean (double alpha, double beta)
 Computes and returns the mean \(E[X] = \beta/ (\alpha- 1)\) of a Pearson V distribution with shape parameter \(\alpha\) and scale parameter \(\beta\).
static double getVariance (double alpha, double beta)
 Computes and returns the variance \(\mbox{Var}[X] = \beta^2 / ((\alpha- 1)^2(\alpha- 2)\) of a Pearson V distribution with shape parameter \(\alpha\) and scale parameter \(\beta\).
static double getStandardDeviation (double alpha, double beta)
 Computes and returns the standard deviation of a Pearson V distribution with shape parameter \(\alpha\) and scale parameter \(\beta\).

Detailed Description

THIS CLASS HAS BEEN RENAMED InverseGammaDist .

Extends the class ContinuousDistribution for the Pearson type V distribution with shape parameter \(\alpha> 0\) and scale parameter

\(\beta> 0\). The density function is given by

\[ f(x) = \left\{\begin{array}{ll} \displaystyle\frac{\beta^{\alpha}e^{-\beta/ x}}{x^{\alpha+ 1} \Gamma(\alpha)} & \quad\mbox{for } x > 0 \\ 0 & \quad\mbox{otherwise,} \end{array} \right. \tag{fpearson5} \]

where \(\Gamma\) is the gamma function. The distribution function is given by

\[ F(x) = 1 - F_G\left(\frac{1}{x}\right) \qquad\mbox{for } x > 0, \tag{Fpearson5} \]

and \(F(x) = 0\) otherwise, where \(F_G(x)\) is the distribution function of a gamma distribution with shape parameter \(\alpha\) and scale parameter \(\beta\).

Definition at line 53 of file Pearson5Dist.java.

Constructor & Destructor Documentation

◆ Pearson5Dist()

umontreal.ssj.probdist.Pearson5Dist.Pearson5Dist ( double alpha,
double beta )

THIS CLASS HAS BEEN RENAMED InverseGammaDist .

Constructs a Pearson5Dist object with parameters

\(\alpha\) = alpha and \(\beta\) = beta.

Definition at line 64 of file Pearson5Dist.java.

Member Function Documentation

◆ barF() [1/2]

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

Computes the complementary distribution function of a Pearson V distribution with shape parameter \(\alpha\) and scale parameter \(\beta\).

Definition at line 132 of file Pearson5Dist.java.

◆ barF() [2/2]

double umontreal.ssj.probdist.Pearson5Dist.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 78 of file Pearson5Dist.java.

◆ cdf() [1/2]

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

Computes the density function of a Pearson V distribution with shape parameter \(\alpha\) and scale parameter \(\beta\).

Definition at line 117 of file Pearson5Dist.java.

◆ cdf() [2/2]

double umontreal.ssj.probdist.Pearson5Dist.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 74 of file Pearson5Dist.java.

◆ density() [1/2]

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

Computes the density function of a Pearson V distribution with shape parameter \(\alpha\) and scale parameter \(\beta\).

Definition at line 102 of file Pearson5Dist.java.

◆ density() [2/2]

double umontreal.ssj.probdist.Pearson5Dist.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 68 of file Pearson5Dist.java.

◆ getAlpha()

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

Returns the \(\alpha\) parameter of this object.

Definition at line 234 of file Pearson5Dist.java.

◆ getBeta()

double umontreal.ssj.probdist.Pearson5Dist.getBeta ( )

Returns the \(\beta\) parameter of this object.

Definition at line 241 of file Pearson5Dist.java.

◆ getInstanceFromMLE()

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

Creates a new instance of a Pearson V distribution with parameters.

\(\alpha\) and \(\beta\) 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 190 of file Pearson5Dist.java.

◆ getMean() [1/2]

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

Returns the mean.

Returns
the mean

Reimplemented from umontreal.ssj.probdist.ContinuousDistribution.

Definition at line 86 of file Pearson5Dist.java.

◆ getMean() [2/2]

double umontreal.ssj.probdist.Pearson5Dist.getMean ( double alpha,
double beta )
static

Computes and returns the mean \(E[X] = \beta/ (\alpha- 1)\) of a Pearson V distribution with shape parameter \(\alpha\) and scale parameter \(\beta\).

Definition at line 200 of file Pearson5Dist.java.

◆ getMLE()

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

Estimates the parameters \((\alpha,\beta)\) of the Pearson V 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: [ \(\alpha\), \(\beta\)]. The equations of the maximum likelihood are the same as the equations of the gamma distribution, with the sample \(y_i = 1/x_i\).

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

Definition at line 168 of file Pearson5Dist.java.

◆ getParams()

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

Return a table containing the parameters of the current distribution.

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

Implements umontreal.ssj.probdist.Distribution.

Definition at line 263 of file Pearson5Dist.java.

◆ getStandardDeviation() [1/2]

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

Returns the standard deviation.

Returns
the standard deviation

Reimplemented from umontreal.ssj.probdist.ContinuousDistribution.

Definition at line 94 of file Pearson5Dist.java.

◆ getStandardDeviation() [2/2]

double umontreal.ssj.probdist.Pearson5Dist.getStandardDeviation ( double alpha,
double beta )
static

Computes and returns the standard deviation of a Pearson V distribution with shape parameter \(\alpha\) and scale parameter \(\beta\).

Definition at line 227 of file Pearson5Dist.java.

◆ getVariance() [1/2]

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

Returns the variance.

Returns
the variance

Reimplemented from umontreal.ssj.probdist.ContinuousDistribution.

Definition at line 90 of file Pearson5Dist.java.

◆ getVariance() [2/2]

double umontreal.ssj.probdist.Pearson5Dist.getVariance ( double alpha,
double beta )
static

Computes and returns the variance \(\mbox{Var}[X] = \beta^2 / ((\alpha- 1)^2(\alpha- 2)\) of a Pearson V distribution with shape parameter \(\alpha\) and scale parameter \(\beta\).

Definition at line 214 of file Pearson5Dist.java.

◆ inverseF() [1/2]

double umontreal.ssj.probdist.Pearson5Dist.inverseF ( double alpha,
double beta,
double u )
static

Computes the inverse distribution function of a Pearson V distribution with shape parameter \(\alpha\) and scale parameter \(\beta\).

Definition at line 147 of file Pearson5Dist.java.

◆ inverseF() [2/2]

double umontreal.ssj.probdist.Pearson5Dist.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 82 of file Pearson5Dist.java.

◆ setParam()

void umontreal.ssj.probdist.Pearson5Dist.setParam ( double alpha,
double beta )

Sets the parameters \(\alpha\) and \(\beta\) of this object.

Definition at line 248 of file Pearson5Dist.java.

◆ toString()

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

Returns a String containing information about the current distribution.

Definition at line 271 of file Pearson5Dist.java.


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