mean_est is now initialised to the correct dimension