|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--Utility.RandomNumber | +--Utility.Poisson
The Poisson class is used to generate random variables
from a Poisson distribution.
The Poisson distribution is often used to model the
total number of arrivals during a fixed time period.
This is a discrete distribution.
Tests Performed
1000 samples were generated and the means and variances
were examined. Subjectively, they seemed correct.
A goodness of fit test was performed with 100 samples
and 10 intervals. It seems to fail about 16/20 times.
This might be due to the fact that it is a discrete
distribution and it wasn't possible to make the probabilies
for the different intervals identical.
Exponential
Constructor Summary | |
Poisson(double mean)
The Poisson constructor initializes the Poisson distribution by setting the distribution's mean. |
Method Summary | |
double |
getMean()
|
double |
sampleDouble()
Draw a random sample. |
int |
sampleInt()
Generate a random variable, an int, from the poisson 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 Poisson(double mean)
mean
- The mean of the poisson distribution.
The mean alone characterizes the poisson distribution.Method Detail |
public double getMean()
public int sampleInt()
sampleInt
in class RandomNumber
public double sampleDouble()
RandomNumber
sampleDouble
in class RandomNumber
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |