float random(float min, float max)
Returns a uniformly distributed pseudorandom number between min and max
int irandom(int min, int max)
Returns a uniformly distributed integral pseudorandom number between min and max (inclusive).
double normal(double mu, double sigma)
Returns a pseudorandom number which is distributed according to a normal distribution with mean value mu and standard deviation sigma.
double lognormal(double mu, double sigma)
int distribution(float[] probabilities)
Returns an integral pseudorandom number according to the discrete distribution probabilities., The value i has the probability probabilities i for 0 ⇐ i < probabilities.length, the value probabilities.length has the remaining probability, i.e., the difference between the sum of probabilities and 1.
import org.apache.commons.math3.distribution.PoissonDistribution; double mean = 3.0; // lambda, the expected value PoissonDistribution poisson = new PoissonDistribution(mean); int value = poisson.sample();