Uniform distribution describes probabilities where all events have an equal chance of occurring, such as in random number generation.
It has three parameters:
Generate a 2×3 sample from a uniform distribution:
from numpy import random x = random.uniform(size=(2, 3)) print(x) |
from numpy import random import matplotlib.pyplot as plt import seaborn as sns sns.distplot(random.uniform(size=1000), hist=False) plt.show() |