2 ms·
The article is not about the (trivial) way to compute pi by putting random numbers in the square. It's about altering the way you compute your target function t
by nine_k 8y ago
The article is not about the (trivial) way to compute pi by putting random numbers in the square. It's about altering the way you compute your target function to narrow down the confidence intervals, while still computing the same value.
Definitely you can compute pi by scanning a uniform grid in a square and checking how much ends up in the quarter-circle. But with these stats tricks applied, mere 10k points give the author very good approximation, beating 22/7 30% of the time. Scanning a 100x100 grid will give a much coarser approximation, I suppose.