To evaluate the average, we partition the  energy eigenstates by counting how many of them have a value for  within a range between  and .
We divide the energy eigenstates into subsets by counting those with energies between  and .