Microstates map onto macrostates

Rolling a dice gives us 36 microstates, but only 11 macrostates, corresponding to sums of 2 through 12.

Using binomial distribution:

successes = list(range(n+1))
combinations = [comb(n,k) for k in successes]

Entropy: the universe is more likely to move towards more likely states.

There are too many atoms, so we think on logarithmic scales: $$S = k_B\ln \Omega$$kB=1.38×10−23J/K,Ω−the number of microstates,S−entropy

The equilibrium probability distribution describing how energy is spread between the two systems is given by:

Peq(EA)∝ΩA(EA)ΩB(EAB−EA)

Or in terms of the entropy:

Peq(EA)∝eSA(EA)/kBeSB(EAB−EB)/kB