# How to calculate cumulative probabilities for a discrete random variable?

I want to understand the difference between the cumulative distribution function and probability density function for a discrete random variable. I thought I understood the difference, but then I attempted this question:

The number of accidents resulting in claims per month is modeled by the random variable $$N$$ with $$F(n) = 1-\frac{1}{n}$$. What is the probability that $$3, 4,$$ or $$5$$ claims are received in a given month?

My approach was to differentiate $$F(n)$$, which gave me $$f(n)$$, the probability density function, and I then found $$f(3)+f(4)+f(5)$$, by using the definition of PDF's of R.V.s. This approach turned out to be incorrect (the correct approach was $$F(5)-F(2)$$). Could someone please explain why this is incorrect? Wouldn't this approach be correct if $$N$$ were a continuous random variable? Is my understanding of PDFs of R.V.s incomplete?

• Your random variable $N$ is discrete, so the CDF $F$ is not continuous. Hence you can't even talk about densities -- $F$ is not differentiable, so the density doesn't exist. The formula $F(n)=1-1/n$ is only valid for non-negative integers $n$. What is $F(2.5)$ for example? Jan 18, 2021 at 21:51
• @jlammy Do you mean to imply that discrete random variables do not have densities (or probability density functions)? Also, weren't we looking at just non-negative integers, namely $3, 4, 5$? Sorry, I feel I am still missing something here. Jan 18, 2021 at 22:04
• Yes, discrete rvs don't have probability density functions. Note that $$F(2.5)=\mathbb P(N\leq 2.5)=\mathbb P(N\leq 2)=F(2).$$ The precise point I am trying to make is that the CDF $F$ isn't continuous: it is flat, with "jumps" every time you hit an integer. Jan 18, 2021 at 22:42
• A discrete random variable has a probability mass function with values between $0$ and $1$ at each possible value of the variable. The masses add up to $1$ -- this is an ordinary sum, not an integral. Jan 18, 2021 at 23:31
• At each possible value of the variable, the CDF "jumps" up by exactly that amount. In this example, the probability of $5$ claims or less is $F(5)=\frac45,$ the probability of $4$ claims or less is $F(4)=\frac34,$ and so the probability of exactly $5$ claims is $F(5)-F(4)=\frac45-\frac34=0.05.$ Jan 18, 2021 at 23:54

For discrete random variables, there's only CDF. There are no PDFs for them. The naming is very telling, "cumulative" meaning when you plug in a value into $$F(n)$$, that's the probability, than the random varible is less than that value. Let's say you want to calculate $$P(\xi \leq 5)$$. Since $$\xi$$ is discrete, you add up all the probabilites until $$5$$, meaning $$P(\xi\leq 5)=P(\xi=0)+P(\xi=1)+P(\xi=2)+P(\xi=3)+P(\xi=4)+P(\xi=5)=F(5)$$.
Now, in your case, you want to calculate $$P(3\leq \xi \leq 5)$$. You do the the same, however since the CDF is cumulative, you added everything up, until $$5$$. But you don't need those before $$3$$. So you subtract the unnecessary part. Hence $$F(5)-F(2)$$. Or more precisely, $$P(\xi=3)+P(\xi=4)+P(\xi=5)$$.
If $$\xi$$ is absolute continous, and you want to use the PDF, then you have to use integration.$$\int\limits_3^5 f(x)\; dx$$where $$f(x)$$ is the PDF, which you obtain by differentiating $$F(x)$$, the CDF.
Note: $$\xi$$ or $$X$$ is the standard notation for a random variable, in your case, this is $$N$$.