Skip to main content
Glama

rigor

Verified statistical inference for AI agents.

LLMs are decent at reciting statistics but bad at doing it reliably — a t-statistic or a required sample size is a number recalled from training data, not computed and checked. rigor is the alternative: classical hypothesis testing (parametric and non-parametric), correlation and regression, effect sizes, power/sample-size calculation, multiple-comparisons correction, and always-valid sequential testing for results checked more than once before they're final, computed from scratch and returned as a cited, assumption- checked answer -- plus a decision helper for picking the right tool and a batch tool for running/correcting many comparisons at once, since "which test do I even use," "I forgot to correct for multiple comparisons," and "I peeked at the dashboard and stopped early" are their own common failure modes, distinct from getting a single formula wrong.

A concrete case where this matters. The one sample-size number everyone half-remembers is Cohen (1988)'s own worked example: d=0.5, alpha=.05, power=.80 -> n≈64 per group. It's in every textbook and slide deck, so it's also what gets pattern-matched to when a similar-looking question comes up. Ask instead for d=0.46, power=.85 -- a modest, realistic revision, not a trick:

$ rigor power ttest-2samp --effect-size 0.46 --power 0.85
Required n per group = 84.86 (round up: 85)

85, not "about 64" -- a third more participants to recruit than the half-remembered number suggests, from a question that looks like the famous one. The formula itself isn't hard (power.py runs the same bisection search either direction, in a few lines); the failure mode is that recalling a nearby-looking answer feels indistinguishable from computing the right one, right up until the number's wrong.

A second concrete case. An agent (or person) watching a live experiment's dashboard and checking the p-value every time new data comes in, stopping the moment it clears 0.05, is a textbook way to fool yourself -- and it's the default way anyone actually monitors a running experiment, fixed-sample design or not:

$ rigor sequential peeking-inflation --n-looks 10
Naive repeated peeking, 10 looks, nominal alpha=0.05
  estimated true alpha = 0.1918 (+/- 0.0028 MC SE, 20000 trials)

Checking 10 times at a nominal 5% level is really running at closer to 19% -- roughly one in five "significant" results would be noise even with zero real effect. rigor sequential proportion / rigor sequential mean compute an always-valid p-value instead (mSPRT, Johari et al. 2017): checkable after every new observation with the false-positive rate actually staying at the nominal level, no pre-committed sample size and no correction for "how many times have I looked" required.

