Bayesian t-test¶
We want to test the hypothesis that μ≠μ0 foro some known value μ0 (ofthen 0), given values xi∼N(μ,σ2). This is called a two-sided one sample t-test. We perform this test by checking if μ0∈I0.95(μ|D). If not than we can be 95% sure that μ≠μ0. A more common scenario is when we want to test if two paried samples have the same mean.
We want to determine if μ=μ1−μ2≥0 using xi=yi−zi
This can be evaluted as:
This is called one sided paired t-test.
To find p(μ|D) we specify an uninformative prior the posterior marginal on μ is T distributed:
Now we define the t-statistics as:
s/√N is the standard error of the mean
Thus the posterior: $p(μ|D)=1−FN−1(t)$
Fv(t) is the CDF of the standard Student t distribution T(0,1,v)
Connection to frequentist¶
Using uninformative prior gives us the same result as using frequentist methods.
Frequentist $μ−ˉx√s/N|D∼tN−1$
Bayesian The sampling distribution of the MLE:
The reason is that the Student T distribution is symmetric in its first two arguments
The results are similar but have different interpretation. In the Bayesian approach μ is unknown and ˉx is fixed. In frequentist ˉX is unkown and μ is fixed.