Answer:
Following are the code to this question:
def variance(self):
average = self.avg
return (self.sum_x_sq / self.n - average* average)
Step-by-step explanation:
In the given question, some information missing, that is a program so, the correct code to this question can be described as follows:
- In the above-given code, a method "variance" declared, that accepts an argument in its parameters, inside the method an another "average" variable is declared, that use to hold avg value.
- The method will divide "sum_x_sq" with "n- average *average" calculate and return its value.