New advertisers: 50% off your first month with code FIRSTMONTHSee slots

Power analysis and sample-size planning for studies, with closed-form and simulation-based methods.

skills.sh installs
1.5K
GitHub stars
58.1K
last updated
Jul 31, 2026
View on GitHub

What it does

  • Covers closed-form power for t-tests, ANOVA, proportions, correlations, chi-square, and linear regression, plus Monte Carlo power for complex designs
  • Includes scripts/power.py wrapping sample size, power, MDE, and power-curve calculations, with reference files on closed-form recipes, simulation, and effect sizes
  • Enforces a warning against post-hoc "observed" power and recommends sensitivity analysis or confidence intervals instead
  • Designed for planning grants, IRB protocols, and pre-registrations that require a justified sample size

Install

$ npx -y skills add K-Dense-AI/scientific-agent-skills --skill statistical-power -y

Installs into .agents/skills for every agent it finds here, and .claude/skills for Claude Code.

Files

Statistical Power & Sample Size

Overview

Power analysis answers one of the most consequential questions in study planning: how large a sample do you need to reliably detect an effect of a given size, and what could you detect with the sample you can afford? An underpowered study wastes resources and produces inconclusive or irreproducible results; an overpowered one wastes participants, money, and (in clinical work) exposes more people to risk than necessary. Getting this right before data collection is the single highest-leverage statistical decision in a project.

Four quantities are locked together for any given test: sample size (n), effect size, significance level (α), and power (1 − β). Fix any three and the fourth is determined. Every calculation in this skill is some rearrangement of that relationship.

This skill covers the two ways to do power analysis:

  • Closed-form formulas (fast, exact for standard tests) — see references/closed_form_recipes.md.
  • Simulation / Monte Carlo (works for any design or model you can simulate and analyze) — see references/simulation_based_power.md.

Details

Repository
github.com/K-Dense-AI/scientific-agent-skills
Categories
Research & Academic, Data Science & Analytics
License
MIT license
First seen
Aug 2, 2026

More from K-Dense-AI/scientific-agent-skills

All 17

Similar to Statistical Power

More Research & Academic