The value of an AI assistant in statistics is not that it knows more tests than you — it is that it will argue with you on demand. Used as a sparring partner with structured critique prompts, it catches assumption violations, design flaws, and interpretation overreach before a reviewer or a bad decision does.
Tier: Foundation · Workflow area: Statistical methodology
Used as an oracle ("which test should I use?" → run whatever it says), it launders your uncertainty into false confidence.
Skip it when a pre-registered analysis plan already fixes the method — follow the plan.
scipy.stats and statsmodels (or R equivalents) to actually run tests and diagnostics.State the problem as a decision, not a test request:
Decision: whether to roll out a new onboarding flow. Data: 4,800 users
randomized 50/50 at signup; outcome = completed setup within 7 days
(binary); secondary = time-to-completion (right-skewed, 22% censored at 7d).
Randomization unit = user; some users share a company account.
Do NOT recommend a test yet. First list what additional facts would change
the correct analysis, and ask me for them.
The "ask me first" step surfaces issues (clustering by company, censoring) that a direct answer would have skipped.
Get a recommendation with explicit assumptions. After answering its questions: Recommend an analysis. For each assumption it requires, state how to check it on my data and what to do if it fails. Expect something like: two-proportion z-test (or logistic regression with company-clustered SEs), Kaplan-Meier or log-rank for the censored secondary — with checks attached.
Run the assumption checks as code, not conversation. Ask for a diagnostic script:
# e.g. cluster-size distribution, intra-class correlation for clustering;
# for a t-test path: normality is irrelevant at n=4800, but check for
# heavy tails/outliers driving the mean; for proportions: expected cell counts
import statsmodels.formula.api as smf
m = smf.logit("completed ~ variant", data=df).fit(cov_type="cluster",
cov_kwds={"groups": df["company_id"]})
Execute it yourself; paste the outputs back for interpretation.
Force the adversarial pass. In a fresh thread (to avoid agreement momentum):
A colleague analyzed this experiment as follows: [paste method + result].
Argue AGAINST this analysis as a hostile reviewer. Find at least 4 concrete
problems, ranked by how much each could change the conclusion. Then state
which criticisms are serious vs cosmetic for this decision.
The final ranking matters — assistants generate ten objections easily; calibrating which ones bite is the skill you are practicing.
Stress-test the conclusion. Ask for the robustness menu and run the top items: cluster-robust vs naive SEs, with/without outlier caps, bootstrap CI vs asymptotic. If the decision flips under any reasonable variant, the honest answer is "not robust," not the variant you prefer.
Write the methods paragraph. Have the assistant draft it from what you actually ran — test, assumptions checked and outcomes, effect size with CI, robustness results — then edit. Never let it draft from the plan instead of the executed reality.
Run the adversarial pass in a separate conversation from the one that recommended the method — a model critiques its own advice far more softly than a fresh instance does.
statsmodels/scipy code, not the model's arithmetic.scipy/statsmodels.