Application of binomial distribution to a coin flip game For this game, we flip the coin 3 times. After 2 flips, we bet on the outcome of the third flip.
It is given that the coin is fair and, the outcome of interest is when the first two flips were Heads.
What is the best bet for the outcome of the third flip?

I was arguing with a friend that you can express this probability in the following way:
$ P(X_3=H \vert X_1=H,X_2=H)=\frac{P(X_3=H,X_2=H,X_1=H)}{P(X_1=H,X_2=H)}=\frac{Binomial(k=3,n=3,p=0.5)}{Binomial(k=2,n=2,p=0.5)}$
and for the other outcome
$ P(X_3=T \vert X_1=H,X_2=H)=\frac{P(X_3=T,X_2=H,X_1=H)}{P(X_1=H,X_2=H)}=\frac{Binomial(k=2,n=3,p=0.5)}{Binomial(k=2,n=2,p=0.5)}$
With this interpretation it seems that the best bet would be Tails, but I seem to be wrong. Can someone point me in the right direction (what is wrong with my reasoning)?
 A: If the coin is fair, then the probability of landing heads on the third attempt is independent of the other attempts.  So the probability of getting heads on the third attempt is $1/2$.  There is no need for calculation.  (And it looks like your calculation is wrong -- you're not taking the whole sample space into account)
But your idea is still a good one.  You would want to use conditional probabilities if you didn't know the coin was fair.
A: Your formula should be
$$P(X_3=H|X_1=H,X_2=H)=\frac{P(X_3=H \cap X_2=H,X_1=H)}{P(X_1=H,X_2=H)}= \frac{\frac{1}{8}}{\frac{1}{4}}=\frac{1}{2}$$
You'll get the same result if $X_3=T$.  Therefore, you do NOT have a better chance on the third flip given your first two are heads...however, we already knew that since coin flips with a fair coin are independent.
A: 
Assuming: $Binomial(k,n,p) = P(K=k : K\sim\mathcal{B}(n,p)) = {n\choose k}p^k(1-p)^{n-k}$

You are equating $P(X_3=T, X_2=H, X_1=H)$ to $Binomial(k=2, n=3, p=0.5)$.  This is your error.
The former is the probability of the sequence of head, head, tail occurring in that order. $$P(X_3=T, X_2=H, X_1=H) = (0.5)^3 = \frac 18$$
The later is the probability of two heads and a tail in any order.  $$Binomial(k=2, n=3, p=0.5) = {3\choose 2} (0.5)^2(1-0.5)^{3-2} = \frac 38$$
They are not the same events and they do not equate to the same probability.  Order of occurrence matters.
