Probability that Alice Tossed a Coin Three Times If Alice and Bob Tossed Totally 7 Times

Probability problems

Problem 752

Alice tossed a fair coin until a head occurred. Then Bob tossed the coin until a head occurred. Suppose that the total number of tosses for Alice and Bob was $7$.

Assuming that each toss is independent of each other, what is the probability that Alice tossed the coin exactly three times?

LoadingAdd to solve later

Sponsored Links


Hint.

Let $X$ be the number of Alice’s tosses until she got a head.

Then $X$ is a geometric random variable with parameter $p=1/2$.
Recall that a geometric random variable can be interpreted as the number of trials until getting the first success and each trial is successful with probability $p$ and fails with probability $q=1-p$.

Note that
\[P(X=k)= q^{k-1} p = (1-p)^{k-1} p.\]

Solution.

Let $X$ be the number of Alice’s tosses until she got a head. Also, let $Y$ be the number of Bob’s tosses until he got a head. As each toss is an independent event and the coin is fair, the random variables $X$ and $Y$ are geometric with parameter $p=1/2$ (the probability of success(head) is $p=1/2$ and the probability of failure(tail) is $1-p=1/2$).

This question asks to find the conditional probability
\[P(X=3 \mid X+Y=7) = \frac{P\left((X=3) \cap (X+Y=7) \right)}{P(X+Y=7)}.\]

Let us first compute the numerator as follows.
\begin{align*}
P\left((X=3) \cap (X+Y=7) \right) &= P\left((X=3) \cap (Y=7-X) \right) \\
&= P\left((X=3) \cap (Y=4) \right) \\
&= P(X=3) \cdot P(Y=4)
\end{align*}
since $X$ and $Y$ are independent.

Now, as $X$ and $Y$ follow the geometric distribution with parameter $p$, we have
\begin{align*}
P(X=3) &= \left(\frac{1}{2}\right)^2 \frac{1}{2} = \frac{1}{2^3}\\
P(Y=4) &= \left(\frac{1}{2}\right)^3 \frac{1}{2} = \frac{1}{2^4}.
\end{align*}
The product of these gives the numerator $\frac{1}{2^7}$.


Next, let us calculate the denominator $P(X+Y=7)$.
The law of total probability yields
\begin{align*}
P(X+Y=7) = \sum_{k=1}^6 P(X=k) P(X+Y = 7 \mid X=k).
\end{align*}

As before, since $X$ is a geometric random variable with parameter $p=1/2$, we have
\[P(X=k) = \left(\frac{1}{2}\right)^{k-1} \frac{1}{2} = \frac{1}{2^k}.\]


The second factor $P(X+Y \mid X= k)$ can be computed as follows.
\begin{align*}
&P(X+Y = 7 \mid X= k)\\
&= P(Y = 7 – X \mid X = k)\\
&= P(Y = 7 – k \mid X = k)\\
&= P(Y=7 – k)\\
&= \left(\frac{1}{2}\right)^{(7-k)-1} \frac{1}{2} = \frac{1}{2^{7-k}}
\end{align*}
Here, the third equality follows because $X$ and $Y$ are independent.

It follows that the denominator becomes
\begin{align*}
P(X+Y=7) &= \sum_{k=1}^6 \frac{1}{2^k} \cdot \frac{1}{2^{7-k}}\\
&= \sum_{k=1}^6 \frac{1}{2^7}\\
&= \frac{6}{2^7}.
\end{align*}


Combining these computations, it follows that the desired conditional probability is
\begin{align*}
P(X=3 \mid X+Y=7) = \frac{1/2^7}{6/2^7}=\frac{1}{6}.
\end{align*}

Abstraction

If you solved this problem, then try the following problem as well. This is more abstract than the current problem but the idea is the same.

Problem.
Let $X$ and $Y$ be geometric random variables with parameter $p$, with $0 \leq p \leq 1$. Assume that $X$ and $Y$ are independent.

