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

Extends the class ContinuousDistribution for the power distribution [56]  (page 161) with shape parameter \(c > 0\), over the interval \([a,b]\), where \(a < b\). More...

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

Public Member Functions

 PowerDist (double a, double b, double c)
 Constructs a PowerDist object with parameters \(a =\) a, \(b =\) b and \(c =\) c.
 PowerDist (double b, double c)
 Constructs a PowerDist object with parameters \(a = 0\), \(b =\) b and \(c =\) c.
 PowerDist (double c)
 Constructs a PowerDist object with parameters \(a = 0\), \(b =1\) and \(c =\) c.
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 getA ()
 Returns the parameter \(a\).
double getB ()
 Returns the parameter \(b\).
double getC ()
 Returns the parameter \(c\).
void setParams (double a, double b, double c)
 Sets the parameters \(a\), \(b\) and \(c\) 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 a, double b, double c, double x)
 Computes the density function ( fpower ).
static double cdf (double a, double b, double c, double x)
 Computes the distribution function ( Fpower ).
static double barF (double a, double b, double c, double x)
 Computes the complementary distribution function.
static double inverseF (double a, double b, double c, double u)
 Computes the inverse of the distribution function.
static double[] getMLE (double[] x, int n, double a, double b)
 Estimates the parameter \(c\) of the power distribution from the.
static PowerDist getInstanceFromMLE (double[] x, int n, double a, double b)
 Creates a new instance of a power distribution with parameters.
static double getMean (double a, double b, double c)
 Returns the mean \(a + (b-a)c/(c+1)\) of the power distribution with parameters \(a\), \(b\) and \(c\).
static double getVariance (double a, double b, double c)
 Computes and returns the variance \((b-a)^2 c / [(c+1)^2(c+2)]\) of the power distribution with parameters \(a\), \(b\) and.
static double getStandardDeviation (double a, double b, double c)
 Computes and returns the standard deviation of the power distribution with parameters \(a\), \(b\) and \(c\).

Detailed Description

Extends the class ContinuousDistribution for the power distribution [56]  (page 161) with shape parameter \(c > 0\), over the interval \([a,b]\), where \(a < b\).

This distribution has density

\[ f(x) = \frac{c(x-a)^{c - 1}}{(b - a)^c}, \qquad\mbox{for } a \le x \le b, \tag{fpower} \]

and \(f(x) = 0\) elsewhere. Its distribution function is

\[ F(x) = \frac{(x - a)^c}{(b - a)^c}, \qquad\mbox{for } a \le x \le b, \tag{Fpower} \]

with \(F(x) = 0\) for \(x \le a\) and \(F(x) = 1\) for \(x \ge b\).

Definition at line 46 of file PowerDist.java.

Constructor & Destructor Documentation

◆ PowerDist() [1/3]

umontreal.ssj.probdist.PowerDist.PowerDist ( double a,
double b,
double c )

Constructs a PowerDist object with parameters \(a =\) a, \(b =\) b and \(c =\) c.

Definition at line 55 of file PowerDist.java.

◆ PowerDist() [2/3]

umontreal.ssj.probdist.PowerDist.PowerDist ( double b,
double c )

Constructs a PowerDist object with parameters \(a = 0\), \(b =\) b and \(c =\) c.

Definition at line 63 of file PowerDist.java.

◆ PowerDist() [3/3]

umontreal.ssj.probdist.PowerDist.PowerDist ( double c)

Constructs a PowerDist object with parameters \(a = 0\), \(b =1\) and \(c =\) c.

Definition at line 71 of file PowerDist.java.

Member Function Documentation

◆ barF() [1/2]

double umontreal.ssj.probdist.PowerDist.barF ( double a,
double b,
double c,
double x )
static

Computes the complementary distribution function.

Parameters
aleft limit of interval
bright limit of interval
cshape parameter
xthe value at which the complementary distribution is evaluated
Returns
returns the complementary distribution function

Definition at line 153 of file PowerDist.java.

◆ barF() [2/2]

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

◆ cdf() [1/2]

double umontreal.ssj.probdist.PowerDist.cdf ( double a,
double b,
double c,
double x )
static

Computes the distribution function ( Fpower ).

Parameters
aleft limit of interval
bright limit of interval
cshape parameter
xthe value at which the distribution is evaluated
Returns
returns the distribution function

Definition at line 134 of file PowerDist.java.

◆ cdf() [2/2]

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

◆ density() [1/2]

double umontreal.ssj.probdist.PowerDist.density ( double a,
double b,
double c,
double x )
static

Computes the density function ( fpower ).

Parameters
aleft limit of interval
bright limit of interval
cshape parameter
xthe value at which the density is evaluated
Returns
returns the density function

Definition at line 113 of file PowerDist.java.

◆ density() [2/2]

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

◆ getA()

double umontreal.ssj.probdist.PowerDist.getA ( )

Returns the parameter \(a\).

Returns
the left limit of interval \(a\)

Definition at line 273 of file PowerDist.java.

