Skip to content
Omnikalc

Correlation test: is this r significantly different from zero?

Test a Pearson correlation coefficient from r and the sample size: t statistic, p-value, confidence interval with Fisher's z, r² and the smallest significant r.

Updated on
Your inputs

Value out of range

Value out of range

Results

p-value

0.01259

Statistically significant: p is below α, so reject the null hypothesis
t statistic
2.666
Confidence interval of r, lower bound (1 − α)
0.107
Confidence interval of r, upper bound
0.697
Coefficient of determination r²
20.3%
Smallest |r| significant at α (two-tailed)
0.361
Fisher's z
0.4847

Is a correlation real?

A Pearson correlation coefficient r measures the strength of a linear relationship between two variables, from −1 to +1. In a sample, even unrelated variables show some correlation by chance, especially with few data points. The significance test checks whether r is large enough, given the sample size, to conclude that the population correlation ρ is not zero.

The formula

t = r × √(n − 2) ÷ √(1 − r²), with n − 2 degrees of freedom

The p-value comes from Student’s t distribution.

Example

r = 0.45 from 30 pairs:

  • t = 0.45 × √28 ÷ √(1 − 0.2025) ≈ 2.67;
  • two-tailed p ≈ 0.013: significant at α = 0.05;
  • r² ≈ 20%: x explains about a fifth of the variance of y;
  • the smallest significant |r| with 30 pairs is about 0.361.

Confidence interval with Fisher’s z

The sampling distribution of r is skewed, so the confidence interval uses Fisher’s transformation:

z = ½ ln((1 + r) ÷ (1 − r)), with standard error 1 ÷ √(n − 3)

The interval z ± z* × SE is then converted back to r. For the example, the 95% interval runs from about 0.11 to 0.70: the correlation is clearly positive but could be weak or fairly strong.

How many pairs do you need?

The smallest r that reaches significance at α = 0.05 (two-tailed) shrinks with the sample size:

n Smallest significant r
10 0.632
20 0.444
30 0.361
50 0.279
100 0.197
1,000 0.062

With large samples, very weak correlations become significant. Significance says a relationship is unlikely to be zero, not that it is strong or useful.

Cautions

  • Correlation is not causation: a third variable may drive both.
  • Pearson’s r only captures linear relationships; always look at a scatter plot.
  • Outliers can create or hide a correlation.
  • Restricted ranges weaken correlations.
  • For ranked data or non-linear but monotonic relationships, use Spearman’s rank correlation.

Use the linear regression calculator to get the slope and intercept of the best-fit line.

Frequently asked questions

How do I test whether a correlation is significant?

Compute t = r√(n − 2) ÷ √(1 − r²) and compare it with Student's t distribution with n − 2 degrees of freedom.

What correlation is significant with 30 pairs?

At α = 0.05 two-tailed, |r| must be at least about 0.361.

How is the confidence interval of r computed?

With Fisher's z transformation: z = atanh(r) with standard error 1 ÷ √(n − 3), then transformed back with tanh.

Does a significant correlation mean causation?

No. A third variable, reverse causation or coincidence can all produce a correlation.

Was this calculator helpful?

Thanks for your feedback!

Results are estimates provided for information purposes. They do not replace professional advice.