Determining Bayesian sample size and Bayesian optimal model