We use the concepts of stochastic complexity, description length, and model selection to develop data-based methods for choosing smoothing parameters in nonparametric density estimation. In the case of histogram estimators, we derive a simple, exact formula for stochastic complexity when the prior distribution of cell probabilities is uniform over the class of all possible choices. The formula
... [Show full abstract] depends only on the data and the smoothing parameter, which is readily chosen according to the criterion of minimum stochastic complexity. Approaches based on stochastic complexity and description length are shown to be asymptotically equivalent in certain circumstances. They produce a degree of smoothing which is almost optimal from the viewpoint of minimizing L∞, or supremum, distance, but which smooths a little more than is optimal in the sense of minimizing Lr distance for any finite value of r.