explanation of mean calculation