I Have 2 Coins- The first is a fair coin - containts Head/Tail. The second is not a fair coin - containts Head/Head. I chose some coin randomaly and flipped it, and got Head. What is the probablity I chose the fair coin ?

I thought about using Random variable,but i dont know how. Someone can help me ? Thanks.

Short way: There are 3 heads, and the fair coin accounts for 1 head, hence probability is 1/3.

Longer way using conditional probability: Let $A$ be the event of choosing the fair coin. Let $B$ be the event of getting a head.

We are interested in the conditional probability $$P(A\mid B)=\frac{P(A\cap B)}{P(B)}=\frac{1/2\times 1/2}{1/2\times 1/2+1/2\times 1}=\frac 13$$

• Ok,Thanks. If i told you now,That I flipped the coin again, and i got again Head. What is the probabilty now that the coin is the fair one ? I have to define $A$ to be the event of choosing the fair coin. And $B$ be the event of getting a head twice ? – Noam Apr 27 '16 at 10:13
• Yes, something like that. – yoyostein Apr 27 '16 at 10:15
• So,What is $A\cap B$ ? – Noam Apr 27 '16 at 10:20
• $P(A\cap B)=(0.5)(0.5)(0.5)$ – yoyostein Apr 27 '16 at 10:21
• $P(A|B) = \frac{\frac{1}{2}^{3}}{({\frac{1}{2}^{2}+\frac{1}{2}\cdot 1})^{2}}$ looks good ? – Noam Apr 27 '16 at 10:24

Let it be that there are $n$ flips with the elected coin and let $H$ denote the number of heads that occur. Then you are looking for:
$$P\left(A\mid H=n\right)=\frac{P\left(A\cap\left\{ H=n\right\} \right)}{P\left(H=n\right)}=$$$$\frac{P\left(H=n\mid A\right)P\left(A\right)}{P\left(H=n\mid A\right)P\left(A\right)+P\left(H=n\mid A^{c}\right)P\left(A^{c}\right)}=\frac{\left(\frac{1}{2}\right)^{n}\frac{1}{2}}{\left(\frac{1}{2}\right)^{n}\frac{1}{2}+1\cdot\frac{1}{2}}=\frac{1}{2^{n}+1}$$