# Freedman-Diaconis rule

In statistics, the **Freedman-Diaconis rule** can be used to select the size of the bins to be used in a histogram. The general equation for the rule is:

where

- is the interquartile range of the data
- is the number of observations in the sample

## Sturges' rule

Another approach is the use *Sturges' rule*: use a bin so large that there are about non-empty bins.

## Reference

- David Freedman and Persi Diaconis (1981). "On the histogram as a density estimator:
*L*_{2}theory."*Probability Theory and Related Fields*. 57(4): 453-476