# Finding likelihood: Bayes Theorem

I'm very new to statistics and I'm having trouble trying to calculate the likelihoods to find the posterior hypothesis. I've seen similar questions but they are either too complicated for me to understand or i cannot connect them to my problem.

We have an experiment to find if a coin is fair.

P(h0) = The coin is fair

P(h1) = The coin is double headed.

The coin is flipped 4 times and the result is head every time. The priors are given which are:

P(h0) = 0.5

P(h1) = 0.5

Where I'm finding trouble is calculating the likelihoods given the data. I know that the likelihood is a probability given that one of the hypothesis is true, but I'm not sure how to apply the data to this.

Any help is much appreciated.

Thanks

• Please mark as "self-study" Mar 20, 2018 at 23:57

$$P(h_0|X)=\frac{P(X|h_0)P(h_0)}{P(X|h_0)P(h_0)+P(X|h_1)P(h_1)}$$ $$P(h_1|X)=\frac{P(X|h_1)P(h_1)}{P(X|h_0)P(h_0)+P(X|h_1)P(h_1)}$$ $$P(X=4|h_0)=.5^4(1-.5)^0=1/16$$ by logic $$P(X=4|h_1)=1,$$ since it is a double-headed coin. $$P(h_0|X=4)=\frac{1/16\times{1}/2}{1/16\times{1/2}+1\times{1/2}}=\frac{1/32}{17/32}=1/17$$ $$P(h_1|X=4)=1-1/17=16/17$$