## HHH...HHH is unlikely... right?

For the discussion of math. Duh.

Moderators: gmalivuk, Moderators General, Prelates

Robert'); DROP TABLE *;
Posts: 730
Joined: Mon Sep 08, 2008 6:46 pm UTC
Location: in ur fieldz

### HHH...HHH is unlikely... right?

So if I toss a coin 20 times, twice, and get:
A) HTTTHTHTHHTTTHHHHHHH
B) HHHHHHHHHHHHHHHHHHHH

I know that the chance of any given sequence, including "unlikely" ones, is simply 2-20. However, it feels intuitively obvious to me that the second sequence is more unlikely, and I know that if you were to count up the number of heads/tails, then counting 20 heads and 0 tails is much more unlikely than one containing 12 heads.

So, apparently, B is both more unlikely and just as unlikely as A. Can anyone say which is the correct answer, and why?

(Surprisingly, this never came up in my stats homework; this is just curiosity.)
...And that is how we know the Earth to be banana-shaped.

Xenomortis
Not actually a special flower.
Posts: 1446
Joined: Thu Oct 11, 2012 8:47 am UTC

### Re: HHH...HHH is unlikely... right?

There is one way 20 coin flips can result in 20 heads.
There is more than one way that 20 coin flips can result in 12 heads.

Both sequences, A and B, are just as likely as the other.

brenok
Needs Directions
Posts: 507
Joined: Mon Oct 17, 2011 5:35 pm UTC
Location: Brazil

### Re: HHH...HHH is unlikely... right?

Getting exactly "HTTTHTHTHHTTTHHHHHHH", in that order, is very unlikely and the chances are, in fact, 2^-20

However, there are many other ways to get 12 heads and 8 tails. In total, there are 20!/(12! 8!) ways. That is why this combination is more likely than 20 heads, which has only ne possible way to obtain.

Xanthir
My HERO!!!
Posts: 5401
Joined: Tue Feb 20, 2007 12:49 am UTC
Contact:

### Re: HHH...HHH is unlikely... right?

