|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--Utility.RandomNumber | +--Utility.ChiSquare
ChiSquare is used to generate random variables from
the chi-squared distribution. A specific chi-squared
distribution is characterized by a single parameter,
the degrees of freedom.
This is a continuous distribution.
Tests Performed
1000 samples were generated and the means and variances
were examined. Subjectively, they seemed correct.
Goodness of fit tests where not performed.
Constructor Summary | |
ChiSquare(int degsFreedom)
ChiSquare constructor. |
Method Summary | |
double |
sampleDouble()
The sampleDouble function returns a random variable that is chosen from a chi-squared distribution with degrees of freedom as set in the constructor. |
int |
sampleInt()
The sampleInt function should not be called for this continuous distribution. |
Methods inherited from class Utility.RandomNumber |
goodnessOfFitTest, goodnessOfFitTest, randomMixer, resetRandomMixer, sample01 |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public ChiSquare(int degsFreedom)
degsFreedom
- The degrees of freedom of the distribution.Method Detail |
public double sampleDouble()
sampleDouble
in class RandomNumber
ChiSquare(int)
public int sampleInt()
sampleInt
in class RandomNumber
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |