Alterlab Statistical Analysis logo

Alterlab Statistical Analysis

Community
AlterLab-IEU
alterlab-statistical-analysis

Guided statistical analysis with hypothesis-test selection, assumption checking, effect sizes, power analysis, and APA-formatted reporting using scipy.stats, statsmodels, and pingouin (Bayesian alternatives with PyMC). Use when choosing and running the appropriate statistical test for data, verifying test assumptions, computing power/sample size, or producing APA-style results for academic research. For implementing specific models programmatically prefer alterlab-statsmodels. Part of the AlterLab Academic Skills suite.

Overview

PublisherAlterLab-IEU
RepositoryAlterLab-Academic-Skills
Skill namealterlab-statistical-analysis
Stars
84
Forks
16
Bundled files
9
LicenseMIT
Links
  • Markdown instructions

    A SKILL.md file the model loads on demand, so it only costs tokens when a request actually matches.

  • Works with any LLM

    AI skills are plain Markdown, not provider-specific code, so this works with GPT, Claude, Gemini, Grok, or a local model.

  • 9 bundled files

    Scripts, templates, and references the model can read while it works. Files are read-only and never executed.

  • Open source

    Published by AlterLab-IEU on GitHub. Read the source before you install it.

Installation

Install the Alterlab Statistical Analysis AI skill in TypingMind to use it with any LLM, or drop it into another agent that reads SKILL.md.

1

Install in TypingMind

TypingMind installs a skill straight from its GitHub folder — it reads SKILL.md, bundles the resource files, and stores the result locally.

  1. Open the app and go to Plugins → Skills.
  2. Choose "Install from GitHub".
  3. Paste the skill folder URL below and confirm.
    https://github.com/AlterLab-IEU/AlterLab-Academic-Skills/tree/main/skills/data-science/alterlab-statistical-analysis
  4. Enable the skill in any chat where you want it available.
Plugins → Skills → Add skill → From GitHub URL, then paste the folder URL and press Continue.
2

Install in another agent

Any agent that reads the Agent Skills format can use this skill — copy the folder into that agent's skills directory.

Claude Code — .claude/skills
git clone --depth 1 https://github.com/AlterLab-IEU/AlterLab-Academic-Skills.git /tmp/AlterLab-Academic-Skills
mkdir -p .claude/skills
cp -r /tmp/AlterLab-Academic-Skills/skills/data-science/alterlab-statistical-analysis .claude/skills/alterlab-statistical-analysis
Restart Claude Code after copying so it picks up the new skill.

Use it in TypingMind

Enable Alterlab Statistical Analysis in any TypingMind chat and the model takes it from there. Its name and description sit in the system prompt, and the moment a request matches, the model loads the full instructions itself — you never invoke it by hand, and it costs no tokens until it is actually used.

The model loads Alterlab Statistical Analysis on its own as soon as a request matches it.

Works with any AI model

AI skills are plain Markdown instructions rather than provider-specific code, so Alterlab Statistical Analysis is not tied to the model it was written for. Install it once in TypingMind and use it with GPT-5, Claude, Gemini, Grok, DeepSeek, Mistral, Llama, or a local model you run yourself — all on your own API keys.

  • Loaded only when it is needed

    The system prompt carries just the name and description. The instructions are fetched on the first matching request, so an idle skill costs nothing.

  • Switch models mid-chat

    Because the skill is instructions rather than code, changing model does not break it — the next model reads the same SKILL.md.

Skill instructions

This is the SKILL.md content the model loads. Read it before installing — a skill is instructions your model will follow.

Statistical Analysis

Overview

A systematic process for testing hypotheses and quantifying relationships. Conduct hypothesis tests (t-test, ANOVA, chi-square), regression, correlation, and Bayesian analyses with assumption checks and APA reporting. For academic research.

When to Use This Skill

Use when:

  • Conducting hypothesis tests (t-tests, ANOVA, chi-square)
  • Performing regression or correlation analyses
  • Running Bayesian statistical analyses
  • Checking statistical assumptions and diagnostics
  • Calculating effect sizes and conducting power analyses
  • Reporting statistical results in APA format

Does NOT Trigger

ScenarioUse Instead
Fitting a specific model class (OLS/GLM/mixed/ARIMA) with coefficient tables and residual diagnosticsalterlab-statsmodels
Policing test choice: switching tests after seeing p-values, test-shopping, uncorrected families of testsalterlab-test-selection-guard
Full Bayesian or hierarchical modelling workflows (custom priors, NUTS diagnostics, LOO model comparison)alterlab-pymc
Pooling effect sizes across studies (random-effects meta-analysis, heterogeneity, funnel plots)alterlab-meta-analysis
Complex-sample survey data needing weights, strata, and design-based standard errorsalterlab-survey-analysis

