PUBH-499 · Lesson 3 of 12 · 26 min

Analysing the data

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

By Monday, September 28, 2026, Ayla Brennan had her data: the 2025 Kestrel Valley Student Health Survey in the agency’s secure analytic environment, trends from five earlier survey cycles, recreation and school data, an asset map and notes from the first three focus groups. She also had a problem common to every capstone. There were hundreds of possible tables, and she had two weeks. Dr. Hana Lindqvist told her to put the data away for an afternoon and write an analysis plan first. “Decide what comparisons answer your question before you look,” she said. “Otherwise you will find patterns that are only noise and miss the ones that matter.” This lesson follows Ayla’s analysis: estimating prevalence with proper confidence intervals, comparing groups, measuring inequities, interpreting trends and artefacts, benchmarking against other places, analysing qualitative data and bringing everything together. All Kestrel Valley data are invented for teaching.

Writing an analysis plan

An analysis plan lists, before analysis begins, the indicators to be estimated, the groups to be compared, the statistical methods and the rules for reporting. Writing it in advance protects against the temptation to search through many comparisons and report only the striking ones, a problem PUBH-310 Epidemiologic Methods discussed under multiple comparisons. Ayla’s plan, approved by Dr. Lindqvist, had six parts.

  • Profile: one or two headline indicators for each candidate issue (physical activity, mental health, food insecurity, vaping, injuries and dental health), with confidence intervals, for priority setting.
  • Main estimate: the weighted percentage of students reporting at least sixty minutes of activity on all seven days, overall and with a 95 percent confidence interval.
  • Planned comparisons: by gender, by grade, by community and by area deprivation quintile, with prevalence differences and ratios.
  • Trends: the main indicator for each survey cycle since 2015, with attention to changes in survey methods.
  • Related behaviours: active travel, organized sport, screen time and cost barriers by gender and deprivation.
  • Reporting rules: suppress estimates based on fewer than ten respondents or with very wide intervals; describe any unplanned analysis as exploratory.

Step 1: Estimate prevalence correctly

The survey’s complex design meant that ordinary formulas for a confidence interval would be too narrow. Students in the same class or school tend to be similar, so a cluster sample contains less information than a simple random sample of the same size. The design effect measures how much the variance increases because of the design; PUBH-450 Public Health Surveillance and Health Data showed how it reduces the effective sample size. Dr. Amara Osei had calculated that the design effect for activity indicators in this survey was about 1.6.

Worked problem

A confidence interval with a design effect

In the 2025 survey, 2,371 girls answered the activity question, and the weighted percentage reporting activity on all seven days was 12.2 percent. With a design effect of 1.6, what is the 95 percent confidence interval?

Show solution
  1. Calculate the standard error for a simple random sample: the square root of (0.122 × 0.878 ÷ 2,371) = the square root of 0.0000452 = 0.00672.
  2. Adjust for the design effect by multiplying by the square root of 1.6, which is 1.265: 0.00672 × 1.265 = 0.00850.
  3. Multiply by 1.96: 0.00850 × 1.96 = 0.0167, or 1.7 percentage points.
  4. The interval is 12.2 minus 1.7 to 12.2 plus 1.7: 10.5 to 13.9 percent.
  5. Without the design effect, the interval would have been about 10.9 to 13.5 percent, falsely precise.

Answer: The 95 percent confidence interval is about 10.5 to 13.9 percent. Analysts normally let survey software calculate intervals using the design variables, but checking with the design effect shows whether results are plausible.

Using the survey software, Mateo Ferreira produced the main estimates. Overall, 19.0 percent of students in grades 7 to 12 reported at least sixty minutes of activity on all seven days (95 percent confidence interval 17.6 to 20.4). The figure was 26.1 percent among boys (23.8 to 28.4) and 12.2 percent among girls (10.5 to 13.9). Among the 123 students who identified as trans or gender diverse, it was about 9 percent, but the interval ran from roughly 3 to 15 percent, too wide for a precise statement.

Step 2: Compare groups

Two measures describe the difference between groups, as PUBH-210 Principles of Epidemiology explained. The prevalence difference is an absolute measure: 26.1 minus 12.2 equals 13.9 percentage points. The prevalence ratio is a relative measure: 26.1 divided by 12.2 equals 2.14, so boys were a little more than twice as likely as girls to report daily activity. Both matter. Absolute differences show how many young people are affected and are what population programs act on; relative differences show the strength of the association.

A common shortcut is to judge whether a difference is real by checking whether confidence intervals overlap. Non-overlapping intervals do indicate a statistically significant difference, but overlapping intervals do not prove there is none, because the interval for a difference is narrower than the sum of the two separate intervals. Dr. Osei asked Ayla to test planned comparisons directly using the survey software’s design-adjusted chi-square test, and to report the interval for the difference itself.

