CDF of a continuous random variable

47 Views Asked by At

We have a probability function

$$ f(x) = \begin{cases} |x| & -1 \leq x \leq 1 \\ 0 & \text{else} \end{cases} $$

In the book says that the CDF is:

$$ F(x) = \begin{cases} 0 & x \leq -1\\ (1-x^2)/2 & -1 \leq x < 0\\ (1+x^2)/2 & 0 \leq x < 1\\ 1 & x\geq 1 \end{cases} $$

What was the procedure to get that?

1

There are 1 best solutions below

2
On BEST ANSWER

You know that

$$F(x) = \int_{-\infty}^xf(t)dt.$$

As the function $f$ is zero on $[-\infty,-1]$, we have $F(x) = 0, \forall x \le -1$. For $x\in[-1,0]$ we have $|x| = -x$, so

$$F(x) = \int_{-\infty}^xf(t)dt = \int_{-1}^xf(t)dt = -\int_{-1}^xtdt = -\frac12t^2\bigg\vert_{-1}^x = \frac12 - \frac{x^2}2.$$

For $x\in[0,1]$ we have $|x| = x$, so $$F(x) = \int_{-1}^xf(t)dt = \int_{-1}^0f(t)dt + \int_{0}^xf(t)dt = F(0) + \frac12t^2\bigg\vert_0^x = \frac12 + \frac{x^2}2.$$

And having $f(x) = 0$ on $x>1 $ equals to $F(x) = 1$ for this values.