I've got into some confusion on continuous probability distributions, and everything related to it. This is the problem: Problem Image. I assume from the sketch that pdf is $f(x) = x$ for values of $x$ between $0$ and $\theta$ and $0$ otherwise
there are my shots at parts 1,2,3: $E(x)$ is equal to: $$E(x) = \int_{-\infty}^\infty x * f(x) dx $$ hence,
(i)
$$E(x) = \int_{0}^\theta (x ^ 2) dx = (\frac{\theta^3}{3}) $$
(ii)
$$1. Var(x) =E(x^2) - E(x)^2 $$ or $$2. Var(x)= E((x - E(x))^2) = \int_{-\infty}^\infty (x - E(x))^2) * f(x) dx$$
1# formula is easier to apply, since I've already calculated $E(x)$ hence, $$E(X^2) = \int_{0}^\theta (x^2) * (x) dx = \int_{0}^\theta (x^3) dx = (\frac{\theta^4}{4} )$$
$$Var(x)=(\frac{\theta^4}{4} )-(\frac{\theta^3}{3})^2= \frac{9\theta^4 - 12*(\theta^12)}{36}$$
(iii)
$$E(x^3) == \int_{0}^\theta (x^3) * x dx = \int_{0}^\theta (x^4) dx = \frac{\theta^5}{5}$$
These are my questions:
Are those solutions correct? And another question about finding $E(x)$:
The mean (E(x)) of continuous probability distribution is the point on the x-axis which splits the area under pdf curve into two halves. And the total area under the curve of pdf is always 1, right?
so I've came up with alternative formula for $E(x)$ :
$$E(x) == \int_{-\infty}^n p(x) dx = 0.5 $$
which basically says, that for some some point $'n'$ if the area under the curve of pdf from $-\infty$ to $n$ is equal to 0.5. The n must be the mean (or $E(x)$) right? I Think this theory must be wrong, but I can't see and explain why. And I think it's wrong because if I apply it to the problem above I get:
$$\int_{0}^n x dx = 0.5 $$ $$\frac{n^2}{2} = 0.5 $$ $$n^2 = 1 $$ $$n = \sqrt 1 $$
This is obviously wrong, because the value of mean should depend on \theta . Were did I go wrong?
The pdf cannot be $f(x)=x$ on $[0,\theta]$ (and zero elsewhere) because then it would not integrate to one (unless $\theta=2$). The pdf is shown as a straight line, so let $f(x)=kx$. We need to determine $k$. The area under the pdf is the area of a triangle with height $k\theta$ and base $\theta$, i.e the area is $$\frac{k\theta^2}{2}.$$ We need to choose $k$ to satisfy $$\frac{k\theta^2}{2}=1$$ so that we need $k=2/\theta^2$. Thus you should be using $f(x)=\frac{2}{\theta^2}x$. With the correct pdf, you should get $E(X)=\frac{2}{3}\theta$.