Probability of a bias of a coin based on the results seen

42 Views Asked by At

Suppose you toss a coin 8 times. The bias towards heads of the coin is unknown (assume a prior distribution from 0 to 1 with each value equally likely).

Given that you saw 2 heads, what is the probability that the bias of the coin is 1/3.

Note that this isn't a homework problem. I was just trying to invent my own problems to solve and for some reason I'm finding this hard to solve.

1

There are 1 best solutions below

0
On

This is a straight application of Bayes' Rule, albeit one mixing probability mass, and density, functions.

You seek the conditional probability density that the bias is $1/3$ when given evidence of 2 heads among 8 .

Since the conditional distribution for heads given a certain bias is Binomial, and the prior distribution for the bias is assumed to be continuously uniform ...

$$\begin{align}f_{\small B\mid H_8=2}(\tfrac 13)~&=~\dfrac{\mathsf P(H_8=2\mid B=\tfrac 13)~f_{\small B}(\tfrac 13) }{\mathsf P(H_8=2)}\\[2ex]&=~\dfrac{\dbinom 82\dfrac {2^6}{3^8}}{\displaystyle\int_0^1 \dbinom 82x^2(1-x)^6\mathrm d x}\\[2ex]&=~\dfrac{2^6}{\displaystyle3^8\int_0^1 x^2(1-x)^6\mathrm d x}\\[2ex]&=~\dfrac{1792}{729}\end{align}$$