I would like to find out what is the expected average number of circles on top of a pixel (a small area) after placing n points in a rectangular area of A by B. The x and y values are uniformly distributed in (0,A) and (0,B).
My educated guess is that this value is n/A/B.
I wrote a MATLAB program to check this and it seems to approach that value:
width = 100;
radius = 10;
A = zeros(width,width);
num = 1e6;
for n = 1:num
r = randi((1 width),1,2);
for a = 1:width
for b = 1:width
if ((a-r(1))^2 + (b-r(2))^2) < radius^2
A(a,b) = A(a,b) + 1;
end
end
end
end
surf(A)
actual_density = num/width/width
calc_density = A(width/2,width/2)/(pi*radius^2)
Is there a known proof for this?
I would like to figure the question out on my own and would appreciate any hints, such as a particular probability distribution I should be using or other related examples (in 1D maybe?).
Thank you