Skip to content

Commit

Permalink
Update_10.md
Browse files Browse the repository at this point in the history
  • Loading branch information
makinay2 authored Jan 7, 2024
1 parent 4f3c70c commit e10e9c8
Showing 1 changed file with 10 additions and 10 deletions.
20 changes: 10 additions & 10 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 @@ -38,19 +38,19 @@ 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}) \]
\[ P(H) = \frac{1}{3} \cdot 1 + \frac{1}{3} \cdot 0 + \frac{1}{3} \cdot 0.5 \]
\[ P(H) = \frac{1}{3} + 0 + \frac{1}{6} \]
\[ P(H) = \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:

\[ P(C_{hh}|H) = \frac{P(H|C_{hh}) \cdot P(C_{hh})}{P(H)} \]
\[ P(C_{hh}|H) = \frac{1 \cdot \frac{1}{3}}{\frac{1}{2}} \]
\[ P(C_{hh}|H) = \frac{1}{3} \times 2 \]
\[ P(C_{hh}|H) = \frac{2}{3} \]

\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} \]
\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**
Expand Down

0 comments on commit e10e9c8

Please sign in to comment.