1

I have three different random variables $\theta_1, \theta_2, \theta_3$ . These random variables are actually parameters of binomial likelihood

  1. Assume that I have prior distribution of $\theta_2 \sim Uniform (0,1)$

  2. But prior distribution of $\theta_3 \sim Uniform (\theta_2,1)$ and prior distribution of $\theta_1 \sim Uniform (0,\theta_2)$

Is there a way I could find the posterior distribution of $ \theta_1,\theta_3$ given that I have data (Binomial likelihood) and prior information as given above?

$f(\theta_3|x_3) = \frac{Likelihood(x_3|\theta_3)\times Prior(\theta_3|\theta_3>=\theta_2)}{P(x_3)} = Beta(\alpha_3,\beta_3)$

So basically I want to find the parameters for this conditional posterior distribution

  • Plug it into MCMC sampler and it’ll give you the result. What’s the problem? How is it related to beta distribution mentioned in the title? – Tim Jul 03 '21 at 15:58
  • @Tim I need to find a posterior distribution for the thetas. For uniform prior, the posterior is Beta Distribution – Dominic Joseph Jul 03 '21 at 16:13
  • @Tim I edited the question a bit. Im not much familiar with MCMC sampler. Can you please give me a lead? – Dominic Joseph Jul 03 '21 at 16:20

1 Answers1

3

You can't. The posterior would follow beta distribution if you used beta-binomial model with the likelihood being a binomial distribution and beta distribution as a prior. In such a case, beta is a conjugate prior for binomial and we have a closed-form solution for the posterior that happens to be also a beta distribution. However it is not the case that other models with parameters on unit interval will have beta distribution as a posterior.

In your case, just use probabilistic programming like Stan or PyMC3 to define the model and sample from it using MCMC (see for more details) to learn the distribution of the parameters. It is a pretty standard solution for estimating posterior distributions for Bayesian models.

Tim
  • 108,699
  • 20
  • 212
  • 390
  • All likelihoods (1, 2 and 3) are Binomial and all priors are uniform. Its just that the Priors are conditional. Won't it still give a beta posterior? – Dominic Joseph Jul 03 '21 at 16:43
  • Also I use R language. Is there a way to do this in R? – Dominic Joseph Jul 03 '21 at 16:44
  • 1
    Uniform priors do not lead to beta posteriors. Beta distribution assigns non-zero probabilities to values in (0, 1) interval, your priors don't, so they cannot get beta as a posterior. There is an R package for Stan, but it is an independent language you'd need to learn https://cran.r-project.org/web/packages/rstan/index.html – Tim Jul 03 '21 at 16:44