Let's say I have a function simulate()
that returns True
with some probability $p$ and False otherwise.
After calling simulate()
$N$ times, I get True
$x$ times and False
$N - x$ times. I then compute $p' = \frac{x}{N}$. How do I measure my error on $p'$? My ultimate goal is to figure out whether $p > 0.5$ for my simulate()
function, and I want to know how many trials I have to conduct to be confident in my result.