Comparing two proportions using beta priors. ------------------------------------------------- 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 continous approach to modeling priors. Suppose p1 and p2 are independent with beta(1,1) priors. The posteriors for p1 and p2 are beta(72,141) and beta(92,167). The program 'pp_beta' simulates 1000 pairs (p1, p2) from independent beta distributions. It graphs the simulated values of d=p2-p1 and computes P(d>=y) for various values of y. MTB > exec 'pp_beta' FOR PROPORTION P1, ENTER VALUES OF BETA PARAMETERS A1 AND B1: DATA> 72 141 FOR PROPORTION P2, ENTER VALUES OF BETA PARAMETERS A2 AND B2: DATA> 91 166 HOW MANY VALUES OF (P1, P2) DO YOU WISH TO SIMULATE? DATA> 1000 1.05+ - P2 - - - 0.70+ - - - - 25+++++65 0.35+ .+++++++++. - 35++++8. - - - 0.00+ +---------+---------+---------+---------+---------+P1 0.00 0.20 0.40 0.60 0.80 1.00 . : : : : ::: :::.::::. . . . ::::::::::::. :::: :::::::::::::. : ::::::::::::::::::: .: :.::::::::::::::::::::::::: . . . . ..:.:::::::::::::::::::::::::::.:::...... -------+---------+---------+---------+---------+---------P2-P1 -0.120 -0.060 0.000 0.060 0.120 0.180 TYPE 'y' to COMPUTE PROBABILITIES OF IMPROVEMENT FOR P2-P1: y DATA> -.1:.2/.01 DATA> end Row x PdALx sim_se 1 -0.10 0.995 0.002 2 -0.09 0.991 0.003 3 -0.08 0.983 0.004 4 -0.07 0.968 0.006 5 -0.06 0.951 0.007 6 -0.05 0.916 0.009 7 -0.04 0.878 0.010 8 -0.03 0.823 0.012 9 -0.02 0.768 0.013 10 -0.01 0.715 0.014 11 -0.00 0.626 0.015 12 0.01 0.535 0.016 13 0.02 0.460 0.016 14 0.03 0.354 0.015 15 0.04 0.272 0.014 16 0.05 0.203 0.013 17 0.06 0.139 0.011 18 0.07 0.088 0.009 19 0.08 0.056 0.007 20 0.09 0.034 0.006 21 0.10 0.019 0.004 22 0.11 0.010 0.003 23 0.12 0.007 0.003 24 0.13 0.004 0.002 25 0.14 0.001 0.001 26 0.15 0.000 0.000 27 0.16 0.000 0.000 28 0.17 0.000 0.000 29 0.18 0.000 0.000 30 0.19 0.000 0.000 31 0.20 0.000 0.000 We see that an approximate 90% interval estimate for d is [-.06, .08].