Determine the posterior density of $θ$ after doing $n$ coin tosses

140 Views Asked by At

I am given a that I toss a coin and the prior $θ \stackrel{}{\sim} Uniform[0.4, 0.6]$

$\textbf{Note:}$ $\theta$ is the probability of getting a head on a single toss

If I toss the coin $n$ times and obtain $n$ heads, then what is the posterior density of $θ$?

1

There are 1 best solutions below

2
On

Let's do this for one toss of the coin. Suppose that we toss this coin once to get the roll $X$ and it falls heads (i.e. $X=H$).

Note that the probability of getting the head depends on the value of $\theta$, so $$ \mathbb{P}[X=H] = \int_{0.4}^{0.6} \mathbb{P}[X=H,\theta=t]dt = \int_{0.4}^{0.6} \mathbb{P}[X=H|\theta=t] f_\theta(t) dt = \int_{0.4}^{0.6} \frac{t\ dt}{0.2} dt = 0.5, $$ which intuitively makes a lot of sense since the uniform distribution is symmetric around $0.5$...

The new distribution would be given by $$ f_\theta(t|X=H) = \frac{\mathbb{P}[X=H|\theta=t]}{\mathbb{P}[X=H]} = \ldots $$

can you complete this and then generalize to $n$ rolls?

You can try reading up on Bayes' Theorem, especially in the section Making a prediction.