Expected value and variance of a random vector

probabilityprobability distributionsprobability theoryrandom variables

I am trying to solve expected value and variance of the random vector given by function:
$$\begin{equation}
p_x(x)=\left\{
\begin{array}{@{}ll@{}}
\frac1\pi, & \text{if}\ x^2_1+x^2_2 < 1 \\
0, & \text{otherwise}
\end{array}\right.
\end{equation} $$

Condition $$x^2_1+x^2_2$$ let me know that this is an unit circle in 3d-plane, so I can integrate from [-1 1] in both directions:
$$ E(x)=\begin{bmatrix}
\int^1_{-1}{x_1*\frac1\pi} \\
\int^1_{-1}{x_2*\frac1\pi} \\
\end{bmatrix} =
\begin{bmatrix}
0 \\
0
\end{bmatrix}
$$

Is that right way of doing expected value?
What about variance? I didnt quite catche how to figure out the variance.
I have now probability theory course and some other course, which uses that part of probability theory. The other course is going on and probability theory has just started. Because of that I have asked questions here.
Thanx.

Best Answer

It is often the case that some introductory course on probability theory requires some knowledge from multivariate calculus. To evaluate the variance matrix, it is much more efficient to use polar coordinate change $$(x_1,x_2)=(r\cos\theta,r\sin \theta).$$ Then $dx_1dx_2 = rdrd\theta$, and we have $$ \frac{1}{\pi}\int_{x_1^2+x_2^2<1}x_1^2\;dx_1dx_2=\frac{1}{\pi}\int_0^{2\pi}\int_0^1 r^3\cos^2 \theta\;drd\theta=\frac{1}{4}, $$ $$ \frac{1}{\pi}\int_{x_1^2+x_2^2<1}x_1x_2\;dx_1dx_2=\frac{1}{\pi}\int_0^{2\pi}\int_0^1 r^2\cos\theta\sin\theta\;drd\theta=0, $$ and the variance of $X_2$ is the same as that of $X_1$.

Related Question