statistics

Selects and runs hypothesis tests, regressions, and causal inference analyses with scipy and statsmodels.

Updated Aug 28, 2026
One-click install
npx skills add https://github.com/miyake-san/sogo-agent-platform --skill statistics-miyake-san
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: statistics
Source: https://github.com/miyake-san/sogo-agent-platform/tree/main/skills/experimental/statistics
Command: npx skills add https://github.com/miyake-san/sogo-agent-platform --skill statistics-miyake-san

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve? Choosing the wrong statistical test, ignoring assumptions, or reporting p-values without effect sizes leads to invalid conclusions. This Skill guides rigorous applied inference — from test selection and assumption checks to experiment design and causal estimation — so analyses are reproducible and claims match what the data supports. ## Core Features & Use Cases - Test Selection & Execution: A decision guide maps your data and design to the right test (t-tests, ANOVA, chi-square, Mann–Whitney, bootstrap) with concrete scipy.stats and statsmodels functions. - A/B Testing & Experiment Design: Power and sample-size calculation, randomization unit selection, guardrail metrics, peeking control, and sample-ratio mismatch checks. - Causal Inference: DAG-based confounder identification and estimation strategies including matching, IPW, difference-in-differences, instrumental variables, and regression discontinuity. - Use Case: You ran an A/B test on a checkout flow. Use this Skill to verify the sample size was adequate, run a two-proportion z-test, report the effect size with a confidence interval, and check for sample-ratio mismatch before declaring a winner. ## Quick Start Ask the AI to determine which statistical test is appropriate for comparing conversion rates between two experiment groups and to run the analysis with effect size and confidence interval.

Frequently Asked Questions about statistics

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I choose the right statistical test for my data?

Choosing a statistical test depends on the question type, number of groups, and data distribution. The Skill provides a decision table mapping designs to tests, such as Welch's t-test for two independent means, Mann–Whitney U for non-normal data, and chi-square for categorical associations.

How to calculate sample size for an A/B test in Python?

Sample size calculation uses statsmodels.stats.power with your significance level (typically 0.05), power (typically 0.80), and minimum detectable effect. Compute it before launching the experiment to avoid underpowered results and invalid early stopping.

scipy.stats vs statsmodels: which should I use?

scipy.stats covers standalone hypothesis tests, distributions, and resampling methods like bootstrap and permutation tests. statsmodels is better for regression, GLMs, and ANOVA where you need full model summaries, diagnostics, and inference on coefficients.

Can I claim causation from observational data?

Causal claims from observational data require an explicit identification strategy, not just correlation. Draw a DAG to identify confounders, then apply matching, inverse-probability weighting, difference-in-differences, instrumental variables, or regression discontinuity, and report the assumptions each requires.

Why is peeking at A/B test results a problem?

Peeking inflates false positives because repeatedly testing until significant breaks the nominal error rate. Use a fixed horizon determined by upfront power analysis, or apply sequential, group-sequential, or always-valid testing methods if monitoring is required.

What should I report besides the p-value?

Always report the effect size and a confidence or credible interval alongside the p-value. A p-value alone says nothing about practical magnitude, and a non-significant result does not prove the absence of an effect.