Skip to content

Commit 7becaf2

Browse files
jstacclaude
andcommitted
heavy_tails: cite the Q-Q plot section rather than introduce it cold
heavy_tails reached for sm.qqplot with only a Wikipedia link by way of explanation, having never said what a Q-Q plot is or how to read one. Now that fitting_distributions defines them, it cites that treatment and moves straight to the comparison it wants. Adds a (qq_plots)= label to the Q-Q plot section of fitting_distributions so the reference has something to point at. Also fixes a typo in the same paragraph: statsmodels compares sample data with the quantiles of the normal distribution, not the quintiles. And lower cases the heading per the style guide, which leaves the anchor unchanged. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
1 parent dc63dac commit 7becaf2

2 files changed

Lines changed: 8 additions & 3 deletions

File tree

lectures/fitting_distributions.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -196,6 +196,7 @@ The other two look plausible.
196196
To choose between them we need something sharper than a glance at a figure.
197197

198198

199+
(qq_plots)=
199200
## Q-Q plots
200201

201202
A **Q-Q plot** (short for quantile-quantile plot) compares two distributions by

lectures/heavy_tails.md

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -650,11 +650,15 @@ We will use this idea [below](https://intro.quantecon.org/heavy_tails.html#heavy
650650

651651
+++
652652

653-
#### Q-Q Plots
653+
#### Q-Q plots
654654

655-
We can also use a [qq plot](https://en.wikipedia.org/wiki/Q%E2%80%93Q_plot) to do a visual comparison between two probability distributions.
655+
Another visual comparison is provided by the {ref}`Q-Q plot <qq_plots>`, which we introduced in {doc}`fitting_distributions`.
656656

657-
The [statsmodels](https://www.statsmodels.org/stable/index.html) package provides a convenient [qqplot](https://www.statsmodels.org/stable/generated/statsmodels.graphics.gofplots.qqplot.html) function that, by default, compares sample data to the quintiles of the normal distribution.
657+
There we compared a data set with a distribution fitted to it, and read the departures from the 45 degree line as a diagnosis of how the fit failed.
658+
659+
Here we do the same with the normal distribution as the reference, since our interest is in how far these distributions depart from it.
660+
661+
The [statsmodels](https://www.statsmodels.org/stable/index.html) package provides a convenient [qqplot](https://www.statsmodels.org/stable/generated/statsmodels.graphics.gofplots.qqplot.html) function that, by default, compares sample data with the quantiles of the normal distribution.
658662

659663
If the data is drawn from a normal distribution, the plot would look like:
660664

0 commit comments

Comments
 (0)