How to calculate Bayes Factor for t-test (equality of two means) with non-normal data?
There are two samples: $x_1, x_2,\ldots, x_{n_1}\sim f$ and $y_1, y_2,\ldots, y_{n_2}\sim g$ (cases of $f$ and $g$ are specified below)
The hypothesis I'd like to check is $H_0: \mu_1 = \mu_2$. For this particular hypothesis I wish to calculate BF.
The choice of prior is one thing, but the other (now more bugging me) is what likelihood function I should slot in into the numerator of Bayes Factor:
$\int L(\mu_1, \mu_2\mid x_1,x_2,\ldots,x_{n_1}, y_1, y_2,\ldots,y_{n_2}) \pi(\mu_1,\mu_2) d\mu_1 d\mu_2$
There are two different cases of data distributions:
- $x_1, x_2,\ldots, x_{n_1}\sim Exp(\lambda_1)$ and $y_1, y_2,\ldots, y_{n_2}\sim Exp(\lambda_2)$ (same distribution families)
- $x_1, x_2,\ldots, x_{n_1}\sim Exp(\lambda_1)$ and $y_1, y_2,\ldots, y_{n_2}\sim Normal(\mu_y, \sigma_y)$ (different distribution families)
- $x_1, x_2,\ldots, x_{n_1}\sim f $ and $y_1, y_2,\ldots, y_{n_2}\sim g$ (not in a closed-form distribution, different families)
Questions:
1. is Bayes Factor calculated based on likelihood directly from data?
Some calculators use the difference in means (Dienes) and some use t-statistics (Gonen; Rouder). The problem is that these calculator are designed for normal datasets.
2. in the second and third case, should I use kind of bootstrap likelihood? Also which or what bootstrap likelihood for what parameter then?
There is also fourth case:
4. $x_1, x_2,\ldots, x_n\sim N(\mu_1, \sigma_1)$ and $y_1, y_2,\ldots, y_n\sim N(\mu_2, \sigma_2)$ (same distribution families), but the answer is already here (link) but the solution can't be transferred on the cases above.