# Statistics & Quality Engineering API > Hypothesis tests, ANOVA, regression, normality and power calculations, plus control charts, process capability, gage R&R, designed experiments, Weibull reliability and time-series decomposition, computed from the numbers you send. Each paid operation uses a fixed USDC price on Base with the x402 exact scheme. Unpaid GET, HEAD, and POST return 402 payment terms (POST validates the body only after payment terms are satisfied). A request that carries payment-signature is not yet charged: settlement happens only after a successful (2xx) result. HTTP 4xx/5xx are not charged. Coverage bodies with status complete, partial, or failed all return HTTP 200 and are charged at the full listed price. Settled 2xx responses include a payment-response header; 4xx/5xx do not. Follow https://www.brainiac.software/agent-instructions.txt for install, payment pins, idempotency, and billing rules. - Product: https://www.brainiac.software/api/statistics - Docs: https://www.brainiac.software/api/statistics/docs - OpenAPI: https://www.brainiac.software/api/statistics/openapi.json - Contact: support@brainiac.software (https://www.brainiac.software/contact) ## Operations ### POST /api/v1/statistics/t-test $0.02 USDC. One-sample, two-sample (Welch or pooled) and paired t-tests with the estimate, statistic, degrees of freedom, p-value, confidence interval and Cohen's d from caller-supplied numbers. Pure computation; no data is stored or fetched. Inputs: kind, x, y?, equalVariance?, mu0?, alternative?, confidence? Docs: https://www.brainiac.software/api/statistics/docs#statistics-t-test Example request: ```json { "kind": "two_sample", "x": [ 5.1, 4.9, 5.6, 5.8, 6, 5.4, 5.2, 5.9 ], "y": [ 5.9, 6.3, 6.1, 5.7, 6.6, 6.2, 6, 6.4 ], "equalVariance": false, "mu0": 0, "alternative": "two-sided", "confidence": 0.95 } ``` Example response: ```json { "kind": "two_sample", "estimate": 0.6625, "statistic": 3.792631, "df": 12.69114, "pValue": 0.002330913, "ci": [ 0.2841893, 1.040811 ], "cohensD": 1.896316, "means": { "x": 5.4875, "y": 6.15 }, "sds": { "x": 0.4015595, "y": 0.2878492 }, "n": { "x": 8, "y": 8 }, "droppedRows": 0, "sources": [ { "source": "NIST/SEMATECH e-Handbook of Statistical Methods", "url": "https://www.itl.nist.gov/div898/handbook/", "retrievedAt": "2026-11-14", "status": "ok" } ], "limitations": [ "mu0 is the hypothesised mean (one-sample) or the hypothesised difference (two-sample and paired); the estimate and conf…", "One-sided intervals use null for the open end.", "…" ] } ``` ### POST /api/v1/statistics/anova $0.03 USDC. One-way and two-way ANOVA with interaction (Type II or III sums of squares), R-squared, Tukey HSD post-hoc comparisons and the Brown-Forsythe (median-centred Levene) test of equal variances. Sums of squares use centred two-pass accumulation and match NIST StRD SiRstv. Inputs: design, rows, posthoc?, levene?, ssType?, confidence? Docs: https://www.brainiac.software/api/statistics/docs#statistics-anova Example request: ```json { "design": "one_way", "rows": [ { "y": 196.3052, "a": "1" }, { "y": 196.124, "a": "1" }, { "y": 196.189, "a": "1" }, { "y": 196.2569, "a": "1" }, { "y": 196.3403, "a": "1" }, { "y": 196.3042, "a": "2" }, { "y": 196.3825, "a": "2" }, { "y": 196.1669, "a": "2" }, { "y": 196.3257, "a": "2" }, { "y": 196.0422, "a": "2" }, { "y": 196.1303, "a": "3" }, { "y": 196.2005, "a": "3" }, { "y": 196.2889, "a": "3" }, { "y": 196.0343, "a": "3" }, { "y": 196.1811, "a": "3" }, { "y": 196.2795, "a": "4" }, { "y": 196.1748, "a": "4" }, { "y": 196.1494, "a": "4" }, { "y": 196.1485, "a": "4" }, { "y": 195.9885, "a": "4" }, { "y": 196.2119, "a": "5" }, { "y": 196.1051, "a": "5" }, { "y": 196.185, "a": "5" }, { "y": 196.0052, "a": "5" }, { "y": 196.209, "a": "5" } ], "posthoc": "tukey", "levene": true } ``` Example response: ```json { "table": [ { "source": "a", "df": 4, "ss": 0.05114626, "ms": 0.01278657, "F": 1.180462, "p": 0.3494475 }, { "source": "residual", "df": 20, "ss": 0.2166366, "ms": 0.01083183 } ], "rSquared": 0.190999, "tukey": [ { "factor": "a", "pair": [ "1", "2" ], "diff": 0.00122, "lower": -0.1957485, "upper": 0.1981885, "pAdj": 1 }, { "factor": "a", "pair": [ "1", "3" ], "diff": -0.07606, "lower": -0.2730285, "upper": 0.1209085, "pAdj": 0.7755731 }, "…" ], "levene": { "center": "median", "W": 0.2266032, "p": 0.9202796 }, "droppedRows": 0, "sources": [ { "source": "NIST Statistical Reference Datasets (StRD)", "url": "https://www.itl.nist.gov/div898/strd/", "retrievedAt": "2026-11-14", "status": "ok" }, { "source": "NIST/SEMATECH e-Handbook of Statistical Methods", "url": "https://www.itl.nist.gov/div898/handbook/", "retrievedAt": "2026-11-14", "status": "ok" } ], "limitations": [ "Sums of squares use centred two-pass accumulation; Tukey HSD uses the studentised range distribution (Tukey-Kramer for …" ] } ``` ### POST /api/v1/statistics/chi-square-test $0.02 USDC. Chi-square test of independence (with optional Yates correction), goodness of fit, Fisher's exact test for 2x2 tables and Cramer's V, with expected counts and a low-expected-cell warning. Inputs: kind, table?, yates?, fisher?, observed?, expectedProportions? Docs: https://www.brainiac.software/api/statistics/docs#statistics-chi-square-test Example request: ```json { "kind": "independence", "table": [ [ 30, 10 ], [ 20, 40 ] ], "yates": false, "fisher": true } ``` Example response: ```json { "chiSquare": 16.66667, "df": 1, "pValue": 0.00004455709, "expected": [ [ 20, 20 ], [ 30, 30 ] ], "cramersV": 0.4082483, "fisher": { "oddsRatio": 6, "pValue": 0.00008308659 }, "lowExpectedCells": 0, "yates": false, "sources": [ { "source": "NIST/SEMATECH e-Handbook of Statistical Methods", "url": "https://www.itl.nist.gov/div898/handbook/", "retrievedAt": "2026-11-14", "status": "ok" } ], "limitations": [ "Cramer's V uses the uncorrected chi-square statistic.", "The Fisher odds ratio is the sample odds ratio (a*d)/(b*c); it is null when the denominator is zero." ] } ``` ### POST /api/v1/statistics/nonparametric-tests $0.03 USDC. Mann-Whitney U, Wilcoxon signed-rank, Kruskal-Wallis, Friedman and sign tests with average-rank ties, exact p-values for samples up to 50 and tie-corrected normal approximations. Inputs: test, x?, y?, groups?, blocks?, mu0?, exact? Docs: https://www.brainiac.software/api/statistics/docs#statistics-nonparametric-tests Example request: ```json { "test": "mann_whitney", "x": [ 5.1, 4.9, 5.6, 5.8, 6, 5.4, 5.2, 5.9 ], "y": [ 5.9, 6.3, 6.1, 5.7, 6.6, 6.2, 6, 6.4 ], "exact": "auto" } ``` Example response: ```json { "statistic": 59, "pValue": 0.002952603, "method": "exact", "tieCorrection": true, "n": { "x": 8, "y": 8 }, "droppedRows": 0, "sources": [ { "source": "NIST/SEMATECH e-Handbook of Statistical Methods", "url": "https://www.itl.nist.gov/div898/handbook/", "retrievedAt": "2026-11-14", "status": "ok" } ], "limitations": [ "Two-sided p-values only.", "Ties are present: the exact p-value uses the no-ties null distribution of U. Pass exact false for the tie-corrected nor…" ] } ``` ### POST /api/v1/statistics/linear-regression $0.05 USDC. Ordinary least squares by Householder QR with coefficient standard errors, t-tests and intervals, R-squared, F, VIF, Durbin-Watson, Breusch-Pagan and confidence and prediction intervals. Matches NIST StRD Norris and Longley. Inputs: y, X, names?, intercept?, predict?, confidence? Docs: https://www.brainiac.software/api/statistics/docs#statistics-linear-regression Example request: ```json { "y": [ 0.1, 338.8, 118.1, 888, 9.2, 228.1, 668.5, 998.5, 449.1, 778.9, 559.2, 0.3, 0.1, 778.1, 668.8, 339.3, 448.9, 10.8, 557.7, 228.3, 998, 888.8, 119.6, 0.3, 0.6, 557.6, 339.3, 888, 998.5, 778.9, 10.2, 117.6, 228.9, 668.4, 449.2, 0.2 ], "X": [ [ 0.2 ], [ 337.4 ], [ 118.2 ], [ 884.6 ], [ 10.1 ], [ 226.5 ], [ 666.3 ], [ 996.3 ], [ 448.6 ], [ 777 ], [ 558.2 ], [ 0.4 ], [ 0.6 ], [ 775.5 ], [ 666.9 ], [ 338 ], [ 447.5 ], [ 11.6 ], [ 556 ], [ 228.1 ], [ 995.8 ], [ 887.6 ], [ 120.2 ], [ 0.3 ], [ 0.3 ], [ 556.8 ], [ 339.1 ], [ 887.2 ], [ 999 ], [ 779 ], [ 11.1 ], [ 118.3 ], [ 229.2 ], [ 669.1 ], [ 448.9 ], [ 0.5 ] ], "names": [ "x1" ], "intercept": true, "predict": [ [ 500 ] ], "confidence": 0.95 } ``` Example response: ```json { "coefficients": [ { "name": "intercept", "estimate": -0.2623231, "se": 0.2328182, "t": -1.126729, "p": 0.2677467, "ciLow": -0.7354667, "ciHigh": 0.2108205, "vif": null }, { "name": "x1", "estimate": 1.002117, "se": 0.0004297968, "t": 2331.606, "p": 4.654041e-90, "ciLow": 1.001243, "ciHigh": 1.00299, "vif": null } ], "rSquared": 0.9999937, "adjRSquared": 0.9999936, "residualSd": 0.8847964, "F": 5436386, "dfModel": 1, "dfResidual": 34, "durbinWatson": 1.271509, "breuschPagan": { "stat": 7.426888, "p": 0.006425636 }, "predictions": [ { "fit": 500.7961, "ciLow": 500.4882, "ciHigh": 501.104, "piLow": 498.9718, "piHigh": 502.6204 } ], "n": 36, "droppedRows": 0, "sources": [ { "source": "NIST Statistical Reference Datasets (StRD)", "url": "https://www.itl.nist.gov/div898/strd/", "retrievedAt": "2026-11-14", "status": "ok" }, { "source": "NIST/SEMATECH e-Handbook of Statistical Methods", "url": "https://www.itl.nist.gov/div898/handbook/", "retrievedAt": "2026-11-14", "status": "ok" } ], "limitations": [ "OLS by Householder QR on centred, column-scaled predictors; normal equations are never formed.", "Durbin-Watson uses the row order supplied. Breusch-Pagan is the Koenker studentised form (n * R-squared of squared resi…", "…" ] } ``` ### POST /api/v1/statistics/logistic-regression $0.05 USDC. Binary logistic regression by iteratively reweighted least squares with odds ratios and intervals, deviance, AIC, Hosmer-Lemeshow goodness of fit, a confusion matrix at a chosen threshold and complete-separation detection. Inputs: y, X, names?, threshold?, hlGroups? Docs: https://www.brainiac.software/api/statistics/docs#statistics-logistic-regression Example request: ```json { "y": [ 0, 0, 0, 0, 0, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 1, 1, 1, 1, 1 ], "X": [ [ 0.5 ], [ 0.75 ], [ 1 ], [ 1.25 ], [ 1.5 ], [ 1.75 ], [ 1.75 ], [ 2 ], [ 2.25 ], [ 2.5 ], [ 2.75 ], [ 3 ], [ 3.25 ], [ 3.5 ], [ 4 ], [ 4.25 ], [ 4.5 ], [ 4.75 ], [ 5 ], [ 5.5 ] ], "names": [ "hours" ], "threshold": 0.5, "hlGroups": 10 } ``` Example response: ```json { "coefficients": [ { "name": "intercept", "estimate": -4.077713, "se": 1.760994, "z": -2.315574, "p": 0.02058152 }, { "name": "hours", "estimate": 1.504645, "se": 0.6287208, "z": 2.393185, "p": 0.01670281, "oddsRatio": 4.502557, "orCi": [ 1.31305, 15.43964 ] } ], "deviance": 16.05976, "nullDeviance": 27.72589, "aic": 20.05976, "hosmerLemeshow": { "chiSquare": 2.647725, "df": 8, "p": 0.9544861 }, "confusion": { "tp": 8, "fp": 2, "fn": 2, "tn": 8 }, "converged": true, "iterations": 7, "n": 20, "droppedRows": 0, "sources": [ { "source": "NIST/SEMATECH e-Handbook of Statistical Methods", "url": "https://www.itl.nist.gov/div898/handbook/", "retrievedAt": "2026-11-14", "status": "ok" } ], "limitations": [ "IRLS (Newton-Raphson) from beta = 0, stopping when max |change| < 1e-10 or after 50 iterations; each step is a Househol…", "Odds-ratio intervals use exp(beta +/- 1.96 SE). Hosmer-Lemeshow groups come from a stable sort on fitted probability." ] } ``` ### POST /api/v1/statistics/normality-test $0.03 USDC. Anderson-Darling, Shapiro-Wilk (Royston AS R94) and Lilliefors tests of normality with optional normal probability plot coordinates. Shapiro-Wilk and Anderson-Darling agree with SciPy and statsmodels. Inputs: x, tests?, plot? Docs: https://www.brainiac.software/api/statistics/docs#statistics-normality-test Example request: ```json { "x": [ 2.39, 2.7, 2.95, 3.1, 3.21, 3.33, 3.48, 3.61, 3.77, 3.9, 4.05, 4.27, 4.44, 4.71, 5.2 ], "tests": [ "anderson_darling", "shapiro_wilk", "lilliefors" ], "plot": true } ``` Example response: ```json { "anderson_darling": { "A2": 0.08929639, "A2Adjusted": 0.09465417, "p": 0.9971691 }, "shapiro_wilk": { "W": 0.9904953, "p": 0.9995884 }, "lilliefors": { "D": 0.07178418, "p": 0.99 }, "plot": [ { "x": 2.39, "theoretical": -1.739384 }, { "x": 2.7, "theoretical": -1.245046 }, "…" ], "n": 15, "droppedRows": 0, "sources": [ { "source": "NIST/SEMATECH e-Handbook of Statistical Methods", "url": "https://www.itl.nist.gov/div898/handbook/", "retrievedAt": "2026-11-14", "status": "ok" } ], "limitations": [ "Anderson-Darling p uses the D'Agostino and Stephens (1986) piecewise formula for estimated mean and variance.", "Shapiro-Wilk follows Royston (1995), algorithm AS R94.", "…" ] } ``` ### POST /api/v1/statistics/power-sample-size $0.02 USDC. Power or required sample size for a two-sample t-test (noncentral t), one-way ANOVA (noncentral F), two proportions (Cohen's h) and a correlation (Fisher z). Exactly one of n or power is solved. Inputs: test, effectSize?, alpha?, power?, n?, groups?, p1?, p2?, r? Docs: https://www.brainiac.software/api/statistics/docs#statistics-power-sample-size Example request: ```json { "test": "t_two_sample", "effectSize": 0.5, "alpha": 0.05, "power": 0.8, "n": null, "groups": 3, "p1": null, "p2": null, "r": null } ``` Example response: ```json { "nPerGroup": 64, "nRaw": 63.76561, "totalN": 128, "power": 0.8014596, "method": "noncentral t", "sources": [ { "source": "NIST/SEMATECH e-Handbook of Statistical Methods", "url": "https://www.itl.nist.gov/div898/handbook/", "retrievedAt": "2026-11-14", "status": "ok" }, { "source": "Cohen (1988) Statistical Power Analysis for the Behavioral Sciences", "url": "https://doi.org/10.4324/9780203771587", "retrievedAt": "2026-11-14", "status": "ok" } ], "limitations": [ "Balanced designs, two-sided tests. n is the sample size per group (anova_oneway, t_two_sample, two_proportions) or the …" ] } ``` ### POST /api/v1/statistics/control-chart $0.04 USDC. Control limits and Western Electric or Nelson rule violations for I-MR, X-bar R, X-bar S, p, np, c and u charts from caller-supplied measurements or counts, with optional fixed Phase II limits. Inputs: chart, values?, subgroups?, counts?, sizes?, size?, rules?, phase?, limits? Docs: https://www.brainiac.software/api/statistics/docs#statistics-control-chart Example request: ```json { "chart": "xbar_r", "subgroups": [ [ 10.2, 9.9, 10.1, 10, 10.3 ], [ 9.8, 10, 10.1, 9.9, 10.2 ], [ 10.1, 10.4, 10, 10.2, 10.3 ], [ 9.9, 9.7, 10, 10.1, 9.8 ], [ 10, 10.2, 9.9, 10.1, 10 ], [ 10.6, 10.8, 10.5, 10.7, 10.9 ] ], "rules": [ "we1", "we2", "we3", "we4" ], "phase": "I" } ``` Example response: ```json { "chart": "xbar_r", "phase": "I", "center": 10.15667, "ucl": 10.37785, "lcl": 9.935483, "secondary": { "chart": "R", "center": 0.3833333, "ucl": 0.8103667, "lcl": 0, "points": [] }, "points": [ { "i": 4, "value": 9.9, "violations": [ "we1", "we2" ] }, { "i": 6, "value": 10.7, "violations": [ "we1" ] } ], "sigmaWithin": 0.1648037, "subgroupSize": 5, "n": 6, "sources": [ { "source": "NIST/SEMATECH e-Handbook of Statistical Methods", "url": "https://www.itl.nist.gov/div898/handbook/", "retrievedAt": "2026-11-14", "status": "ok" }, { "source": "ASTM E2587 Standard Practice for Use of Control Charts in Statistical Process Control", "url": "https://www.astm.org/e2587-16.html", "retrievedAt": "2026-11-14", "status": "ok" } ], "limitations": [ "Phase I limits are computed from all points supplied; remove assignable causes and re-run for Phase II limits.", "Rule violations flag the point that completes the pattern. Points are 1-based; only points with violations are listed.", "…" ] } ``` ### POST /api/v1/statistics/process-capability $0.04 USDC. Cp, Cpk, Pp, Ppk, Cpm and expected parts per million out of specification from individual values or subgroups, with R-bar, S-bar or pooled within-subgroup sigma, an optional Box-Cox transform and a Bissell interval for Cpk. Inputs: values?, subgroups?, lsl?, usl?, target?, withinMethod?, transform? Docs: https://www.brainiac.software/api/statistics/docs#statistics-process-capability Example request: ```json { "subgroups": [ [ 10.2, 9.9, 10.1, 10, 10.3 ], [ 9.8, 10, 10.1, 9.9, 10.2 ], [ 10.1, 10.4, 10, 10.2, 10.3 ], [ 9.9, 9.7, 10, 10.1, 9.8 ], [ 10, 10.2, 9.9, 10.1, 10 ] ], "lsl": 9.5, "usl": 10.5, "target": 10, "withinMethod": "rbar", "transform": "none" } ``` Example response: ```json { "mean": 10.048, "sigmaWithin": 0.1633706, "sigmaOverall": 0.171075, "Cp": 1.020175, "Cpk": 0.9222386, "Cpu": 0.9222386, "Cpl": 1.118112, "Pp": 0.9742314, "Ppk": 0.8807052, "Ppu": 0.8807052, "Ppl": 1.067758, "Cpm": 0.9380087, "cpkCi": [ 0.6304441, 1.214033 ], "ppmExpectedOverall": 4798.873, "ppmExpectedWithin": 3228.982, "ppmObserved": 0, "n": 25, "withinMethod": "rbar", "transform": "none", "lambda": null, "droppedRows": 0, "sources": [ { "source": "NIST/SEMATECH e-Handbook of Statistical Methods", "url": "https://www.itl.nist.gov/div898/handbook/", "retrievedAt": "2026-11-14", "status": "ok" }, { "source": "AIAG Statistical Process Control (SPC) reference manual, 2nd edition", "url": "https://www.aiag.org/quality/automotive-core-tools/spc", "retrievedAt": "2026-11-14", "status": "ok" } ], "limitations": [ "Assumes a stable, approximately normal process; expected PPM comes from the normal distribution with the overall standa…", "Cpk interval is the Bissell approximation at 95%." ] } ``` ### POST /api/v1/statistics/gage-rr $0.05 USDC. Crossed gage repeatability and reproducibility by the ANOVA method: variance components, percent contribution, percent study variation, percent tolerance and number of distinct categories for a balanced parts by operators by replicates study. Inputs: measurements, tolerance?, studyVarMultiplier?, removeInteractionAbove? Docs: https://www.brainiac.software/api/statistics/docs#statistics-gage-rr Example request: ```json { "measurements": [ { "part": "1", "operator": "A", "value": 2.01 }, { "part": "1", "operator": "A", "value": 1.99 }, { "part": "1", "operator": "B", "value": 2.06 }, { "part": "1", "operator": "B", "value": 2.04 }, { "part": "1", "operator": "C", "value": 1.97 }, { "part": "1", "operator": "C", "value": 1.99 }, { "part": "2", "operator": "A", "value": 2.42 }, { "part": "2", "operator": "A", "value": 2.4 }, { "part": "2", "operator": "B", "value": 2.46 }, { "part": "2", "operator": "B", "value": 2.44 }, { "part": "2", "operator": "C", "value": 2.36 }, { "part": "2", "operator": "C", "value": 2.39 }, { "part": "3", "operator": "A", "value": 1.79 }, { "part": "3", "operator": "A", "value": 1.82 }, { "part": "3", "operator": "B", "value": 1.86 }, { "part": "3", "operator": "B", "value": 1.84 }, { "part": "3", "operator": "C", "value": 1.77 }, { "part": "3", "operator": "C", "value": 1.78 }, { "part": "4", "operator": "A", "value": 2.91 }, { "part": "4", "operator": "A", "value": 2.89 }, { "part": "4", "operator": "B", "value": 2.95 }, { "part": "4", "operator": "B", "value": 2.96 }, { "part": "4", "operator": "C", "value": 2.88 }, { "part": "4", "operator": "C", "value": 2.86 }, { "part": "5", "operator": "A", "value": 2.2 }, { "part": "5", "operator": "A", "value": 2.22 }, { "part": "5", "operator": "B", "value": 2.26 }, { "part": "5", "operator": "B", "value": 2.25 }, { "part": "5", "operator": "C", "value": 2.16 }, { "part": "5", "operator": "C", "value": 2.18 } ], "tolerance": 1, "studyVarMultiplier": 6, "removeInteractionAbove": 0.25 } ``` Example response: ```json { "anova": [ { "source": "part", "df": 4, "ss": 4.260847, "ms": 1.065212, "F": 7198.786, "p": 2.953262e-35 }, { "source": "operator", "df": 2, "ss": 0.03084667, "ms": 0.01542333, "F": 104.2321, "p": 2.939713e-12 }, "…" ], "interactionPooled": true, "components": { "repeatability": 0.000147971, "reproducibility": 0.001527536, "grr": 0.001675507, "part": 0.1775106, "total": 0.1791861, "operator": 0.001527536, "interaction": 0 }, "table": [ { "source": "repeatability", "variance": 0.000147971, "sd": 0.01216433, "studyVar": 0.072986, "pctContribution": 0.08257951, "pctStudyVar": 2.873665, "pctTolerance": 7.2986 }, { "source": "reproducibility", "variance": 0.001527536, "sd": 0.03908371, "studyVar": 0.2345022, "pctContribution": 0.8524858, "pctStudyVar": 9.233016, "pctTolerance": 23.45022 }, "…" ], "pctContributionGrr": 0.9350653, "pctStudyVarGrr": 9.669877, "pctTolerance": 24.55978, "ndc": 14, "parts": 5, "operators": 3, "replicates": 2, "sources": [ { "source": "AIAG Measurement Systems Analysis (MSA) reference manual, 4th edition", "url": "https://www.aiag.org/quality/automotive-core-tools/msa", "retrievedAt": "2026-11-14", "status": "ok" }, { "source": "NIST/SEMATECH e-Handbook of Statistical Methods", "url": "https://www.itl.nist.gov/div898/handbook/", "retrievedAt": "2026-11-14", "status": "ok" } ], "limitations": [ "Crossed, balanced ANOVA method. The interaction is pooled into repeatability when its p-value exceeds removeInteraction…", "Part and operator F tests use the part-by-operator mean square (the pooled mean square when the interaction is pooled).", "…" ] } ``` ### POST /api/v1/statistics/doe-design-generate $0.03 USDC. Full and fractional factorial (with defining relation, resolution and alias structure), Plackett-Burman and central composite designs in standard order, optionally randomised with a seeded xorshift128+ shuffle that is reproducible across languages. Inputs: type, factors, generators?, centerPoints?, replicates?, randomize?, seed?, alpha? Docs: https://www.brainiac.software/api/statistics/docs#statistics-doe-design-generate Example request: ```json { "type": "fractional_factorial", "factors": [ "A", "B", "C", "D", "E" ], "generators": [ "D=AB", "E=AC" ], "centerPoints": 0, "replicates": 1, "randomize": false, "seed": 1 } ``` Example response: ```json { "runs": 8, "resolution": 3, "definingRelation": [ "I", "ABD", "…" ], "aliases": { "A": [ "BD", "CE", "…" ], "B": [ "AD", "ABCE", "…" ], "C": [ "ABCD", "AE", "…" ], "D": [ "AB", "ACDE", "…" ], "E": [ "ABDE", "AC", "…" ], "AB": [ "D", "BCE", "…" ], "AC": [ "BCD", "E", "…" ], "AD": [ "B", "CDE", "…" ], "AE": [ "BDE", "C", "…" ], "BC": [ "ACD", "ABE", "…" ], "BD": [ "A", "ABCDE", "…" ], "BE": [ "ADE", "ABC", "…" ], "CD": [ "ABC", "ADE", "…" ], "CE": [ "ABCDE", "A", "…" ], "DE": [ "ABE", "ACD", "…" ] }, "matrix": [ { "std": 1, "run": 1, "A": -1, "B": -1, "C": -1, "D": 1, "E": 1 }, { "std": 2, "run": 2, "A": 1, "B": -1, "C": -1, "D": -1, "E": -1 }, "…" ], "sources": [ { "source": "Box, Hunter & Hunter (2005) Statistics for Experimenters; Plackett & Burman (1946)", "url": "https://www.wiley.com/en-us/Statistics+for+Experimenters:+Design,+Innovation,+and+Discovery,+2nd+Edition-p-9780471718130", "retrievedAt": "2026-11-14", "status": "ok" }, { "source": "NIST/SEMATECH e-Handbook of Statistical Methods", "url": "https://www.itl.nist.gov/div898/handbook/", "retrievedAt": "2026-11-14", "status": "ok" } ], "limitations": [ "Coded levels are -1 and +1 (and 0 for centre points, +/- alpha for axial points). Standard order changes the first fact…", "Generators, defining relation and aliases use factor codes A, B, C, ... in the order of `factors`." ] } ``` ### POST /api/v1/statistics/doe-effects-analyze $0.03 USDC. Effects, coefficients and standardised effects for a two-level factorial, with Lenth's pseudo standard error and margin of error for unreplicated designs or a pure-error ANOVA when runs are replicated, sorted as a Pareto of effects. Inputs: matrix, response, terms?, alpha? Docs: https://www.brainiac.software/api/statistics/docs#statistics-doe-effects-analyze Example request: ```json { "matrix": [ { "A": -1, "B": -1, "C": -1 }, { "A": 1, "B": -1, "C": -1 }, { "A": -1, "B": 1, "C": -1 }, { "A": 1, "B": 1, "C": -1 }, { "A": -1, "B": -1, "C": 1 }, { "A": 1, "B": -1, "C": 1 }, { "A": -1, "B": 1, "C": 1 }, { "A": 1, "B": 1, "C": 1 } ], "response": [ 60, 72, 54, 68, 52, 83, 45, 80 ], "terms": "all_interactions", "alpha": 0.05 } ``` Example response: ```json { "intercept": 64.25, "effects": [ { "term": "A", "effect": 23, "coefficient": 11.5, "t": 10.22222 }, { "term": "AC", "effect": 10, "coefficient": 5, "t": 4.444444 }, "…" ], "lenth": { "s0": 2.25, "pse": 2.25, "marginOfError": 8.469277, "df": 2.333333 }, "anova": null, "significant": [ "A", "AC" ], "confounded": [], "sources": [ { "source": "Box, Hunter & Hunter (2005); Lenth (1989) Technometrics 31(4)", "url": "https://doi.org/10.1080/00401706.1989.10488595", "retrievedAt": "2026-11-14", "status": "ok" }, { "source": "NIST/SEMATECH e-Handbook of Statistical Methods", "url": "https://www.itl.nist.gov/div898/handbook/", "retrievedAt": "2026-11-14", "status": "ok" } ], "limitations": [ "Effect = sum(x * y) / (N / 2) on the coded +/-1 matrix; coefficient = effect / 2. The design is assumed orthogonal.", "Terms are ordered by interaction order; a term whose column duplicates (or negates) an earlier term is confounded with …", "…" ] } ``` ### POST /api/v1/statistics/weibull-reliability $0.05 USDC. Maximum-likelihood Weibull, lognormal or exponential life fits to right-censored failure data with Fisher-matrix confidence bounds, B-lives, reliability at chosen times and mean time to failure. Inputs: times, failed, distribution?, bLives?, reliabilityAt?, confidence? Docs: https://www.brainiac.software/api/statistics/docs#statistics-weibull-reliability Example request: ```json { "times": [ 105, 140, 183, 212, 237, 265, 301, 350, 350, 350 ], "failed": [ 1, 1, 1, 1, 1, 1, 1, 0, 0, 0 ], "distribution": "weibull", "bLives": [ 10 ], "reliabilityAt": [ 200 ], "confidence": 0.95 } ``` Example response: ```json { "failures": 7, "censored": 3, "confidence": 0.95, "distribution": "weibull", "sources": [ { "source": "NIST/SEMATECH e-Handbook of Statistical Methods", "url": "https://www.itl.nist.gov/div898/handbook/", "retrievedAt": "2026-11-14", "status": "ok" }, { "source": "Meeker & Escobar (1998) Statistical Methods for Reliability Data", "url": "https://doi.org/10.1002/9781118033141", "retrievedAt": "2026-11-14", "status": "ok" } ], "limitations": [ "Right-censored maximum likelihood; confidence bounds are Fisher-matrix (delta method on log parameters) at the requeste…", "Times must share one unit; censored units are assumed to be suspensions independent of failure." ], "parameters": { "shape": 2.377761, "scale": 311.3125 }, "parameterCi": { "shape": [ 1.25374, 4.509505 ], "scale": [ 227.6548, 425.7123 ] }, "logLikelihood": -45.62637, "bLives": [ { "p": 10, "time": 120.8288, "ciLow": 62.77148, "ciHigh": 232.5832 } ], "reliability": [ { "t": 200, "R": 0.7052523, "ciLow": 0.4035469, "ciHigh": 0.874262 } ], "mttf": 275.9273 } ``` ### POST /api/v1/statistics/time-series-decompose $0.03 USDC. Classical moving-average additive or multiplicative decomposition into trend, seasonal indices and remainder, with Wang-Smith-Hyndman strength of seasonality and trend measures. STL is not provided. Inputs: values, period, model? Docs: https://www.brainiac.software/api/statistics/docs#statistics-time-series-decompose Example request: ```json { "values": [ 120, 95, 110, 140, 128, 101, 117, 150, 135, 108, 124, 158 ], "period": 4, "model": "additive" } ``` Example response: ```json { "trend": [ null, null, "…" ], "seasonalIndices": [ 7.09375, -21.90625, "…" ], "seasonal": [ 7.09375, -21.90625, "…" ], "remainder": [ null, null, "…" ], "seasonalStrength": 0.9984219, "trendStrength": 0.9780572, "model": "additive", "period": 4, "sources": [ { "source": "Hyndman & Athanasopoulos, Forecasting: Principles and Practice (classical decomposition); Wang, Smith & Hyndman (2006)", "url": "https://otexts.com/fpp3/classical-decomposition.html", "retrievedAt": "2026-11-14", "status": "ok" } ], "limitations": [ "Classical moving-average decomposition; the first and last floor(period / 2) trend and remainder values are null. STL i…", "Seasonal indices are centred to sum 0 (additive) or mean 1 (multiplicative). Strengths use population variance over non…" ] } ```