Comparing two proportions using a discrete "testing" prior. ------------------------------------------------- Example (from Berry): Three Duke students were interested in whether basketball players are more effective when under less pressure. They considered the three-point shots attempted by Duke's 1992-3 basketball team in the First half vs Second half of games, thinking there would be more pressure in the second half. Regard the following as random samples from larger populations: Of the 211 three-point shots attempted in the first half 71, or 33.6%, were successful; of the 255 attempted in the second half, 90 (35.3%) were successful. We illustrate the discrete approach. Suppose each proportion can be .3, .35, .4, .45, or .5. We believe that the two proportions are equal with probability .5. The following testing prior, constructed by the program 'pp_disct', places equal probs on the diagonal and equal probs on the nondiagonal values such that P(diagonal)=.5. MTB > exec 'pp_disct' FOR EACH P DISTRIBUTION: ------------------------ INPUT LO AND HI VALUES: DATA> .3 .5 INPUT NUMBER OF MODELS: DATA> 5 INPUT PROBABILITY THAT P1=P2: DATA> .5 INPUT OBSERVED NUMBER OF SUCCESSES AND FAILURES IN FIRST SAMPLE: DATA> 0 0 INPUT OBSERVED NUMBER OF SUCCESSES AND FAILURES IN SECOND SAMPLE: DATA> 0 0 Posterior distribution of P1 and P2: ROWS: PER_1 COLUMNS: PER_2 30 35 40 45 50 30 0.100000 0.025000 0.025000 0.025000 0.025000 35 0.025000 0.100000 0.025000 0.025000 0.025000 40 0.025000 0.025000 0.100000 0.025000 0.025000 45 0.025000 0.025000 0.025000 0.100000 0.025000 50 0.025000 0.025000 0.025000 0.025000 0.100000 TYPE 'Y' AND RETURN TO SEE A TABLE OF THE POSTERIOR DISTRIBUTION OF THE DIFFERENCE IN PROBABILITIES P2-P1: y Row DIFF P_DIFF 1 -0.20 0.025 2 -0.15 0.050 3 -0.10 0.075 4 -0.05 0.100 5 0.00 0.500 6 0.05 0.100 7 0.10 0.075 8 0.15 0.050 9 0.20 0.025 The program 'pp_disct' is used to find the posterior density. The marginal probs for d=p2-p1 is given. Note that P(d=0)=.76. There is support for the hypothesis of equal proportions for this data. MTB > exec 'pp_disct' FOR EACH P DISTRIBUTION: ------------------------ INPUT LO AND HI VALUES: DATA> .3 .5 INPUT NUMBER OF MODELS: DATA> 5 INPUT PROBABILITY THAT P1=P2: DATA> .5 INPUT OBSERVED NUMBER OF SUCCESSES AND FAILURES IN FIRST SAMPLE: DATA> 71 140 INPUT OBSERVED NUMBER OF SUCCESSES AND FAILURES IN SECOND SAMPLE: DATA> 90 165 Posterior distribution of P1 and P2: ROWS: PER_1 COLUMNS: PER_2 30 35 40 45 50 30 0.07132 0.09245 0.02815 0.00066 0.00000 35 0.03152 0.65363 0.04975 0.00116 0.00000 40 0.00561 0.02911 0.03545 0.00021 0.00000 45 0.00012 0.00064 0.00019 0.00002 0.00000 50 0.00000 0.00000 0.00000 0.00000 0.00000 Row DIFF P_DIFF 1 -0.20 0.000000 2 -0.15 0.000125 3 -0.10 0.006254 4 -0.05 0.060819 5 0.00 0.760422 6 0.05 0.142409 7 0.10 0.029311 8 0.15 0.000660 9 0.20 0.000001