Suppose that $\theta\_1, \cdots, \theta\_n$ are distributed independently and that $\theta\_j$ has probability density function (PDF) $f\_j = \frac{1}{2\pi}$ ($i.e.$, the uniform distribution) for $j = 1, \cdots, n$. What is the PDF of $R$ given that $R^2 = C^2 + S^2$, with $C = \sum\_{j=1}^{n}{cos \theta\_j}$ and $S = \sum\_{j=1}^{n}{\sin \theta\_j}$ for a small $n$, $e.g.$, $n = 2$?



PDF of $R$ given that $R^2 = C^2 + S^2$, with $C = \sum_{j=1}^{n}{\cos \theta_j}$ and $S = \sum_{j=1}^{n}{\sin \theta_j}$ for a small $n$
Solution for $n=2$: In view of the rotational invariance, the distribution the distance of the random point $(C,S)$ from the origin is the same as that for $(1,0)+(\cos U,\sin U)=(1+\cos U,\sin U)$, where $U$ is uniformly distributed on $[0,2\pi]$. So, $R$ is equal in distribution to $\sqrt{(1+\cos U)^2+\sin^2 U}=2|\cos U/2|$ and hence to $2\cos V$, where $V$ is uniformly distributed on $[0,\pi/2]$. So, the pdf $f\_R$ of $R$ is given by 
$$f\_R(r)=\frac2{\pi\sqrt{4-r^2}}1\_{0<r<2} 
$$
for real $r$.




---


Consider also the case of large $n$. Note that $R=R\_n$ is the length of the vector $S\_n$ that is the sum of $n$ iid copies of the random vector $X:=(\cos U,\sin U)$, with $U$ as above. The mean of $X$ is $(0,0)$ and its covariance matrix is $\frac12\,I\_2$, where $I\_2$ is the $2\times2$ identity matrix. So, by the multivariate central limit theorem, the distribution of $\sqrt{\frac 2n}S\_n$ converges to the standard bivariate normal distribution. So, the distribution of $\sqrt{\frac1n}R\_n$ converges to the Maxwell distribution, with pdf $f\_M$ given by 
$$f\_M(r)=2r e^{-r^2}1\_{r>0} 
$$
for real $r$.


