Defining a CDF for a continuous random variable
It is a definite integral with very specific limits of integration.
Suppose that X is a continuous random variable with the probability density function f(x). What exactly is the cumulative distribution function (CDF) of X? Many statistics students (and even working data scientists!) struggle to answer this correctly.
The CDF of X is a definite integral of the probability density function (PDF) of X. If you recall from calculus, a definite integral is an integral with limits of integration. In the case of a CDF, those limits of integration are
negative infinity (-∞) in the lower limit of integration
x in the upper limit of integration
Because we are using x in the upper limit of integration, we cannot also use x as the variable of integration, so we must use a dummy variable instead. Many textbooks use t for the variable of integration.
Combining all of this together, you will get this following expression for the CDF of x.
It is important to note that this definition is true only if the PDF actually exists for X. It is possible for a random variable to have a CDF but not a PDF; an example of such a random variable is the Cantor distribution.
Again, note that this is for only a continuous random variable. For a discrete random variable, it is a similar formulation, but with summation instead of integration.