TITLE: Finding the probability mass function given the cumulative distribution function
QUESTION [5 upvotes]: Suppose that the cumulative distribution function of a random variable X is given by
$
F(a) = 
\begin{cases} 
    0,& a < 0 \\
    1/5, & 0 \leq a < 2 \\
    2/5, & 2 \leq a < 4 \\
    1, & a \geq 4 
\end{cases}
$
Find the probability mass function of X?
My reasoning is as follows:
The cdf is discontinuous at the points 0, 2, and 4. Between these $F'(a)$ is defined and $=0$, hence the pmf needs definition only at these points. But how do we get the probabilities at a = 0, 2, 4?

REPLY [2 votes]: $P(X\leq0)=\frac15$ and from $P(X\leq a)=0$ for each $a<0$ it follows that $P(X<0)=0$. 
Then $$P(X=0)=P(X\leq0)-P(X<0)=\frac15-0=\frac15$$
The others (at $2$ and $4$) can be found likewise.