Ensemble statistics as units of selection