# Chapter 5 Statistical maps

## 5.1 Statistical distribution maps

The previous chapter demonstrated how the choice of a classification scheme can generate different looking maps. Your choice of classification breaks should be driven by the data. This chapter will focus on statistical approaches to generating classification breaks.

Many spatial datasets consist of continuous values. As such, one can have as many unique values as there are unique polygons in a data layer. For example, a Massachusetts median household income map where a unique color is assigned to each unique value will look like this:

Such a map may not be as informative as one would like it to be. In statistics, we seek to reduce large sets of continuous values to discrete entities to help us better “handle” the data. In the field of statistics, discretization of values can take on the form of a histogram where values are assigned to one of several equal width bins. A choropleth map classification equivalent is the equal interval classification scheme.

The histogram in the above figure is “flipped” so as to match the bins with the color swatches. The length of each grey bin reflects the number of polygons assigned their respective color swatches.

An equal interval map benefits from having each color swatch covering an equal range of values. This makes is easier to compare differences between pairs of swatches. Note that a sequential color scheme is used since there is no implied central value in this classification scheme.

### 5.1.1 Quantile map

While an equal interval map benefits from its intuitiveness, it may not be well suited for data that are not uniformly distributed across their range (note the disproportionate distribution of observations in each color a bin in the above figure). Quantiles define ranges of values that have equal number of observations. For example, the following plot groups the data into six quantiles with each quantile representing the same number of observations (Exceptions exist when multiple observations share the same exact value).

You’ll note the differing color swatch lengths in the color bar reflecting the different ranges of values covered by each color swatch. For example, the darkest color swatch covers the largest range of values, [131944, 250001], yet it is applied to the same number of polygons as most other color swatches in this classification scheme.

### 5.1.2 Boxplot map

The discretization of continuous values can also include measures of centrality (e.g. the mean and the median) and measures of spread (e.g. standard deviation units) with the goal of understanding the nature of the distribution such as its shape (e.g. symmetrical, skewed, etc…) and range. The boxplot is an example of statistical plot that offers both. This plot reduces the data to a five summary statistics including the median, the upper and lower quartiles (within which 50% of the data lie–also known as the interquartile range,IQR), and upper and lower “whiskers” that encompass 1.5 times the interquartile range. The boxplot may also display “outliers”–data points that may be deemed unusual or not characteristic of the bulk of the data.

Here, we make use of a divergent color scheme to take advantage of the implied measure of centrality (i.e. the median).

### 5.1.3 IQR map

The IQR map is a reduction of the boxplot map whereby we reduce the classes to just three: the interquartile range (IQR) and the upper and lower extremes. The map’s purpose is to highlight the polygons covering the mid 50% range of values. This mid range usually benefits from a darker hue to help distinguish it from the upper and lower sets of values.

The IQR map differs from the preceding maps shown in this chapter in that upper and lower values are no longer emphasized–whether implicitly or explicitly. While these maps consistently highlighted the prominent east-west gradient in income values with the higher values occurring in the east and the lower values occurring in the west, the IQR map reveals that the distribution of middle income households follows a pattern that is more dispersed across the state of Massachusetts.

### 5.1.4 Standard deviation map

If the data distribution can be approximated by a Normal distribution (a theoretical distribution defined by a mathematical function), the classification scheme can be broken up into different standard deviation units.

You’ll note from the figure that the income data do not follow a Normal distribution exactly–they have a slight skew toward higher values. This results in more polygons being assigned higher class breaks than lower ones.

### 5.1.5 Outlier maps

So far, emphasis has been placed on the distribution of values which attempts to place emphasis on the full range of values. However, there may be times when we want to place emphasis on the extreme values. For example, we may want to generate a map that identifies the regions with unusually high or unusually low values. What constitutes an outlier can be subjective. For this reason, we will rely on statistical techniques covered in the last section to help characterize regions with unusually high and/or low values.

#### 5.1.5.1 Boxplot outlier map

We can tweak the boxplot map from the last section by assigning darker hues to observations outside the whiskers (outliers) and a single light colored hue to all other values. By minimizing the range of color swatches, we place emphasis on the outliers.

You’ll note the asymmetrical distribution of outliers with a bit more than a dozen regions with unusually high income values and just one region with unusually low income values.

#### 5.1.5.2 Standard deviation outliers

In this next example, we use the +/- 2 standard deviation bounds from the Normal distribution to identify outliers in the income data. Hence, if the data were to follow a perfectly Normal distribution, this would translate to roughly the top 2.5% and bottom 2.5% of the distribution.

#### 5.1.5.3 quantile outliers

