|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
public interface IntegerDistribution
Interface for discrete distributions of integer-valued random variables.
| Method Summary | |
|---|---|
double |
cumulativeProbability(int x)
For a random variable X whose values are distributed according
to this distribution, this method returns P(X <= x). |
double |
cumulativeProbability(int x0,
int x1)
For this distribution, X, this method returns
P(x0 <= X <= x1). |
int |
inverseCumulativeProbability(double p)
For this distribution, X, this method returns the largest
x such that P(X <= x) <= p. |
double |
probability(int x)
For a random variable X whose values are distributed according
to this distribution, this method returns P(X = x). |
void |
reseedRandomGenerator(long seed)
Reseed the random generator used to generate samples. |
int |
sample()
Generate a random value sampled from this distribution. |
int[] |
sample(int sampleSize)
Generate a random sample from the distribution. |
| Methods inherited from interface org.apache.commons.math.distribution.DiscreteDistribution |
|---|
probability |
| Methods inherited from interface org.apache.commons.math.distribution.Distribution |
|---|
cumulativeProbability, cumulativeProbability, getNumericalMean, getNumericalVariance, isSupportConnected, isSupportLowerBoundInclusive, isSupportUpperBoundInclusive |
| Method Detail |
|---|
double probability(int x)
X whose values are distributed according
to this distribution, this method returns P(X = x). In other
words, this method represents the probability mass function for the
distribution.
x - Value at which the probability density function is evaluated.
x.double cumulativeProbability(int x)
X whose values are distributed according
to this distribution, this method returns P(X <= x). In other
words, this method represents the probability distribution function, or
PDF for the distribution.
x - Value at which the PDF is evaluated.
double cumulativeProbability(int x0,
int x1)
X, this method returns
P(x0 <= X <= x1).
x0 - the inclusive, lower boundx1 - the inclusive, upper bound
java.lang.IllegalArgumentException - if x0 > x1.int inverseCumulativeProbability(double p)
X, this method returns the largest
x such that P(X <= x) <= p.
m, with positive
probability under (the density of) X, then m - 1 is
returned by inverseCumulativeProbability(0). If there is
no such value m, Integer.MIN_VALUE is returned.
M, such that
P(X <= M) = 1, then M is returned by
inverseCumulativeProbability(1).
If there is no such value, M, Integer.MAX_VALUE is
returned.
p - Cumulative probability.
x such that P(X < x) <= p.
java.lang.IllegalArgumentException - if p is not between 0 and 1
(inclusive).void reseedRandomGenerator(long seed)
seed - New seed.int sample()
int[] sample(int sampleSize)
sampleSize - number of random values to generate.
NotStrictlyPositiveException - if sampleSize is not positive.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||