now the mean of a is calculated