Calculating normalization constant and expected value for this probability density.

expected valueprobabilityprobability distributionsstatistics

Can someone help me solve this ?

Let $X$ denote a continuous random variable taking values in $(-1,1)$ with density function:

$ f(x) = \begin{cases}
c(1+x) & -1 < x \leq 0 \\
\ c(1-x) & 0 < x < 1\\
\ 0 & \text{otherwise}\
\end{cases}
$

$(a)$ Determine the value of $c$

$(b)$ Calculate the expectation value of $(X)$


$(a)$ Since $X$ is a density function, $1 = \int_{-\infty}^{\infty}f_X(x) \cdot dx = \int_{-1}^{0}c(1+x) \cdot dx + \int_{0}^{1}c(1-x) \cdot dx$. I simplified this and I ended up with $c=1$.

$(b)$ I used $c=1$ assuming $(a)$ is correct.

$E[X] = \int_{-\infty}^{\infty}x \cdot f_X(x) \cdot dx = \int_{-1}^{0}x(1+x) \cdot dx + \int_{0}^{1}x(1-x) \cdot dx = \frac{-1}{6} + \frac{1}{6} = 0$

Best Answer

Your answers are correct. Here is another solution:

Upon inspection $f(x)=c(1+x)\mathbf 1_{x\in(-1,0)}+c(1-x)\mathbf 1_{x\in(0,1)}$ is comprised of two right triangles with side lengths of $1$ and $c$; thus the area under the curve is $A=1=c/2+c/2\implies c=1$.

Again upon inspection, $EX=\int_{-1}^1 xf(x)\,\mathrm dx=0$, since $EX$ is the integral of an odd function over a symmetric interval centered on zero.