This question is about hypothesis testing in the Bayesian framework which I am new to.
Suppose I have two independent Poisson models with parameters $\lambda_1$ and $\lambda_2$ such that $X \sim Pois(\lambda_1)$ and $Y \sim Pois(\lambda_2)$. $n$ observations are drawn from each of the distributions $X$ and $Y$. If I provide priors $\pi (\lambda_1)$ and $\pi (\lambda_2)$, I can get the posteriors $\pi (\lambda_1 |x)$ and $\pi (\lambda_2 |y)$.
My question is how do I test the hypothesis that $\lambda_1 = \lambda_2$ against the alternative hypothesis $\lambda_1 < \lambda_2$ using a Bayesian approach?
What I did was to find the 95% credible interval for $\lambda_1$ which I denoted as $C_1$. And then I set my null hypothesis to be $H_0:\lambda_2 \in C_1$ vs $H_1:\lambda_2>max (C_1)$ and test to minimize Bayes risk. Is this an appropriate way of testing the hypothesis? If not, what would be a better way?
Thanks.