umontreal.iro.lecuyer.probdist
Class StudentDistQuick
- java.lang.Object
-
- umontreal.iro.lecuyer.probdist.ContinuousDistribution
-
- umontreal.iro.lecuyer.probdist.StudentDist
-
- umontreal.iro.lecuyer.probdist.StudentDistQuick
-
- All Implemented Interfaces:
- Distribution
public class StudentDistQuick extends StudentDist
Extends the classStudentDistfor the Student t-distribution. Uses methods that are faster but less precise thanStudentDist.
-
-
Field Summary
-
Fields inherited from class umontreal.iro.lecuyer.probdist.ContinuousDistribution
decPrec
-
-
Constructor Summary
Constructors Constructor and Description StudentDistQuick(int n)Constructs a StudentDistQuick object with n degrees of freedom.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method and Description doublebarF(double x)Returns the complementary distribution function.static doublebarF(int n, double x)Computes the complementary distribution function bar(F)(x).doublecdf(double x)Returns the distribution function F(x).static doublecdf(int n, double x)Returns an approximation of the Student t-distribution function with n degrees of freedom.doubleinverseF(double u)Returns the inverse distribution function x = F-1(u).static doubleinverseF(int n, double u)Returns an approximation of F-1(u), where F is the Student t-distribution function with n degrees of freedom.-
Methods inherited from class umontreal.iro.lecuyer.probdist.StudentDist
cdf2, density, density, getInstanceFromMLE, getMean, getMean, getMLE, getN, getParams, getStandardDeviation, getStandardDeviation, getVariance, getVariance, setN, toString
-
Methods inherited from class umontreal.iro.lecuyer.probdist.ContinuousDistribution
getXinf, getXsup, inverseBisection, inverseBrent, setXinf, setXsup
-
-
-
-
Constructor Detail
-
StudentDistQuick
public StudentDistQuick(int n)
Constructs a StudentDistQuick object with n degrees of freedom.
-
-
Method Detail
-
cdf
public double cdf(double x)
Description copied from interface:DistributionReturns the distribution function F(x).- Specified by:
cdfin interfaceDistribution- Overrides:
cdfin classStudentDist- Parameters:
x- value at which the distribution function is evaluated- Returns:
- distribution function evaluated at x
-
barF
public double barF(double x)
Description copied from class:ContinuousDistributionReturns the complementary distribution function. The default implementation computes bar(F)(x) = 1 - F(x).- Specified by:
barFin interfaceDistribution- Overrides:
barFin classStudentDist- Parameters:
x- value at which the complementary distribution function is evaluated- Returns:
- complementary distribution function evaluated at x
-
inverseF
public double inverseF(double u)
Description copied from class:ContinuousDistributionReturns the inverse distribution function x = F-1(u). Restrictions: u∈[0, 1].- Specified by:
inverseFin interfaceDistribution- Overrides:
inverseFin classStudentDist- Parameters:
u- value at which the inverse distribution function is evaluated- Returns:
- the inverse distribution function evaluated at u
-
cdf
public static double cdf(int n, double x)Returns an approximation 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.
-
barF
public static double barF(int n, double x)Computes the complementary distribution function bar(F)(x).
-
inverseF
public 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. Gives at least 5 decimal digits of precision when n >= 3 . Uses exact formulae for n = 1 and n = 2.
-
-
DMelt 3.0 © DataMelt by jWork.ORG