Given
$$ F(x) = \begin{cases} 0, & x < 1 \\ c(x-1)^2, & 1 \leq x < 2 \\ 1, & x \geq 2 \end{cases} $$
- Find the values of $c$ for which $F(x)$ is the distribution function of a random variable $X$.
- Establish for what value of $c$ the random variable $X$ is continuous, and in this case derive $E(X)$.
Solution
- $F(x)$ is the distribution function of a random variable $X$ for $0 \leq c \leq 1$.
- For $c=1$ the random variable $X$ is continuous and in this case it results $f(x) = 2(x-1)$ for $1 \leq x < 2$ so it results in $$ E(X) = \int_{1}^{2} 2x(x-1) \, \mathrm{d}x = 2 \left[ \frac{x^3}{3} - \frac{x^2}{2}\right]_{1}^{2} = \frac{5}{3} $$
What is the proper way to solve this exercise? I tried by using
$$ \int_{-\infty}^{\infty} f(x) \, \mathrm{d}x = 1, $$
but it leads me to a single value of $c=3$, which is not the case of the solution. Is there any formula I'm missing?
Recall that $F$ is a distribution function (a.k.a. c.d.f.) if and only if the following properties hold:
The $F$ defined as in the problem is always right-continuous, so the last property is not our concern. For the rest, a moment of thought tells that we must have $0 \leq \lim_{x\to 2^-} F(x) \leq 1$, which is equivalent to $0 \leq c \leq 1$.
$\hspace{2em}$
$X$ is continuous if and only if $F$ is absolutely continuous, which means that
$$F(x) = \int_{-\infty}^{x} f(t) \, \mathrm{d}t$$
for some non-negative function $f$ and for all $x \in \mathbb{R}$. A necessary condition is that $F$ itself is continuous. (And practically, this is also a sufficient condition at the level of preliminary probability course, as one never deals with singular distribution at this level.)
Now, we see that $c = 1$ is the only choice for which $F$ is continuous. And with this choice, we easily identify the p.d.f. $f$ as
$$ f(x) = \begin{cases} 2(x-1), & 1 < x < 2 \\ 0, & \text{otherwise} \end{cases}. $$
Plugging this to the formula $E(X) = \int_{-\infty}^{\infty} xf(x) \, \mathrm{d}x$ gives the desired answer.