I want to use Bayesian conjugate to update my prior. Let's say I model bus arrivals by Exponential distribution with lamba=0.5. It means on average I will wait for 2h = 1/0.5

Prior is gamma with: alha=1, beta=2, E[gamma] = alha/beta = 1/2

I have observed: 'the bus arrived after 3 hours'. Posterior: alha += 1, beta +=3, E[gamma] = 2/5 My posterior expected waiting time will be longer 5/2=2.5

How should I update my prior in case I have observed the next event: 'I waited for 3h and went home'. There is no information when the 'bus has arrived' but that 'it did not arrive for 3h'


1 Answer 1


The prior distribution on $\lambda$ is the Gamma prior $$\pi(\lambda)\propto\lambda^{\alpha-1}\exp\{-\beta\lambda\}\,\mathbb I_{\lambda>0}$$ The observation is the non-realisation of an event $E$. The probability that it did not occur is $\mathbb P_\lambda(E^c)$, which is also the likelihood. Hence the posterior writes as $$\pi(\lambda|E^c)\propto\pi(\lambda)\times\mathbb P_\lambda(E^c)$$ Since the event $E^c$ means that the bus took more than three hours to come $$\mathbb P_\lambda(E^c)=\mathbb P_\lambda(X>3)=\int_3^{\infty} \lambda e^{-\lambda x}\,\text dx=e^{-3\lambda}$$ Therefore $$\pi(\lambda|E^c)\propto \lambda^{\alpha-1}\exp\{-\beta\lambda\} \times \exp\{-3\lambda\}\,\mathbb I_{\lambda>0}$$

  • 1
    $\begingroup$ It is also nice to notice that the posterior is Gamma with parameters $\alpha,\beta+3$ $\endgroup$
    – PedroSebe
    Nov 29, 2020 at 6:37
  • $\begingroup$ @PedroSebe: yes this is what the last equation says. $\endgroup$
    – Xi'an
    Nov 29, 2020 at 9:11

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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