标签:des style blog http color os
def Var(t, mu=None): """方差""" if mu is None: mu = Mean(t) # compute the squared deviations and return their mean. dev2 = [(x - mu)**2 for x in t] var = Mean(dev2) return var def StdVar(t, mu=None): """标准差""" if mu is None: mu = Mean(t) import math return math.sqrt(Var(t, mu)) def Range(t): """极差""" if not t: return None return max(t) - min(t)
标签:des style blog http color os
原文地址:http://www.cnblogs.com/data80386/p/3842363.html