How to calculate Standard Deviation and Variance