Bayesian t-test

We want to test the hypothesis that μμ0 foro some known value μ0 (ofthen 0), given values xiN(μ,σ2). This is called a two-sided one sample t-test. We perform this test by checking if μ0I0.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.

yiN(μ1,σ2)ziN(μ2,σ2)

We want to determine if μ=μ1μ20 using xi=yizi

This can be evaluted as:

p(μμ0|D)=μ0p(μ|D)du

This is called one sided paired t-test.

To find p(μ|D) we specify an uninformative prior the posterior marginal on μ is T distributed:

p(μ|D)=T(μ|ˉx,s2N,N1)

Now we define the t-statistics as:

tˉxμ0s/N
  • s/N is the standard error of the mean

Thus the posterior: $p(μ|D)=1FN1(t)$

Connection to frequentist

Using uninformative prior gives us the same result as using frequentist methods.

Frequentist $μˉxs/N|DtN1$

Bayesian The sampling distribution of the MLE:

μˉXs/N|μtN1

The reason is that the Student T distribution is symmetric in its first two arguments

T(ˉx|μ,σ2,v)=T(μ|ˉx,σ2,v)

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.