Changed to Mean

Instead of sum changed to mean