Skip to content

Instantly share code, notes, and snippets.

@masters3d
Created May 25, 2014 20:36
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save masters3d/88a26188e3933c0f7cb6 to your computer and use it in GitHub Desktop.
Save masters3d/88a26188e3933c0f7cb6 to your computer and use it in GitHub Desktop.
statistics code.py
#standard deviation
data=[0,1]
mean=(sum(data)+.0000)/len(data)
dataminus=[(each-mean)**2 for each in data]
variance= sum(dataminus)/len(data)
#print dataminus
print "this is the varience"
print variance
print
print "this is the standard div"
print variance**.5
print "___________________"
print
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment