Course contentsShow
← Data Science
Lesson 506 of 2,14513. Correlation AnalysisFree lesson

Introduction to Partial Correlation

Understanding partial correlation as the relationship between two variables after controlling for one or more other variables.

Introduction to Partial Correlation

You'll learn what partial correlation is and why controlling for other variables matters when measuring relationships.

The Core Idea

Imagine you notice that ice cream sales and drowning incidents are positively correlated. Does ice cream cause drowning? Of course not! The real culprit is a third variable: hot weather. Temperature drives both ice cream sales up and more people swimming (leading to more drownings).

Partial correlation measures the relationship between two variables after removing the influence of one or more other variables. It answers: "What's the true relationship between X and Y once we've accounted for Z?"

Why It Matters

Regular Pearson correlation (which you've learned) tells you the total association between two variables. But sometimes that association is misleading because both variables are influenced by something else.

Partial correlation "controls for" or "holds constant" these confounding variables, revealing the direct relationship between your two variables of interest.

A Simple Example

Suppose you're studying:

  • Shoe size and reading ability in children (they correlate!)
  • But age affects both: older kids have bigger feet and read better

The partial correlation between shoe size and reading ability, controlling for age, would drop to near zero. This reveals that the original correlation was spurious—driven entirely by the confounding variable (age).

When You'd Use It

  • When you suspect a third variable is creating a false correlation
  • When you want to isolate the unique relationship between two variables
  • Before jumping to causal conclusions from simple correlations

Key Takeaway: Partial correlation reveals the relationship between two variables after statistically removing the influence of one or more confounding variables, helping distinguish genuine associations from spurious ones.