Class IntBinomial

    • Constructor Detail

      • IntBinomial

        public IntBinomial()
      • IntBinomial

        public IntBinomial​(int n,
                           double p)
    • Method Detail

      • setDistribution

        protected void setDistribution​(org.apache.commons.math3.distribution.IntegerDistribution distribution)
        Description copied from class: IntDistribution
        Sets the discrete distribution to use.
        Overrides:
        setDistribution in class IntDistribution
      • getProbabilityOfSuccess

        public double getProbabilityOfSuccess()
      • setProbabilityOfSuccess

        public void setProbabilityOfSuccess​(double probOfSuccess)
                                     throws org.apache.commons.math3.exception.OutOfRangeException
        Sets the probability of success in a single trial.
        Parameters:
        probOfSuccess - The success probability.
        Throws:
        org.apache.commons.math3.exception.OutOfRangeException - If the supplied probability is not in the interval [0,1].
      • getNumTrials

        public int getNumTrials()
      • setNumTrials

        public void setNumTrials​(int numTrials)
                          throws org.apache.commons.math3.exception.NotPositiveException
        Sets the number of trails of the Bernoulli experiment.
        Parameters:
        numTrials - The number of trials.
        Throws:
        org.apache.commons.math3.exception.NotPositiveException - If the supplied value was negative.