Pearson Correlation (r)
r = Σ[(xᵢ - x̄)(yᵢ - ȳ)] / √[Σ(xᵢ - x̄)² × Σ(yᵢ - ȳ)²]Measures linear relationship between variables
Also called Pearson's product-moment correlation
Calculate Pearson, Spearman, and Kendall correlation coefficients between two variables with p-values and significance levels.
https://www.solvezi.com/statistics/correlation-calculator
Understand relationships between variables
| # | X | Y | Action |
|---|---|---|---|
| 1 | |||
| 2 | |||
| 3 | |||
| 4 | |||
| 5 |
5 data points (minimum 3 required for correlation)
Strength
Direction
p-value
0.0000
Significant?
Yes ✓
Interpretation:
✓ Statistically significant at α = 0.05
Summary Statistics
Key metrics from your dataset
Sample Size
0
data points
Degrees of Freedom
-2
n − 2
Covariance
0.0000
X ↔ Y
Correlation Coefficient (r)
• +1 = Perfect positive correlation • 0 = No correlation • -1 = Perfect negative correlation
• Pearson: For linear relationships • Spearman: For monotonic relationships (rank-based)
• p-value < 0.05 indicates statistical significance
Correlation Calculator • Understand relationships between variables
Master correlation analysis — understand Pearson and Spearman correlation coefficients, interpret strength and direction of relationships, know when to use each method, and avoid common pitfalls in statistical interpretation.
Correlation measures the strength and direction of the relationship between two variables. The correlation coefficient rranges from -1 to +1.
"As one variable changes, how does the other tend to change? Is the relationship strong or weak? Positive or negative?"
Almost perfect linear relationship
Clear consistent relationship
Noticeable relationship
Slight relationship
Minimal relationship
No linear relationship
Linear relationship, normally distributed data, no outliers
More powerful for linear relationships
Sensitive to outliers, assumes normality
Monotonic relationships, ordinal data, skewed distributions
Robust to outliers, works with ranks
Less powerful for linear relationships
r = Σ[(xᵢ - x̄)(yᵢ - ȳ)] / √[Σ(xᵢ - x̄)² × Σ(yᵢ - ȳ)²]Measures linear relationship between variables
Also called Pearson's product-moment correlation
ρ = 1 - [6Σdᵢ²] / [n(n² - 1)]Rank-based correlation for monotonic relationships
Where dᵢ = difference between ranks
r² = (correlation)²Proportion of variance explained
Ranges from 0 to 1, multiply by 100 for percentage
Cov(X,Y) = Σ[(xᵢ - x̄)(yᵢ - ȳ)] / nMeasures joint variability
Sign indicates direction, magnitude depends on scale
t = r × √[(n-2) / (1 - r²)]Tests significance of correlation
df = n - 2, used to calculate p-value
Variables should have a linear relationship
Check scatter plot for linear pattern
Variables approximately normally distributed
Check histograms, Q-Q plots
Outliers can drastically affect correlation
Examine scatter plot for extreme points
Observations must be independent
Ensure no repeated measurements on same subject
Constant variance across values
Check for funnel shapes in scatter plot
Note: Spearman correlation (rank-based) doesn't require normality or linearity assumptions. Use Spearman when Pearson assumptions are violated or for ordinal data.
Build diversified portfolios and hedge risk
Identify predictors and risk factors
Validate psychological measurements
Evaluate educational interventions
Optimize marketing strategies
Prepare data for modeling
Points lie exactly on upward sloping line
Points close to upward sloping line
Points show upward trend with scatter
Slight upward trend, much scatter
No apparent relationship
Points lie exactly on downward line
Curved relationship, r doesn't detect
| Sample Size (n) | Reliability | Recommendation |
|---|---|---|
| n < 10 | Very Unreliable | Not recommended for correlation analysis |
| 10-29 | Low Reliability | Large confidence intervals, use with caution |
| 30-50 | Moderate Reliability | Minimum for publication in many fields |
| 50-100 | Good Reliability | Common in social science research |
| > 100 | High Reliability | Stable estimates, narrow confidence intervals |
Correlation = Causation
Correlation never proves causation — confounding variables may explain relationship
Use experiments or quasi-experiments to establish causality
Ignoring non-linear relationships
Pearson correlation only detects linear relationships; use Spearman for monotonic
Always plot data to check for non-linear patterns
Using Pearson with outliers
Outliers artificially inflate or deflate correlation coefficients
Consider Spearman correlation or remove outliers with justification
Overinterpreting small samples
Small samples produce unstable correlation estimates
Aim for n ≥ 30 for reliable correlations
Explains ~1% of variance
Explains ~9% of variance
Explains ~25% of variance
A correlation of 0 means there is no linear relationship between the variables. However, there could still be a non-linear relationship (e.g., U-shaped or quadratic). Always plot your data to check for non-linear patterns that Pearson correlation would miss.
Correlation measures the strength and direction of a relationship (symmetric, no distinction between X and Y). Regression models predict Y from X (asymmetric) and provides coefficients for causal interpretation. Correlation is a single number; regression provides an equation.
Minimum n = 30 for stable estimates in most fields. With n=50-100, you get reasonable precision. For publication-quality research, aim for n ≥ 100. Very small samples (n < 10) produce highly unstable correlations that may not replicate.
R-squared (r²) is the square of the correlation coefficient, representing the proportion of variance in Y explained by X. For example, r = 0.7 → r² = 0.49 → 49% of Y's variance is explained by X. R² ranges from 0 to 1 and is easier to interpret than r itself.
Use Spearman when: 1) data is ordinal (ranked), 2) relationship is monotonic but not linear, 3) data has outliers, 4) normality assumption violated, 5) sample size is small. Spearman works by ranking data, making it robust to outliers and non-normal distributions.
A confounding variable is a third variable that influences both X and Y, creating a spurious correlation. Example: Ice cream sales and drowning incidents are positively correlated, but the confounder is hot weather (causing both more ice cream and more swimming).
APA format: r(df) = value, p = p-value. Example: 'There was a strong positive correlation between study time and exam scores, r(48) = 0.72, p < .001.' Include n, r, p-value, and interpretation. Report r² for effect size.
Pearson r measures linear relationships using actual values. Spearman ρ measures monotonic relationships using ranks. For perfectly linear data, they're equal. For non-linear monotonic data (e.g., exponential), Spearman works while Pearson may underestimate strength.
1822-1911
Introduced correlation concept (1888)
Also pioneered eugenics and regression to the mean
1857-1936
Developed Pearson correlation coefficient
Father of mathematical statistics
1863-1945
Developed Spearman rank correlation (1904)
Also developed factor analysis
Did You Know? Francis Galton first used the term "correlation" in 1888 while studying heredity. He discovered that children of tall parents tend to be tall, but not as tall — the concept of "regression to the mean." Karl Pearson later formalized the mathematical formula we use today.
r(df) = value, p = p-valueExample 1 (Significant):
"There was a strong positive correlation between study time and exam scores, r(48) = 0.72, p < .001, r² = 0.52."Example 2 (Non-significant):
"No significant correlation was found between age and reaction time, r(28) = 0.12, p = .532."Always include: r value, degrees of freedom (n-2), p-value, effect size (r²), and interpretation of strength and direction.
Correlation calculator and complete guide. Calculate Pearson correlation and Spearman rank correlation, interpret strength and direction of relationships, understand assumptions, and learn best practices. Perfect for statistics students, researchers, data scientists, and analysts.