Discrete Uniform Distribution
Contents
Discrete Uniform Distribution#
PMF and CDF of Discrete Uniform Distribution#
(Discrete Uniform Distribution (PMF))
Let \(X\) be a discrete random variable that follows a Uniform distribution over the set \(\S\). This means that \(X=x\) has an equally likely chance of being drawn.
Then the probability mass function (PMF) of \(X\) is given by
More specifically, if \(X\) is a discrete random variable that follows a Uniform distribution over the ordered set \(\S\) where the lower bound is \(a\) and the upper bound is \(b\), then the PMF of \(X\) is given by
Note:
It is non-parametric because there are no parameters associated.
(Discrete Uniform Distribution (CDF))
The cumulative distribution function (CDF) of a discrete random variable \(X\) that follows a Uniform distribution is given by
where \(a\) and \(b\) are the lower and upper bounds of the set \(\S\).
Plotting PMF and CDF of Poisson Distribution#
The below plot shows the PMF and its Empirical Histogram distribution for an Uniform distribution with \(a=1\) and \(b=6\), essentially a dice roll.
1from plot import plot_discrete_uniform_pmf, plot_empirical_discrete_uniform
2
3fig, axes = plt.subplots(1, 2, figsize=(12, 6), dpi=125)
4low, high = 1, 6 # [1, 6] for dice roll
5plot_discrete_uniform_pmf(low, high, fig=fig, ax=axes[0])
6plot_empirical_discrete_uniform(low, high, fig=fig, ax=axes[1])
7plt.show()
Using Seed Number 42