On the relation of dynamics to statistical mechanics