MTB > # Researcher is interested in determining relative effectiveness MTB > # of two drugs. Suppose that each drug has possible cure rates MTB > # of .1, .3, .5, .7, .9. You believe a priori that two drugs MTB > # have same cure rates with probabability .5; otherwise you have MTB > # no knowledge about relative effectiveness of two drugs. MTB > # Suppose that each drug is tested on 10 people; 3 are cured using MTB > # first drug and 7 using second drug. Want to compute prior and MTB > # posterior odds of two drugs being equivalent and the Bayes factor. MTB > MTB > # Use program 'pp_disct' to display the prior. MTB > MTB > exec 'pp_disct' FOR EACH P DISTRIBUTION: ------------------------ INPUT LO AND HI VALUES: DATA> .1 .9 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 10 30 50 70 90 10 0.100000 0.025000 0.025000 0.025000 0.025000 30 0.025000 0.100000 0.025000 0.025000 0.025000 50 0.025000 0.025000 0.100000 0.025000 0.025000 70 0.025000 0.025000 0.025000 0.100000 0.025000 90 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.8 0.025 2 -0.6 0.050 3 -0.4 0.075 4 -0.2 0.100 5 0.0 0.500 6 0.2 0.100 7 0.4 0.075 8 0.6 0.050 9 0.8 0.025 MTB > # Use program 'pp_disct' again to display the posterior. MTB > exec 'pp_disct' FOR EACH P DISTRIBUTION: ------------------------ INPUT LO AND HI VALUES: DATA> .1 .9 INPUT NUMBER OF MODELS: DATA> 5 INPUT PROBABILITY THAT P1=P2: DATA> .5 INPUT OBSERVED NUMBER OF SUCCESSES AND FAILURES IN FIRST SAMPLE: DATA> 3 7 INPUT OBSERVED NUMBER OF SUCCESSES AND FAILURES IN SECOND SAMPLE: DATA> 7 3 Posterior distribution of P1 and P2: (Rows and columns are expressed in percentage format.) ROWS: PER_1 COLUMNS: PER_2 10 30 50 70 90 10 0.00001 0.00200 0.02602 0.05925 0.01274 30 0.00001 0.03717 0.12097 0.27543 0.05925 50 0.00000 0.00408 0.21251 0.12097 0.02602 70 0.00000 0.00031 0.00408 0.03717 0.00200 90 0.00000 0.00000 0.00000 0.00001 0.00001 CELL CONTENTS -- POST:DATA TYPE 'Y' AND RETURN TO SEE A GRAPH OF THE POSTERIOR DISTRIBUTION: n 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.8 0.000000 2 -0.6 0.000001 3 -0.4 0.000321 4 -0.2 0.008180 5 0.0 0.286859 6 0.2 0.245930 7 0.4 0.327473 8 0.6 0.118493 9 0.8 0.012744