Manually run a Bayesian t-test
Hello, I am trying to better understand Bayesian hypothesis testing and wanted to code a Bayesian t-test for myself using JASP as a reference point. I have read through some of the papers by Wagenmakers but have not been able to fully understand the actual procedure of the tests as implemented in JASP. I am specifically interested in how the posterior is obtained.
I created two random normal arrays with a difference of d=0.8 and ran a t-test to obtain the t value. I inputted the t statistic into Jasp and can see the Cauchy prior and the posterior plotted, along with all of the results. To get the likelihood, I was under the impression that we should compute the pdf for the t distribution using the observed parameters, and then to multiply that by the prior to obtain the density for the posterior, but this seems to not be the case. (I thought that posterior = likelihood * prior).
So my questions are, (1) how is the likelihood actually computed, (2) how is the posterior computed, and (3) is there some paper that details the exact procedure?
Any pointers on how to do this manually would be much appreciated!
Comments
Dear num3,
This is not trivial. I believe the Rouder et al. 2009 PBR paper provides some details, and so does the Gronau et al. 2020 American Statistician paper " Informed Bayesian t-tests." (available on my website). And then there are the articles by Alexander Ly on Harold Jeffreys (also on my website).
Cheers,
E.J.
Ah ok, I will take a look at the papers - thanks!