The typed arithmetic layer provides scalar/array aggregations: sum, mean, min, max, variance, std. The factory layer adds prod, median, mode, corr, mad, quantileSeq, cumsum.
nlags, biased estimator (÷n, like statsmodels acf); acf[0] = 1Δxₜ on [1, xₜ₋₁, Δxₜ₋₁, …]; statistic = t-stat on the lagged level; default maxlag = floor(12(n/100)^0.25), auto-clamped if the design is ill-posed; pValue is an approximate MacKinnon (1994)-style interpolation over a small built-in critical-value table (not the exact response-surface p-value); returns { statistic, pValue, usedLag }(mean a − mean b) / pooled sd (ddof 1); negative when a is smallersum, mean, min, max, variance, std. The factory layer adds prod, median, mode, corr, mad, quantileSeq, cumsum.{ rowvar: true } takes variables as rows, as np.corrcoef does); diagonal is 1{ rowvar: true } takes variables as rows, the NumPy default layout); ddof defaults to 1; rows of unequal length throw RangeErrorsum, mean, min, max, variance, std. The factory layer adds prod, median, mode, corr, mad, quantileSeq, cumsum.x may be abscissae or scalar dx (default unit spacing), leading 0 (MATLAB convention)-1'linear' (default, least-squares line) or 'constant' (mean); matches scipy.signal.detrendΣ(eₜ−eₜ₋₁)² / Σeₜ²; ~2 = no autocorrelation, <2 positive, >2 negative; matches statsmodels.stats.stattools.durbin_watson{ x, y, evaluate(t) } with the sorted unique values, cumulative proportions and a step-function evaluatorl1Ratio mixes the lasso (1) and ridge (0) penalties; returns { coefficients, intercept } (opts.maxIter/opts.tol)η² = SS_between / SS_totalα ∈ (0,1] (pandas ewm(adjust=False)); same length as input'normal' | 'exponential' | 'lognormal' | 'poisson' | 'gamma' to a sample; returns { params, logLikelihood }. Normal/exponential/poisson are closed-form; lognormal fits a normal to ln(data) (requires all > 0); gamma solves the digamma shape equation ln(k) − ψ(k) = ln(x̄) − mean(ln x) via the secant method (verified vs scipy.stats.gamma.fit)kernel ('rbf' default, 'matern32', 'matern52'), lengthScale (1), signalVariance (1), noise (1e-10). Returns { predict(Xstar) → { mean, variance, std }, logMarginalLikelihood, kernel }(mean a − mean b) / sd(b) — standardized by the second (control) group onlyopts.family 'poisson' (log link) or 'gamma' (log or inverse link), opts.intercept default true (matches ols); returns { coefficients, fittedValues, deviance, iterations, predict }; matches statsmodels.GLM.fitexp(mean(ln x)); all entries must be > 0kernel ('rbf' default, 'matern32', 'matern52'), lengthScale (1), signalVariance (1), noise (1e-10). Returns { predict(Xstar) → { mean, variance, std }, logMarginalLikelihood, kernel }exp(std(ln x)), ddof default 1 (scipy)(ln x − mean(ln x)) / std(ln x)cohensD with the small-sample correction 1 − 3/(4(n₁+n₂) − 9)n / Σ(1/xᵢ); all entries must be > 0Q3 − Q1 (via quantileSeq)stat: { estimate, bias, se }{ labels, centroids, inertia, iterations, converged } (opts.maxIter default 100)k closest training points (Euclidean), ties broken by the single nearest point's labelk closest training targets (Euclidean)fisher=true, subtracts 3). { fisher: false } → Pearson's; { bias: false } applies the sample correctionalpha; returns { coefficients, intercept } (opts.maxIter/opts.tol){ slope, intercept, rValue, rSquared, pValue, stdErr } (mirrors scipy.stats.linregress; needs ≥ 3 points)lags: Q = n(n+2)Σρ_k²/(n−k), pValue = 1 − chiSquaredCDF(Q, lags); matches statsmodels.stats.diagnostic.acorr_ljungbox; returns { statistic, pValue }y ∈ {0,1}) fit by IRLS/Newton on the Bernoulli log-likelihood; opts.intercept default true; returns { coefficients, intercept, predict, predictProba } — the library's first classifier/GLMlog(Σ exp(xᵢ)), max-shifted for stabilitysum, mean, min, max, variance, std. The factory layer adds prod, median, mode, corr, mad, quantileSeq, cumsum.sum, mean, min, max, variance, std. The factory layer adds prod, median, mode, corr, mad, quantileSeq, cumsum.k largest elementssum, mean, min, max, variance, std. The factory layer adds prod, median, mode, corr, mad, quantileSeq, cumsum.sum, mean, min, max, variance, std. The factory layer adds prod, median, mode, corr, mad, quantileSeq, cumsum.k smallest elementssum, mean, min, max, variance, std. The factory layer adds prod, median, mode, corr, mad, quantileSeq, cumsum.central (default true) subtracts the mean first, else raww; returns length n − w + 1 ("valid")multivariateNormal); matches scipy.stats.multivariate_normal.pdfn samples from a multivariate normal via Cholesky (x = mean + L·z); opts.seed for reproducible draws; returns an n-length array of length-k row vectorsopts.intercept default true, prepends a column of ones); returns { coefficients, stderr, tValues, pValues, r2, adjR2, fStat, residuals } — the general case linearRegression doesn't covernlags via the Levinson-Durbin recursion on the biased acf; matches statsmodels.tsa.stattools.pacf(..., method='ldb'); pacf[0] = 1parallelStatMAD (same mean AD, not factory mad)sort_f64 when n ≥ 1 048 576 after loadWasm()){ min, max } in one passsort_f64 like medianunbiased/uncorrected/biased)x and y with z partialled out(Σxᵖ/n)^(1/p); p = 0 geometric, 1 arithmetic, −1 harmonic; non-integer p needs x > 0, an odd integer p keeps the sign of a negative meansum, mean, min, max, variance, std. The factory layer adds prod, median, mode, corr, mad, quantileSeq, cumsum.x; prob is a probability in [0,1], an array of them, or an integer N for N evenly-spaced quantiles. Optional mode string selects the interpolation between order statistics (numpy method=): 'linear' (default), 'lower', 'higher', 'nearest' (ties round-half-to-even), 'midpoint'. Pass sorted=true to skip the internal partition-select on pre-sorted data2U_a/(n₁n₂) − 1 (ties count ½); positive when a tends to exceed brankdata default 'average')β = (XᵀX + αI)⁻¹Xᵀy on centered data; returns { coefficients, intercept }; intercept never penalizedsampleStd / √n (sample std, ddof=1){ slope, intercept } (intercept median(y − slope·x))bias=true). { bias: false } gives the sample-corrected G₁exp(xᵢ − max) / Σ exp(x − max); returns a probability vector{ slope, intercept }: slope is the median of all pairwise slopes, intercept median(y) − slope·median(x) (scipy)opts.solveFor: 'nobs' solves for the per-group sample size needed to reach a target power instead; matches statsmodels.stats.power.tt_ind_solve_powerΣwx / Σwx whose cumulative weight reaches Σw/2)p·Σw; zero-weight points are never returnedddof: 0 (default) is Σw(x−m)² / Σw; ddof: 1 divides by Σw − Σw²/Σw (reliability weights)(xᵢ − mean) / std using population std (SciPy zscore default, ddof=0)