calculate mean and varience