javanpst.distributions.common.continuous
Class ChiSquareDistribution
- java.lang.Object
-
- javanpst.distributions.common.continuous.ChiSquareDistribution
-
- All Implemented Interfaces:
- Distribution
public final class ChiSquareDistribution extends java.lang.Object implements Distribution
A chi-square distribution. Uses a inner gamma distribution.
-
-
Constructor Summary
Constructors Constructor and Description ChiSquareDistribution()Default builder.ChiSquareDistribution(ChiSquareDistribution old)Copy constructor Creates a copy of a given chi-square distributionChiSquareDistribution(int degree)Builder.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method and Description doublecomputeCumulativeProbability(double value)Computes cumulative probability at a given point of the chi-square distribution.doublecomputeProbability(double value)Computes mass probability at a given point of the chi-square distribution.doublecomputeRightTailProbability(double value)Computes the right tail of chi-square distributionintgetDegree()Gets the number of degrees of freedom of the distributionvoidsetDegree(int value)Sets the number of degrees of freedom of the distributionjava.lang.StringtoString()To String method.
-
-
-
Constructor Detail
-
ChiSquareDistribution
public ChiSquareDistribution()
Default builder. Creates a chi-square distribution with 1 degree of freedom
-
ChiSquareDistribution
public ChiSquareDistribution(int degree)
Builder. Creates a chi-square distribution with specified degrees of freedom- Parameters:
degree- degrees of freedom
-
ChiSquareDistribution
public ChiSquareDistribution(ChiSquareDistribution old)
Copy constructor Creates a copy of a given chi-square distribution- Parameters:
old- chi-square distribution to copy
-
-
Method Detail
-
getDegree
public int getDegree()
Gets the number of degrees of freedom of the distribution- Returns:
- number of degrees of freedom
-
setDegree
public void setDegree(int value)
Sets the number of degrees of freedom of the distribution- Parameters:
value- number of degrees of freedom (positive)
-
computeProbability
public double computeProbability(double value)
Computes mass probability at a given point of the chi-square distribution.- Specified by:
computeProbabilityin interfaceDistribution- Parameters:
value- point selected- Returns:
- mass probability at 'value'
-
computeCumulativeProbability
public double computeCumulativeProbability(double value)
Computes cumulative probability at a given point of the chi-square distribution.- Specified by:
computeCumulativeProbabilityin interfaceDistribution- Parameters:
value- point selected- Returns:
- cumulative probability at 'value'
-
computeRightTailProbability
public double computeRightTailProbability(double value)
Computes the right tail of chi-square distribution- Parameters:
value- point selected- Returns:
- The Chi Square right tail value
-
toString
public java.lang.String toString()
To String method.- Overrides:
toStringin classjava.lang.Object- Returns:
- string representation of the distribution
-
-
DMelt 3.0 © DataMelt by jWork.ORG