Built as an MCP server: a scan of the current MCP ecosystem (Context7 for coding docs, several physics/engineering/chemistry/geo servers, even Bentley's STAAD integration) found statistics/experimental design as one of the few common agent needs nobody had covered yet.

The statistics themselves (rigor/distributions.py, inference.py, nonparametric.py, correlation.py, regression.py, effect_size.py, power.py, corrections.py, plus the decision/batch helpers in advisor.py and batch.py) are pure standard library, no dependencies. The package as a whole does depend on the official mcp SDK, since the MCP server is a first-class part of what it ships, not an add-on -- see Install.

Install

pip install rigor-mcp

(the PyPI distribution is rigor-mcp since plain rigor was already taken by an unrelated package; the importable package and the CLI command are both still just rigor.) This gets you both console commands, rigor (CLI) and rigor-mcp (MCP server) -- deliberately one install, no extras to get right, since uvx rigor-mcp (how most MCP clients would actually invoke this) has no way to request an extra.

Related MCP server: evalgate

What's in it

  • rigor/distributions.py — t, chi-squared, and F distributions built from scratch on stdlib (regularized incomplete gamma/beta), verified against exact closed-form identities (t(1) = Cauchy, chi2(2) = scaled exponential, t² = F(1, df)) rather than trusted transcription.

  • rigor/inference.py — one-/two-sample and paired t-tests, one-/two-proportion z-tests, chi-squared goodness-of-fit and independence, Fisher's exact test (2x2, exact via the hypergeometric distribution — the small-sample alternative chi_square_independence's own low-expected-count warning points to), McNemar's test and McNemar's exact test (2x2, for paired proportions -- e.g. the same subjects' before/after answers -- which two_proportion_z_test's independent-groups assumption gets wrong; the exact version is via the binomial distribution on the discordant pairs, the same small-sample relationship Fisher's exact test has to chi_square_independence), one-way ANOVA, and Levene's (Brown-Forsythe) test for equal variances. Each returns a TestResult: statistic, degrees of freedom, two-tailed p-value, a confidence interval, a citation, and assumption warnings (e.g. small-n normality reliance, low expected cell counts).

  • rigor/nonparametric.py — Mann-Whitney U, Wilcoxon signed-rank, and Kruskal-Wallis: the non-parametric alternative to two_sample_t_test/paired_t_test/one_way_anova respectively, for when a parametric test's own assumption warnings make its result suspect. Rank-based, with tie correction; also returns TestResult.

  • rigor/correlation.py — Pearson (linear) and Spearman (monotonic, via ranks) correlation, each returned as a TestResult (H0: no association) with a confidence interval via the Fisher z-transform.

  • rigor/regression.py — simple (single-predictor) ordinary least squares regression: slope, intercept, R², and a significance test + CI for the slope.

  • rigor/effect_size.py — Cohen's d, Hedges' g, Cohen's h, Cramér's V, eta²/omega² (for one_way_anova), and rank-biserial correlation (for mann_whitney_u).

  • rigor/power.py — power and required sample size for the one-/two-sample t-test and two-proportion z-test (the one-sample formula covers paired_t_test too, since a paired t-test is a one-sample t-test on the differences). The two directions (given n, find power; given power, find n) are exact numerical inverses of each other by construction (bisection on the same underlying power function), and sanity-checked against the Cohen (1988) d=0.5/α=.05/power=.80 textbook reference case (n≈64).

  • rigor/corrections.py — Bonferroni and Benjamini-Hochberg (FDR) multiple-comparisons correction.

  • rigor/advisor.py — recommend_test: a decision helper, not a statistic. Answer a few characteristics of the data/question (continuous/proportion/categorical/ordinal, how many groups, paired, small-or-skewed, association-not-difference, checked-repeatedly) and get back which tool to call, what to call instead if this test's assumptions look shaky, and what to run alongside it -- compiling the cross-references every other module's docstrings already carry into one callable answer, so an agent doesn't need to have already read all of them to find the relevant one. checked_repeatedly=True routes to a sequential_* tool where one exists (two independent groups, continuous or proportion), and otherwise says so explicitly rather than silently ignoring the flag.

  • rigor/batch.py — pairwise_group_comparisons: runs every pairwise comparison across 2+ groups (two_sample_t_test or mann_whitney_u, your choice) and applies Bonferroni/BH correction to the whole batch in one call, instead of the agent orchestrating k*(k-1)/2 separate calls plus a correction call by hand and risking forgetting the correction step. The natural follow-up one_way_anova/kruskal_wallis already recommend in their own docstrings once a result comes back significant.

  • rigor/sequential.py — always-valid (peeking-safe) sequential testing via the mixture sequential probability ratio test (mSPRT): every other test in this package assumes a fixed sample size decided in advance and checked once; this one is designed to be re-checked after every new observation (e.g. a live A/B test dashboard) without inflating the false-positive rate the way naively re-running a fixed-sample test at each check does. Closed-form (Robbins 1970; Johari, Koomen, Pekelis & Walsh 2017), covering two-sample means and two proportions, plus naive_peeking_inflation -- a seeded Monte Carlo demonstration of exactly the failure mode this exists to avoid. The always-valid guarantee itself (not just a single p-value's correctness) is checked by simulation in tests/test_sequential.py. One deliberately counterintuitive choice: complete separation at a small n (e.g. 0/5 vs. 5/5) reports no actionable evidence (p=1), not the maximal evidence a one-shot Fisher's exact test would call it -- because this test gets checked after every single observation, and small-n complete separation happens under the null purely by chance often enough (~40% at n=1 per arm) that treating it as proof would defeat the always-valid guarantee itself. Caught by the guarantee simulation during development, not by inspection.

  • rigor/cli.py — a CLI over all of the above (rigor.py at the repo root is a thin shim so python3 rigor.py ... also works from a plain checkout, without installing anything).

  • rigor/mcp_server.py — an MCP tool wrapper exposing all 37 operations to any MCP client (Claude Code, Claude Desktop, etc.). Smoke-tested end-to-end over stdio against a real client — tool discovery plus representative calls checked against known reference values, including the full round-trip still landing the Cohen (1988) case at n=63 and Fisher's original "lady tasting tea" case at p≈0.4857.

Usage

CLI, once installed:

rigor ttest one-sample --data 5.1,4.9,5.3,5.0,4.8,5.2 --mu0 5.0
rigor corr pearson --x 1,2,3,4,5 --y 2,4,5,4,5
rigor regress --x 1,2,3,4,5 --y 3,5,7,9,11
rigor nonparam mann-whitney --a 1,2,3 --b 4,5,6
rigor power ttest-2samp --effect-size 0.5 --power 0.8
rigor recommend --outcome-type continuous --n-groups 3   # which test fits?
rigor posthoc --groups "1,2,3|4,5,6|7,8,9" --labels A,B,C  # pairwise + correction
rigor mcnemar --table "794,86;150,570"    # paired proportions, e.g. before/after
rigor sequential proportion --successes1 55 --n1 500 --successes2 40 --n2 500 --tau 0.05
                # ^ peeking-safe -- rerun as n1/n2 grow, no correction needed
rigor sequential peeking-inflation --n-looks 10   # ...vs. naively checking 10 times
rigor --help   # full list of subcommands (ttest, ztest, chi2, fisher, mcnemar,
                # mcnemar-exact, anova, levene, nonparam, corr, regress,
                # effect-size, power, correct, recommend, posthoc, sequential)

or straight from a checkout without installing anything:

python3 rigor.py ttest one-sample --data 5.1,4.9,5.3,5.0,4.8,5.2 --mu0 5.0

MCP server, over stdio (the transport local clients like Claude Code expect):

pip install rigor-mcp
rigor-mcp

or from a checkout: pip install mcp && python3 -m rigor.mcp_server.

Register it with Claude Code:

claude mcp add rigor -- rigor-mcp

(or, from a checkout: claude mcp add rigor -- python3 -m rigor.mcp_server, run from this repo's root or with an absolute module path). For interactive poking with the MCP Inspector, run it as a script rather than the installed command — which means the package root has to be put on the path by hand, since the Inspector imports the file directly:

pip install "mcp[cli]"
PYTHONPATH=. mcp dev rigor/mcp_server.py

A transport-level edge case, handled

cohens_d correctly returns +inf/-inf for zero-variance samples (per its own documented contract), but non-finite floats serialize to JSON null over MCP's structured content — which used to fail the tool's own number-typed output schema and crash the call. The MCP cohens_d tool now returns {"value": float | null, "warnings": [...]} instead of a bare float, so that case is reported explicitly (null value, a warning naming the direction) rather than blowing up. That fix is specific to tools with a bare-scalar output schema — every tool that returns a dict (all the TestResult-based ones, plus simple_linear_regression) has been confirmed over real stdio to pass a non-finite field straight through as JSON's non-standard Infinity, since a generic dict return doesn't get a strict per-field number schema. Of the bare-float tools, cohens_d is the only one that can actually produce a non-finite value.

Tests

python3 -m unittest discover -s tests -v

203 tests: 182 exercise the statistics/decision logic directly (including, for sequential.py, a simulation check that the always-valid guarantee itself holds under repeated peeking, not just that a single p-value comes out right -- and, during development, a simulation catching a real bug: an early draft treated small-n complete separation as maximal evidence rather than the small-sample noise it usually is, which broke that same guarantee); 18 spawn mcp_server.py as a real MCP client would and check results over the wire (skipped automatically if mcp isn't installed); 3 check that server.json's metadata (version, description length, name length) hasn't drifted from pyproject.toml's or the MCP Registry's own limits (the two files aren't otherwise linked -- see test_release_metadata.py).

License

MIT — see LICENSE.

rigor MCP server

Available Tools

37 tools
benjamini_hochberg_correctionA
Read-onlyIdempotent

Adjust a batch of p-values for multiple comparisons, controlling the false discovery rate. Less conservative than Bonferroni; the standard choice when testing many hypotheses at once.

Inputs: p_values (required), alpha.

bonferroni_correctionA
Read-onlyIdempotent

Adjust a batch of p-values for multiple comparisons, controlling the family-wise error rate. Conservative; use when any false positive among the batch is costly.

Inputs: p_values (required), alpha.

chi_square_goodness_of_fitA
Read-onlyIdempotent

Test whether observed category counts match an expected distribution -- e.g. "are these six days-of-week signup counts evenly distributed, or skewed towards weekends?" Returns the chi-squared statistic, degrees of freedom (len-1), p-value, a citation, and a warning if any expected count is below 5 (the usual threshold below which this approximation gets unreliable).

Inputs: expected (required), observed (required), alpha.

chi_square_independenceA
Read-onlyIdempotent

Test whether the row and column variables of a contingency table are independent (e.g. "does group membership relate to outcome?"). Returns the chi-squared statistic, degrees of freedom, p-value, a citation, and a warning if any expected cell count is below 5 (consider cramers_v afterwards for effect size).

Inputs: table (required), alpha.

cohens_dA
Read-onlyIdempotent

Standardized mean difference between two samples (pooled SD). Use alongside two_sample_t_test, which tells you whether a difference is significant but not how large it is. Rough guidance: ~0.2 small, ~0.5 medium, ~0.8 large -- context-dependent. Returns {"value": float or null, "warnings": [...]}. value is null only when both samples have zero variance and unequal means, where the effect size is mathematically infinite -- see the warning for which direction, and report the raw mean difference instead in that case.

Inputs: a (required), b (required).

cohens_hA
Read-onlyIdempotent

Effect size for a difference between two proportions (Cohen, 1988), via the arcsine-square-root transform -- more appropriate than a raw percentage-point difference since it stabilizes variance across the full [0, 1] range. p1 and p2 are interchangeable (the sign of the result just indicates direction); use alongside two_proportion_z_test, which tells you whether a difference is significant but not how large it is. Returns a float (can be negative); rough guidance: ~0.2 small, ~0.5 medium, ~0.8 large.

Inputs: p1 (required), p2 (required). Returns: result

cramers_vA
Read-onlyIdempotent

Effect size for a chi-squared test of independence (Cramer, 1946), normalized to [0, 1] regardless of table shape so it's comparable across tables of different sizes, unlike the raw chi-squared statistic. Call after chi_square_independence, passing its statistic and the same table's n/rows/cols. Returns a float in [0, 1]; rough guidance for a 2x2 table: ~0.1 small, ~0.3 medium, ~0.5 large -- the threshold shifts for larger tables.

Inputs: n (required), cols (required), rows (required), chi2_statistic (required). Returns: result

eta_squaredA
Read-onlyIdempotent

Effect size for a one-way ANOVA: proportion of total variance explained by group membership. Use alongside one_way_anova, which tells you whether groups differ but not how much of the variance that accounts for. Rough guidance: ~0.01 small, ~0.06 medium, ~0.14 large. Biased upward for small samples -- prefer omega_squared when that matters. Returns a float in [0, 1].

Inputs: groups (required). Returns: result

fisher_exact_testA
Read-onlyIdempotent

Test whether the row and column variables of a 2x2 contingency table are independent -- exact (via the hypergeometric distribution over all tables with the same margins), unlike chi_square_independence's chi-squared approximation. Use this instead whenever chi_square_independence warns an expected cell count is below 5, or whenever the sample is small. 2x2 tables only. Returns the sample odds ratio as statistic (can be inf/0 for a zero cell), a two-tailed p-value, a citation, and warnings.

Inputs: table (required), alpha.

kruskal_wallisA
Read-onlyIdempotent

The non-parametric alternative to one_way_anova -- use when that test's own small-df warning makes a normal-theory result suspect. Tests whether all groups are drawn from the same distribution, by ranking the combined data rather than assuming normal populations. A significant result means at least one group differs, not which one -- same caveat as one_way_anova.

Inputs: groups (required), alpha.

levene_testA
Read-onlyIdempotent

Test whether two or more groups have equal population variances (homogeneity of variance) -- use this to decide equal_var for two_sample_t_test, or to sanity-check one_way_anova's equal-variance assumption. Uses the Brown-Forsythe variant (deviations from each group's median), more robust to non-normal data than the original mean-based Levene's test. Returns the same shape as one_way_anova (it's computed as one internally, on absolute deviations from each group's median).

Inputs: groups (required), alpha.

mann_whitney_uA
Read-onlyIdempotent

The non-parametric alternative to two_sample_t_test -- use when that test's own small-n warning makes a normal-theory result suspect, or the data is ordinal/skewed. Tests whether values from sample a are systematically larger or smaller than values from sample b, by ranking the combined data rather than assuming normal populations. statistic is U for sample a; pair with rank_biserial_correlation for a standardized effect size. Returns the same result shape as the parametric tests (statistic, p_value, citation, warnings).

Inputs: a (required), b (required), alpha.

mcnemar_exact_testA
Read-onlyIdempotent

Exact version of mcnemar_test: an exact binomial test (p=0.5) on the discordant pairs instead of the chi-squared approximation -- the small-sample-safe alternative mcnemar_test's own warning points to, the same relationship fisher_exact_test has to chi_square_independence. statistic is b-c (the raw discordant-pair imbalance); the p-value is two-tailed.

Inputs: table (required), alpha.

mcnemar_testA
Read-onlyIdempotent

Test whether two paired proportions are equal -- e.g. the same subjects' yes/no answers before and after an intervention, or two raters' calls on the same items. Use this instead of two_proportion_z_test whenever the "two groups" are actually the same subjects measured twice; two_proportion_z_test assumes independent groups and gets the standard error wrong for paired data. Yates continuity-corrected chi-squared, 1 df -- use mcnemar_exact_test instead when there are few discordant pairs (this warns when there are). Returns that chi-squared statistic, a p-value, and a confidence interval for the difference in marginal proportions.

Inputs: table (required), alpha.

naive_peeking_inflationA
Read-onlyIdempotent

Demonstrates, by simulation, why sequential_two_sample_mean_test / sequential_two_proportion_test exist: the actual false-positive rate of checking an ordinary fixed-sample test (two_sample_t_test, two_proportion_z_test, ...) after every new observation and stopping the first time it clears alpha, versus the alpha actually intended. Call this to show a skeptical stakeholder concretely what "just peek at the dashboard and stop early" costs before recommending the always-valid alternative. Returns the estimated true false-positive rate, its Monte Carlo standard error, and a citation.

Inputs: n_looks (required), alpha, trials.

omega_squaredA
Read-onlyIdempotent

Effect size for a one-way ANOVA, less biased than eta_squared for small samples since it subtracts out the variance explained by chance alone. Use alongside one_way_anova. Can be slightly negative when the true effect is near zero -- that's expected, not an error.

Inputs: groups (required). Returns: result

one_proportion_z_testA
Read-onlyIdempotent

Test whether an observed proportion (successes out of n) differs from a hypothesized proportion p0 -- e.g. "is this coin fair (p0=0.5) given 55 heads in 100 flips?" Uses the normal approximation, which degrades for small n or p0 near 0 or 1; a warning is included when that assumption looks shaky. Returns the z-statistic, two-tailed p-value, a confidence interval for the true proportion, a citation, and warnings.

Inputs: n (required), p0 (required), successes (required), alpha.

one_sample_t_testA
Read-onlyIdempotent

Test whether a sample's mean differs from a hypothesized value mu0. Returns the t-statistic, degrees of freedom, two-tailed p-value, a confidence interval for the mean, and any assumption warnings.

Inputs: mu0 (required), data (required), alpha.

one_way_anovaA
Read-onlyIdempotent

Test whether three or more independent groups have different means -- e.g. comparing average order value across three marketing channels. A significant result means at least one group differs from the others, not which one -- follow up with pairwise two_sample_t_test calls (correcting for multiple comparisons via bonferroni_correction or benjamini_hochberg_correction) to find which. Returns the F-statistic, between/within degrees of freedom, p-value, a citation, and a warning if within-group df is small.

Inputs: groups (required), alpha.

paired_t_testA
Read-onlyIdempotent

Test whether the mean difference between paired observations (e.g. before/after measurements on the same subjects, or matched pairs) is zero. a[i] and b[i] must be the two measurements of the same pair -- use two_sample_t_test instead if the two samples are independent (different subjects in each group). Returns the t-statistic, degrees of freedom (n-1), two-tailed p-value, a confidence interval for the mean difference, a citation, and assumption warnings.

Inputs: a (required), b (required), alpha.

pairwise_group_comparisonsA
Read-onlyIdempotent

Run every pairwise comparison across 2+ groups and correct for multiple comparisons in one call, instead of orchestrating k*(k-1)/2 separate two_sample_t_test/mann_whitney_u calls plus a separate correction call by hand -- and forgetting the correction is one of the most common real mistakes this package exists to prevent. The natural follow-up after a significant one_way_anova/kruskal_wallis result: pass the same groups here to find which group(s) differ, not just whether any do. Returns every pair's statistic, raw p-value, whether it's still significant after correction, and an effect size, plus the correction method's citation and warnings.

Inputs: groups (required), test, alpha, labels, +2 more.

pearson_correlationA
Read-onlyIdempotent

Test for a linear association between two paired variables -- e.g. "does hours studied predict test score?" statistic is r itself (in [-1, 1]), not a t-statistic. Returns r, df (n-2), a two-tailed p-value (H0: r=0), a confidence interval for r via the Fisher z-transform, a citation, and warnings. Use spearman_correlation instead if the relationship may be monotonic but not linear, or if outliers shouldn't dominate the result. Use simple_linear_regression instead for the actual slope (units of y per unit of x), not just the strength of association.

Inputs: x (required), y (required), alpha.

power_for_one_sample_t_testA
Read-onlyIdempotent

Statistical power to detect a given Cohen's d with n observations, using a one-sample (or paired) t-test. Use for paired_t_test too -- it's a one-sample t-test on the differences, so the same power formula applies. Use sample_size_for_one_sample_t_test instead to solve for n given a target power. Returns a float in [alpha, 1].

Inputs: n (required), effect_size_d (required), alpha. Returns: result

power_for_two_proportion_testA
Read-onlyIdempotent

Statistical power to detect a difference between two proportions (e.g. two conversion rates) with n_per_group observations in each group, using a two-proportion z-test. p1 and p2 are interchangeable (only their difference matters) -- e.g. current vs. new conversion rate. Use sample_size_for_two_proportion_test instead to solve for n given a target power. Returns a float in [alpha, 1].

Inputs: p1 (required), p2 (required), n_per_group (required), alpha. Returns: result

power_for_two_sample_t_testA
Read-onlyIdempotent

Statistical power to detect a given Cohen's d with n_per_group observations per group, using a two-sample t-test. Power is the probability of correctly detecting a real effect of this size at the given alpha; a design with low power means a non-significant result would be inconclusive rather than good evidence the effect doesn't exist. Use sample_size_for_two_sample_t_test instead to solve for n given a target power. Returns a float in [alpha, 1].

Inputs: n_per_group (required), effect_size_d (required), alpha. Returns: result

rank_biserial_correlationA
Read-onlyIdempotent

Effect size for a Mann-Whitney U test. Call after mann_whitney_u, passing its statistic and the two sample sizes. Positive means sample 1's values tend to exceed sample 2's; negative means the reverse; 0 is no tendency either way. Returns a float in [-1, 1]; rough guidance mirrors Cohen's d: ~0.1 small, ~0.3 medium, ~0.5 large.

Inputs: n1 (required), n2 (required), u1_statistic (required). Returns: result

recommend_testA
Read-onlyIdempotent

Not sure which rigor tool fits your question? Answer a few characteristics of the data and get back which tool to call, why, what to call instead if this test's assumptions look shaky, and what to run alongside it (an effect size, a power calculation, a natural follow-up). Every test in this package already documents this guidance in its own docstring for the sibling comparisons it knows about -- this tool exists so you don't have to have already read every other tool's docstring to find the one relevant cross-reference. Pure decision logic, no statistics computed here.

Inputs: outcome_type (required), paired, n_groups, small_or_skewed, +3 more.

sample_size_for_one_sample_t_testA
Read-onlyIdempotent

How many observations are needed to detect a given Cohen's d with a one-sample (or paired) t-test at the target power. Use for paired_t_test too -- a paired t-test is a one-sample t-test on the differences, so the same power formula applies. Returns a continuous value and a rounded-up integer to actually use.

Inputs: effect_size_d (required), alpha, target_power.

sample_size_for_two_proportion_testA
Read-onlyIdempotent

How many observations per group are needed to detect a difference between two proportions (e.g. conversion rates) at the target power. p1 and p2 are interchangeable -- only their difference matters.

Inputs: p1 (required), p2 (required), alpha, target_power.

sample_size_for_two_sample_t_testA
Read-onlyIdempotent

How many observations per group are needed to detect a given Cohen's d with a two-sample t-test at the target power. Returns a continuous value and a rounded-up integer to actually use.

Inputs: effect_size_d (required), alpha, target_power.

sequential_two_proportion_testA
Read-onlyIdempotent

Always-valid test of whether two proportions (e.g. two conversion rates in a live A/B test) differ, safe to call again after every new observation in either group -- the sequential-monitoring counterpart to two_proportion_z_test. Use this instead whenever the result will be checked more than once before the experiment ends, which is the normal case for a live dashboard rather than a one-shot analysis. p1 and p2 are interchangeable (only their difference matters). tau does not need to be exact -- reuse the minimum-detectable-effect you'd otherwise plug into sample_size_for_two_proportion_test.

Inputs: n1 (required), n2 (required), tau (required), successes1 (required), +2 more.

sequential_two_sample_mean_testA
Read-onlyIdempotent

Always-valid test of whether two groups' means differ, safe to call again after every new observation in either group -- unlike two_sample_t_test, which needs a sample size decided in advance and gives no such guarantee if checked repeatedly and stopped at the first significant look (that repeated-checking failure mode is exactly what inflates false positives; see naive_peeking_inflation for a demonstration). Use this instead of two_sample_t_test whenever a result will be (or already has been) checked more than once as data accumulates, e.g. monitoring a live experiment. Returns the current effect estimate, its standard error, the mixture likelihood ratio and always-valid p-value, and assumption warnings. tau does not need to be exact -- reuse the minimum-detectable-effect you'd otherwise plug into sample_size_for_two_sample_t_test.

Inputs: a (required), b (required), tau (required), alpha, +1 more.

simple_linear_regressionA
Read-onlyIdempotent

Fit y = intercept + slope * x by ordinary least squares -- single predictor only. Reports the slope (change in y per unit of x), the intercept, R^2 (proportion of y's variance explained by x), and a significance test + confidence interval for the slope (H0: slope=0). Use pearson_correlation instead if you only need the strength of a linear association, not its actual units/magnitude.

Inputs: x (required), y (required), alpha.

spearman_correlationA
Read-onlyIdempotent

Test for a monotonic association between two paired variables, via the Pearson correlation of their ranks -- doesn't assume linearity and is far less sensitive to outliers' exact magnitude than pearson_correlation. Same return shape as pearson_correlation (statistic is rho itself, in [-1, 1]).

Inputs: x (required), y (required), alpha.

two_proportion_z_testA
Read-onlyIdempotent

Test whether two independent proportions differ -- the standard test behind comparing conversion rates between two groups (e.g. an A/B test). Returns the z-statistic, two-tailed p-value, a confidence interval for the difference in proportions, a citation, and warnings.

Inputs: n1 (required), n2 (required), successes1 (required), successes2 (required), +1 more.

two_sample_t_testA
Read-onlyIdempotent

Test whether two independent samples have different means. Defaults to Welch's t-test (does not assume equal variances); pass equal_var=true for the classic pooled-variance test.

Inputs: a (required), b (required), alpha, equal_var.

wilcoxon_signed_rankA
Read-onlyIdempotent

The non-parametric alternative to paired_t_test -- use when that test's own small-n warning makes a normal-theory result suspect. Tests whether the median of the paired differences is zero, by ranking the absolute differences rather than assuming they're normally distributed. Pairs with a zero difference are dropped (and counted in a warning), the standard procedure. statistic is T = min(W+, W-).

Inputs: a (required), b (required), alpha.

Tool Schema Changelog

Recent tool additions, removals, and schema changes observed during successful MCP inspections.

Loading tool schema changelog…

    TDQS

    A4.1/5.0

    Scored across 37 tools

    Disambiguation5/5

    Every tool targets a distinct statistical procedure or design (e.g., paired vs. independent proportions, fixed-sample vs. sequential means, chi-square vs. exact test), and the descriptions explicitly cross-reference sibling tools to prevent misselection. Even the paired power/sample-size tools are clearly differentiated as inverse operations.

    Naming Consistency5/5

    All tool names use consistent snake_case and follow a predictable pattern: tests are named after the procedure (e.g., two_sample_t_test, mann_whitney_u), effect sizes after the statistic, and power/sample-size tools share the power_for_/sample_size_for_ prefix. The few non-test utilities (recommend_test, naive_peeking_inflation) are still stylistically consistent.

    Tool Count2/5

    37 tools is well beyond the 25+ threshold for a heavy surface, even though each tool is individually useful. The inclusion of recommend_test and pairwise_group_comparisons mitigates the burden, but the set would benefit from consolidation or a more focused scope.

    Completeness4/5

    The suite covers the common lifecycle of a statistical analysis: assumption checks, parametric/nonparametric tests, effect sizes, power/sample-size planning, multiple-comparison corrections, and pairwise follow-ups. Minor gaps remain, such as no power/sample-size calculations for ANOVA or chi-square and no explicit normality test, but agents can work around these.

    Maintenance

    ActivitySlowing
    ResponsivenessOutdated data

    Related MCP Connectors

    Related MCP Servers

    • F
      license
      Not graded
      quality
      D
      maintenance
      Enables comprehensive statistical analysis including descriptive statistics, hypothesis testing, regression, and more via a FastMCP-based API.
      3
      -
    • A
      license
      A
      quality
      C
      maintenance
      Eval-integrity statistics for AI benchmark claims — multiple-testing correction, power/MDE for model gaps, judge-bias and leaderboard-rank checks. Catches a benchmark number that won't survive a second look.
      9
      MIT
    • F
      license
      Not graded
      quality
      Not graded
      maintenance
      Enables auditing scientific papers for methodological biases such as selection bias and p-hacking, and assessing citation credibility and research consensus.
      -
    • A
      license
      Not graded
      quality
      Not graded
      maintenance
      Enables statistical A/B testing by computing Welch's two-sample t-test, Satterthwaite degrees of freedom, and two-tailed p-values, alongside time-series forecasting, anomaly detection, regression, and PCA through MCP tools.
      MIT