calculate mean and variance using inbuilt functions and use them to normalize