Skill Tracer
Skills › Scientific Agent Skills › statistical-power › effect_sizes.md

effect_sizes.md

134 lines · skills/statistical-power/references/effect_sizes.md at 5f2bc03

Open on GitHub
1# Choosing and Converting Effect Sizes
2
3The effect size is the input that makes or breaks a power analysis, and it is the
4one people most often get wrong. Power computed from a guessed or inflated effect
5is worse than no power analysis, because it carries false authority. This file
6covers how to pick a defensible value and how to convert between the metrics
7different tests use.
8

Choosing and Converting Effect Sizes

The effect size is the input that makes or breaks a power analysis, and it is the one people most often get wrong. Power computed from a guessed or inflated effect is worse than no power analysis, because it carries false authority. This file covers how to pick a defensible value and how to convert between the metrics different tests use.

Raw lines 1 to 8
9## How to choose (in order of preference)

How to choose (in order of preference)

Raw lines 9 to 10
11### 1. Smallest effect size of interest (SESOI) — best
12Power to detect the smallest effect that would actually **change a decision** or
13matter scientifically/clinically, not the effect you hope or expect to see. Ways to
14set it:
15- **Anchor-based:** the smallest difference patients/users can perceive or that
16 crosses a clinical threshold (e.g. a 5-point change on a validated scale).
17- **Resource/decision-based:** the smallest effect that would justify adopting the
18 intervention given its cost.
19- **Benchmark-based:** an effect smaller than which you'd treat the result as
20 practically null.
22Powering on the SESOI is the most defensible choice: if the true effect is larger,
23you're even better powered; if it's smaller, you've decided it doesn't matter.

1. Smallest effect size of interest (SESOI) — best

Power to detect the smallest effect that would actually change a decision or matter scientifically/clinically, not the effect you hope or expect to see. Ways to set it:

  • Anchor-based: the smallest difference patients/users can perceive or that crosses a clinical threshold (e.g. a 5-point change on a validated scale).
  • Resource/decision-based: the smallest effect that would justify adopting the intervention given its cost.
  • Benchmark-based: an effect smaller than which you'd treat the result as practically null.

Powering on the SESOI is the most defensible choice: if the true effect is larger, you're even better powered; if it's smaller, you've decided it doesn't matter.

Raw lines 11 to 24
25### 2. Prior estimate — but shrink it
26Pilot estimates are often very uncertain. Publication or significance-based
27selection can bias an available estimate upward; it does not make every pilot
28upward-biased. Use a relevant synthesis, justified shrinkage/assurance model, or
29plausible range. A confidence-bound safeguard needs a prespecified confidence
30level and direction. If the interval includes zero, no finite sample achieves
31high power against every value in it; do not take an absolute negative endpoint
32and call it conservative. There is no universal pilot-size cutoff that makes
33effect estimation reliable.

2. Prior estimate — but shrink it

Pilot estimates are often very uncertain. Publication or significance-based selection can bias an available estimate upward; it does not make every pilot upward-biased. Use a relevant synthesis, justified shrinkage/assurance model, or plausible range. A confidence-bound safeguard needs a prespecified confidence level and direction. If the interval includes zero, no finite sample achieves high power against every value in it; do not take an absolute negative endpoint and call it conservative. There is no universal pilot-size cutoff that makes effect estimation reliable.

Raw lines 25 to 34
35### 3. Convention — last resort, and say so
36Cohen's small/medium/large are arbitrary and field-blind. They were never meant as
37substitutes for domain knowledge. Use them only when nothing better exists, state
38explicitly that you did and examine several values. A generic "small" label is
39not a scientific justification for any particular field.

3. Convention — last resort, and say so

Cohen's small/medium/large are arbitrary and field-blind. They were never meant as substitutes for domain knowledge. Use them only when nothing better exists, state explicitly that you did and examine several values. A generic "small" label is not a scientific justification for any particular field.

