net.sf.doodleproject.numerics4j.statistics.distribution
Class TDistribution

java.lang.Object
  extended by net.sf.doodleproject.numerics4j.statistics.distribution.ContinuousDistribution
      extended by net.sf.doodleproject.numerics4j.statistics.distribution.TDistribution
All Implemented Interfaces:
Distribution

public class TDistribution
extends ContinuousDistribution

Student's t distribution (1).

References:

  1. Eric W. Weisstein. "t Distribution." From MathWorld--A Wolfram Web Resource. http://mathworld.wolfram.com/Studentst-Distribution.html

Version:
$Revision: 1.2 $ $Date: 2007/10/25 04:44:10 $

Constructor Summary
TDistribution()
          Default constructor.
TDistribution(double df)
          Create a distribution with the given degrees of freedom.
 
Method Summary
 double cumulativeProbability(double x)
          The CDF for this distribution.
 double getDegreesOfFreedom()
          Access the degrees of freedom.
 double inverseCumulativeProbability(double p)
          The inverse CDF for this distribution.
 void setDegreesOfFreedom(double df)
          Modify the degrees of freedom.
 
Methods inherited from class net.sf.doodleproject.numerics4j.statistics.distribution.ContinuousDistribution
findInverseCumulativeProbability
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

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 NumericException
The CDF for this distribution. This method returns P(X < x).

Specified by:
cumulativeProbability in class ContinuousDistribution
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 NumericException
The inverse CDF for this distribution. This method returns x such that, P(X < x) = p.

Specified by:
inverseCumulativeProbability in class ContinuousDistribution
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.


Copyright 2004-2004-2007 DoodleProject. All Rights Reserved.