Home Reference Source Repository
public class | source

Binomial

Extends:

Distribution → Binomial

Direct Subclass:

Bernoulli

The Binomial Distribution is a discrete probability distribution with parameters n = number of trials and p = probability of success. See: Binomial Distribution

Static Method Summary

Static Public Methods
public static

cdf(k: number, params: Object): number

Calculate the probability of k or less in B(n, p).

public static

kurtosis(params: Object): number

Get the kurtosis of B(n,p).

public static

mean(params: Object): number

Get the mean of B(n,p).

public static

pdf(k: number, params: Object): number

Calculate the probability of exaclty k in B(n, p).

public static

random(params: Object): number

Generate a random value from B(n, p).

public static

relStdDev(params: Object): number

Get the relative standard deviation of B(n,p).

public static

skewness(params: Object): number

Get the skewness of B(n,p).

public static

stdDev(params: Object): number

Get the standard deviation of B(n,p).

public static

variance(params: Object): number

Get the variance of B(n,p).

Inherited Summary

From class Distribution
public static

Generate a uniform random variable.

public static

sample(k: number, params: Object): Array<number>

Generate an array of k random values.

public

The distribution kurtosis.

public

The distribution mean.

public

The valitated distribution parameters.

public

The distribution relative standard deviation.

public

The distribution skewness.

public

The distribution standard deviation.

public

The distribution variance.

public

Calculate the probability of getting x or less.

public

Calculate the probability of exaclty x.

public

Generate a random value.

public

Generate an array of n random values.

Static Public Methods

public static cdf(k: number, params: Object): number source

Calculate the probability of k or less in B(n, p).

Override:

Distribution#cdf

Params:

NameTypeAttributeDescription
k number

The value to predict.

params Object

The distribution parameters.

Return:

number

The probability getting a value of k or less from B(n,p).

public static kurtosis(params: Object): number source

Get the kurtosis of B(n,p).

Override:

Distribution#kurtosis

Params:

NameTypeAttributeDescription
params Object

The distribution parameters.

Return:

number

The kurtosis of B(n,p).

public static mean(params: Object): number source

Get the mean of B(n,p).

Override:

Distribution#mean

Params:

NameTypeAttributeDescription
params Object

The distribution parameters.

Return:

number

The mean of B(n,p).

public static pdf(k: number, params: Object): number source

Calculate the probability of exaclty k in B(n, p).

Override:

Distribution#pdf

Params:

NameTypeAttributeDescription
k number

The value to predict.

params Object

The distribution parameters.

Return:

number

The probability of k happening in B(n,p).

public static random(params: Object): number source

Generate a random value from B(n, p).

Override:

Distribution#random

Params:

NameTypeAttributeDescription
params Object

The distribution parameters.

Return:

number

The random value from B(n,p).

public static relStdDev(params: Object): number source

Get the relative standard deviation of B(n,p).

Override:

Distribution#relStdDev

Params:

NameTypeAttributeDescription
params Object

The distribution parameters.

Return:

number

The relative standard deviation of B(n,p).

public static skewness(params: Object): number source

Get the skewness of B(n,p).

Override:

Distribution#skewness

Params:

NameTypeAttributeDescription
params Object

The distribution parameters.

Return:

number

The skewness of B(n,p).

public static stdDev(params: Object): number source

Get the standard deviation of B(n,p).

Override:

Distribution#stdDev

Params:

NameTypeAttributeDescription
params Object

The distribution parameters.

Return:

number

The standard deviation of B(n,p).

public static variance(params: Object): number source

Get the variance of B(n,p).

Override:

Distribution#variance

Params:

NameTypeAttributeDescription
params Object

The distribution parameters.

Return:

number

The variance of B(n,p).