Let $n$ be an integer greater than $1$. Let $k$ be a natural number with $k\leq n$. Then prove the formula
\[P(X=k \mid X + Y = n) = \frac{1}{n-1}.\]

Its solution can be found in the post: Conditional Probability When the Sum of Two Geometric Random Variables Are Known


LoadingAdd to solve later

Sponsored Links

More from my site

  • Conditional Probability When the Sum of Two Geometric Random Variables Are KnownConditional Probability When the Sum of Two Geometric Random Variables Are Known Let $X$ and $Y$ be geometric random variables with parameter $p$, with $0 \leq p \leq 1$. Assume that $X$ and $Y$ are independent. Let $n$ be an integer greater than $1$. Let $k$ be a natural number with $k\leq n$. Then prove the formula \[P(X=k \mid X + Y = n) = […]
  • Coupon Collecting Problem: Find the Expectation of Boxes to Collect All ToysCoupon Collecting Problem: Find the Expectation of Boxes to Collect All Toys A box of some snacks includes one of five toys. The chances of getting any of the toys are equally likely and independent of the previous results. (a) Suppose that you buy the box until you complete all the five toys. Find the expected number of boxes that you need to buy. (b) […]
  • What is the Probability that All Coins Land Heads When Four Coins are Tossed If…?What is the Probability that All Coins Land Heads When Four Coins are Tossed If…? Four fair coins are tossed. (1) What is the probability that all coins land heads? (2) What is the probability that all coins land heads if the first coin is heads? (3) What is the probability that all coins land heads if at least one coin lands […]
  • If At Least One of Two Coins Lands Heads, What is the Conditional Probability that the First Coin Lands Heads?If At Least One of Two Coins Lands Heads, What is the Conditional Probability that the First Coin Lands Heads? Two fair coins are tossed. Given that at least one of them lands heads, what is the conditional probability that the first coin lands heads? We give two proofs. The first one uses Bays' theorem and the second one simply uses the definition of the conditional […]
  • Independent Events of Playing CardsIndependent Events of Playing Cards A card is chosen randomly from a deck of the standard 52 playing cards. Let $E$ be the event that the selected card is a king and let $F$ be the event that it is a heart. Prove or disprove that the events $E$ and $F$ are independent. Definition of Independence Events […]
  • If a Smartphone is Defective, Which Factory Made It?If a Smartphone is Defective, Which Factory Made It? A certain model of smartphone is manufactured by three factories A, B, and C. Factories A, B, and C produce $60\%$, $25\%$, and $15\%$ of the smartphones, respectively. Suppose that their defective rates are $5\%$, $2\%$, and $7\%$, respectively. If a smartphone of this model is […]
  • Probability of Having Lung Cancer For SmokersProbability of Having Lung Cancer For Smokers Let $C$ be the event that a randomly chosen person has lung cancer. Let $S$ be the event of a person being a smoker. Suppose that 10% of the population has lung cancer and 20% of the population are smokers. Also, suppose that we know that 70% of all people who have lung cancer […]
  • Jewelry Company Quality Test Failure ProbabilityJewelry Company Quality Test Failure Probability A jewelry company requires for its products to pass three tests before they are sold at stores. For gold rings, 90 % passes the first test, 85 % passes the second test, and 80 % passes the third test. If a product fails any test, the product is thrown away and it will not take the […]

You may also like...

3 Responses

  1. Pavel says:

    Hello.
    I believe that after words “Now, as X and Y follow the geometric distribution with parameter p, we have” formula should read P(X=3) not P(X=2).

  1. 02/05/2020

    […] Probability that Alice Tossed a Coin Three Times If Alice and Bob Tossed Totally 7 Times […]

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.

More in Probability
Probability problems
Probability of Getting Two Red Balls From the Chosen Box

There are two boxes containing red and blue balls. Let us call the boxes Box A and Box B. Each...

Close