Module dstats.distrib

Probability distribution CDFs, PDFs/PMFs, and a few inverse CDFs.

Functions

NameDescription
betaCDF(x, alpha, beta)
betaCDFR(x, alpha, beta)
betaPDF(x, alpha, beta)
binomialCDF(k, n, p)P(K <= k) where K is random variable.
binomialCDFR(k, n, p)P(K >= k) where K is random variable.
binomialPMF(k, n, p)
cauchyCDF(X, X0, gamma)
cauchyCDFR(X, X0, gamma)
cauchyPDF(X, X0, gamma)
chiSquareCDF(x, v)χ,2 distribution function and its complement.
chiSquareCDFR(x, v)
chiSquarePDF(x, v)
dirichletPDF(x, alpha)The Dirichlet probability density.
exponentialCDF(x, lambda)
exponentialCDFR(x, lambda)
exponentialPDF(x, lambda)
fisherCDF(x, df1, df2)The Fisher distribution, its complement, and inverse.
fisherCDFR(x, df1, df2)The Fisher distribution, its complement, and inverse.
gammaCDF(x, rate, shape)
gammaCDFR(x, rate, shape)
gammaPDF(x, rate, shape)
hyperExact(x, n1, n2, n, startAt)
hypergeometricCDF(x, n1, n2, n)P(X <= x), where X is random variable. Uses either direct summation, normal or binomial approximation depending on parameters.
hypergeometricCDFR(x, n1, n2, n)P(X >= x), where X is random variable.
hypergeometricPMF(x, n1, n2, n)
invBetaCDF(p, alpha, beta)
invBinomialCDF(pVal, n, p)Returns the value of k for the given p-value, n and p. If p-value does not exactly map to a value of k, the value for which binomialCDF(k, n, p) is closest to pVal is used.
invCauchyCDF(p, X0, gamma)
invChiSquareCDFR(v, p)Inverse of complemented χ, 2 distribution
invExponentialCDF(p, lambda)
invFisherCDFR(df1, df2, p)Inverse of complemented Fisher distribution
invGammaCDF(p, rate, shape)This just calls invGammaCDFR w/ 1 - p b/c invGammaCDFR is more accurate, but this function is necessary for consistency.
invGammaCDFR(p, rate, shape)
invLaplaceCDF(p, mu, b)
invNegBinomCDF(pVal, n, p)
invNormalCDF(p, mean, sd)Inverse of Normal distribution function
invPoissonCDF(pVal, lambda)Returns the value of k for the given p-value and lambda. If p-val doesn't exactly map to a value of k, the k for which poissonCDF(k, lambda) is closest to pVal is used.
invStudentsTCDF(p, df)Inverse of Student's t distribution
kolmDist(x)
kolmogorovDistrib(x)Kolmogorov distribution. Used in Kolmogorov-Smirnov testing.
laplaceCDF(X, mu, b)
laplaceCDFR(X, mu, b)
laplacePDF(x, mu, b)
logisticCDF(x, loc, shape)
logNormalCDF(x, mu, sigma)
logNormalCDFR(x, mu, sigma)
logNormalPDF(x, mu, sigma)
negBinomCDF(k, n, p)Negative binomial distribution.
negBinomCDFR(k, n, p)Probability that k or more failures precede the nth success.
negBinomPMF(k, n, p)
normalCDF(x, mean, stdev)P(X < x) for normal distribution where X is random var.
normalCDFR(x, mean, stdev)P(X > x) for normal distribution where X is random var.
normalPDF(x, mean, sd)
normApproxHyper(x, n1, n2, n)
parametrize(parameters)Takes a distribution function (CDF or PDF/PMF) as a template argument, and parameters as function arguments in the order that they appear in the function declaration and returns a delegate that binds the supplied parameters to the distribution function. Assumes the non-parameter argument is the first argument to the distribution function.
paramFunctor(parameters)Takes a distribution function (CDF or PDF/PMF) as a template argument, and parameters as function arguments in the order that they appear in the function declaration and returns a functor that binds the supplied parameters to the distribution function. Assumes the non-parameter argument is the first argument to the distribution function.
poissonCDF(k, lambda)P(K <= k) where K is r.v.
poissonCDFR(k, lambda)P(K >= k) where K is r.v.
poissonPMF(k, lambda)
rayleighCDF(x, mode)
studentsTCDF(t, df)
studentsTCDFR(t, df)
studentsTPDF(t, df)
uniformCDF(X, lower, upper)
uniformCDFR(X, lower, upper)
uniformPDF(X, lower, upper)
waldCDF(x, mu, lambda)
weibullCDF(x, shape, scale)
weibullCDFR(x, shape, scale)
weibullPDF(x, shape, scale)

Structs

NameDescription
ParamFunctor

Manifest constants

NameTypeDescription
POISSON_NORMAL
SQ2PI

Aliases

NameTypeDescription
chiSqrCDF
chiSqrCDFR
erf
erfc
invChiSqCDFR