A note on multivariate Gauss-Hermite quadrature

Similar documents
PHYS-4007/5007: Computational Physics Course Lecture Notes Appendix G

Slow Growth for Gauss Legendre Sparse Grids

The Nonparametric Bootstrap

Functional Analysis Review

NOTES ON LINEAR ALGEBRA CLASS HANDOUT

Ch. 03 Numerical Quadrature. Andrea Mignone Physics Department, University of Torino AA

8 STOCHASTIC SIMULATION

Dipartimento di Matematica

Linear Algebra: Matrix Eigenvalue Problems

Pascal s Triangle on a Budget. Accuracy, Precision and Efficiency in Sparse Grids

CS 450 Numerical Analysis. Chapter 8: Numerical Integration and Differentiation

Statistical Geometry Processing Winter Semester 2011/2012

Week 7: Integration: Special Coordinates

PHYS 7411 Spring 2015 Computational Physics Homework 3

Slow Exponential Growth for Clenshaw Curtis Sparse Grids jburkardt/presentations/... slow growth paper.

Multivariate Distributions

3. Numerical integration

Exam in TMA4215 December 7th 2012

In numerical analysis quadrature refers to the computation of definite integrals.

Instructions for Matlab Routines

Word-length Optimization and Error Analysis of a Multivariate Gaussian Random Number Generator

APPENDIX A. Background Mathematics. A.1 Linear Algebra. Vector algebra. Let x denote the n-dimensional column vector with components x 1 x 2.

MA2501 Numerical Methods Spring 2015

ONE - DIMENSIONAL INTEGRATION

In this section again we shall assume that the matrix A is m m, real and symmetric.

Basic Calculus Review

Final Review Sheet. B = (1, 1 + 3x, 1 + x 2 ) then 2 + 3x + 6x 2

CITY UNIVERSITY. London

42. Change of Variables: The Jacobian

ZERO DISTRIBUTION OF POLYNOMIALS ORTHOGONAL ON THE RADIAL RAYS IN THE COMPLEX PLANE* G. V. Milovanović, P. M. Rajković and Z. M.

Cache Oblivious Stencil Computations

Representation theory and quantum mechanics tutorial Spin and the hydrogen atom

This appendix provides a very basic introduction to linear algebra concepts.

Polynomial chaos expansions for sensitivity analysis

Applications of Randomized Methods for Decomposing and Simulating from Large Covariance Matrices

Geometric Modeling Summer Semester 2010 Mathematical Tools (1)

Vectors To begin, let us describe an element of the state space as a point with numerical coordinates, that is x 1. x 2. x =

component risk analysis

Instructions: No books. No notes. Non-graphing calculators only. You are encouraged, although not required, to show your work.

Section 6.6 Gaussian Quadrature

t 2 + 2t dt = (t + 1) dt + 1 = arctan t x + 6 x(x 3)(x + 2) = A x +

University of Colorado Denver Department of Mathematical and Statistical Sciences Applied Linear Algebra Ph.D. Preliminary Exam January 22, 2016

Accuracy, Precision and Efficiency in Sparse Grids

Lectures in Discrete Differential Geometry 2 Surfaces

Math 350 Fall 2011 Notes about inner product spaces. In this notes we state and prove some important properties of inner product spaces.

Numerical Analysis Preliminary Exam 10 am to 1 pm, August 20, 2018

Elementary Linear Algebra

Sampling Distributions Allen & Tildesley pgs and Numerical Recipes on random numbers

Numerical integration and differentiation. Unit IV. Numerical Integration and Differentiation. Plan of attack. Numerical integration.

Basic Concepts in Matrix Algebra

Stabilization and Acceleration of Algebraic Multigrid Method

Romberg Integration and Gaussian Quadrature

Part IB GEOMETRY (Lent 2016): Example Sheet 1

4. Numerical Quadrature. Where analytical abilities end... continued

Reproducing Kernel Hilbert Spaces

EE731 Lecture Notes: Matrix Computations for Signal Processing

FFTs in Graphics and Vision. Homogenous Polynomials and Irreducible Representations

49. Green s Theorem. The following table will help you plan your calculation accordingly. C is a simple closed loop 0 Use Green s Theorem

Final Exam May 4, 2016

Sampling Distributions Allen & Tildesley pgs and Numerical Recipes on random numbers

Simple Examples on Rectangular Domains

PART II : Least-Squares Approximation

Numerical Methods I Solving Square Linear Systems: GEM and LU factorization

Optimal multilevel preconditioning of strongly anisotropic problems.part II: non-conforming FEM. p. 1/36

AM 205: lecture 8. Last time: Cholesky factorization, QR factorization Today: how to compute the QR factorization, the Singular Value Decomposition