The pattern by grade was the clearest finding in the data. Activity declined steadily from grade 7 to grade 12 for both genders, but the decline started from a lower level and was steeper in relative terms for girls.

Students reporting at least sixty minutes of activity on all seven days, by grade and gender, Kestrel Valley Student Health Survey 2025 (invented data; weighted, rounded).
GradeBoys (percent)Girls (percent)Difference (points)Ratio
73319141.7
83117141.8
92814142.0
102511142.3
11218132.6
12196133.2

The table illustrates why both measures are needed. The absolute gap stayed at about 13 or 14 points across grades, but the ratio rose from 1.7 to 3.2, because girls’ activity fell to very low levels by grade 12. A reader who saw only the ratios might conclude that the gender gap was widening; a reader who saw only the differences might conclude that nothing changed. Ayla reported both and described the pattern in words: by grade 12, only about one girl in seventeen reported daily activity.

Grouped bar chart of the percentage of students active sixty minutes on all seven days by grade from 7 to 12, with bars for boys falling from 33 to 19 percent and bars for girls falling from 19 to 6 percent.
Figure 1. Daily activity by grade and gender, Kestrel Valley Student Health Survey 2025 (invented data). Both groups decline with age; by grade 12, girls’ level is less than a third of boys’.

Step 3: Measure inequities by deprivation

To examine socioeconomic differences, Mateo had assigned each student an area deprivation quintile from their postal code, using a Canadian deprivation index built from census data on income, education, employment and household structure. Quintile 1 contained the least deprived fifth of the region’s small areas and quintile 5 the most deprived.

Activity, sport participation and cost barriers by area deprivation quintile, 2025 (invented data; 434 students without a valid postal code excluded).
Deprivation quintileStudentsDaily activity (percent)95 percent confidence intervalOrganized sport in past year (percent)Cost a barrier (percent)
1 (least deprived)98025.021.6 to 28.4719
290522.118.7 to 25.56413
389019.416.1 to 22.75818
466316.312.7 to 19.95124
5 (most deprived)94013.811.0 to 16.64431

The gradient was regular: each step toward more deprived areas brought lower activity, lower participation in organized sport and more frequent reports that cost prevented participation. The absolute difference between quintiles 1 and 5 was 11.2 percentage points, and the ratio was 0.55: students in the most deprived areas were a little over half as likely to report daily activity as those in the least deprived. Because the pattern ran across all five quintiles, it was a social gradient rather than a problem confined to the poorest areas, a distinction PUBH-240 Social Determinants of Health and Health Equity emphasized.

Comparing only the extremes wastes information. Summary measures that use all groups, such as the slope index of inequality, which estimates the absolute difference between the top and bottom of the distribution using a regression across all quintiles weighted by their population share, give a fuller picture. Dr. Osei calculated a slope index of about 14 percentage points, larger than the simple quintile 1 to 5 difference, as is typical when the gradient is regular and the extreme groups are averages of wider ranges.

Point chart with confidence interval bars showing daily activity falling from 25.0 percent in deprivation quintile 1 to 13.8 percent in quintile 5, with a dashed line for the regional average of 19.0 percent.
Figure 2. Daily activity by area deprivation quintile with 95 percent confidence intervals (invented data). The regular decline across all five quintiles is a social gradient.

Ayla also checked whether the deprivation gradient was simply the gender or grade pattern in disguise. It was not: the distribution of gender and grade was almost identical across quintiles, and the gradient appeared within both boys and girls. She noted, however, that area deprivation is an area-level proxy. Some students in deprived areas live in comfortable households and the reverse, so the gradient describes neighbourhoods, not individual families, and conclusions about individuals would risk the ecological fallacy.

The headline trend looked alarming: daily activity had been 24.8 percent in 2015, 24.1 percent in 2017 and 23.5 percent in 2019, then 17.2 percent in 2021, 18.4 percent in 2023 and 19.0 percent in 2025. Before writing “activity fell by a quarter during the pandemic and has not recovered,” Ayla checked for artefacts, changes in the numbers caused by changes in measurement rather than in reality.

Worked problem

Separating a real change from an artefact

In 2021, because many schools were closed for part of the spring, about 40 percent of students completed the survey online at home rather than in class. The gender question also changed that year. How should Ayla interpret the drop from 23.5 percent in 2019 to 17.2 percent in 2021, and the levels since?

