Suppose we have the cdf $$F_X(x) = \begin{cases} 0 \quad \quad, x<-1 \\ 0.25 \quad \quad, -1\leq x < 1 \\ 0.5 \quad \quad, 1 \leq x < 2 \\ \frac{2}{3} \quad \quad, 2 \leq x < 3 \\ 1 \quad \quad,3 \leq x \\ \end{cases}$$

How do I compute the pdf. If I took the derivative, I'd take derivatives of numbers which are equal to $0$, which I guess is wrong... So how do I do it?

  • 3
    $\begingroup$ Look up pmf (not pdf): the clue is that density is discrete (not continuous). $\endgroup$
    – wolfies
    Dec 21, 2018 at 13:02
  • $\begingroup$ If you're wondering how to recognize that this is not a continuous distribution, one of the very best ways to determine that is to graph it and look for vertical jumps. $\endgroup$
    – whuber
    Dec 21, 2018 at 16:13
  • $\begingroup$ @wolfies thank you for the hint, I guess I did not know the distinction between pmf (P(X=x), in discrete) and pdf for the same in continous setting. So is it correct to derive the pmf as following. $\endgroup$
    – thebilly
    Dec 21, 2018 at 16:47
  • $\begingroup$ @wolfies $$f(x) = \begin{cases} 0 \quad, x<-1 \\ 0.125 \quad, x = -1 \\ 0.125 \quad, x = 0 \\ 0.25 \quad, x = 1 \\ \frac{1}{6} \quad, x = 2 \\ \frac{1}{3} \quad, x = 3 \\ 0 \quad, x>3 \\ \end{cases}$$ $\endgroup$
    – thebilly
    Dec 21, 2018 at 16:53
  • $\begingroup$ @whuber I was not really wondering, am still trying to understand your hint, as I guess it helps my understanding. Are you saying that the jumps indicate abrupt increases and not a continous increase, which hints towards a discrete setting? $\endgroup$
    – thebilly
    Dec 21, 2018 at 16:58

1 Answer 1


You can compute PMF directly as @wolfies says since this is a discrete RV. However, if you insist on PDF (generalized PDF actually), you can treat $F_X(x)$ as distribution and take the generalized derivative of it. Any jump in CDF will correspond to a dirac-delta function at that point in PDF. This representation is used for describing mixed distributions when we have both continuous and discrete components. For generalized notation, we proceed as follows:

It appears that you have $P(-1)=P(1)=0.25, P(2)=1/6, P(3)=1/3$, which corresponds to the following PDF notation: $f(x)=0.25\ \delta(x+1)+0.25\ \delta(x-1)+1/6\ \delta(x-2) + 1/3\ \delta(x-3)$

  • $\begingroup$ you say it is possible to insist on a pdf of a discrete RV. I just looked everything up and came to the conclusion that pdf's only exist in the continous setting. I am only taking an intro-course right now, therefore, I am wondering whether what you wrote is part of basic probability theory or not, as I have not heard anything about dirac-deltas in my lecture. $\endgroup$
    – thebilly
    Dec 21, 2018 at 16:57
  • $\begingroup$ You can look at the final box at the end of the page: probabilitycourse.com/chapter4/4_3_2_delta_function.php. I didn't quite understand the reason of downvote by the way. $\endgroup$
    – gunes
    Dec 21, 2018 at 17:07
  • 1
    $\begingroup$ Thank you for the link. I actually did not downvote your answer. I take any help I can get. When I just tried to upvote, I actually got a message, saying my vote does not count, because I have to low of a reputation to affect the public vote. (just saying.) $\endgroup$
    – thebilly
    Dec 21, 2018 at 17:32

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.