I don’t understand the distinction. If at flip n H and T are equal so far, then you have satisfied your condition. If instead at that same flip you somehow discover that they did equal at some previous flip, then back when that previous flip was the current one you’re back in the position of the previous sentence.
I didn’t miss it, I just don’t see what difference that makes. See my previous post.
No. No-one’s saying the probability of any flip or combination of flips is changing. We’re simply looking at the odds of a certain outcome.
It matters if you’re coding. Iamu wants to write a program that flips a coin a lot of times. How much is a lot? Enough that there’s a 90% probability that it had even heads and tails at some point.
Let me look at the numbers again.
After two flips there’s a 50% chance the condition will be satisfied (2/4); after 4 it is 37.5% (6/16). But of the 10 non-compliant outcomes at the 4-flip stage 4 did have even H/T back at the 2-flip stage, for a total of 10/16 or 62.5%.
Is that what we’re looking for here? A fifth flip won’t change the odds at all but a sixth one will presumably even-up some more of the non-compliant flip sequences without reducing the existing successes, so indeed the odds do mount up if I’m understanding the question correctly now.
The next thing I don’t understand is, what does this have to do with the article referenced re the Egg? As I read it it’s all about remembering the hits and not the misses, a classic pseudoscience strategy.
I disagree. This statement is the gambler’s fallacy redux. It is the basis on which many suckers chase bad bets with good money.
The idea is, I’ve seen more losses than wins than is statistically expected, so now I must conclude that there will be more wins than losses. That is incorrect logic. I used to point out that it is likely that those extra wins were realized in an amazing streak just before you walked up to the table, and the excessive losses you experience are simply the “evening out” phenomenon you are hoping for, only it’s going against you.
But then I was explained the most important statistical tidbit in reference to such a proposition. It was actually stated explicitly in this thread:
That, in a nutshell, kills pretty much any chance of ever getting to an even number of heads and tails as you increase the number of trials.
10 flips: 6 H, 4 T (60%-40%, with 2 more heads than tails)
100 flips: 57 H, 43 T (57%-43%, but now with 14 more heads than tails)
1000 flips: 536 H, 464 T (53.6%-46.4%, but now with 72 more heads than tails)
At this point, what is the likelihood that you’ll get enough “extra” heads to even out the 72 “extra” tail disparity? Pretty slim, if any.
I’m a bit surprised by this thread. Clearly I’m missing something, but I would think this fact, so succinctly put by aahala, would end the discussion with a “no such evening out will ever be likely, much less 90% likely.”
Unless the answer is some very small number, like say 2 or 4 trials, what am I missing?
Nope. It’s a theorem in the study of random walks.
Suppose you have a sequence of random variables X[sub]0[/sub], X[sub]1[/sub], X[sub]2[/sub], … with X[sub]0[/sub] = 0 and X[sub]i + 1[/sub] = X[sub]i[/sub] + 1 (with equal probability for the two events).
Let E[sub]n[/sub] be the event that some value in the finite subsequence X[sub]1[/sub], …, X[sub]n[/sub] is equal to 0. As n increases without bound, P(E[sub]n[/sub]) converges to 1.
That’s not the gambler’s fallacy, but I can see where you might get confused.
It’s great to be cited even if your claim of my statement was not mine.
Mike and Freddy nailed the original question.
My aside was simply to point out the longer one goes without a match, the more difficult it becomes to reach eveness because a longer run for the lesser of heads or tails will likely be required. The “incremental” odds decrease with ever greater flips but the accumulated probability from the starting point to n do increase as n does.
I fully accept Freddy’s statement .9 can be reached… I can’t verify his “n” is correct but I strongly believe it is, given the nature of his post.
To aid in discussion, here’s some output from a quick simulation. First some numbers, then some graphs.
This table shows the probability of having returned to zero at least once by some number of flips. (For odd N>1, the answer is the same as for N-1.)
Num Prob
2 0.500
4 0.625
6 0.688
8 0.727
10 0.755
...
62 0.899
64 0.901 (*)
66 0.902
...
The answer to the OP, then: 64.
Two graphs to looks at (with a red line drawn on each at 90%) :
The probability versus number of flips, out to N=1e5. (Note the logarithmic x-axis.)
The same thing zoomed in on the 90% crossover region. (Linear x-axis here.)
I haven’t read all of the posts and someone else might have already pointed this out. If so, I’m sorry.
I agree with you. There is no reason why the number of heads should ever exactly equal the number of tails. As a matter of simple fact, the difference between them gets bigger and bigger and their ratio approaches 50-50 as the number of tosses increases without limit.
Iamu should correct me if I’m wrong, but the OP asks a question identical to the following:
You are about to flip a coin N times (but you haven’t started yet!). How big an N must you choose in order to give yourself a 90% chance of having equal heads and tails at some point.
This is in contrast to any question involving a situation where you’re partway through some particular sequence and you want to know when you might get back to equality.
This may or may not have anything to do with any confusion that may or may not be present in this thread.
The odds of this happening on any particular flip n decreases as n increases. But we’re interested in the odds of this happening at flip n or earlier. This probability must increase with increasing n (this part is trivial), and, in fact, increases to 1 as n goes to infinity (this part is less trivial, but can be proven). Since the probability goes to 1 as n goes to infinity, there must be some finite n at which the probability passes 0.9 (as well as a finite n where it passes .99, and one where it passes .99999999999999, etc.).
I think I see where my confusion arose from. Thanks for letting me down gently; I’ve been making a fool of myself in GQ lately. That’s never fun.