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

Extends the class ContinuousDistribution for the noncentral chi-square distribution with \(\nu\) degrees of freedom and noncentrality parameter \(\lambda\), where \(\nu> 0\) and. More...

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

Public Member Functions

 ChiSquareNoncentralDist (double nu, double lambda)
 Constructs a noncentral chi-square distribution with \(\nu= \) nu degrees of freedom and noncentrality parameter \(\lambda= \) lambda.
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 getNu ()
 Returns the parameter \(\nu\) of this object.
double getLambda ()
 Returns the parameter \(\lambda\) of this object.
void setParams (double nu, double lambda)
 Sets the parameters \(\nu=\) nu and \(\lambda= \) lambda of this object.
double[] getParams ()
 Returns 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 nu, double lambda, double x)
 Computes the density function ( nc-fchi2 ) for a noncentral chi-square distribution with \(\nu= \) nu degrees of freedom and parameter \(\lambda= \) lambda.
static double cdf (double nu, double lambda, double x)
 Computes the noncentral chi-square distribution function ( nc-cdfchi2 ) with \(\nu= \) nu degrees of freedom and parameter \(\lambda= \) lambda.
static double barF (double nu, double lambda, double x)
 Computes the complementary noncentral chi-square distribution function with \(\nu= \) nu degrees of freedom and parameter.
static double inverseF (double nu, double lambda, double u)
 Computes the inverse of the noncentral chi-square distribution with.
static double getMean (double nu, double lambda)
 Computes and returns the mean \(E[X] = \nu+ \lambda\) of the noncentral chi-square distribution with parameters \(\nu= \) nu and \(\lambda= \) lambda.
static double getVariance (double nu, double lambda)
 Computes and returns the variance \(\mbox{Var}[X] = 2(\nu+ 2\lambda)\) of the noncentral chi-square distribution with parameters \(\nu=\) nu and \(\lambda= \) lambda.
static double getStandardDeviation (double nu, double lambda)
 Computes and returns the standard deviation of the noncentral chi-square distribution with parameters \(\nu=\) nu and.

Detailed Description

Extends the class ContinuousDistribution for the noncentral chi-square distribution with \(\nu\) degrees of freedom and noncentrality parameter \(\lambda\), where \(\nu> 0\) and.

\(\lambda> 0\) [96]  (page 436). Its density is

\[ f(x) =\frac{e^{-(x + \lambda)/2}}{2} \left(\frac{x}{\lambda}\right)^{(\nu-2)/4} I_{\nu/2 - 1}\left(\sqrt{\lambda x}\right) \qquad\mbox{for } x > 0, \tag{nc-fchi2} \]

where \(I_{\nu}(x)\) is the modified Bessel function of the first kind of order \(\nu\) given by

\[ I_{\nu}(z) = \sum_{j=0}^{\infty}\frac{(z/2)^{\nu+ 2j}}{j!\; \Gamma(\nu+ j +1)}, \]

where \(\Gamma(x)\) is the gamma function. Notice that this distribution is more general than the chi-square distribution since its number of degrees of freedom can be any positive real number. For \(\lambda= 0\) and \(\nu\) a positive integer, we have the ordinary chi-square distribution.

The cumulative probability function can be written as

\[ P[X \le x] = \sum_{j=0}^{\infty}\frac{e^{-\lambda/2}(\lambda/2)^j}{j!} P[\chi^2_{\nu+ 2j} \le x], \tag{nc-cdfchi2} \]

where \(\chi^2_{\nu+ 2j}\) is the central chi-square distribution with \(\nu+ 2j\) degrees of freedom.

Definition at line 61 of file ChiSquareNoncentralDist.java.

Constructor & Destructor Documentation

◆ ChiSquareNoncentralDist()

umontreal.ssj.probdist.ChiSquareNoncentralDist.ChiSquareNoncentralDist ( double nu,
double lambda )

Constructs a noncentral chi-square distribution with \(\nu= \) nu degrees of freedom and noncentrality parameter \(\lambda= \) lambda.

Definition at line 130 of file ChiSquareNoncentralDist.java.

Member Function Documentation

◆ barF() [1/2]

double umontreal.ssj.probdist.ChiSquareNoncentralDist.barF ( double nu,
double lambda,
double x )
static

Computes the complementary noncentral chi-square distribution function with \(\nu= \) nu degrees of freedom and parameter.

\(\lambda= \) lambda.

Definition at line 414 of file ChiSquareNoncentralDist.java.

◆ barF() [2/2]

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

◆ cdf() [1/2]

