Second example, particles in a box, discussion

If we denote \( \langle n_l \rangle \) as the number of particles in the left half as a time average after equilibrium is reached, we can define the standard deviation as $$ \begin{equation} \sigma =\sqrt{\langle n_l^2 \rangle-\langle n_l \rangle^2}. \tag{4} \end{equation} $$

This problem has also an analytic solution to which we can compare our numerical simulation.