Commit fc5562b1 authored by Quentin BILLAUD's avatar Quentin BILLAUD
Browse files

Ajout de la variance dans stats.py

parent dc02a62e
......@@ -4,3 +4,10 @@ def moyenne (liste):
moyenne += i
return moyenne/len(liste)
def variance(liste):
variance = 0
moy = moyenne(liste)
for i in liste:
variance += (i-moy)*(i-moy)
return variance/len(liste)
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment