# Testing trend in proportions?

Simple question: I have a sequence of 10 proportions $(p_1,\dots,p_{10})$ (indexed by time), $p_j\in(0,1)$, that seems to have an increasing trend. How can I test this trend?

• What can you tell us about the ten sample sizes? Those are important information for analyzing the proportions.
– whuber
Commented May 31, 2016 at 21:37
• @whuber Those proportions correspond to the whole population which is around 10,000 individuals for each time.
– Gio
Commented May 31, 2016 at 21:38
• That's useful to know, thanks. As my other comments in this thread suggest, that simplifies the analysis and broadens the range of applicable procedures.
– whuber
Commented May 31, 2016 at 21:47

Welcome to CV. I've assumed that you've already looked at the graph of the proportions against time. The simplest approach would be to regress the proportions against time as the single predictor, assuming time is coded in an analyzable format, e.g., as in a trend from 1 to 10. This would give you the strength of a linear or deterministic relationship as well as its sign or direction. For curvilinear relationships, e.g., quadratic, introduce time-squared along with time. You don't have many observations so you can't fit too many more parameters with this method.

You don't indicate what the unit of time is for your data...e.g., is it daily, weekly, monthly, quarterly, etc. This would be useful information.

This CV thread discusses a similar question about trends... Describing trend magnitude or detecting trends Among the recommendations was one from @whuber regarding building a Loess model for seasonal decomposition ... http://www.wessa.net/download/stl.pdf

In addition, with so few observations many of the more advanced models and tests simply won't work, e.g., tests for unit root, stationarity, arima, etc...

• I just want to call attention to the value of weighting any such regression (if it is performed with least squares) by the reciprocal variances of the proportions. Those variances can be estimated as $p_i(1-p_i)/n_i$ where $n_i$ are the sample sizes, indicating a weighted least squares model is not much more complicated than the unweighted one. (A binomial GLM would deal with this issue automatically.) Please note, too, that the question you reference differs from this one in an important way: the objective there was description rather than formal testing.
– whuber
Commented May 31, 2016 at 21:36
• @whuber It sounds useful to point out the difference between the two threads. I can understand that the interpretations would differ, but in what important ways would the actual tests applied differ? Commented May 31, 2016 at 21:44
• OLS, WLS, and the Binomial GLM conceivably could give entirely different results! (It's likely the WLS and Binomial GLM would agree, unless the probabilities are extremely close to $0$ or $1$.) I have seen cases where all the results were "significant" but even the signs of the coefficient estimates differed. Your recommendation to plot the proportions over time is a good one, especially if those proportions are shown with point symbols whose areas are inversely proportional to their variances: this makes it visually evident which points to rely on.
– whuber
Commented May 31, 2016 at 21:50
• @whuber I hate it when that happens. Just out of curiosity, in your view is any inconsistency in results a function of the strength or magnitude of the trend as expressed, e.g., by a t-value in the simplest OLS model? So, the stronger the relationship, the less likely it is for the tests give conflicting results? Commented Jun 1, 2016 at 0:13

There is a test called the Mann-Kendall test that can assess if a particular (monotonic, or one-directional) trend exists. If you can conclude that no serial correlation exists, that the observations at time $i$ are representative of the conditions at time $i$, and that the sampling, measurements, etc. are unbiased and representative of the populations over time.

Although the article here doesn't mention testing proportions (just general random variables $x_1,\ldots,x_n$), I am confident that the test still works. There may be an issue if some of your observations are $0$ or $1$, but you wrote above that $p_i\in(0,1)$ so that should be avoided.

• The null hypothesis of the Mann-Kendall test is that all ten proportions were obtained independently from a common population. That is a plausible hypothesis when the ten proportions are based on approximately the same sample sizes; otherwise, it cannot possibly be true, ever, and thus one would be suspicious of the p-value. The issue of serial correlation is especially important, because this sample appears to be too small to check it. Serial correlation could easily be confused with a real trend.
– whuber
Commented May 31, 2016 at 21:31