Skip to content

Statistical Power & Sample Size

Calculates sample sizes, power and minimum detectable effects for study planning

Stars
55,780
Licence
MIT
Files
6 files

What it does

Once installed, the agent can plan how many participants or samples a study needs. It runs standard power calculations for common tests such as t-tests, ANOVA, proportions, correlations and regression, and uses simulation for more complex designs like mixed models or cluster trials. It also pushes back on bad practice, such as inventing effect sizes or reporting post-hoc observed power, and suggests sensitivity analyses instead.

Great for

  • Researchers writing a grant, IRB protocol or pre-registration who need a justified sample size
  • Students learning how sample size, effect size, alpha and power relate
  • Analysts who need a minimum detectable effect for a fixed sample size or a power curve

Skip it if

  • Analysing data that has already been collected (the skill points to a separate statistical-analysis skill for that), because post-hoc observed power is circular and is discouraged
  • Studies needing precision, equivalence, noninferiority or sequential-monitoring calculations, which the bundled helpers do not cover
  • Trusting a single number without an honest effect size: results are only as good as the assumed effect, so guessing one is risky

Try asking

  • “How many participants per group do I need to detect a Cohen's d of 0.5 with 80% power?”
  • “What is the minimum detectable effect if I can only recruit 30 per group?”
  • “Make a power curve for a logistic regression study with clustered sites I can include in my grant.”
  • “Write a sample size justification paragraph for my IRB protocol.”
Step-by-step guide: how to use Statistical Power & Sample SizeInstall, first run, examples, tips and FAQs

Install in 3 steps

  1. 1

    Download the skill

    The ZIP contains the 6 original files, the MIT licence and an attribution note.

    statistical-power.zip
  2. 2

    Add it to your agent

    Claude Code (all projects)

    mkdir -p ~/.claude/skills && unzip statistical-power.zip -d ~/.claude/skills/

    Claude Code / Agent SDK (this project only)

    mkdir -p .claude/skills && unzip statistical-power.zip -d .claude/skills/

    Claude apps (web/desktop): Settings → Capabilities → Skills → Upload skill, and choose the ZIP.

  3. 3

    Ask for the task

    No special command needed — the agent reads the skill's description and loads it when your request matches. Try one of the prompts above.

Get better results

  • Give the agent a justified effect size (a smallest effect of interest, pilot data or prior studies) rather than asking it to pick one, and ask for a sensitivity range across plausible effects.
  • Ask for the sample size with and without allowance for dropout or clustering, so the assumptions are visible to reviewers.
  • Keep the Python environment separate from other projects, and record package versions and random seeds alongside the results.

What's inside

  • references/closed_form_recipes.md
  • references/effect_sizes.md
  • references/simulation_based_power.md
  • scripts/power.py
  • scripts/simulate_power.py
  • SKILL.md

Redistributed unmodified from K-Dense-AI/scientific-agent-skills under the MIT licence. The assessment was drafted with AI from the skill's files on 2026-10-29. Skills can instruct your agent to run code — read SKILL.md and any scripts before installing.