PUBH-450 · Lesson 8 of 12 · 21 min

Analyzing trends over time

▶ Video coming soon A video version of this lesson is on the way.

At the October 2026 board of health meeting, a member held up a newspaper story: chlamydia in Kestrel Valley had “soared by 40 percent”. The figures were correct. The region had recorded 250 cases in 2024 and 350 in 2025. But when Dr. Sorensen asked the surveillance team to look more closely, the picture was more complicated. In early 2025, the region’s largest sexual health clinic had begun offering self-collected swabs and testing every client rather than only those with symptoms. The number of chlamydia tests performed had risen by 55 percent, and the proportion of tests that were positive had actually fallen slightly. Something real might still be happening, especially among young adults in Corbel Falls, but the headline number mostly reflected more testing.

Analyzing trends is the most common task in surveillance and one of the easiest to get wrong. This lesson covers how to organize data in time, how to choose dates and denominators, how to smooth and describe change, how to set baselines and thresholds that tell you when a count is unusual, and how to recognize the artifacts that create false trends. The statistical methods are described conceptually; the calculations shown can be done by hand or in any statistical package.

Organizing data in time

The first decisions are which date to use and which time unit. A case has many dates: symptom onset, specimen collection, diagnosis, report to public health and data entry. For outbreak and trend analysis, onset date is closest to the timing of infection, but it is often missing, so many systems use the earliest available date or the specimen collection date. Report date is always available but adds reporting delay and is affected by weekends, holidays and backlogs. Whatever date is used must be stated and used consistently.

The time unit depends on the question. Daily data show day-of-week patterns that are mostly artifacts of when clinics and laboratories work. Weekly data are standard for infectious diseases, using epidemiological weeks that run from Sunday to Saturday and are numbered from 1 to 52 or 53 each year, so that weeks are comparable across years. Monthly, quarterly or annual data are used for chronic diseases, deaths and conditions with small numbers.

A time series can be thought of as several components added together or multiplied:

  • Long-term trend: the general direction over years.
  • Seasonality: regular patterns within a year, such as winter respiratory viruses, summer enteric infections and spring and summer tick-borne diseases.
  • Cycles: multi-year patterns, such as the outbreaks every few years of pertussis or the alternating years of some influenza strains.
  • Irregular variation: random fluctuation and one-off events, including outbreaks.

Smoothing

Raw daily or weekly counts bounce around. A moving average replaces each value with the average of it and its neighbors, smoothing random variation and day-of-week effects. A 7-day moving average of daily data removes the weekly cycle completely, because every average includes one of each day. A centered moving average uses values before and after the point, which aligns the smooth line with the true timing but cannot be calculated for the most recent days; a trailing moving average uses only past values, which can be calculated up to today but lags behind real changes by about half the window. Dashboards usually use trailing averages and should say so.

Counts, rates and denominators

Counts are useful for planning, because they tell you how many people need services. For comparing over time, rates are usually better, because populations grow, shrink and age. A town whose population doubles will see more cases even if risk is unchanged. Over long periods, age-standardized rates are needed for conditions strongly related to age, such as cancer and heart disease, because an aging population raises crude rates even when age-specific risk is falling.

When testing changes, the right denominator may be the number of tests rather than the population. Test positivity, the proportion of tests that are positive, helps separate changes in disease from changes in testing: if cases rise but positivity falls, increased testing is probably part of the story. Positivity has its own biases, because it depends on who is tested, but together with case counts it gives a better picture than either alone.

Worked problem

Separating a testing effect from a disease trend

Kestrel Valley recorded 250 chlamydia cases from 5,000 tests in 2024 and 350 cases from 7,750 tests in 2025. The population aged 15 to 29 was 18,000 in both years. Describe the change in cases, rate and test positivity.

Show solution
  1. Change in cases: (350 − 250) ÷ 250 = 0.40, a 40 percent increase.
  2. Rate per 1,000 aged 15 to 29: 2024, 250 ÷ 18,000 × 1,000 = 13.9; 2025, 350 ÷ 18,000 × 1,000 = 19.4.
  3. Test positivity: 2024, 250 ÷ 5,000 = 5.0 percent; 2025, 350 ÷ 7,750 = 4.5 percent.
  4. Change in testing: (7,750 − 5,000) ÷ 5,000 = 0.55, a 55 percent increase.

Answer: Cases and rates rose by 40 percent, but tests rose by 55 percent and positivity fell from 5.0 to 4.5 percent. Most of the increase probably reflects expanded testing, which finds infections that were previously missed. That is good public health news, not evidence of a surge, although trends within subgroups still deserve a look.

