結果 : function to calculate variance in python