## 5.5 Trend Tests

A trend refers to an association or correlationAn estimate of the degree to which two sets of variables vary together, with no distinction between dependent and independent variables (USEPA 2013b). between concentration and time or spatial location, but can also refer to any population characteristic changing in some predictable manner with another variable. Trends take various forms, such as increasing, decreasing, or periodic (cyclic).

Detecting and assessing temporal and spatial trends is important for many environmental studies and monitoring programs. Trend tests are generally recommended as an intrawellComparison of measurements over time at one monitoring well (Unified Guidance). alternative to prediction limits or control charts for use in detection monitoring. Trend evaluations are frequently used to determine whether it is reasonable to assume concentrations are temporally stationaryA distribution whose population characteristics do not change over time or space (Unified Guidance). (for example, to perform statistical evaluations that require stationary means) and to detect or model decreasing trends to support natural attenuation studies. Table F-1 includes information about checking assumptions for Trend Tests.

### 5.5.1 Linear Regression (Parametric Methods to Test and Model Trends)

Linear regression is used to test for linear temporal trends. Ordinary least squares regression is used to fit the “best” straight line. A linear trend is reported when the slope of the regression line is demonstrated to be statistically different from zero (using a t-testA t-test, or two-sample test, is a statistical comparison between two sets of data to determine if they are statistically different at a specified level of significance (Unified Guidance).); a positive slope indicates an increasing trend and a negative slope a decreasing trend. The linear correlation coefficient Pearson’s r (Equation 3.5 in Chapter 3.3, Unified Guidance), which is the correlation coefficient between the observed and calculated concentrations, provides information about the direction and “strength” of the linear trend. A positive value of r indicates an increasing linear trend and a negative value a decreasing linear trend. The trend is “strong” if the absolute value of r (which ranges from – 1 to 1) is near one.

A regression line models concentrations for the period of time over which the concentrations were measured. However, this method is often used to predict concentrations at future times as well, under the assumption that the same linear relationship will be observed—an assumption that may not be valid for monitoring events in the distant future). For a decreasing trend, the regression line is often extrapolated to estimate the time at which a criterionGeneral term used in this document to identify a groundwater concentration that is relevant to a project; used instead of designations such as Groundwater Protection Standard, clean-up standard, or clean-up level. will be met. However, even when it is assumed that the regression line is valid for future monitoring, this approach will not necessarily result in conservative estimates (underestimate the actual time required to achieve a criterion), because it does not take into account the uncertainty of the regression fit that arises from the variability of the data around the calculated regression line. A set of concentrations that fall nearly on the calculated regression line will result in estimates that are more reliable than concentrations that exhibit much larger scatter about the same regression line. A confidence intervalStatistical interval designed to bound the true value of a population parameter such as the mean or an upper percentile (Unified Guidance). is often calculated for the regression line (Chapter 5.2) to account for the uncertainty of the meanThe arithmetic average of a sample set that estimates the middle of a statistical distribution (Unified Guidance). concentration as it varies linearly with time (for instance, to provide upper bound estimates of cleanup times or contaminant concentrations).

Many commercial statistical software packages offer multiple options for nonlinear regression fits. For example, many provide quadratic and cubic polynomials that can be used to model nonlinear trends. Many software packages also calculate confidence limits for nonlinear regression fits.

- Use trend tests to determine if the mean of the population is stationary, which is a requirement for the use of many statistical tests.
- Study Question 4: When will contaminant concentrations reach a criterion?
- Study Question 5: Is there a trend in contaminant concentrations?
- Study Question 7: What are the contaminant attenuation rates in wells?

- Linear regression assumes the residuals (the differences between the measured and calculated concentrations) are independent and normally distributed with a constant varianceThe square of the standard deviation (EPA 1989); a measure of how far numbers are separated in a data set. A small variance indicates that numbers in the dataset are clustered close to the mean. (with respect to time and concentration).