In this last example, we’ll characterize the top and bottom 2.5% of values as outliers by splitting the data into 40 quantiles then maping the top and bottom quantiles to capture the 2.5% fo values.

## 5.2 Mapping uncertainty

Many census datasets such as the U.S. Census Bureau’s American Community Survey (ACS) data are based on surveys from small samples. This entails that the variables provided by the Census Bureau are only estimates with a level of uncertainty often provided as a margin of error (MoE) or a standard error (SE). Note that the Bureau’s MoE encompasses a 90% confidence interval1 (i.e. there is a 90% chance that the MoE range covers the true value being estimated). This poses a challenge to both the visual exploration of the data as well as any statistical analyses of that data.

One approach to mapping both estimates and SE’s is to display both as side-by-side maps.

While there is nothing inherently wrong in doing this, it can prove to be difficult to mentally process the two maps, particularly if the data consist of hundreds or thousands of small polygons.

Another approach is to overlay the measure of uncertainty (SE or MoE) as a textured layer on top of the income layer.

Or, one could map both the upper and lower ends of the MoE range side by side.

### 5.2.1 Problems in mapping uncertainty

Attempting to convey uncertainty using the aforementioned maps fails to highlight the reason one chooses to map values in the first place: that is to compare values across a spatial domain. More specifically, we are interested in identifying spatial patterns of high or low values. What is implied in the above maps is that the estimates will always maintain their order across the polygons. In other words, if one polygon’s estimate is greater than all neighboring estimates, this order will always hold true if another sample was surveyed. But this assumption is incorrect. Each polygon (or county in the above example) can derive different estimates independently from its neighboring polygon. Let’s look at a bar plot of our estimates.

Note, for example, how Piscataquis county’s income estimate (grey point in the graphic) is lower than that of Oxford county. If another sample of the population was surveyed in each county, the new estimates could place Piscataquis above Oxford county in income rankings as shown in the following example:

Note how, in this sample, Oxford’s income drops in ranking below that of Piscataquis and Franklin counties. A similar change in ranking is observed for Sagadahoc county which drops down two counties: Hancock and Lincoln.

How does the estimated income map compare with the simulated income map?

A few more simulated samples (using the 90% confidence interval) are shown below:

### 5.2.2 Class comparison maps

There is no single solution to effectively convey both estimates and associated uncertainty in a map. Sun and Wong offer several suggestions dependent on the context of the problem. One approach adopts a class comparison method whereby a map displays both the estimate and a measure of whether the MoE surrounding that estimate extends beyond the assigned class. For example, if we adopt the classification breaks [0 , 20600 , 22800 , 25000 , 27000 , 34000 ], we will find that many of the estimates’ MoE extend beyond the classification breaks assigned to them.

Take Piscataquis county, for example. Its estimate is assigned the second classification break (20600 to 22800 ), yet its lower confidence interval stretches into the first classification break indicating that we cannot be 90% confident that the estimate is assigned the proper class (i.e. its true value could fall into the first class). Other counties such as Cumberland and Penobscot don’t have that problem since their 90% confidence intervals fall inside the classification breaks.

This information can be mapped as a hatch mark overlay. For example, income could be plotted using varying shades of green with hatch symbols indicating if the lower interval crosses into a lower class (135° hatch), if the upper interval crosses into an upper class (45° hatch), if both interval ends cross into a different class (90°-vertical-hatch) or if both interval ends remain inside the estimate’s class (no hatch).

### 5.2.3 Problem when performing bivariate analysis

Data uncertainty issues do not only affect choropleth map presentations but also affect bivariate or multivariate analyses where two or more variables are statistically compared. One popular method in comparing variables is the regression analysis where a line is best fit to a bivariate scatterplot. For example, one can regress “percent not schooled”” to “income”” as follows:

The $$R^2$$ value associated with this regression analysis is 0.2 and the p-value is 0.081.

But another realization of the survey could produce the following output:

With this new (simulated) sample, the $$R^2$$ value dropped to 0.07 and the p-value is now 0.322–a much less significant relationship then computed with the original estimate! In fact, if we were to survey 1000 different samples within each county we would get the following range of regression lines:

These overlapping lines define a type of confidence interval (aka confidence envelope). In other words, the true regression line between both variables lies somewhere within the dark region delineated by this interval.

### References

Sun, M., and W. S. Wong. 2010. Incorporating Data Quality Information in Mapping American Community Survey Data.” Cartography and Geography Information Science 37 (4): 285–300.

1. The Bureau’s MoE can be computed from the SE as follows: $$MoE = 1.645 \times SE$$↩︎