Why is my probability value greater than 1?

367 Views Asked by At

Question Given the observation $\{H,T,H,H,T\}$, use the Bayes rule to find the probability that the coin is unbased?

My approach Let the probability of seeing heads be $f$. For unbiased coin, $f=.5$. Using Bayes rule,

$$ \Pr[.5|\{H,T,H,H,T\}] = \frac{\Pr[\{H,T,H,H,T\}|.5]\Pr[.5]}{\int_0^1\Pr[.5]\Pr[\{H,T,H,H,T\}|f]df} $$

$\Pr[.5]$ is independent of $f$, it can be brought out of the integral and since it is present in both numerator and denominator, it can also be ignored. As tossing a coin is a Bernoulli trial, the probability is given as, $$ \Pr[\{H,T,H,H,T\}|f] = \bigg(\begin{matrix}5 \\ 3\end{matrix}\bigg)f^3 (1-f)^2 $$ Substituting the above expression,

$$ \Pr[.5|\{H,T,H,H,T\}] = \frac{\bigg(\begin{matrix}5 \\ 3\end{matrix}\bigg).5^3 .5^2}{\int_0^1\bigg(\begin{matrix}5 \\ 3\end{matrix}\bigg)f^3 (1-f)^2df} = \frac{1/2^5}{1/60} = \frac{60}{32} > 1 $$ The binomial is present in numerator and denominator and can be ignored. The integral without the binomial co-efficiant is Beta function $B(4,3)=1/60$. Clearly I have made some mistake and I cannot figure out where.

What is the mistake in my approach? And what would be the correct approach to the problem? Thank you.