Home Reference Source
public class | source

Probability

Collection for calculating probability using real numbers.

  • These methods can be used in the Matrix, Complex method chain.
  • This class cannot be called directly.

Static Method Summary

Static Public Methods
public static

Beta function.

public static

Cumulative distribution function (CDF) of beta distribution.

public static

betainc(x: number, a: number, b: number, tail: string): number

Incomplete beta function.

public static

Inverse function of cumulative distribution function (CDF) of beta distribution.

public static

Probability density function (PDF) of beta distribution.

public static

binocdf(x: number, n: number, p: number, tail: string): number

Cumulative distribution function (CDF) of binomial distribution.

public static

Inverse function of cumulative distribution function (CDF) of binomial distribution.

public static

Probability density function (PDF) of binomial distribution.

public static

Cumulative distribution function (CDF) of chi-square distribution.

public static

Inverse function of cumulative distribution function (CDF) of chi-square distribution.

public static

Probability density function (PDF) of chi-square distribution.

public static

Error function.

public static

Complementary error function.

public static

Inverse function of complementary error function.

public static

Inverse function of error function.

public static

Factorial function, x!.

public static

fcdf(x: number, d1: number, d2: number): number

Cumulative distribution function (CDF) of F-distribution.

public static

finv(p: number, d1: number, d2: number): number

Inverse function of cumulative distribution function (CDF) of F-distribution.

public static

fpdf(x: number, d1: number, d2: number): number

Probability density function (PDF) of F-distribution.

public static

Cumulative distribution function (CDF) of gamma distribution.

public static

Inverse function of cumulative distribution function (CDF) of gamma distribution.

public static

Gamma function.

public static

gammainc(x: number, a: number, tail: string): number

Incomplete gamma function.

public static

Log-gamma function.

public static

Probability density function (PDF) of the gamma distribution.

public static

Binomial coefficient, number of all combinations, nCk.

public static

Cumulative distribution function (CDF) of normal distribution.

public static

Inverse function of cumulative distribution function (CDF) of normal distribution.

public static

Probability density function (PDF) of normal distribution.

public static

Incomplete beta function lower side.

public static

p_gamma(x: number, a: number, gammaln_a: number): number

Incomplete gamma function lower side.

public static

poisscdf(k: number, lambda: number): number

Cumulative distribution function (CDF) of Poisson distribution.

public static

poissinv(p: number, lambda: number): number

Inverse function of cumulative distribution function (CDF) of Poisson distribution.

public static

poisspdf(k: number, lambda: number): number

Probability density function (PDF) of Poisson distribution.

public static

Incomplete beta function upper side.

public static

q_gamma(x: number, a: number, gammaln_a: number): number

Incomplete gamma function upper side.

public static

Cumulative distribution function (CDF) of Student's t-distribution.

public static

tdist(t: number, v: number, tails: number): number

Cumulative distribution function (CDF) of Student's t-distribution that can specify tail.

public static

Inverse of cumulative distribution function (CDF) of Student's t-distribution.

public static

Inverse of cumulative distribution function (CDF) of Student's t-distribution in two-sided test.

public static

Probability density function (PDF) of Student's t-distribution.

Static Public Methods

public static beta(x: number, y: number): number source

Beta function.

Params:

NameTypeAttributeDescription
x number
y number

Return:

number

public static betacdf(x: number, a: number, b: number): number source

Cumulative distribution function (CDF) of beta distribution.

Params:

NameTypeAttributeDescription
x number
a number
b number

Return:

number

public static betainc(x: number, a: number, b: number, tail: string): number source

Incomplete beta function.

Params:

NameTypeAttributeDescription
x number
a number
b number
tail string
  • optional
  • default: "lower"

lower (default) , "upper"

Return:

number

public static betainv(p: number, a: number, b: number): number source

Inverse function of cumulative distribution function (CDF) of beta distribution.

Params:

NameTypeAttributeDescription
p number
a number
b number

