Extends the class StudentDist for the Student. More...
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. | |
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.
| umontreal.ssj.probdist.StudentDistQuick.StudentDistQuick | ( | int | n | ) |
Constructs a StudentDistQuick object with n degrees of freedom.
Definition at line 49 of file StudentDistQuick.java.
| double umontreal.ssj.probdist.StudentDistQuick.barF | ( | double | x | ) |
Returns the complementary distribution function.
The default implementation computes \(\bar{F}(x) = 1 - F(x)\).
| x | value at which the complementary distribution function is evaluated |
Reimplemented from umontreal.ssj.probdist.StudentDist.
Definition at line 62 of file StudentDistQuick.java.
|
static |
Computes the complementary distribution function \(\bar{F}(x)\).
Reimplemented from umontreal.ssj.probdist.StudentDist.
Definition at line 152 of file StudentDistQuick.java.
| double umontreal.ssj.probdist.StudentDistQuick.cdf | ( | double | x | ) |
Returns the distribution function \(F(x)\).
| x | value at which the distribution function is evaluated |
Reimplemented from umontreal.ssj.probdist.StudentDist.
Definition at line 58 of file StudentDistQuick.java.
|
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.
| double umontreal.ssj.probdist.StudentDistQuick.inverseF | ( | double | u | ) |
Returns the inverse distribution function \(x = F^{-1}(u)\).
Restrictions: \(u \in[0,1]\).
| u | value at which the inverse distribution function is evaluated |
| IllegalArgumentException | if \(u\) is not in the interval \([0,1]\) |
Reimplemented from umontreal.ssj.probdist.StudentDist.
Definition at line 66 of file StudentDistQuick.java.
|
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.