How to Find Variance Using NumPy Var() Method


In this example we will show how to find the variance using the NumPy var() method in Python.

Source Code

import numpy as np

num = [15, 20, 15, 32, 20, 28, 15, 22]

var_num = np.var(num)

print(var_num)

Output:

35.109375
Subscribe
Notify of
guest
0 Comments
Inline Feedbacks
View all comments