Implement modemeanbucket downsampling.