How can one construct dynamical systems obeying the first and second laws of thermodynamics: mean energy is conserved and entropy increases with time? This book answers the question for classical probability (Part I) and quantum probability (Part II). A novel feature is the introduction of heat particles which supply thermal noise and represent the kinetic energy of the molecules. When applied to chemical reactions, the theory leads to the usual nonlinear reaction-diffusion equations as well as modifications of them. These can exhibit oscillations, or can converge to equilibrium.In this second edition, the text is simplified in parts and the bibliography has been expanded. The main difference is the addition of two new chapters; in the first, classical fluid dynamics is introduced. A lattice model is developed, which in the continuum limit gives us the Euler equations. The five Navier-Stokes equations are also presented, modified by a diffusion term in the continuity equation. The second addition is in the last chapter, which now includes estimation theory, both classical and quantum, using information geometry.