Class 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:
    Wikipedia: Binomial distribution
    • Constructor Summary

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

      All Methods Instance Methods Concrete Methods 
      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 entropy()
      Gets the entropy of this distribution.
      double kurtosis()
      Gets the excess kurtosis of this distribution.
      double mean()
      Gets the mean of this distribution.
      double median()
      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 skew()
      Gets the skewness of this distribution.
      double variance()
      Gets the variance of this distribution.