You are on page 1of 1

1 b) Uniform distribution.

CODE:

import numpy as np
x = np.random.uniform(0,1,size = 1000)

# For plotting
import matplotlib.pyplot as plt
plt.title("Uniform distribution histogram",fontsize = "20")
plt.xlabel("Bins(x)")
plt.ylabel("No. of occurences")
plt.hist(x,bins = 100,color = "y",edgecolor = "w",rwidth = 0.8 )

OUTPUT:

You might also like