Skip to content

How reliably can LLMs perform statistical testing?

Ask a LLM which test to use on textbook problems and it will very likely get it right. Shukla and colleagues did 20 tests across t-tests, Mann–Whitney, log-rank, McNemar and several kinds of regression and ChatGPT, Claude, DeepSeek, Gemini, Grok and Le Chat all produced the correct answer every time. Sebo and Wang found the same with ChatGPT-5, DeepSeek-Chat and Claude across 32 exercises from UCLA's Stata tutorial. But when they asked for the actual Stata commands, up to 12.5% came back wrong in ways that would change the conclusion (errors were found more often for the Friedman test, repeated-measures ANOVA, canonical correlation and factor analysis). Both these studies were conducted slightly before some of the substantial improvements in agentic-AI in late 2025/early 2026 and LLM's typically perform worse on Stata than R and Python.

The harder problem is interpretation. Rovetta, Castaldo and Mansournia put 25 false statements about p-values, confidence intervals and power — from Greenland and colleagues' list — to ChatGPT 5 mini, ChatGPT 5.2, Gemini 3, Perplexity, Copilot and Grok 4. The models usually spotted that a statement was wrong, then reproduced the same errors in the explanation: assumptions treated as a footnote, confidence intervals described as guarantees, non-significance as evidence for the null. All six, repeatedly. Meanwhile Asher and colleagues at Stanford, in a working paper, found that Claude and OpenAI's Codex refuse a blunt instruction to make results significant — both called it misconduct — but comply when the same request is reworded as exploring alternative approaches to uncertainty, running thirteen to sixteen specifications on one study and turning a published coefficient of −0.06 into −0.194 with p<0.001.

Can an AI agent do the whole analysis, rather than one step of it? BixBench takes some sixty real bioinformatics scenarios drawn from published notebooks, where the agent gets a dataset and a question and must explore, analyse and interpret it with the original notebook removed. In early 2025 the agents did no better than random when offered multiple-choice questions, and when made to answer in their own words neither Claude 3.5 Sonnet or GPT-4o's 15% beat a baseline in which the same models were simply asked the questions with no data and no analysis at all. A year later, on a fifty-question multiple-choice subset that domain experts had cleaned up, Zhang (2026) reports Claude Opus 4.7 at 84% and a web-enabled GPT-5.5 at 98%. Claude Code scores 65.3% on that subset, but adding a library of Skills in the form of markdown files (as we did above) takes it to 92%. Another study by Alizadeh and colleagues stripped 54 published papers back to their replication folders — data and code, with every title, author name and word of description removed — and asked Claude Code and Codex what the study had been asking. Claude Code recovered the research questions with a 73.5% semantic match, got at least 60% of a paper's questions right in 87% of cases, and the complete set in 33%. Codex managed 70.0%, 77.8% and 24.1%, respectively. Both were strongest on Python and weakest on Stata.

Takeaways

The main takeaways from this research and what we have seen her are: - LLMs will usually suggest a reasonable test and can often code it correctly using Python libraries. - Write your procedures down as Skills and test them carefully. If you can get them working properly on earlier studies or test examples they will more likely succeed on your data. - Understand the assumptions behind and tests and spend time reading about them. - Simply putting your data into an Agentic AI and hoping it will produce an article or a reliable report is very risky and unlikely to succeed.

Sources

Also see