In: Statistics and Probability
There is a fair coin and a biased coin that flips heads with probability 1/4.You randomly pick one of the coins and flip it until you get a heads. Let X be the number of flips you need. Compute E[X] and Var[X]
P[ head come up = 1/4 = 0.25
Possible trial
| number of trial (X) | outcome | probability (p) | 
| 1 | H | 1/4 | 
| 2 | TH | (3/4)*(1/4) | 
| 3 | TTH | (3/4)^2*(1/4) | 
| 4 | TTTH | (3/4)^3*(1/4) | 
| .... | 
The pattern will be same
Now,

(1)
(2)
Subtract 2 from 1


infinite GP with a = 1/4 and r = 3/4




(3)
(4)
Subtract 4 from 3

(5)
again multiply by (3/4)
(6)
Subtract 6 from 5










.