- Generate a time series plotA graphic of data collected at regular time intervals, where measured values are indicated on one axis and time indicated on the other. This method is a typical exploratory data analysis technique to evaluate temporal, directional, or stationarity aspects of data (Unified Guidance). initially to qualitative assess whether an apparent linear relationship exists.
- For ordinary least square regression fits, use scatter plots of the residuals (the differences between the measured and calculated concentrations) versus concentration and time to qualitatively evaluate whether the variance of the residuals is constant. For example, a “cloud” of points of relatively uniform width over the entire time or concentration rangeThe difference between the largest value and smallest value in a dataset (NIST/SEMATECH 2012). suggests the variance is constant.
- The residuals can be evaluated for normality using normal probability plots or statistical tests for normality.
- When regression residuals are not normally distributed, use mathematical transformations to normalize them. For example, taking logarithms of the concentrations and subsequently calculating a new regression line of the form
*ln(y) = c + dt,*may normalize the residuals. This approach ultimately results in a nonlinear equation that models the trend. For example, when a log-transformation is done, the regression line is “back transformed” by exponentiation, resulting in a nonlinear equation of the form*y = c' + exp(dt)*. - Use an autocorrelationCorrelation of values of a single variable data set over successive time intervals (Unified Guidance). The degree of statistical correlation either (1) between observations when considered as a series collected over time from a fixed sampling point (temporal autocorrelation) or (2) within a collection of sampling points when considered as a function of distance between distinct locations (spatial autocorrelation). test to verify that regression residuals are statistically independent.
- Linear regression is sensitive to outliers.

- Normality assumptions cannot be violated.
- Parametric methods are very sensitive to outliersValues unusually discrepant from the rest of a series of observations (Unified Guidance)..
- Nondetects cannot be readily addressed. The substitution of surrogate values for nondetectsLaboratory analytical result known only to be below the method detection limit (MDL), or reporting limit (RL); see "censored data" (Unified Guidance). (for example, multiples of the reporting limit) can produce erroneous results.

- Chapter 3.3, Unified Guidance, Common Statistical Measures, Sample correlation coefficient (Pearson’s r)
- Chapter 17.3.1, Unified Guidance, Linear Regression
- Chapter 21.3.1, Unified Guidance, Parametric Confidence Band Around Linear Regression

### 5.5.2 Mann-Kendall Test (Nonparametric Method to Test and Model Trends)

The Mann-Kendall test is a nonparametricStatistical test that does not depend on knowledge of the distribution of the sampled population (Unified Guidance). test for monotonic trends, such as concentrations that are either consistently increasing or decreasing over time. Therefore, the test is not appropriate when there are cyclic trends (where concentrations are alternatively increasing and then decreasing). The Mann-Kendall statistic provides an indication of whether a trend exists and whether the trend is positive or negative. Subsequent calculation of Kendall’s Tau permits a comparison of the strength of correlation between two data series.

The Mann-Kendall test can be used to evaluate the following:

- Are contaminant concentrations increasing or decreasing in upgradient or downgradient wells?
- Does contaminant flux, as measured across a plume cross section, indicate an increasing or decreasing trend?
- Are concentrations within a well stable?

The Mann Kendall statistic (S) is calculated through pair-wise comparisons of each data point with all preceding data points, and determining the number of increases, decreases, and ties. Pairs of nondetects below the reporting limit are “ties” that do not increase or decrease the value of S. A positive value for S implies an upward or increasing temporal trend, whereas a negative value implies a downward or decreasing trend. A value of S near zero suggests there is no significant upward or downward trend. The magnitude of S measures the “strength” of the trend. A statistically significant trend is reported if the absolute value of S is greater than the “critical value” of S (obtained from a table).

The nonparametric correlation coefficient Kendall’s tau (τ) can be calculated to evaluate the nonparametric correlation between two data series. It is essentially a scaled measure of S; τ = S/[n(n -1)/2], where n denotes the number of concentration measurements. Therefore, a statistical trend is equivalently demonstrated when τ is significantly different from zero. However, it is more convenient to evaluate trends using Kendall’s tau, because like the parametricA statistical test that depends upon or assumes observations from a particular probability distribution or distributions (Unified Guidance). linear correlation coefficient r, τ ranges from -1 to 1. A trend is “strong” if the absolute value of τ is near one.

- Trend tests may be used to determine if the mean of the population is stationary, which is a requirement for the use of many statistical tests.
- Study Question 4: When will contaminant concentrations reach a criterion?
- Study Question 5: Is there a trend in contaminant concentrations?
- Study Question 7: What are contaminant attenuation rates in wells?

This test assumes independent concentration measurements.

- Trend tests should be accompanied by time-series plots.
- The influence of nondetects should be evaluated. See Section 5.7 for more information regarding nondetect data.
- A minimum of 8 to 10 measurements is recommended; a larger data set may be required if data are skewed or contain nondetects.

- This test can be used when data sets contain nondetects.
- Results are not impacted by the magnitude of extreme values as with regression/correlation tests.
- This test is difficult to apply to data sets containing mixed detection limits and estimated values between the reporting limit and the detection limit.

- Example A.2, Testing a Data Set for Trends over Time
- Chapter 17.3.2, Mann-Kendall Trend Test, Unified Guidance.

