The computation of Bayes factors can be framed as a hierarchical model, where the high-level parameter is an index that's assigned to each model and sampled from a categorical distribution. In other words, we perform inference of the two (or more) competing models at the same time and we use a discrete variable that jumps between models. How much time we spend sampling each model is proportional to . Then, we apply equation 5.10 to get Bayes factors.
To exemplify the computation of the Bayes factors, we are going to flip coins one more time:
Notice that while we are computing Bayes factors between models ...