Skip to content

Use parameter-free ECDFs and Q-Q plots

baddistributionsjudgmentCleveland 1994 p. 143Wilke 2019 p. 72

What share of checks fall below 20 USD or above the 90th percentile without choosing arbitrary bin widths?

Plotly Express Tips dataset, 244 restaurant bills.

“Empirical cumulative distribution functions display all data points directly without arbitrary bin width or bandwidth parameters”

William S. Cleveland, "The Elements of Graphing Data", revised edition, p. 71.

Also covered in Cleveland 1994 (3.3 Distributions, p. 143), Wilke 2019 (8 Visualizing Distributions: Empirical Cumulative Distribution Functions and Q-Q Plots, p. 72).

CVD preview

Before

Five wide 11 USD histogram bins obscure the exact median, upper tail, and concentration between 12 and 20 USD.

Download before Python code

After

An empirical cumulative distribution step curve displays all 244 bills with zero smoothing parameters and marks the 50th and 90th percentiles directly.

Download after Python code

Values

Most checks land in the 11 to 22 USD bin, with exact quantiles unreadable from the coarse bars.

Half of all checks fall below 17.80 USD and 90% fall below 32.23 USD.

Values used in both charts
PercentileBill (USD)
10th10.34
25th13.35
50th (median)17.8
75th24.13
90th32.24