Algostream_advanced_models.SpecialSpecial functions for hypothesis testing and statistical distributions.
All approximations are intentionally coarse — sufficient for the ≤ 2-significant-figure p-values we surface elsewhere in the project (cf. Pairs.Mackinnon_cv). For research-grade precision use a dedicated stats package.
Inverse standard normal CDF (Beasley-Springer-Moro). p must be in (0, 1). Max abs error ~3e-9 in the central region.
Logarithm of the Gamma function. Lanczos approximation, ~15-digit precision for x > 0; uses the reflection formula for x < 0.5.
Regularized lower incomplete gamma P(s, x) = γ(s, x) / Γ(s). s > 0, x ≥ 0.
Regularized upper incomplete gamma Q(s, x) = Γ(s, x) / Γ(s) = 1 − P(s, x).