Bayesian test with exponential density function

I need to do a bayesian test for a simple random sample with exponential distribution and N(2,3) as a prior distribution conditioned by: Null hypothesis=> $\theta$ less or equal to 1 ; Alternative hypothesis=> $\theta$>3

• I am catching up on the lingo in stats so let me make sure I understand your problem. You have a set of data that you know is sampled from an exponential distribution. You have prior belief on the parameter $\lambda$ being drawn from a normal distribution with mean $\mu=2$ and standard deviation $\sigma=3$. You would like to compare the probability $\theta = \frac{1}{\lambda}<1$ with an alternative hypothesis $\theta = \frac{1}{\lambda} <3$. Is that correct? May 21, 2016 at 17:23
• I only have a mistake, the alternative hypothesis is $\theta$ > 3, rest of problem is correct. May 21, 2016 at 17:35
• Is the problem that you can't find the posterior distribution? It should be pretty easy to derive, or you can probably just Google it.
– Jon
May 21, 2016 at 17:49
• I'm trying to find the posterior distribution using the parametric formulation: en.wikipedia.org/wiki/Bayesian_inference#Parametric_formulation ; but I don't know how to solve that integral. I didn't find it in Google. May 21, 2016 at 18:05
• Are you talking about the denominator? If so that should be a constant independent of your $\lambda$ parameter. You might be better off considering the ratio of probabilities. Then you don't need to take that integral. It looks like you get something rather ugly with erf everywhere. May 21, 2016 at 18:37

So in order to solve this problem you find the posterior distribution $p(\theta | \bf{x})$, where $x_i \sim Exp(\theta)$. The Likelihood is simple, $\theta ^n exp(-\theta \sum_{i=1}^n x_i)$ and the prior is $p(\theta) \propto exp(-\frac{(\theta - \mu)^2}{2 \sigma^2})$.
The posterior: $p(\theta | \bf{x}) \propto \theta ^n exp(-\theta \sum_{i=1}^n x_i) exp(-\frac{(\theta - \mu)^2}{2 \sigma^2})$