This applet demonstrates the concept of fluctuations in ensemble averages.

The simulation is performed for a simple ideal gas. The large box is at a fixed density. The local density within the small box in the upper left corner is tracked during the simulation, as particles pass in and out of the region.

The instantaneous value of the local density is displayed by the blue line in the strip-chart plot. This fluctuating value, along with the overall fixed density that it should average to, is presented in the table also.

The buttons labeled "Smaller" and "Larger" to the left of the configuration display can be used to increase or decrease the size of the local-density sample volume (if the buttons don't appear on loading, click around to the left of the configuration display, near the middle (sorry!)).

Note how the fluctuations grow as the system size becomes smaller. For a not-too-large sample volume, the sample region may be thought of as a grand-canonical ensemble, with the rest of the system serving as a reservoir of constant chemical potential. For a full-size sample volume, the fluctuations vanish, but this is because the system has become a canonical ensemble. In this range of size the applet does not provide a good demonstration of the reason fluctuations vanish for large systems (ensemble fluctuations vanish for large systems not because they become comparable in size to their reservoir, but because of the nature of statistics of large samples).

The display features of this applet are under revision. It is likely that you do not see all the elements of the applet in their correct form (e.g., part or all of the table may not be visible).