    All Packages  Class Hierarchy  This Package  Previous  Next  Index

# Class JSci.maths.statistics.BinomialDistribution

    java.lang.Object
       |
       +----JSci.maths.statistics.ProbabilityDistribution
               |
               +----JSci.maths.statistics.BinomialDistribution

public final class BinomialDistribution
extends ProbabilityDistribution

The BinomialDistribution class provides an object for encapsulating binomial distributions.

##

BinomialDistribution(int, double)
  Constructs a binomial distribution.

##

cumulative(double)
  Cumulative binomial distribution function.
getProbability()
  Returns the probability.
getTrials()
  Returns the number of trials.
inverse(double)
  Inverse of the cumulative binomial distribution function.
probability(double)
  Probability density function of a binomial distribution.

##

BinomialDistribution

     public BinomialDistribution(int trials,
                                 double prob)

  Constructs a binomial distribution.

  Parameters:
    trials - the number of trials
    prob - the probability

##

getTrials

     public int getTrials()

  Returns the number of trials.

getProbability

     public double getProbability()

  Returns the probability.

probability

     public double probability(double X)

  Probability density function of a binomial distribution.

  Parameters:
    X - should be integer-valued
  Returns:
    the probability that a stochastic variable x has the value X, i.e. P(x=X)
  Overrides:
    probability in class ProbabilityDistribution

cumulative

     public double cumulative(double X)

  Cumulative binomial distribution function.

  Parameters:
    X - should be integer-valued
  Returns:
    the probability that a stochastic variable x is less then X, i.e. P(x<X)
  Overrides:
    cumulative in class ProbabilityDistribution

inverse

     public double inverse(double probability)

  Inverse of the cumulative binomial distribution function.

  Returns:
    the value X for which P(x<X)
  Overrides:
    inverse in class ProbabilityDistribution

    All Packages  Class Hierarchy  This Package  Previous  Next  Index