Raw lines 35 to 40
41## Always do a sensitivity analysis
42Whatever you pick, report how required n varies across a plausible range of effects
43(e.g. a power curve, or a small table of n at d = 0.3, 0.4, 0.5). A single n hides
44the dominant source of uncertainty. This is the actual deliverable of a good power
45analysis.

Always do a sensitivity analysis

Whatever you pick, report how required n varies across a plausible range of effects (e.g. a power curve, or a small table of n at d = 0.3, 0.4, 0.5). A single n hides the dominant source of uncertainty. This is the actual deliverable of a good power analysis.

Raw lines 41 to 46
47## Benchmark table (Cohen's conventions)
49| Metric | Used for | Small | Medium | Large |
50|--------|----------|-------|--------|-------|
51| d | mean differences (t-tests) | 0.20 | 0.50 | 0.80 |
52| f | ANOVA | 0.10 | 0.25 | 0.40 |
53| f² | regression / multiple R² | 0.02 | 0.15 | 0.35 |
54| r | correlation | 0.10 | 0.30 | 0.50 |
55| η² (eta-squared) | ANOVA variance explained | 0.01 | 0.06 | 0.14 |
56| h | proportions (arcsine) | 0.20 | 0.50 | 0.80 |
57| w | chi-square | 0.10 | 0.30 | 0.50 |
58Odds ratios have no universal small/medium/large thresholds. The same OR implies
59different absolute risk differences at different baseline risks; use a justified
60baseline and direction.

