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

Extends the class StudentDist for the Student. More...

Inheritance diagram for umontreal.ssj.probdist.StudentDistQuick:
umontreal.ssj.probdist.StudentDist umontreal.ssj.probdist.ContinuousDistribution umontreal.ssj.probdist.Distribution

Public Member Functions

 StudentDistQuick (int n)
 Constructs a StudentDistQuick object with n degrees of freedom.
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)\).
Public Member Functions inherited from umontreal.ssj.probdist.StudentDist
 StudentDist (int n)
 Constructs a StudentDist object with n degrees of freedom.
double density (double x)
 Returns \(f(x)\), the density evaluated at \(x\).
double getMean ()
 Returns the mean.
double getVariance ()
 Returns the variance.
double getStandardDeviation ()
 Returns the standard deviation.
int getN ()
 Returns the parameter \(n\) associated with this object.
void setN (int n)
 Sets the parameter \(n\) associated with this object.
double[] getParams ()
 Return a table containing the parameter 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 cdf (int n, double x)
 Returns the approximation of [101]  (page 96) of the Student \(t\)-distribution function with \(n\) degrees of freedom.
static double barF (int n, double x)
 Computes the complementary distribution function \(\bar{F}(x)\).
static double inverseF (int n, double u)
 Returns an approximation of \(F^{-1}(u)\), where \(F\) is the Student \(t\)-distribution function with \(n\) degrees of freedom.
Static Public Member Functions inherited from umontreal.ssj.probdist.StudentDist
static double density (int n, double x)
 Computes the density function ( fstudent ) of a Student \(t\)-distribution with \(n\) degrees of freedom.
static double cdf2 (int n, int d, double x)
 Same as cdf(n, x).
static double[] getMLE (double[] x, int m)
 Estimates the parameter \(n\) of the Student \(t\)-distribution using the maximum likelihood method, from the \(m\) observations.
static StudentDist getInstanceFromMLE (double[] x, int m)
 Creates a new instance of a Student \(t\)-distribution with parameter \(n\) estimated using the maximum likelihood method based on the \(m\) observations \(x[i]\), \(i = 0, 1, …, m-1\).
static double getMean (int n)
 Returns the mean \(E[X] = 0\) of the Student \(t\)-distribution with parameter \(n\).
static double getVariance (int n)
 Computes and returns the variance \(\mbox{Var}[X] = n/(n - 2)\) of the Student \(t\)-distribution with parameter \(n\).
static double getStandardDeviation (int n)
 Computes and returns the standard deviation of the Student.

Detailed Description

Extends the class StudentDist for the Student.

\(t\)-distribution. Uses methods that are faster but less precise than StudentDist.

 <div class="SSJ-bigskip"></div>

Definition at line 40 of file StudentDistQuick.java.

Constructor & Destructor Documentation

◆ StudentDistQuick()

umontreal.ssj.probdist.StudentDistQuick.StudentDistQuick ( int n)

Constructs a StudentDistQuick object with n degrees of freedom.

Definition at line 49 of file StudentDistQuick.java.

Member Function Documentation

◆ barF() [1/2]

double umontreal.ssj.probdist.StudentDistQuick.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.StudentDist.

Definition at line 62 of file StudentDistQuick.java.

◆ barF() [2/2]

double umontreal.ssj.probdist.StudentDistQuick.barF ( int n,
double x )
static

Computes the complementary distribution function \(\bar{F}(x)\).

Reimplemented from umontreal.ssj.probdist.StudentDist.

Definition at line 152 of file StudentDistQuick.java.

◆ cdf() [1/2]

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

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

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

Reimplemented from umontreal.ssj.probdist.StudentDist.

Definition at line 58 of file StudentDistQuick.java.

◆ cdf() [2/2]

double umontreal.ssj.probdist.StudentDistQuick.cdf ( int n,
double x )
static

Returns the approximation of [101]  (page 96) of the Student \(t\)-distribution function with \(n\) degrees of freedom.

Is very poor in the tails but good in the central part of the range.

Reimplemented from umontreal.ssj.probdist.StudentDist.

Definition at line 75 of file StudentDistQuick.java.

◆ inverseF() [1/2]

double umontreal.ssj.probdist.StudentDistQuick.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.StudentDist.

Definition at line 66 of file StudentDistQuick.java.

◆ inverseF() [2/2]

double umontreal.ssj.probdist.StudentDistQuick.inverseF ( int n,
double u )
static

Returns an approximation of \(F^{-1}(u)\), where \(F\) is the Student \(t\)-distribution function with \(n\) degrees of freedom.

Gives at least 5 decimal digits of precision when \(n \ge3\) (see [tHIL70a] ). Uses exact formulae for

\(n=1\) and \(n=2\).

Reimplemented from umontreal.ssj.probdist.StudentDist.

Definition at line 166 of file StudentDistQuick.java.


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