statistics with hierarchies