Reusable utilities for statistics.