Documentation of 'org.statcato.random.BinomialSample' Java class
BinomialSample
org.statcato.random

Class BinomialSample

  • All Implemented Interfaces:
    java.io.Serializable


    public class BinomialSample
    extends java.util.Random
    A random sampler for a binomial distribution defined by the number of trials and event probability.
    Since:
    1.0
    See Also:
    Serialized Form
    • Constructor Summary

      Constructors 
      Constructor and Description
      BinomialSample(int trials, double probability)
      Constructor.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method and Description
      int nextSample()
      Returns the next random sample
      • Methods inherited from class java.util.Random

        doubles, doubles, doubles, doubles, ints, ints, ints, ints, longs, longs, longs, longs, nextBoolean, nextBytes, nextDouble, nextFloat, nextGaussian, nextInt, nextInt, nextLong, setSeed
      • Methods inherited from class java.lang.Object

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

      • BinomialSample

        public BinomialSample(int trials,
                              double probability)
        Constructor.
        Parameters:
        trials - number of trials
        probability - event probability
    • Method Detail

      • nextSample

        public int nextSample()
        Returns the next random sample
        Returns:
        int number of successes

DMelt 3.0 © DataMelt by jWork.ORG

You see the box below because you did not login.