Statistical simulation of the energy spectra of field-emission electrons