2.2.7 · D3Linear & Logistic Regression

Worked examples — Assumptions of linear regression

2,849 words13 min readBack to topic

This page is a workout gym for the five assumptions. Instead of re-defining them, we throw every kind of situation at you and work each one to the end. Before we start, one word we will lean on constantly:

Figure s01 (below), what its two panels show. Left panel: a fitted line (teal) with data dots (plum) and their orange residual sticks — this is what a residual is, and here the sticks are tiny so the band is flat (linearity holds, our Cell A). Right panel: the residuals left over when a straight line is forced onto cubic data — they snake up and down in a wave, the linearity-violation fingerprint of Cell B.

Figure — Assumptions of linear regression

The scenario matrix

Every worked example below fills one row. The columns are the kinds of trouble a regression can hand you.

Cell Case class What is being tested Example
A Linearity — clean pass flat residual band Ex 1
B Linearity — U-shape fail curved residuals, cubic truth Ex 2
C Homoscedasticity — funnel growing spread, log fix Ex 3
D Independence — time correlation Durbin–Watson number Ex 4
E Normality — heavy tail vs CLT Q–Q read + does save you Ex 5
F Multicollinearity — near-perfect VIF blows up, sign flips Ex 6
G Degenerate / zero input one predictor, VIF undefined, Ex 7
H Real-world word problem pick the right violation & fix Ex 8
I Exam twist high but assumptions broken Ex 9

Cells A–I are all covered. Signs (positive/negative residuals), the zero/degenerate input (Ex 7), and the limiting behaviour (VIF , DW , CLT as ) all appear explicitly.


Cell A — Linearity passes cleanly


Cell B — Linearity fails (U-shape)


Cell C — Heteroscedasticity (funnel) + log fix


Cell D — Independence (time correlation)


Cell E — Normality: heavy tail vs CLT rescue


Cell F — Multicollinearity (near-perfect)


Cell G — Degenerate / zero input


Cell H — Real-world word problem


Cell I — Exam twist: high , broken assumptions


Recall Quick self-test

Durbin–Watson for residuals ? ::: → independence violated. VIF when ? ::: → serious multicollinearity. of the line fit to data? ::: — high yet linearity is broken. Funnel vs curve in a residual plot? ::: funnel = heteroscedasticity; curve = nonlinearity.

See also: Residual Analysis · Hypothesis Testing in Regression · Generalized Linear Models (GLMs).