Introduction

conda install statsmodels seaborn

Plotting residuals

Regression assumptions

Linearity and equal variance Normality

Interpreting residuals

Common issues

Heteroscedasticity

Identify heteroscedasticity

Breusch-Pagan Lagrange Multiplier test

Using StatsModels we have statsmodels.stats.diagnostic.het_breuschpagan

Non-linearity

Outliers

Long Y-axis datapoints

X-axis unbalanced