Converting between conditional distributions for Gibbs sampling using Bayes Theorem
I am working on writing a Gibbs sampler to do hypothesis testing in a Bayesian framework. I have a set of data which give the number of occurrences in a sample of trials. The particular model of interest is a three-layered hierarchical model with the following distributions:
1) The number of occurrences given is drawn from a Binomial distribution, .
2) The distribution of given the hyperparameter is a Beta distribution, .
Here is a known constant between 0 and 1. Note that the shape paramters and are chosen so that the mean is .
3) is drawn from a uniform distribution on where which ensures that the distribution is concave.
If I am understanding the Gibbs sampling procedure correctly, it goes something like this.
Start by generating a value for from the uniform distribution. Then:
1) Given this generate a value for from .
2) Given generate a value for from .
3) Given generate a new value for from .
4) Given this new generate a new value for from .
5) Repeat steps 1-4.
I am having trouble with step 4, since I need the conditional distribution . I should be able to get this from Bayes theorem, since .
I have been unable to calculate the normalization integral that appears in the denominator above:
Question 1: Does anyone know of a method to perform this integration of the Beta distribution with respect to analytically? I have been unable to do so or find much on integration of the Beta distribution with respect to the shape parameter.
Question 2: For those readers who are familiar with Gibbs sampling and the Bayesian framework, please feel free to comment on the method of approach I outlined here. I am rather new at this and not entirely confident in the way I am attempting to do the sampling.
Thanks in advance,