gov.sandia.cognition.statistics.distribution
Class BinomialDistribution.CDF

java.lang.Object
  extended by gov.sandia.cognition.util.AbstractCloneableSerializable
      extended by gov.sandia.cognition.statistics.AbstractDistribution<NumberType>
          extended by gov.sandia.cognition.statistics.AbstractClosedFormUnivariateDistribution<Number>
              extended by gov.sandia.cognition.statistics.distribution.BinomialDistribution
                  extended by gov.sandia.cognition.statistics.distribution.BinomialDistribution.CDF
All Implemented Interfaces:
Evaluator<Number,Double>, Vectorizable, ClosedFormComputableDistribution<Number>, ClosedFormCumulativeDistributionFunction<Number>, ClosedFormDiscreteUnivariateDistribution<Number>, ClosedFormDistribution<Number>, ClosedFormUnivariateDistribution<Number>, ComputableDistribution<Number>, CumulativeDistributionFunction<Number>, DiscreteDistribution<Number>, Distribution<Number>, DistributionWithMean<Number>, EstimableDistribution<Number,BinomialDistribution>, UnivariateDistribution<Number>, CloneableSerializable, Serializable, Cloneable
Enclosing class:
BinomialDistribution

public static class BinomialDistribution.CDF
extends BinomialDistribution
implements ClosedFormCumulativeDistributionFunction<Number>

CDF of the Binomial distribution, which is the probability of getting up to "x" successes in "N" trials with a Bernoulli probability of "p"

See Also:
Serialized Form

Nested Class Summary
 
Nested classes/interfaces inherited from class gov.sandia.cognition.statistics.distribution.BinomialDistribution
BinomialDistribution.CDF, BinomialDistribution.MaximumLikelihoodEstimator, BinomialDistribution.PMF
 
Field Summary
 
Fields inherited from class gov.sandia.cognition.statistics.distribution.BinomialDistribution
DEFAULT_N, DEFAULT_P
 
Constructor Summary
BinomialDistribution.CDF()
          Default constructor.
BinomialDistribution.CDF(BinomialDistribution other)
          Creates a new instance of CDF
BinomialDistribution.CDF(int N, double p)
          Creates a new instance of BinomialDistribution
 
Method Summary
static double evaluate(int N, int k, double p)
          Evaluates the CDF for integer values of x, N, and double p
 Double evaluate(Number input)
          Evaluates the function on the given input and returns the output.
 BinomialDistribution.CDF getCDF()
          Gets the CDF of a scalar distribution.
 
Methods inherited from class gov.sandia.cognition.statistics.distribution.BinomialDistribution
clone, convertFromVector, convertToVector, getDomain, getDomainSize, getEstimator, getMaxSupport, getMean, getMinSupport, getN, getP, getProbabilityFunction, getVariance, sample, setN, setP
 
Methods inherited from class gov.sandia.cognition.statistics.AbstractDistribution
sample
 
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface gov.sandia.cognition.math.matrix.Vectorizable
clone, convertFromVector, convertToVector
 
Methods inherited from interface gov.sandia.cognition.statistics.UnivariateDistribution
getMaxSupport, getMinSupport, getVariance
 
Methods inherited from interface gov.sandia.cognition.statistics.DistributionWithMean
getMean
 
Methods inherited from interface gov.sandia.cognition.statistics.Distribution
sample, sample
 

Constructor Detail

BinomialDistribution.CDF

public BinomialDistribution.CDF()
Default constructor.


BinomialDistribution.CDF

public BinomialDistribution.CDF(int N,
                                double p)
Creates a new instance of BinomialDistribution

Parameters:
N - Total number of experiments, must be greater than zero
p - Probability of a positive outcome (Bernoulli probability), [0,1]

BinomialDistribution.CDF

public BinomialDistribution.CDF(BinomialDistribution other)
Creates a new instance of CDF

Parameters:
other - Underlying Binomial PMF to use
Method Detail

evaluate

public Double evaluate(Number input)
Description copied from interface: Evaluator
Evaluates the function on the given input and returns the output.

Specified by:
evaluate in interface Evaluator<Number,Double>
Parameters:
input - The input to evaluate.
Returns:
The output produced by evaluating the input.

evaluate

public static double evaluate(int N,
                              int k,
                              double p)
Evaluates the CDF for integer values of x, N, and double p

Parameters:
k - Number of successful trials
N - Total number of possibilities in the distribution
p - Bernoulli probability of a positive experiment outcome
Returns:
Value of the Binomial CDF(N,n,p)

getCDF

public BinomialDistribution.CDF getCDF()
Description copied from interface: UnivariateDistribution
Gets the CDF of a scalar distribution.

Specified by:
getCDF in interface ClosedFormUnivariateDistribution<Number>
Specified by:
getCDF in interface UnivariateDistribution<Number>
Overrides:
getCDF in class BinomialDistribution
Returns:
CDF of the scalar distribution.