Skip to content

Commit

Permalink
Update1.md
Browse files Browse the repository at this point in the history
  • Loading branch information
makinay2 authored Jan 7, 2024
1 parent 4fe31d4 commit 76b6f43
Showing 1 changed file with 14 additions and 14 deletions.
28 changes: 14 additions & 14 deletions _problems/unit-01/I-law-of-total-probability-and-Bayes-rule/2.md
Original file line number Diff line number Diff line change
Expand Up @@ -30,25 +30,25 @@ First, we find the probability of getting heads $(P(H))$. Since one coin always
Since each coin is equally likely to be chosen, each has a $1/3$ probability of being chosen. Thus, $P(H)$ is:

\begin{align}
\[ P(H) &= P(C_{hh}) \cdot P(H|C_{hh}) + P(C_{tt}) \cdot P(H|C_{tt}) + P(C_{f}) \cdot P(H|C_{f}) \]\\\\
&= \frac{1}{3} \cdot 1 + \frac{1}{3} \cdot 0 + \frac{1}{3} \cdot 0.5 \]\\\\
&= \frac{1}{3} + 0 + \frac{1}{6} \]\\\\
&= \frac{1}{2} \]
P(H) &= P(C_{hh}) \cdot P(H|C_{hh}) + P(C_{tt}) \cdot P(H|C_{tt}) + P(C_{f}) \cdot P(H|C_{f}) \\\\
&= \frac{1}{3} \cdot 1 + \frac{1}{3} \cdot 0 + \frac{1}{3} \cdot 0.5 \\\\
&= \frac{1}{3} + 0 + \frac{1}{6} \\\\
&= \frac{1}{2}
\end{align}

Now, using Bayes' Theorem, P(A|H) is:
\begin{align}
\[ P(C_{hh}|H) &= \frac{P(H|C_{hh}) \cdot P(C_{hh})}{P(H)} \]\\\\
& = \frac{1 \cdot \frac{1}{3}}{\frac{1}{2}} \]\\\\
& = \frac{1}{3} \times 2 \]\\\\
& = \frac{2}{3} \]
P(C_{hh}|H) &= \frac{P(H|C_{hh}) \cdot P(C_{hh})}{P(H)} \\\\
& = \frac{1 \cdot \frac{1}{3}}{\frac{1}{2}} \\\\
& = \frac{1}{3} \times 2 \\\\
& = \frac{2}{3}
\end{align}
So, the probability that the coin is the two-headed coin, given that it landed on heads, is 2/3.

**(b) Probability that the same coin will land on heads in the next flip**

Let's define the events:
- $H_next$: heads on next flip.
- $H_{next}$: heads on next flip.

Given that the coin landed heads the first time, there are three possibilities:
1. It's the two-headed coin, which will always land heads.
Expand All @@ -58,11 +58,11 @@ Given that the coin landed heads the first time, there are three possibilities:
We've already calculated that the probability of it being the two-headed coin is 2/3, and the probability of it being the fair coin is the remaining 1/3 (since the two-tailed coin is now impossible). Therefore, the probability of the coin landing heads on the next flip is:

\begin{align}
\[ P(H_next) &= P(C_{hh}) \cdot P(H|C_{hh}) + P(C_{f}) \cdot P(H|C_{f}) \]
&= \frac{2}{3} \cdot 1 + \frac{1}{3} \cdot \frac{1}{2} \]
&= \frac{2}{3} + \frac{1}{6} \]
& = \frac{4}{6} + \frac{1}{6} \]
& = \frac{5}{6} \]
P(H_{next}) &= P(C_{hh}) \cdot P(H|C_{hh}) + P(C_{f}) \cdot P(H|C_{f}) \\\\
&= \frac{2}{3} \cdot 1 + \frac{1}{3} \cdot \frac{1}{2} \\\\
&= \frac{2}{3} + \frac{1}{6} \\\\
& = \frac{4}{6} + \frac{1}{6} \\\\
& = \frac{5}{6}
\end{align}

So, the probability that the same coin will land on heads in the next flip is 5/6
Expand Down

0 comments on commit 76b6f43

Please sign in to comment.