I want to calculate the value of √2 but using any common probability distribution, preferably based on Bernoulli Trials.
I will perform a test in real and observe the output of the test and the output of this test should lead me to the value of √2 like as we can compute the value of π using Buffon's needle test
eg. I used a fair coin, performed many trials, observed the output, calculate PDF using this output, this output is equal to √2
I am new to Probability and ML so please keep it to the simplest and based on very common distributions.
Let $U_i \stackrel{\text{i.i.d.}}{\sim} \text{Uniform(1, 2)}$. I chose 1 and 2 to be the limits, because we know the square root of 2 is in [1,2]. Then compute $$\hat{x}_n=1 + \frac{1}{n}\sum_{i=1}^n \mathbf{1}(U_i^2 \le 2),$$ where $\mathbf{1}(U^2\le 2)$ is equal to $1$ if $U^2 \le 2$, and $0$ otherwise. I assume we can compute the squares of numbers, even if we don't have a routine for computing square roots. Then I take $\hat{x}$ to be an estimate of $\sqrt{2}$.
Why is $\hat{x}_n$ a good estimate? Well, the expected value of $\hat{x}_n$ is equal to $$1 + \int_1^2 \mathbf{1}(U_1^2 \le 2)\,dx = 1 + \int_1^\sqrt{2}\,dx = \sqrt{2}.$$ In fact, by the strong law of large numbers, $\hat{x}_n$ converges to its expectation, which is $\sqrt{2}$, as $n\to\infty$.