Expected length of unit vector projection in $\mathbb{R}^3$ I've had this question in a Probability exam. I managed to solve it in $\mathbb{R}^2$ and could not see the difference in $\mathbb{R}^3$.
The answers turned out to be different so I'm looking for help.
Let $v$ be a random unit vector in $\mathbb{R}^3$.
What is the expected length of the projection of $v$ on a given plane?
TIA
 A: Let's call $\hat z$ the normal to the plane, and $\hat x$ and $\hat y$ two perpendicular unit vectors in the plane. If the unit vector $v$ makes an angle $\theta$ with the $\hat z$ and the projection in the plane makes an angle $\phi$ with $\hat x$, we can write $v$ as $$v=(\sin\theta\cos\phi,\sin\theta\sin\phi,\cos\theta)$$
The projection in the plane has length $\sin\theta$. Since these are polar coordinates, if we assume that the probability of vector $v$ is uniformly distributed on the unit sphere $S$, then the expected length is $$\langle L\rangle=\frac{\int_S\sin\theta d\Omega}{\int_Sd\Omega}=\frac{\int_0^\pi\sin^2\theta d\theta\int_0^{2\pi} d\phi}{4\pi}=\frac{\pi/2\cdot 2\pi}{4\pi}=\frac\pi 4$$
A: I think the density of the uniform measure of the surface of the unit dimensional sphere is given by $\cos \theta\ d\theta\ d\phi$, where $\theta \in [-\pi/2, \pi/2)$ and $\varphi \in [0,2\pi)$. This is how one actually computes the surface area of a sphere, i.e. integrates the function $f(x) = 1$ over the surface. 
Let $L$ denote the length of the projection of the uniformly distributed $X$ onto the $xy$-plane. Then for $t<1$
$$ P(L<t) = \frac{1}{4\pi}\int_{|\theta|>\arccos t } \int_0^{2\pi} \cos \theta d\varphi d\theta  =  \int_{\arccos t}^{\pi/2}  \cos\theta d\theta =  1-\sin\arccos t = 1-\sqrt{1-t^2}.  $$
This gives us the density $f(t) = \frac{t}{\sqrt{1-t^2}} $ and the expectation is
$$ E[L] = \int_0^1 \frac{t^2}{\sqrt{1-t^2}}dt = \big.-t\sqrt{1-t^2} \big|_{t=0}^1 + \int_0^1 \sqrt{1-t^2} dt = \int_0^{\pi/2}  \cos^2 \varphi d\varphi = \pi/4.$$
