# Computing the probability density function

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?

• Look up pmf (not pdf): the clue is that density is discrete (not continuous). Dec 21, 2018 at 13:02
• 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.
– whuber
Dec 21, 2018 at 16:13
• @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. Dec 21, 2018 at 16:47
• @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}$$ Dec 21, 2018 at 16:53
• @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? Dec 21, 2018 at 16:58

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)$$