If k represents the number of consecutive heads and P(k) is the corresponding probability while an unbiased coin is tossed 5 times, then
| k | 0 | 1 | 2 | 3 | 4 | 5 |
| P(k) | 251 | 2512 | 2511 | 255 | 252 | 251 |
Now, the expected value of variable
X is
(−1)251+(−1)2512+(−1)2511+(3)255+(4)252+(5)251
=251[−1−12−11+15+8+5]
=2528−24=254=231=81