In []:
%pylab inline 
import matplotlib.pyplot as plt 
import numpy as np
import random

x = [random.random() for a in range(0,1000000)]
histo, j = np.histogram(x)
plot(histo)
In [14]:
x = [random.triangular(0, 10, 50) for a in range(0,1000000)]
histo, j = np.histogram(x)
plot(histo)
Out[14]:
[<matplotlib.lines.Line2D at 0x106765790>]
In [23]:
x = [random.gammavariate(.5, .5) for a in range(0,1000000)]
histo, j = np.histogram(x)
plot(histo)
Out[23]:
[<matplotlib.lines.Line2D at 0x10b3baf10>]
In [25]:
x = [random.betavariate(.5, .5) for a in range(0,1000000)]
histo, j = np.histogram(x)
plot(histo)
Out[25]:
[<matplotlib.lines.Line2D at 0x10a45e850>]
In [27]:
x = [random.expovariate(10) for a in range(0,1000000)]
histo, j = np.histogram(x)
plot(histo)
Out[27]:
[<matplotlib.lines.Line2D at 0x10afc2f10>]
In [29]:
x = [random.gauss(0, .5) for a in range(0,1000000)]
histo, j = np.histogram(x)
plot(histo)
Out[29]:
[<matplotlib.lines.Line2D at 0x10afe8710>]
In [30]:
x = [random.lognormvariate(0, .5) for a in range(0,1000000)]
histo, j = np.histogram(x)
plot(histo)
Out[30]:
[<matplotlib.lines.Line2D at 0x10b0b3150>]
In [31]:
x = [random.normalvariate(0, .5) for a in range(0,1000000)]
histo, j = np.histogram(x)
plot(histo)
Out[31]:
[<matplotlib.lines.Line2D at 0x10b2649d0>]
In [32]:
x = [random.vonmisesvariate(0, .5) for a in range(0,1000000)]
histo, j = np.histogram(x)
plot(histo)
Out[32]:
[<matplotlib.lines.Line2D at 0x10b29c290>]
In [33]:
x = [random.paretovariate(.5) for a in range(0,1000000)]
histo, j = np.histogram(x)
plot(histo)
Out[33]:
[<matplotlib.lines.Line2D at 0x10b34dc10>]
In [34]:
x = [random.weibullvariate(0, .5) for a in range(0,1000000)]
histo, j = np.histogram(x)
plot(histo)
Out[34]:
[<matplotlib.lines.Line2D at 0x10b37fc50>]
In []: