liveBook · Manning

Quantile-quantile plot

As explained in Statistics Every Programmer Needs

A Q–Q plot is a graph comparing sample quantiles with theoretical quantiles to assess whether data follow a specified distribution.

A quantile–quantile (Q–Q) plot compares residual quantiles with those of a normal distribution. Points roughly following a 45-degree reference line support normality; systematic departures indicate potential non-normality. section 4.2.4

Use the plot to evaluate regression residuals:

  • Inspect the center and tails for departures from the dashed normal-reference line. section 4.2.4
  • Treat substantial tail deviations as possible heavy tails or skewness. section 4.2.4
  • Follow the subjective visual check with a Jarque–Bera test when a more definitive assessment is needed. section 4.2.4

Python implementation

Run stats.probplot(lm.resid, dist='norm', plot=plt), style the reference line as dashed, title the chart “Q-Q Plot,” and display it with plt.show().

How Statistics Every Programmer Needs covers it

How deep it goes
Explains visual alignment, tail deviations, subjectivity, and Jarque–Bera follow-up without developing the underlying quantile calculations.
Examples
Uses Python code and a residual Q–Q figure with points compared against a dashed normal-reference line.
What it assumes
Assumes familiarity with linear-regression residuals and the normality assumption.
What you can do after
Evaluate residual normality visually and pursue statistical confirmation with the Jarque–Bera test.
How it connects
Connects residuals with linear regression, normal distributions, skewness, kurtosis, and the Jarque–Bera test.

Also explained in

Compare how 2 books explain quantile-quantile plot →

Related concepts

This explainer was generated by Manning's knowledge graph from the text of Statistics Every Programmer Needs. The section links point to the parts of the book it draws on.