<s>[INST] How to calculate the probability $P(2\leq X<4)$ from the distribution $F(X)$. 
Let the random variable $X$ have the distribution function
  $$F(x)=\begin{cases}0 , &\text{if }\ x<0\\ \frac{x}{2}, & \text{if }\ 0\leq x<1\\ \frac{3}{5},&\text{if }\ 1\leq x<2\\ \frac{1}{2}+\frac{x}{8}, &\text{if} ~~2\leq x<3\\1, &\text{if} ~~ x\geq 3\end{cases}$$
Now I need to calculate $P(2\leq X<4)$. 

We know that $P(a\leq X<b)=F(b)-F(a)-P(X=b)+P(X=a)$. So $$P(2\leq X<4)=F(4)-F(2)-P(X=4)+P(X=2)$$
Now $F(4)=1$ and $F(2)=\frac{1}{2}+\frac{1}{4}$. 
Also $P(x=2)=P(x\leq2)-P(x<2)=F(2)-F(2^-)=\frac{1}{2}+\frac{1}{4}-\frac{3}{5}$. 
Now I am having problem with the value of $P(X=4)$.  We can write $P(x=4)=P(x\leq4)-P(x<4)=F(4)-F(4^-)=1-1=0$. I am confused about the value of $F(4^-)$? Is my solution correct? Thanks.
 [/INST] it is correct, in your example, $P(X=4)=0$, and your calculations are correct, moreover since for any $x\geq 3, F(x)=1$, you can state $P(X>3)=1-P(X\leq 3)=1-F(3)=0$, so $X$ does not take values $>3$
</s>