Could someone explain the concept behind the expected length of a second run in a sequence of bernoulli trials?

40 Views Asked by At

I am trying to self-educate on probability theory. I am now studying out of a book and was trying to do some exercises, however, I am stuck on this exercise (by now I know the answer but I am stuck on the thought process behind it)

The questions is about a sequence of binary variables that each follow a bernoulli distribution. And they are asking about the expected length of the second run. Where a run is about consecutive values having identical values and the run ends when a new value appears.

I understand the procedure for finding the expected length of the first run. I know that you can condition on the first value and then treat it as a geometric distribution.

However, when I tried the second subquestion where they asked about the expected length of the second run. I assumed it would be the same value. I thought you can just pretend you 'forget' what happened and start with the first value of the second run. Thus, getting the same situation as when I had to calculate the expected value of the first run.

Apparently, this is incorrect. The answer says you have to again condition on the first value and then get p * 1/p + (1-p)* 1/(1-p) = 2.

My thought process thus far: Lets say we toss a coin and the probability that it is head is p and that it is tails is 1-p. Then first we condition on getting head first, then you want the expected number of trials to get head again after your for first time throw tails (ergo, after your first trial ends). Why is this expected value 1/p?

At first I explained it to myself as: we throw head first. Then how many heads we throw is irrelevant, so we go to end of the first run. Now we start to get tail and now we care about the first success, so the first time we hit head (hence geometric distribution, hence 1/p).

But I still find it confusing how we can ignore all heads and go to end of the first sequence (last head toss), but how we cannot say we ignore all heads and instead of going to end of first sequence, we go to the beginning of second sequence. Thus conditioning on tail (which results in the question being equivalent to asking the expected length of first sequence).

I hope it is all clear and not too confusing. I am just stuck in the thought process and thus confused myself. But I did try to be as clear as possible, while being confused.