Chapter 5

Numerical Integration

Consider a one-dimensional integral of the form img. 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 img, partition the interval [a, b] into n subintervals, [xi, xi+1] for i = 0, . . ., n − 1, with x0 = a and xn = b. Then img. 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 [xi, xi+1], insert m + 1 nodes, for j = 0, . . ., m. Figure 5.1 ...

Get Computational Statistics, 2nd Edition now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.