In calculating the mean of grouped data