Member-only story
A deep dive into the functions that pertain to discrete distributions
In my last post I discussed the five functions that relate to continuous distributions, and that post can be read here:- https://tracyrenee61.medium.com/a-foray-into-the-functions-that-apply-to-continuous-distributions-001ed993e2ea
In this post I intend to discuss the four functions that pertain to discrete distributions, which are:-
- Probability mass function (PMF)
- Cumulative distribution function (CDF)
- Survival function
- Hazard function
Probability mass function (PMF)
The PMF gives the probability that a discrete random variable is exactly equal to some value.
For a discrete random variable X the PMF is a non-negative entity, being P(X=x) >= 0 for all x.
The summation of the PMF is equal to one. The sum of the probabilities for all possible values of the random variable must equal one.
The code below creates a PMF using only Python’s matplotlib library:-