# Difficulty in understanding probability of a continuous random variable

My probability textbook (Introduction to Probability Models 9th ed. by Sheldon M. Ross) says that, the probability that a continuously distributed random variable $X$, with probability density function $f(x)$, assumes a value in the closed interval $[a, b]$ is $P\{a \leq X \leq b\} = \int^b_a f(x)\,dx$.

Moreover a solved problem in the book asks: calculate the probability that $1 <X < 6$, where the random variable $X$ is uniformly distributed over $(0, 10)$. And the books solution is: $P\{1<X<6\}=\frac{\int_1^6 \,dx}{10}=\frac{1}{2}$. But doesn't it contradict with the definition above; doesn't the definite integral actually give $P\{1 \leq X \leq 6\}$? Or do I misunderstand something?

• $P(X=a)=0$ for a continuous random variable $X$.
– user60610
Apr 28 '13 at 20:41
• @TongZhang I know that. What does it have to do here? Apr 28 '13 at 20:44
• In this case $\{X=a\}\bigcup\{a<X<b\}\bigcup\{X=b\}$ So you get $\text{P}\{a\leq X \leq b\}=\text{P}(X=A)+\text{P}(a<X<b)+\text{P}(X=b)$ since you know two of those are zero you get your equivalence. ${A}\bigcup {B}$ denotes the union between sets you are integrating over. Apr 28 '13 at 21:12

For a continuous random variable $P\{a\le X\le b\}=P\{a < X < b\}$, as pointed out by Matt.

This is because $P\{X = a\} = 0$ (would be $\int^a_a f(x)\,dx = 0$)*).

So $P\{a\le X\le b\}=P(X = a) + P\{a < X < b\} + P(X = b) = P\{a < X < b\}$

*I guess you're aware of this. To understand geometrically, it's like asking what is the area of a curve below a single point.

• *Yes I knew that. But couldn't just figure it out. Apr 28 '13 at 20:50

For a continuous random variable $P\{a\le X\le b\}=P\{a < X < b\}$.

• But how? I didn't find that in the book. Can you explain it further? Apr 28 '13 at 20:42
• If you compute the area under a curve in the interval [a,b] or in the interval (a,b), is there a difference? Apr 28 '13 at 20:47
• No it doesn't. Didn't think about it seriously before. Thanks. Apr 28 '13 at 20:52