Calculating Average Kinetic Energy