Q.7.11

Question

Consider n independent flips of a coin having probability p of landing on heads. Say that a changeover occurs whenever an outcome differs from the one preceding it. For instance, if n = 5 and the outcome is HHTHT, then there are 3 changeovers. Find the expected number of changeovers. Hint: Express the number of changeovers as the sum of n  1 Bernoulli random variables. 

Step-by-Step Solution

Verified
Answer

The expected number of changeovers is (n-1)2p(1-p).

1Step 1: Given Information

Let n independent flips of a coin have probability  p of landing on heads.

2Step 2: Explanation

Define indicator random variables Ij that marks if there was a changeover between jth and (j+1) st flip, j=1,...,n-1. Observe that Ij=1 if and only if we have Head in jth flip and Tail in (j+1) st flip or if we have Tail in jth flip and Head in (j+1) st flip.

So, we have that


PIj=1=2p(1-p).
3Step 3: Explanation

Define x as the total number of changeovers. We have that X=j=1n-1Ij and using the linearity of the expectation, we have that

E(X)=jEIj=jPIj=1

=(n-1)·2p(1-p).

4Step 4: Final Answer

The expected number of changeovers is (n-1)2p(1-p).