Say I have this situation with an exponential distribution and it's gamma conjugates:

$y\mid\lambda \sim exp(\lambda)$

$\lambda \sim gamma(\theta,\beta)$

$\lambda \mid y,\theta,\beta \sim gamma(\theta + 1, \beta + y)$

A trial shows that $y>x$, (where $x$ is just a constant) and we'd like to update $\lambda$. Am I correct to think that the posterior density would be given by the following equation?

$p(\lambda\mid \theta,\beta,y>x)= \int_{y=x}^\infty 1- gamcdf(x|\theta+1,\beta+y)dy$

Is there are better way to do this?

  • 1
    $\begingroup$ That does not look correct to me. Why don't you start by writing the likelihood and substitute into Bayes' theorem. $\endgroup$
    – Ben
    Jul 28, 2019 at 10:34
  • $\begingroup$ Hey @Xi'an would really appreciate if you could explain what you mean. $\endgroup$
    – emir
    Jul 29, 2019 at 12:21
  • $\begingroup$ Hey @Xi'an also, x in the above example is just a constant. It doesn't have a prior. Would really appreciate if you could share how you'd tackle this. $\endgroup$
    – emir
    Jul 29, 2019 at 12:52
  • $\begingroup$ Oh really ? @Xi'an so in my case it would just be : $\propto gamma(\lambda \mid \theta,\beta)(1-expcdf(x \mid \lambda)$. Is that correct? $\endgroup$
    – emir
    Jul 29, 2019 at 12:55
  • $\begingroup$ @Xi'an it's quite an interesting answer because it basically means when there is an inequality a gamma conjugate prior does not imply a gamma posterior ... that's basically what you're saying. $\endgroup$
    – emir
    Jul 29, 2019 at 12:58

1 Answer 1


When $\lambda\sim\mathcal G(\theta,\beta)$ and it is known that $Y>c$ for $Y\sim\mathcal E(\lambda)$, this amouns to observing a Bernoulli random variable$$Z\sim\mathcal{Be}(\mathbb P_\lambda(Y>c))$$to be equal to one. The posterior is therefore $$\pi(\lambda) \propto \lambda^{\theta-1}e^{-\beta\lambda}\mathbb P_\lambda(Y>c)=\lambda^{\theta-1}e^{-\beta\lambda}e^{-\lambda c}=\lambda^{\theta-1}e^{-(\beta+c)\lambda}$$


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.