Pearson Correlation (linear association)
VerifiedAdvanced & specialized
Run this test straight away on a free built-in teaching dataset — no data of your own needed — or bring your own. Either opens the guided workspace: variable setup, assumption diagnostics, results with effect sizes and confidence intervals, figures, and APA-ready reporting.
Loading teaching datasets…
Or use your own dataset
Loading your datasets…
Measures the strength and direction of the LINEAR relationship between two continuous (interval/ratio) variables measured on the same cases.
Reports r, 95% CI (Fisher-z), t-statistic, p-value, and r². Pearson's r is interpreted on a [-1, +1] scale: 0 = no linear association, ±1 = perfect linear association. Sensitive to outliers and assumes a roughly linear, homoscedastic, bivariate-normal relationship.
Worked example
Is weekly study time related to exam performance?
For 80 students, weekly study hours and final-exam score (0–100) were recorded; Pearson's r measures the strength of the straight-line relationship.
Study time and exam score were positively correlated, r(78) = .53, p < .001 — study time accounted for about 28% of the variance in scores (r² = .28).
A Pearson correlation showed a significant positive relationship between study time and exam score, r(78) = .53, p < .001.
Try it yourself: Load this ready-made sample and follow the run above.
When to use it
- Cross-sectional bivariate continuous (one-time measurement)A nutritionist measures daily caloric intake and BMI in 200 adults at a single clinic visit.
- Test-retest reliability (same DV at two time points)A clinical psychologist administers the Beck Depression Inventory to 80 patients at intake and again 4 weeks later.
- Two parallel measurements on the same unitA lab compares HbA1c measured by a new finger-prick assay against the venous-blood reference assay in 60 patients.
- Pre-regression screening of continuous predictorsAn economist is building a model of household savings rate from income, age, education-years, household size, and interest rate.
When NOT to — use instead
- One continuous and one categorical variablePearson r on a 0/1-coded variable is mathematically the point-biserial correlation — use that test for clarity. → Point-Biserial Correlation \u2014 continuous vs. dichotomous
- Two ordinal variablesPearson on rank data is dominated by rank-based alternatives that handle ties + non-linearity better. → Spearman's Rank-Order Correlation (monotonic / nonparametric)
- Two binary categorical variablesPearson on two 0/1 variables is the phi coefficient — use a chi-square or Fisher's exact test for the actual hypothesis. → Chi-Square Test of Independence
- Clearly non-linear / curvilinear relationshipPearson r measures LINEAR association only — a U-shape or inverted-U yields r ≈ 0 even with strong relationship. → Spearman's Rank-Order Correlation (monotonic / nonparametric)
Hypotheses
Parameter tested: population Pearson correlation ρ
Assumptions (and what to do if they fail)
Check: Shapiro-Wilk p on x and y separately.
If violated: Non-normal marginals make the Pearson r's sampling distribution unreliable for CIs and p-values in small samples.
Check: Count cases with Mahalanobis D² > 7.38.
If violated: A single influential point can dramatically inflate or attenuate r.
Check: Visual: residuals vs fitted scatter should show random scatter (no funnel).
If violated: Heteroscedasticity doesn't bias r but inflates its standard error — CI coverage and p-value accuracy suffer.
Ready to run a Pearson Correlation (linear association) on your own data?
Guided setup, automatic assumption checks, effect sizes, figures and an APA write-up.
Run this test →