A probability distribution over an ordered universe [ n ] = 1 n is said to be a k -histogram if it can be represented as a piecewise-constant function over at most k contiguous intervals. We study the following question: given samples from an arbitrary distribution D over [ n ] , one must decide whether D is a k -histogram, or is far in 1 distance from any such succinct representation. We obtain a sample and time-efficient algorithm for this problem, complemented by a nearly-matching information-theoretic lower bound on the number of samples required for this task. Our results significantly improve on the previous state-of-the-art, due to Indyk, Levi, and Rubinfeld (2012) and Canonne, Diakonikolas, Gouleakis, and Rubinfeld (2015).