| Modifier and Type | Field and Description |
|---|---|
| private final int | numberOfTrials
The number of trials. |
| private final double | probabilityOfSuccess
The probability of success. |
| private static final long | serialVersionUID
Hides org. |
| Access | Constructor and Description |
|---|---|
| public | BinomialDistribution(int
Number of trials. trials, double Probability of success. p)Create a binomial distribution with the given number of trials and probability of success. |
| public | BinomialDistribution(RandomGenerator
Random number generator. rng, int Number of trials. trials, double Probability of success. p)Creates a binomial distribution. |
| Modifier and Type | Method and Description |
|---|---|
| public double | cumulativeProbability(int
the point at which the CDF is evaluated x)Implements org. For a random variable |
| public int | |
| public double | getNumericalMean()
Implements org. Use this method to get the numerical value of the mean of this distribution. |
| public double | getNumericalVariance()
Implements org. Use this method to get the numerical value of the variance of this distribution. |
| public double | Returns: the probability of success.Access the probability of success for this distribution. |
| public int | Returns: lower bound of the support (0 or the number of trials)Implements org. Access the lower bound of the support. |
| public int | Returns: upper bound of the support (number of trials or 0)Implements org. Access the upper bound of the support. |
| public boolean | Returns: trueImplements org. Use this method to get information about whether the support is connected, i.e. whether all integers between the lower and upper bound of the support are included in the support. |
| public double | logProbability(int
the point at which the PMF is evaluated x)Overrides org. For a random variable |
| public double | probability(int
the point at which the PMF is evaluated x)Implements org. For a random variable |
| numberOfTrials | back to summary |
|---|---|
| private final int numberOfTrials The number of trials. | |
| probabilityOfSuccess | back to summary |
|---|---|
| private final double probabilityOfSuccess The probability of success. | |
| serialVersionUID | back to summary |
|---|---|
| private static final long serialVersionUID Hides org. Serializable version identifier. | |
| BinomialDistribution | back to summary |
|---|---|
| public BinomialDistribution(int trials, double p) Create a binomial distribution with the given number of trials and probability of success. Note this constructor will implicitly create an instance of
| |
| BinomialDistribution | back to summary |
|---|---|
| public BinomialDistribution(RandomGenerator rng, int trials, double p) Creates a binomial distribution.
| |
| cumulativeProbability | back to summary |
|---|---|
| public double cumulativeProbability(int x) Implements org. Doc from org. For a random variable
| |
| getNumberOfTrials | back to summary |
|---|---|
| public int getNumberOfTrials() Access the number of trials for this distribution.
| |
| getNumericalMean | back to summary |
|---|---|
| public double getNumericalMean() Implements org. Doc from org. Use this method to get the numerical value of the mean of this
distribution.
For
| |
| getNumericalVariance | back to summary |
|---|---|
| public double getNumericalVariance() Implements org. Doc from org. Use this method to get the numerical value of the variance of this
distribution.
For
| |
| getProbabilityOfSuccess | back to summary |
|---|---|
| public double getProbabilityOfSuccess() Access the probability of success for this distribution.
| |
| getSupportLowerBound | back to summary |
|---|---|
| public int getSupportLowerBound() Implements org. Doc from org. Access the lower bound of the support. This method must return the same
value as
p = 1.
| |
| getSupportUpperBound | back to summary |
|---|---|
| public int getSupportUpperBound() Implements org. Doc from org. Access the upper bound of the support. This method must return the same
value as
p = 0.
| |
| isSupportConnected | back to summary |
|---|---|
| public boolean isSupportConnected() Implements org. Doc from org. Use this method to get information about whether the support is connected, i.e. whether all integers between the lower and upper bound of the support are included in the support. The support of this distribution is connected.
| |
| logProbability | back to summary |
|---|---|
| public double logProbability(int x) Overrides org. Doc from org. For a random variable
The default implementation simply computes the logarithm of
| |
| probability | back to summary |
|---|---|
| public double probability(int x) Implements org. Doc from org. For a random variable
| |