Q. 4.3

Question

A coin that when flipped comes up heads with probability p is flipped until either heads or tails has occurred twice. Find the expected number of flips 

Step-by-Step Solution

Verified
Answer

The expected number of flips E(X) is -2p2+p-2.

1Step 1: Given Information

Given in the question that the coin was flipped comes up heads with probability pis flipped until either heads or tails has occurred twice.

2Step 2: Find the Value of p 2

Consider X is a number of tosses of the coin.

For X=0and p0=0 as two heads or two tails are not possible.

For X=1and p1=0 as two heads or two tails are not possible.

For X=2 and p2=0as two heads or two tails are possible.

Therefore,

p2=HH or T T

=p p+(1-p)(1-p)

We get,

=p2+(1-p)2

3Step 3: Find the Value of p 3

Since if head occurs then the probability is potherwise if tail occurs then the probability is (1-p)

For the X=3, probability of two heads or two tails is surely one.

But this has not occurred with X=2 

It means that if X=1does not occur with X=3,

Outcome surely occurs

Thus, we find out changes outcome does not happen with X=2

That is,

p3=1-p2

=1-p2-(1-p)2

4Step 4: Distribution Table

The Distribution Table is shown as below:

Xipi00102p2+(1-p)231-p2-(1-p)2

5Step 5: Computation of E ( X )

Find the value

E(X)=xp(x)

=(0×0)+(1×0)+2×p2+(1-p)2+3×1-p2-(1-p)2

=0+0+2p2+2(1-p)2+3-3p2-3(1-p)2

Simplifying the equation

=-p2-(1-p)2+3

=-p2-1-p2+2p+3

We get,

=-2p2+p-2.

6Step 6: Final Answer

The expected number of flips E(X)is -2p2+p-2.