Calculator
Example Data Table
| Example | r | n | df | Two tailed t | p value | r squared |
|---|---|---|---|---|---|---|
| Study A | 0.42 | 30 | 28 | 2.4489 | 0.0208 | 0.1764 |
| Study B | 0.68 | 18 | 16 | 3.7097 | 0.0019 | 0.4624 |
| Study C | -0.31 | 45 | 43 | -2.1381 | 0.0382 | 0.0961 |
Formula Used
Pearson correlation t test
Use this when the null hypothesis is rho = 0.
t = r × sqrt((n - 2) / (1 - r²))
df = n - 2
Fisher z test
Use this when the null hypothesis has a custom rho0.
z = [atanh(r) - atanh(rho0)] × sqrt(n - 3)
Confidence interval
Fisher z of r = atanh(r)
SE = 1 / sqrt(n - 3)
Lower and upper limits = tanh(z ± z critical × SE)
How to Use This Calculator
- Enter the Pearson correlation coefficient r.
- Enter the paired sample size n.
- Choose a test method.
- Use the t method for a zero correlation test.
- Use Fisher z for a custom null correlation.
- Select the tail direction and alpha level.
- Set the confidence level and decimal places.
- Press Submit to show the result above the form.
- Use CSV or PDF download for reporting.
Statistical Meaning
A test statistic from r turns a sample correlation into a formal hypothesis test. The calculator uses the observed Pearson correlation, sample size, tail choice, and alpha level. It then reports the statistic, degrees of freedom, p value, confidence interval, and decision. This helps you move from a visible relationship to a tested result.
Why r Needs a Test
A correlation can look strong by chance, especially in small samples. The t method tests whether the population correlation is zero. It uses n minus two degrees of freedom because two variables are estimated from the data. Larger samples make small correlations easier to detect. Smaller samples need stronger evidence.
Advanced Options
This tool also includes a Fisher z option. Fisher transformation is useful when you want to compare r against a nonzero population value. It changes the correlation scale into an approximately normal scale. The calculator keeps both methods clear. Choose the t method for the common zero-correlation test. Choose Fisher z when your null value is not zero.
Reading the Output
The statistic shows how far the sample result sits from the null claim. The p value shows how unusual that result is under the null model. A p value at or below alpha leads to rejection. The confidence interval gives a likely range for the population correlation. The r squared value explains the shared variation between the two variables.
Practical Use
Use clean paired data before entering r. Remove impossible values. Check scatterplots when possible. A significant result does not prove causation. It only supports a linear association. Always report the method, r, n, statistic, degrees of freedom, p value, alpha, and confidence interval. The CSV and PDF buttons help save the result for reports, lessons, audits, or research notes.
Common Mistakes
Do not enter a percentage as r. Enter 0.72, not 72. Do not use unpaired observations. Each x value must match the same case as its y value. Avoid rounding r too early, because it can change the p value. Treat very small samples with care. Outliers can distort correlation. Use subject knowledge before making final claims. Record any data screening rules so another reader can repeat your work later without extra confusion.
FAQs
What is a test statistic from r?
It is a value that converts a sample correlation into a formal hypothesis test. For a zero-correlation test, the calculator uses a t statistic with n minus two degrees of freedom.
When should I use the Pearson t method?
Use it when your null hypothesis says the population correlation equals zero. This is the most common test for checking whether a sample correlation is statistically different from no linear relationship.
When should I use the Fisher z method?
Use Fisher z when the null hypothesis is a nonzero correlation. It is also useful for confidence intervals because it improves the scale behavior of correlation values.
Can r be negative?
Yes. A negative r means the variables move in opposite directions. The test statistic will often be negative, but the p value depends on the selected tail.
Why must n be at least 4?
The calculator needs enough observations for the t test and Fisher confidence interval. Fisher standard error uses n minus three, so very small samples are not suitable here.
What does r squared mean?
r squared is the shared variation measure. For example, r squared of 0.25 means about 25 percent of variation is linearly shared between the two variables.
Does a significant correlation prove causation?
No. A significant correlation supports a linear association. It does not prove that one variable caused the other. Study design and outside variables still matter.
Why export CSV or PDF?
CSV is useful for spreadsheets and audits. PDF is useful for class submissions, reports, and saved records. Both formats include the key test details.