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

For the discussion of math. Duh.

Moderators: gmalivuk, Moderators General, Prelates

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

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

Postby Robert'); DROP TABLE *; » Wed Jul 03, 2013 3:43 pm UTC

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.

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

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

Postby Xenomortis » Wed Jul 03, 2013 3:53 pm UTC

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.
Image

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

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

Postby brenok » Wed Jul 03, 2013 3:53 pm UTC

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.

User avatar
Xanthir
My HERO!!!
Posts: 5401
Joined: Tue Feb 20, 2007 12:49 am UTC
Location: The Googleplex
Contact:

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

Postby Xanthir » Wed Jul 03, 2013 5:16 pm UTC

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)))

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

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

Postby Robert'); DROP TABLE *; » Wed Jul 03, 2013 11:44 pm UTC

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.

That answered the question I actually wanted to be asking.

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?

Postby wumpus » Thu Jul 04, 2013 2:14 pm UTC

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).

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

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

Postby dudiobugtron » Fri Jul 05, 2013 2:48 am UTC

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!"
Image

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

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

Postby DeGuerre » Fri Jul 05, 2013 5:50 am UTC

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?

Postby Tirian » Fri Jul 05, 2013 9:23 pm UTC

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?

Postby elasto » Sat Jul 06, 2013 2:04 pm UTC

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...

User avatar
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?

Postby doogly » Sun Jul 07, 2013 5:51 pm UTC

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?

Postby DeGuerre » Mon Jul 08, 2013 2:22 am UTC

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.

Do read the paper that I linked on algorithmic probability; I think that might answer your question.


Return to “Mathematics”

Who is online

Users browsing this forum: No registered users and 13 guests