Measuring change

Change can be described in absolute terms (the difference between two rates) or relative terms (the ratio or percent change). Both are useful, and a good report gives both: a 50 percent increase from 2 to 3 cases per 100,000 is very different from a 50 percent increase from 200 to 300.

Comparing only two years is fragile, because either year may be unusual. Over a longer period, analysts estimate an average annual percent change, either from the first and last values or, better, from a regression line fitted to all years. A common approach fits a straight line to the logarithm of the rate, so that the slope corresponds to a constant percent change per year. Joinpoint regression, developed at the United States National Cancer Institute and widely used in Canada and the United States, finds the years at which the trend changed direction or speed and reports a separate annual percent change for each segment, with confidence intervals. Count data are usually modeled with Poisson or negative binomial regression, the latter allowing for extra variation, as covered in PUBH-311, Biostatistics for Public Health.

Small numbers need particular care. For a count of rare events, random variation alone is roughly the square root of the count, so a count of 16 could easily have been anywhere from about 8 to 24 by chance; an approximate 95 percent interval is the count plus or minus 1.96 times its square root. A town that goes from 4 cases to 8 has “doubled”, but that change is well within chance. Reports for small areas should combine years, show confidence intervals or avoid percent changes altogether.

Worked problem

Average annual percent change and chance variation

The age-standardized rate of reported Lyme disease in Kestrel Valley rose from 5.0 per 100,000 in 2015 to 20.0 per 100,000 in 2025. In 2025 the region recorded 24 cases. Estimate the average annual percent change and an approximate 95 percent interval for the 2025 count.

Show solution
  1. Ratio of end to start: 20.0 ÷ 5.0 = 4.0 over 10 years.
  2. Average annual change: 4.0 raised to the power 1/10, minus 1. The tenth root of 4 is about 1.149, so the change is about 14.9 percent per year.
  3. Approximate interval for the count: square root of 24 is about 4.9; 1.96 × 4.9 = 9.6.
  4. Interval: 24 ± 9.6, or about 14 to 34 cases.

Answer: The rate rose by about 15 percent per year on average, quadrupling over the decade, a trend consistent with the northward spread of blacklegged ticks. Any single year’s count carries wide uncertainty, so year-to-year changes should not be over-interpreted.

Baselines and thresholds

Much of surveillance is asking whether the current count is higher than expected. That requires an expected value, or baseline, and a rule for how far above it a count must be before it counts as unusual, the threshold. Methods range from simple to sophisticated:

  • Comparison with the same period in previous years: for example, the average of the same week in the past five years, with an upper limit two standard deviations above. Simple and easy to explain.
  • Historical limits: a method long used in CDC’s weekly tables compares the current four-week total with 15 baseline values, the same, preceding and following four-week periods in each of the previous five years, and flags ratios above the mean plus two standard deviations.
  • Seasonal regression: the Serfling method, developed in the 1960s for influenza deaths, fits a regression line with a trend and a sine-and-cosine seasonal curve to weeks outside influenza seasons. The fitted line is the expected baseline, and an epidemic threshold is set somewhat above it, often at the upper limit of a 95 percent prediction interval. Weeks above the threshold indicate excess activity.
  • Short baselines for syndromic data: methods developed for CDC’s Early Aberration Reporting System compare today’s value with the mean and standard deviation of a recent window, such as the previous seven days, which adapts quickly to change but can be fooled by gradual rises.
  • Cumulative sum (CUSUM) methods: these add up small excesses over the expected value over time and signal when the running total crosses a limit, which detects sustained small increases that single-day comparisons miss.
A chart of weekly influenza-like illness as a percentage of emergency visits over three years, showing a seasonal baseline curve fitted with a trend and seasonal pattern, an epidemic threshold line above it, and observed values that rise above the threshold each winter.
A seasonal baseline and epidemic threshold of the Serfling type. Observed weeks above the threshold indicate influenza activity above what would be expected without an epidemic. Illustrative data.

Every threshold balances sensitivity, catching real increases early, against false alarms. A threshold of two standard deviations above the mean will be crossed by chance in roughly one week in 40 even when nothing is happening; applied to dozens of diseases and areas every week, that produces a steady stream of false signals. Analysts adjust thresholds to the purpose: lower for rare, serious diseases where one case matters, higher for common conditions monitored across many areas. A signal is a prompt to look, not a conclusion.

Recent data and nowcasting

