Corrected error using mean instead of sum
Updated plots