Fixed mean meanError function: used wrong equation