(self)
return sum(square_differences) / (self.get_size() - 1)
get current variance
get current variance
get current variance
def get_var(self):
        "get current variance"
        if not self.values or self.get_size() == 1:
            return 0
        mean = self.get_mean()
        square_differences = [(mean - value) ** 2 for value in self.values]
        return sum(square_differences) / (self.get_size() - 1)
def get_var ( self ) : if not self . values or self . get_size ( ) == 1 : return 0 mean = self . get_mean ( ) square_differences = [ ( mean - value ) ** 2 for value in self . values ] return sum ( square_differences ) / ( self . get_size ( ) - 1 )