The third problem in the fourth problem set (Albert, p. 73, #6) is somewhat ambiguously stated. In particular, it is not stated clearly what the second parameter in the definition of the prior is. Is it a rate, or a scale?

Most people took it to be a scale. I wrote Jim Albert, and learned that throughout the book, he’s using a rate. See Section 3.3, where he defined the gamma density. I did not take any points off if you did the calculation assuming that it is a scale=1/rate. But in the future, when you see a gamma distribution in Albert’s book, remember that the second parameter is a rate!

### Like this:

Like Loading...

*Related*

This entry was posted on February 23, 2009 at 11:33 pm and is filed under STAT 295. You can follow any responses to this entry through the RSS 2.0 feed.
You can leave a response, or trackback from your own site.

March 6, 2009 at 2:10 pm |

Can you post solution of this example??

March 6, 2009 at 7:56 pm |

I’ll outline the procedure. The likelihood is where is the number of units sold in geographic area . The priors for the two areas are different, but are gammas with (for example in area 1) parameters 144 and 2.4, so in this instance . Multiplying prior times likelihood we get another gamma, this time with parameters and . So to get a sample on simply use the R function rgamma with these parameters to generate a large sample

Similarly generate a sample of ‘s of the same size.

Subtract 1.5 times the samples of the ‘s from the samples of the ‘s to get a sample of the differences. To do this, subtract 1.5 times the first component of sample #2 from the first component of sample #1, and so forth, to get a sample of differences, again of length N. This can be done by simply subtracting 1.5 times the second vector from the first. Then in R, the proportion of the difference that is greater than 0 is the answer you want.