What Is A Cumulative Distribution Function? | by Emmett Boudreau | Towards Data Science

Back in May, I took a look at a distribution function that belongs to most statistical distributions called the Probability Density Function, or PDF. The PDF is a very important part of statistical inference, likewise, so is its function brother, the Cumulative Distribution Function, or CDF. If you would like to learn more about PDFs before CDFs, you may read the article I wrote about them here:
towardsdatascience.com
I would highly suggest having a decent understanding of the PDF and what it is used for before every even attempting the CDF. This is because CDFs are often far more complicated then your typical PDF. They are also usually used on PDF-distributed data. That in mind, let us start with that. What on Earth is PDF-distributed data? This means that the data has been distributed using a function. In statistics, these functions typically utilize certain metrics from within the data. A formula is then applied to the entire feature. This distributes the data into a distribution. For example, the normal distribution’s PDF is simply subtracted mu (the mean) from xbar (current sample) divided by sigma (the standard deviation.)
The CDF of a variable X, or just distribution function of X, is essentially just a representation of the probability that X will take a value less than or equal to X. Of course, this is a function of continuous statistical features. The unique thing about a CDF is that it is monotonic. More specifically, monotonic increasing. This means that overtime, the probability will always increase.
This means that CDFs are typically used as a scalar of a continuous distribution. A continuous probability distribution, or CPD, is a probability distribution whose elements are an uncountable set. This means that they are all unique and characterized by a cumulative distribution function. This can then be used to calculate the probability for each subset of support. A great example of this sort of distribution that you might be familiar with is the normal distribution. Furthermore, the uniform distribution is also a continuous probability distribution. This mathematically equates to
Fx(x) = P(X <= x)
Where the right side of this equation is representative of the probability that X takes to be a value less than or equal to X. The probability that X lies in the interval (a, b) where a < b. In simpler terms, we are checking the probability of X being less than or equal to x. If this is the case, then our line will continue going straight. Otherwise, we will go up. This is precisely what gives a CDF its hill-like shape. And this is also precisely what makes it monotonic non-decreasing. Another thing to note about CDFs is that they are always right-continuous. This means that the values are continuous going left-to-right. So if we were to plot them, they would increase from left to right.
As briefly touched on before, CDFs are monotonic increasing. This means that there are of course some stark differences between this function and a PDF. The PDF is shaped as a parabola, whereas the CDF is a non-decreasing slope. If you have ever ready my articles about isotonic regression, technically the formula for that function is a CDF. Finally, let us compare the basic function methodology between both the CDF and the PDF, in order to provide a more complete mathematical understanding of these two functions and the differences between them. We will start with the CDF:
Fx(x) = P(X <= x)
Followed by the PDF:
f = dX.P / dmu
Because of the non-decreasing nature of CDFs, they are also typically A LOT more complicated than a typical PDF. As a result, we will not be working through solving any of the functions. However, I will be the first to admit that this is because I have only ever written two into code. They were both a lot of work, and the reality is there is never going to be a scenario where one is going to need to do that.
CDFs are a back-end component already programmed into many programming languages. While certainly there are more CDFs to find, I think it is also important to realize that having a broad understanding of the function or concept is important as well. Anyway, this was my quick introduction to CDFs, Hopefully this article was helpful for those who are looking to learn a bit more about the methodologies in statistics, and not too much of a sensory overload, as this is what I am trying to avoid by refraining from going into a 20-minute read today on Medium. I digress, thank you very much for reading!