Skip to content

Instantly share code, notes, and snippets.

@ev-br
Created September 3, 2013 21:20
Show Gist options
  • Save ev-br/6429773 to your computer and use it in GitHub Desktop.
Save ev-br/6429773 to your computer and use it in GitHub Desktop.
import scipy.stats as stats
g = stats.gamma.pdf(8., 3.)
# no consequences for 'regular' distributions
print "\nregular @df=5:", stats.t.pdf(1., df=5)
print "\nregular @df=25:", stats.t.pdf(1., df=25)
print "\nregular @df=5:", stats.t.pdf(1., df=5)
#freeze
t5 = stats.t(df=5)
print "\nfrozen @df=5: ", t5.pdf(1.)
print "\nregular @df=25: ", stats.t.pdf(1., df=25)
# 2nd frozen instance
t35 = stats.t(df=35)
print "\nfrozen @df=5: ", t5.pdf(1.)
print "\nfrozen @df=35: ", t35.pdf(1.)
print "\nfrozen @df=5: ", t5.pdf(1.)
#other distributions are intact
print "previously, gamma was ", g
print "now it is still", stats.gamma.pdf(8., 3.)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment