MTB > # Chapter 2 - predictive inference with discrete priors MTB > # Example: let p be the batting average of a MTB > # ballplayer -- either p=.2,.28 or .36 with probs MTB > # .4, .5, .1, respectively. Player gets 6 hits in 20 at-bats. MTB > # What do you know about the number of hits of the player MTB > # in 20 future at-bats? MTB > exec 'p_disc_p' INPUT 1 IF PROBABILITIES ARE IN 'PRIOR' OR 2 IF PROBABILITIES ARE IN 'POST': DATA> 2 INPUT NUMBER OF TRIALS: DATA> 20 INPUT RANGE (LOW AND HIGH VALUES) FOR NUMBER OF SUCCESSES: DATA> 0 20 PREDICTIVE DISTRIBUTION OF NUMBER OF SUCCESSES: Row SUCC PRED 1 0 0.004138 2 1 0.023157 3 2 0.064251 4 3 0.118454 5 4 0.163519 6 5 0.179794 7 6 0.162956 8 7 0.124159 9 8 0.080463 10 9 0.044677 11 10 0.021340 12 11 0.008775 13 12 0.003096 14 13 0.000929 15 14 0.000234 16 15 0.000048 17 16 0.000008 18 17 0.000001 19 18 0.000000 20 19 0.000000 21 20 0.000000