Statistics and Nosé formalism for Ehrenfest dynamics