### 5.5.3 Theil-Sen Trend Lines (Nonparametric Method to Test and Model Trends)

When a monotonic trendThe long-term movement in an ordered series, which regarded together with the oscillation and random component, generates observed values that are entirely increasing or decreasing. (EPA 2006c) is demonstrated using the Mann-Kendall test and the trend appears to be linear, you can use a Theil-Sen line to estimate the slope of the trend. The Theil-Sen line is a nonparametric alternative to the parametric ordinary least squares regression line. An ordinary least squares regression line models how the mean concentration changes linearly with time; a Theil-Sen line models how the medianThe 50th percentile of an ordered set of samples (Unified Guidance). (50th percentile) concentration changes linearly with time. Therefore, the approach may not be appropriate when more than 50% of the concentration measurements are nondetects. The slope of the Theil-Sen line will be significantly different from zero when Kendall’s tau is significantly different from zero (and vice versa). Like the parametric linear regression line, confidence intervals can be calculated for the nonparametric Theil-Sen line.

Chapter 21.3.2, Unified Guidance describes how to calculate confidence intervals for a Theil-Sen line using a computationally intensive procedure referred to as “bootstrappingA computerized method for assigning measures of accuracy to sample estimates. This technique allows estimation of the sample distribution of almost any statistic using only very simple methods. Bootstrap methods are generally superior to ANOVA for small data sets or where sample distributions are nonnormal (USEPA 2010)..” The Theil-Sen is initially calculated from a set of n sequential concentration measurements (y) over time (t): (t_{1}, y_{1}), (t_{2}, y_{2}) … (t_{n}, y_{n}). The bootstrapping method is subsequently used to calculate confidence limits. This method entails randomly selecting, with replacement, a set of n of these pairs. For example, if there are only two pairs (t_{1}, y_{1}) and (t_{2}, y_{2}), each selection or “iteration” results in one of four possible outcomes:

(t_{1}, y_{1}) and (t_{1}, y_{1})

(t_{1}, y_{1}) and (t_{2}, y_{2})

(t_{2}, y_{2}) and (t_{1}, y_{1})

(t_{2}, y_{2}) and (t_{2}, y_{2})

This selection is repeated a larger number of times, B (such as B = 1,000). A Theil-Sen line is calculated for each of the B iterations (sets of n pairs). At each time t_{i} (i = 1,…n), a concentration can be calculated using each of the B Theil-Sen lines, which results in a set of B calculated concentrations for each time.

Nonparametric confidence limits are obtained by calculating upper and lower percentiles of the B concentrations for each time. For example, if B = 1000, the 95% confidence interval of for concentration calculated from the original Theil-Sen line is obtained from the 25th largest concentration (2.5 percentile) and 975th largest concentration (97.5th percentile) of the B bootstrapA computerized method for assigning measures of accuracy to sample estimates. This technique allows estimation of the sample distribution of almost any statistic using only very simple methods. Bootstrap methods are generally superior to ANOVA for small data sets or where sample distributions are nonnormal (USEPA 2010). concentrations.

- Trend tests may be used to determine if the mean of the population is stationary, which is a requirement for the use of many statistical tests.
- Study Question 4: When will contaminant concentrations reach a criterion?
- Study Question 5: Is there a trend in contaminant concentrations?
- Study Question 7: What are the contaminant attenuation rates in wells?

This test assumes independent concentration measurements.

- The influence of nondetects should be evaluated. See Section 5.7 for information regarding nondetect data.
- Ensure that statistical software used for the Mann-Kendall test treats nondetects as inequalities. It is recommended that you do not use software for which it is necessary to assign surrogate values to nondetects, since this can produce unreliable results.
- A minimum of 8 to 10 measurements is recommended, a larger data set may be required if data are skewed or contain nondetects.
- Consider verifying that trend residuals are statistically independent (for example, using an autocorrelation test).

- This test can be used when data sets contain nondetects, but may not provide useful information if a large portion of the data set is nondetect.
- Results are not impacted by the magnitude of extreme values as with regression or correlation tests.
- This test is difficult to apply to data sets containing mixed detection limits and estimated values between the reporting limit and the detection limit.

Chapter 21.3.2, Unified Guidance, Nonparametric Confidence Band Around Theil-Sen Line

### 5.5.4 Spearman’s Rank Correlation Test

Spearman’s rank correlation coefficient rho (ρ) is a nonparametric correlation coefficient that can be used to test for monotonic trends. The Spearman rank correlation test is discussed further in Section 5.12.2 of this document.

Publication Date: December 2013