Start at the origin and take n line segments and connect them end to end each at random angles. What is the expected distance of the endpoint from the origin of the resulting path?
Clearly when $n=1$ the expected distance is $1$. When $n=2$ we can find the expected distance by integrating
$$\frac{1}{2\pi} \int^{2\pi}_0 2 \sin \left(\frac{x}{2} \right) dx = \frac{4}{\pi}$$
For $n=3$, it is easy to simulate and find the distance is approximately $1.58$. For $n=4$ the simulated distance is $1.82$ and for $n=5$ we get approximately $2.02$.
Can one find a general formula for any $n$?
Let each line segment be a unit vector
$$ < cos(\theta) , sin(\theta) > $$
Adding up n unit vectors gives the resultant vector from the beginning to the end of the string
$$ \sum_{k=1}^n < cos(\theta_k) , sin(\theta_k) > $$
The magnitude of the resultant vector is the distance from beginning to end
$$ D = |< \sum_{k=1}^n cos(\theta_k) , \sum_{k=1}^n sin(\theta_k) >| $$
That equals
$$ \sqrt{(\sum_{k=1}^n cos(\theta_k))^2 + (\sum_{k=1}^n sin(\theta_k))^2} $$
To find the average distance, we need to add up the distances from every possible combination of thetas and divide by the number of combinations. Since each theta can be any value between 0 and 2 pi, we use an integral
$$ \frac{1}{(2\pi)^n} \int_{0}^{2\pi} \dots \int_{0}^{2\pi} \sqrt{(\sum_{k=1}^n cos(\theta_k))^2 + (\sum_{k=1}^n sin(\theta_k))^2} d\theta_1 \dots d\theta_n $$
Solve that and you get your average distance for any n