|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcommon.Poisson
public class Poisson
A Poisson distribution with mean and variance lambda. This is a distribution over non-negative integers. The probability of n is exp(-lambda) lambda^n / n!.
Constructor Summary | |
---|---|
Poisson()
Creates a new Poisson distribution with lambda = 1. |
|
Poisson(double lambda)
Creates a new Poisson distribution with the specifies lambda parameter. |
Method Summary | |
---|---|
double |
getLogProb(int n)
Returns the log probability of the integer n under this distribution. |
double |
getProb(int n)
Returns the probability of the integer n under this distribution. |
int |
sample()
Returns an integer sampled according to this distribution. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public Poisson()
public Poisson(double lambda)
Method Detail |
---|
public double getProb(int n)
getProb
in interface IntegerDist
public double getLogProb(int n)
getLogProb
in interface IntegerDist
public int sample()
http://www.columbia.edu/~ak2108/ta/summer2003/poisson1.c
sample
in interface IntegerDist
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |