power_for_two_sample_t_test
Calculate statistical power for a two-sample t-test from Cohen's d, sample size per group, and alpha. Use it to see whether a study can detect a real effect or if a null result would be inconclusive.
Instructions
Statistical power to detect a given Cohen's d with n_per_group observations per group, using a two-sample t-test. Power is the probability of correctly detecting a real effect of this size at the given alpha; a design with low power means a non-significant result would be inconclusive rather than good evidence the effect doesn't exist. Use sample_size_for_two_sample_t_test instead to solve for n given a target power. Returns a float in [alpha, 1].
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| alpha | No | significance level for the test (and any confidence interval); default 0.05 | |
| n_per_group | Yes | planned (or actual) observations per group | |
| effect_size_d | Yes | the Cohen's d you want to be able to detect |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| result | Yes |