https://www.brainiac.software/api/v1/statistics/t-test$0.02 USDCRun a t-test with confidence interval
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.
Body
| Field | Required | Notes |
|---|---|---|
kind | Yes | string; One of: one_sample, two_sample, paired |
x | Yes | array; Array |
y | No | array; Array |
equalVariance | No | boolean; Default: false |
mu0 | No | number; Default: 0 |
alternative | No | string; One of: two-sided, less, greater; Default: "two-sided" |
confidence | No | number; Default: 0.95 |
Request exampleJSON
{
"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
}Response exampleJSON
{
"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.",
"…"
]
}cURL
curl -i -X POST "https://www.brainiac.software/api/v1/statistics/t-test" \
-H 'content-type: application/json' \
-H 'Idempotency-Key: <fresh-64-character-random-hex-key>' \
--data-binary @- <<'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
}
JSONhttps://www.brainiac.software/api/v1/statistics/anova$0.03 USDCRun one-way or two-way ANOVA
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.
Body
| Field | Required | Notes |
|---|---|---|
design | Yes | string; One of: one_way, two_way |
rows | Yes | array; Array |
posthoc | No | string; One of: tukey, none; Default: "none" |
levene | No | boolean; Default: false |
ssType | No | string; One of: II, III; Default: "II" |
confidence | No | number; Default: 0.95 |
Request exampleJSON
{
"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
}Response exampleJSON
{
"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 …"
]
}cURL
curl -i -X POST "https://www.brainiac.software/api/v1/statistics/anova" \
-H 'content-type: application/json' \
-H 'Idempotency-Key: <fresh-64-character-random-hex-key>' \
--data-binary @- <<'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
}
JSONhttps://www.brainiac.software/api/v1/statistics/chi-square-test$0.02 USDCRun a chi-square test
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.
Body
| Field | Required | Notes |
|---|---|---|
kind | Yes | string; One of: independence, goodness_of_fit |
table | No | array; Array |
yates | No | boolean; Default: false |
fisher | No | boolean; Default: false |
observed | No | array; Array |
expectedProportions | No | array; Array |
Request exampleJSON
{
"kind": "independence",
"table": [
[
30,
10
],
[
20,
40
]
],
"yates": false,
"fisher": true
}Response exampleJSON
{
"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."
]
}cURL
curl -i -X POST "https://www.brainiac.software/api/v1/statistics/chi-square-test" \
-H 'content-type: application/json' \
-H 'Idempotency-Key: <fresh-64-character-random-hex-key>' \
--data-binary @- <<'JSON'
{
"kind": "independence",
"table": [
[
30,
10
],
[
20,
40
]
],
"yates": false,
"fisher": true
}
JSONhttps://www.brainiac.software/api/v1/statistics/nonparametric-tests$0.03 USDCRun a nonparametric test
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.
Body
| Field | Required | Notes |
|---|---|---|
test | Yes | string; One of: mann_whitney, wilcoxon_signed_rank, kruskal_wallis, friedman, sign |
x | No | array; Array |
y | No | array; Array |
groups | No | array; Array |
blocks | No | array; Array |
mu0 | No | number; Default: 0 |
exact | No | Default: "auto" |
Request exampleJSON
{
"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"
}Response exampleJSON
{
"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…"
]
}cURL
curl -i -X POST "https://www.brainiac.software/api/v1/statistics/nonparametric-tests" \
-H 'content-type: application/json' \
-H 'Idempotency-Key: <fresh-64-character-random-hex-key>' \
--data-binary @- <<'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"
}
JSONhttps://www.brainiac.software/api/v1/statistics/linear-regression$0.05 USDCFit a multiple linear regression
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.
Body
| Field | Required | Notes |
|---|---|---|
y | Yes | array; Array |
X | Yes | array; Array |
names | No | array; Array |
intercept | No | boolean; Default: true |
predict | No | array; Array |
confidence | No | number; Default: 0.95 |
Request exampleJSON
{
"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
}Response exampleJSON
{
"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…",
"…"
]
}cURL
curl -i -X POST "https://www.brainiac.software/api/v1/statistics/linear-regression" \
-H 'content-type: application/json' \
-H 'Idempotency-Key: <fresh-64-character-random-hex-key>' \
--data-binary @- <<'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
}
JSONhttps://www.brainiac.software/api/v1/statistics/logistic-regression$0.05 USDCFit a binary logistic regression
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.
Body
| Field | Required | Notes |
|---|---|---|
y | Yes | array; Array |
X | Yes | array; Array |
names | No | array; Array |
threshold | No | number; Default: 0.5 |
hlGroups | No | integer; Default: 10 |
Request exampleJSON
{
"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
}Response exampleJSON
{
"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."
]
}cURL
curl -i -X POST "https://www.brainiac.software/api/v1/statistics/logistic-regression" \
-H 'content-type: application/json' \
-H 'Idempotency-Key: <fresh-64-character-random-hex-key>' \
--data-binary @- <<'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
}
JSONhttps://www.brainiac.software/api/v1/statistics/normality-test$0.03 USDCTest data for normality
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.
Body
| Field | Required | Notes |
|---|---|---|
x | Yes | array; Array |
tests | No | array; Default: ["anderson_darling","shapiro_wilk","lilliefors"]; Array |
plot | No | boolean; Default: false |
Request exampleJSON
{
"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
}Response exampleJSON
{
"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.",
"…"
]
}cURL
curl -i -X POST "https://www.brainiac.software/api/v1/statistics/normality-test" \
-H 'content-type: application/json' \
-H 'Idempotency-Key: <fresh-64-character-random-hex-key>' \
--data-binary @- <<'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
}
JSONhttps://www.brainiac.software/api/v1/statistics/power-sample-size$0.02 USDCCalculate statistical power or sample size
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.
Body
| Field | Required | Notes |
|---|---|---|
test | Yes | string; One of: t_two_sample, anova_oneway, two_proportions, correlation |
effectSize | No | — |
alpha | No | number; Default: 0.05 |
power | No | — |
n | No | — |
groups | No | integer |
p1 | No | — |
p2 | No | — |
r | No | — |
Request exampleJSON
{
"test": "t_two_sample",
"effectSize": 0.5,
"alpha": 0.05,
"power": 0.8,
"n": null,
"groups": 3,
"p1": null,
"p2": null,
"r": null
}Response exampleJSON
{
"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 …"
]
}cURL
curl -i -X POST "https://www.brainiac.software/api/v1/statistics/power-sample-size" \
-H 'content-type: application/json' \
-H 'Idempotency-Key: <fresh-64-character-random-hex-key>' \
--data-binary @- <<'JSON'
{
"test": "t_two_sample",
"effectSize": 0.5,
"alpha": 0.05,
"power": 0.8,
"n": null,
"groups": 3,
"p1": null,
"p2": null,
"r": null
}
JSONhttps://www.brainiac.software/api/v1/statistics/control-chart$0.04 USDCCompute control chart limits and violations
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.
Body
| Field | Required | Notes |
|---|---|---|
chart | Yes | string; One of: imr, xbar_r, xbar_s, p, np, c, u |
values | No | array; Array |
subgroups | No | array; Array |
counts | No | array; Array |
sizes | No | array; Array |
size | No | integer |
rules | No | array; Default: ["we1"]; Array |
phase | No | string; One of: I, II; Default: "I" |
limits | No | object; Object |
Request exampleJSON
{
"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"
}Response exampleJSON
{
"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.",
"…"
]
}cURL
curl -i -X POST "https://www.brainiac.software/api/v1/statistics/control-chart" \
-H 'content-type: application/json' \
-H 'Idempotency-Key: <fresh-64-character-random-hex-key>' \
--data-binary @- <<'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"
}
JSONhttps://www.brainiac.software/api/v1/statistics/process-capability$0.04 USDCCalculate process capability indices
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.
Body
| Field | Required | Notes |
|---|---|---|
values | No | array; Array |
subgroups | No | array; Array |
lsl | No | number |
usl | No | number |
target | No | number |
withinMethod | No | string; One of: rbar, sbar, pooled; Default: "rbar" |
transform | No | string; One of: none, box_cox; Default: "none" |
Request exampleJSON
{
"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"
}Response exampleJSON
{
"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%."
]
}cURL
curl -i -X POST "https://www.brainiac.software/api/v1/statistics/process-capability" \
-H 'content-type: application/json' \
-H 'Idempotency-Key: <fresh-64-character-random-hex-key>' \
--data-binary @- <<'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"
}
JSONhttps://www.brainiac.software/api/v1/statistics/gage-rr$0.05 USDCRun a crossed gage R&R study
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.
Body
| Field | Required | Notes |
|---|---|---|
measurements | Yes | array; Array |
tolerance | No | number |
studyVarMultiplier | No | Default: 6 |
removeInteractionAbove | No | number; Default: 0.25 |
Request exampleJSON
{
"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
}Response exampleJSON
{
"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).",
"…"
]
}cURL
curl -i -X POST "https://www.brainiac.software/api/v1/statistics/gage-rr" \
-H 'content-type: application/json' \
-H 'Idempotency-Key: <fresh-64-character-random-hex-key>' \
--data-binary @- <<'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
}
JSONhttps://www.brainiac.software/api/v1/statistics/doe-design-generate$0.03 USDCGenerate a designed experiment
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.
Body
| Field | Required | Notes |
|---|---|---|
type | Yes | string; One of: full_factorial, fractional_factorial, plackett_burman, central_composite |
factors | Yes | array; Array |
generators | No | array; Array |
centerPoints | No | integer; Default: 0 |
replicates | No | integer; Default: 1 |
randomize | No | boolean; Default: false |
seed | No | integer; Default: 1 |
alpha | No | Default: "rotatable" |
Request exampleJSON
{
"type": "fractional_factorial",
"factors": [
"A",
"B",
"C",
"D",
"E"
],
"generators": [
"D=AB",
"E=AC"
],
"centerPoints": 0,
"replicates": 1,
"randomize": false,
"seed": 1
}Response exampleJSON
{
"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`."
]
}cURL
curl -i -X POST "https://www.brainiac.software/api/v1/statistics/doe-design-generate" \
-H 'content-type: application/json' \
-H 'Idempotency-Key: <fresh-64-character-random-hex-key>' \
--data-binary @- <<'JSON'
{
"type": "fractional_factorial",
"factors": [
"A",
"B",
"C",
"D",
"E"
],
"generators": [
"D=AB",
"E=AC"
],
"centerPoints": 0,
"replicates": 1,
"randomize": false,
"seed": 1
}
JSONhttps://www.brainiac.software/api/v1/statistics/doe-effects-analyze$0.03 USDCAnalyse two-level factorial effects
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.
Body
| Field | Required | Notes |
|---|---|---|
matrix | Yes | array; Array |
response | Yes | array; Array |
terms | No | string; One of: main, two_way, all_interactions; Default: "all_interactions" |
alpha | No | number; Default: 0.05 |
Request exampleJSON
{
"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
}Response exampleJSON
{
"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 …",
"…"
]
}cURL
curl -i -X POST "https://www.brainiac.software/api/v1/statistics/doe-effects-analyze" \
-H 'content-type: application/json' \
-H 'Idempotency-Key: <fresh-64-character-random-hex-key>' \
--data-binary @- <<'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
}
JSONhttps://www.brainiac.software/api/v1/statistics/weibull-reliability$0.05 USDCFit a life distribution to censored data
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.
Body
| Field | Required | Notes |
|---|---|---|
times | Yes | array; Array |
failed | Yes | array; Array |
distribution | No | string; One of: weibull, lognormal, exponential; Default: "weibull" |
bLives | No | array; Default: []; Array |
reliabilityAt | No | array; Default: []; Array |
confidence | No | number; Default: 0.95 |
Request exampleJSON
{
"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
}Response exampleJSON
{
"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
}cURL
curl -i -X POST "https://www.brainiac.software/api/v1/statistics/weibull-reliability" \
-H 'content-type: application/json' \
-H 'Idempotency-Key: <fresh-64-character-random-hex-key>' \
--data-binary @- <<'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
}
JSONhttps://www.brainiac.software/api/v1/statistics/time-series-decompose$0.03 USDCDecompose a seasonal time series
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.
Body
| Field | Required | Notes |
|---|---|---|
values | Yes | array; Array |
period | Yes | integer |
model | No | string; One of: additive, multiplicative; Default: "additive" |
Request exampleJSON
{
"values": [
120,
95,
110,
140,
128,
101,
117,
150,
135,
108,
124,
158
],
"period": 4,
"model": "additive"
}Response exampleJSON
{
"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…"
]
}cURL
curl -i -X POST "https://www.brainiac.software/api/v1/statistics/time-series-decompose" \
-H 'content-type: application/json' \
-H 'Idempotency-Key: <fresh-64-character-random-hex-key>' \
--data-binary @- <<'JSON'
{
"values": [
120,
95,
110,
140,
128,
101,
117,
150,
135,
108,
124,
158
],
"period": 4,
"model": "additive"
}
JSON