Can we compute $ \mathbf{Pr}[x_{1} < X < x_{2}] $ if we know the cumulative distribution function $ F $? Assume that we have a cumulative distribution function $ F $. How can we calculate the quantity $ \mathbf{Pr}[x_{1} < X < x_{2}] $?
I know the answer for $ \mathbf{Pr}[x_{1} < X \leq x_{2}] $, but I am not sure about $ \mathbf{Pr}[x_{1} < X < x_{2}] $.
 A: Whether $X$ is discrete or continuos, in any case
$$P(x_1<X<x_2)=F(x_2)-F(x_1)-P(X=x_2).$$ 
You may want to draw a picture.
A: Assuming that you mean that $F(x)$ is the cumulative distribution function for some continuous random variable with probability density function $f(x)$, where:
$$F(x):=\int_{-\infty}^{x}f(u)\:du$$
You are trying to find the probability that $x$ lies between the values $x_{1}$ and $x_{2}$. You therefore are looking to find the integral, $P(x_{1},x_{2})$, such that:
$$P(x_{1},x_{2}):=\int_{x_{1}}^{x_{2}}f(x)\:dx$$
Note that due to the fundamental theorem of calculus we can write:
$$P(x_{1},x_{2})=\int_{-\infty}^{x_{2}}f(x)\:dx-\int_{-\infty}^{x_{1}}f(x)\:dx$$
Which due to our definition of $F(x)$ earlier is simply:
$$P(x_{1},x_{2})=F(x_{2})-F(x_{1})$$
I hope this helps

EDIT: Note that $\mathrm{Pr}(x_{1}\lt x \lt x_{2})=\mathrm{Pr}(x_{1}\lt x \leq x_{2})=\mathrm{Pr}(x_{1}\leq x\lt x_{2})=\mathrm{Pr}(x_{1}\leq x \leq x_{2})$ due to the continuous nature of the random variable and the fundamental theorem of calculus.
A: In the following, I use the notation $p A = \mathbf{Pr}[X \in A]$.
Let $F$ be the cumulative distribution function, that is $F(\alpha) = p (-\infty,\alpha]$.
The relevant identities are $(a,b] = (-\infty,b] \setminus (-\infty, a]$ and
$(-\infty, a) = \cup_{n} (-\infty, a-\frac{1}{n}]$.
Combining gives $(a,b) = \cup_{n} (a, b-\frac{1}{n}]$.
The above shows that $p(a,b] = F(b)-F(a)$, as you already knew, and also
$p(a,b) = \lim_n F(b-\frac{1}{n}) - F(a)$. (Since $F$ is increasing and bounded above by 1, we know the limit exists.)
So, to restate, we have $p(a,b) = \lim_{t \uparrow b} F(t) - F(a)$.
It is possible to have $p(a,b) < p(a,b]$. For example, letting $F(\alpha) = \begin{cases} 0, & \alpha < 0 \\ 1, &\text{otherwise} \end{cases}$.
Then $p(-1,0) = 0$, but $p(-1,1] = 1$.
