Correlation P-Value Calculator Formula
Understand the math behind the correlation p-value calculator. Each variable explained with a worked example.
Formulas Used
t-Statistic
t_stat = r * sqrt(n - 2) / sqrt(1 - pow(r, 2))Degrees of Freedom
df = n - 2R²
r_squared = pow(r, 2)Variables
| Variable | Description | Default |
|---|---|---|
r | Correlation Coefficient (r) | 0.65 |
n | Sample Size (n) | 30 |
How It Works
Testing Correlation Significance
To determine whether an observed correlation is statistically significant, calculate the t-statistic and compare to the t-distribution.
Formula
t = r × sqrt(n-2) / sqrt(1-r²)
with df = n - 2. If |t| exceeds the critical value (e.g., ~2.048 for alpha=0.05, df=28), the correlation is statistically significant.
Worked Example
Correlation r = 0.65 from a sample of n = 30.
r = 0.65n = 30
- 01t = 0.65 × sqrt(28) / sqrt(1 - 0.4225)
- 02t = 0.65 × 5.292 / sqrt(0.5775)
- 03t = 3.440 / 0.7599 = 4.527
- 04With df = 28, this is highly significant (p < 0.001)
Ready to run the numbers?
Open Correlation P-Value Calculator