Is the energy of the Ising model random or deterministic? I'm reading about the Ising model and I'm confused by the following point. It says that the probability of finding the model in a given state $s$ is proportional to $e^{-E(s)/T}$. Where $E(s)$ is the energy of the state and $T$ is the temperature.
On the one hand, if the state is random, then, since the energy is a function of the state, so is the energy. But on the other hand isn't the energy also determined by the non-random temperature $T$?
 A: Yes, at finite temperature the energy is a random variable  with PDF
$$p_T(E) = \rho(E)\, e^{-E/T}$$
where the density of states $\rho(E)$ depends on the details of the Hamiltonian. When people talk about "the energy of the thermal state at temperature $T$", they really mean the average energy
$$\langle E \rangle_T := \int_0^\infty E\, p_T(E)\, dE.$$
But the energy is indeed a random variable, so there will be fluctuations, and an instantaneous measurement of the energy could measure a value other $\langle E \rangle$ (although for a large system, the relative deviation away from $\langle E \rangle$ will almost always be very small).
A: The expression
$$p(s) = e^{-E(s)/k_B T}$$
is valid in the canonical ensemble, where the fixed macroscopic variables are particle number $N$, volume $V$ and temperature $T$. This means that the energy can fluctuate: it is "random". This is valid for any system in the canonical ensemble, not just for the Ising model.
The magnitude of the fluctuation of energy $\sqrt{\langle E^2\rangle - \langle E \rangle ^2}$ can be calculated in general and it has the value
$$\sqrt{\langle E^2\rangle - \langle E \rangle ^2} =T \sqrt{k_B C_V}$$
This means that the relative fluctuation is 
$$\frac{\sqrt{\langle E^2\rangle - \langle E \rangle ^2}}{\langle E \rangle} =\frac{T \sqrt{k_B C_V}}{\langle E \rangle} \propto \frac 1 {\sqrt N}$$
where we have used $C_V \propto N$ and $\langle E \rangle \propto N$ (heat capacity and energy are intensive variables). This means that for a macroscopic system, where $N\approx10^{24}$, the energy fluctuations will become vanishingly small, and fixing the temperature becomes equivalent to fixing the energy.
In other words, $E$ is a random variable in the canonical ensemble (fixed $NVT$), but its probability density has a very sharp peak centered at $\langle E \rangle$.
