# Expected number of attempts to observe a pattern VS Probability of getting a pattern in n attempts

This question is more about general intuition, than formal mathematics.

Let's consider the fair coin toss (p=0.5, q=0.5) and the pattern of getting 3 heads in a row.

$$\mu= \frac{p^{-n}-1}{1-p} = 14$$

(There is several other ways to solve this problem all leading to the same result).

$$P(n,k) = p^k \sum _{t=0}^{\frac{n-k}{k+1}} \binom{n-k (t+1)}{t} \left(-q p^k\right)^t-\sum _{t=1}^{\frac{n}{k+1}} \binom{n-k t}{t} \left(-q p^k\right)^t$$

from what we get:

P(14,3) = 0.6479 The probability to get 3 heads in a row after 14 attempts.

P(10,3) = 0.5078 The probability to get 3 heads in a row after 10 attempts.

The Matlab Code of a Monte-Carlo simulation shows the same results, and the distribution of results is plotted here:

My Question is:

Can you help me get the intuition why:

• The expected number of attempts, to get 3 heads in a row (in this case 14)

is different than

• The number of attempts necessary, for the probability to get 3 heads in a row, to reach 0.5 (in this case 10)
• The intuition is that the two are different because the probability distribution is not symmetrical around the mean – true blue anil Sep 22 '17 at 16:48
• Thank you. You are right. The mean of this distribution is 14 but the median is 10. So, when asked how many attempts would I need in order to accept to play this game (with an unlimited possibility of replay), I should answer 11, not 15, right? – ylnor Sep 22 '17 at 17:44
• Let's say entering the game is free. If you draw 3 heads in a row, you earn 1$. If you don't, you have to pay$1. You have a given N number of attempts. What would be the lowest N for wich you would accept to play if you can replay the game an infinite amount of times (hence you are risk-neutral). My answer would actually be N=10, since if I can play 1000 times with 10 attempts, I will lose on average 492 times and win 508 times making a $16 profit. – ylnor Sep 22 '17 at 18:28 • You are correct, since the probability of a win, given$10$attempts,$>0.5\$. – true blue anil Sep 22 '17 at 18:44