Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PYTHON

python calculate variance by hand

# calculate mean
m = sum(results) / len(results)

# calculate variance using a list comprehension
var_res = sum((xi - m) ** 2 for xi in results) / len(results)
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #python #calculate #variance #hand
ADD COMMENT
Topic
Name
9+8 =