In: Statistics and Probability
A coin with probably of heads = 1/2 is tossed over and over. X is defined as the number of tosses needed to obtain the pattern: heads, heads (a toss that results in heads is followed by heads on the next toss).
a. Find the probability mass function of X
b. find the expected value of X.
Solution: X is defined as the number of tosses required to get two successive heads
In the case, The first toss doesn't matter. After that, it is just a matter of matching the previous toss.
So,
Now , what is
In other words, what is the probability of getting two heads after two tosses?
Well whatever the first coin was, the probability of the second toss being the same is 1/2
So,
Similarly consider P(X=3) , which is the probability the we get two head successively after 3 toss. whatever is tossed first, there is 1/2 chance that second throw is different and then a 1/2 chance the third throw is the same as the second.
So, the probability is
Continuing the pattern, we get that the probability of getting two heads after n throws for
is
Alternatively, he probability of getting two heads after n+1 throws for is
This Probability mass function
Thus the expected value E(X) is given by: