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:
- is the interquartile range of the data
- is the number of observations in the sample
Another approach is the use Sturges' rule: use a bin so large that there are about non-empty bins.
- David Freedman and Persi Diaconis (1981). "On the histogram as a density estimator: L2 theory." Probability Theory and Related Fields. 57(4): 453-476