logoalt Hacker News

lupireyesterday at 2:29 PM5 repliesview on HN

"Three points are chosen independently and uniformly at random from the interior of a unit circle. "

The distribution is under specified

Is it "uniformly" over area, even though it's not an area problem? That is, is it independent random coordinates (x, y) in rectangular coordinate space, or (r, theta) polar space, or in some other parameterization?


Replies

dahartyesterday at 3:38 PM

The rest of the article answers that question. The followup article answers it more directly, and compares polar to rectangular. https://blog.szczepan.org/blog/monte-carlo/

Short answer: yes it’s uniform in area. In the absence of the specificity you want, area makes the most sense, right? Uniformly sampling independent Cartesian variables yields uniform sampling in area, unlike polar where a uniform sampling of the independent variables gives you a non-uniform sampling of area.

I don’t understand what you mean about it not being an area problem, but I guess at some level this actually is an area problem. I’ll speculate wildly there might be a way to transform the question/setup into a different but equivalent problem that can be directly visualized as solving for area, and perhaps have a more intuitive solution that involves fewer determinants of Jacobians. Maybe, maybe not, I dunno.

voidmainyesterday at 4:24 PM

I think this is reasonably precise. "Uniformly" means that all points within the unit circle are equally likely. You can sample this distribution by picking independent rectangular coordinates and rejecting points outside the unit circle. I'm sure you can sample it in polar space by using an appropriate nonuniform distribution for radius (because a uniform radius would not result in a uniform distribution over points in the unit circle). If you want to sample directly in some really weird parameterization I guess markov chain monte carlo methods are available.

masfuerteyesterday at 3:31 PM

If you choose uniformly from a set then all possible selections are equally likely, by definition. The set is the interior of a circle, which is an area. There's no ambiguity.

bmachoyesterday at 5:50 PM

"Uniform" means uniform in area in these contexts. It's precise.

robotpepiyesterday at 3:30 PM

it seems to me that the answer is clear: you take the uniform probability measure on the unit disc.