Counting Bumps

The number of modes of a density f can be estimated by counting the number of 0-downcrossings of an estimate of the derivative f′, but this often results in an overestimate because random fluctuations of the estimate in the neighbourhood of points where f is nearly constant will induce spurious counts. Instead of counting the number of 0-downcrossings, we count the number of "significant" modes by counting the number of downcrossings of an interval [-∈, ∈]. We obtain consistent estimates and confidence intervals for the number of "significant" modes. By letting ∈ converge slowly to zero, we get consistent estimates of the number of modes. The same approach can be used to estimate the number of critical points of any derivative of a density function, and in particular the number of inflection points.