Return:

number

public static betapdf(x: number, a: number, b: number): number source

Probability density function (PDF) of beta distribution.

Params:

NameTypeAttributeDescription
x number
a number
b number

Return:

number

public static binocdf(x: number, n: number, p: number, tail: string): number source

Cumulative distribution function (CDF) of binomial distribution.

Params:

NameTypeAttributeDescription
x number
n number
p number
tail string
  • optional
  • default: "lower"

lower (default) , "upper"

Return:

number

public static binoinv(y: number, n: number, p: number): number source

Inverse function of cumulative distribution function (CDF) of binomial distribution.

Params:

NameTypeAttributeDescription
y number
n number
p number

Return:

number

public static binopdf(x: number, n: number, p: number): number source

Probability density function (PDF) of binomial distribution.

Params:

NameTypeAttributeDescription
x number
n number
p number

Return:

number

public static chi2cdf(x: number, k: number): number source

Cumulative distribution function (CDF) of chi-square distribution.

Params:

NameTypeAttributeDescription
x number
k number

The degrees of freedom. (DF)

Return:

number

public static chi2inv(p: number, k: number): number source

Inverse function of cumulative distribution function (CDF) of chi-square distribution.

Params:

NameTypeAttributeDescription
p number

Probability.

k number

The degrees of freedom. (DF)

Return:

number

public static chi2pdf(x: number, k: number): number source

Probability density function (PDF) of chi-square distribution.

Params:

NameTypeAttributeDescription
x number
k number

The degrees of freedom. (DF)

Return:

number

public static erf(x: number): number source

Error function.

Params:

NameTypeAttributeDescription
x number

Return:

number

public static erfc(x: number): number source

Complementary error function.

Params:

NameTypeAttributeDescription
x number

Return:

number

public static erfcinv(p: number): number source

Inverse function of complementary error function.

Params:

NameTypeAttributeDescription
p number

Return:

number

public static erfinv(p: number): number source

Inverse function of error function.

Params:

NameTypeAttributeDescription
p number

Return:

number

public static factorial(n: number): number source

Factorial function, x!.

Params:

NameTypeAttributeDescription
n number

Return:

number

public static fcdf(x: number, d1: number, d2: number): number source

Cumulative distribution function (CDF) of F-distribution.

Params:

NameTypeAttributeDescription
x number
d1 number

The degree of freedom of the molecules.

d2 number

The degree of freedom of the denominator

Return:

number

public static finv(p: number, d1: number, d2: number): number source

Inverse function of cumulative distribution function (CDF) of F-distribution.

Params:

NameTypeAttributeDescription
p number

Probability.

d1 number

The degree of freedom of the molecules.

d2 number

The degree of freedom of the denominator

Return:

number

public static fpdf(x: number, d1: number, d2: number): number source

Probability density function (PDF) of F-distribution.

Params:

NameTypeAttributeDescription
x number
d1 number

The degree of freedom of the molecules.

d2 number

The degree of freedom of the denominator

Return:

number

public static gamcdf(x: number, k: number, s: number): number source

Cumulative distribution function (CDF) of gamma distribution.

Params:

NameTypeAttributeDescription
x number
k number

Shape parameter.

s number

Scale parameter.

Return:

number

public static gaminv(p: number, k: number, s: number): number source

Inverse function of cumulative distribution function (CDF) of gamma distribution.

Params:

NameTypeAttributeDescription
p number
k number

Shape parameter.

s number

Scale parameter.

Return:

number

public static gamma(z: number): number source

Gamma function.

Params:

NameTypeAttributeDescription
z number

Return:

number

public static gammainc(x: number, a: number, tail: string): number source

Incomplete gamma function.

Params:

NameTypeAttributeDescription
x number
a number
tail string
  • optional
  • default: "lower"

lower (default) , "upper"

Return:

number

public static gammaln(x: number): number source

Log-gamma function.

Params:

NameTypeAttributeDescription
x number

