 The spectrum of velocities has to be measured, and the average calculated from that.It is not necessarily the case that the particles that escape and are measured have the same velocity distribution as the particles that remain in the bulk of the system, but sometimes a good sample is possible.Temperature is one of the principal quantities in the study of thermodynamics.