Estimate temperature of electron traveling close to the speed of light? To my understanding, the temperature is a statistical quantity, as such, one would need a distribution of particles to talk about temperature. In this case, there exists an average thermal velocity is governed by the equipartition theorem, which states that in three dimensions, the energy is given by:
$$\frac{1}{2}mu^2=\frac{3}{2}k_BT$$
where, $v$ is the average velocity of the electrons at a particular temperature $T$, $m$ is the rest mass of the particle and $k_B$ is the Boltzmann constant. The temperature is hence
$$T=\frac{mu^2}{3k_B}[K]$$
Leaving this observation aside and since we are dealing with a relativistic electron, let’s assume that in the preceding equation we are going to use the relativistic kinetic energy, thus
$$(\gamma-1)mc^2=\frac{3}{2}k_BT$$
Solving for $k_BT$ we get:
$$k_BT=\frac{2}{3}(\gamma-1)mc^2[J]$$
If we multiply Eq. with an appropriate factor, we get the electron temperature in eV. I wrote a simple code estimating the electron temperature for various velocities, gradually approaching the speed of light. Des this analysis have any flaws? Did I assume something wrong here?

 A: There's not much point assigning energy to one particle - Temperature is a statistical property of a system of many particles. It only makes sense when you're considering a system of many interacting particles, whose energies have (at least approximately) thermal distribution. Then the mean energy of that distribution gives you the temperature of the whole system.
If you have a gas of relativistic electrons with mean energy $\frac32 k_bT$, you can say that it has the temperature $T$. You should be however aware, that if this gas does not contain other particles, it will be unstable. This si because the electrons are charged, which means that when they interact they may emit photons. And thee photons will also have high energy. Therefore, to have a stable system, you should have a gas of electrons and photons in thermal equilibrium. Moreover, once the particles obtain energies high enough, the creation-annihiliation processes become possible. Therefore you should also include some antielectrons in this gas, whose number is such that their annihilation rate is equal to their creation rate. The higher the temperature, the more antielectrons will be produced.
