Does bayes theorm apply to this scenario? You were given a coin which could be either coin A or B. The probability of
getting heads for coin A is 0.5, while the probability of getting heads for coin B is 0.3.
You believe that the given coin is A with a probability of 0.9. You flipped the
coin 5 times and obtained 1 head and 4 tails (Each flip is independent of each
other). What is the probability that the given coin is coin A after seeing the 5
flips?
Step 1: The probability of getting the above sequence for A is 0.156 (0.5^5 * 5) and the probability for sequence B is 0.0938 (5 * 0.3 * 0.5^4)
Step 2: (0.9 * 0.16) / (0.9 * 0.156+0.1 * 0.0938) = 0.94%? - is this the answer?
I'm honestly not sure about step two, cause I can't really rationalize it. I have seen a similar problem being solved this way.
Could someone help me with the progression from step 1 onward would be great thanks

Yes. Bayes theorem can be applied here.
You look for $P(A| 4H, 1T)$
using bayes theorem we get:
$P(A| 4H, 1T) = \frac{P(A)*P(4H, 1T|A)}{P(4H, 1T)} = \frac{P(A)*P(4H, 1T|A)}{P(A)*P(4H, 1T|A) + P(B) * P(4H, 1T|B)}$
Now use step 1: (Note that you have a mistake there for B)
In order to calculate $P(4H, 1T|A)$
