Finding expected value from expectation of squared distance This problem is actually a part of a much larger biology problem that I am working on. However, I will leave out the unrelated parts.
Consider a sequence of points $\{(x_j, y_j)\}$ where neighboring points $(x_j, y_j)$ and $(x_{j + 1}, y_{j + 1})$ are connected with edges of length $1$. Furthermore, assume the direction of each edge is random so that the angles which the edges form with the $x$-axis are independent uniformly distributed random variables on $[0, 2\pi)$. I would like to find the square root from the expectation of the squared distance between $(x_0, y_0)$ and $(x_n, y_n)$.
Does anyone know how I might be able to approach this problem? Any help is appreciated.
 A: You don't say how big $n$ is. When $n$ is not very small, the squared distance distribution will be a multiple of $\chi^2_2$.
By the Central Limit Theorem, $(X_n,Y_n)$ will be approximately bivariate Normal with mean zero and covariance matrix $nV$, where $V$ is the covariance matrix of $(X_1, Y_1)$. Since $X_1$ and $Y_1$ are uncorrelated, $(X_n,Y_n)$ are uncorrelated and thus asymptotically independent, so $X_n^2+Y_n^2$ is approximately $n\sigma^2\chi^2_2$, where $\sigma^2/2$ is the trace of $V$. And $V$ has diagonal elements $1/2$ and off-diagonal elements 0, so $\sigma^2=1/2$.
Thus $X_n^2+Y_n^2$ is approximately $(n/2)\chi^2_2$.
Check by simulation in R
n<-10
theta<-matrix(runif(n*10000,0, 2*pi),ncol=n)

deltax<-cos(theta)
deltay<-sin(theta)
x<-rowSums(deltax)
y<-rowSums(deltay)
dist<-2*(x^2+y^2)/n
summary(dist)
summary(rchisq(10000,2))

qqplot(dist, rchisq(10000,2),ylab=expression(chi[2]^2/2))
abline(0,1,col="blue")

For small $n$ (eg $n=5$), the true distribution has a noticeably lighter right tail than the approximating $\chi^2_2$, but the approximation improves as $n$ increases.

