Free AI Detector AI Research Writer Chat With Research Papers AI Data Analyst Learn Game Development Shop Science Kits
Free AI Detector AI Research Writer
Learn Coding and AI Write Cited Papers AI Research Assistant Free AI Browser Extension Humanize AI Text Listen To Any Article

statsage: The AI Statistician

Updated August 2026
statsage is a free Python package that works like a careful statistician. Give it a table and the columns to compare, and it checks the assumptions, picks the correct statistical test, runs it with effect sizes and confidence intervals, draws a publication quality figure, and writes the methods paragraph and results sentence you can paste into a manuscript. It works completely offline with no account and no key, and it is MIT licensed on GitHub.

Why statsage Exists

Picking the wrong test is one of the most common statistical mistakes in published research. A t-test on badly skewed data, an ANOVA with wildly unequal variances, a chi-square with expected counts too small to trust, each of these produces a p-value that looks authoritative and means very little. The knowledge to avoid these mistakes exists in every statistics textbook, but under deadline, most researchers reach for the test they already know.

statsage makes the safe choice automatically and, more importantly, shows its reasoning. Every report includes the decision path, like "normality failed in group B and n is under 30, so Mann-Whitney U was chosen". You learn the statistics while getting the answer, and a reviewer who asks why you chose a test gets a defensible answer copied straight from the report.

Install

pip install statsage

Excel input support is an optional extra:

pip install statsage[excel]

Use from Python

import pandas as pd
import statsage

df = pd.read_csv("growth.csv")

result = statsage.analyze(df, outcome="od600", group="strain")
print(result.test_name, result.p, result.significant)
print(result.results_text)
result.save_report("report.html")

Paired designs and correlation use the same call:

statsage.analyze(df, outcome="score", group="timepoint", paired="subject")
statsage.analyze(df, x="dose", y="response")

Use from the Command Line

statsage growth.csv --outcome od600 --group strain
statsage growth.csv --outcome score --group timepoint --paired subject
statsage growth.csv --x dose --y response --out report.html

The report prints to the terminal as markdown and saves as a self-contained HTML file with the figure embedded, ready to share with a collaborator or attach to a lab notebook entry.

What It Covers

For two groups: Welch's t-test as the default, since it does not assume equal variances, plus Student's t-test and Mann-Whitney U. For paired designs: the paired t-test and Wilcoxon signed-rank. For three or more groups: one-way ANOVA with Tukey HSD, Welch's ANOVA with Games-Howell, and Kruskal-Wallis with Dunn's test, Holm adjusted. For categorical data: chi-square and Fisher's exact test. For correlation: Pearson and Spearman.

Behind every choice sit the assumption checks: Shapiro-Wilk or D'Agostino normality, Levene's test for variances, sample size rules, IQR outlier flags, and expected cell counts. Effect sizes come with plain language interpretation: Hedges' g, Cohen's dz, rank-biserial r, eta squared, epsilon squared, and Cramer's V.

Every report shows descriptives, each assumption check with its verdict, the reasoning path that led to the chosen test, post-hoc comparisons when relevant, warnings when something deserves a second look, and copy-paste methods and results text.

Figures

statsage draws the figure that matches the design: box plots with individual points for group comparisons, paired line plots for repeated measures, grouped bars for counts, and scatter with a fit line for correlation. Everything uses the colorblind-safe Okabe-Ito palette at 300 dpi, exported inside the HTML report or separately with --figure out.png, ready for a manuscript or a poster.

Bring Your Own AI Model

statsage is fully functional with no AI at all. If a model is available, it is used for exactly one thing: polishing the written narrative. statsage looks for the Claude command line tool, the Codex command line tool, an Anthropic API key, then an OpenAI API key or compatible server, and uses the first one it finds. Control it with --llm off, --llm claude, or the STATSAGE_LLM environment variable.

The model is never allowed to change a number. If its rewrite drops or alters any value, statsage discards it and keeps the template text. Your statistics come from SciPy-backed computation, not from a language model's memory of what a p-value looks like.

Get the Code

statsage is free, open source, and MIT licensed, built by Paul Crinigan at AI Apps API. The source, issue tracker, and README live at github.com/AIAppsAPI/statsage. If your design is not covered yet, open an issue and describe it.

It is part of our growing collection of free AI science tools, alongside labparse, which turns raw instrument exports into exactly the kind of tidy table statsage analyzes, and Literature Radar for monitoring new papers.