This is a math of the Introduction to Probability Models (11th edition) written by Sheldon M Ross.
Runs of 0s or 1s follow a geometric distribution. The solution I found in the solution manual:
Here conditioning has been applied on the first bit. So E[L1|X = 0] should be (1/p) - 1 , as the expected value of a geometric random variable is 1/p (where p is the probability of success). Here the expected length of first run given that first bit is zero is 1/p "including the first 1 after the run of zeroes". So I have written (1/p) - 1 , excluding the first 1 after the run of zeroes. But in the solution manual, it is (1/p). Am I missing something?
If I think somewhat different (not conditioning on the first bit), the first run can contain either all os or all 1s. If it contains all 0s, the expected length should be (1/p) - 1 or (1-p)/p , and if it contains all 1s, the expected length should be 1/(1-p) - 1 or p/(1-p) . In the first case, the success of a geometric random variable is characterized by the presence of a 1 after the first run ends. Same type of logic applies for the run of 1s. Then my solution matches with the solution of the picture.
Can anyone please point out what I am missing?