News

Although we can write a function to calculate variance in less than 10 lines of code, there is an even easier way to find variance. You can do it in one line of code using Pandas.
For instance, if we wanted to take x1 and use np.add to sum the array, we could use the .add method np.add.accumulate(x1) instead of looping over each element in the array to create a sum.