Agent skill · Workflow & Productivity

statistical-power

Sample-size and statistical power calculations for planning studies. Use whenever someone asks "how many subjects/samples/replicates do I need", wants an a priori power analysis, a minimum detectable effect (MDE), a power curve, or needs to justify a sample size for a grant, IRB protocol, or pre-registration. Covers closed-form power for t-tests, ANOVA, proportions, correlations, chi-square, and regression, plus simulation-based (Monte Carlo) power for designs with no formula — logistic/Poisson regression, mixed models, cluster-randomized trials, survival, and interactions. Use this skill even

K-Dense-AIgithub.com/K-Dense-AIGitHub ↗
claude-codecan modify filesships scriptsMIT
Install
npx skills add K-Dense-AI/scientific-agent-skills --skill statistical-power --agent claude-code

Same command for any agent — swap --agent for codex, cursor, copilot.

Facts
Files in the skill folder: 6
SKILL.md size: 14 KB
Bundled scripts: yes
Version: 1.0
Allowed tools: ReadWriteEditBash
Requires: Requires Python >=3.10. Examples target statsmodels >=0.14.6, scipy >=1.11, pingouin >=0.6, numpy >=1.26, and…
Path: skills/statistical-power/SKILL.md
Open the folder on GitHub →
Where it comes from
Stars: 32,619
Language: Python
Read our review of the source →

Weekly change comes from our own snapshots, not the repository page — it measures attention, not adoption.

From the SKILL.md

# 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`. For choosing and converting effect sizes — usually the h

What's inside
Steps it walks through
  1. Overview
  2. When to Use This Skill
  3. Installation
  4. The one decision that drives everything: the effect size
  5. Quick recipes (closed-form)
  6. When there is no formula: simulate
  7. Adjustments people forget
  8. Workflow
  9. Reporting template
  10. Common pitfalls
  11. Resources
  12. Scripts
  13. References
  14. Related skills
Ships with 5 files
  • references/closed_form_recipes.md
  • references/effect_sizes.md
  • references/simulation_based_power.md
  • scripts/power.py
  • scripts/simulate_power.py
Commands it runs
uv pip install "statsmodels>=0.14.6" "scipy>=1.11" "pingouin>=0.6" "numpy>=1.26" matplotlib pandas
For simulation-based power of advanced models (optional, add as needed):
uv pip install lifelines            # survival
mixed models and GLMs come with statsmodels
More from scientific-agent-skills
All skills →
About this skill
What does the statistical-power skill do?

Sample-size and statistical power calculations for planning studies. Use whenever someone asks "how many subjects/samples/replicates do I need", wants an a priori power analysis, a minimum detectable effect (MDE), a power curve, or needs to justify a sample size for a grant, IRB protocol, or pre-registration. Covers closed-form power for t-tests, ANOVA, proportions, correlations, chi-square, and regression, plus simulation-based (Monte Carlo) power for designs with no formula — logistic/Poisson regression, mixed models, cluster-randomized trials, survival, and interactions. Use this skill even

How do I install it?

Run `npx skills add K-Dense-AI/scientific-agent-skills --skill statistical-power --agent claude-code` — it drops the skill into your project so the agent can pick it up. Swap the --agent value for codex, cursor or copilot if you use one of those.

Where does this skill come from?

From K-Dense-AI/scientific-agent-skills, a repository with 32,619 stars. We read it straight from the repository tree rather than a submitted listing, so what you see here is what is actually published.

Is a popular skill a good skill?

Not necessarily. Stars measure attention, not adoption — a repository can trend for a week and be abandoned. That is why we show the weekly change from our own snapshots next to the total, instead of a single flattering number.

Keep going