determining maximum a posteriori (MAP) hypothesis

1k Views Asked by At

I have this problem:

You are given a coin that may or may not be biased. Specifically, you have three hypotheses about the coin:

H1 = "the coin has probability 1/2 of landing heads"
H2 = "the coin has probability 1/3 of landing heads"
H3 = "the coin has probability 2/3 of landing heads"

Suppose your priors for the hypotheses are

P(H1)= 1/3; P(H2)= 1/3; and P(H3)= 1/3.

You toss the coin seven times and observe ve heads. Which is the maximum a posteriori hypothesis?

So for this problem I am stuck. I know that I will probably have to use the formula for Bayes theorem but I am not sure how to calculate in this specific problem.

What I did was something like this:

P(H1|D) = (1/2)(1/3) / ((1/2)+(1/3)+(2/3))
P(H1|D) = 1/7

Where D is the event we land on a heads.

Does this seem right? Then I would do the same for H2, and H3?

Any help is appreciated.

1

There are 1 best solutions below

0
On BEST ANSWER

If the probability of heads is $p_i$ for coin $i$ that has prior probability of $1/3$, then the posterior probability for that being the correct coin assuming you get $n$ heads out of $7$ is proportional to prior times data likelihood, which is $(1/3)*p_i^n*(1-p_i)^{7-n}$. Once you get these 3 posterior probabilities for the 3 coins you can divide them by the sum so that the sum equals 1, and then you'll have true posterior probabilities.