What's the expected number of 1-runs when tossing a fair coin 100 times;

where 1-run (for heads) is defined as HT or H for the last toss;

for example: THHTHTHTTH has 3 1-runs.

- AnonymousQuantus
**Posts:**9**Joined:**

What's the expected number of 1-runs when tossing a fair coin 100 times;

where 1-run (for heads) is defined as HT or H for the last toss;

for example: THHTHTHTTH has 3 1-runs.

where 1-run (for heads) is defined as HT or H for the last toss;

for example: THHTHTHTTH has 3 1-runs.

- katastrofa
**Posts:**10158**Joined:****Location:**Alpha Centauri

The max number is 50, the min number is 0, the average is 25.

- AnonymousQuantus
**Posts:**9**Joined:**

Can not find fault in your reasoning: (50+0)/2 = 25 and it works for n=2;

althought** n=100** and we are looking for a mean not an average.

althought

Numerically, it looks like

[$]\mbox{mean}_{100} \approx 12.75 \pm 0.003[$],

and for n draws,

[$]\mbox{mean}_n \sim \frac{1}{8} n[$], as [$]n \rightarrow \infty[$].

Also, makes sense that the [$]\mbox{mean}_n/n[$] is decreasing with [$]n[$], as the above suggests.

After all, a length-[$]n[$] sequence ending in TH would have a 1-run counted there, but not necessarily if that sequence was continued.

Looking at Feller, he suggests looking at this type of problem as a recurrent process, but I didn't have the patience. In other words, once a 1-run occurs (say in a sequence of indefinite length), the problem of the next 1-run is (an independent) probabilistic replica of the original problem.

I'm sure there must be a nice argument for my asymptotic guess; maybe even a nice formula for finite n. I would be interested to see them.

Anyway, that's as far as I got -- I suggest Feller Vol. I for general strategy hints.

[$]\mbox{mean}_{100} \approx 12.75 \pm 0.003[$],

and for n draws,

[$]\mbox{mean}_n \sim \frac{1}{8} n[$], as [$]n \rightarrow \infty[$].

Also, makes sense that the [$]\mbox{mean}_n/n[$] is decreasing with [$]n[$], as the above suggests.

After all, a length-[$]n[$] sequence ending in TH would have a 1-run counted there, but not necessarily if that sequence was continued.

Looking at Feller, he suggests looking at this type of problem as a recurrent process, but I didn't have the patience. In other words, once a 1-run occurs (say in a sequence of indefinite length), the problem of the next 1-run is (an independent) probabilistic replica of the original problem.

I'm sure there must be a nice argument for my asymptotic guess; maybe even a nice formula for finite n. I would be interested to see them.

Anyway, that's as far as I got -- I suggest Feller Vol. I for general strategy hints.

- AnonymousQuantus
**Posts:**9**Joined:**

That's spot on. It is exactly 12.75 (and stdDev = 3.326...).

my computation indicates that

mean(n) = n/8 + 1/4 for n > 1

my computation indicates that

mean(n) = n/8 + 1/4 for n > 1

Too bad the OP seems to be MIA.

I thought the problem was interesting.

Can anybody derive AQ's (likely correct) formula?

(I will try again at some point).

I thought the problem was interesting.

Can anybody derive AQ's (likely correct) formula?

(I will try again at some point).

- katastrofa
**Posts:**10158**Joined:****Location:**Alpha Centauri

Now I understand the question is about just H or just T single runs -?

The guessed formula isn't correct IMHO.

It can be solved either inductively or deductively. Who do you like more, Newton or Sherlock Holmes?

The guessed formula isn't correct IMHO.

It can be solved either inductively or deductively. Who do you like more, Newton or Sherlock Holmes?

- Cuchulainn
**Posts:**64700**Joined:****Location:**Drosophila melanogaster-
**Contact:**

"Compatibility means deliberately repeating other people's mistakes."

David Wheeler

http://www.datasimfinancial.com

http://www.datasim.nl

David Wheeler

http://www.datasimfinancial.com

http://www.datasim.nl

Now I understand the question is about just H or just T single runs -?

The guessed formula isn't correct IMHO.

It can be solved either inductively or deductively. Who do you like more, Newton or Sherlock Holmes?

Single H runs in a sequence of n coin tosses consist of:

HT... at the beginning

.. THT … prior to the end

… TH at the end

Looking for a formula + derivation for the mean number of single H runs in a sequence of n tosses.

The proposed formula seems likely correct, given my numerics and small n cases. If so, all we need is the derivation. Whoever provides it shall be named honorary BD (see Monty Python link)

- katastrofa
**Posts:**10158**Joined:****Location:**Alpha Centauri

If you like that formula, I will rather not post the solution, which shows that it's incorrect (-:

Where’ve you been for the last two months? The more wrong the formula the more we lap it up!

Come on, people -- this problem can't be that hard! Let's wrap it up so we can go back to the pandemic.

- Cuchulainn
**Posts:**64700**Joined:****Location:**Drosophila melanogaster-
**Contact:**

Or B_Swinging_D?

"Compatibility means deliberately repeating other people's mistakes."

David Wheeler

http://www.datasimfinancial.com

http://www.datasim.nl

David Wheeler

http://www.datasimfinancial.com

http://www.datasim.nl