Standard deviation and variance for grouped data