Tutorials › Regression Analysis (Undergraduate) › Clustered Sampling Versus Clustered Assignment

Grouped Data and Dependence Awareness · Tutorial 873 of 991

Clustered Sampling Versus Clustered Assignment

Learn to separate the units that were sampled from the units that were assigned, and explain why neither count alone always describes independent information.

Advanced 9 min read

What You'll Learn

  • Distinguish clustered sampling from clustered assignment
  • Identify sampling units and assignment units in a study design
  • Explain how shared settings can make observations dependent
  • Recognize when fixed-allocation randomization makes assignment indicators dependent
  • Track both sources of grouping when they occur in the same study

Two Different Ways a Study Can Be Clustered

A data set may contain many individual records but much less independent information than its row count suggests. To understand why, it helps to ask two separate questions: How were the observations sampled? And at what level was the intervention assigned? These questions describe different parts of a study design, even when both involve groups such as schools, clinics, or households.

In clustered sampling, investigators select groups or settings and then observe multiple people or other units within them. In clustered assignment, the intervention or condition is assigned to a group, so its members share the same assigned condition. A study can have either feature or both. The distinction matters because shared environments can make outcomes similar, while group assignment limits which units provide treatment comparisons.

Definition: A sampling unit is a unit selected by the sampling design. In clustered sampling, the primary sampling units are groups, and smaller units within selected groups may also be sampled. An assignment unit is the smallest unit to which an intervention or experimental condition is assigned. These units need not be the same.

Clustered Sampling: Groups Enter Through Selection

Suppose investigators select schools and then record information on students in those schools. The schools are sampling units at the first stage, and the students are observed within the selected schools. Students in one school share teachers, facilities, policies, and local circumstances. Such shared conditions can make their outcomes more alike than outcomes from students in different schools. In regression terms, observations within a school may therefore be dependent.

That dependence is not created by assigning students to an intervention. There may be no intervention at all. It arises because observations are grouped in shared settings, and the sampling design selects those settings as part of how the data are obtained. If the scientific goal is to describe a broader population of schools or students, the sampled schools are important sources of information about that population.

The number of individual records still matters: it describes how many measurements were collected. But it does not turn every person into a separate independent draw when people share sampled settings. The relevant count of primary sampling units is the number of independently selected clusters under the stated sampling assumptions. A sampling design that selects a fixed number of groups without replacement can itself make selection indicators dependent; the exact design should not be replaced with an assumption of independent selection.

Worked Example: Students Sampled Within Schools

A hypothetical survey selects 12 schools from a large population of schools and records the study hours and examination scores of 25 students at each selected school. Assume the schools can be treated as independent primary sampling units for this analysis, and that students within a school may have correlated outcomes. No treatment is assigned. How should the study be described?

Sampling structure. The primary sampling units are the 12 schools. Students are observed within those selected schools. The number of student records is \(12 \times 25 = 300\).

Dependence. The 300 student records are not automatically 300 independent pieces of information. Students in the same school share a setting, so their scores could be related even after accounting for measured study hours. Under the stated assumption, there are 12 independent primary sampling clusters, not 300 independently sampled schools or students.

Assignment structure. There is no intervention in this survey, so there is no treatment assignment unit to count. The study is clustered through sampling and shared settings, not through clustered assignment. The fact that study hours are recorded for each student does not change the sampling design.

Clustered Assignment: Groups Receive the Condition

In an experiment, assignment is clustered when a condition is allocated to a group rather than separately to each person. For example, a service might be introduced at the clinic level, with every participating patient at a clinic receiving the clinic's assigned service. The clinic is then the assignment unit; the patient is an outcome-measurement unit.

This design has a direct consequence for treatment comparisons: patients within one clinic do not provide separate, independently randomized assignments. They all inherit the clinic's assignment. The number of people measured can be much larger than the number of assignment units. That does not mean the assignment indicators for different clinics are necessarily independent; their dependence is determined by the randomization scheme.

For example, assigning exactly half of a fixed set of clinics to each condition constrains the assignment of any one clinic once the assignments of others are known. The clinics are still the units to which treatment was assigned, but the indicators recording their assignments are dependent. It is therefore important to distinguish the number of assignment units from the number of independent randomization decisions.

Worked Example: A Fixed Number of Clinics per Condition

In a hypothetical trial, eight clinics are assigned to a new service or usual care by randomly choosing exactly four clinics for the new service. Every patient at a clinic receives that clinic's condition. Let \(A_1\) and \(A_2\) equal 1 if two specified clinics receive the new service and 0 otherwise. Find the probability that both receive it, and determine whether these two assignment indicators are independent.

Assignment units. There are eight clinic-level assignment units. Patients are measured within clinics, but patients are not separately randomized to the service.

For the first specified clinic, four of the eight possible assigned places are filled by new-service clinics, so \(P(A_1=1)=4/8=1/2\). If that clinic is assigned the new service, three of the remaining seven places go to the new service, giving

$$ P(A_1=1,A_2=1) = \frac{4}{8}\frac{3}{7} = \frac{3}{14} \approx 0.2143. $$

If the two indicators were independent, their joint probability would be the product of their marginal probabilities:

$$ P(A_1=1)P(A_2=1) = \frac{1}{2}\frac{1}{2} = \frac{1}{4} = 0.25. $$