Core Capabilities

  1. Test selection & planning — choose tests by research question and data type; a priori power analysis; multiple-comparison strategy.
  2. Assumption checking — verify normality, homogeneity, linearity; diagnostic plots; remediation when violated.
  3. Statistical testing — parametric and non-parametric tests; regression; correlation; Bayesian alternatives with Bayes Factors.
  4. Effect sizes & interpretation — appropriate effect sizes with CIs; statistical vs. practical significance.
  5. Professional reporting — APA-style reports, publication-ready figures and tables.

Workflow

SELECT a test?      → Test Selection Guide
CHECK assumptions?  → Assumption Checking
RUN analysis?       → Running Statistical Tests + references/code_examples.md
REPORT results?     → Reporting Results + references/apa_report_templates.md

Worked code for every step is in references/code_examples.md.

Test Selection Guide

Quick reference (full decision tree: references/test_selection_guide.md):

Two groups — independent + normal → independent t-test; independent + non-normal → Mann-Whitney U; paired + normal → paired t-test; paired + non-normal → Wilcoxon signed-rank; binary outcome → chi-square or Fisher's exact.

3+ groups — independent + normal → one-way ANOVA; independent + non-normal → Kruskal-Wallis; paired + normal → repeated-measures ANOVA; paired + non-normal → Friedman.

Relationships — two continuous → Pearson (normal) or Spearman (non-normal); continuous outcome + predictors → linear regression; binary outcome + predictors → logistic regression.

Bayesian alternatives exist for all of the above, giving direct probability statements, Bayes Factors, and the ability to support the null. See references/bayesian_statistics.md.

Assumption Checking

Check assumptions before interpreting results, because a violated assumption can make the reported p-value and CI wrong. Use the bundled scripts/assumption_checks.py (comprehensive_assumption_check() and targeted functions — code in references/code_examples.md). It performs outlier detection (IQR + z-score), normality testing (Shapiro-Wilk + Q-Q), homogeneity of variance (Levene + box plots), and interpretation.

When violated:

  • Normality — mild + n>30/group → proceed (robust); moderate → non-parametric; severe → transform or non-parametric.
  • Homogeneity — t-test → Welch's; ANOVA → Welch's or Brown-Forsythe; regression → robust SE or WLS.
  • Linearity (regression) — polynomial terms, transform variables, or GAM.

Detail: references/assumptions_and_diagnostics.md.

Running Statistical Tests

Primary libraries: scipy.stats (core tests), statsmodels (regression/diagnostics), pingouin (tests + effect sizes), pymc + arviz (Bayesian).

Copy-paste examples for t-test, ANOVA + post-hoc, linear regression with full diagnostics, and a Bayesian t-test: references/code_examples.md.

Effect Sizes

Effect sizes quantify magnitude; p-values only indicate existence. Always report them, with CIs. Benchmarks (guidelines only — context matters):

TestEffect SizeSmallMediumLarge
T-testCohen's d0.200.500.80
ANOVAη²_p0.010.060.14
Correlationr0.100.300.50
RegressionR²0.020.130.26
Chi-squareCramér's V0.070.210.35

Calculation code and CI computation: references/code_examples.md. Full guidance: references/effect_sizes_and_power.md.

Power Analysis

Run a priori power analysis to size a study before collecting data, and sensitivity analysis afterward to report the smallest detectable effect. Avoid post-hoc power. Code: references/code_examples.md. Guidance: references/effect_sizes_and_power.md.

Reporting Results

Follow APA style (references/reporting_standards.md). Report descriptive statistics (M, SD, n), test statistics (name, statistic, df, exact p), effect sizes with CIs, assumption checks, and all planned analyses.

Ready-to-adapt report paragraphs for t-test, ANOVA, multiple regression, and Bayesian analysis: references/apa_report_templates.md.

Bayesian Statistics

Consider Bayesian methods when you have prior information, want direct probability statements, have small samples or sequential data, need to quantify evidence for the null, or have a complex (hierarchical, missing-data) model. Key advantages: intuitive interpretation, evidence for the null, flexibility, full uncertainty quantification. Comprehensive guide (priors, Bayes Factors, credible intervals, convergence checks): references/bayesian_statistics.md.

Best Practices

Pre-register analyses; always check assumptions; report effect sizes with CIs; report all planned analyses including non-significant ones; distinguish statistical from practical significance; visualize before and after; check regression/ANOVA diagnostics; run sensitivity analyses; share data and code; be transparent about violations and decisions.

