|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES All Classes | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object edu.northwestern.at.utils.math.distributions.ChiSquare
public class ChiSquare
Chi-square distribution functions.
Constructor Summary | |
---|---|
protected |
ChiSquare()
Make class non-instantiable but inheritable. |
Method Summary | |
---|---|
static double |
chisquare(double chisq,
double df)
Compute probability for chi-square distribution. |
static double |
chisquareInverse(double p,
double df)
Compute percentage point for chi-square distribution. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
protected ChiSquare()
Method Detail |
---|
public static double chisquare(double chisq, double df)
chisq
- Percentage point of chi-square distributiondf
- Degrees of freedom
The probability is determined using the relationship between the incomplete gamma CDF and the chi-square distribution:
chisqprob(chisq,df) = incompleteGamma( chisq/2, df/2 )
The result is accurate to about 14 decimal digits.
public static double chisquareInverse(double p, double df)
p
- Probability level for which to compute
percentage pointdf
- Degrees of freedom
java.lang.IllegalArgumentException
- If df <= 0 or p very near zero or
p very near one. A tolerance of
1.0e-15 is used for testing the
value of p.
Implements the method of Best and Roberts (1975). The result accuracy varies, but should be good to at least 10 decimal digits in all cases.
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES All Classes | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |