MTB > # summarizing a beta density MTB > # MTB > # suppose I want to learn about p=Prob(coin lands heads) MTB > # I use a uniform prior and toss the coin 100 times, getting MTB > # 108 heads and 92 tails MTB > # MTB > # posterior density is beta(109, 93) MTB > # I want to compute P(.48 # for p MTB > MTB > exec 'p_beta' INPUT VALUES OF BETA PARAMETERS A AND B: DATA> 109 93 TYPE 'y' TO SEE A PLOT OF THE BETA DENSITY: y - * * 10.5+ - density - - - * * 7.0+ - - - - * * 3.5+ - - - * * - * * 0.0+ ******* *2* **2 ***2 ** ****************** +---------+---------+---------+---------+---------+------P 0.00 0.20 0.40 0.60 0.80 1.00 TYPE 'y' TO COMPUTE CUMULATIVE PROBABILITIES: ---------------------------------------------------------------- Input values of P of interest. The output is the column of values P and the column of cumulative probabilities PROB_LT. ---------------------------------------------------------------- y DATA> .48 .52 DATA> end Row P PROB_LT 1 0.48 0.044889 2 0.52 0.287360 TYPE 'y' TO COMPUTE PERCENTILES: ---------------------------------------------------------------- Input probabilities for which you wish to compute percentiles. The output is the probabilities in the column PROB and the corresponding percentiles in the column PERCNTLE. ---------------------------------------------------------------- y DATA> .05 .95 DATA> end Row PROB PERCNTLE 1 0.05 0.481819 2 0.95 0.596941