◆ getB()

double umontreal.ssj.probdist.PowerDist.getB ( )

Returns the parameter \(b\).

Returns
the right limit of interval \(b\)

Definition at line 282 of file PowerDist.java.

◆ getC()

double umontreal.ssj.probdist.PowerDist.getC ( )

Returns the parameter \(c\).

Returns
the shape parameter \(c\)

Definition at line 291 of file PowerDist.java.

◆ getInstanceFromMLE()

PowerDist umontreal.ssj.probdist.PowerDist.getInstanceFromMLE ( double[] x,
int n,
double a,
double b )
static

Creates a new instance of a power distribution with parameters.

\(a\) and \(b\), with \(c\) estimated using the maximum likelihood method based on the \(n\) observations \(x[i]\), \(i = 0, …, n-1\).

Parameters
xthe list of observations to use to evaluate parameters
nthe number of observations to use to evaluate parameters
aleft limit of interval
bright limit of interval

Definition at line 227 of file PowerDist.java.

◆ getMean() [1/2]

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

Returns the mean.

Returns
the mean

Reimplemented from umontreal.ssj.probdist.ContinuousDistribution.

Definition at line 91 of file PowerDist.java.

◆ getMean() [2/2]

double umontreal.ssj.probdist.PowerDist.getMean ( double a,
double b,
double c )
static

Returns the mean \(a + (b-a)c/(c+1)\) of the power distribution with parameters \(a\), \(b\) and \(c\).

Parameters
aleft limit of interval
bright limit of interval
cshape parameter
Returns
returns the mean

Definition at line 241 of file PowerDist.java.

◆ getMLE()

double[] umontreal.ssj.probdist.PowerDist.getMLE ( double[] x,
int n,
double a,
double b )
static

Estimates the parameter \(c\) of the power distribution from the.

\(n\) observations \(x[i]\), \(i = 0, 1, …, n-1\), using the maximum likelihood method and assuming that \(a\) and \(b\) are known. The estimate is returned in a one-element array: [ \(c\)]. The maximum likelihood estimator is the value \(\hat{c}\) that satisfies the equation

\begin{align*} \frac{1}{\hat{c}} = -\frac{1}{n} \sum_{i=1}^n \ln\left(\frac{x_i - a}{b - a} \right) \end{align*}

Parameters
xthe list of observations to use to evaluate parameters
nthe number of observations to use to evaluate parameters
aleft limit of interval
bright limit of interval
Returns
returns the shape parameter [ \(\hat{c}\)]

Definition at line 202 of file PowerDist.java.

◆ getParams()

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

Return a table containing the parameters of the current distribution.

This table is put in regular order: [ \(a\), \(b\), \(c\)].

Returns
[ \(a\), \(b, \)c]

Implements umontreal.ssj.probdist.Distribution.

Definition at line 314 of file PowerDist.java.

◆ getStandardDeviation() [1/2]

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

Returns the standard deviation.

Returns
the standard deviation

Reimplemented from umontreal.ssj.probdist.ContinuousDistribution.

Definition at line 99 of file PowerDist.java.

◆ getStandardDeviation() [2/2]

double umontreal.ssj.probdist.PowerDist.getStandardDeviation ( double a,
double b,
double c )
static

Computes and returns the standard deviation of the power distribution with parameters \(a\), \(b\) and \(c\).

Returns
the standard deviation of the power distribution

Definition at line 264 of file PowerDist.java.

◆ getVariance() [1/2]

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

Returns the variance.

Returns
the variance

Reimplemented from umontreal.ssj.probdist.ContinuousDistribution.

Definition at line 95 of file PowerDist.java.

◆ getVariance() [2/2]

double umontreal.ssj.probdist.PowerDist.getVariance ( double a,
double b,
double c )
static

Computes and returns the variance \((b-a)^2 c / [(c+1)^2(c+2)]\) of the power distribution with parameters \(a\), \(b\) and.

\(c\).

Parameters
aleft limit of interval
bright limit of interval
cshape parameter
Returns
returns the variance

Definition at line 254 of file PowerDist.java.

◆ inverseF() [1/2]

double umontreal.ssj.probdist.PowerDist.inverseF ( double a,
double b,
double c,
double u )
static

Computes the inverse of the distribution function.

Parameters
aleft limit of interval
bright limit of interval
cshape parameter
uthe value at which the inverse distribution is evaluated
Returns
returns the inverse of the distribution function

Definition at line 172 of file PowerDist.java.

◆ inverseF() [2/2]

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

◆ setParams()

void umontreal.ssj.probdist.PowerDist.setParams ( double a,
double b,
double c )

Sets the parameters \(a\), \(b\) and \(c\) for this object.

Parameters
aleft limit of interval
bright limit of interval
cshape parameter

Definition at line 302 of file PowerDist.java.

◆ toString()

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

Returns a String containing information about the current distribution.

Returns
a String containing information about the current distribution

Definition at line 324 of file PowerDist.java.


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