# MLE of the unknown radius

Consider this question,

Suppose that $$(X_1, Y_1),(X_2, Y_2), . . . ,(X_n, Y_n)$$ are the coordinates of $$n$$ points chosen independently and uniformly at random within a circle with center $$(0, 0)$$ and unknown radius $$r$$. Obtain the MLE $$\hat{r}_n$$ of $$r$$.

My attempt:

I have thought about the question but I am not able to put it formally. This is my reasoning. $$X_i$$ and $$Y_i$$ are both $$uniformly$$ $$distributed$$ independent random variables on a circle of radius $$r$$ and center at $$(0,0)$$. Since $$(X_i, Y_i)$$ are the coordinates of the $$i^\text{th}$$ point, transforming these coordinates to polar coordinates we get for the $$i^\text{th}$$ point $$(\theta_i,a_i)$$ (say) where $$\theta_i$$ follows $$Uniform(0,2\pi)$$ and $$a_i$$ follows $$Uniform(0,r)$$ independently. Then $$a_{(n)} = max(a_i)$$ is the MLE of $$r$$.

Is this reasoning correct? How do I put it formally? And if not, how should this problem be solved?

## 1 Answer

Uniform sampling over geometric shapes: With these kinds of problems, where your sample points are uniformly distributed over some fixed geometric shape, it is almost always easiest to proceed by first deriving the distribution function for the relevant quantity of interest. This is quite simple because the probability of falling within any subset of the overall sampling space is equal to the proportion that this subset takes up in the total area/volume of the total sampling space.

This question is substantially simplified if we recognise that the points give information about the radius $$r$$ only through their distance from the centre (i.e., the zero point). Let $$R_1,R_2,R_3,...$$ be these distance values corresponding to each of the points and let $$A(r) = \pi \cdot r^2$$ be the area of a circle with radius $$r$$. Since each sample point is uniform in the circle we must have:

$$\mathbb{P}(R_i \leq t) = \frac{A(t)}{A(r)} = \frac{\pi \cdot t^2}{\pi \cdot r^2} = \Big( \frac{t}{r} \Big)^2 \quad \quad \quad \text{for all } 0 \leq t \leq r.$$

This gives the corresponding sample density $$p_r(t) = 2t/r^2$$ over the support $$0 \leq t \leq r$$. As you can see, this sampling density is not uniform over the support. This is actually unsurprising --- the probability density for the distance $$R_i$$ is proportional to the circumference of a circle with radius equal to that distance.

The maximum likelihood estimator: The likelihood function for $$n$$ observed data points is:

$$L_\mathbf{r}(r) = \prod_{i=1}^n p_r(r_i) \propto \frac{1}{r^{2n}} \cdot \mathbb{I}(r \geq r_{(n)}).$$

We can see that the likelihood function is strictly decreasing in $$r$$, so the maximum likelihood estimator (MLE) occurs at the boundary point $$\hat{r}_n = r_{(n)}$$. That is, the MLE for the true radius is the maximum of the lengths from the zero point to the sample points. Since the true parameter $$r$$ is at least as large as the MLE, the MLE is biased, and will tend to underestimate the true radius. Specifically, we have:

\begin{aligned} \mathbb{E}(\hat{R}_n) = \mathbb{E}(R_{(n)}) &= \int \limits_0^r \mathbb{P}(R_{(n)} > t) \ dt \\[6pt] &= \int \limits_0^r (1 - \mathbb{P}(R_{(n)} \leq t)) \ dt \\[6pt] &= \int \limits_0^r \Big( 1 - \frac{t^{2n}}{r^{2n}} \Big) \ dt \\[6pt] &= \Bigg[ t - \frac{1}{2n+1} \cdot \frac{t^{2n+1}}{r^{2n}} \Bigg]_{t=0}^{t=r} \\[6pt] &= r \Big( 1 - \frac{1}{2n+1} \Big) \\[6pt] &= \frac{2n}{2n+1} \cdot r. \\[6pt] \end{aligned}

Thus, a bias-corrected scaled version of the MLE is:

$$\tilde{r}_n = \frac{2n+1}{2n} \cdot r_{(n)}.$$

Incidentally, this process can easily be extended to a hypersphere in higher dimensions. In each case the MLE is the maximum distance from the zero point. For a hypershere in $$k$$ dimensions, the bias-corrected scaled MLE is:

$$\tilde{r}_n = \frac{kn+1}{kn} \cdot r_{(n)}.$$