G. Gottwald and M. Oliver,
Boltzmann's dilemma: an introduction to statistical mechanics via the Kac ring,
SIAM Rev. 51 (2009), 613-635.

Abstract:

The process of coarse-graining - here, in particular, of passing from a deterministic, simple, and time-reversible dynamics at the microscale to a typically irreversible description in terms of averaged quantities at the macroscale - is of fundamental importance in science and engineering. At the same time, it is often difficult to grasp and, if not interpreted correctly, implies seemingly paradoxical results. The kinetic theory of gases, historically the first and arguably most significant example, occupied physicists for the better part of the 19th century and continues to pose mathematical challenges to this day. In these notes, we describe the so-called Kac ring model, suggested by Mark Kac in 1956, which illustrates coarse-graining in a setting so simple that all aspects can be exposed both through elementary, explicit computation and through easy numerical simulation. In this setting, we explain a Boltzmannian "Stoßzahlansatz", ensemble averages, the difference between ensemble averaged and "typical" system behavior, and the notion of entropy.
Download the paper in PDF format.

The code for generating the figures in this paper is written in Python using the Numpy and Matplotlib extensions.

figures.py for Figures 3-5
scaling.py for Figure 6