Utilities for calculating statistics about selections