Will this procedure generate random points uniformly distributed within a given circle? Proof?
Solution 1:
Yes this will work; it's called rejection sampling.
Even better is to generate a point in polar coordinates though: pick θ from [0, 2π) and r2 from [0, R2] (ie. multiply R by the square-root of a random number in [0, 1] - without the square-root it is non-uniform).
Solution 2:
I'm not saying that your method is the simplest one to obtain uniformly distributed sample points in the disk $D$ of radius $r>0$, but it is certainly correct.
Let $Q:=[{-r},r]^2$ and assume that the points generated in step 1. of your procedure are uniformly distributed in $Q$. For any set $A\subset Q$ denote by $|A|$ the area of $A$ and by $P(A)$ the probability that a sample point $p$ falls on the set $A$. Then one has the well known formula about switching conditionals: $$P(A\,|\,D)={P(A)\>P(D\,|\,A)\over P(D)}\ .$$ Now when $A\subset D$ then $P(D\,|\,A)=1$, and by assumption $$P(A)={|A|\over|Q|},\quad P(D)={|D|\over|Q|}\ .$$ It follows that $$P(A\,|\,D)={|A|\over|D|}\qquad\forall \> A\subset D\ ,$$ as it should be.