Freedman–Diaconis Rule
A histogram bin-width estimator based on the interquartile range and the cube root of sample size.
The Freedman–Diaconis rule chooses histogram width from the spread of the middle half of a sample. It is associated with the 1981 density-estimation work of David Freedman and Persi Diaconis. For one-dimensional observations, the usual prescription is:
h = 2 × IQR / n^(1/3)
IQR = Q3 − Q1Here h is the proposed bin width and n the number of observations. The interquartile range measures central spread, while the factor n^(−1/3) reduces width as the sample grows.
Worked calculation
With n=125, Q1=12 and Q3=22, the IQR is 10 and the cube root of 125 is 5. The suggested width is therefore 4 measurement units. If the observed range is 40 units, this implies approximately ten bins. Integer rounding and the final edge positions still have to be chosen.
Resistance and failure cases
Unlike standard deviation, IQR is relatively insensitive to a small number of extreme observations. The rule can therefore disagree substantially with Scott's rule on contaminated data. Yet if IQR=0, the formula yields a zero width and cannot directly define a histogram. Heavy ties may call for an alternative estimator or an explicitly discrete display. Small samples and strongly multimodal distributions also demand inspection rather than automatic acceptance.
Interquartile range supplies the spread estimate, while bin width connects the result to the actual histogram edges. Sturges' rule depends only on sample size; the statistical histogram entry explains how areas and heights differ.