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?
$\endgroup$ 71 Answer
$\begingroup$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$.
$\endgroup$