# Obtaining probabilities given cumulative probability distribution function

Let the cumulative distribution function of random variable $X$ is given as:

$F(x)=\begin{cases} 0 & \text{ if } x<0 \\ \frac{1}{5}(1+x^3) & \text{ if } 0\leq x< 1 \\ \frac{1}{5}[3+(x-1)^2] & \text{ if } 1\leq x< 2 \\ 1 & \text{ if } x\geq 2 \end{cases}$

It is required to obtain the following probabilities:

1. $\Bbb P(0<X<2)$
2. $\Bbb P(0\leq X \leq 1)$
3. $\Bbb P(0.5\leq X\leq 1.5)$.

Although I know how to solve this problem but most of the time I get wrong result. Whenever a cumulative distribution function has a discontinuity, I get scare. This function has discounting ity at countable points but I think that should not affect the results. How, I obtained the above probabilities are as follows:

My approach:

1. $\Bbb P(0<X<2) = \Bbb P(X<2)-\Bbb P(X\leq 0)=\frac{3}{5}$
2. $\Bbb P(0\leq X \leq 1) = \Bbb P(X\leq 1)-\Bbb P(X\leq 0)= \frac{3}{5}$
3. This should not have any problem since function is continuous at both points. Hence, $\Bbb P(0.5\leq X\leq 1.5)= \frac{1}{5}[3+(1.5-1)^2]-\frac{1}{5}[1+0.5^3]$

I think my steps should be correct. Please take a moment to review my steps and my rationale for solving these types of problems. Thanks

• At $x=1$ your cdf has two values... – zoli Feb 2 '18 at 6:50
• I guess it has a typo. Let me correct it – RAHUl JHa Feb 2 '18 at 6:50
• Then correct it at $2$ as well. Which corrections point at the root of your problem. At an $x$ the cdf is well defined. – zoli Feb 2 '18 at 6:52

your results are correct. You can compute such probabilities using the left limits of $F$. Define $F(x-) : = \lim_{n \to \infty} F(x - \frac 1n)$. Then \begin{align} \Bbb P (a < X < b) &= F(b-) - F(a), \\ \Bbb P (a \leq X \leq b) &= F(b) - F(a-), \\ \Bbb P (a < X \leq b) &= F(b) - F(a), \\ \Bbb P (a \leq X < b) &= F(b-) - F(a-). \\ \end{align}