I am trying to learn about the Beta Binomial for Bayesian style probability. So far I have:
$p(D|\theta)$ is the likelihood of the data set.
$D$ is the data set.
$p(\theta)$ is the prior probability of the parameter $h$ (I would use $\theta$ instead of $h$, but for this example I'd rather use discrete probability instead of continuous).
So the posterior distribution is proportional to the likelihood times the prior:
$p(\theta|D) \propto p(D|\theta) \times p(\theta)$
My question is this: suppose we first get a data set $D_1$, and we use it to obtain a posterior distribution. But then (like batch style learning), we obtain another data set $D_2$. We first calculate the distribution given $D_1$ using the above equation, but then how do we update $\theta$ before using the equation again to obtain the new posterior from $D_2$?
Thanks in advance
Okay, so initial the posterior is $$p(\theta|D_1)=\frac{p(D_1|\theta)p(\theta)}{\int_{\theta\in\Theta}p(D_1|\theta)p(\theta)\mathrm{d}\theta},\forall\theta\in\Theta$$ where $\Theta$ is the parameter space.
The old posterior becomes the new prior distribution. The updated posterior becomes $$p(\theta|D_1;D_2)=\frac{p(D_2|\theta)p(\theta|D_1)}{\int_{\theta\in\Theta}p(D_2|\theta)p(\theta|D_1)\mathrm{d}\theta},\forall\theta\in\Theta$$