In [1]:
import numpy as np
import matplotlib.pyplot as plt
%matplotlib inline
n,p=50,0.1
plt.hist(np.random.binomial(n,p,size=5000))
plt.show()
In [2]:
import numpy as np
import matplotlib.pyplot as plt
%matplotlib inline
ngood, nbad, nsamp = 90, 10, 50
plt.hist(np.random.hypergeometric(ngood, nbad, nsamp, 5000))
plt.show()
In [3]:
import numpy as np
import matplotlib.pyplot as plt
%matplotlib inline
plt.hist(np.random.geometric(p=0.35, size=10000))
plt.show()
In [4]:
import numpy as np
import matplotlib.pyplot as plt
%matplotlib inline
plt.hist(np.random.poisson(5, 10000))
plt.show()
In [5]:
import numpy as np
import matplotlib.pyplot as plt
%matplotlib inline
plt.hist(np.random.random_sample(1000))
plt.show()
In [6]:
import numpy as np
import matplotlib.pyplot as plt
%matplotlib inline
plt.hist(np.random.exponential(scale=1.0, size=1000))
plt.show()
In [7]:
import numpy as np
import matplotlib.pyplot as plt
%matplotlib inline
plt.hist(np.random.normal(size=4000))
plt.show()
In [8]:
import numpy as np
import matplotlib.pyplot as plt
%matplotlib inline
plt.hist(np.random.chisquare(3,1000))
plt.show()
In [9]:
import numpy as np
import matplotlib.pyplot as plt
%matplotlib inline
plt.hist(np.random.standard_t(2,50))
plt.show()
In [10]:
import numpy as np
import matplotlib.pyplot as plt
%matplotlib inline
plt.hist(np.random.f(4,10,5000))
plt.show()
In [ ]: