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

This class extends the class ContinuousDistribution for the Rayleigh distribution [56]  with location parameter. More...

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

Public Member Functions

 RayleighDist (double beta)
 Constructs a RayleighDist object with parameters \(a = 0\) and.
 RayleighDist (double a, double beta)
 Constructs a RayleighDist object with parameters \(a =\) a, and \(\beta\) = beta.
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 getSigma ()
 Returns the parameter \(\beta\).
void setParams (double a, double beta)
 Sets the parameters \(a\) and \(\beta\) for this object.
double[] getParams ()
 Return an array containing the parameters of the current distribution in the order: [ \(a\), \(\beta\)].
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 beta, double x)
 Computes the density function ( frayleigh ).
static double density (double beta, double x)
 Same as density (0, beta, x).
static double cdf (double a, double beta, double x)
 Computes the distribution function ( Frayleigh ).
static double cdf (double beta, double x)
 Same as cdf (0, beta, x).
static double barF (double a, double beta, double x)
 Computes the complementary distribution function.
static double barF (double beta, double x)
 Same as barF (0, beta, x).
static double inverseF (double a, double beta, double u)
 Computes the inverse of the distribution function ( Invrayleigh ).
static double inverseF (double beta, double u)
 Same as inverseF (0, beta, u).
static double[] getMLE (double[] x, int n, double a)
 Estimates the parameter \(\beta\) of the Rayleigh distribution using the maximum likelihood method, assuming that \(a\) is known, from the \(n\) observations \(x[i]\), \(i = 0, 1, …, n-1\).
static RayleighDist getInstanceFromMLE (double[] x, int n, double a)
 Creates a new instance of a Rayleigh distribution with parameters.
static double getMean (double a, double beta)
 Returns the mean \(a + \beta\sqrt{\pi/2}\) of the Rayleigh distribution with parameters \(a\) and \(\beta\).
static double getVariance (double beta)
 Returns the variance of the Rayleigh distribution with parameter.
static double getStandardDeviation (double beta)
 Returns the standard deviation \(\beta\sqrt{2 - \pi/2}\) of the Rayleigh distribution with parameter \(\beta\).

Detailed Description

This class extends the class ContinuousDistribution for the Rayleigh distribution [56]  with location parameter.

\(a\), and scale parameter \(\beta> 0\). The density function is

\[ f(x) = \frac{(x-a)}{\beta^2}  e^{-(x-a)^2/(2\beta^2)} \qquad\mbox{for } x \ge a, \tag{frayleigh} \]

and \(f(x) = 0\) for \(x < a\). The distribution function is

\[ F(x) = 1 - e^{-(x - a)^2/(2\beta^2)} \qquad\mbox{for } x \ge a, \tag{Frayleigh} \]

and the inverse distribution function is

\[ F^{-1}(u) = x = a + \beta\sqrt{-2\ln(1-u)} \qquad\mbox{for } 0 \le u \le1. \tag{Invrayleigh} \]

Definition at line 47 of file RayleighDist.java.

Constructor & Destructor Documentation

◆ RayleighDist() [1/2]

umontreal.ssj.probdist.RayleighDist.RayleighDist ( double beta)

Constructs a RayleighDist object with parameters \(a = 0\) and.

\(\beta\) = beta.

Definition at line 56 of file RayleighDist.java.

◆ RayleighDist() [2/2]

umontreal.ssj.probdist.RayleighDist.RayleighDist ( double a,
double beta )

Constructs a RayleighDist object with parameters \(a =\) a, and \(\beta\) = beta.

Definition at line 64 of file RayleighDist.java.

Member Function Documentation

◆ barF() [1/3]

double umontreal.ssj.probdist.RayleighDist.barF ( double a,
double beta,
double x )
static

Computes the complementary distribution function.

Parameters
athe location parameter
betathe scale parameter
xthe value at which the complementary distribution is evaluated
Returns
returns the complementary distribution function

Definition at line 164 of file RayleighDist.java.

◆ barF() [2/3]

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

Same as barF (0, beta, x).

Parameters
betathe scale parameter
xthe value at which the complementary distribution is evaluated
Returns
returns the complementary distribution function

Definition at line 182 of file RayleighDist.java.

◆ barF() [3/3]

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

◆ cdf() [1/3]

double umontreal.ssj.probdist.RayleighDist.cdf ( double a,
double beta,
double x )
static

Computes the distribution function ( Frayleigh ).

Parameters
athe location parameter
betathe scale parameter
xthe value at which the distribution is evaluated
Returns
returns the distribution function

Definition at line 134 of file RayleighDist.java.

◆ cdf() [2/3]

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

Same as cdf (0, beta, x).

Parameters
betathe scale parameter
xthe value at which the distribution is evaluated
Returns
returns the distribution function

Definition at line 152 of file RayleighDist.java.

◆ cdf() [3/3]

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

◆ density() [1/3]

double umontreal.ssj.probdist.RayleighDist.density ( double a,
double beta,
double x )
static

