Back to Browse

366 - Partial Correlation in Python: Controlling for Confounding Variables (Part 2/4)

1.1K views
Sep 10, 2025
29:39

Dive deeper into correlation analysis with partial correlation! Learn how to control for confounding variables that might be influencing the relationship between two primary variables. Using the Palmer Penguins dataset, we explore how species affects correlations between physical measurements and implement the regression residuals approach to calculate partial correlations. Topics covered: - Understanding confounding variables and their impact on correlations - Partial correlation concepts and mathematical intuition - Regression residuals approach for calculating partial correlations - Creating dummy variables and handling categorical data - Comparing simple vs partial correlations to identify confounding effects - Within-species correlation analysis - Interpreting biological insights from statistical results The code from this video is available here: https://github.com/bnsreenu/python_for_microscopists/blob/master/366_Correlation_Analysis_Part_2_Partial_Correlation.ipynb

Download

0 formats

No download links available.

366 - Partial Correlation in Python: Controlling for Confounding Variables (Part 2/4) | NatokHD