Polynomial Chaos and Karhunen-Loeve Expansion

EECS 598: Statistical Learning Theory, Winter 2014 Topic 11. Kernels

linearly indepedent eigenvectors as the multiplicity of the root, but in general there may be no more than one. For further discussion, assume matrice

Exercise Set 7.2. Skills

Fast Numerical Methods for Stochastic Computations

Part IB Numerical Analysis

Linear Algebra, Summer 2011, pt. 3

Concentration Ellipsoids

STA 294: Stochastic Processes & Bayesian Nonparametrics

THE SINGULAR VALUE DECOMPOSITION MARKUS GRASMAIR

Exercises * on Linear Algebra

Exercises * on Principal Component Analysis

Slow Exponential Growth for Clenshaw Curtis Sparse Grids

MAC2313 Final A. (5 pts) 1. How many of the following are necessarily true? i. The vector field F = 2x + 3y, 3x 5y is conservative.

Introduction. Chapter One

Least Squares Optimization

Analytic Geometry. Orthogonal projection. Chapter 4 Matrix decomposition

Solutions for the Practice Final - Math 23B, 2016

Spatial Process Estimates as Smoothers: A Review

Gaussian random variables inr n

Statistical Pattern Recognition

A Short Note on Resolving Singularity Problems in Covariance Matrices

GENERALIZED GAUSS RADAU AND GAUSS LOBATTO FORMULAE

Contents. MATH 32B-2 (18W) (L) G. Liu / (TA) A. Zhou Calculus of Several Variables. 1 Multiple Integrals 3. 2 Vector Fields 9

Structure in Data. A major objective in data analysis is to identify interesting features or structure in the data.

Multivariate Gaussian Random Number Generator Targeting Specific Resource Utilization in an FPGA

The Instability of Correlations: Measurement and the Implications for Market Risk

Positive Denite Matrix. Ya Yan Lu 1. Department of Mathematics. City University of Hong Kong. Kowloon, Hong Kong. Abstract

An Empirical Chaos Expansion Method for Uncertainty Quantification

Principal Components Analysis (PCA)

Multivariate Gaussian Distribution. Auxiliary notes for Time Series Analysis SF2943. Spring 2013

Incompatibility Paradoxes

ON MEASURING HEDGE FUND RISK

The Standard Market Risk Model of the Swiss Solvency Test: an Analytical Solution

Linear Algebra 2 Spectral Notes

Transcription:

A note on multivariate Gauss-Hermite quadrature Peter Jäckel 1th May 5 1 Introduction Gaussian quadratures are an ingenious way to approximate the integral of an unknown function f(x) over a specified domain D with a known weighting kernel ψ(x). If the function f(x) is well approximated by a polynomial of order m 1, then a quadrature with n nodes suffices for a good estimate of the integral, i.e. D f(x)ψ(x) dx m w i f(x i ). (1) i=1 The nodes x i and weights w i are uniquely determined by the choice of the domain D and the weighting kernel ψ(x). In fact, one may go as far as to say that the choice of the domain and the kernel defines a quadrature. In particular, the location of the nodes x i are given by the roots of the polynomial of order m in the sequence of orthonormal polynomials {π j } generated by the metric π j π k := D π j(x)π k (x)ψ(x) dx = δ jk, and the weights w i can be computed from a linear system once the roots are known. The mathematics of quadrature methods is well understood and described in most textbooks on numerical analysis [PTVF9]. In the case of the integration domain to be the entire real axis, and the integration kernel given by the density of a standard normal distribution, the associate quadrature scheme is known under the name Gauss- Hermite since the involved orthogonal polynomials turn out to be Hermite polynomials. Gauss-Hermite quadrature is of fundamental importance in many areas of applied mathematics that uses statistical representations, e.g. financial mathematics and actuarial sciences. Reliable routines for the calculation of the roots and weights are readily available [PTVF9] and Global head of credit, hybrid, commodity, and inflation derivative analytics, ABN AMRO, 5 Bishopsgate, London ECM AA most mathematical software packages provide means for one-dimensional Gauss-Hermite quadrature calculations. Multivariate Gaussian quadrature In contrast to one-dimensional Gauss-Hermite quadrature, already at the level of two dimensions little is published on Gaussian quadrature with a multivariate normal metric ϕ(r, C) = e 1 r C 1 r () (π) d / C with the correlation matrix C, apart from the obvious recommendation to decompose it into a sequence of nested one-dimensional quadratures. This is where we start having a large amount of ambiguity: the set of nested one-dimensional integrations effectively amounts to a multivariate quadrature within which the integrand is evaluated at a discrete set of points and the computed function values are summed with weightings given by products of onedimensioal weights. Since the alignment of the onedimensional integrations is totally arbitrary, we effectively have a multitude of integration schemes at our disposal. To explain this in simple terms, assume that we are to compute a two-dimensional Gaussian integral f(x, y)ϕ(x)ϕ(y) dx dy with zero correlation between the two standard normal variates x and y. We can construct a two-dimensional Gaussian quadrature scheme with m m function evaluations from a one-dimensional Gauss-Hermite quadrature with roots {z k } and weights {w k } for k = 1..m 1

