So I have this density function f(x) = 3/2 x\^2, -1<=x<=1.

Mean = E(X) → this is an integral between -1 and 1 and it is 1.

Var(X) = E(X\^2)-(E(X))\^2 → but I get that this is 0,9 - 1 = -0,1. This can’t be correct, because variance can’t be negative.

The solution that I have is that the variance is 0,6, but they got 0 from the E(X) and that isn’t correct.

So how do I get correct variance in this case?