What everyone else said. Brains tend to be bad at separating individual instances from their reference sets once they get complicated enough, which is why the first looks more likely to you - your intuition is automatically grouping it with other things that look similar to it (of which there are a lot), while the second one is sufficiently unique that your intuition can consider it by itself.
(defun fibs (n &optional (a 1) (b 1)) (take n (unfold '+ a b)))

Robert'); DROP TABLE *;
Posts: 730
Joined: Mon Sep 08, 2008 6:46 pm UTC
Location: in ur fieldz

### Re: HHH...HHH is unlikely... right?

Xanthir wrote:What everyone else said. Brains tend to be bad at separating individual instances from their reference sets once they get complicated enough, which is why the first looks more likely to you - your intuition is automatically grouping it with other things that look similar to it (of which there are a lot), while the second one is sufficiently unique that your intuition can consider it by itself.

Thanks everyone.
...And that is how we know the Earth to be banana-shaped.

wumpus
Posts: 546
Joined: Thu Feb 21, 2008 12:16 am UTC

### Re: HHH...HHH is unlikely... right?

Note that while "HHH...HHH" has an equal probability in the world of perfect coin flips, the real world gets a little hairier. There are plenty more than 1/2^20 (roughly 1 in a million) people who can cheat in a coin flip well enough to string 20 heads together*. I'm not sure how many two-headed coins are out there versus the conventional head and tails, it can easily become the dominant factor (assuming you flip the coin and are not intentionally cheating) for longer streaks. Finding perfectly independent variables is hard, and when the probabilities grow small, even tiny chances tend to grow relatively large. The point is that "HHH...HHH" is *only* independent for ideal coin flips. It is much more likely to correlate to plenty of other possibilities, thus giving a floor minimum chance regardless of the length of the string of "H"s.

Thus ends an introduction to Bayesian theory.

* Of course if you made a bet about "HTTTHTHTHHTTTHHHHHHH" in that exact order, the chance our cheater could hit it is roughly his chance to remember "HTTTHTHTHHTTTHHHHHHH" while flipping it (if he can convert it to 5 hex digits yes, otherwise it seems unlikely).

dudiobugtron
Posts: 1098
Joined: Mon Jul 30, 2012 9:14 am UTC
Location: The Outlier

### Re: HHH...HHH is unlikely... right?

wumpus wrote:"HTTTHTHTHHTTTHHHHHHH" while flipping it (if he can convert it to 5 hex digits yes, otherwise it seems unlikely).

Just break it up in to easy-to-remember substrings.
H, then TTT,, then HTHT, then HH, then TTT, then the rest Hs. I'm sure you could come up with a story or other memory strategy to remember that easily.

My dog had a head, and three tails. His head chased a tail, and then it did it again. This was inefficient, so he grew two more heads, for better chasing efficiency. The he looked at his three tails, and thought "This is boring. I'd rather just keep growing heads forever!"

DeGuerre
Posts: 51
Joined: Mon Feb 04, 2008 6:41 am UTC

### Re: HHH...HHH is unlikely... right?

Robert'); DROP TABLE *; wrote:However, it feels intuitively obvious to me that the second sequence is more unlikely, and I know that if you were to count up the number of heads/tails, then counting 20 heads and 0 tails is much more unlikely than one containing 12 heads.

I'm neither a Bayesian nor a frequentist. I subscribe to the "shut up and calculate" school of thought as a general rule. However, there are some problems better analysed in a frequentist framework and some better analysed in a Bayesian framework. This problem, IMO, is better analysed in a Bayesian framework.

For those playing at home, Bayesian statistics is the science of how to update beliefs based on observations. You start with a belief about some system, then make an observation, and Bayes' rule says what your beliefs should be after you make that observation.

In frequentist terms, sequences A and B are equally likely. However, in Bayesian terms, if you started off assuming that the coin is fair, you'd be less likely to think that the coin is fair after observing B than after observing A.

I recommend this paper, which gives a decent introduction to algorithmic probability theory from the point of view of the "universal a priori distribution". It's extremely readable, and should be straightforward to anyone who knows what a Turing machine is.

Tirian
Posts: 1891
Joined: Fri Feb 15, 2008 6:03 pm UTC

### Re: HHH...HHH is unlikely... right?

DeGuerre wrote:In frequentist terms, sequences A and B are equally likely. However, in Bayesian terms, if you started off assuming that the coin is fair, you'd be less likely to think that the coin is fair after observing B than after observing A.

I can't see why. What if flipping a coin a sufficiently number of times suggested to us that the n'th flip was tails exactly when n is a Fibonacci number? That would be precisely as increasingly unlikely as a coin that turned up heads in the first n flips. The only difference is that from a practical matter we'd be more likely to spot the pattern in the latter case and we'd also have an easier time hypothesizing that there is a physical cause for the suspected unfairness, but those are both relatively practical matters.

elasto
Posts: 3751
Joined: Mon May 10, 2010 1:53 am UTC

### Re: HHH...HHH is unlikely... right?

Tirian wrote:I can't see why.

Tirian wrote:we'd also have an easier time hypothesizing that there is a physical cause for the suspected unfairness

You answered your own question. In Bayesian terms, the a priori of it being a two-headed coin is reasonably high, whereas the a priori of something physically causing a coin to form a Fibonacci sequence is, well, absurdly lower.

I can only think of two causes for that, in fact.

If someone else is doing the tossing, they could be skilled enough to control the outcome of each flip. That would have a non-negligible a priori.

But if I am doing the flipping, I can think of only one cause that's not just blind luck: That I'm living in a simulation and whoever's in charge of it is sending me a message.

Now, it's pretty hard to estimate the a priori of living in a simulation. It's possibly actually very high - maybe even close to 1. But the a priori of living in a simulation AND the controller choosing this very moment to let me know by causing my coin to do a Fibonacci sequence is surely absurdly low. So it takes a lot more evidence to reach the same probability as to reach an equally probable conclusion that the coin has two heads.

---

It's interesting to think how many times I'd have to toss a Fibonacci-sequencing coin before I did start concluding I was living in a simulation though: Probably actually not all that many. Fifty times maybe?

I'd then first start testing whether I had to toss the coin or anyone could toss the coin. I'd also test if I could deliberately break the sequence or would something always happen to force it to the correct result.

*Reaches for his wallet*

I'll let you know...

doogly
Dr. The Juggernaut of Touching Himself
Posts: 5530
Joined: Mon Oct 23, 2006 2:31 am UTC
Location: Lexington, MA
Contact:

### Re: HHH...HHH is unlikely... right?

DeGuerre wrote:For those playing at home, Bayesian statistics is the science of how to update beliefs based on observations. You start with a belief about some system, then make an observation, and Bayes' rule says what your beliefs should be after you make that observation.

In frequentist terms, sequences A and B are equally likely. However, in Bayesian terms, if you started off assuming that the coin is fair, you'd be less likely to think that the coin is fair after observing B than after observing A.

One can do inferential statistics that are not Bayesian, and when comparing Bayesian to frequentist interpretations, that is what you have to do. It is wrong to say that to a frequentist, A and B are equally likely. It is better to say that if a frequentist wished to test the hypothesis that the coin was fair, they would do some numberlogics after observing H...H and calculate whether they should reject it or not.
LE4dGOLEM: What's a Doug?
Noc: A larval Doogly. They grow the tail and stinger upon reaching adulthood.

Keep waggling your butt brows Brothers.
Or; Is that your eye butthairs?

DeGuerre
Posts: 51
Joined: Mon Feb 04, 2008 6:41 am UTC

### Re: HHH...HHH is unlikely... right?

Tirian wrote:What if flipping a coin a sufficiently number of times suggested to us that the n'th flip was tails exactly when n is a Fibonacci number? That would be precisely as increasingly unlikely as a coin that turned up heads in the first n flips.