I have a circle centred at $(0,0)$ with radius $r$ and I have $2$ random points $P$ and $Q$ on the circumference of the circle. If $d$ is the distance between $P$ and $Q$, what is the variance of $d$?
My solution: I have taken $P$ with coordinates $(x_1,y_2)$ and $Q$ with coordinates $(x_2,y_2)$
$d=2r \sin(\frac{\theta}{2})$ as it is the equation of chord length.
I have the joint pdf of $x$ and $y$ as :
$f(x,y)=\frac{1}{\pi r^2}$ if $(x,y)$ is on the circle.
$f(x,y)=0$ otherwise.
Will the intergal of $xf(x,y)$ with respect to $x$ and $y$ , give me the expected value of $d$?
That’s not a proper probability density function; it’s only defined on a set of measure zero, and its integral is zero.
You can use the fact that the angle $\theta$ is uniformly distributed, so the expected chord length is
$$ \left\langle d\right\rangle=\frac1{2\pi}\int_0^{2\pi}2r\sin\frac\theta2\mathrm d\theta=\frac{2r}\pi\left[-\cos\frac\theta2\right]_0^{2\pi}=\frac4\pi r\;. $$
and the expected value of its square is
$$ \left\langle d^2\right\rangle=\frac1{2\pi}\int_0^{2\pi}\left(2r\sin\frac\theta2\right)^2\mathrm d\theta=2r^2\;, $$
so the variance is
$$ \operatorname{Var} d=\left\langle d^2\right\rangle-\left\langle d\right\rangle^2=2r^2-\left(\frac4\pi r\right)^2=\left(2-\left(\frac4\pi\right)^2\right)r^2\approx0.379r^2\;. $$