Modify the formula for computing the mean value