Power Analysis Walkthrough
Work out how much data you need.
The Open buttons send the prompt text as currently shown below to that site only when you click. Fill in the placeholders first.
Walk me through a power analysis. Type of comparison (two means, two proportions, correlation): [COMPARISON]. Baseline value and smallest effect that would matter: [BASELINE_EFFECT]. Variability estimate: [VARIABILITY]. Significance level and desired power: [ALPHA_POWER]. Explain the four quantities (effect size, variability, alpha, power, sample size) and how changing one affects the others. Show the formula for my case and compute the required sample size step by step, then provide Python code with a common stats package to confirm, noting to check the function names in current documentation. Present a table of sample sizes for several effect sizes. Discuss what to do if the required sample is impractical and the risks of underpowered studies. Add a sensitivity table showing how the required sample changes with variability, and a note on using pilot data to estimate variability while warning that small pilots give unstable estimates. Provide a one-paragraph justification of the sample size suitable for a protocol or a proposal. Add a worked example with invented numbers for a two-group comparison of means: baseline mean of 50, standard deviation of 12, smallest effect that matters of 5 points, alpha of 0.05 two-sided, power of 80 percent. Show the formula for the sample size per group, the substitution, the result rounded up, and the check with code. Then re-run the arithmetic with a standard deviation of 15 and with an effect of 4 points to show how sensitive the result is. Label every number an illustration. Add a checklist for reporting the power analysis in a protocol (test, effect, variability and its source, alpha, power, allowance for dropout, final sample) and a note about post-hoc power, which should not be used to interpret a completed non-significant result. Close with a one-sentence plain-language summary of what the calculated sample size buys: the chance of detecting the smallest effect that matters if it is really there, and no promise beyond that.
Fill in before use
Optional: type your details and the prompt above updates. Nothing is saved or sent.
Replace each bracketed placeholder with your own details, then paste into Any AI or another assistant.