Class BinomialDistribution

java.lang.Object
dev.nm.stat.distribution.univariate.BinomialDistribution
All Implemented Interfaces:
ProbabilityDistribution

public class BinomialDistribution extends Object implements ProbabilityDistribution
The binomial distribution is the discrete probability distribution of the number of successes in a sequence of n independent yes/no experiments, each of which yields success with probability p. The binomial distribution is frequently used to model the number of successes in a sample of size n drawn with replacement from a population of size N. For N much larger than n, the binomial distribution is a good approximation of hypergeometric distribution.
See Also:
  • Constructor Summary

    Constructors
    Constructor
    Description
    BinomialDistribution(int n, double p)
    Construct a Binomial distribution.
  • Method Summary

    Modifier and Type
    Method
    Description
    double
    cdf(double x)
    Gets the cumulative probability F(x) = Pr(X ≤ x).
    double
    density(double x)
    This is the probability mass function.
    double
    Gets the entropy of this distribution.
    double
    Gets the excess kurtosis of this distribution.
    double
    Gets the mean of this distribution.
    double
    Gets the median of this distribution.
    double
    moment(double t)
    The moment generating function is the expected value of etX.
    double
    quantile(double u)
    Gets the quantile, the inverse of the cumulative distribution function.
    double
    Gets the skewness of this distribution.
    double
    Gets the variance of this distribution.

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait