Talk:Constrained random points on a circle: Difference between revisions
Content added Content deleted
(→Uniform distribution: Subtle errors are possible) |
m (sign my previous comment) |
||
Line 103: | Line 103: | ||
</pre> |
</pre> |
||
Here you can see that the number of points near top/bottom is greater than that for left/right sides of the plot. For this particular case, the simplest way to check for the bias is to count the number of points where abs(y) > abs(x) (this effectively partitions the plot using 45 degree lines) -- for my "bad" code I see a ratio (over multiple runs) of 54:46 in favor of the top/bottom quadrants over left/right. Counted another way, 79% of random seeds result in a plot with more top/bottom points than left/right. |
Here you can see that the number of points near top/bottom is greater than that for left/right sides of the plot. For this particular case, the simplest way to check for the bias is to count the number of points where abs(y) > abs(x) (this effectively partitions the plot using 45 degree lines) -- for my "bad" code I see a ratio (over multiple runs) of 54:46 in favor of the top/bottom quadrants over left/right. Counted another way, 79% of random seeds result in a plot with more top/bottom points than left/right. -[[User:Davewhipp|Dave]] |
||
: An example of a more subtle error is to pick the random point using a polar coordinate system (i.e., using a random distance over the given range and a random angle). The problem is that the distribution of random points is not even w.r.t. area when picked that way; points that are closer in will be more tightly packed. It becomes much more noticeable with a wider annulus. –[[User:Dkf|Donal Fellows]] 15:07, 3 September 2010 (UTC) |
: An example of a more subtle error is to pick the random point using a polar coordinate system (i.e., using a random distance over the given range and a random angle). The problem is that the distribution of random points is not even w.r.t. area when picked that way; points that are closer in will be more tightly packed. It becomes much more noticeable with a wider annulus. –[[User:Dkf|Donal Fellows]] 15:07, 3 September 2010 (UTC) |