Is the average energy conserved in an isolated system? Let's say the system in question is a box with an ideal gas.
It makes sense to me that if this box with a gas is an isolated system then the total energy, being the sum of energies of every particle in the gas, is conserved. But, as it is generally known, it is useless to consider every single particle when describing a thermodynamical processes. So, people turn to probabilistic approach and use average energy instead. And then, usually, it is very quickly assumed that the average energy is conserved as well.
Is it actually that obvious that the average energy is conserved? Does this follow from the 1st law of thermodynamics alone?
Thank you!
 A: Let me answer your question and then perhaps answer the more interesting question I think you mean to ask:

*

*For an isolated system, the average energy does not change, but that is because there is not even a distribution of energy. An isolated system by definition has fixed energy, so there is no fluctuation in the energy, so there is no need to take an average energy.


*If you have a system that is small relative to some reservoir with temperature $T$, then you can have fluctuations in the energy; let's find how large those fluctuations are considering your scenario with a classical ideal gas with $N$ identical particles in a box of volume $V$. We can calculate the average energy $\langle E \rangle$ using the partition function:
$
Z = \frac{1}{N!}\frac{1}{(2\pi\hbar)^{3N}} \int (\prod_i^N d^3p_i d^3x_i)
\exp(-\beta\sum_i^N \frac{p_i^2}{2m}) = \frac{1}{N!}\frac{V^N}{(2\pi\hbar)^{3N}}  
(\int \exp(-\beta\frac{p^2}{2m})dp)^{3N} 
$
$
= \frac{V^N}{N!(2\pi\hbar)^{3N}}\cdot(2\pi m/\beta)^{3N/2}
$
Now we can use the following formulas for the average energy and the fluctuation in energy:
$\langle E \rangle = -\frac{\partial (\log(Z))}{\partial \beta} = \frac{3N}{2 \beta}$
$var(E) = \langle E^2 \rangle - \langle E \rangle^2 = \frac{\partial^2 (\log(Z))}{\partial \beta^2} = \frac{3N}{2\beta^2}$
Thus the relative size of the fluctuations is given by (where $\sigma$ is the standard deviation):
$\frac{\sigma}{\langle E \rangle} = \frac{\sqrt{var(E)}}{\langle E \rangle}
\propto \frac{1}{\sqrt{N}}$
This tells us that as the number of particles gets large--like in a container of gas where there is more than $10^{20}$ gas molecules--there is essentially no variation in the energy from the average energy. I.e. when we have a large number of particles, it is like the energy is constant anyways!
Note: We can also see that that unless you change the temperature, the average energy will be conserved (even though the energy itself could change).
A: It total energy is conserved, and total number of particles is conserved, then it follows that the energy per particle (which is simply the first quantity divided by the second) is conserved.
A: The system (in this case an ideal gas) may be thermally isolated by means of adiabatic walls, in that case there is no heat transfer between the system and the surroundings that can change the average energy. But at the same time it can happen that the system is mechanically coupled to the surroundings, e.g. by a movable piston, and then work may be done on the gas, changing its average energy.
