public static class BinomialDistribution.CDF extends BinomialDistribution implements ClosedFormCumulativeDistributionFunction<java.lang.Number>
BinomialDistribution.CDF, BinomialDistribution.MaximumLikelihoodEstimator, BinomialDistribution.PMF
DEFAULT_N, DEFAULT_P
Constructor and Description |
---|
CDF()
Default constructor.
|
CDF(BinomialDistribution other)
Creates a new instance of CDF
|
CDF(int N,
double p)
Creates a new instance of BinomialDistribution
|
Modifier and Type | Method and Description |
---|---|
static double |
evaluate(int N,
int k,
double p)
Evaluates the CDF for integer values of x, N, and double p
|
java.lang.Double |
evaluate(java.lang.Number input)
Evaluates the function on the given input and returns the output.
|
BinomialDistribution.CDF |
getCDF()
Gets the CDF of a scalar distribution.
|
clone, convertFromVector, convertToVector, getDomain, getDomainSize, getEstimator, getMaxSupport, getMean, getMeanAsDouble, getMinSupport, getN, getP, getProbabilityFunction, getVariance, sampleAsInt, sampleInto, sampleInto, setN, setP
sampleAsInts
sample, sample
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
clone, convertFromVector, convertToVector
getMaxSupport, getMeanAsDouble, getMinSupport, getVariance
getMean
sample, sample, sampleInto
public CDF()
public CDF(int N, double p)
N
- Total number of experiments, must be greater than zerop
- Probability of a positive outcome (Bernoulli probability), [0,1]public CDF(BinomialDistribution other)
other
- Underlying Binomial PMF to usepublic java.lang.Double evaluate(java.lang.Number input)
Evaluator
public static double evaluate(int N, int k, double p)
k
- Number of successful trialsN
- Total number of possibilities in the distributionp
- Bernoulli probability of a positive experiment outcomepublic BinomialDistribution.CDF getCDF()
UnivariateDistribution
getCDF
in interface ClosedFormUnivariateDistribution<java.lang.Number>
getCDF
in interface UnivariateDistribution<java.lang.Number>
getCDF
in class BinomialDistribution