Method document
Sample size to compare two independent correlations
How many participants are needed in each of two independent groups to show that the same correlation differs between them. Covers dropout.
https://statwisely.com/methods/correlation-compare/
When to use it
- Testing whether an association is stronger in one population than another, such as in women and men.
Not for
- Two correlations measured on the same people, which are dependent and need a different test.
Notation
- Participants per group
- Expected correlations in groups 1 and 2
- Fisher’s transformation
- Significance level: the chance of a false positive
- Power: the chance of detecting the effect if it is real
- Expected dropout
Formulas
Difference of Fisher z values
Each group’s transformed correlation has variance 1/(n − 3), so their difference has twice that [1, 2].
Dropout
Applied last, to the participants actually recruited.
Parameters
Correlation in group 1
Values: Between −1 and 1
The smallest correlation worth detecting, from comparable studies. Weak correlations need large samples.
Correlation in group 2
Values: Between −1 and 1, different from r₁
Differences between correlations are hard to detect; expect large samples.
Significance level
Values: Between 0 and 1; usually 0.05
The false-positive rate you accept. A smaller α, for example to allow for several primary outcomes, needs a larger sample.
Power
Values: Between 0 and 1; usually 0.80 or 0.90
The chance of a significant result if the assumed effect is real. Funders and ethics committees commonly expect at least 0.80.
Expected dropoutOptional
Values: 0% up to, but not including, 100%
The share of participants expected to provide no outcome, from comparable studies. Recruiting more restores the numbers, not the comparability of the groups: if dropout is related to the outcome, the estimate can still be biased.
Assumptions
- The groups are independent and equal in size; the measurements are roughly bivariate normal in each.
- Dropout is unrelated to the outcome; recruiting more participants restores the numbers but cannot remove bias.
Worked examples
0.5 against 0.3
r₁ = 0.5 and r₂ = 0.3: z(0.5) − z(0.3) = 0.240, so n = 2 × (2.8016 / 0.240)² + 3 = 276.0, rounded up to 277 per group.
Group 1: 277 · Group 2: 277 · Total: 554
Open this example in the calculatorProtocol statement
To detect a difference between correlations of 0.5 and 0.3 with 80% power at a two-sided significance level of 0.05, using a comparison of two independent correlations, the required sample size is 277 per group (554 in total). Calculated with StatWisely (statwisely.com) using: n_per_group = 2[(z_(1-α/tails)+z_(1-β))/(atanh(r₁)-atanh(r₂))]²+3. These are planning estimates; confirm the final design with a qualified statistician.
Closer correlations
r₁ = 0.4 against 0.3: 1209 per group.
Group 1: 1209 · Group 2: 1209 · Total: 2418
Open this example in the calculatorValidation
- Every worked example on this page is recomputed by the StatWisely engine whenever the software is built. If a number or formula here stopped matching the calculator, the release would be stopped until this document was corrected.
- An independent implementation in R recomputes this test every night and before each production release, and the results are compared with the engine’s.
How to cite
StatWisely. Sample size to compare two independent correlations. Method document, engine version 1.0.0, reviewed 2026-10-01. https://statwisely.com/methods/correlation-compare/
Cite the original references for the formulas your design uses as well.
References
- 1.Fisher RA. On the “probable error” of a coefficient of correlation deduced from a small sample. Metron. 1921;1:3–32.
- 2.Cohen J. Statistical Power Analysis for the Behavioral Sciences. 2nd ed. Hillsdale, NJ: Lawrence Erlbaum Associates; 1988.