# Justify my sample size with a power analysis

Works through a power analysis with defensible effect-size assumptions and writes the sample size justification for my methods or proposal.

- Topic: Data & Analysis
- Framework: Few-Shot
- Level: Standard
- Tags: Analyze, Fill-in Template
- Source: https://www.thinkwithprompt.com/prompts/justify-my-sample-size-with-a-power-analysis

## Prompt

```text
Help me determine and justify the sample size for my study.

**Design:** [e.g. "two-group RCT", "2x2 within-subjects", "multiple regression with 5 predictors", "multilevel with students in classes"]
**Primary outcome and planned analysis:** [DETAILS]
**Smallest effect worth detecting, and where that comes from:** [prior studies, pilot data, minimal clinically or practically important difference]
**Alpha, desired power, sidedness:** [e.g. "0.05, 80%, two-sided"]
**Expected attrition or exclusions:** [PERCENT]
**Practical ceiling on recruitment:** [NUMBER]

Steps:
1. Check that the effect size basis is defensible; warn me about using inflated published effects or arbitrary benchmarks ("medium effect") without justification.
2. Show the calculation approach and formula or tool settings (e.g. G*Power inputs, R pwr or simr code) so I can reproduce it.
3. Give the required sample size, then inflate for attrition and design effects (clustering, multiple comparisons).
4. Provide a sensitivity table: required N across a range of plausible effect sizes.
5. If my recruitment ceiling is too low, explain options: sensitivity power analysis, a different design, a stronger manipulation, or a pilot framing.

Return the numbers, reproducible code or settings, and a 120-word justification paragraph for my methods section. Verify final numbers in the software before use.
```

## What to fill in

- DETAILS
- e.g. "0.05, 80%, two-sided"
- PERCENT
- NUMBER

Free to copy and use. From ThinkWithPrompt (https://www.thinkwithprompt.com/), a library of 2,663 curated AI prompts.