by the summation w i w j f(z i, z j ). (3) This scheme essentially samples the function f on a set of points in a rectangular configuration as shown in figure 1 for m = 15 where contourlines of the - - Figure 1: Sampling from a simple combination of onedimensional Gauss-Hermite quadratures results in a rectangular set of function evaluation points. distribution have been added for comparison. Since we have zero correlation between x and y, we could have chosen any arbitrary planar rotation of the the set {(z i, z j )} {(z i, z j)} with - - z = R z () with R being a rotation operator, and we will come back to this observation later. Another aspect of the weighted sampling scheme depicted in figure 1 is that the sheer appearance of the sampling set has one obvious unpleasant feature: on the diagonal, sampling points go much further in terms of distance to the origin than along the axes. Since the function values in those corner regions end up being weighted with extremely low weights, they contribute practically nothing at all to the total integral value. As a consequence, the quadrature scheme effectively wastes precious calculation time in the corners. This can be remedied to some extent, however, by the aid of the age-old straightforward trick known as pruning. We may simply set a threshold, say θ m := w 1 w [ m+1 ] m, (5) and drop all points that would be weighted with a net weight below θ m : 1 {wi w j >θ m} w i w j f(z i, z j ). () The effect of pruning can be seen in figure. - - Figure : Pruning. So far, we ignored correlation. In practice, we usually have non-zero correlation requirements. It may appear obvious to the reader how to account for correlation, though, here again, we have ambiguity as to how to proceed. An immediately intuitive method to incorporate correlation of magnitude ρ would be to use - - w i w j f(z i, ρz i + ρ z j ) (7) with ρ := 1 ρ. What we are implicitly doing with this scheme is that we are transforming from uncorrelated to correlated variates by the aid of a Cholesky decomposition: r = L z () The lower triangular matrix L satisfies L L = C. A surprising side-effect of this algorithm is that we are

- - - - - - - - - - - - - - - - - - - - - - - - - - - - Figure 3: Correlation incorporation by the aid of Cholesky decomposition. Top left: ρ =.5. Top right: ρ =.5 (pruned). Bottom left: ρ =.95. Bottom right: ρ =.95 (pruned). - - - - Figure : Correlation incorporation by the aid of spectral decomposition. Top left: ρ =.5. Top right: ρ =.5 (pruned). Bottom left: ρ =.95. Bottom right: ρ =.95 (pruned). not sampling symmetrically with respect to the principal axes which is in practice usually, though arguably, a desirable feature to have for a multivariate quadrature scheme 1. The effect of Cholesky decomposition on the sampling set is shown in figure 3. An alternative to Cholesky decomposition, and one that is definitely to be preferred when Monte Carlo methods with low-discrepancy number generators are used, is to decompose spectrally [Jäc]: find the eigensystem S and diagonal eigenvalue matrix Λ of C such that C = S Λ S, (9) set A := S Λ, (1) and sample from the correlated set of sampling points r = A z. (11) This scheme takes care of alignment with principal axes and the resulting sampling set is shown in figure. We now return to the issue of arbitrary rotation. We can see in figure that the automatic alignment with principal axes incurred by spectral incorporation of correlation effectively rotates the original square of 1 This is a purely empirical observation. sampling points showin in figure 1 such that the axes of the square become aligned with the principal axes. Out of all possible sections through the initial square, however, it is probably a different one that we would have preferred to become aligned with the principal axes, namely the one that already enhances sampling along the respective direction by virtue of the geometry of a square: the direction along the diagonals of the square. In two dimensions, this can be achieved by rotating the set of uncorrelated standard normal variates on a square grid by 5 prior to the principal axes transformation. In higher dimensions, this can be done analogously: transform the initial set of d-dimensional rectangular grid coordinates by a sequence of d 1 planar rotations of 5 degrees (the net rotation of which may be denoted as R), and then transform to principal axes by setting r = A R z. (1) In two dimensions, this scheme can be reduced to the formula with 1 {wi w j >θ m} w i w j f(az i + bz j, bz i + az j ) (13) It doesn t matter whether clockwise or counter-clockwise: both ways lead to the desired effect. 3

