The distribution of the x-coordinate on unit circle

1.9k Views Asked by At

I'm trying to determine the distribution of the x-coordinate (uniformly distributed) on the unit circle (density function).

I've seen some threads on this, such as this, where they use the method of the marginal density. I'm wondering why one can't simply use the formula for the density function for a uniformly distributed function $$\frac{1}{b-a}$$ for $x \in \mathrm{[a,b]}$, which would give the result $\frac{1}{1-(-1)} = \frac{1}{2}?$

2

There are 2 best solutions below

2
On

Here is an illustration using simulation of the case in which the points are uniformly distributed within the unit disk.

I generate 50,000 points in the square with vertices at $(-1,-1)$ and $(1,1)$ and discard those outside the circle. Then look at a histogram of the $x$-coordinates of the remaining 39,236 points (within the circle), which gives a pretty good idea what the density function looks like.

Analytically, you can treat the joint distribution of $x$ and $y$ as a uniform distribution on the unit circle and integrate out $y$ to get the marginal distribution on $x$. This should not be a difficult integration problem. (The integrand is a constant; the main information is in the limits of the integrals.)

 B = 50000;  xs = runif(B, -1, 1);  ys = runif(B, -1, 1)
 cond = (xs^2 + ys^2 <= 1);  sum(cond)
 ## 39236
 x = xs[cond]; y = ys[cond]
 par(mfrow=c(1,2))
   plot(xs, ys, pch=".", col="orange")
     points(x, y, pch=".", col="skyblue2")
   hist(x, prob=T, col="skyblue2")
 par(mfrow=c(1,1))

enter image description here

I believe that the problem is a little more difficult if the points are distributed at random on the $circumference$ of the unit circle.

0
On

If you generate the points uniformly on the unit circle, you will get the same distribution as if you generate them uniformly on the upper half circle. The fraction of points in the interval $[a,b]$ will be the fraction of the arc length between $x=a$ and $x=b$. The angle at $x=a$ is $\arccos a$ and at $x=b$ is $\arccos b$, so the fraction in $[a,b]$ is $\frac 1{\pi}|\arccos a - \arccos b|$