I am new to python coding and I am trying to make my own functions such as mean and standard deviation on my own as practice. However, I am having trouble making a function for finding variance. the formula being

variance = \frac{1}{N - 1} \sum_{i = 1}^{N} (x_i - \mu_x)^2

I am trying to only use numpy.array, numpy.mean and the range() function. Any suggestions???

Thanks in advance!