- - - - - - - - - - - - - - - - - - - - - - - - - - - - Figure 5: Principal axes rotation with spectral decomposition. Top left: ρ =.5. Top right: ρ =.5 (pruned). Bottom left: ρ =.95. Bottom right: ρ =.95 (pruned). - - - - Figure : Principal axes rotation with Cholesky decomposition. Top left: ρ =.5. Top right: ρ =.5 (pruned). Bottom left: ρ =.95. Bottom right: ρ =.95 (pruned). 1 + ρ + 1 ρ a := (1) 1 + ρ 1 ρ b :=. (15) The effect of this scheme is shown in figure 5. One could, of course, also apply the upfront rotation to the Cholesky decomposition scheme, and this results in the sampling set shown in figure As we can see, the rotation-cholesky scheme samples over a set of points that appear to be be just slightly skewed away from the principal axes. In contrast, the rotation-spectral scheme preserves symmetry with respect to the principal axes. This may be one of the reasons why I found empirically the two-dimensional Gaussian quadrature scheme given by equation (13) to be the most robust in practical applications among those presented above. 3 Polar coordinates In the previous section, we discussed the various possible choices how a multi-dimensional zero correlation Gauss-Hermite quadrature scheme can be adapted to account for correlation. The underlying scheme for zero correlation was given by a sequence of nested one-dimensional standard Gauss-Hermite quadratures which resulted effectively in a rectangular sampling grid. For two-dimensional problems, an alternative to this approach can be found by transforming the original integration problem to polar coordinates: 1 f(x, y) e (x +y ) dx dy = (1) π f (r cos [πu], r sin [πu]) e 1 r r dr du At this point, it is tempting to continue with f (r cos [πu], r sin [πu]) e 1 r r dr du = (17) f ( v cos [πu], v sin [πu] ) e v dv du and use Gauss-Laguerre quadrature for the inner integral. Hold your horses right there! This will not work since, chances are, f(, ) is a reasonably smooth function near the origin. This is because all Gaussian quadrature scheme are designed to work well for functions that are well or reasonably well approximated by polynomials. The square root function introduced

in transformation (17), however, has no polynomial representation at all! Thus, no matter how high we may go in the Gauss-Laguerre quadrature order, we will never be able to capture the fact that the square root function is not differentiable at the origin, and as a consequence, a two-dimensional Gauss-Hermite quadrature based on transformation (17) is very inefficient and unreliable. Still, the idea of the polar coordinate transformation (1) may not be all that bad after all. The main crux is that the roots and weights for a quadrature on the domain r (, ) with metric e 1 r r are not readily available. However, if we manage to compute the roots {r j } and weights {ω j } for j = 1..m for the m-th order quadrature - - - - - - - - - - - - f(r) e 1 r r dr m ω j f(r j ), (1) j=1 - - - - Figure 7: 1 1 two-dimensional Gauss-Hermite quadrature roots set based on the polar coordinate transformation (1). Top left: ρ =.5. Top right: ρ =.5 (pruned). Bottom left: ρ =.95. Bottom right: ρ =.95 (pruned). then the polar coordinate approach to two-dimensional Gauss-Hermite quadrature (1) can be used still! The required mathematics for the calculation of the roots {r j } and weights {ω j } for any onedimensional quadrature defined by its integration domain and weighting kernel is described excellently in [PTVF9]. For the particular case (1), the roots and weights have been computed and are tabulated up to order in [Jäc5]. The last point to be addressed is the outer integral on the right hand side of equation (1). A naïve attempt would be to tackle this one by the aid of Gauss- Legendre quadrature. However, since in practice the function f (r cos [πu], r sin [πu]) is almost surely not of polynomial form in u for constant r, this is also unlikely to lead to satisfactory results. Without further knowledge, and to avoid the risk of introducing a lateral bias, one may need to resort to simply equally weighted sampling in u, i.e. u j := (j 1) / m with equal weights 1 / m. An example for this is shown in figure 7. It remains to be mentioned that, since threedimensional polar coordinates are also well tried and tested in mathematics and numerical analysis, it is conceivable that the approach shown for twodimensionsal polar coordinates can be extended to three dimensions. References [Jäc] P. Jäckel. Monte Carlo methods in finance. John Wiley and Sons, February. [Jäc5] P. Jäckel. Roots and weights for radial Gauss- Hermite quadrature. www.jaeckel.org/ RootsAndWeightsForRadialGaussHermiteQuadra cpp, May 5. [PTVF9] W. H. Press, S. A. Teukolsky, W. T. Vetterling, and B. P. Flannery. Numerical Recipes in C. Cambridge University Press, 199. www.library. cornell.edu/nr/cbookcpdf.html. 5