Cumulative standard deviation: Difference between revisions

No edit summary
Line 2,721:
 
===Python: In a couple of 'functional' lines===
<lang python>>>> myMean = lambda MyList : reduce(lambda x, y: x + y, lMyList) / float(len(lMyList))
>>> myStd = myStd = lambda myList : (reduce(lambda x,y : x + y , map(lambda x: (x-myMean(lMyList))**2 , lMyList)) / float(len(lMyList)))**.5
 
>>> print myStd([2,4,4,4,5,5,7,9])
Anonymous user