Problem 1. A random variable $X$ has the following pdf:
$$
f_X(x) = \begin{cases}
\frac{1}{2}(x+1), & -1 < x \le 0; \\
\frac{1}{2}, & 0 < x < \frac{3}{2} \\
0, & \text{otherwise}.
\end{cases}
$$
(a) Derive an expression for $F_X(x)$, the cdf of $X$ for all $x$.
(b) Calculate $q_{0.2}$, the 0.2-th quantile of the distribution.
(c) Compute $E(X)$ and $Var(X)$.
(d) Calculate $E(|X|)$.
Answers: (a)
$$
F_X(x) = \begin{cases}
0, & x \le -1, \\
\frac{1}{4}(x+1)^2, & -1 < x \le 0, \\
\frac{1}{4} + \frac{1}{2}x, & 0 < x < \frac{3}{2}, \\
1, & x \ge \frac{3}{2}.
\end{cases}
$$
(b) $q_{0.2} = -1 + \frac{2}{\sqrt{5}} \approx -0.1056$; (c) $E(X) = \frac{23}{48}$;
$$
Var(X) = \frac{863}{2304};
$$
(d) $\frac{31}{48}$.