Show solution
  1. List possible artefacts: the change of survey mode, a different mix of students responding (response rates fell in 2021), the new gender question (which affects only gender breakdowns, not the overall figure) and the fact that the survey asks about the past seven days, which in spring 2021 included periods of restrictions on sport and recreation.
  2. Compare in-class and at-home respondents in 2021: Mateo found that at-home respondents reported slightly lower activity, but the difference explained less than one percentage point of the drop.
  3. Check whether other sources point the same way: national surveys in Canada and international studies reported declines in youth activity during the pandemic, and recreation registrations in Corbel Falls fell sharply in 2020 and 2021.
  4. Examine the years since 2021, when the survey returned to the classroom: levels of 18.4 and 19.0 percent remain well below the 2015 to 2019 range of about 24 percent.
  5. Conclude cautiously: part of the 2021 drop may reflect the circumstances of that year and the change in mode, but the persistence of lower levels in 2023 and 2025, measured in the same way as before the pandemic, suggests a real decline that has not reversed.

Answer: The drop between 2019 and 2025, from about 23.5 to 19.0 percent, is likely real; the 2021 value should be flagged as affected by mode and circumstances. The report should state the trend with these caveats rather than as a precise “pandemic effect”.

Among girls, the decline over the decade was steeper, from 16.0 percent in 2015 to 12.2 percent in 2025, while among boys it was from 33.1 to 26.1 percent. In relative terms the two declines were similar, roughly a fifth to a quarter for each group.

Step 5: Benchmark carefully

Decision makers always ask how a community compares with others. Benchmarks are useful only when like is compared with like.

Ayla could not compare her figure of 19.0 percent with the Canadian Health Measures Survey figure of 21 percent of youth meeting the guideline, even though the numbers look close. The national figure is an average of daily minutes measured by accelerometers; the local figure is self-reported activity on every one of seven days, a stricter definition measured with more error. Accelerometer studies usually find lower adherence than self-report, while the every-day definition produces lower figures than an average, so the two sources differ in opposite directions and cannot be lined up. The closest benchmark was the Health Behaviour in School-aged Children study, which uses a very similar seven-day question, but it covers different grades and years, so Ayla treated it as a rough guide only. What the national data did show reliably was the same pattern: a much lower level among girls, a decline with age, and lower levels in lower-income households.

Step 6: Build the profile for priority setting

Because Ayla had promised to compare candidate priorities, she prepared a one-page profile table with the headline indicator for each issue, its confidence interval, its trend and its distribution. She chose indicators that the student survey or routine data measured well, and she used the same layout for each issue so that none looked more alarming simply because of how it was presented.

Youth health profile for priority setting, Kestrel Valley (invented data).
IssueHeadline indicator, 2025EstimateTrend since 2019Inequity
Physical activityActive sixty minutes on all seven days19.0 percentDownLarge by gender, grade and deprivation
Mental healthSelf-rated mental health fair or poor31 percentUp, then stableHigher among girls and gender-diverse youth
Food insecurityHousehold sometimes or often without enough food17 percentUpStrong deprivation gradient
VapingVaped in the past 30 days14 percentStableHigher in rural areas
InjuriesEmergency visits for sport and recreation injuries, ages 10 to 19Around 1,100 visits a yearStableHigher among boys
Dental healthNo dental visit in the past year22 percentDownStrong deprivation gradient

Analysing qualitative data

The six focus groups and fourteen interviews produced about 120 pages of notes and transcripts. Ayla used thematic analysis, a method described by Virginia Braun and Victoria Clarke in which the analyst becomes familiar with the data, generates initial codes, searches for themes, reviews them, defines and names them, and writes them up. She coded the first two transcripts line by line, built a short codebook with a definition and example for each code, and then asked Dr. Lindqvist to code the same two transcripts independently. They compared results, discussed disagreements and refined the codebook before Ayla coded the rest. This does not make qualitative analysis objective, but it makes the analyst’s decisions visible and challengeable.

Five themes emerged, each supported across several groups:

  • “Sport is for the sporty.” Many young people, especially girls and those who were not on school teams, described organized activity as competitive and selective. Several said that once they were cut from a team in grade 9 there was nothing else to do.
  • Cost and getting there. Fees, equipment and especially transportation were barriers, most acutely in rural areas and in Kestrel Crossing, where young people depended on parents with long work shifts.
  • Comfort and safety. Girls in both girls’ groups described discomfort with changing rooms, being watched or commented on, and feeling judged on their bodies or skills. Several had stopped physical education as soon as it was no longer compulsory.
  • Locked doors. Young people and two interviewees pointed out that school gyms and fields sat empty in the evenings and summer while community programs had waiting lists.
  • What already works. Participants valued informal and non-competitive options: the skate park, a drop-in climbing night, the volunteer cycling club and, in the Silver Pine group, land-based programs on the trapline and the water, which youth described as being about family and culture as much as activity.

Ayla also looked for negative cases, accounts that did not fit the themes. Several boys in the rural group said that farm work kept them very active and that they did not count it as exercise, which suggested that the survey might underestimate activity among rural youth who did physical work. She recorded this as a possible measurement issue.

