Question
Suppose you have two coins A and B the probability of head in A is $\frac{1}{4}$ and the probability of head in B is $\frac{3}{4}$. Now, suppose you have chosen a coin and tossed it two times. The output was head and head. What is the probability that you chose the coin B.
My Approach
I used Bayes' theorem ,
Let Event, $\text{output to be Head Head}=E$
Req'd probability=$P({B}\mid{E})$
$$P({B}\mid{E})=\frac{P({E}\mid{B})\times P(B)}{P({E}\mid{B})\times P(B)+P({E}\mid{A})\times P(A)}$$ $$=\frac{\frac{3}{4} \times \frac{3}{4} \times \frac{1}{2}} {{\frac{3}{4} \times \frac{3}{4} \times \frac{1}{2}}+{\frac{1}{4} \times \frac{1}{4} \times \frac{1}{2}}}$$
$$=\frac{9}{10}$$
Am i correct?