Documentation of 'org.jquantlib.math.distributions.BinomialDistribution' Java class
BinomialDistribution
org.jquantlib.math.distributions

Class BinomialDistribution

  • All Implemented Interfaces:
    Ops.IntToDouble


    public class BinomialDistribution
    extends java.lang.Object
    implements Ops.IntToDouble
    Binomial Distribution

    In probability theory and statistics, 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. In fact, when n = 1, the binomial distribution is a Bernoulli distribution.

    The binomial distribution is the basis for the popular binomial test of statistical significance. A binomial distribution should not be confused with a bimodal distribution.

    See Also:
    Binomial Distribution
    • Constructor Summary

      Constructors 
      Constructor and Description
      BinomialDistribution(double p, int n)
      Constructor of the Binomial Distribution taking two arguments for initialization.
    • Method Summary

      All Methods Static Methods Instance Methods Concrete Methods 
      Modifier and Type Method and Description
      double op(int k)
      Computes the probability of k successful trials.
      static double PeizerPrattMethod2Inversion(double z, long n)
      Given an odd integer n and a real number z it returns p such that:
      • Methods inherited from class java.lang.Object

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

      • BinomialDistribution

        public BinomialDistribution(double p,
                                    int n)
        Constructor of the Binomial Distribution taking two arguments for initialization.
        Parameters:
        p - Probability of success of each trial
        n - Sequence of independent yes/no experiments
    • Method Detail

      • op

        public double op(int k)
        Computes the probability of k successful trials.
        Specified by:
        op in interface Ops.IntToDouble
        Parameters:
        k - Number of successful trials
        Returns:
        Math.exp(binomialCoefficientLn(nExp, k) + k * logP + (nExp-k) * logOneMinusP);
      • PeizerPrattMethod2Inversion

        public static double PeizerPrattMethod2Inversion(double z,
                                                         long n)
        Given an odd integer n and a real number z it returns p such that:
         1 - CumulativeBinomialDistribution((n-1)/2, n, p) = CumulativeNormalDistribution(z)
         
        Pre-condition: n must be odd

DataMelt 3.0 © DataMelt by jWork.ORG

Ads help maintain this website.