jhplot.math.num.pdf
Class TDistribution
- java.lang.Object
-
- jhplot.math.num.pdf.ContinuousDistribution
-
- jhplot.math.num.pdf.TDistribution
-
- All Implemented Interfaces:
- Distribution
public class TDistribution extends ContinuousDistribution
Student's t distribution (1).
References:
- Eric W. Weisstein. "t Distribution." From MathWorld--A Wolfram Web Resource. http://mathworld.wolfram.com/Studentst-Distribution.html
-
-
Constructor Summary
Constructors Constructor and Description TDistribution()Default constructor.TDistribution(double df)Create a distribution with the given degrees of freedom.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method and Description doublecumulativeProbability(double x)The CDF for this distribution.doublegetDegreesOfFreedom()Access the degrees of freedom.doubleinverseCumulativeProbability(double p)The inverse CDF for this distribution.voidsetDegreesOfFreedom(double df)Modify the degrees of freedom.
-
-
-
Constructor Detail
-
TDistribution
public TDistribution()
Default constructor. Degrees of freedom is set to 1.
-
TDistribution
public TDistribution(double df)
Create a distribution with the given degrees of freedom.- Parameters:
df- the degrees of freedom.
-
-
Method Detail
-
cumulativeProbability
public double cumulativeProbability(double x) throws NumericExceptionThe CDF for this distribution. This method returns P(X < x).- Specified by:
cumulativeProbabilityin classContinuousDistribution- Parameters:
x- the value at which the CDF is evaluated.- Returns:
- CDF for this distribution.
- Throws:
NumericException- if the cumulative probability can not be computed.
-
getDegreesOfFreedom
public double getDegreesOfFreedom()
Access the degrees of freedom.- Returns:
- the degrees of freedom.
-
inverseCumulativeProbability
public double inverseCumulativeProbability(double p) throws NumericExceptionThe inverse CDF for this distribution. This method returns x such that, P(X < x) = p.- Specified by:
inverseCumulativeProbabilityin classContinuousDistribution- Parameters:
p- the cumulative probability.- Returns:
- x
- Throws:
NumericException- if the inverse cumulative probability can not be computed.
-
setDegreesOfFreedom
public void setDegreesOfFreedom(double df)
Modify the degrees of freedom.- Parameters:
df- the new degrees of freedom value.
-
-
DMelt 3.0 © DataMelt by jWork.ORG