I have a $D$ probability distribution over $X =R^d$, i have two samples $s\_1$ and $s\_2$ from $D$, each having size $m\_1$, $m\_2$, a unit ball centered at origin $B(0)$, defined by $B(0)=\{x \in R^2: \|x\|\_2 \leqslant 1\}$, How large is enough for $m$ to be, so that we can make sure that with probability at least $\epsilon$ we have $m \leqslant \delta$? any hints?



How large sample $m$ is enough
$\newcommand\ep\epsilon\newcommand\de\delta\newcommand\bar\overline$We have $(n\_1-n\_2)m=S\_m:=Z\_1+\cdots+Z\_m$, where $Z\_i:=X\_i-Y\_i$, and $X\_1,\dots,X\_m,Y\_1,\dots,Y\_m$ are iid Bernoulli random variables (r.v.'s) with parameter $p:=D(B(0))$ -- the probability for a sample item from distribution $D$ to be in $B(0)$. So, the $Z\_i$'s are iid r.v.'s with $EZ\_i=0$ and $Var\,Z\_i=2pq$, where $q:=1-p$. So, by the central limit theorem,
$$\de=P(|n\_1-n\_2|>\ep)=P(|S\_m|>\ep m)\approx2\bar\Phi\Big(\frac{\ep m}{\sqrt{2pqm}}\Big)=2\bar\Phi\Big(\ep\sqrt{\frac m{2pq}}\Big),$$
where $\bar\Phi:=1-\Phi$ and $\Phi$ is the standard normal cdf.


Solving this for $m$, we get
$$m\approx\frac{2pq}{\ep^2}\,\bar\Phi^{-1}(\de/2)^2.$$


**Details in response to OP's comments:**


1. We deal with $Z\_i:=X\_i-Y\_i$ because, as stated above, $(n\_1-n\_2)m=Z\_1+\cdots+Z\_m$.
2. $Var\,Z\_i=Var\,X\_i+Var(-Y\_i)=Var\,X\_i+(-1)^2Var\,Y\_i=Var\,X\_i+Var\,Y\_i=pq+pq=2pq$.
3. $$\de\approx2\bar\Phi\Big(\ep\sqrt{\frac m{2pq}}\Big) \iff \bar\Phi\Big(\ep\sqrt{\frac m{2pq}}\Big)\approx\de/2 \iff 
\ep\sqrt{\frac m{2pq}}\approx\bar\Phi^{-1}(\de/2)\iff
m\approx\frac{2pq}{\ep^2}\,\bar\Phi^{-1}(\de/2)^2.$$


