# Calculating the Probability of a random variable using a probability density function with integrals

Let $(\Omega, \mathcal F, P)$ be Lebesgue measeure on $[0,1]$, and set

$X(\omega) = 1$ if $0 \le \omega < \frac{1}{4}$

$X(\omega) = 2\omega^2$ if $\frac{1}{4} \le \omega < \frac{3}{4}$

$X(\omega) = \omega^2$ if $\frac{3}{4} \le \omega \le 1$

Compute $P(X \in A)$ where

(A) $A = [0,\frac{3}{4}]$

(B) $A = [\frac{1}{2},1]$

From a previous question I know that:

(A) $P(X \in [0,1]) = \frac{\sqrt{2}}{2} + \frac{1}{4}$

(B) $P(X \in [\frac{1}{2},1]) = \frac{\sqrt{2}}{2}$

This problem needs to be solved using probability density functions and integrals. How do I approach this?

-
Can you find the probability density function? – Jonathan Christensen Dec 4 '12 at 0:43
No my book doesn't give any clear example on how to do this. Could you give an unrelated on how to do this? – dmcqu314 Dec 4 '12 at 0:50
Ok, looking at this example more closely there isn't even a pdf as properly defined because of the point mass at 1. But you can find the CDF and use that: given the definition of $X(\omega)$, find $P(X(\omega) \leq x)$ for every $x \in \mathbb{R}$. This will be a piecewise function with (I think, based on a quick count) four pieces. – Jonathan Christensen Dec 4 '12 at 0:57

By the definition of the probability: $$\mathbb{P}\left(X \in A\right) = \mathbb{P}_w\left(X(\omega) \in A \right) = \int_0^1 [ X(\omega) \in A ] \mathrm{d} \omega$$ where $[\bullet]$ denotes Iverson bracket.
Thus $$\mathbb{P}\left( 0 \leqslant X \leqslant \frac{3}{4}\right) = \underbrace{\int_{0}^{1/4} \left[ 0 \leqslant 1 \leqslant \frac{3}{4} \right] \mathrm{d} \omega}_0 + \underbrace{\int_{1/4}^{3/4} \left[ 0 \leqslant 2 \omega^2 \leqslant \frac{3}{4} \right] \mathrm{d} \omega}_{ \int_{1/4}^{\sqrt{\frac{3}{8}}} \mathrm{d} \omega } + \underbrace{\int_{3/4}^{1} \left[ 0 \leqslant \omega^2 \leqslant \frac{3}{4} \right] \mathrm{d} \omega}_{ \int_{3/4}^{\frac{\sqrt{3}}{2}} \mathrm{d} \omega }$$ where integrals below brackets are obtained by solving inequalities.
I had noticed for the third integral after looking over it. Is the upper bound supposed to be $\frac{\sqrt{3}}{2}$ – dmcqu314 Dec 4 '12 at 1:34