4 Bivariate KDEs - a non-technical introduction

4.1 Basic ideas

The examples of univariate KDEs may not convince everyone of their merits relative to histograms and other similar presentational devices. The case for using KDEs becomes much stronger when dealing with bivariate data, for which histograms are demanding of data, unwieldy and difficult to interpret. There is also a richer range of presentational options than for the univariate KDE, as we shall illustrate.

The method for constructing a bivariate KDE is a direct extension of that described in the section on univariate KDEs. A data point is defined by two coordinates that may be plotted on a plane defined by axes that we shall denote by X and Y. To obtain a KDE a symmetrical three-dimensional "bump" is centred at each data point and the heights of the bumps are summed at each point on the plane (not just the data points) to get the KDE. An example of the final output is shown in Figure 8, using the heights and rim diameters of sixty Bronze Age Italian cups (used in Figure 1 to illustrate the construction of univariate KDEs). Two main size groups are apparent. Figure 9 shows an alternative presentation in which an overhead view of Figure 8 is taken, and the colouring corresponds to different heights of the KDE.

Figure 8: An example of a two-dimensional KDE

Figure 9: A different presentation of the KDE of Figure 8

Mathematically, the bivariate kernel is usually a symmetric probability density function. In all our examples we have taken the kernel to be a bivariate normal distribution.

4.2 Choice of window-width

The discussion of choice of window-width for univariate KDEs is relevant here, but other factors apply as well. One simplification that we shall make is to use kernels whose axes are aligned in the direction of the X and Y axes. Other orientations are possible, but this complicates matters and often not much will be lost by the simplification. It is then necessary to choose two window widths, h1 and h2, that define the spread of the kernel in the X and Y directions. Further simplification is achieved by letting h1 = h2, but this is not recommended by Wand and Jones (1995).

Theory concerning the optimal choice of h1 and h2 is less developed than for the univariate case, and recommendations in the literature vary. Our practice is to determine h1 and h2 separately using one of the rules for window-width selection for the univariate case - usually the normal scale or STE estimates. Our experience is that the former method tends to over-smooth so the examples given use the latter method unless otherwise stated.

4.3 Presentational issues

Figures 8 and 9 illustrate two ways of presenting the estimated KDE. This may not be to everyone's taste, and there is a much wider range of presentational options than for the univariate case. Choice of angle of view is obviously important and this is illustrated by way of an animation in section 5.3. The co-authors of this paper regularly argue about the merits of the use of colour in pictures such as Figures 8 and 9 - memorably likened to a "multi-coloured lollipop" by a discussant (Bob Laxton) of a previous paper of ours at a Computer Applications in Archaeology Conference. We suspect it was not intended as a compliment. Colouring can be switched off and black-and-white used, as in Figure 10; readers are invited to take their pick.

Figure 10: A Black and White KDE

Such problems can be avoided by taking an "overhead" view of the density and using contours. This can be done in a variety of ways that are illustrated in detail in the examples of the use of bivariate KDEs.

Finally, note that in the examples the use of bivariate KDEs can be viewed as an informal approach to (spatial) clustering that operates by smoothing the data. Other objectives, such as edge detection, are possible and other analytical procedures that do not involve smoothing may be necessary in such cases.


© Internet Archaeology URL:
Last updated: Tue Sep 10 1996