Return:

number

public static gampdf(x: number, k: number, s: number): number source

Probability density function (PDF) of the gamma distribution.

Params:

NameTypeAttributeDescription
x number
k number

Shape parameter.

s number

Scale parameter.

Return:

number

public static nchoosek(n: number, k: number): number source

Binomial coefficient, number of all combinations, nCk.

Params:

NameTypeAttributeDescription
n number
k number

Return:

number

nCk

public static normcdf(x: number, u: number, s: number): number source

Cumulative distribution function (CDF) of normal distribution.

Params:

NameTypeAttributeDescription
x number
u number
  • optional
  • default: 0.0

Average value.

s number
  • optional
  • default: 1.0

Variance value.

Return:

number

public static norminv(p: number, u: number, s: number): number source

Inverse function of cumulative distribution function (CDF) of normal distribution.

Params:

NameTypeAttributeDescription
p number

Probability.

u number
  • optional
  • default: 0.0

Average value.

s number
  • optional
  • default: 1.0

Variance value.

Return:

number

public static normpdf(x: number, u: number, s: number): number source

Probability density function (PDF) of normal distribution.

Params:

NameTypeAttributeDescription
x number
u number
  • optional
  • default: 0.0

Average value.

s number
  • optional
  • default: 1.0

Variance value.

Return:

number

public static p_beta(x: number, a: number, b: number): number source

Incomplete beta function lower side.

Params:

NameTypeAttributeDescription
x number
a number
b number

Return:

number

public static p_gamma(x: number, a: number, gammaln_a: number): number source

Incomplete gamma function lower side.

Params:

NameTypeAttributeDescription
x number
a number
gammaln_a number

Return:

number

public static poisscdf(k: number, lambda: number): number source

Cumulative distribution function (CDF) of Poisson distribution.

Params:

NameTypeAttributeDescription
k number
lambda number

Return:

number

public static poissinv(p: number, lambda: number): number source

Inverse function of cumulative distribution function (CDF) of Poisson distribution.

Params:

NameTypeAttributeDescription
p number
lambda number

Return:

number

public static poisspdf(k: number, lambda: number): number source

Probability density function (PDF) of Poisson distribution.

Params:

NameTypeAttributeDescription
k number
lambda number

Return:

number

public static q_beta(x: number, a: number, b: number): number source

Incomplete beta function upper side.

Params:

NameTypeAttributeDescription
x number
a number
b number

Return:

number

public static q_gamma(x: number, a: number, gammaln_a: number): number source

Incomplete gamma function upper side.

Params:

NameTypeAttributeDescription
x number
a number
gammaln_a number

Return:

number

public static tcdf(t: number, v: number): number source

Cumulative distribution function (CDF) of Student's t-distribution.

Params:

NameTypeAttributeDescription
t number

T-value.

v number

The degrees of freedom. (DF)

Return:

number

public static tdist(t: number, v: number, tails: number): number source

Cumulative distribution function (CDF) of Student's t-distribution that can specify tail.

Params:

NameTypeAttributeDescription
t number

T-value.

v number

The degrees of freedom. (DF)

tails number

Tail. (1 = the one-tailed distribution, 2 = the two-tailed distribution.)

Return:

number

public static tinv(p: number, v: number): number source

Inverse of cumulative distribution function (CDF) of Student's t-distribution.

Params:

NameTypeAttributeDescription
p number

Probability.

v number

The degrees of freedom. (DF)

Return:

number

public static tinv2(p: number, v: number): number source

Inverse of cumulative distribution function (CDF) of Student's t-distribution in two-sided test.

Params:

NameTypeAttributeDescription
p number

Probability.

v number

The degrees of freedom. (DF)

Return:

number

public static tpdf(t: number, v: number): number source

Probability density function (PDF) of Student's t-distribution.

Params:

NameTypeAttributeDescription
t number

T-value.

v number

The degrees of freedom. (DF)

Return:

number