Topic 16:  Learning About a Proportion

 

Minitab Local Macro p_disc

 

Computes the posterior distribution for a proportion using a discrete set of models

 

 

TO RUN:

 

Name two Minitab columns 'p' and 'prior'.  Place the values of p in 'p' and the prior probabilities in 'prior'.  Here we take the proportion to be nine equally-spaced values between .1 and .9 and give each proportion a probability of 1/9 = .111.

 

MTB > prin p prior

 

 Row      p      prior

 

   1    0.1   0.111111

   2    0.2   0.111111

   3    0.3   0.111111

   4    0.4   0.111111

   5    0.5   0.111111

   6    0.6   0.111111

   7    0.7   0.111111

   8    0.8   0.111111

   9    0.9   0.111111

 

Suppose that 5 successes and 15 failures are observed.  To compute the posterior probabilities, type the following in the Minitab Session Window.  The 'plot' command gives a display of the prior, likelihood, and posterior probabilities.

 

MTB >  %p_disc 'p' 'prior' 5 15;

SUBC> plot.

 

Other subcommands:

 

The full macro command is

 

%p_disc P1 PRI s f;

 store POS;

 plot.

 

The 'store' command will store the posterior probabilties in the column 'pos'.