Run ❯
Get your
own
website
×
Change Orientation
Change Theme, Dark/Light
Go to Spaces
# Import statistics Library import statistics # Calculate the variance from a sample of data print(statistics.variance([1, 3, 5, 7, 9, 11])) print(statistics.variance([2, 2.5, 1.25, 3.1, 1.75, 2.8])) print(statistics.variance([-11, 5.5, -3.4, 7.1])) print(statistics.variance([1, 30, 50, 100]))
14
0.4796666666666667
70.80333333333334
1736.9166666666667