S
statistical-power-calculator
About statistical-power-calculator
statistical-power-calculator is a tool for planning hypothesis tests and experiments by calculating statistical power, sample sizes, and detectable effect sizes. It supports several test types and produces visualizations and analysis reports.
Key features
- 01Calculate statistical power
- 02Determine required sample sizes
- 03Estimate detectable effect sizes
- 04Support t-tests, proportion tests, ANOVA, and chi-square
- 05Plot power curves and sample size charts
- 06Generate analysis reports with recommendations
Use cases
- 01Plan sample sizes for clinical trials
- 02Size A/B tests before launch
- 03Estimate survey sample requirements
- 04Evaluate power for research study designs
Install
Copy the command and run it in a terminal.
$
npx skills add https:/ / github.com/ dkyazzentwatwa/ chatgpt-skills --skill statistical-power-calculatorAfter installing, type/statistical-power-calculatorin Claude Code to confirm it loaded.
Bundled filesscripts/requirements.txtscripts/statistical_power_calculator.py
Details
From the project READMEStatistical 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
Comments
Markdown supported