# One coin chosen between a biased coin and a fair coin, and is tossed n times. Find probability of having gotten the biased coin.

$\begingroup$ In a different question, I had asked for clearing on the surveil trouble where I wanted to just understand the trouble. now, I have attempted it and wish to know if my solution is right .
Problem statement:
A drawer contains two coins. One is an indifferent coin, which when tossed, is equally probable to turn up heads or tails. The other is a bias coin, which will turn up heads with probability $phosphorus$ and tails with probability $1 − phosphorus$. One coin is selected ( uniformly ) at random from the draftsman. Two experiments are performed :

a ) The selected mint is convulse $nitrogen$ times. Given that the coin turns up heads $k$ times and tails $n − k$ times, what is the probability that the coin is biased ?
b ) The selected coin is tossed repeatedly until it turns up heads $k$ times. Given that the mint is flip $n$ times in total, what is the probability that the mint is biased ?
My attempt:
a ) Let $F$ be the jell of outcomes where I have chosen the fair coin, and $B$ be the set of outcomes where I have chosen the bias mint. Let $A_k$ be the determine of outcomes where I tossed $nitrogen$ times and got $k$ heads. I need to find $P ( B|A_k )$ .
 P ( A_k \cap F ) = \frac { 1 } { 2 } { { north } \choose { potassium } } \frac { 1 } { 2^n }   P ( A_k \cap B ) = \frac { 1 } { 2 } { { north } \choose { potassium } } p^k ( 1-p ) ^ { n-k }  Since $F$ and $B$ partition the sample space, we have
 P ( A_k ) = \frac { 1 } { 2 } { { north } \choose { potassium } } \left \ { p^k ( 1-p ) ^ { n-k } +\frac { 1 } { 2^n } \right \ } 
We from Bayes ‘ theorem know that

 P ( B|A_k ) =\frac { P ( A_k|B ) } { P ( A_k ) } 
therefore we get
 P ( B|A_k ) =\frac { p^k ( 1-p ) ^ { n-k } } { p^k ( 1-p ) ^ { n-k } +\frac { 1 } { 2^n } } 
barn ) In this case, we keep tossing till we get $k$ heads. now this means that the last flip is a headway. nowadays we know that we had to toss $normality$ times to get $k$ heads .
As in ( a ) above, let $F$ be the bent of outcomes where I have chosen the fairly coin, and $B$ be the set of outcomes where I have chosen the bias mint. Let $C_n$ be the event that I had to toss $north$ times to get $k$ heads. I need $P ( B|C_n )$ .
 P ( C_n \cap F ) = \frac { 1 } { 2 } \times \frac { 1 } { 2 } \times { { n-1 } \choose { k-1 } } \frac { 1 } { 2^ { n-1 } }   P ( C_n \cap B ) = \frac { 1 } { 2 } \times p \times { { n-1 } \choose { k-1 } } p^ { k-1 } ( 1-p ) ^ { n-k } 
again using Bayes ‘ theorem along the lines of what was done in ( a ), we get

 P ( B|C_n ) =\frac { p^k ( 1-p ) ^ { n-k } } { p^k ( 1-p ) ^ { n-k } +\frac { 1 } { 2^n } } 
I am a moment skeptic about my answer as the answers to ( a ) and ( bacillus ) are turning out to be the like. I can not find an intuitive explanation as to why that is .
Please provide feedback and let me know if I have solved this interview correctly. In lawsuit there is a error, please point me to it .

beginning : https://ontopwiki.com
Category : Finance