I want to find the probability that in ten tossings a coin falls heads at least five times in succession. Is there any formula to compute this probability?
Answer provided is $\frac{7}{2^6}$
I want to find the probability that in ten tossings a coin falls heads at least five times in succession. Is there any formula to compute this probability?
Answer provided is $\frac{7}{2^6}$
To avoid double counting, we can calculate how many outcomes give us EXACTLY $5$ sequential heads, then add number of outcomes which give us exactly $6$ heads and so on.
H
is the head,
T
is the tail,
X
is any (either H
or T
)
Exactly $5$ sequential heads:
H H H H H T X X X X..........2^4
T H H H H H T X X X..........2^3
X T H H H H H T X X..........2^3..........Total: 2*2^4 + 4*2^3 = 64
X X T H H H H H T X..........2^3
X X X T H H H H H T..........2^3
X X X X T H H H H H..........2^4
Exactly $6$ sequential heads:
H H H H H H T X X X..........2^3
T H H H H H H T X X..........2^2
X T H H H H H H T X..........2^2...........Total: 2*2^3 + 3*2^2 = 28
X X T H H H H H H T..........2^2
X X X T H H H H H H..........2^3
Exactly $7$ sequential heads:
H H H H H H H T X X..........2^2
T H H H H H H H T X..........2............Total: 2*2^2 + 4 = 12
X T H H H H H H H T..........2
X X T H H H H H H H..........2^2
Exactly $8$ sequential heads:
H H H H H H H H T X..........2
T H H H H H H H H T..........1............Total: 5
X T H H H H H H H H..........2
Exactly $9$ sequential heads:
H H H H H H H H H T..........1............Total: 2
T H H H H H H H H H..........1
Exactly $10$ sequential heads:
H H H H H H H H H H..........1............Total: 1
Now we add all values that marked as "Total" and divide them by $2^{10}$. We GUARANTEE that all listed outcomes do not intersect, so there is no double counting.
So the answer is $7/64$.
During writing this answer I saw that the question has already been answered but I will post my solution nonetheless.
The options are:
$(X,X,X,X,X,-,-,-,-,)$
$(-,X,X,X,X,X,-,-,-,-,)$
$(-,-,X,X,X,X,X,-,-,-,)$
$(-,-,-,X,X,X,X,X,-,-)$
$(-,-,-,-,X,X,X,X,X,-)$
$(-,-,-,-,-,X,X,X,X,X)$
where $X$ denotes heads and $-$ is a placeholder.
Line: there are $2^5$ options of obtaining at least those 5 heads at the first 5 tosses: $2^5$
Line: There are $2^4$ possibilities for the last 4, but only 1 for the first (which must be tails) because if the first was $X$ we would be in line 1: therefore $2^4$
Line: There are $2^3$ possibilities for the last three, but we can vary only the first one, the second one has to be tails as otherwise we are again in one of the upper cases: $2^3\cdot 2^1$
Line: There are $2^2$ for the last two and $2^2$ for the first 3, as we can vary the first and the second one without falling into one of the upper cases (the fourth one being tails again)
Line: $2^1$ for the last one and $2^3$ for the first, the second and the third
Line: We can vary the first, second, third and fourth arbitrarily (as long as fifth is tails) without falling into the upper cases.
therefore we obtain $$\frac{2^5+5\cdot2^4}{2^{10}}= \frac{7}{2^6}$$
Corrected answer after Orangetree pointed out I forgot to take into account events were not mutually exclusive.
You need to think about how many different coin tossing sequences give at least $5$ consecutive heads, and how many coin tossing sequences there are in total, and then take the ratio of the two.
Clearly there is $2^{10}$ coin tossing sequences in total, since each of $10$ coins have $2$ possible outcomes.
To see how many sequences have $5$ consecutive heads consider the following. In any sequence
$$X-X-X-X-X-X-X-X-X-X$$
We can put the $5$ consecutive heads in $5$ places. This can be seen by putting it at the start of thee sequence, and then moving it over step by step.
$$H-H-H-H-H-X-X-X-X-X$$ $$X-H-H-H-H-H-X-X-X-X$$ $$X-X-H-H-H-H-H-X-X-X$$ $$X-X-X-H-H-H-H-H-X-X$$ $$X-X-X-X-H-H-H-H-H-X$$ $$X-X-X-X-X-H-H-H-H-H$$
For the first scenario, we have $2^5$ possible sequences since the remaining coins can be either heads or tails without affecting the result.
For the second scenario, we can only take $2^4$ since we need to fix the first coin as tails to avoid counting sequences more than once.
Similarly, for the third scenario we can count $2^4$ un-counted sequences, as we fix the coin preceeding the sequence as tails.. and so on
This gives total number of ways
$$2^5 + 2^4 + 2^4 + 2^4 + 2^4 + 2^4 = 2^4(2+1+1+1+1+1) = 2^4\times 7$$
Hence the probability should be
$$\frac{2^4 \times 7}{2^{10}} = \frac{7}{2^6}$$
To actually answer your question if a general formula exists, the reasoning above can be extended to give the probability of at least $m$ heads out of $n$ coin tosses as
$$\frac{2^{m-1}(2+(n-m))}{2^n} = \frac{2+n-m}{2^{n-m+1}}$$