Calculating an area by using Monte Carlo method

219 Views Asked by At

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"?

2

There are 2 best solutions below

0
On BEST ANSWER

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}$.

0
On

I think you are over-complicating the problem. Let $x_k$ be a point chosen at random in $C$. Let $a_k$ be a random variable defined by $a_k=1$ if $x_k$ in $A$ and $0$ otherwise. Then $E(a_k)=\frac{P(A)}{P(C)}$. Using th law of large numbers $\frac{\sum\limits_1^N a_k}{N}\to \frac{P(A)}{P(C)}$.