
上QQ阅读APP看书,第一时间看更新
Uniform distribution
This very common distribution is the first continuous distribution that we will see. As the name implies, it has a constant probability value for any interval of the domain.
In order to integrate to 1, a and b being the extreme of the function, this probability has the value of 1/(b-a).
Let's generate a plot with a sample uniform distribution using a very regular histogram, as generated by the following code:
plt.figure()
uniform_low=0.25
uniform_high=0.8
plt.hist(uniform, 50, normed=1)
plt.show()
Take look at the following graph:

Uniform distribution