power-analysis

Automate power analysis and preregistration for two-arm comparisons using Monte-Carlo simulation.

150|19|Updated Jun 15, 2026
One-click install
npx skills add https://github.com/gaasher/Agent-Loop-Skills --skill power-analysis-gaasher
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: power-analysis
Source: https://github.com/gaasher/Agent-Loop-Skills/tree/main/loops/power-analysis
Command: npx skills add https://github.com/gaasher/Agent-Loop-Skills --skill power-analysis-gaasher

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill requires python3, and includes scripts (resource) and references (resource) components.

What problem does it solve?

This Skill automates the process of conducting power analysis and preregistration for two-arm comparisons, saving time and reducing errors in study design.

Core Features & Use Cases

  • Power Analysis: Computes the required sample size for a two-group comparison using Monte-Carlo simulation.
  • Preregistration: Generates a preregistration document that specifies the study design, hypothesis, and analysis plan.
  • Use Case: Ideal for researchers planning an A/B test, RCT, or behavioral study, ensuring the study is powered appropriately and the design is preregistered.

Quick Start

Run the power-analysis skill with the following command: power-analysis run --hypothesis "the new treatment improves patient outcomes" --outcome type: two-sample-mean baseline_mean: 50 sd: 10 min_effect: 5 --target_power 0.80 --alpha 0.05 --power_cmd "python3 /path/to/skill/tools/power_sim.py" --design_doc "/path/to/output/design.md" --sandbox_root "/path/to/sandbox" --budget 10

Frequently Asked Questions about power-analysis

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I calculate required sample size for a two-arm comparison using Monte-Carlo simulation?

You can calculate required sample size for a two-arm comparison by running a Monte-Carlo simulation that estimates statistical power based on your baseline mean, standard deviation, and minimum detectable effect size.

How do I automate preregistration for an A/B test or randomized controlled trial?

Automating preregistration for an A/B test or randomized controlled trial involves generating a study design document that formally specifies your hypothesis, analysis plan, and validity checks before data collection begins.

What inputs do I need to run a power analysis for a two-group behavioral study?

To run a power analysis for a two-group behavioral study, you need your baseline mean, standard deviation, minimum effect size, target power (e.g. 0.80), alpha level (e.g. 0.05), and a specified study hypothesis.

Can I use Python 3 to compute statistical power for study design without manual formulas?

Yes, you can use Python 3 to compute statistical power for study design by executing simulation scripts that automate the process, requiring Python 3.9 or higher and specific simulation tools.

What is the best way to ensure an RCT is appropriately powered before data collection?

The best way to ensure an RCT is appropriately powered is to conduct a power analysis using Monte-Carlo simulation to verify the sample size meets your target power, then preregister the design.

When should I not use Monte-Carlo simulation for statistical power analysis?

You should not use Monte-Carlo simulation for statistical power analysis if your study design falls outside simple two-arm comparisons, as this Skill specifically targets two-group studies and predefined validity checks.