TITLE: Coin flipping probability?
QUESTION [16 upvotes]: Q: flip a coin - how many times should it be flipped until the prob of all tails is $< 0.005$?
Intuitively, I want to just do $0.5\times 0.5\times 0.5...$ until I get an answer $< 0.005$. Would this be the best way to do it to find out how many times I should flip it?

REPLY [31 votes]: That's the right calculation: you want the smallest integer $n$ such that $0.5^n<0.005$. However, there is a potentially quicker way to work this out. Taking logs we get $n\log 0.5<\log 0.005$, so $n>\frac{\log 0.005}{\log 0.5}$ (the inequality reverses sign because $\log 0.5$ is negative), so the answer is $\frac{\log 0.005}{\log 0.5}$ rounded up to the next integer. $\frac{\log 0.005}{\log 0.5}\approx 7.64$, so this gives $n=8$.