I have a problem below:
The probability density function (PDF) of the random variable X is
$$ f_X(x) = \begin{cases} 1-|x| &\text{|x| < 1}\\ 0&\text{otherwise} \end{cases} $$
a. Find and sketch the cumulative distribution function (CDF) of X.
b. Calculate the probability that |x| ≥ 1/2.
c. Calculate the conditional probability density function $$ f_{X||X|≥1/2} (x||X|≥1/2) $$
d. Calculate the conditional cumulative distribution function (CDF), and sketch it. $$ F_{X||X|≥1/2} (x│|X|≥1/2)=P(X<x ||X|≥1/2) $$
I can solve a. and b. P(|x| ≥ 1/2) = 1/4. But for c. and d., I confused because of the condition term (|X|≥1/2) and do not know how to solve it. In the textbook, there is a formula: $$ f_{X|X≤a}(x|x≤a) = \begin{cases} f_{X}(x)/F_{X}(a) &\text{x ≤ a}\\ 0&\text{otherwise} \end{cases} $$
In conditional CDF and PDF, I always confused between ≤ and ≥. How can I understand it correctly ?
Hint:
$\mathbb P\left(X\leq x||X|\geq \frac{1}{2}\right) =\frac{\mathbb P\left(X\leq x ,|X|\geq \frac{1}{2}\right)}{\mathbb P\left(|X|\geq \frac{1}{2}\right)} =\frac{\mathbb P\left(X\leq x ,X\geq \frac{1}{2},X\leq -\frac{1}{2}\right)}{\mathbb P\left(|X|\geq \frac{1}{2}\right)}$
It is enough calculate $\mathbb P\left(X\leq x ,X\geq \frac{1}{2},X\leq -\frac{1}{2}\right)$. \begin{eqnarray} \mathbb P\left(X\leq x ,X\geq \frac{1}{2},X\leq -\frac{1}{2}\right)=\left\{ \begin{array}{cc} 0 & x < -1 \\ \int_{-1}^xf(x) dx & -1 \leq x < -\frac{1}{2} \\ \int_{-1}^{-\frac{1}{2}}f(x) dx & -\frac{1}{2} \leq x < \frac{1}{2} \\ \int_{-1}^{-\frac{1}{2}}f(x) dx + \int_{\frac{1}{2}}^{x}f(x) dx& \frac{1}{2}\leq x < 1 \\ 1 & x\geq 1 \end{array} \right. \end{eqnarray}