Free Trial

Safari Books Online is a digital library providing on-demand subscription access to thousands of learning resources.

Share this Page URL
Help

6 Inferring a Binomial Proportion via Gr... > 6.2 Discretizing a Continuous Prior ... - Pg. 102

102 CH A P T E R 6: Inferring a Binomial Proportion via Grid Approximation values. In this situation, we do not need a mathematical function of the prior over ; we can specify any prior probability values we desire at each of the values. Moreover, we do not need to do any analytical (i.e., formulas only) integration. The denominator of Bayes' rule becomes a sum over many discrete values instead of an integral. 6.1 BAYES' RULE FOR DISCRETE VALUES OF As in the previous chapter, the parameter denotes the value of a binomial proportion, such as the underlying propensity for a coin to come up heads. Pre- viously we assumed that was continuous over the interval [0, 1]. We assumed that could have any value in that continuous domain. The prior probabil- ity on was, therefore, a probability density at each value of , such as a beta distribution. Instead, we could assume that there are only a finite number of values in which we have any nonzero belief. For example, we might believe that can only have the values 0.25, 0.50, or 0.75. We already saw an example like this back in Figure 4.1 (p. 61). When there are a finite number of values, then our prior distribution expresses the probability mass at each value of . In this situation, Bayes' rule is expressed as p( | D) = p(D | ) p( ) p(D | ) p( ) (6.1) where the sum in the denominator is over the finite number of discrete values of that we are considering, and p( ) denotes the probability mass at . There are two niceties of dealing with the discrete version of Bayes' rule in Equation 6.1. One attraction is that some prior beliefs are easier to express with discrete values than with continuous density functions. Another felicity is that some mathematical functions that are difficult to integrate analytically can be approximated by evaluating the function on a fine grid of discrete values. 6.2 DISCRETIZING A CONTINUOUS PRIOR DENSITY If we could approximate a continuous prior density with a grid of discrete prior masses, then we could use the discrete form of Bayes' rule (in Equa- tion 6.1) instead of the continuous form, which requires mathematically evaluating an integral. Fortunately, in some situations we can, in fact, make such an approximation. Figure 6.1 illustrates how a continuous prior density can be partitioned into a set of narrow rectangles that approximate the contin- uous prior. This process of discretizing the prior is straightforward: Divide the domain into a large number of narrow intervals. Draw a rectangle over each