special
bisect
Bisection root finder for a monotone function on a bracketing interval.
Used for quantile functions. Assumes ``func(lo)`` and ``func(hi)`` straddle zero; the caller is responsible for supplying a valid bracket.
chi2_cdf
CDF of the central chi-square distribution with ``df`` degrees of freedom.
chi2_ppf
Quantile function of the central chi-square distribution.
Solved by bisection on :func:`chi2_cdf`, which is monotone in ``x``.
chi2_sf
Survival function (upper tail p-value) of the central chi-square.
gammainc_lower_reg
Regularized lower incomplete gamma function ``P(a, x)``.
Parameters ---------- a Shape parameter, must be strictly positive. x Upper limit of integration, must be non-negative.
Returns ------- float ``P(a, x) = gamma(a, x) / Gamma(a)`` in [0, 1].
gammainc_upper_reg
Regularized upper incomplete gamma function ``Q(a, x) = 1 - P(a, x)``.
gammaln
Natural log of the gamma function. Thin wrapper over ``math.lgamma``.
ncx2_cdf
CDF of the noncentral chi-square distribution.
Evaluated as the Poisson mixture
``F(x; df, nc) = sum_j Pois(j; nc/2) * F_central(x; df + 2j)``
summing outward from the Poisson mode so that the dominant terms are added first. This is the representation used for RMSEA confidence intervals and for the MacCallum, Browne & Sugawara (1996) power calculation.
Parameters ---------- x Quantile, non-negative. df Degrees of freedom, positive. nc Noncentrality parameter, non-negative. ``nc = 0`` reduces to the central chi-square. tol Terms whose Poisson weight is below ``tol`` and which lie beyond the mode are dropped.
norm_cdf
Standard normal CDF, via ``math.erf``.
norm_ppf
Standard normal quantile function, by bisection on :func:`norm_cdf`.
vectorized_norm_cdf
Elementwise standard normal CDF over a numpy array.