CHANCE(ASA)-Demystifying Gambler Fallacy via Transitional Matrix/Markov Matrices part 1

袁晗 | Luo, Yuan Han
6 min readMar 21, 2022
img src: https://www.istockphoto.com/photos/spinning-coin

Not every table can multiply by it self and have meaningful result, you can look at the Markov Matrices as one of those beautiful coincidence in nature or a law that found us.

Let’s face it, some mathematic concepts are complicated because we have to fit it in all those notation! It’s beautiful, but extremely unintuitive where it forces us to abandoned everyday necessary assumptions. So to save you some time, I will periodically sum up articles from American Statistical Association.

The article “The Mathematical Anatomy of the Gambler’s Fallacy” published on CHANCE Vol. 35, №1 is one such article. It’s composed of 1 hard core probability calculation with matrix, which I think is very valuable to learn, and reasons for misunderstanding of such.

Understanding the table

The question at hand is how likely we get 5 tails/heads consecutively if we flip a coin 100 times. Some people would say not likely, hence gambler’s fallacy. Statisticians, however, would say that it’s very likely. Let’s look at the statistician’s claim.

img src: https://chance.amstat.org/2022/02/gamblers-fallacy/

Before we move on, allow me to establish the most obvious rules: each flip has to have the same outcome as the previous flip to move forward, otherwise we start the process all over from the 1st flip. I will use the word “stage” (S_0…S_5) to denote the perspective we are looking at the probabilities from. For example, stage x means the probabilities of getting to other stages from stage x.

img src: https://chance.amstat.org/2022/02/gamblers-fallacy/

The above matrix displays the probabilities of 1 arbitrary flip under our established rule. It’s arbitrary because in practice we can never flip S_1…S_4 in isolation, we have to execute them consecutively.

Each row represents the probabilities of the current stage landing on all other stages. For example at row S_2, the chances of landing on S_3 or S_1 is 50%. Notice that the probabilities of going to S_0,2,4,5 from (row) S_2 is impossible because the definition of 5 consecutive heads/tails does not allow us to skip flips (to S_4,5) or go backwards 1 step (to S_2).

Each column represents the probabilities of other stages landing on the current. For example, the vertical digits in S_1 column represent the probabilities of other stages landing on it: 100% from S_0 and 50% from all others.

I want to bring your focus row 1 column 2 and row 5 column 5 for a minute. Their probabilities is 100% because they are the first and last stages. The 1st stage is also the 1st flip, so it has no outcome to compare with, hence 100%. The last stage is also 100% because landing on it entails all previous 5 flips has the same outcome, hence we are done. This is the part that’s very unnatural. It’s beauty lies in the realm of philosophy and mathematics where if you set a model that has 50% of moving on to the next stage, this next stage (S_5), at least, has to exist.

Start flipping

We will only focus on the 1st row because we are starting from the 1st flip. Starting from any other row will imply we already flipped the 1st coin. Now that we understand the probabilities of 1 single flip, let’s multiply them (P) by itself to symbolize the probabilities after the 1st flip.

The result here is 50% starting over or move forward. Keep in mind that our current perspective now is between the 1st and 2nd flip, we have the outcome of the 1st flip but not 2nd. This is important to understand, because it will explain why stage 1 have a 50% to end up at A_3 even though we clearly stated previously that the coins has to be flipped consecutively. We did not skip the second stage and jump to 3rd, we are looking at the probabilities of the 2nd flip from the perspective of the 1st stage. This also applies to all other perspectives (rows), that’s why you see probabilities at A_3 column from the perspectives of 3rd, 4th, 5th row. They do not represent the probabilities from their starting stage respectively, but from the 1st flip instead. It is a parallel world where we started over instead of moving forward. Let’s see what happens if we multiply P again, aka 3rd flip.

This time the probability of the 3rd column got cut in half and send it over to the 4th column. This also makes sense because moving to A_3 is 50%, and from there to A_4 is also 50%, 50% of 50% is 25%. And remember what I said before, we are not at 1st or even 2nd flip anymore, that’s why we have probability at A_4. we didn’t go backward, it’s an alternate probability that went forward. Let’s keep going.

Even if we can read the table, how is the matrix multiplication give us the probability of x flips? To answer that question, let’s finish all 100 flips first, and come back to that question.

The last flip did not deviate from the known pattern. And if we review the previous few illustrations we will also notice that the last column of each row seems to increase in value with each flip. Will this pattern persist if we increase the flip to 100 times?

The calculation seems to support our hypothesis, and we have no issue with understanding this table, so let’s go back to why does this table works.

Why matrix table?

Let’s refresh the intuition behind matrix multiplication with a table of groceries need to buy (t1) multiply by a table of costs (t2). When we multiple t1 and t2 we get the monthly grocery cost.

Using the example above, instead of multiplying grocery with cost, imagine we are multiplying current probabilities with additional probabilities where t1 = P^x and t2=P. P is like a filter matrix that keeps updating the probabilities of P^x. This should make since because each additional flip is always 50% of current probabilities. Row S_1 will always update the current probabilities with the 2nd flip.

But there is still 1 thing unclear that’s hovering: matrix multiplication includes addition in its final steps, what does that mean?

The reason why we add the probabilities in column is because at every perspectives (row) there are two 25% chances we starting over, 1 from the current flip and 1 from the 2nd flip. For example, we have 25% chance of going back to square 1 from the current flip, but we also have 25% chance of starting over from the 2nd flip. That’s why adding in this matrix multiplication make sense, because at each stage there are 2 separate probabilities (25%) leading us back to square 1.

Conclusion

While I do think the reason for gambler fallacy is interesting, I do not think they are the meat of this article. But if you are curious, the reason can be sum up to 1 sentence: underestimating the sample size that’s require for the law of large number to take hold. If you are interested in the details of it, read part 2, otherwise I think part 1 is enough. I attached a link to the original article in case you want to take a look for your self.

https://chance.amstat.org/2022/02/gamblers-fallacy/

--

--