[Math] Finding CDF, standard deviation and expected value of a random variable

probabilitystatistics

Let the function
$$
f(x) = \begin{cases} ax^2 & \text{for } x\in [ 0, 1], \\0 & \text{for } x\notin [0,1].\end{cases}
$$ Find $a$, such that the function can describe a probability density function. Calculate the expected value, standard deviation and CDF of a random variable X of such distribution.

So thanks to the community, I now can solve the former part of such excercises, in this case by $\int_0^1 ax^2 \, dx = \left.\frac{ax^3}{3}\right|_0^1 = \frac a 3$ so that the function I'm looking for is $f(x)=3x^2$. Still, I'm struggling with finding the descriptive properties of this. Again, it's not specifically about this problem – I'm trying to learn to solve such class of problems so the whole former part may be different and we may end up with different function to work with.

So as for the standard deviation, I believe I should find a mean value $m$ and then a definite integral (at least that's what the notes suggest?) so that I end up with $$\int_{- \infty}^\infty (x-m) \cdot 3x^2 \,\mathrm{d}x$$

As for the CDF and expected value, I'm clueless though. In the example I have in the notes, the function was $\frac{3}{2}x^2$ and for the expected value there is simply some $E(X)=n\cdot m = 0$ written while the CDF here is put as $D^2 X = n \cdot 0.6 = 6 \leftrightarrow D(X) = \sqrt{6}$ and I can't make head or tail from this. Could you please help?

Best Answer

Expected Value

In general, the expected value is determined by this following expression

$$\mathrm{E}(X) = \int_{-\infty}^{\infty} xf(x)\,dx$$

where $f(x)$ is the probability density function. For your problem, the expected value is

$$\begin{aligned} \mathrm{E}(X) &= \int_0^1 x\cdot 3x^2\,dx\\ &= \int_0^1 3x^3\,dx\\ &= \left.\dfrac{3}{4}x^4\right\vert_{x = 0}^{x = 1}\\ &= \dfrac{3}{4} \end{aligned}$$

Variance

Recall that the variance is

$$\mathrm{Var}(X) = \mathrm{E}(X^2) - (\mathrm{E}(X))^2$$

We already know $\mathrm{E}(X)$. We then need to compute $\mathrm{E}(X^2)$, which is

$$\begin{aligned} \mathrm{E}(X^2) &= \int_0^1 x^2\cdot 3x^2\,dx\\ &= \int_0^1 3x^4\,dx\\ &= \left.\dfrac{3}{5}x^5\right\vert_{x = 0}^1\\ &= \dfrac{3}{5} \end{aligned}$$

So

$$\mathrm{Var}(X) = \dfrac{3}{5} - \left(\dfrac{3}{4} \right)^2 = \dfrac{3}{80}$$

Standard Deviation

Thus, the standard deviation is

$$\sigma = \sqrt{\mathrm{Var}(X)} = \sqrt{\dfrac{3}{80}}$$