Triangulation: bringing it together

Triangulation compares findings from different sources and methods to see whether they converge. Where they agree, confidence grows; where they disagree, there is something to explain. Ayla built a simple table with a row for each main finding and columns for the survey, routine data, the asset map and qualitative data.

Triangulation of main findings across sources (invented data).
FindingSurveyRoutine and asset dataQualitative dataConfidence
Girls’ activity falls steeply with ageYes, strong patternGirls’ registrations fall after age 13Comfort, safety and competition themesHigh
Deprivation gradient in activity and sportYes, regular gradientFacilities concentrated in less deprived areas; fee assistance under-usedCost and transport themesHigh
Little active travel despite short distancesAbout a quarter usually walk or cycleMissing sidewalks near two schoolsParents’ traffic fearsModerate
Rural youth less activeSlightly lowerFew facilitiesFarm work not countedLow: possible measurement issue

The analysis gave Ayla three confident findings for her report: physical activity among young people in Kestrel Valley was low and had declined; it fell steeply with age, especially among girls; and it followed a clear deprivation gradient linked to cost, transport and the location of facilities. It also gave her an honest list of uncertainties. These findings went into a four-page data brief that she circulated to partners before the engagement workshop in lesson 4.

Common mistakes

  • MistakeCalculating confidence intervals for complex survey data as if they came from a simple random sample.

    InsteadUse the survey design variables or, at minimum, adjust with the design effect.

  • MistakeReporting only relative or only absolute differences.

    InsteadReport both, and describe the pattern in plain words.

  • MistakeTreating a change in a trend as real without checking survey methods.

    InsteadLook for changes in mode, questions, response rates and circumstances before interpreting a trend.

  • MistakeComparing local and national figures that use different measures.

    InsteadBenchmark only with comparable definitions and methods, and say so explicitly.

  • MistakePresenting qualitative quotes as if they were representative statistics.

    InsteadUse themes to explain and illustrate patterns, report negative cases and be transparent about how codes and themes were developed.

Summary and key terms

  • An analysis plan written in advance sets indicators, comparisons, methods and reporting rules and protects against chasing noise.
  • Complex survey estimates need design-based confidence intervals; ignoring the design effect makes results look falsely precise.
  • Prevalence differences and ratios together describe group differences; a regular decline across quintiles is a social gradient, and the slope index of inequality summarizes it.
  • Trends must be checked for artefacts such as changes in survey mode, questions and response.
  • Benchmarks are valid only when definitions and methods match.
  • Thematic analysis with a codebook and a second coder, followed by triangulation across sources, turns qualitative and quantitative data into confident findings and honest uncertainties.
Analysis plan
A document written before analysis that lists the indicators, comparisons, methods and reporting rules to be used.
Design effect
The ratio of the variance of an estimate from a complex sample to the variance from a simple random sample of the same size.
Prevalence difference
The prevalence in one group minus the prevalence in another; an absolute measure of difference.
Prevalence ratio
The prevalence in one group divided by the prevalence in another; a relative measure of difference.
Social gradient
A pattern in which health improves step by step with each increase in social or economic position.
Slope index of inequality
A summary measure of absolute inequality across all groups of an ordered variable, estimated by regression.
Artefact
A change or difference in data caused by how they were collected or processed rather than by a real change.
Thematic analysis
A method for identifying, analysing and reporting patterns of meaning across qualitative data.
Codebook
A list of codes used in qualitative analysis, each with a definition and example.
Triangulation
Comparing findings from different data sources or methods to test whether they converge.

Practice problems

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

  1. Among 980 students in quintile 1, 25.0 percent reported daily activity; with a design effect of 1.6, what is the approximate 95 percent confidence interval?

    Show answer

    Standard error = square root of (0.25 × 0.75 ÷ 980) = 0.0138; × 1.265 = 0.0175; × 1.96 = 0.034. The interval is about 21.6 to 28.4 percent.

  2. Calculate the prevalence difference and ratio for quintile 5 (13.8 percent) compared with quintile 1 (25.0 percent).

    Show answer

    Difference = 13.8 − 25.0 = −11.2 percentage points; ratio = 13.8 ÷ 25.0 = 0.55.

  3. Why might the rural boys’ comments about farm work matter for interpreting the survey?

    Show answer

    The survey may undercount activity done as work, so the apparent rural deficit may partly reflect measurement rather than real differences.

  4. Give one reason the 2021 survey result should be flagged in the trend chart.

    Show answer

    Many students completed it online at home rather than in class, response fell and restrictions affected activity in the reference week, so the value may not be comparable with other years.

Lesson quiz · 5 questions

Score 60% or more to complete this lesson.

Take the quiz