Calculator Inputs
Formula used
Pearson correlation from raw paired data:
r = Σ[(xᵢ − x̄)(yᵢ − ȳ)] / √[Σ(xᵢ − x̄)² × Σ(yᵢ − ȳ)²]
Test statistic for significance:
t = r × √[(n − 2) / (1 − r²)]
Degrees of freedom:
df = n − 2
Confidence interval with Fisher transformation:
z = 0.5 × ln[(1 + r) / (1 − r)] , SE = 1 / √(n − 3) , CI = tanh(z ± z* × SE)
The calculator uses Student's t distribution for p values and Fisher's z method for confidence limits.
How to use this calculator
- Choose raw paired data or summary values.
- Enter alpha, confidence level, labels, and decimals.
- For raw mode, paste equal-length X and Y lists.
- For summary mode, enter an existing r value and sample size.
- Pick a two-sided or one-sided alternative hypothesis.
- Submit the form to see significance, interval estimates, and interpretation.
- Review the Plotly graph for visual pattern checks.
- Use the CSV or PDF buttons to export results.
Example data table
Click “Load Example Data” to test the sample instantly.
| Observation | Feature X | Target Y |
|---|---|---|
| 1 | 2 | 3 |
| 2 | 4 | 5 |
| 3 | 6 | 7 |
| 4 | 8 | 9 |
| 5 | 10 | 12 |
| 6 | 12 | 14 |
| 7 | 14 | 15 |
| 8 | 16 | 18 |
| 9 | 18 | 20 |
| 10 | 20 | 22 |
FAQs
1. What does this calculator test?
It tests whether an observed Pearson correlation is statistically different from zero. It also reports effect size, confidence limits, and a quick interpretation.
2. Can I use raw data and summary values?
Yes. Raw mode calculates r from paired observations. Summary mode starts from an existing correlation coefficient and sample size.
3. What does the p value mean?
The p value measures how surprising the observed correlation would be if the true population correlation were zero. Smaller values indicate stronger evidence against the null hypothesis.
4. Why does the calculator show R squared?
R squared is the proportion of shared linear variation between the two variables. It helps translate correlation strength into explained variance.
5. When should I choose a one-sided test?
Choose a one-sided test only when theory clearly predicts a positive or negative direction before seeing the data. Otherwise, use the two-sided option.
6. Does significance prove causation?
No. A significant correlation shows statistical association, not cause and effect. Confounding variables, measurement issues, and reverse influence can still exist.
7. Why might a strong r still be unreliable?
Small sample sizes, outliers, restricted ranges, or non-linear patterns can distort Pearson correlation. Always review the graph and understand the data source.
8. What assumptions matter most?
Pearson testing works best with paired observations, approximate linearity, independent records, and no dominating outliers. Severe non-linearity can make r misleading.