Benchmark table (Cohen's conventions)

MetricUsed forSmallMediumLarge
dmean differences (t-tests)0.200.500.80
fANOVA0.100.250.40
f²regression / multiple R²0.020.150.35
rcorrelation0.100.300.50
η² (eta-squared)ANOVA variance explained0.010.060.14
hproportions (arcsine)0.200.500.80
wchi-square0.100.300.50

Odds ratios have no universal small/medium/large thresholds. The same OR implies different absolute risk differences at different baseline risks; use a justified baseline and direction.

Raw lines 47 to 61
62## Conversions
64**d ↔ r** (population/two-group planning conversion to point-biserial r,
65equal allocation and common within-group variance; not a general Pearson-r
66conversion or an exact finite-sample correction)
67```
68r = d / sqrt(d^2 + 4) # equal groups
69d = 2r / sqrt(1 - r^2)
70```
72**d ↔ Cohen's f** (k groups; for two equal groups f = d/2)
73```
74f = abs(d) / 2 # two equal groups; f is nonnegative
75```
77**f ↔ η²**
78```
79f = sqrt(eta2 / (1 - eta2))
80eta2 = f^2 / (1 + f^2)
81```
83**f² ↔ R²** (regression)
84```
85f2 = R2 / (1 - R2) # whole model
86f2 = dR2 / (1 - R2_full) # increment from added predictors
87```
89**proportions → Cohen's h**
90```
91h = 2*asin(sqrt(p1)) - 2*asin(sqrt(p2))
92```
93In Python: `statsmodels.stats.proportion.proportion_effectsize(p1, p2)`.
95**proportions → Cohen's w** (for chi-square, against expected p0_i)
96```
97w = sqrt( sum( (p_i - p0_i)^2 / p0_i ) )
98```
99For a Pearson chi-square statistic without continuity correction, `w = sqrt(chi2 / N)`, and `w = V * sqrt(min(r-1, c-1))` where V is
100Cramér's V.
102**odds ratio → log-odds** (for logistic-regression power by simulation)
103```
104beta = log(OR) # log-odds change per specified predictor unit
105```
107For a continuous predictor, OR per SD is `exp(beta * SD_x)`; for a binary
108predictor it compares x=1 against x=0. With an intercept-only baseline `p0`,
109`intercept=log(p0/(1-p0))` gives the conditional risk at x=0, not generally the
110marginal population risk after adding covariate effects.
112**standardized → raw**
113A standardized effect is only as good as the SD you divide by. If you know the raw
114difference and the SD, work in raw units and convert at the end:
115`d = (mean1 - mean2) / sd_pooled`. For paired designs, `dz` uses the SD of the
116*differences*, which depends on the within-pair correlation — see
117`closed_form_recipes.md`.

Conversions

d ↔ r (population/two-group planning conversion to point-biserial r, equal allocation and common within-group variance; not a general Pearson-r conversion or an exact finite-sample correction)

r = d / sqrt(d^2 + 4)            # equal groups
d = 2r / sqrt(1 - r^2)

d ↔ Cohen's f (k groups; for two equal groups f = d/2)

f = abs(d) / 2                   # two equal groups; f is nonnegative

f ↔ η²

f   = sqrt(eta2 / (1 - eta2))
eta2 = f^2 / (1 + f^2)

f² ↔ R² (regression)

f2 = R2 / (1 - R2)               # whole model
f2 = dR2 / (1 - R2_full)         # increment from added predictors

proportions → Cohen's h

h = 2*asin(sqrt(p1)) - 2*asin(sqrt(p2))

In Python: statsmodels.stats.proportion.proportion_effectsize(p1, p2).

proportions → Cohen's w (for chi-square, against expected p0_i)

w = sqrt( sum( (p_i - p0_i)^2 / p0_i ) )

For a Pearson chi-square statistic without continuity correction, w = sqrt(chi2 / N), and w = V * sqrt(min(r-1, c-1)) where V is Cramér's V.

odds ratio → log-odds (for logistic-regression power by simulation)

beta = log(OR)                   # log-odds change per specified predictor unit

For a continuous predictor, OR per SD is exp(beta * SD_x); for a binary predictor it compares x=1 against x=0. With an intercept-only baseline p0, intercept=log(p0/(1-p0)) gives the conditional risk at x=0, not generally the marginal population risk after adding covariate effects.

standardized → raw A standardized effect is only as good as the SD you divide by. If you know the raw difference and the SD, work in raw units and convert at the end: d = (mean1 - mean2) / sd_pooled. For paired designs, dz uses the SD of the differences, which depends on the within-pair correlation — see closed_form_recipes.md.

Raw lines 62 to 118
119## Common mistakes
121- **Using the observed/expected effect instead of the SESOI** — you end up powered
122 for your hopes, not for what matters.
123- **Ignoring prior-estimate uncertainty and selection bias** — an optimistic effect can understate required n.
124- **Mixing up d and f, or η² and f²** — they differ by the conversions above; a
125 factor-of-2 error in d quadruples or quarters the required n.
126- **Reporting one number** — always show the sensitivity range.
127- **Treating Cohen's benchmarks as truth** — they're conventions, not measurements.
130Reviewed 2026-10-01 against [Lakens (2022), Sample Size Justification](https://doi.org/10.1525/collabra.33267),
131[statsmodels proportion_effectsize](https://www.statsmodels.org/stable/generated/statsmodels.stats.proportion.proportion_effectsize.html),
132and [statsmodels one-way effect-size definitions](https://www.statsmodels.org/stable/generated/statsmodels.stats.oneway.effectsize_oneway.html).
133These are planning assumptions and algebraic conversions, not validation of a
134scientific SESOI, pilot population, or clinical decision threshold.

Common mistakes

  • Using the observed/expected effect instead of the SESOI — you end up powered for your hopes, not for what matters.
  • Ignoring prior-estimate uncertainty and selection bias — an optimistic effect can understate required n.
  • Mixing up d and f, or η² and f² — they differ by the conversions above; a factor-of-2 error in d quadruples or quarters the required n.
  • Reporting one number — always show the sensitivity range.
  • Treating Cohen's benchmarks as truth — they're conventions, not measurements.

Reviewed 2026-10-01 against Lakens (2022), Sample Size Justification, statsmodels proportion_effectsize, and statsmodels one-way effect-size definitions. These are planning assumptions and algebraic conversions, not validation of a scientific SESOI, pilot population, or clinical decision threshold.

Raw lines 119 to 134