Find cumulative distribution from density distribution with a constant

53 Views Asked by At

The PDF of a random variable $X$ is:

$f(x) = \begin{cases} 0 , x<2 \ \text{or} \ x >4 \\ a(x-2)(4-x), 2 \leq x \leq 4 \end{cases} $

Find $a$ and $F_X (x)$.

My attempt: By taking $\int_{2}^{4} f_X (x) = 1$, I worked out $a = \frac{3}{4}$. Then

$F_x (x) = \begin{cases} 0 , x<2 \ \text{or} \ x >4 \\ - \frac{x^3}{4} + \frac{9}{4}x^2 - 6x, 2 \leq x \leq 4 \\ 1, x >4 \end{cases} $

But the solution in my book is:

$F_x (x) = \begin{cases} 0 , x<2 \ \text{or} \ x >4 \\ - \frac{x^3}{4} + \frac{9}{4}x^2 - 6x + \textbf{5}, 2 \leq x \leq 4 \\ 1, x >4 \end{cases} $

I don't know where $\textbf{5}$ comes from. I suspect it's from the $C$ when we take the anti-derivative of $f(x)$ but I couldn't figure out how to calculate it.

3

There are 3 best solutions below

0
On BEST ANSWER

Yes, you are correct that $5$ comes from the anti-derivative. Remember that to find the cdf, you compute the following integral:

$$\int_{-\infty}^xf(t)dt$$

where $f(t)$ is the pdf of the continuous random variable. In this question, it is:

$$\int_{2}^x\frac34(t-2)(4-t)dt$$

and if you evaluate the lower limit of the integral (at $t=2$), you get $-5$

0
On

We have \begin{align} \int_2^4 f(x)\ \mathsf dx &= \int_{-1}^1 f(x+3)\ \mathsf dx\\ &= \int_{-1}^1a(1+x)(1-x)\ \mathsf dx\\ &= a\int_{-1}^1(1-x^2)\ \mathsf dx\\ &= \frac43 a, \end{align} and since $\int_{\mathbb R}f(x)\ \mathsf dx=1$ it follows that $a=3/4$. For $2<x<4$ we have \begin{align} \mathbb P(X\leqslant x) &= \int_2^x f(t)\ \mathsf dt\\ &= \int_2^x \frac34(t-2)(4-t)\ \mathsf dt\\ &= -\frac34\int_2^x (t^2-12t+8)\ \mathsf dt\\ &= \frac{1}{4} (x-5) (x-2)^2, \end{align} and hence $$ F(x) = \frac{1}{4} (5-x) (x-2)^2\cdot\mathsf 1_{(2,4)}(x) + \mathsf 1_{[4,\infty)}(x). $$

0
On

Note $F(2)=0$ to set the C value

$ C- \frac{2^3}{4} + \frac{9}{4}2^2 - 6(2)=0$ solve for C