Common Pitfalls

P-hacking; HARKing; ignoring assumptions; confusing significance with importance; not reporting effect sizes; cherry-picking results; misinterpreting p-values; uncorrected multiple comparisons; ignoring missing-data mechanism (MCAR/MAR/MNAR); overinterpreting non-significant results.

Getting Started Checklist

  • Define research question and hypotheses
  • Determine the test (references/test_selection_guide.md)
  • Power analysis for sample size
  • Load and inspect data; check missing data and outliers
  • Verify assumptions (scripts/assumption_checks.py)
  • Run primary analysis; compute effect sizes with CIs
  • Post-hoc tests if needed (with corrections)
  • Create visualizations
  • Write results (references/reporting_standards.md)
  • Sensitivity analyses; share data and code

Index of Bundled Resources

References (references/)

  • test_selection_guide.md — decision tree for choosing a test
  • assumptions_and_diagnostics.md — checking and handling violations
  • effect_sizes_and_power.md — effect sizes and power analysis
  • bayesian_statistics.md — complete Bayesian guide
  • reporting_standards.md — APA reporting rules
  • code_examples.md — worked Python for tests, diagnostics, Bayesian, power, effect sizes
  • apa_report_templates.md — ready-to-adapt APA results paragraphs

Scripts (scripts/)

  • assumption_checks.py — automated assumption checking with visualizations (comprehensive_assumption_check, check_normality, check_homogeneity_of_variance, check_linearity, detect_outliers)

Further Reading

Key textbooks: Cohen (1988), Field (2013), Gelman & Hill (2006), Kruschke (2014). Online: APA Style Guide (https://apastyle.apa.org/), Cross Validated (stats.stackexchange.com).

Part of the AlterLab Academic Skills suite.

Bundled files

The model reads these on demand while the skill is loaded. They are exposed as readable files and are never executed.

Frequently asked questions

What does the Alterlab Statistical Analysis AI skill do?

Guided statistical analysis with hypothesis-test selection, assumption checking, effect sizes, power analysis, and APA-formatted reporting using scipy.stats, statsmodels, and pingouin (Bayesian alternatives with PyMC). Use when choosing and running the appropriate statistical test for data, verifying test assumptions, computing power/sample size, or producing APA-style results for academic research. For implementing specific models programmatically prefer alterlab-statsmodels. Part of the AlterLab Academic Skills suite.

Why use Alterlab Statistical Analysis on TypingMind?

Because you install it once and use it with any model. Alterlab Statistical Analysis is plain Markdown rather than provider-specific code, so the same skill runs on GPT-5, Claude, Gemini, Grok, or a local model — and you can switch model mid-chat without it breaking. TypingMind runs on your own API keys, so you pay providers directly instead of a per-seat subscription, and your skills and chats stay in your own storage.

How do I install Alterlab Statistical Analysis in TypingMind?

Open Plugins → Skills → Install from GitHub in TypingMind and paste https://github.com/AlterLab-IEU/AlterLab-Academic-Skills/tree/main/skills/data-science/alterlab-statistical-analysis. TypingMind reads its SKILL.md and bundles its files and installs it as a skill you can enable per chat.

Which AI models can use Alterlab Statistical Analysis?

Any model you connect in TypingMind. AI skills are plain Markdown instructions rather than provider-specific code, so GPT, Claude, Gemini, Grok, and local models can all load this skill when a request matches it.

How many AI models can I use with Alterlab Statistical Analysis?

As many as you like. As long as a model supports skills, you can use Alterlab Statistical Analysis with it — GPT, Claude, Gemini, Grok, DeepSeek, Mistral, Llama and more — all on TypingMind with your own API keys.

Is the Alterlab Statistical Analysis AI skill free?

Yes. It is published on GitHub by AlterLab-IEU under the MIT license. You only pay your own AI provider for the tokens you use.

What are AI skills?

An AI skill is a reusable instruction bundle that teaches an AI model how to do one specific task. It follows the open Agent Skills format: a SKILL.md file with a name and description, plus any scripts, templates or reference files the model may need. The model reads the instructions only when your request matches the skill, so an installed skill costs nothing until it is used.

How are AI skills different from plugins or MCP servers?

A plugin or MCP server gives a model new tools to call — code that runs somewhere and returns a result. An AI skill gives the model knowledge and process instead: how to approach a task, which steps to follow, what good output looks like. Skills are plain Markdown, so they need no server, no API key and no runtime, and they work with any model.

View all

Set up your own AI workspace now

Get notified about new features and future giveaways by subscribing to our newsletter 👇