double umontreal.ssj.probdist.ChiSquareNoncentralDist.cdf ( double nu,
double lambda,
double x )
static

Computes the noncentral chi-square distribution function ( nc-cdfchi2 ) with \(\nu= \) nu degrees of freedom and parameter \(\lambda= \) lambda.

For \(\lambda< 1000\), we use a reasonnably efficient method of summing the cumulative function ( nc-cdfchi2 ) by using recurrence relations to compute both the Poisson and the chi-square probabilities in terms of neighboring probability terms. For \(\lambda\ge1000\), we use the normal approximation given in [tPEN00a] , except very near the mean where we use the central chi square approximation from

[194] . This function returns at least 6 decimal degits of precision nearly everywhere.

Definition at line 248 of file ChiSquareNoncentralDist.java.

◆ cdf() [2/2]

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

◆ density() [1/2]

double umontreal.ssj.probdist.ChiSquareNoncentralDist.density ( double nu,
double lambda,
double x )
static

Computes the density function ( nc-fchi2 ) for a noncentral chi-square distribution with \(\nu= \) nu degrees of freedom and parameter \(\lambda= \) lambda.

Definition at line 184 of file ChiSquareNoncentralDist.java.

◆ density() [2/2]

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

◆ getLambda()

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

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

Definition at line 593 of file ChiSquareNoncentralDist.java.

◆ getMean() [1/2]

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

Returns the mean.

Returns
the mean

Reimplemented from umontreal.ssj.probdist.ContinuousDistribution.

Definition at line 166 of file ChiSquareNoncentralDist.java.

◆ getMean() [2/2]

double umontreal.ssj.probdist.ChiSquareNoncentralDist.getMean ( double nu,
double lambda )
static

Computes and returns the mean \(E[X] = \nu+ \lambda\) of the noncentral chi-square distribution with parameters \(\nu= \) nu and \(\lambda= \) lambda.

Returns
the mean of the Noncentral noncentral chi-square distribution

Definition at line 549 of file ChiSquareNoncentralDist.java.

◆ getNu()

double umontreal.ssj.probdist.ChiSquareNoncentralDist.getNu ( )

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

Definition at line 586 of file ChiSquareNoncentralDist.java.

◆ getParams()

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

Returns a table containing the parameters of the current distribution.

Implements umontreal.ssj.probdist.Distribution.

Definition at line 621 of file ChiSquareNoncentralDist.java.

◆ getStandardDeviation() [1/2]

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

Returns the standard deviation.

Returns
the standard deviation

Reimplemented from umontreal.ssj.probdist.ContinuousDistribution.

Definition at line 174 of file ChiSquareNoncentralDist.java.

◆ getStandardDeviation() [2/2]

double umontreal.ssj.probdist.ChiSquareNoncentralDist.getStandardDeviation ( double nu,
double lambda )
static

Computes and returns the standard deviation of the noncentral chi-square distribution with parameters \(\nu=\) nu and.

\(\lambda= \) lambda.

Returns
the standard deviation of the noncentral chi-square distribution

Definition at line 579 of file ChiSquareNoncentralDist.java.

◆ getVariance() [1/2]

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

Returns the variance.

Returns
the variance

Reimplemented from umontreal.ssj.probdist.ContinuousDistribution.

Definition at line 170 of file ChiSquareNoncentralDist.java.

◆ getVariance() [2/2]

double umontreal.ssj.probdist.ChiSquareNoncentralDist.getVariance ( double nu,
double lambda )
static

Computes and returns the variance \(\mbox{Var}[X] = 2(\nu+ 2\lambda)\) of the noncentral chi-square distribution with parameters \(\nu=\) nu and \(\lambda= \) lambda.

Returns
the variance of the noncentral chi-square distribution

Definition at line 564 of file ChiSquareNoncentralDist.java.

◆ inverseF() [1/2]

double umontreal.ssj.probdist.ChiSquareNoncentralDist.inverseF ( double nu,
double lambda,
double u )
static

Computes the inverse of the noncentral chi-square distribution with.

\(\nu= \) nu degrees of freedom and parameter \(\lambda= \) lambda.

Definition at line 506 of file ChiSquareNoncentralDist.java.

◆ inverseF() [2/2]

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

◆ setParams()

void umontreal.ssj.probdist.ChiSquareNoncentralDist.setParams ( double nu,
double lambda )

Sets the parameters \(\nu=\) nu and \(\lambda= \) lambda of this object.

Definition at line 601 of file ChiSquareNoncentralDist.java.

◆ toString()

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

Returns a String containing information about the current distribution.

Definition at line 629 of file ChiSquareNoncentralDist.java.


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