Monte Carlo sampling a binomial expansion

284 Views Asked by At

I want to figure out the following question

$$ 1 = (10 - 9)^{100} = 10^{100}-100 \times 10^{99} \ 9 + \frac{100 \times 99}{2} 10^{98} \ 9^{2} - \frac{100 \times 99 \times 98 }{3}10^{97} 9^{3} \pm...$$

is there any suggestion how to sample this expansion using Monte Carlo.

1

There are 1 best solutions below

2
On

Are you trying to sample the individual terms in the series? In other words, each term in the expansion looks like $(-1)^k\binom{100}{k}(10)^{n-k}(9)^k$ where you can temporarly drop the $(-1)^k$ to see that sampling a binomial distribution with $n=100$ and probability coefficient $p=10/19$ will give you want you want:

$$P(B(n,p)=k)=\binom{100}{k}p^k(1-p)^{n-k}$$

so

$$(-1)^k\binom{100}{k}(10)^{n-k}(9)^k=(-1)^k\cdot 19^n\cdot P(B(n,p)=k)$$

In other words, flip $n=100$ biased coins of probability $p=10/19$ and then count the number of heads that appear. Repeat over and over to get an approximation of the binomial distribution.