Computes the density function ( frayleigh ).

Parameters
athe location parameter
betathe scale parameter
xthe value at which the density is evaluated
Returns
the density function

Definition at line 105 of file RayleighDist.java.

◆ density() [2/3]

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

Same as density (0, beta, x).

Parameters
betathe scale parameter
xthe value at which the density is evaluated
Returns
returns the density function

Definition at line 121 of file RayleighDist.java.

◆ density() [3/3]

double umontreal.ssj.probdist.RayleighDist.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 RayleighDist.java.

◆ getA()

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

Returns the parameter \(a\).

Returns
the location parameter \(a\)

Definition at line 303 of file RayleighDist.java.

◆ getInstanceFromMLE()

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

Creates a new instance of a Rayleigh distribution with parameters.

\(a\) and \(\hat{\beta}\). This last is 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
athe location parameter

Definition at line 256 of file RayleighDist.java.

◆ getMean() [1/2]

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

Returns the mean.

Returns
the mean

Reimplemented from umontreal.ssj.probdist.ContinuousDistribution.

Definition at line 84 of file RayleighDist.java.

◆ getMean() [2/2]

double umontreal.ssj.probdist.RayleighDist.getMean ( double a,
double beta )
static

Returns the mean \(a + \beta\sqrt{\pi/2}\) of the Rayleigh distribution with parameters \(a\) and \(\beta\).

Parameters
athe location parameter
betathe scale parameter
Returns
the mean of the Rayleigh distribution

Definition at line 269 of file RayleighDist.java.

◆ getMLE()

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

Estimates the parameter \(\beta\) of the Rayleigh distribution using the maximum likelihood method, assuming that \(a\) is known, from the \(n\) observations \(x[i]\), \(i = 0, 1, …, n-1\).

The estimate is returned in a one-element array: [ \(\hat{\beta}\)]. The maximum likelihood estimator is the value

\(\hat{\beta}\) that satisfies the equation

\[ \hat{\beta} = \sqrt{\frac{1}{2n}\sum_{i=1}^n x_i^2} \]

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

Definition at line 233 of file RayleighDist.java.

◆ getParams()

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

Return an array containing the parameters of the current distribution in the order: [ \(a\), \(\beta\)].

Returns
[ \(a\), \(\beta\)]

Implements umontreal.ssj.probdist.Distribution.

Definition at line 336 of file RayleighDist.java.

◆ getSigma()

double umontreal.ssj.probdist.RayleighDist.getSigma ( )

Returns the parameter \(\beta\).

Returns
the scale parameter \(beta\)

Definition at line 312 of file RayleighDist.java.

◆ getStandardDeviation() [1/2]

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

Returns the standard deviation.

Returns
the standard deviation

Reimplemented from umontreal.ssj.probdist.ContinuousDistribution.

Definition at line 92 of file RayleighDist.java.

◆ getStandardDeviation() [2/2]

double umontreal.ssj.probdist.RayleighDist.getStandardDeviation ( double beta)
static

Returns the standard deviation \(\beta\sqrt{2 - \pi/2}\) of the Rayleigh distribution with parameter \(\beta\).

Parameters
betathe scale parameter
Returns
the standard deviation of the Rayleigh distribution

Definition at line 294 of file RayleighDist.java.

◆ getVariance() [1/2]

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

Returns the variance.

Returns
the variance

Reimplemented from umontreal.ssj.probdist.ContinuousDistribution.

Definition at line 88 of file RayleighDist.java.

◆ getVariance() [2/2]

double umontreal.ssj.probdist.RayleighDist.getVariance ( double beta)
static

Returns the variance of the Rayleigh distribution with parameter.

\(\beta\).

Parameters
betathe scale parameter
Returns
the variance of the Rayleigh distribution

Definition at line 281 of file RayleighDist.java.

◆ inverseF() [1/3]

double umontreal.ssj.probdist.RayleighDist.inverseF ( double a,
double beta,
double u )
static

Computes the inverse of the distribution function ( Invrayleigh ).

Parameters
athe location parameter
betathe scale parameter
uthe value at which the inverse distribution is evaluated
Returns
returns the inverse of the distribution function

Definition at line 195 of file RayleighDist.java.

◆ inverseF() [2/3]

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

Same as inverseF (0, beta, u).

Parameters
betathe scale parameter
uthe value at which the inverse distribution is evaluated
Returns
returns the inverse of the distribution function

Definition at line 215 of file RayleighDist.java.

◆ inverseF() [3/3]

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

◆ setParams()

void umontreal.ssj.probdist.RayleighDist.setParams ( double a,
double beta )

Sets the parameters \(a\) and \(\beta\) for this object.

Parameters
athe location parameter
betathe scale parameter

Definition at line 322 of file RayleighDist.java.

◆ toString()

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

Returns a String containing information about the current distribution.

Returns
a String containing information about the current distribution

Definition at line 346 of file RayleighDist.java.


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