Here is today’s example illustrating a Bayesian test of a point null hypothesis. In Agresti and Franklin’s intro stats book, there is an example wondering if Americans work, on average, 40 hours per week. If

In the example in Agresti and Franklin’s text, a sample of 868 workers were selected and one observes that the workers worked an average of 39.11 hours and one assumes the population standard deviation is equal to

and one computes a p-value of 0.061. There seems to be moderately significant evidence that the mean working hours for all workers is different from 40.

Here’s an outline of a Bayesian test (I give more details in class):

1. We assign probabilities to the hypotheses

2. Under the hypothesis

3. Under the alternative hypothesis, we’ll place a N(40,

Under these assumptions, we give (in class) the posterior probability of the hypothesis

Since it is not clear how to specify the prior standard deviation

What we see is that the posterior probability of

> data=c(39.11, 868, 14)

> prob.H=function(tau)

+ mnormt.twosided(40,.5,tau,data)$post

> curve(prob.H(x),from=.01,to=2,xlab=”TAU”,ylab=”P(H)”)