Kinetic energy equipartition is a premise for many deterministic and stochastic molecular dynamics methods that aim at sampling a canonical ensemble. While this is expected for real systems, discretization errors introduced by the numerical integration may distort such assumption. Fortunately, backward error analysis allows us to identify the quantity that is actually subject to equipartition. This is related to a shadow Hamiltonian, which coincides with the specified Hamiltonian only when the time-step size approaches zero. This paper deals with discretization effects in a straightforward way. With a small computational overhead, we obtain refine