public class BinomialDistribution extends Object implements Distribution
| Constructor and Description |
|---|
BinomialDistribution(int n,
double p)
Constructor.
|
| Modifier and Type | Method and Description |
|---|---|
Double |
getCumulativeProbabilityAt(double x)
Returns the cumulative density function value at a given position.
|
Double |
getDescendingCumulativeProbabilityAt(double x)
Returns the cumulative density function value at a given position when
starting from the high values.
|
Double |
getMaxValueForProbability(double p)
The value after which the density function will be smaller than p.
|
Double |
getMinValueForProbability(double p)
The value before which the density function will be smaller than p.
|
Double |
getProbabilityAt(double x)
Returns the density function value at a given position.
|
Double |
getSmallestCumulativeProbabilityAt(double x)
Returns the cumulative density function value at a given position, starting from the low values if before the median, from the high otherwise.
|
Double |
getValueAtCumulativeProbability(double p)
The value after which the cumulative density function will be smaller
than p.
|
Double |
getValueAtDescendingCumulativeProbability(double p)
The value after which the cumulative density function will be smaller
than p when starting from high values.
|
boolean |
isCacheEmpty()
Indicates whether all caches are empty.
|
public BinomialDistribution(int n,
double p)
n - the number of trialsp - the probability of success of each trialpublic Double getProbabilityAt(double x)
DistributiongetProbabilityAt in interface Distributionx - the position of interestpublic Double getCumulativeProbabilityAt(double x) throws org.apache.commons.math.MathException
DistributiongetCumulativeProbabilityAt in interface Distributionx - the position of interestorg.apache.commons.math.MathException - if a MathException occurspublic Double getDescendingCumulativeProbabilityAt(double x) throws org.apache.commons.math.MathException
DistributiongetDescendingCumulativeProbabilityAt in interface Distributionx - the position of interestorg.apache.commons.math.MathException - if a MathException occurspublic boolean isCacheEmpty()
public Double getSmallestCumulativeProbabilityAt(double x) throws org.apache.commons.math.MathException
DistributiongetSmallestCumulativeProbabilityAt in interface Distributionx - the position of interestorg.apache.commons.math.MathException - if a MathException occurspublic Double getMaxValueForProbability(double p)
DistributiongetMaxValueForProbability in interface Distributionp - the probability of interestpublic Double getMinValueForProbability(double p)
DistributiongetMinValueForProbability in interface Distributionp - the probability of interestpublic Double getValueAtCumulativeProbability(double p) throws org.apache.commons.math.MathException
DistributiongetValueAtCumulativeProbability in interface Distributionp - the probability of interestorg.apache.commons.math.MathException - if a MathException occurspublic Double getValueAtDescendingCumulativeProbability(double p) throws org.apache.commons.math.MathException
DistributiongetValueAtDescendingCumulativeProbability in interface Distributionp - the probability of interestorg.apache.commons.math.MathException - if a MathException occursCopyright © 2016. All rights reserved.