Since \(3/14 \ne 1/4\), the indicators are dependent. Their covariance is \(3/14 - (1/2)(1/2) = -1/28 \approx -0.03571\), which is negative because assigning one clinic to the new service leaves fewer assigned places for the other. Thus, the number of cluster-level assignment units is eight, not the number of patients; the assignment indicators are nevertheless dependent under this fixed-count scheme.

Why the Two Counts Answer Different Questions

The sampling design and the assignment design identify different routes by which information can be limited. Sampling units concern how the observed settings enter the data and, in a sampling-based analysis, how well those settings represent a wider population. Assignment units concern which units received randomized conditions and therefore where treatment variation was introduced.

These counts should not be substituted for one another. A study might sample a large number of people from a small number of schools, or it might randomize a small number of clinics while measuring many patients at each clinic. In the first case, the number of sampled schools is central to the sampling structure. In the second, the number of randomized clinics is central to the assignment structure. Neither count alone completely describes the dependence or the precision of every possible regression estimate.

A useful short justification is to trace how a shared source enters the design. If two records share the same selected school, they share a sampled setting; their errors or outcomes may therefore be related. If two people share the same clinic-level assignment, their treatment indicators are identical because one clinic condition applies to both. In either case, treating the records as unrelated simply because they occupy different rows ignores a feature of how the data were generated.

Key takeaway: Count and name the units separately: the units sampled, the units observed, and—if there is an intervention—the units assigned. Shared settings can induce outcome dependence, and a group-level intervention limits treatment variation to the assignment level. Assignment indicators across groups may still be dependent under the randomization scheme.

When Sampling and Assignment Both Occur

Many experiments contain both structures. Investigators may first sample settings from a population and then randomize an intervention to groups within those settings. In that case, the same label—for example, “clinic”—may describe a sampling unit and an assignment unit, or the two levels may differ. The study description must establish which role each group plays.

The following hypothetical design makes the distinction explicit. Assume six regions are independently selected as primary sampling units. Two hospitals are included in each region, and within each region a random procedure assigns exactly one hospital to a new program and the other to usual care. The pairwise randomizations in different regions are performed independently. Thirty patients are measured per hospital.

Worked Example: Sampled Regions and Randomized Hospitals

Identify the sampling units, assignment units, number of patient records, and the dependence between the two hospitals' assignment indicators within a region.

Sampling units. The six regions are the independently selected primary sampling units under the stated design assumption. Hospitals and patients are observed within them.

Assignment units. There are \(6 \times 2 = 12\) hospitals to which conditions are assigned. The patients are not assigned individually; each patient's hospital determines the condition received.

Patient records. The total is \(6 \times 2 \times 30 = 360\) patients. This count describes the number of measured patients, not the number of independently assigned hospitals.

Within-region assignment dependence. Let \(B_1\) and \(B_2\) indicate assignment to the new program for the two hospitals in one region. Exactly one is assigned the program, so \(P(B_1=1)=P(B_2=1)=1/2\), but \(P(B_1=1,B_2=1)=0\). Their covariance is \(0-(1/2)(1/2)=-1/4\), so the two indicators are dependent. Across regions, the six pairwise randomization decisions are independent by the stated design. Thus, there are 12 hospital assignment units but six independent pairwise randomization decisions. Those are different counts.

This design has both sources of grouping: regions enter through sampling, while hospitals receive the intervention through assignment. Patients share hospitals, regions, and hospital-level treatment conditions. A correct description preserves each of those facts rather than calling all 360 patients independent or using one generic “cluster count” for every purpose.

Common Mistake: Treating Every Cluster as an Independent Assignment

A frequent error is to say, “There are eight clinics, so there are eight independent treatment assignments.” The first part may correctly count the clinic-level assignment units, but the conclusion about independence does not follow. In a fixed allocation of four of eight clinics to treatment, any two clinic indicators have joint treatment probability \(3/14\), not \(1/4\). The allocation rule creates dependence.

The correction is to report the design precisely: eight cluster-level assignment units, with assignment indicators dependent under a fixed four-of-eight allocation. If a study uses independent random assignment at the cluster level, say so; if it uses a constraint, matching, or another allocation rule, describe that rule instead. Do not infer independence from the number of groups.

A related mistake is to treat a sampling cluster as though it must also be an assignment unit. A survey of students sampled within schools has school-level sampling but no treatment assignment at all. Conversely, an experiment can randomize clinics even if the participating clinics were not selected through a probability sample. Identify the role from the actual design, not from the group name.

Check Your Understanding

For each question, keep sampling units and assignment units separate.

  1. A survey selects 20 schools and measures 15 students per school. How many student records are collected, and what are the primary sampling units?
  2. A trial assigns each of 10 hospitals independently to one of two conditions, then measures 40 patients per hospital. What is the assignment unit, and why are the patients not 400 independently randomized units?
  3. Eight clinics are assigned to treatment by choosing exactly four. Explain why the number of assignment units does not establish that the clinic assignment indicators are independent.
  4. A study independently samples regions and, within each region, assigns one of two hospitals to an intervention. Name one source of grouping from sampling and one from assignment.
  5. Can a study have clustered sampling without clustered assignment? Can it have clustered assignment without a probability sample of clusters? Explain each briefly.