# Probability that every polygon contains almost exactly the expected number of samples

Let's uniformly sample $$n$$ times from the unit square. Define a polygon contained within the unit square with area $$A$$. Surely as $$n \to \infty$$, the probability that the polygon contains at least $$\lfloor{nA}\rfloor$$ samples and at most $$\lceil{nA}\rceil$$ samples tends to 1. What I'm interested in is if there are $$m$$ polygons, $$m = kn$$, where the polygons may overlap arbitrarily, does the probability that every polygon has at least $$\lfloor{nA_i}\rfloor$$ and at most $$\lceil{nA_i}\rceil$$ samples tend to 1 as well?

• Assuming $n\ge 0$ and $A \ge 0$, you will have $\lfloor{nA}\rfloor\ge 0$ so you do not need $\max(0,...)$ Dec 3, 2023 at 12:53
• It is more usual to write $m |n$ rather than $n|m$ to indicate $n$ is a multiple of $m$. Dec 3, 2023 at 13:00
• Actually I meant $m$ is a multiple of $n$
– user1261526
Dec 3, 2023 at 13:11
• Oh yeah thanks. I removed the $max(0, ...)$
– user1261526
Dec 3, 2023 at 13:12
• If $m$ is a multiple of $n$, what is increasing? Is $n$ fixed and $m$ increasing? Or $m=kn$ so they are increasing together with a fixed multiple? Or something else? Do the new polygons overlap or are they getting smaller? Dec 3, 2023 at 13:16

Surely as $$n \to \infty$$, the probability that the polygon contains at least $$\max(0, \lfloor{nA}\rfloor)$$ samples and at most $$\lceil{nA}\rceil$$ samples tends to $$1$$

is incorrect. It would be correct to say that the number contained in the polygon divided by $$n$$ converges towards $$A$$ in a law-of-large-numbers sense, but that is not saying the same thing. Flip a fair coin $$1$$ million times, and the proportion of heads will probably be close to $$\frac12$$ but the probability you see exactly $$500\,000$$ heads is about $$0.0008$$.

The number sampled in the polygon has a binomial distribution with parameters $$n$$ and $$A$$, so expectation $$nA$$ and variance $$nA(1-A)$$ which is increasing with $$n$$. The probability that the numbered sampled in the polygon is somewhere from $$\lfloor{nA}\rfloor$$ through to $$\lceil{nA}\rceil$$ converges to $$0$$ as $$n$$ increases.

With $$m$$ polygons, the probability is of course lower that they are all in this interval than that one specific one is.

• Ah yes. I have a follow up question which I'll ask as part of a separate Question. Thank you!
– user1261526
Dec 3, 2023 at 13:18
• Hi Henry, my follow up question is: math.stackexchange.com/questions/4819343/…
– user1261526
Dec 3, 2023 at 14:24
• Your next question (with a wider band, but still of fixed size) is going to face the same issue as this one: for any $A$ with positive area and any $d>0$, the probability the number sampled in $A$ being in $[nA-d,nA+d]$ will converge to $0$ in the same sense. You need something like $[n(A-d),n(A+d)]$ for convergence to $1$ Dec 3, 2023 at 16:23
• Hi Henry, actually $d$ was expressed as a function of $n$ and $A$. Would you be so kind as to take a look at math.stackexchange.com/questions/4820616/… please? This is the last question in this chain of questions I have, with it being the least abstract
– user1261526
Dec 5, 2023 at 10:53