If you've ever been asked "how many subjects do you need?" in a grant or IRB form, this is the skill to reach for. It wraps statsmodels and SciPy behind one interface (`sample_size`, `mde`, `power`, `power_curve`) covering t-tests, ANOVA, proportions, correlations, chi-square, and regression, and it steers you toward a sensible effect size instead of letting you invent one. Its sharpest feature is the explicit warning against post-hoc "observed" power, which reviewers rightly reject. The simulation path for mixed models, GLMs, and cluster-randomized designs is where the real value lies, though you'll need a credible data-generating process to trust it. Layout decisions like randomization or blocking belong to a different skill.

skills.sh installs
1.5K
GitHub stars
56.6K
last updated
Jul 31, 2026

Install

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

Installs into .claude/skills of the current project.

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.

Sponsors

Details

Repository
github.com/K-Dense-AI/scientific-agent-skills
Categories
AI & Agent Building, Productivity & Planning, Design & UI/UX
License
MIT license
First seen
Aug 2, 2026

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

All 17
1rstackjs avatarrstest-best-practicesrstackjs/agent-skillsRstest best practices for config, CLI workflow, test writing, mocking, snapshot testing, DOM testing, coverage, multi-project setup, CI integration, performance1.5Kskills.sh installs
2auth0 avatarauth0-reactauth0/agent-skillsUse when adding Auth0 login, logout, protected routes, or user sessions to a React SPA. Integrates @auth0/auth0-react — use even if the user says "add login to 1.5Kskills.sh installs
3mapbox avatarmapbox-google-maps-migrationmapbox/mapbox-agent-skillsMigration guide for developers moving from Google Maps Platform to Mapbox GL JS, covering API equivalents, pattern translations, and key differences1.5Kskills.sh installs
4pulumi avatarpulumi-escpulumi/agent-skillsGuidance for working with Pulumi ESC (Environments, Secrets, and Configuration). Use when users ask about managing secrets, configuration, environments, short-t1.5Kskills.sh installs
5aj-geddes avatarflask-api-developmentaj-geddes/useful-ai-promptsDevelop lightweight Flask APIs with routing, blueprints, database integration, authentication, and request/response handling. Use when building RESTful APIs, mi1.4Kskills.sh installs
6ailabs-393 avatarstoryboard-managerailabs-393/ai-labs-claude-skillsAssist writers with story planning, character development, plot structuring, chapter writing, timeline tracking, and consistency checking. Use this skill when w1.4Kskills.sh installs