  The histogram is widely used as a simple, exploratory display of data, but it
is usually not clear how to choose the number and size of bins. We construct a
confidence set of distribution functions that optimally address the two main
tasks of the histogram: estimating probabilities and detecting features such as
increases and modes in the distribution. We define the essential histogram as
the histogram in the confidence set with the fewest bins. Thus the essential
histogram is the simplest visualization of the data that optimally achieves the
main tasks of the histogram. The only assumption we make is that the data are
independent and identically distributed. We provide a fast algorithm for the
essential histogram, and illustrate our methodology with examples. An R-package
is available on CRAN.
