✧*。٩(ˊᗜˋ*)و✧*。 白麓的 web-log

Head or Tail?

Let's start from a small poll: I saw Jim getting 10 consecutive heads when tossing a coin, what is the probability that Jim get another head on his 11th toss? I tried this on some of my colleagues and students, most people responses 12, stating that the 11th toss is independent from the previous ones.

A more cautious response might be: "well, we don't really know if the coin is fair or not, do we?" Given the previous 10 heads, one can hardly say that the coin is fair.

A Biased Coin

Instinctively, we would say that the coin is biased. However, to what extent? To simplify the situation, let's say that there is a possibility of p that Jim's coin has two heads.

From a Bayesian perspective, at the beginning, of course, we would assume that p1. But after 10 heads, we need to update that belief.

Let A be the event that Jim's coin is biased, then P(A)=p. Additionally, denote the event that 10 heads are obtained in 10 tosses as B. Obviously,

P(B|A)=1,P(B|A¯)=1210.

Applying Bayesian Theorem:

p\*=P(A|B)=pP(B|A)p+P(B|A¯)(1p)=1024p1023p+1.

Therefore, the possibility of getting an eleventh head is

P=p\*+12(1p\*).

This value is very close to 1 even if p is small. When p=1%, an eleventh head would has probability 95.6%.

A Lucky Observer

However, there is another argument: maybe I was just being lucky to see the 10 streak of heads. This argument is pretty valid as nothing's being said about the tosses other than the 10 I witnessed.

A general question would be: "What is the probability of getting r continuous heads in n throws of a coin biased with probability p of getting a head?" This is a study of "runs".

Formally, define a run of length r as r consecutive favorable out comes in a series of trials. Our question can be stated as the probability of r-run in n trials.

If we denote Sn the probability of getting at least one r-run in n trials, obviously

Sn=k=1nsk,

where sk is the probability that the first r-run occurs at the k th trial. Additionally, we know that sk=0 if k<r and sr=pr where p is the probability of achieving a head.

Comparing to Sn, the recursive relationship of sk is much easier to find:

sn=qsn1+pqsn2++pr1qsnr,n>r.

Recursive models are best solved using generating function:

sntn=qpk=1r(pt)ksnktnk.

Sum the above up, n running from r+1 to infinity, as nk1 for all n and k.

g(t)srtr=qpk=1r(pt)kg(t).

Notice that r+1kr for all k. As a result, we have

g(t)=prtr(1pt)1t+(1p)prtr+1.

As Sn=k=1nsk, the generating function of Sn has form G(t)=g(t)1t, finally we have

G(t)=prtr(1pt)(1t)(1t+(1p)prtr+1).

The result, I quote from Simpson (1740)1

Sn=j=1(1)j+1[p+njr+1jq](njrj1)pjrqj1.

For any fixed r, it is obvious that limnSn=1. One might as well argue that Jim's coin may not be biased, I am only selecting the 10 most "heady" tosses. Well, that would require around 1,500 tosses to make sure there is 50% possibility of the existence of a 10-run.

  1. Simpson, T. (1 740). The Nature and Laws of Chance. The Whole after a new, general, and conspicuous Manner, and illustrated with a great Variety of Examples. Cave, London.

View original

#hs-maths