Calculating an area by using Monte Carlo method Let B and C be regions in $\mathbb{R}^2$ such that $ B \subset C $. Let's denote their areas $ A(B) \ \mathrm{and} \ A(C)$. We know $A(C)$ but not $A(B)$. We want to find out that area. We know that $$ \mathbb{P}\left(\left(x{,}\ y\right)\in B \mid (x, y) \in C\right)=\frac{A\left(B\right)}{A\left(C\right)}.$$
We select randomly N points in C and notice that $n_i $ of those are in B. We repeat this M times. Mean of those points in B is therefore $$ \sum_{i=1}^M\frac{n_i}{M}.$$
By law of large numbers we know that $$ \lim_{M\rightarrow\infty}\sum_{i=1}^M\frac{n_i}{M}=\mathbb{E}\left(n_i\right)\ .$$
Let's divide the equation by the number of randomly chosen points N:
$$ \lim_{M\rightarrow\infty}\sum_{i=1}^M\frac{n_i}{MN}=\frac{\mathbb{E}\left(n_i\right)\ }{N}$$
Now I am having trouble to show that $$\frac{\mathbb{E}\left(n_i\right)\ }{N}=\mathbb{P}\left(\left(x{,}\ y\right)\in B \mid (x, y) \in C\right)=\frac{A\left(B\right)}{A\left(C\right)} .$$
By the whole idea of Monte Carlo Simulation that should be true, right?
Here is how far I got:
$$ \frac{\mathbb{E}\left(n_i\right)}{N}=\frac{1}{N}\sum_{i=0}^Ni\cdot\left(\frac{A\left(B\right)}{A\left(C\right)}\right)^i\cdot\left(1-\frac{A\left(B\right)}{A\left(C\right)}\right)^{N-i},$$
where $$ \mathbb{P} (n_i=i)=\left(\frac{A\left(B\right)}{A\left(C\right)}\right)^i\cdot \left(1-\frac{A\left(B\right)}{A\left(C\right)}\right)^{N-i}.$$
Could someone help me complete the "proof"?

From the Binomial Theorem $$(a+b)^N=\sum_{i=0}^N{N \choose k}a^ib^{N-i}$$ Differentiate both sides with respect to $a$ and get $$N(a+b)^{N-1}=\sum_{i=0}^N{N \choose i}ia^{i-1}b^{N-i}$$ Multiply both sides of the previous equation by $a$ and get $$Na(a+b)^{N-1}=\sum_{i=0}^N{N \choose i}a^ib^{N-i}$$ Replacing $a$ with $\frac{A(B)}{A(C)}$ and $b$ with $1-\frac{A(B)}{A(C)}$ gives us $$\frac{NA(B)}{A(C)}=\sum_{i=0}^N{N \choose i}\bigg(\frac{A(B)}{A(C)}\bigg)^i\bigg(1-\frac{A(B)}{A(C)}\bigg)^{N-i}$$ Dividing both sides by $N$ yields your desired expression for $\frac{\mathbb{E}(n_i)}{N}$.
