Extends the class ContinuousDistribution for the Student. More...
Public Member Functions | |
| 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 | 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. | |
| 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 | density (int n, double x) |
Computes the density function ( fstudent ) of a Student \(t\)-distribution with \(n\) degrees of freedom. | |
| static double | cdf (int n, double x) |
| Computes the Student \(t\)-distribution function \(u=F(x)\) with. | |
| static double | cdf2 (int n, int d, double x) |
Same as cdf(n, x). | |
| static double | barF (int n, double x) |
| Computes the complementary distribution function \(v = \bar{F}(x)\) with \(n\) degrees of freedom. | |
| static double | inverseF (int n, double u) |
| Returns the inverse \(x = F^{-1}(u)\) of Student. | |
| 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 ContinuousDistribution for the Student.
\(t\)-distribution [96] (page 362) with \(n\) degrees of freedom, where \(n\) is a positive integer. Its density is
\[ f (x) = \frac{\Gamma\left((n + 1)/2 \right)}{\Gamma(n/2) \sqrt{\pi n}} \left(1 + \frac{x^2}{n}\right)^{-(n+1)/2} \qquad\mbox{for } -\infty< x < \infty, \tag{fstudent} \]
where \(\Gamma(x)\) is the gamma function defined in ( Gamma ).
Definition at line 47 of file StudentDist.java.
| umontreal.ssj.probdist.StudentDist.StudentDist | ( | int | n | ) |
Constructs a StudentDist object with n degrees of freedom.
Definition at line 112 of file StudentDist.java.
| double umontreal.ssj.probdist.StudentDist.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.ContinuousDistribution.
Reimplemented in umontreal.ssj.probdist.StudentDistQuick.
Definition at line 124 of file StudentDist.java.
|
static |
Computes the complementary distribution function \(v = \bar{F}(x)\) with \(n\) degrees of freedom.
Gives 13 decimal digits of precision for \(n \le10^5\). For \(n > 10^5\), gives at least 6 decimal digits of precision everywhere, and at least 9 decimal digits of precision for all \(v > 10^{-15}\).
Reimplemented in umontreal.ssj.probdist.StudentDistQuick.
Definition at line 205 of file StudentDist.java.
| double umontreal.ssj.probdist.StudentDist.cdf | ( | double | x | ) |
Returns the distribution function \(F(x)\).
| x | value at which the distribution function is evaluated |
Implements umontreal.ssj.probdist.Distribution.
Reimplemented in umontreal.ssj.probdist.StudentDistQuick.
Definition at line 120 of file StudentDist.java.
|
static |
Computes the Student \(t\)-distribution function \(u=F(x)\) with.
\(n\) degrees of freedom. Gives 13 decimal digits of precision for \(n \le10^5\). For \(n > 10^5\), gives at least 6 decimal digits of precision everywhere, and at least 9 decimal digits of precision for all \(u > 10^{-15}\).
Reimplemented in umontreal.ssj.probdist.StudentDistQuick.
Definition at line 162 of file StudentDist.java.
|
static |
Same as cdf(n, x).
Definition at line 192 of file StudentDist.java.
| double umontreal.ssj.probdist.StudentDist.density | ( | double | x | ) |
Returns \(f(x)\), the density evaluated at \(x\).
| x | value at which the density is evaluated |
Reimplemented from umontreal.ssj.probdist.ContinuousDistribution.
Definition at line 116 of file StudentDist.java.
|
static |
Computes the density function ( fstudent ) of a Student \(t\)-distribution with \(n\) degrees of freedom.
Definition at line 149 of file StudentDist.java.
|
static |
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\).
| x | the list of observations to use to evaluate parameters |
| m | the number of observations to use to evaluate parameters |
Definition at line 316 of file StudentDist.java.
| double umontreal.ssj.probdist.StudentDist.getMean | ( | ) |
Returns the mean.
Reimplemented from umontreal.ssj.probdist.ContinuousDistribution.
Definition at line 132 of file StudentDist.java.
|
static |
Returns the mean \(E[X] = 0\) of the Student \(t\)-distribution with parameter \(n\).
Definition at line 327 of file StudentDist.java.
|
static |
Estimates the parameter \(n\) of the Student \(t\)-distribution using the maximum likelihood method, from the \(m\) observations.
\(x[i]\), \(i = 0, 1,…, m-1\). The estimate is returned in a one-element array.
| x | the list of observations to use to evaluate parameters |
| m | the number of observations to use to evaluate parameters |
Definition at line 265 of file StudentDist.java.
| int umontreal.ssj.probdist.StudentDist.getN | ( | ) |
Returns the parameter \(n\) associated with this object.
Definition at line 359 of file StudentDist.java.
| double[] umontreal.ssj.probdist.StudentDist.getParams | ( | ) |
Return a table containing the parameter of the current distribution.
Implements umontreal.ssj.probdist.Distribution.
Definition at line 376 of file StudentDist.java.
| double umontreal.ssj.probdist.StudentDist.getStandardDeviation | ( | ) |
Returns the standard deviation.
Reimplemented from umontreal.ssj.probdist.ContinuousDistribution.
Definition at line 140 of file StudentDist.java.
|
static |
Computes and returns the standard deviation of the Student.
\(t\)-distribution with parameter \(n\).
Definition at line 352 of file StudentDist.java.
| double umontreal.ssj.probdist.StudentDist.getVariance | ( | ) |
Returns the variance.
Reimplemented from umontreal.ssj.probdist.ContinuousDistribution.
Definition at line 136 of file StudentDist.java.
|
static |
Computes and returns the variance \(\mbox{Var}[X] = n/(n - 2)\) of the Student \(t\)-distribution with parameter \(n\).
Definition at line 340 of file StudentDist.java.
| double umontreal.ssj.probdist.StudentDist.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.ContinuousDistribution.
Reimplemented in umontreal.ssj.probdist.StudentDistQuick.
Definition at line 128 of file StudentDist.java.
|
static |
Returns the inverse \(x = F^{-1}(u)\) of Student.
\(t\)-distribution function with \(n\) degrees of freedom. Gives 13 decimal digits of precision for \(n \le10^5\), and at least 9 decimal digits of precision for \(n > 10^5\).
Reimplemented in umontreal.ssj.probdist.StudentDistQuick.
Definition at line 233 of file StudentDist.java.
| void umontreal.ssj.probdist.StudentDist.setN | ( | int | n | ) |
Sets the parameter \(n\) associated with this object.
Definition at line 366 of file StudentDist.java.
| String umontreal.ssj.probdist.StudentDist.toString | ( | ) |
Returns a String containing information about the current distribution.
Definition at line 384 of file StudentDist.java.