Introduction
Many regression questions begin with data collected as life unfolds: students choose how much to study, patients receive care in existing settings, or residents experience different neighborhood conditions. A researcher may record a predictor and an outcome, then ask whether the outcome tends to differ across predictor values. The resulting pattern can be useful, but the predictor has not necessarily been assigned in a way that makes the groups comparable.
This tutorial focuses on association questions based on observational data. The central task is to describe what relationship appears in the observed people or settings while keeping track of how those people or settings may differ. An association is a pattern in data; by itself, it does not say what would happen if the predictor were deliberately changed.
What Makes a Question an Association Question?
A well-framed association question identifies the predictor, the outcome, and the population or set of units of interest. For example: “Among adults in a specified region, how is reported weekly exercise time related to resting heart rate?” Exercise time is the predictor, resting heart rate is the outcome, and adults in the region define the group of interest. The question asks about a relationship in observed data. It does not ask what would happen to a particular adult’s heart rate if that adult were made to exercise more.
The predictor can be quantitative, such as hours of exercise, or categorical, such as type of workplace. The outcome can also be quantitative or categorical. The form of the variables affects how a relationship is summarized, but it does not change the basic distinction: an association question describes how outcomes vary across observed predictor values.
For a categorical predictor, one simple description compares the sample mean outcome in each predictor group. For a quantitative predictor, a description might compare typical outcomes across ranges of predictor values or describe the direction and strength of a pattern. These are descriptions of the observed relationship, not automatically explanations of why it exists.
Worked Example: Describing an Observed Difference in Scores
In a hypothetical sample, a teacher records whether each student attended an optional study session and the student’s score on a later quiz. Four attendees score 82, 86, 88, and 84 points. Four nonattendees score 73, 77, 79, and 75 points. The students chose whether to attend; the teacher did not assign attendance.
The predictor is study-session attendance (attended or did not attend), and the outcome is quiz score, measured in points. The association question could be: “Among these students, how does mean quiz score differ between attendees and nonattendees?”
For attendees, the sample mean is
For nonattendees, the sample mean is
The observed difference is \(85-76=9\) points: attendees in this hypothetical sample scored 9 points higher on average. That arithmetic answers the descriptive comparison. It does not establish that attending the session caused a 9-point increase, because attendance was not assigned and the two groups may differ in other ways.
Observing a Predictor Is Not the Same as Assigning It
The word “random” can refer to two different parts of a study. Random sampling concerns how units are selected from a population. Random assignment concerns how units are allocated to predictor conditions. Random sampling can help a study represent its target population, while random assignment can make groups more comparable for studying the effects of assigned conditions. One does not imply the other.
A study can use a random sample and still be observational: the sampled people may report their existing habits, with no habit assigned by the researcher. Conversely, a study may assign conditions without drawing a random sample from a broad population. When describing whether data are observational, the key question is whether the researcher assigned the predictor values, not whether the sample was selected randomly.
Worked Example: Randomly Sampled but Observational
Suppose, hypothetically, a team randomly selects 200 adults from a city directory and records each person’s usual daily screen time and nightly sleep. The team did not set anyone’s screen time. In the resulting data, adults reporting at least 5 hours of daily screen time average 6.4 hours of sleep, while those reporting less than 5 hours average 7.1 hours.
The observed difference is
In this sample, the higher-screen-time group averaged 0.7 fewer hours of sleep per night. The study is observational because screen time was recorded rather than assigned. It can still use random sampling; that feature concerns how adults entered the sample, not how their screen time was determined. The comparison describes the sampled groups and, subject to how well the sampling was carried out, may inform a population association. It does not show that assigning a person an additional hour of screen time would reduce that person’s sleep by 0.7 hours.
Why the Compared People or Settings Matter
Observed predictor groups are often not identical apart from their predictor values. People who choose different activities may also differ in their routines, resources, health, or preferences. Settings with different measured conditions may also differ in their organization, location, or the people they serve. As a result, a difference in outcomes across predictor groups can reflect a mixture of the predictor pattern and other differences in who or what is represented in each group.
This does not make an association meaningless. The observed pattern can accurately describe the population or sample as it exists. It does mean that the interpretation should stay at the level supported by the design: “the groups differed in their observed outcomes,” rather than “changing the predictor would produce that difference.” The distinction is especially important when an association will be used to guide a decision or make a claim about what would happen under a change.
Worked Example: A Difference in Setting Composition
Imagine a hypothetical comparison of patient waiting times at two clinics, A and B, grouped by whether the clinic has a lower or higher daily workload. In this deliberately simple example, waiting time is 10 minutes in Clinic A and 20 minutes in Clinic B in both workload groups. The group counts are:
| Workload group | Clinic A records | Clinic B records | Total records |
|---|---|---|---|
| Lower workload | 8 | 2 | 10 |
| Higher workload | 2 | 8 | 10 |
The mean waiting time in the lower-workload group is
The mean in the higher-workload group is
The observed difference is \(18-12=6\) minutes. Yet within each clinic, the example specifies the same waiting time in both workload groups: 10 minutes in Clinic A and 20 minutes in Clinic B. The overall difference appears because the higher-workload group contains more records from the clinic with longer waits. Here, the compared groups differ in their setting composition. The six-minute association describes the overall records, but it cannot be read as the change in waiting time that would result from increasing workload at either clinic.
A Short Justification: Group Averages Depend on Group Composition
The clinic example follows a general weighted-average identity. Suppose a predictor group contains records from several settings. Its overall mean is the sum of each setting’s mean multiplied by the fraction of group records from that setting. If \(w_{xg}\) is the fraction of records in predictor group \(x\) that come from setting \(g\), and \(\bar{y}_{xg}\) is the mean outcome for that group within that setting, then
In the clinic example, the setting means are 10 and 20 minutes. The lower-workload weights are \(0.8\) for Clinic A and \(0.2\) for Clinic B, so its mean is \(0.8(10)+0.2(20)=12\). The higher-workload weights are \(0.2\) and \(0.8\), so its mean is \(0.2(10)+0.8(20)=18\). Thus, even when the setting-specific means are the same across workload groups, different weights can produce different overall means.
This identity justifies a practical caution: an overall predictor-outcome pattern can partly reflect which people or settings contribute to each predictor group. It does not require the relationship to be absent or unimportant. It shows why a group difference alone cannot tell us which feature of the comparison accounts for it.
A Practical Way to Frame the Question
Before describing an association in observational data, state the comparison in ordinary language and check what the data can support. The following sequence keeps the roles of the variables and the interpretation clear.
Specify whose records are being described, such as patients at two clinics or adults in a city.
State what characteristic defines the comparison and what measured result is being described, including units when relevant.
If units or settings were observed in their existing conditions rather than assigned predictor values, treat the data as observational.
Report the observed relationship in context, and consider whether the groups differ in the people or settings they contain. Do not turn that description into an intervention claim.
For instance, “In the records from these clinics, higher workload was associated with longer average waits” is a statement about an observed pattern. “Increasing workload would make waiting time longer” is a statement about what a change would cause. The second claim asks for more than the association alone supplies.
Common Mistake: Treating an Observed Difference as an Effect
A common mistake is to see that one predictor group has a higher or lower average outcome and conclude that changing the predictor would change the outcome by that same amount. The reasoning skips over how people entered the groups and whether the groups differ in other relevant ways. In the study-session example, attendees scored 9 points higher on average, but the data do not show what those same students would have scored had their attendance been different.
The correction is to separate the descriptive result from an explanation. State the observed difference with its units and identify the groups being compared. Then say that the data show an association, while noting that the predictor was not assigned and that the groups may differ. This is not excessive caution: it is a precise account of what the design establishes.
Check Your Understanding
Try to answer each question using the distinction between observed association and assigned predictor values.
- A researcher records commuting time and self-reported stress for employees who choose their own commute. Identify the predictor and outcome, and state why the data are observational.
- A random sample of residents is used to record each person’s current neighborhood and health. Does random sampling make neighborhood an assigned predictor? Explain.
- In a hypothetical sample, one group averages 42 minutes of exercise per week and another averages 30 minutes. What is the observed difference, and what can it establish by itself?
- Explain how two predictor groups could have different overall mean outcomes even if their setting-specific means were the same.
- Rewrite this claim as a careful association statement: “Working from home improves employee productivity,” when the data only compare employees who do and do not work from home.