1

Lots of people throw coin until get a tail. It means each person should immediately stop, when get exactly one tail. The odds of someone having a head or a tail on any given throw is equal.

Each person will have a sequence of zero or more heads followed by a single tail.

That is, if "H" indicates a head and "T" indicates a tail, the sequence of results will look like one of:

  • T
  • HT
  • HHT
  • HHHT
  • HHHHT
  • And so on

Question

What will the ratio of heads and tails be on very large N?

My thought: we could say that sequences have the following probabilities:

P(T)     = 1/2;  Tails_Count = 1
P(HT)    = 1/4;  Tails_Count = 2
P(HHT)   = 1/8;  Tails_Count = 3
P(HHHT)  = 1/16; Tails_Count = 4
P(HHHHT) = 1/32; Tails_Count = 5
And so on

We know that each person will have exactly 1 tail. I'm confused about how to calculate heads average count.

If only two person throw coins, than one person can get sequence like HT and the second person can get sequence like HHHHHHHHHT.

It means that we have 10H and 2T.

On the other hand probability of getting HHHHHHHHHHT is $${1 \ \over 2^{10}}$$ which is almost impossible.

Staring this momment I have no idea how to caculate ratio of heads and tails.

  • Hint: look up "geometric series" on the internet – Lucio Tanzini Feb 06 '18 at 10:20
  • What exactly is $N$? – Harto Saarinen Feb 06 '18 at 10:21
  • @HartoSaarinen according to task N = infinite, but it's okay to assume that N = 1,000,000,000 – No Name QA Feb 06 '18 at 10:24
  • Although this can be calculated using series, you can also consider the implications of this sentence from the question: "The odds of someone having a head or a tail on any given throw is equal." – nickgard Feb 06 '18 at 10:47
  • When you start tossing with a fair coin then it is inevitable that the expected value of number of heads will equalize the expecte value of the number of tails. You cannot manipulate that by intentions like: "I will stop when the first tail has shown up." – drhab Feb 06 '18 at 11:28
  • Also note that the fact that the number of heads can exceed $1$ (this in contrast with the number of tails) finds a counterpart in the fact that the number of heads can take value $0$ (this in contrast again with the number of tails). – drhab Feb 06 '18 at 11:33

2 Answers2

1

Any play of the game produces one $T$, so the ratio of the number of $H$ to the number of $T$ in that play is just the number $n$ of heads.

Extrapolating from your table, that expected value of the number $n$ of heads is: $$\Bbb E[n] = P(n = 0) \cdot 0 + P(n = 1) \cdot 1 + P(n = 2) \cdot 2 + \cdots = \sum_{i = 0}^{\infty} P(n = i) \cdot i = \sum_{i = 0}^{\infty} \frac{i}{2^{i + 1}}.$$

There are many methods for evaluating that infinite sum.

Travis Willse
  • 99,363
  • "Any play of the game produces one T" -- got it.

    "So the ratio of the number of H to the number of T in that play is just the number n of heads" -- didn't get it.

    Could you explain second part of your explanation in more details with example, please?

    – No Name QA Feb 06 '18 at 10:36
  • If the number of tails is $n_T = 1$, then the ratio $n_H / n_T$ of the number $n_H$ to the number $n_T$ is $n_H / n_T = n_H / 1 = n_H$, that is, just the number of the heads. I don't think it's meaningful to ask for an "example" here, since the second part just derives an expression for the one quantity you asked about. – Travis Willse Feb 06 '18 at 10:44
  • $P(n=i)=2^{-i-1}$ (not $2^{-i}$). After the $i$ heads a tail is requested. – drhab Feb 06 '18 at 11:01
  • @Travis What does P(n=0)0, P(n=1)1, P(n=2)*2, etc means in your formula? – No Name QA Feb 06 '18 at 11:10
  • @drhab You're right about the formula, of course, I've fixed the expression. – Travis Willse Feb 06 '18 at 11:23
  • @NoNameYp $P(n = i)$ is the probability that the given play will result in the sequence $\underbrace{H \cdots H}_{i}T$, that is, exactly $n = i$ heads. – Travis Willse Feb 06 '18 at 11:24
  • @Travis I found what I don't understand. P(HHHT) = 1/2^4 and it is clear. If we will multiply it with 3 what we will get? I mean what does 3 * 1/2^4 mean? – No Name QA Feb 06 '18 at 12:04
  • 1
    @NoNameYp If $X$ is a random variable that takes values in ${0,1,2,3,\dots}$ then $\mathbb EX=\sum_{i=0}^{\infty}P(X=i)i$. That's done here for $X$ being the number of heads. For $i=3$ you get the term $0.5^{4}3$. So the answer on what you ask "what does $\dots$ mean?" is: it is just one of the terms in the infinite sum. Note that HHHT corresponds with $X=3$ and $P(X=3)=0.5^4$. – drhab Feb 06 '18 at 12:14
0

Let $\mu$ denote the expected number of heads.

Then $$\mu=0.5\times0+0.5(1+\mu)=0.5+0.5\mu$$so that: $$\mu=1$$

This on base of:$$\mathbb EH=P(T_1)\times\mathbb E(H\mid T_1)+P(H_1)\times\mathbb E(H\mid H_1)$$where $T_1$ denotes the event that the first toss is a tail, $H_1$ denotes the event that the first toss is a head, and $H$ denotes the number of heads. Essential is that here: $$\mathbb E(H\mid T_1)=0\text{ and }\mathbb E(H\mid H_1)=1+\mathbb EH$$

So the ratio of heads and tails by large $N$ will be $1:1$.

drhab
  • 151,093