Simple question: Posterior for one coin flip

355 Views Asked by At

Just wondering if I assume a uniform prior:$/(1−) $, and I have a unfair coin with head probability = $p$.

If I flip 3 times and observed 2 heads, how doe I compute the posterior?

The answer is 12$p_1^2(1-p_1)$. I just don't know how do you come up with this number

1

There are 1 best solutions below

3
On BEST ANSWER

I don't know what you mean by “a uniform prior:$p/(1-p)$”. The result you cite is the result for what is conventionally called a uniform prior, $f(p)=1$.

Also, you didn't introduce $p_1$, so I'll assume this is a typo and you mean $p$.

The likelihood of observing $N=2$ heads in $3$ flips is $P(N=2\mid p)=3p^2(1-p)$. Then the posterior is

$$ f(p\mid N=2)=\frac{P(N=2\mid p)}{P(N=2)}f(p)=\frac{3p^2(1-p)}{P(N=2)}\cdot1\;. $$

The denominator doesn't depend on $p$, so we don't have to calculate it explicitly but can determine it by normalizing with respect to $p$. The normalization yields a factor $4$, so $f(p\mid N=2)=12p^2(1-p)$.

By the way, see Compare the probability of two unfair coins based on their realizations for a related question.