Energy and specific heat in the canonical ensemble

The energy is proportional to the first derivative of the potential, Helmholtz' free energy. The corresponding variance is defined as $$ \begin{equation*} \sigma_E^2=\langle E^2 \rangle-\langle E \rangle^2= \frac{1}{Z}\sum_{i=1}^M E_i^2e^{-\beta E_i}- \left(\frac{1}{Z}\sum_{i=1}^M E_ie^{-\beta E_i}\right)^2. \end{equation*} $$ If we divide the latter quantity with \( kT^2 \) we obtain the specific heat at constant volume $$ \begin{equation*} C_V= \frac{1}{k_BT^2}\left(\langle E^2 \rangle-\langle E \rangle^2\right), \end{equation*} $$ which again can be related to the second derivative of Helmholtz' free energy.