0

A person tosses a fair coin $n$ times, they win if they are able to get heads in multiple of $3$. The probability they win given that they get heads at least one time is ($n$ is not multiple of $3$ and $n\geq 4$):

(A) $\dfrac{1}{3}$

(B) $\dfrac{(2^n-4)}{3(2^n-1)}$

(C) $\dfrac{2^{n}-3+(-1)^{n+1}}{3(2^{n}-1)}$

(D) None of the above

My Attempt:

I denoted Event $A$ as heads in multiple of $3$

Event $B$ as head at least one time

So, now I want to find conditional probability $P(A \mid B) =\dfrac{P\left(A\cap B\right)}{P(B)}=\dfrac{P(A)}{P(B)}$

Now, I took $n=4$

So $P(A \mid B)=\dfrac{{4\choose 0}\dfrac{1}{2^4}+{4\choose 3}\dfrac{1}{2^4}}{{4\choose 1}\dfrac{1}{2^4}+{4\choose 1}\dfrac{1}{2^4}+{4\choose 2}\dfrac{1}{2^4}+{4\choose 3}\dfrac{1}{2^4}}=\dfrac{1}{3}$

SO, I am gettin option (A) but given answer is (C)

Also, If i take $n=5$ I am getting option (D)

Greg Martin
  • 92,241
mathophile
  • 4,640
  • 3
    You are not given that $n=4$ so you can't use that to pick an answer. You can use it to exclude answers. You shouldn't have a $3$ in the denominator as there are $2^n-1$ possible throws. B won't cancel the $3$ when $n$ is odd so can't be right. A can't be right when $n$ is odd, so it can only be C or D. You should not have the term with $4 \choose 0$ as you are told there is at least one head. I find C is correct for both 4 and 5. – Ross Millikan Apr 09 '24 at 03:46
  • I suspect you have used the wrong symbol for A given B (it should be a vertical line, not a fraction...) – Red Five Apr 09 '24 at 03:50
  • Can you provide detailed solution if it is possible for you @RossMillikan – mathophile Apr 09 '24 at 03:52
  • 1
    The case where $3\mid n$ was studied here. The ideas in some of the answers work when $3\nmid n$ as well, I think. – Jyrki Lahtonen Apr 09 '24 at 05:10

3 Answers3

4

For the case $n = 4$, it is easy to see that there are $15$ equally probable outcomes in which at least $1$ head is obtained. (The sole outcome that is excluded is $TTTT$.) Among these $15$ outcomes, in order for the number of heads to be a multiple of $3$, there must be exactly $3$ heads. This occurs in one of four ways: $$HHHT, HHTH, HTHH, THHH.$$ So, given that at least one head is obtained, the desired probability is $4/15$, not $1/3$. This excludes choice (A). Note that when $n = 4$, choices (B) and (C) yield the correct probability, so we cannot eliminate these yet.

The natural thing to do is to extend the above reasoning to $n = 5$, since (B) and (C) are not equivalent in this case. So there are $2^5 - 1 = 31$ outcomes in which at least $1$ head is obtained. Of these, we again require exactly $3$ heads, since we cannot have $0$ or $6$ heads.

The number of such outcomes with exactly $3$ heads is $\binom{5}{3} = 10$. Explicitly, they are: $$HHHTT, HHTHT, HHTTH, HTHHT, HTHTH, \\ HTTHH, THHHT, THHTH, THTHH, TTHHH.$$ So the desired probability is $10/31$, which is consistent with choice (C). However, we have not proven that (D) is the answer, because we have only looked at two specific cases. We would need to prove that (C) is true for all integer $n \ge 4$.

I leave the details of such a proof as an exercise; however, I will provide some hints based on the simple cases illustrated above.

  • In general, the number of outcomes with at least one head is obviously $2^n - 1$.
  • The number of outcomes in which the number of heads is a multiple of $3$ (and is strictly greater than $0$) is $$\binom{n}{3} + \binom{n}{6} + \cdots + \binom{n}{3m},$$ where $m$ is the largest positive integer for which $3m \le n$.
heropup
  • 143,828
1

Here's one way to deduce the formula C.

The number of coin toss sequences that have the number of heads a multiple of $3$ (call this number $a_n$) is given by the number of $n$-walks from $0$ to $0$ on the following digraph:

graph of state machine

Explanation: this is a state machine where we keep record of the number of heads modulo $3$. Every step we can get a tail and the number heads doesn't change or a head and the number of heads increases by $1$ (and we go from $2$ back to $0$ because of $\mod 3$).

Because of symmetry, the number of walks from state to itself is same for each state. Therefore the quantity we want is one third of the trace of the matrix

$$ \left(\begin{array}{rrr} 1 & 1 & 0 \\ 0 & 1 & 1 \\ 1 & 0 & 1 \end{array}\right)^n $$

This is also given by the sum of the $n$th powers of the eigenvalues. The eigenvalues are $2, \lambda$ and $\bar \lambda$, where $\lambda = e^{i \pi / 3} = \frac{1+i\sqrt 3}{2}$. So

$$ a_n = \frac{1}{3} \left(2^n + \lambda^n + \bar \lambda^n \right) $$

and

$$ \lambda^n + \bar \lambda^n = 2 Re(\lambda^n) = \begin{cases} 2 &\text{ if } n= 0 \mod 6 \\ 1 &\text{ if } n= 1 \mod 6 \\ -1 &\text{ if } n= 2 \mod 6 \\ -2 &\text{ if } n= 3 \mod 6 \\ -1 &\text{ if } n= 4 \mod 6 \\ 1 &\text{ if } n= 5 \mod 6 \\ \end{cases} $$

To get the answer to the question we must subtract $1$ from $a_n$ (because we're disregarding the case of all tails) and divide by $2^n - 1$. It can be checked that this agrees with the formula $C$ in the cases $n\geq 4, 3 \not | n$. And this formula actually works for all $n \in \mathbb{N}$.

ploosu2
  • 12,367
1

Your mistake was in thinking that $\frac{P(A\cap B)}{P(B)}=\frac{P(A)}{P(B)}$. In fact $P(A\cap B)=P(A)-1/2^n$, since $A\cap B^c=\{\text{no heads}\}$, which has probability $1/2^n$.