## Constructing a prior in a 2 x 2 table

At BGSU, all freshmen take a mathematics placement test and the results of the test, together with some other information, is used to advise students on the appropriate first math class to take.

The other information consists of the student’s score on the ACT Math exam and his/her high school grade point average, or GPA. We are interested in examining the relationship between the GPA and the ACT Math score.

For the student taking Form B of the math placement exam, 63% of the students have a GPA over 3.0. Suppose you categorize these students into two groups, those who have scored 21 or less on the ACT exam, and those who have scored over 21 on the ACT.

GPA <= 3.0 GPA > 3.0

ACT <=21 p1 1 – p1

ACT > 21 p2 1 – p2

How do we construct a prior on the proportions p1 and p2? Let’s step through the process.

1. Here it doesn’t make any sense to assign p1 and p2 independent distributions. If I thought that if student probability of getting a low GPA is 0.37 and then you told me that the student scored low on the ACT exam, then I would think it is more likely that the student gets a low GPA. That is, I would think the student’s chance of getting a GPA <= 3.0 would be higher than 0.37. Clearly, p1 and p2 should have a dependent prior.

2. A popular way of expressing the relationship between p1 and p2 is by use of a log odds-ratio. Let T1 = log (p1/(1-p1)) be the log odds of p1, and let T2 = log(p2/(1-p2)) be the log odds of p2. A log odds converts a proportion (between 0 and 1) to a real-valued quantity. A proportion of 0.5 corresponds to a log odds of 0, a probability less than 0.5 corresponds to a negative odds ratio, and so on. Then one compares the proportions by means of the difference in log odds, or the log odds ratio

.

3. Suppose we transform the proportions and to the log odds ratio and the sum of log odds (or logits)

,

and place independent priors on and .

4. Let’s illustrate using this prior. I assume and are independent with

, .

The prior says that (1) I don’t know much about the sizes of the proportions (a vague prior placed on ), but (2) I believe that a larger proportion of the “low ACT” students will have low GPAs than the “high ACT students” (an informative prior placed on ).

5. This prior induces a dependent prior on and . This is easy to illustrate using R. First I’ll simulate 1000 draws from the posterior of and and transform these values back to the proportions and . I construct a scatterplot of () and put the line on top. This clearly shows the dependence in the prior and it reflects the belief that .

theta1=rnorm(1000,0.5,.3)

theta2=rnorm(1000,0,2)

logitp1 = (theta1 + theta2)/2

logitp2 = (theta2 – theta1)/2

p1=exp(logitp1)/(1+exp(logitp1))

p2=exp(logitp2)/(1+exp(logitp2))

plot(p1,p2,pch=19,col=”red”)

abline(0,1,lwd=3)