Volkl said:
The logic here does not require a computer. The point is that there is a higher probability that smaller sets of like numbers occur than larger sets of like numbers, so there is a tendency for the next value to oppose the previous string of like values.
Baye's Theorem (conditional probability) solves this one.
The chances of red (R) and black (B) are the same, so
P(R) = P(B) = 0.5
The same goes for any string of reds or blacks, with probability
P(nR) = P(nB) = \frac{1}{2^n}
You want the probability of the (n+1)th result being black given that the previous n results were all black, which is
P((n+1)=B|\sum_{i=1}^{n} (i = B)) = \frac{P(\sum_{i=1}^{n} (i = B)|(n+1)=B)P(B)}{P(\sum_{i=1}^{n} (i = B)|(n+1)=B)P(B)+P(\sum_{i=1}^{n} (i = B)|(n+1)=R)P(R)}
or in words, "the probability that the next one is black, given that the previous n were black, is equal to
the probability that the previous were black given that the next is black,
multiplied by the probability of any being black
divided by
the probability that the previous were all black given the next is black plus the probability that the previous were all red given the next is red."
This simplifies, since as per the first equation, the probability on any given try is the same for red and black. Also, the probability of n reds is the same as the probability for n blacks.
What you end up with is
P((n+1)=B|\sum_{i=1}^{n} (i = B))) = 0.5
as everyone else in this thread has already told you.
Where you're getting confused is in the text I quoted above - it's true that you're less likely to find the string of (n+1) black than you are to find the (n) black within a larger string, but just because you've found the (n) it doesn't mean that *this time* the next one will be the longer string. Equally so, it doesn't mean that this time it will be the shorter one.
Formally, your confusion is ascribing some forcing on the part of
http://en.wikipedia.org/wiki/Regression_toward_the_mean#Other_statistical_phenomenon". That is a result of the unlikeliness of having a long string, not the cause.