statistical-power-calculator

Use when asked to calculate statistical power, determine sample size, or plan experiments for hypothesis testing.

⭐5stars🔀1forks📁View on GitHub🕐Updated Jan 11, 2026⬇️2downloads

When & Why to Use This Skill

The Statistical Power Calculator is a specialized Claude skill designed to streamline experimental design by calculating statistical power and determining optimal sample sizes. It supports a wide range of hypothesis tests—including t-tests, ANOVA, and chi-square—helping researchers and data scientists ensure their studies are sufficiently powered to detect meaningful effects while optimizing resource allocation.

Use Cases

  • Clinical Trial Design: Calculate the exact sample size required to detect therapeutic efficacy and ensure the statistical validity of medical research.
  • A/B Test Planning: Determine the necessary user traffic and duration for web or product experiments to achieve statistically significant results and avoid underpowered tests.
  • Academic Research: Conduct rigorous power analysis during the study design phase to justify sample sizes for grant proposals and peer-reviewed publications.
  • Market Research & Surveys: Estimate the required number of respondents to achieve specific confidence levels and minimize the margin of error in consumer data collection.
namestatistical-power-calculator
descriptionUse when asked to calculate statistical power, determine sample size, or plan experiments for hypothesis testing.

Statistical Power Calculator

Calculate statistical power and determine required sample sizes for hypothesis testing and experimental design.

Purpose

Experiment planning for:

  • Clinical trial design
  • A/B test planning
  • Research study sizing
  • Survey sample size determination
  • Power analysis and validation

Features

  • Power Calculation: Calculate statistical power for tests
  • Sample Size: Determine required sample size for desired power
  • Effect Size: Estimate detectable effect size
  • Multiple Tests: t-test, proportion test, ANOVA, chi-square
  • Visualizations: Power curves, sample size charts
  • Reports: Detailed analysis reports with recommendations

Quick Start

from statistical_power_calculator import PowerCalculator

# Calculate required sample size
calc = PowerCalculator()
result = calc.sample_size_ttest(
    effect_size=0.5,
    alpha=0.05,
    power=0.8
)
print(f"Required n per group: {result.n_per_group}")

# Calculate power
power = calc.power_ttest(n_per_group=100, effect_size=0.5, alpha=0.05)

CLI Usage

# Calculate sample size for t-test
python statistical_power_calculator.py --test ttest --effect-size 0.5 --power 0.8

# Calculate power
python statistical_power_calculator.py --test ttest --n 100 --effect-size 0.5