Class Uniform

Discrete uniform distribution: A discrete probability distribution where a finite number of values are equally likely to be observed.

Constructors

Properties

Methods

Constructors

Properties

a: number

The minimum of the distribution.

b: number

The maximum of the distribution.

mean: number

The mean of the distribution.

n: number

The number of outcomes.

stdev: number

The standard deviation of the distribution.

variance: number

The variance of the distribution.

Methods

  • Get the probability of x.

    Parameters

    • x: number

      The value. (x must be an integer and a≤x≤b)

    Returns number

    Return P(X=x).

  • Get the probability of a value less than or equal to x.

    Parameters

    • x: number

      The value. (x must be an integer and a≤x≤b)

    Returns number

    Return P(X≤x).