In this Wikipedia page: https://en.wikipedia.org/wiki/Partition_function_(statistical_mechanics)
.. the total sum of energy in an ideal gas is given as:
$$\langle E \rangle = \sum_s E_s P_s $$
But isn't this just the expected value of the energy for a single particle? Shouldn't the sum of energy be just:
$$ E = \sum_s E_s $$
Why do we take the expected value?