The wrong way of finding the average distance between two points on a circle I was trying to find the average distance between two points on a circle and got the following result. 
Why is my method wrong?
 A: Your method is wrong because the distribution of possible $x$ and $y$-values isn't uniform ($x$-values close to $\pm r$ are more common than values close to $0$, and $y$-values close to $0$ and $2r$ are more common than values close to $r$). I would personally suggest you use trigonometry and the angle $\angle P_1OP_2$ instead, as that angle is indeed uniformly distributed.
A: Let $P_1$ be fixed while $P_2$ moves around a circle. The distance between these points is:
$$s=2R\sin{\alpha \over 2}$$
...where $\alpha$ represents the central angle corresponding to points $P_1,P_2$
Because of symmetry we can check only one half of the circle to calculate the average distance:
$$d=\frac{\int sdl}{\int dl}$$
$$d=\frac{\int_0^\pi 2R\sin\frac\alpha2\cdot Rd\alpha}{R\pi}$$
$$d=\frac{-4R^2cos\frac\alpha2|_0^\pi}{R\pi}=\frac{4R}{\pi}$$
A: Your $P_1 P_2$ value is correct but you are integrating over y whereas you have to integrate it over the arc between y = 0 and 2r. So the best way is to do it in polar coordinates.
Coordinates of a point on the circle is $(r\sin2\alpha, r - r\cos2\alpha)$ where $\alpha$ is the angle between x-axis and line $P_1P_2$.
Sum of all lines from the origin to the points on circle till $y = 2r$ is
= $r\sqrt2 \int_0^{\pi/2} \sqrt{1-\cos2\alpha} \space d\alpha$, using $P_1P_2 = \sqrt{2ry}$ as per your work.
= $r\sqrt2 \int_0^{\pi/2} \sqrt2 \sin\alpha\space d\alpha = 2r[-cos\alpha]_0^{\pi/2} = 2r$
This is over angle $\pi/2$. So the average length of $P_1P_2 = \dfrac{4r}{\pi}$
