Ask Mallard
Analysis method

Sample size for a correlation

4 min read

Use Fisher’s z approximation to plan how many independent measurement pairs you need to detect a Pearson correlation different from zero.

Fit

When to use it, and when not to

Use it when

  • You plan one Pearson correlation between two continuous measurements from each person.
  • You want power to detect a prespecified correlation against zero.

Not when

Before you start

What you need

Decide these first
  1. Expected Pearson correlationSupply r with an absolute value strictly between zero and one. Mallard uses its magnitude.
  2. Two-sided significance levelAlpha defaults to 0.05. It sets the normal cutoff for the test.
  3. Target powerPower defaults to 0.8. Mallard bounds it between 0.5 and 0.999.
It rests on these
  1. Different people supply independent pairs.How to check: Do not count repeated visits or clustered observations as independent people.
  2. The Fisher-z approximation suits the planned data.How to check: Inspect plausible joint distributions, outliers and linearity. Strong nonnormality can distort usual Pearson inference.
  3. The expected correlation is credible for the target population.How to check: Use prior evidence and examine smaller plausible correlations. Do not choose an effect just to reduce the sample.

Plain language

How it works

Fisher’s z is half the natural log of a ratio: one plus the correlation’s magnitude, divided by one minus that magnitude. Mallard divides the sum of the significance and power normal quantiles by this value, squares the result, then adds three. It rounds the total upward.

From assumptions to a total
Expected correlation, alpha and power. Then Fisher-z normal approximation. Then Total independent pairs.Sample size for a correlationExpected correlation,alpha and powerFisher-z normalapproximationTotal independent pairsNo adjustment for repeated observations, missing pairs or covariates is made.
Conceptual diagram. It shows the structure of the idea, not data from any study.
What the target means

The null correlation is zero. A negative expected correlation gives the same total as its positive counterpart. For power at a supplied total, Mallard uses a normal approximation with the square root of the total sample size minus three. Choosing a sample-size method separates detection from interval precision.

Worked example

A worked example

Invented for illustration
Setting
A team plans to relate a symptom score to a continuous lab measure, with one pair per adult.
Question
How many complete pairs are needed to detect a correlation of 0.3 against zero?
Approach
Enter r = 0.3, alpha = 0.05 and power = 0.8. Use the two-sided Fisher-z approximation.
Result
Mallard returns 85 independent pairs in total.
What it means
Each person supplies both values. This target concerns detection of a nonzero linear association, not proof that the measurements agree.

In practice

Recent studies PubMed search · not vetted

Searching PubMed…

Watch out

Common mistakes

The one to remember

This Fisher-z approximation tests a Pearson correlation against zero. It does not size rank correlation, agreement, repeated measurements or an adjusted association.

  • Calling the target a count per group.Instead: Count people with both measurements; the calculation returns one total.
  • Using the correlation between repeated visits as though visits were independent.Instead: Use a sizing method that accounts for the repeated structure.
  • Reading statistical detection as clinical value.Instead: Choose the expected effect for its clinical meaning before calculating.

Inside Mallard

How Mallard uses this

Mallard returns a total number of independent pairs and approximate power at a supplied total. It uses the correlation’s magnitude.

No Mallard code example points to this page.
Atlas node analysis.correlation_sample_size, the id a plan cue records.
Code for this method
Loading…

Related Learn pages

Related designs and methods

Evidence

Sources & further reading

  1. Testing the significance of a correlation with nonnormal data: comparison of Pearson, Spearman, transformation, and resampling approaches (opens in a new tab) · Psychol Methods · doi 10.1037/a0028087
  2. Reducing Bias and Error in the Correlation Coefficient Due to Nonnormality (opens in a new tab) · Educ Psychol Meas · doi 10.1177/0013164414557639
Prepared with AI assistance. PubMed records were matched by title, authors, year and DOI on 2026-11-06: record verified, confirm it supports this use. The Bishara–Hittner studies support the distribution cautions; neither independently validates Mallard’s exact sizing implementation. The Fisher-z calculation described here was checked directly against Mallard’s engine. No independent professional approval is claimed.
Last source review: 2026-11-06
AI-generated educational content
Mallard uses reputable methodological and reporting sources, but this material may contain errors or omit important context. Verify important methodological decisions with the cited sources and, when appropriate, a qualified research methodologist or statistician.