computing bayes factor to test if data supports model

25 Views Asked by At

Number of customers who attend 2 shops in a 10 minute interval follows a poisson distribution. for the first and second office $y_1=3$ and $y_2=5$

we want to test if we can assume the same average for both shops or different averages. our two models are:

M1:
$y_1$|$\lambda$~ $Po(\lambda)$

$y_2$|$\lambda$~$Po(\lambda)$

$\lambda$~Gamma(2,1)

M2

$y_1|\lambda_1$~Po$(\lambda_1)$

$y_2|\lambda_2$~Po($\lambda_2$)

$\lambda_1$~Gamma(2,1)

$\lambda_2$~Gamma(4,1)

compute the bayes factor in order to test id data supports model 1 or model 2. Ive used the bayes factor formula and I think ive found the numerator but the denominator is in terms of 2 parameters so im struggling to understand how to approach it, would it be integrate twice with respect to $\lambda_1$ and then $\lambda_2$?