Because of reporting delay, the most recent weeks of any series are incomplete, and a naive chart always seems to show a decline at the end. Analysts handle this by shading or labeling recent weeks as incomplete, by plotting by report date when timeliness matters more than precision, or by nowcasting: using the historical pattern of delays to estimate how many cases for recent weeks are still to come. If, historically, only 60 percent of a week’s cases are reported by the end of the following week, then 30 cases reported so far for last week suggest about 30 ÷ 0.6 = 50 cases eventually. Nowcasts should be shown with uncertainty and revised as data arrive.

Artifacts and breaks in series

Before interpreting any trend, ask what else changed. Common causes of artifacts include:

  • Changes in case definitions, such as the 2026 revisions to several nationally notifiable conditions described in lesson 2.
  • Changes in testing: new tests, screening programs, self-testing, laboratory consolidation or reduced testing.
  • Changes in coding, such as moving from ICD-9 to ICD-10 for causes of death, which introduced comparability ratios.
  • Changes in reporting systems: a new electronic feed may add a backlog of old cases at once.
  • Changes in care-seeking, including during the COVID-19 pandemic, when many people avoided health care in 2020 and 2021.
  • Revisions to population estimates, which change denominators retroactively, especially after a census.

Good practice is to keep a surveillance log of every known change, mark changes on charts with a vertical line and a note, and where possible analyze periods before and after a break separately.

Common mistakes

  • MistakeReporting a percent change between two years of small counts.

    InsteadShow confidence intervals, combine years or report counts; small numbers vary a lot by chance.

  • MistakeInterpreting the last few weeks of data as a decline.

    InsteadRecent weeks are incomplete; label them, use nowcasting or wait for data to mature.

  • MistakeIgnoring changes in testing when cases rise.

    InsteadLook at the number of tests and test positivity alongside cases.

  • MistakeUsing crude rates for long-term trends in age-related diseases.

    InsteadUse age-standardized rates when the population is aging.

  • MistakeTreating every threshold crossing as an outbreak.

    InsteadThresholds produce false alarms by design; verify the data and the context before acting.

Summary and key terms

  • Choose and state the date (onset, specimen, report) and time unit; epidemiological weeks make years comparable.
  • Time series combine trend, seasonality, cycles and irregular variation; moving averages smooth noise, and trailing averages lag real changes.
  • Rates, age-standardized rates and test positivity help distinguish real change from population and testing effects.
  • Change is described with absolute and relative measures, average annual percent change, joinpoint and count regression, with attention to chance in small numbers.
  • Baselines and thresholds, from historical comparisons to Serfling regression, short syndromic baselines and CUSUM, flag unusual counts; nowcasting adjusts for reporting delay; artifacts must be logged and marked.
Epidemiological week
A standard week, usually Sunday to Saturday, numbered through the year so that weekly data can be compared across years.
Moving average
An average of consecutive values that smooths random variation in a time series.
Test positivity
The proportion of tests performed that are positive.
Annual percent change
The average percentage by which a rate changes each year over a period, usually estimated by regression.
Joinpoint regression
A method that identifies points where a trend changes and estimates the annual percent change in each segment.
Baseline
The expected level of a health indicator in the absence of unusual activity.
Epidemic threshold
A level above the baseline beyond which activity is considered higher than expected.
Serfling method
A seasonal regression approach that fits trend and sine-cosine terms to non-epidemic periods to estimate a baseline.
CUSUM
A cumulative sum method that signals when small excesses over expected values add up beyond a limit.
Nowcasting
Estimating the eventual count for recent periods by adjusting for typical reporting delays.

Practice problems

Work each problem on paper first, then reveal the answer to check.

  1. A region had 12 cases last year and 18 this year. Is this clearly an increase?

    Show answer

    Not clearly. The approximate 95 percent interval for 18 is 18 ± 1.96 × 4.2, or about 10 to 26, which includes 12; the change may be chance.

  2. Historically, 75 percent of a week’s cases are reported within 7 days. Last week has 45 reported cases so far. Estimate the eventual count.

    Show answer

    45 ÷ 0.75 = 60 cases.

  3. Why does a 7-day moving average of daily data remove day-of-week effects?

    Show answer

    Each average contains exactly one of each day of the week, so the weekly pattern averages out.

  4. A rate rose from 10 to 15 per 100,000 over 5 years. What is the average annual percent change?

    Show answer

    15 ÷ 10 = 1.5; the fifth root of 1.5 is about 1.084, so about 8.4 percent per year.

Lesson quiz · 5 questions

Score 60% or more to complete this lesson.

Take the quiz