Guide · Agent skill
How to use the Statistical Analysis Guide agent skill
Updated · written with AI from the project's own documentation and checked against our catalogue data
The statistical-analysis skill gives an AI agent a structured workflow for research statistics: framing the question, inspecting data, choosing a test, checking assumptions, computing effect sizes and power, and drafting APA-style results. It is aimed at researchers, students and analysts who work with experimental or survey data. After this guide you will know what the skill does, how to install it, how to ask for it in plain language, and what it needs to run safely.
Quick start
- 1Install the skill. Download the ZIP from this page and unzip it into ~/.claude/skills/ or a project's .claude/skills/ folder, or upload it under Settings → Capabilities → Skills in the Claude apps.
- 2Create the Python environment. Run the uv commands from the setup section to create a separate environment with the pinned packages. Use a dedicated folder rather than a shared project environment.
- 3Describe your design. Tell the agent your question, outcome and predictor variables, and whether groups are independent, paired, or repeated. Include sample sizes if you have them.
- 4Let the agent inspect and check the data. Expect descriptive statistics and plots per group, plus assumption checks using scripts/assumption_checks.py. Answer any questions the agent raises about missing data or outliers.
- 5Review the test, effect size and report. Check that the effect size and its confidence interval appear alongside the p-value, and that the write-up lists the assumption checks and any departures from plan.
What the statistical-analysis skill makes the agent do
An agent skill is a folder of instructions and supporting files that an AI agent loads when a task matches it. This one covers hypothesis tests such as t-tests, ANOVA and chi-square, plus correlation, regression, non-parametric and Bayesian methods.
The skill asks the agent to work in a fixed order: state the hypothesis and design first, look at the data, pick a test, check assumptions, run the test with an effect size, then report. It stresses that numerical checks cannot prove assumptions or scientific validity, so the agent should explain its reasoning and flag limitations.
- Frames the question, outcome and predictors, and whether groups are independent or paired
- Inspects per-group sample size, mean, SD, median and missing values, and plots raw data
- Helps choose a test, with a separate reference for counts, time-to-event, reliability and factorial designs
- Runs a bundled Python helper script for assumption diagnostics (normality, variance equality, outliers)
- Computes effect sizes and power and drafts APA-formatted results with confidence intervals
Install the skill from the ZIP or the Claude apps
Download the ZIP for this skill from this page. For Claude Code, unzip it into your user skills folder at ~/.claude/skills/, or into a project's .claude/skills/ folder if you want it only for one project.
In the Claude apps, you can instead upload the skill under Settings → Capabilities → Skills.
The skill's Python dependencies are separate from the skill files. The source recommends creating a dedicated environment with uv rather than adding these packages to a shared project environment.
- Claude Code, all projects: unzip into ~/.claude/skills/
- Claude Code, one project: unzip into the project's .claude/skills/
- Claude apps: Settings → Capabilities → Skills, then upload
Set up the Python environment
The skill's instructions give these commands for an isolated environment. The core packages are pinned in the source; the optional Bayesian packages are a separate step. On Windows, the Python path is different (see the note after the code).
Network access is used for installing packages and reading documentation. Lock the resolved environment if you need to reproduce an analysis later.
- Requires Python 3.12 or newer
- Optional Bayesian examples need PyMC and ArviZ, installed separately
- On Windows use .venv-statistics/Scripts/python.exe instead of the bin path
uv venv --python 3.12 .venv-statistics
uv pip install --python .venv-statistics/bin/python "pingouin==0.7.0" "scipy==1.18.1" "statsmodels==0.15.0" pandas matplotlib seaborn
# Optional Bayesian examples:
uv pip install --python .venv-statistics/bin/python "pymc==6.3.2" "arviz==1.3.0"Trigger the skill with natural requests
You do not need to name a test. The skill is meant to activate when you describe a research goal, such as comparing groups, checking whether an effect exists, planning a sample, or writing up results. Be specific about your design, because the agent will ask for it before testing.
Good requests include the data, the question and the design. Vague requests like 'run a p-value' are the case where the skill will slow you down to ask questions first.
- 'I have test scores from two teaching methods, 30 students each. Are the means different, and how big is the difference?'
- 'How many participants do I need to detect a medium effect in a between-subjects design?'
- 'Check whether my survey responses meet the assumptions for a regression, then write up the results in APA style.'
- 'My before-and-after measurements are paired per person. Which test fits and what is the effect size?'
Check assumptions and interpret the results
The bundled script scripts/assumption_checks.py contains functions for normality, variance equality, linearity, regression diagnostics and outlier detection. The agent adds the skill's scripts/ folder to PYTHONPATH and imports from it. Plots and screens should be read alongside your design, not used as automatic switches to another test.
A non-significant normality or equal-variance result does not confirm the assumption. The skill asks the agent to report which checks were run and any sensitivity analyses.
- Functions include check_normality, check_homogeneity_of_variance (Levene's test), check_linearity and detect_outliers
- Use the outputs as evidence, not proof
- Document departures from your original plan
from assumption_checks import comprehensive_assumption_check
results = comprehensive_assumption_check(
data=df,
value_col='score',
group_col='group',
alpha=0.05
)Watch the library-specific pitfalls
The source lists several Pingouin behaviours that can change your numbers. Knowing them helps you read the agent's output and catch mistakes.
Pingouin's correction='auto' setting picks Welch's test based on unequal sample sizes, not on variance evidence. If you planned Welch's test in advance, set correction=True. The ttest output reports an absolute Cohen's d, so a signed estimate must be calculated explicitly. Its power column is observed power and should not be used to interpret a null result. One-sided t-tests do not get a BF10 Bayes factor from Pingouin.
- correction='auto' depends on sample sizes; use correction=True for a prespecified Welch test
- Cohen's d from ttest is absolute; compute a signed version if direction matters
- Observed power should not be used to interpret non-significant results
- Posterior directional probabilities are not Bayes factors
What people use it for
- Comparing an outcome between two or more experimental groups and reporting the effect size with a confidence interval
- Analysing a survey dataset with regression or correlation and checking the model's assumptions first
- Planning a study by calculating the sample size needed for a target effect with power analysis
- Drafting an APA-style results section for a thesis or manuscript, including descriptives and assumption checks
Frequently asked questions
Is the statistical-analysis skill free to use?
The skill is released under the MIT licence, as stated in its source. The Python packages it uses are separate projects with their own licences, so check those if you need to confirm terms for a specific use.
What do I need before I can use it?
You need Python 3.12 or newer, uv recommended for creating an isolated environment, and the scientific packages listed in the setup section. Optional Bayesian examples need PyMC and ArviZ. Network access is needed for installing packages and reading documentation.
How do I install an agent skill from a ZIP file?
Unzip the downloaded folder into ~/.claude/skills/ for all projects, or into a project's .claude/skills/ folder for one project. In the Claude apps, you can upload it under Settings → Capabilities → Skills instead.
Can the skill replace a statistician?
No. The source says it is not meant to replace a statistician for high-stakes decisions such as clinical or regulatory conclusions, because numerical checks cannot certify assumptions or study validity.
Does it run scripts on my computer?
Yes, it includes a Python helper script for assumption diagnostics and uses the Python environment you create. Network access is limited to installing packages and reading documentation, according to the source.
How is this different from statsmodels or PyMC skills?
This skill covers the overall research workflow, test choice and reporting. The source says low-level model fitting such as OLS, GLM or ARIMA belongs to the separate statsmodels skill, and PyMC workflows belong to the pymc skill.
New agent skills, repos and AI tools — every week
The best new skills and open-source projects, the fastest-growing repos, and one free prompt. Five minutes to read. Unsubscribe anytime.
Our verdict
Use this skill if you are a researcher, student or analyst who wants a structured, documented workflow for choosing a test, checking assumptions and writing up results with effect sizes. Pick something else if you need a quick p-value without explaining your design, or if you need low-level model fitting, which the source assigns to the statsmodels and pymc skills. For high-stakes clinical or regulatory decisions, get a qualified statistician involved.
Download the skill