Documentation of 'Catalano.Statistics.Distributions.BinomialDistribution' Java class
BinomialDistribution
Catalano.Statistics.Distributions

Class BinomialDistribution

  • All Implemented Interfaces:
    IDiscreteDistribution


    public class BinomialDistribution
    extends java.lang.Object
    implements IDiscreteDistribution
    Binomial probability distribution. 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. Such a success/failure experiment is also called a Bernoulli experiment or Bernoulli trial; when n = 1, the binomial distribution is a Bernoulli distribution.
    • Constructor Summary

      Constructors 
      Constructor and Description
      BinomialDistribution(int trials)
      Initializes a new instance of the BinomialDistribution class.
      BinomialDistribution(int trials, double probability)
      Initializes a new instance of the BinomialDistribution class.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method and Description
      double DistributionFunction(int k)
      Gets the cumulative distribution function (cdf) for this distribution evaluated at point k.
      double Entropy()
      Gets the entropy for this distribution.
      int getNumberOfTrials()
      Gets the number of trials n for the distribution.
      double getProbability()
      Gets the success probability p for the distribution.
      double LogProbabilityMassFunction(int k)
      Gets the log-probability mass function (pmf) for this distribution evaluated at point x.
      double Mean()
      Gets the mean for this distribution.
      double ProbabilityMassFunction(int k)
      Gets the probability mass function (pmf) for this distribution evaluated at point x.
      double Variance()
      Gets the variance for this distribution.
      • Methods inherited from class java.lang.Object

        equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • BinomialDistribution

        public BinomialDistribution(int trials)
        Initializes a new instance of the BinomialDistribution class.
        Parameters:
        trials - The number of trials n.
      • BinomialDistribution

        public BinomialDistribution(int trials,
                                    double probability)
        Initializes a new instance of the BinomialDistribution class.
        Parameters:
        trials - The number of trials n.
        probability - The success probability p in each trial.
    • Method Detail

      • getNumberOfTrials

        public int getNumberOfTrials()
        Gets the number of trials n for the distribution.
        Returns:
        Number of trials.
      • getProbability

        public double getProbability()
        Gets the success probability p for the distribution.
        Returns:
        Success probability.
      • DistributionFunction

        public double DistributionFunction(int k)
        Description copied from interface: IDiscreteDistribution
        Gets the cumulative distribution function (cdf) for this distribution evaluated at point k. The Cumulative Distribution Function (CDF) describes the cumulative probability that a given value or any value smaller than it will occur.
        Specified by:
        DistributionFunction in interface IDiscreteDistribution
        Parameters:
        k - A single point in the distribution range.
        Returns:
        Result.
      • ProbabilityMassFunction

        public double ProbabilityMassFunction(int k)
        Description copied from interface: IDiscreteDistribution
        Gets the probability mass function (pmf) for this distribution evaluated at point x. The Probability Mass Function (PMF) describes the probability that a given value k will occur.
        Specified by:
        ProbabilityMassFunction in interface IDiscreteDistribution
        Parameters:
        k - A single point in the distribution range.
        Returns:
        The probability of k occurring in the current distribution.
      • LogProbabilityMassFunction

        public double LogProbabilityMassFunction(int k)
        Description copied from interface: IDiscreteDistribution
        Gets the log-probability mass function (pmf) for this distribution evaluated at point x. The Probability Mass Function (PMF) describes the probability that a given value k will occur.
        Specified by:
        LogProbabilityMassFunction in interface IDiscreteDistribution
        Parameters:
        k - A single point in the distribution range.
        Returns:
        The logarithm of the probability of k occurring in the current distribution.

DataMelt 3.0 © DataMelt by jWork.ORG

You see the box below because you did not login.