  We consider a single particle spectrum as given by the eigenvalues of the
Wigner-Dyson ensembles of random matrices, and fill consecutive single particle
levels with n fermions. Assuming that the fermions are non-interacting, we show
that the distribution of the total energy is Gaussian and its variance grows as
n^2 log n in the large-n limit. Next to leading order corrections are computed.
Some related quantities are discussed, in particular the nearest neighbor
spacing autocorrelation function. Canonical and gran canonical approaches are
considered and compared in detail. A semiclassical formula describing, as a
function of n, a non-universal behavior of the variance of the total energy
starting at a critical number of particles is also obtained. It is illustrated
with the particular case of single particle energies given by the imaginary
part of the zeros of the Riemann zeta function on the critical line.
