# Bayesian updates with cumulative gamma distribution?

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?

• That does not look correct to me. Why don't you start by writing the likelihood and substitute into Bayes' theorem. – Reinstate Monica Jul 28 at 10:34
• Hey @Xi'an would really appreciate if you could explain what you mean. – emir Jul 29 at 12:21
• 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. – emir Jul 29 at 12:52
• 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? – emir Jul 29 at 12:55
• @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. – emir Jul 29 at 12:58

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}$$