Concept#
PMF and CDF of Discrete Uniform Distribution#
Definition 87 (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.
Definition 88 (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.
Show code cell source
1fig, axes = plt.subplots(1, 2, figsize=(12, 6), dpi=125)
2low, high = 1, 6 # [1, 6] for dice roll
3plot_discrete_uniform_pmf(low, high, fig=fig, ax=axes[0])
4plot_empirical_discrete_uniform(low, high, fig=fig, ax=axes[1])
5plt.show()