How to find out the conditional probability of an event followed by itself? I am a bit stuck with the following question if anyone can help me solve and understand this:
A man has a fair coin and a unfair coin (which shows up tail with 75% of the chance) in his bag. He selects one of the coins at a random, and when he flips it, it shows head.
Suppose that he flips the same coin a second time and again it shows head. Now what is the probability that it is a fair coin?

so far I have tried to find out probability that coin is head twice:
(0.5 x 0.5 x 0.5) + (0.5 x 0.25 x 0.25 ) = .125 + 0.015625 = 0.140625
probability that it is fair and head twice = .125
and my answer to this question was = .125 / .140625 = 0.89
 A: With the information given, the prior probabilities are:
$$P(F)=P(U)=\frac{1}{2}$$
Let $H$ be the event that two successive heads are obtained. Then we have
$$P(H|F)=\frac{1}{4}$$
$$P(H|U)=\frac{1}{16}$$
By Bayes' Rule,
$$P(U|H)=\frac{p(H|U)P(U)}{p(H)}=\frac{\frac{1}{16}\frac{1}{2}}{P(H)}=\frac{1}{32}\frac{1}{P(H)}$$
and
$$P(F|H)=\frac{p(H|F)P(F)}{p(H)}=\frac{\frac{1}{4}\frac{1}{2}}{P(H)}=\frac{1}{8}\frac{1}{P(H)}$$
By the law of total probability,
$$P(U|H)+P(F|H)=1 \implies \frac{5}{32}\frac{1}{P(H)}=1 \implies P(H)=\frac{5}{32}$$
So $\boxed{P(F|H)=\frac{1}{8}\cdot\frac{32}{5}=\frac{4}{5}=0.8}$
A: Let $A$ be the event that the coin is fair. Let $B$ be the event two heads in a row, We want $\Pr(A\mid B)$ (the probability of $A$ given $B$. By the definition of conditional probability we have
$$\Pr(A\mid B)=\frac{\Pr(A\cap B)}{\Pr(B)}.$$
Now we need to compute the two probabilities on the right.
Calculating $\Pr(A\cap B)$ is straightforward. The unconditional probability that we picked the fair coin is $\frac{1}{2}$. And if the coin is fair, the probability of two heads in a row is $\frac{1}{2^2}$. Thus $\Pr(A\cap B)=\frac{1}{2}\cdot\frac{1}{2^2}$.
Now we calculate $\Pr(B)$. The event $B$ can happen in two disjoint ways: (i) we picked the fair coin and got two heads or (ii) we picked the biased coin and got two heads. We have already calculated the probability of (i). The probability of (ii) is calculated in the same way. Since the biased coin lands heads with probability $\frac{1}{4}$, the probability of (ii) is $\frac{1}{2}\cdot \frac{1}{4^2}$. Putting things together we find that
$$\Pr(A\mid B)=\frac{\frac{1}{2}\cdot \frac{1}{2^2} }{\frac{1}{2}\cdot\frac{1}{2^2}+\frac{1}{2}\cdot \frac{1}{4^2}}.$$
I will leave to you to simplify the above expression. Multiply top and bottom by $(2)(4^2)$.
