java.lang.Object
net.finmath.functions.NonCentralChiSquaredDistribution
Implementation of the cumulative distribution function of the non-central Χ2 distribution.
 The implementation is that of Ding's algorithm, splitting the sum since the first term
 of the sum is not the largest one (and may be zero).
 The algorithm uses Kahan summation for the sums and limits the calculation time to avoid infinity loops.
 The method is currently intended to be used as a benchmark in unit tests only.
 Note: The implementation currently does not use an alternative algorithm
 in cases of high non-centrality, like Benton and Krishnamoorthy. Since the number
 of summation is limited, the method may be inaccurate for high non-centrality.
- Author:
- Christian Fries, Ralph Rudd
- 
Constructor SummaryConstructorsConstructorDescriptionNonCentralChiSquaredDistribution(double degreesOfFreedom, double nonCentrality)Create non-central Χ2 distribution (non-central chi-squared distribution).
- 
Method SummaryModifier and TypeMethodDescriptiondoublecumulativeDistribution(double x)Cumulative distribution function of the non-central Χ2 distributiondoubledouble
- 
Constructor Details- 
NonCentralChiSquaredDistributionpublic NonCentralChiSquaredDistribution(double degreesOfFreedom, double nonCentrality)Create non-central Χ2 distribution (non-central chi-squared distribution).- Parameters:
- degreesOfFreedom- The number of degrees of freedom, positive
- nonCentrality- The non-centrality parameter, not negative
 
 
- 
- 
Method Details- 
cumulativeDistributionpublic double cumulativeDistribution(double x)Cumulative distribution function of the non-central Χ2 distribution- Parameters:
- x- A sample point
- Returns:
- The probability of X being below x, given that X is non-central Χ2 distributed
 
- 
getDegreesOfFreedompublic double getDegreesOfFreedom()- Returns:
- The number of degrees of freedom
 
- 
getNonCentralitypublic double getNonCentrality()- Returns:
- The non-centrality parameter
 
 
-