public class BinomialDistribution extends DiscreteDistribution
Meaning: | Probability for \(i\) successes in \(n\) Bernoulli trials with the parameter \(q(0 \le q \le 1)\) |
---|---|
Parameters: |
|
Distribution: | \(P(X=i) = \binom{n}{i} \cdot q^i \cdot (1-q)^{n-i} \) |
Expected value: | \(E[X]= nq \) |
Variance: | \(VAR[X]= nq(1-q)\) |
Coefficient of variation: | \(c_T= \sqrt{ \frac{ 1-q }{nq} }\) |
Generating func.: | \(G(z)= (1-q+qz)^n \) |
Parser example: |
[...].Distribution = Binomial
|
rng
CREATE_INSTANCE_METHOD_NAME
Constructor and Description |
---|
BinomialDistribution(double mean,
double variance) |
BinomialDistribution(double mean,
double variance,
RandomNumberGenerator rng) |
BinomialDistribution(double p,
int upperBound) |
BinomialDistribution(double p,
int upperBound,
RandomNumberGenerator rng) |
Modifier and Type | Method and Description |
---|---|
static BinomialDistribution |
createInstance(SimNode ownNode,
Parameters pars,
RandomNumberGenerator rng)
as required by
ReflectionConstructable |
int |
next()
Create random numbers
|
getDefaultRNG, getRandomNumberGenerator, reset
public BinomialDistribution(double mean, double variance, RandomNumberGenerator rng)
public BinomialDistribution(double mean, double variance)
public BinomialDistribution(double p, int upperBound, RandomNumberGenerator rng)
public BinomialDistribution(double p, int upperBound)
public static BinomialDistribution createInstance(SimNode ownNode, Parameters pars, RandomNumberGenerator rng)
ReflectionConstructable
public int next()
DiscreteDistribution
next
in class DiscreteDistribution