A disc inside a square with a sequence of uniform random vectors

108 Views Asked by At

I passed my probability exam this morning, there was a question that I didn't solve it completely! I have been thinking about it for two hours after the exam but I don't know how it could be solved.

Consider:

$*$ A square $S = [0,1] \times [0,1]$

$*$ A disc $D$ of radius $1/2$, centered in $(1/2,1/2)$.

$*$ A sequence $X_1, \dots, X_n, \dots$ of a random vector of $\mathbb{R}^2$ independent and identical from the uniform distribution in the square $S$.

Clarify how it is possible to approximate $\pi$ using the the number of points $X_n$ fall inside the disc $D$, then use the central limit theorem to calculate the minimum number of samples needed so that the probability of deviating from $\pi$ by more than $0.01$ is less than $0.1 \%$

The only thing I wrote: "We are using here the Box-Muller method for sampling" but I don't know how this could be helpful for approximating $\pi$.

1

There are 1 best solutions below

2
On

The ratio of the surface of the disc to the surface of the square is: $S=\frac{\pi\times 0.25}{1}=\frac{\pi}{4} \hspace{.2cm} \Leftrightarrow \pi = 4S$. As the points are uniformly distributed:

1) the variable $X_n$ is binomial: $X_n \sim B(n,S)$.$ \Rightarrow$ By the Central Limit Theorem $\frac{X_n-nS}{\sqrt{nS(1-S)}} \overset{D}{\rightarrow} N(0, 1).$(1)

$\frac{X_n-nS}{\sqrt{nS(1-S)}} = \frac{\frac{X_n}{n}-\frac{\pi}{4}}{\sqrt{\pi(4-\pi)}}4\sqrt{n} =:Z_n.$ (2)

2) Observe the Bernoulli variable $Y_n = \begin{cases} 1 & \text{n-th observation is inside the disc}\\ 0 & \text{otherwise}. \end{cases}$

$E(Y_n) = S \wedge \sum_{i = 1}^n \frac{Y_i}{n} = \frac{X_n}{n}$.

By the Law of Large Numbers empirical means converge to the theoretical expected value with growing number of observations. $\Rightarrow \sum_{i = 1}^n \frac{Y_i}{n} = \frac{X_n}{n} \overset{n \rightarrow \infty}{\rightarrow} S \Rightarrow\hat{\pi} = \frac{4X_n}{n}.$

$P\Big(\Big|\frac{4X_n}{n}-\pi\Big| > 0.01\Big) < 0.1 \Leftrightarrow P\Big(\Big|\frac{4X_n}{n}-\pi\Big| \leq 0.01\Big) > 0.9.$

$P\Big(\Big|\frac{4X_n}{n}-\pi\Big| \leq 0.01\Big) = P\Big(\Big|\frac{X_n}{n}-\frac{\pi}{4}\Big| \leq 0.0025\Big) = P\Big(-0.0025 \leq\frac{X_n}{n}-\frac{\pi}{4} \leq 0.0025\Big)\overset{(2)}=P\Big(-0.0025\frac{4\sqrt{n}}{\sqrt{\pi(4-\pi)}}\leq Z_n \leq 0.0025\frac{4\sqrt{n}}{\sqrt{\pi(4-\pi)}}\Big)=P\Big(-0.01\frac{\sqrt{n}}{\sqrt{\pi(4-\pi)}}\leq Z_n \leq 0.01\frac{\sqrt{n}}{\sqrt{\pi(4-\pi)}}\Big).$

$(1) \Rightarrow P\Big(-0.01\frac{\sqrt{n}}{\sqrt{\pi(4-\pi)}}\leq Z_n \leq 0.01\frac{\sqrt{n}}{\sqrt{\pi(4-\pi)}}\Big) > 0.9 \Leftrightarrow \Phi\Big(0.01\frac{\sqrt{n}}{\sqrt{\pi(4-\pi)}}\Big) - \Phi\Big(-0.01\frac{\sqrt{n}}{\sqrt{\pi(4-\pi)}}\Big) > 0.9 \Leftrightarrow \Phi\Big(0.01\frac{\sqrt{n}}{\sqrt{\pi(4-\pi)}}\Big) > 0.95 \Leftrightarrow 0.01\frac{\sqrt{n}}{\sqrt{\pi(4-\pi)}} > \Phi^{-1}(0.95) \approx 1.645 \Leftrightarrow n > 164.5^2 \pi(4-\pi) = 72975.17.$