Chapter 5

Numerical Integration

Consider a one-dimensional integral of the form . The value of the integral can be derived analytically for only a few functions f. For the rest, numerical approximations of the integral are often useful. Approximation methods are well known by both numerical analysts [139, 353, 376, 516] and statisticians [409, 630].

Approximation of integrals is frequently required for Bayesian inference since a posterior distribution may not belong to a familiar distributional family. Integral approximation is also useful in some maximum likelihood inference problems when the likelihood itself is a function of one or more integrals. An example of this occurs when fitting generalized linear mixed models, as discussed in Example 5.1.

To initiate an approximation of , partition the interval [a, b] into n subintervals, [x_{i}, x_{i+1}] for i = 0, . . ., n − 1, with x_{0} = a and x_{n} = b. Then . This composite rule breaks the whole integral into many smaller parts, but postpones the question of how to approximate any single part.

The approximation of a single part will be made using a simple rule. Within the interval [x_{i}, x_{i+1}], insert m + 1 nodes, for j = 0, . . ., m. Figure 5.1 ...