Conditional probability selecting a number and flipping a fair coin. One of the numbers 1, 2 or 3 is selected at random. Then a fair coin is flipped that number of times. What is the probability that the number 3 was selected given:


*

*no heads on the coin flip(s)

*1 head

*2 heads

*3 heads


I know for three heads, the probability is of course $1$ or $100\%$ but I can't wrap my head around finding it for the other 3 conditions.

I think I solved my own problem here:
For the first case of no heads:


*

*There is $\frac{1}{2}$ chance to get no heads if the number picked is 1.

*There is $\frac{1}{4}$ chance to get no heads if the number picked is 2.

*There is $\frac{1}{8}$ chance to get no heads if the number picked is 3.


So we can set this up: $\frac{\frac{1}{8}}{\frac{1}{2}+\frac{1}{4}+\frac{1}{8}}=\frac{1}{7}$
For the second case of one head:


*

*There is $\frac{1}{2}$ chance to get 1 head if the number picked is 1.

*There is $\frac{1}{2}$ chance to get 1 head if the number picked is 2.

*There is $\frac{3}{8}$ chance to get 1 head if the number picked is 3.


So we can set this up: $\frac{\frac{3}{8}}{\frac{1}{2}+\frac{1}{2}+\frac{3}{8}}=\frac{3}{11}$
For the third case of two heads:


*

*There is $\frac{0}{2}$ chance to get 2 heads if the number picked is 1.

*There is $\frac{1}{4}$ chance to get 2 heads if the number picked is 2.

*There is $\frac{3}{8}$ chance to get 2 heads if the number picked is 3.


So we can set this up: $\frac{\frac{3}{8}}{\frac{0}{2}+\frac{1}{4}+\frac{3}{8}}=\frac{3}{5}$
For the last case, its clear that the probability is 1.
