JSci.maths.statistics
Class ChiSqrDistribution

java.lang.Object
  extended by JSci.maths.statistics.ProbabilityDistribution
      extended by JSci.maths.statistics.ChiSqrDistribution

public final class ChiSqrDistribution
extends ProbabilityDistribution

The ChiSqrDistribution class provides an object for encapsulating chi-squared distributions.


Constructor Summary
ChiSqrDistribution(double dgr)
          Constructs a chi-squared distribution.
 
Method Summary
 double cumulative(double X)
          Cumulative chi-squared distribution function.
 double getDegreesOfFreedom()
          Returns the degrees of freedom.
 double inverse(double probability)
          Inverse of the cumulative chi-squared distribution function.
 double probability(double X)
          Probability density function of a chi-squared distribution.
 
Methods inherited from class JSci.maths.statistics.ProbabilityDistribution
checkRange, checkRange, findRoot
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ChiSqrDistribution

public ChiSqrDistribution(double dgr)
Constructs a chi-squared distribution.

Parameters:
dgr - degrees of freedom.
Method Detail

getDegreesOfFreedom

public double getDegreesOfFreedom()
Returns the degrees of freedom.


probability

public double probability(double X)
Probability density function of a chi-squared distribution.

Specified by:
probability in class ProbabilityDistribution
Returns:
the probability that a stochastic variable x has the value X, i.e. P(x=X).

cumulative

public double cumulative(double X)
Cumulative chi-squared distribution function.

Specified by:
cumulative in class ProbabilityDistribution
Returns:
the probability that a stochastic variable x is less then X, i.e. P(x<X).

inverse

public double inverse(double probability)
Inverse of the cumulative chi-squared distribution function.

Specified by:
inverse in class ProbabilityDistribution
Returns:
the value X for which P(x<X).