weighted_sd function

Calculates weighted standard deviation