Python Weighted Variance Calculator