Class Binomial

Binomial distribution: A discrete probability distribution that describes the number of successes in a fixed number of Bernoulli trials, each with the same probability of success p.

Constructors

Properties

Methods

Constructors

Properties

mean: number

The mean of the distribution.

n: number

The number of trials.

p: number

The probability of a success.

q: number

The probability of a failure.

stdev: number

The standard deviation of the distribution.

variance: number

The variance of the distribution.

Methods

  • Get the probability of exactly x successes in n trials.

    Parameters

    • x: number

      The number of successes. (x must be an integer and 0≤x≤n)

    Returns number

    Return P(X=x).