“Is that to say we are against Free Trade? No, we are for Free Trade, because by Free Trade all economical laws, with their most astounding contradictions, will act upon a larger scale, upon the territory of the whole earth; and because from the uniting of all these contradictions in a single group, where they will stand face to face, will result the struggle which will itself eventuate in the emancipation of the proletariat.”
Karl Heinrich Marx · Marx-Engels Collected Works, Vol. VI, p. 290
Mathematics · Artificial intelligence · Open science
Navier–Stokes, LLMs, And The Ownership of Ideas
What OpenAI claims to have proved, why external forcing does count, and what the dispute reveals about the social future of mathematics.
José Mauricio Gómez Julián · September 9, 2026 · 16 min read
One of the most important and unusual mathematical stories in recent years began with a rumor. Two researchers, Tristan Buckmaster and Levent Alpöge, had spent months developing a line of work on singularities in fluid equations. OpenAI learned that something important was happening, deployed thousands of artificial-intelligence agents, and, a few days later, announced a proof of finite-time blowup for the three-dimensional Navier–Stokes equations.
The story contains every ingredient needed to produce confusion: one of the seven Millennium Prize Problems, a 166-page proof, a Lean formalization, about 10,000 agents, 130 billion tokens, allegations concerning scientific credit and private data, and a conversation that Buckmaster interpreted as pressure against his career. Understanding it requires resisting two simplifications. The first is that a large amount of computation automatically turns a result into scientific understanding. The second is that the presence of an external force makes the proof irrelevant. Neither is correct.
1. The fundamental question
The Navier–Stokes equations describe the motion of viscous fluids such as water and air. They do not track molecules one by one. They treat the fluid as a continuous medium and relate its velocity, pressure, viscosity, and external forces:
∂u/∂t + (u · ∇)u = −∇p + νΔu + f, ∇ · u = 0
u is velocity; p, pressure; ν, viscosity; and f, an external force. The second equality says that the fluid is incompressible.
In three dimensions, we know how to construct global weak solutions, meaning solutions that satisfy the equations in a generalized sense. What we did not know was whether smooth initial data always produce smooth solutions for all time or whether, under some conditions, velocity can grow without bound in finite time. Such a loss of regularity is called a singularity or blowup.
Viscosity tends to smooth differences in velocity. The nonlinearity represented by (u · ∇)u transports and reorganizes motion. The problem arises from the competition between these effects: is viscous dissipation always enough to prevent infinite concentration, or can three-dimensional dynamics overcome it?
A physical clarification
Mathematically infinite velocity does not mean that a real fluid literally reaches that speed. It means that the continuum model loses regularity and ceases to describe the process in the classical way. The question is mathematical, although it is physically motivated.
2. What Clay actually requires
The first indispensable correction belongs here. The official statement written by Charles Fefferman offers four routes. Alternatives A and B ask for global existence and smoothness when the external force is zero, respectively in the whole space and on the three-dimensional torus. Alternatives C and D permit a disproof of global regularity using smooth initial data and an external force that is also smooth, on those same two domains.
Alternative
Domain
External force
What must be shown
A
ℝ³
f = 0
Global existence and smoothness for every admissible initial datum.
B
𝕋³
f = 0
The same global regularity in the periodic case.
C
ℝ³
smooth f
Existence of data and a force for which there is no global classical solution of bounded energy.
D
𝕋³
smooth f
The corresponding breakdown in the periodic case.
Calling smooth forcing a “loophole” foreign to the prize is therefore technically incorrect. It is written into alternatives C and D. If OpenAI’s proof is correct and satisfies the stated hypotheses exactly, it would resolve the official problem through those routes.
That does not make all results equivalent. Producing a singularity with a specially constructed smooth force is a more limited claim, physically and conceptually, than proving a singularity without external forcing. It resolves the institutional disjunction formulated by Clay, but it does not answer the stronger question of whether unforced dynamics can break down by themselves. Both statements can be true at once, without verbal tricks.
External forcing does not formally invalidate the result; it precisely limits what the result teaches us about fluids.
3. What OpenAI claims to have proved
OpenAI’s paper constructs, for every positive viscosity, velocity and pressure fields that remain smooth up to a critical time, together with a smooth, compactly supported force f(x,t). The fluid starts from rest. As time approaches t = 1, the maximum velocity grows without bound, while total kinetic energy remains uniformly bounded.
The intuitive picture is a vortex that spins, stretches, and concentrates around an increasingly small region. Velocity can rise indefinitely without total energy blowing up because the volume occupied by the extreme motion contracts quickly enough. An imperfect but useful analogy is to concentrate ever greater intensity inside ever less space.
It is not enough to draw a singular flow and then define an infinite force to sustain it. That would be trivial and inadmissible. The difficulty is to make acceleration, pressure, nonlinear transport, and viscosity develop large terms that cancel with extraordinary precision, leaving a perfectly smooth external force as the residual. The paper introduces oscillatory pulses whose internal momentum transport corrects the singular parts of that residual.
Exact scope of the announced theorem
Yes: finite-time velocity blowup for three-dimensional Navier–Stokes with positive viscosity and a smooth external force.
Yes: uniformly bounded total kinetic energy throughout the evolution.
Yes, conditional on the proof being correct: alternatives C and D of the official formulation.
No: a proof of blowup for unforced Navier–Stokes.
Not yet: stable, independent acceptance by the mathematical community.
4. How the agents worked
According to OpenAI, on September 1 it assigned groups of agents to the different alternatives of several Millennium Prize Problems. The agents could consult a cached copy of the internet, run code, divide into groups, and communicate results. Nearly one hundred agents reportedly first produced a solution for unforced Euler. From that result, the company concentrated its resources on Navier–Stokes.
The decisive group eventually involved on the order of 10,000 concurrent agents. OpenAI reports that the result appeared after about 88 hours; Lean formalization and verification took an additional 17 hours using GPT-6 Astra. The Navier–Stokes effort reportedly involved 2.7 million messages and approximately 130 billion generated tokens.
These numbers neither prove understanding nor disprove it. They describe a new material organization of intellectual labor: massively parallel search, route selection, circulation of partial results, automated consolidation, and formal verification. Reducing this to “mere brute force” hides the coordination architecture; presenting it as an autonomous mathematical consciousness hides the human, bibliographical, and computational scaffolding that made the search possible.
5. The mathematical genealogy
The route did not emerge in a vacuum. Buckmaster attributes the basic idea of the program to Diego Córdoba and Luis Martínez-Zoroa, who had spent years studying forced blowups and mechanisms of amplification across scales. Their work had shown how increasingly concentrated layers of vorticity could amplify while the regularity of the force remained controlled.
Buckmaster and Alpöge took that program as their starting point. With extensive help from Claude and Codex, they say they pushed constructions with rougher forcing to smooth forcing for incompressible porous media, Boussinesq, and three-dimensional incompressible Euler. According to their statement, they obtained the Boussinesq and Euler results on August 15 and verified the first model-generated proof in Lean on August 22.
OpenAI’s announced contribution would be different and later: a construction for viscous Navier–Stokes. Even if it was obtained independently, its historical meaning cannot be narrated as if 10,000 agents had discovered both the problem and the strategy from a blank page. In mathematics, the final proof is only one part of discovery. Recognizing which simplification to attack, which literature matters, and which mechanism may survive new constraints is genuine intellectual work.
6. Timeline of the dispute
Date in 2026
Reported event
Source of the claim
August 15
Buckmaster and Alpöge obtain smooth-forcing blowup for Boussinesq and Euler.
Buckmaster’s statement.
August 22
Lean verification of their initial proof is completed.
Buckmaster’s statement.
September 1
OpenAI hears rumors and launches agents on the Millennium Prize Problems.
OpenAI’s account.
September 3
Buckmaster privately writes to a mathematician at OpenAI to clarify the rumor.
Email reproduced by Buckmaster.
September 5
OpenAI’s agents reach the Navier–Stokes construction, about 88 hours after starting.
OpenAI’s account.
September 6
OpenAI’s formal verification is completed and two calls with Buckmaster take place.
OpenAI and Buckmaster’s statement.
September 8
OpenAI publishes the article, proof, and formalization; Buckmaster makes his statement public.
The respective publications.
The temporal proximity fuels the controversy. Buckmaster says that almost nobody was working on this route and that the sudden focus on the forced problem was a warning sign to him. OpenAI responds that it distributed agents among all four official alternatives, first obtained an unforced Euler result, and only then identified Navier–Stokes as the most promising direction.
7. What is established and what is disputed
The public discussion mixes verifiable documents, incompatible accounts, and inferences. They should be separated.
Evidence map
Publicly documented: an analytical manuscript, a Lean formalization, Buckmaster’s statement, and OpenAI’s recognition of Buckmaster and Alpöge’s priority on forced Euler all exist.
Claimed by OpenAI: no researcher or agent accessed their specific work before publication; the agents reached different results, and the company does not intend to claim the monetary prize.
Acknowledged by OpenAI as a remote possibility: it cannot rule out that de-identified data derived from their product usage helped improve its models.
Claimed by Buckmaster: he received no clear answer about training; he was offered an arrangement in which he would present OpenAI’s result alone and Alpöge would be excluded because he works at Anthropic; he also received statements he interpreted as professional threats.
Disputed: Sébastien Bubeck rejects Buckmaster’s characterization of the interaction, according to the cited public summary.
Not publicly established: that private drafts were used to produce OpenAI’s proof or that deliberate appropriation occurred.
Buckmaster himself draws the boundary: he has not seen how the model worked, does not know whether his data were used, and does not present that accusation as an established fact. His stated purpose is to record what he was told, when he was told it, and what arrangements were proposed. This caution does not erase the questions; it prevents them from being answered through condemnation without evidence.
OpenAI’s sentence about de-identified data also does not demonstrate a causal transmission from those drafts to the proof. It does reveal a governance problem: for a researcher placing unpublished work in a tool, an inability to exclude aggregate influence may be scientifically unacceptable even if the handling complied with the service’s contractual terms.
8. What Lean verifies and what it does not
Lean is a proof assistant. A formalized proof is decomposed into steps that a small kernel checks against precise logical rules. This sharply reduces the chance that an algebraic leap, forgotten hypothesis, or invalid inference survives. In a manuscript over one hundred pages long, that guarantee is extraordinarily valuable.
Lean does not, by itself, answer four separate questions:
Correspondence: whether the formal theorem exactly represents the informal mathematical claim being announced.
Interpretation: what physical meaning the construction has and how much it depends on a designed force.
Novelty: which ideas are new and which come from prior work.
Credit: who formulated the route, supplied the decisive mechanisms, directed the search, and should be named as an author.
A logical certificate does not replace a human exposition. The community still needs to read the manuscript, check that the formalization matches the intended theorem, reconstruct the conceptual mechanism, and place it within the literature. Formal verification strengthens the evidence; it does not exhaust scientific practice.
9. The Deep Blue–Kasparov moment
Buckmaster calls the episode a “Deep Blue–Kasparov moment.” The comparison does not mean that mathematics is simply another game with closed rules. It points to a change in the division of labor: a machine can explore, combine, and verify on a timescale inaccessible to a person, but its productivity depends on a search space structured by historically accumulated problems, theories, formal libraries, and strategies.
In a major problem, the scarce resource is not always writing the last line of a proof. It may be identifying the promising route after years of failed attempts. If revealing that route allows thousands of agents to be mobilized immediately, then selecting the correct intermediate question acquires enormous economic and scientific value.
When proving becomes massively parallelizable, knowing what should be proved may become the scarcest part of discovery.
This could make open mathematics more guarded. A seminar, an informal draft, or a query submitted to a platform would cease to be only an act of cooperation and could become an exploitable signal for institutions with incomparable computing capacity. The danger is not that artificial intelligence participates in science, but that openness becomes unilateral: open knowledge from below and closed appropriative capacity from above.
10. A materialist reading
The controversy cannot be understood solely as a moral conflict between individuals. It expresses a transformation in the productive forces of science. Models, data centers, multi-agent systems, and proof assistants turn enormous quantities of accumulated mathematical labor into an infrastructure capable of producing new combinations at great speed.
At the same time, this productive force is concentrated under private ownership. Researchers contribute questions, drafts, corrections, usage, and tacit knowledge; the platform aggregates those interactions, improves closed models, and can return results at a scale no academic group can match. Even if no concrete appropriation occurred in this case, the structural asymmetry is real.
The decisive question is therefore not whether the machine “really thought,” a metaphysical dispute of little use. We should ask who controlled the means of mathematical production, who chose the direction of the search, which prior labor it depended on, who could audit the process, and how authorship, prestige, and benefits were distributed.
Computation is not an epistemological sin. It can be a genuine force of discovery. But a new productive force organized through opaque relations of ownership and credit can simultaneously expand human capacity and deepen the subordination of scientific labor.
11. The rules we need
The episode suggests a minimum program for AI-assisted research:
Verifiable confidential mode: unpublished drafts should be excluded from training and any later retrieval, with auditable guarantees rather than contractual language alone.
Provenance: every major result should retain a record of models, versions, consulted sources, decisive prompts, human intervention, and circulation among agents.
Compute disclosure: the number of agents, tokens, time, tools, and selection criteria should be treated as part of the method.
Conceptual genealogy: attribution should recognize not only the final proof but also the prior program that made the route visible.
Authorship independent of corporate rivalry: a researcher’s affiliation cannot justify excluding a scientifically relevant contribution.
Open review: the manuscript, formalization, and correspondence between them should remain available for independent examination.
Public capacity: universities and scientific consortia need shared infrastructure so frontier mathematics does not depend exclusively on private laboratories.
These rules would not settle every priority dispute, but they would make verifiable questions that currently depend on conflicting institutional statements.
12. Conclusion
Did OpenAI solve Navier–Stokes? The rigorous answer is conditional. The announced theorem targets precisely alternatives C and D of Clay’s official statement. The use of a smooth external force is not a trick, although it leaves the stronger unforced question untouched. If the analytical proof and its formalization withstand expert review, the mathematical achievement would be historic.
But the result did not arise outside history. It depends on decades of analysis, on the route opened by Córdoba and Martínez-Zoroa, on the work of Buckmaster and Alpöge, and on extraordinary computational infrastructure. Nor have the questions about data, priority, and institutional pressure been resolved. The most serious allegations should be investigated, neither repeated as facts nor dissolved through public relations.
The deepest lesson is that artificial intelligence does not abolish the social relations of science. It makes them more visible. The more powerful automated proving becomes, the more important it will be to protect openness, record the provenance of ideas, and distribute credit fairly. The future of mathematics will depend not only on what machines can prove, but on the institutions through which we decide what it means to discover.
GENERAL REMARKS ON THE STATISTICAL THEORY OF SAMPLE SURVEYS
José Mauricio Gómez Julián · 2021
Conceptual and technical notes on sampling design, frames, inclusion probabilities, design-based inference, nonresponse, total survey error, and estimation.
The statistical theory of sample surveys is often learned as a
collection of procedures: how to select a sample, how to estimate a
total or a mean, how to calculate a standard error, and how to determine
a sample size. Yet behind every procedure lies a prior conceptual
question. What, exactly, is the population to which one intends to
infer? What entity is selected at each stage? What makes a selection
probabilistic? Where does the randomness that allows us to speak of
precision come from? What part of survey error can be quantified by the
sampling design, and what part arises from coverage, nonresponse,
measurement, or processing?
The notes that follow are organized around problems that appear in
the classical sampling literature—in particular Cochran (1977), Kish
(1965), and Lohr (2021)—and develop them using tools from contemporary
survey theory. The purpose is not to replace the reading of those
authors, but to make explicit the conditions under which their
statements acquire meaning and the operational consequences that follow
from them. When more recent terminology is introduced, the discussion
draws especially on Särndal, Swensson, and Wretman (1992), Groves et
al. (2009), Biemer and Lyberg (2003), AAPOR’s definitions, and the
guidelines of the United Nations, Statistics Canada, and the U.S. Census
Bureau.
· · ·
1.
In a survey, are costs high and administration more complex?
The answer necessarily depends on the basis of comparison. Relative
to a census, a sample survey is usually cheaper and administratively
less demanding because it observes only part of the population. Indeed,
one of the historical reasons for the development of probability
sampling was to obtain sufficiently precise information at a cost far
below that of a complete enumeration.
The comparison changes, however, if the reference point is a
smaller-scale qualitative procedure, such as a focus group, an in-depth
interview, or intensive observation. A national probability survey may
require a frame, sample selection, instrument programming, training,
supervision, callbacks, weighting, quality control, variance estimation,
and documentation. A focus group may be far less expensive, but it does
not perform the same inferential function. The choice should not be made
by asking which technique is “cheaper” in the abstract, but which
technique can answer the research question with the kind of evidence
required.
A focus group, for example, can be extraordinarily useful for
understanding vocabularies, categories of meaning, mechanisms, and
problems in questionnaire comprehension. It is not, however, a direct
substitute for a probability survey when the objective is to estimate
parameters of a defined population. Cost must therefore be judged in
relation to the objective, the required precision, and the type of
inference one intends to make.
2. What is a double-barreled
question?
It is a question that asks for a single response concerning two or
more propositions that could receive different answers. The problem is
not that the respondent has “two response options”; almost every closed
question does. The problem is that the wording fuses two objects of
judgment and forces the respondent to compress them into a single
answer.
For example:
Are you satisfied with your salary and with your working
conditions?
A person may be satisfied with the salary and dissatisfied with the
conditions, or the reverse. If the scale offers only one response, the
resulting datum has no univocal interpretation. The solution is to
separate the components whenever each constitutes a substantively
distinguishable dimension.
This problem points to something more general: a questionnaire is not
a neutral container into which already constituted variables are simply
“placed.” The concrete wording helps determine the cognitive operation
performed by the respondent and, consequently, the datum that is
ultimately recorded. Instrument design is therefore part of measurement
and not a purely editorial task.
3. When is a questionnaire too
long?
There is no universal number of questions or minutes beyond which a
questionnaire becomes too long. Burden depends on mode of
administration, the cognitive complexity of the questions, the
sensitivity of the topics, the population being interviewed, the need to
consult records, the number of skip patterns, and the repetition of
scales, among other factors.
A face-to-face interview may tolerate a different duration from a
telephone interview or a self-administered online questionnaire.
Likewise, twenty questions that require recalling amounts, dates, or
episodes may impose a greater burden than fifty very brief and
homogeneous items.
Pilot testing is important, but it should be distinguished from
cognitive pretesting. A pilot reproduces field procedures on a smaller
scale and makes it possible to study duration, contact rates, skip
patterns, logistics, and implementation problems. A cognitive interview,
by contrast, seeks to understand how the respondent interprets the
question, retrieves the information, and selects an answer. The U.S.
Census Bureau also includes usability testing, behavior coding,
debriefing, and split-panel designs among questionnaire evaluation
tools.
The methodological rule, therefore, is not “make it as short as
possible,” but retain everything needed to measure the defined concepts
and remove what adds burden without adding substantive information.
Brevity and quality are not synonyms.
4. What
does it mean for a frame to contain duplicates?
A sampling frame is the operational device through which sampling
units can be identified or reached in order to carry out selection.
Sometimes it takes the form of a list; at other times it consists of
geographic areas, addresses, administrative registers, potential
telephone numbers, or procedures that make it possible to generate
selectable units.
Duplication occurs when the same population unit is represented more
than once in the selection mechanism. If records are selected with equal
probability and one person appears twice, that person may acquire a
higher inclusion probability than another who appears only once. But the
problem should not be described by saying that any inequality in
probabilities makes the sample “nonrandom.” There are deliberately
unequal-probability probability designs.
What matters is to distinguish between inequality that is
designed and known and multiplicity that is
accidental or unknown. A frame may suffer, among other
problems, from:
undercoverage: units of the target population that cannot be reached
through the frame;
overcoverage: records that do not belong to the target
population;
duplicates or multiplicity;
outdated records;
units whose status or location has changed;
many-to-one or one-to-many relationships between records and target
units.
The statistical consequence depends on the specific selection
mechanism and on whether multiplicity can be measured and corrected in
the inclusion probabilities or in weighting.
5.
What does data editing mean, and what should be done with
nonresponse?
In survey work, “editing” should not be understood as deleting
observations that look strange. Editing consists of applying explicit
validity, consistency, and plausibility rules to identify records that
require review. An improbable answer is not automatically false, and an
inconsistent answer should not disappear without a trace.
A reasonable workflow always preserves the raw information and
separates the stages:
captured datum;
validation of range, type, and structure;
verification of skips and logical consistency;
possible recontact, when feasible and planned;
documented editing rules;
marking of missing values;
possible imputation;
production of the analytical dataset without destroying the original
dataset.
Suppose that a section of the questionnaire applies only to
households that reported a certain economic activity. If answers appear
in that section for households that, according to the filter question,
do not perform that activity, several possibilities exist: the filter
was captured incorrectly, the later response was captured incorrectly,
the interviewer failed to follow the skip, the definition was
misunderstood, or there is a real situation that the design did not
anticipate. The datum must be investigated; it is not enough to declare
it “obviously wrong.”
It is also necessary to distinguish states that are often collapsed
under a single missing-value label: Not applicable,
Don’t know, No answer, explicit
refusal, failure to contact, structural skip, capture error, and value
lost during processing. “Not applicable” is not simply another form of
DK/NR: it means that the question does not belong to the logical
universe of that unit.
Unit nonresponse and item
nonresponse
Unit nonresponse occurs when no substantive information is obtained
from a selected unit; item nonresponse occurs when an interview exists
but particular answers are missing. The former is often addressed
through weighting adjustments and the latter may require imputation or
other methods, although the specific techniques depend on the
missingness mechanism and the analytical objective (Kalton and Kasprzyk,
1986).
A high nonresponse rate does not mechanically imply that a variable
is unusable, just as a high response rate does not demonstrate the
absence of bias. Nonresponse bias depends on the relationship between
response propensity and the variables to be estimated.
AAPOR distinguishes, among other measures, response rate, cooperation
rate, contact rate, and refusal rate. They are not synonyms. The
response rate relates completed interviews to the set of eligible
cases—with variants concerning the treatment of unknown eligibility and
partial interviews; cooperation conditions on contacted units; the
contact rate studies the success of contact; and the refusal rate
quantifies a specific form of nonresponse.
Finally, interviewer probing must be standardized. The objective is
not to press until “no survey is ever left incomplete,” but to
facilitate a valid answer without inducing it and while respecting the
participant’s consent.
6.
Efficiency, repeated sampling, and confidence intervals
Cochran frames sampling theory as a joint problem of precision and
cost: to design selection and estimation procedures that produce the
required accuracy at the lowest possible cost. The underlying idea
remains fundamental. There is no “best” design outside an objective;
there is a design that is more or less efficient for particular
estimands, constraints, and costs.
The precision of a procedure is studied through its distribution
under hypothetical repetitions of the sampling mechanism. From a
design-based perspective, the values of the finite population may be
regarded as fixed, while randomness arises from the set of samples that
the design could have selected.
Here it is important to state the interpretation of a confidence
interval precisely. If a procedure constructs intervals with a 95%
confidence level, that does not mean that 95 out of 100 samples will
produce “values similar” to the value observed in our sample. It means
that, under the assumptions of the procedure and under hypothetical
repetitions of the design, approximately 95% of the intervals
constructed in that way would contain the fixed population
parameter.
Once a particular frequentist interval has been observed, the
parameter does not thereby become random. The randomness belongs to the
procedure that would have produced different intervals under other
possible samples.
Sample size for a proportion
In an elementary formulation under simple random sampling, if an
approximate margin of error \(e\) is
desired for a proportion at a level associated with \(z_{1-\alpha/2}\), one may begin with
\[
n_0=\frac{z_{1-\alpha/2}^2\,p(1-p)}{e^2}.
\]
When there is no useful prior information about \(p\) and a conservative case is sought,
\(p=0.5\) is used because the
function
\[
p(1-p)
\]
attains its maximum at \(p=0.5\).
That is the mathematical reason. It is not a consequence of the central
limit theorem.
If the population is finite and the sampling fraction is no longer
negligible, sample size can be adjusted, within the same simple
framework, by
\[
n=\frac{Nn_0}{N+n_0-1}.
\]
In complex designs, the calculation must incorporate stratification,
clustering, unequal probabilities, domain objectives, anticipated
nonresponse, and, where appropriate, an expected design effect. Sample
size should not be calculated in isolation from the design.
7. Are there “common sample
sizes”?
Recurring sizes—400, 800, 1,000 interviews, for example—do appear in
professional practice because certain combinations of precision, budget,
and mode recur. But those numbers are not statistical constants.
For a proportion near 0.5, a simple random sample of about 1,067
units yields, under a normal approximation and without finite population
correction, a sampling margin close to three percentage points at 95%.
This accounts for part of the recurrence of sample sizes near one
thousand in polls. The calculation, however, does not by itself
demonstrate that a survey is nationally representative or that its total
error is ±3 percentage points.
If there is clustering, highly variable weights, small domains,
unequal response rates, or incomplete coverage, the same \(n\) may yield very different precision and
quality. The proper question is not “what is the traditional size?” but
“what precision do I need for which estimand, under what design, and at
what cost?”
8.
Two differences between classical theory and survey theory
8.1. Distributions, models, and
design
A classical observation by Cochran contrasts part of model-based
statistical inference with survey theory for finite populations. In many
classical problems, observations are assumed to arise from a
distribution with a specified mathematical form and its parameters are
estimated. In survey sampling, by contrast, a central tradition develops
inference from the selection mechanism without requiring a parametric
distribution for the population values.
The expression “few measurements on each unit” does not refer to a
sample with fewer than 30 or 50 cases. It refers to the number and type
of variables measured on each unit. A large survey may collect many
variables with very different distributions; there is no reason to
impose the same parametric family on all of them merely because the
dataset is large.
Computing power does not eliminate this conceptual difference. Today
at least three perspectives coexist:
design-based inference: randomness is attributed to
the selection mechanism;
model-assisted inference: models are used to
improve estimators, calibrate, or exploit auxiliary information while
retaining properties justified by the design;
model-based inference: inference rests more
directly on a probability model for the observed values or
mechanisms.
Särndal, Swensson, and Wretman (1992) systematically develop the
model-assisted perspective. The distinction is not a relic from before
modern computers; it answers different questions about the source of
randomness and the assumptions that support inference.
8.2.
Finite populations and the finite population correction
A population is finite if it contains \(N<\infty\) units. This does not depend
on whether the researcher knows \(N\)
exactly. A finite population can exist even when its size is unknown or
uncertain.
Under simple random sampling without replacement, for the population
mean \(\bar Y\), if
is the finite population correction in the variance. When \(f\) is very small, \(1-f\approx1\) and its effect may be
negligible. When the sample covers a large proportion of the population,
ignoring it can substantially overestimate sampling variance.
The reason is materially simple: if an increasing proportion of a
finite population is observed without replacement, progressively less
uncertainty remains about the part that was not observed. When \(n=N\), a census of that population has been
conducted and the variance due to the sampling mechanism is zero,
although measurement, coverage, processing, and other errors may still
exist.
9.
What does it mean to be sensitive to respondents’ expectations?
The interviewer must maintain a combination that is not always easy:
rapport without leading. The interviewer should
establish a relationship that facilitates communication, explain the
purpose of the interview, listen, and use permitted probes; but should
not guide the respondent toward an answer that appears socially
desirable or compatible with the researcher’s expectations.
Empathy does not mean abandoning standardization. An interview can be
humane, respectful, and sensitive to context without arbitrarily
altering the meaning of the questions. In standardized instruments, an
important part of training consists precisely in learning which
clarifications are permitted and how to use neutral probes.
Sensitivity also has an ethical dimension. The interviewer must
recognize discomfort, fatigue, privacy, risks, and the right not to
answer. Data quality cannot be pursued through coercion.
10.
Courtesy, tone, social desirability, consent, and position
The interaction between interviewer and respondent can affect
measurement. Tone of voice, the way response options are presented,
verbal or gestural reactions, the respondent’s perception of the
interviewer’s status, and topic sensitivity can alter the observed
response.
Several mechanisms should be distinguished:
social desirability: a tendency to provide an
answer perceived as socially acceptable;
acquiescence: a tendency to agree with formulations
regardless of content;
interviewer effect: systematic variation associated
with interviewer characteristics or behavior;
mode effect: differences associated with
face-to-face, telephone, web, paper, or other modes;
context and order effect: responses conditioned by
preceding questions or by the structure of the instrument.
Informed consent, however, is not a bias. It is an ethical condition
of research involving human participants. A different question is
whether the decision to participate may generate self-selection or
differential nonresponse. That possible source of bias should be studied
as part of the participation process, not presented as a reason to
weaken consent.
11. Survey design and
absolute sample size
Lohr insists on an idea that should be formulated carefully: an
enormous sample does not rescue a defective design. The relevant
quantity in her discussion is the absolute size of the
sample, not the absolute size of the population.
For large populations, the precision of an estimator under simple
random sampling depends primarily on \(n\); \(N\)
appears in the finite population correction and has little effect when
\(n/N\) is small. Thus, a sample of one
thousand people may have a similar sampling error whether the population
contains one million or one hundred million people, provided that the
selection mechanism and other assumptions are comparable.
But this statement does not mean that any sample of one thousand
units is adequate. A convenience sample of one hundred thousand people
may have more selection bias than a probability sample of one thousand.
Increasing \(n\) reduces random
variability under the assumed mechanism; it does not automatically erase
systematic errors of coverage, selection, measurement, or
nonresponse.
Hence a rule that should remain present whenever polls are read:
\[
\text{small sampling margin}\;\nRightarrow\;\text{small total error}.
\]
12.
Content, units, extent, and time when defining a population
A study population must be defined precisely enough to decide who or
what belongs to it. It is useful to specify its substantive
content, the units that compose it,
its spatial extent, and the time or
reference period.
Content is not simply spatiotemporal location; that belongs mainly to
extent and time. Content determines what kind of entity and what
substantive condition make a unit part of the population. For example:
“persons aged 18 or older who are usual residents of private households
in Costa Rica during the reference period.” There we find an entity, an
age condition, a residence condition, a household delimitation, and a
territorial-temporal extent.
The different units
The word “unit” has a general meaning—something that may be
considered an entity for a given analysis—but in surveys it acquires
different technical functions. They should not be confused.
Element or target unit. The population entity about
which information is to be produced: a person, a household, a firm, a
plot of land, a school.
Unit of analysis or study unit. The entity to which
the analyzed variables are attributed. It may coincide with the target
element, though not always.
Observation unit. The entity on which observation or
measurement is directly performed.
Reporting unit. The person or entity that provides
the information. In a household survey, one adult may report on other
members; the reporting unit and the analytical unit are then not
identical.
Sampling unit. A selectable unit at a particular
stage of the design. At a first stage it may be a geographic segment; at
a second, a dwelling; at a third, a person.
Primary sampling unit (PSU). The unit selected at
the first stage of a multistage design. It is not defined by being “a
place” or by necessarily containing only one final unit.
Listing unit. A unit identified during a listing
operation in order to construct or update the frame for a later stage.
Its function is operational.
The same entity may perform several functions. If a complete list of
students is available and students are directly selected and asked about
themselves, a student may simultaneously be the element, unit of
analysis, observation unit, reporting unit, and sampling unit. But this
empirical coincidence does not make the concepts synonymous.
13. Domain, stratum, class,
and subclass
An estimation domain is a subpopulation for which
separate estimates are desired. It may be defined by region, sex, age,
economic sector, or another relevant condition.
A stratum, by contrast, is a partition used by the
sampling design before the sample is selected. Strata are generally
intended to control composition, improve efficiency, or ensure
sufficient representation of relevant groups.
A domain may coincide with a stratum, but it need not. It may cut
across several strata or be defined using information obtained after
selection. For example, the population may be stratified by province
and, later, a domain may be estimated consisting of persons employed in
a particular economic industry across all provinces.
The notion of a class as an interval in a frequency
distribution belongs to a different problem. It is not necessary for
defining an estimation domain. Likewise, “subclass” should not be used
as a general synonym for domain unless a source explicitly defines that
terminology for a particular scheme.
14. What does \(Y_i\) represent?
If the finite population is
\[
U=\{1,2,\ldots,N\},
\]
and \(Y\) is a study variable, then
\(Y_i\) represents the value taken by
that variable for unit \(i\). It does
not represent “the characteristics” of the unit in the plural, but one
particular realization of a defined variable.
The population total is
\[
T_Y=\sum_{i=1}^{N}Y_i,
\]
and the population mean is
\[
\bar Y=\frac{1}{N}\sum_{i=1}^{N}Y_i.
\]
In design-based inference, a particularly important idea is that the
vector
\[
(Y_1,\ldots,Y_N)
\]
may be treated as fixed. The distribution used to study an estimator
arises from the sampling design: which samples \(s\) could have been selected and with what
probabilities.
This prevents a common confusion. The use of probability does not
require us to think that every material characteristic of the population
was “generated” by a known parametric distribution. Probability may
reside in the act of selection.
15. What does MESIP selection
mean?
In terminology used in various Latin American texts,
MESIP commonly denotes selection with equal
probability of the elements. It should be understood as a
particular class of probability design, not as the definition of all
probability sampling.
If \(\pi_i\) is the inclusion
probability of unit \(i\),
\[
\pi_i=P(i\in s),
\]
an equal-probability design satisfies, for comparable units within
the design,
\[
\pi_i=\pi_j.
\]
But a general probability design may have
\[
\pi_i\neq\pi_j.
\]
The inequality may be deliberate, for example when selection is made
with probability proportional to a measure of size.
16. What does
“unrestricted random sampling” mean?
The expression is used in part of the Spanish-language literature to
refer to simple random sampling without replacement:
from a population of size \(N\), a
fixed-size sample \(n\) is selected so
that every possible subset of \(n\)
units has the same probability of selection.
If \(S\) is the set of all possible
samples of size \(n\), then for every
\(s\in S\),
\[
P(S=s)=\binom{N}{n}^{-1}.
\]
It follows that every unit has inclusion probability
\[
\pi_i=\frac{n}{N}.
\]
It is a fundamental design precisely because it permits transparent
derivations and serves as a benchmark. But it is not “random sampling as
such” in an exhaustive sense: probability sampling includes stratified,
systematic, cluster, multistage, and unequal-probability designs.
17. Mean squared error,
variance, and bias
Let \(\hat\theta\) be an estimator
of the parameter \(\theta\). Its mean
squared error is
squaring, and taking expectations. The cross term vanishes
because
\[
E\left[\hat\theta-E(\hat\theta)\right]=0.
\]
Bias is not the difference between one observed realization of \(\hat\theta\) and its expectation. That
difference is a random deviation of the realization from the center of
its distribution. Bias is a property of the estimation procedure: the
difference between the estimator’s expectation and the parameter it is
intended to estimate.
The decomposition is conceptually important because it displays a
possible trade-off between variability and bias. An estimator with
slightly larger variance may have smaller MSE if it reduces bias enough,
and vice versa. “Precision” and “accuracy” should not be collapsed into
a single colloquial intuition when the analysis requires their
components to be distinguished.
18. What are
clusters, and how are they related to PSUs?
A cluster in sampling is a grouping of elementary units that may be
used as a selection unit. It should not be confused with a cluster
produced by a machine-learning algorithm. In clustering, the grouping is
usually the result of an algorithmic criterion of similarity or
distance; in sampling, the cluster belongs to the design and may be
defined by geography, administrative organization, dwellings, schools,
establishments, or other structures.
A PSU is simply the unit selected at the first
stage. In many household designs the PSU is a geographic cluster—for
example, a census segment—so the two notions coincide empirically. They
are not, however, synonymous by definition.
Design
First unit selected
Stages
Are equal probabilities mandatory?
Simple random
Element
1
Yes, in the classical simple design
Stratified
Element within stratum
1
Not necessarily across strata
One-stage cluster
Cluster
1
No
Multistage
PSU; then secondary units, etc.
2 or more
No
PPS
Unit with probability proportional to size
1 or more
No
Clustering matters because units within the same cluster often
resemble one another. If there is positive intraclass correlation,
interviewing twenty people within the same cluster may provide less
information than interviewing twenty people spread across many
clusters.
This relative loss or gain in precision is often summarized through a
design effect,
which compares the variance under the actual design with a
simple-random-sampling reference of comparable size. A \(\operatorname{deff}>1\) indicates
greater variance than the reference; it is not an “error” of an
algorithm, but a property that may arise from the design, intraclass
correlation, and weight variability.
19. What does “margin of error”
mean?
In the language of polls, the margin of error is usually the
half-width of a confidence interval associated with sampling
uncertainty under a particular design and estimation method. It
is not “the total amount of error in the survey.”
In complex designs, \(\widehat{SE}\)
must correspond to the design: strata, clusters, unequal probabilities,
calibration, or replicate weights, as applicable. Calculating a margin
as though the sample had been simple random when it was not can
understate or overstate uncertainty.
Sampling margin and
total survey error
The Total Survey Error paradigm requires separating
sampling variability from other sources of error. These include:
coverage error;
nonresponse error;
measurement error;
construct or specification error;
processing and coding error;
editing and imputation error;
frame and linkage error;
errors arising from models or adjustments.
Thus a phrase such as “the survey has a margin of error of ±3%”
should be understood, unless otherwise specified, as a statement about
one component of uncertainty. It does not demonstrate that the true
value lies within three points or that every other source of error is
small.
20.
Why is probability sampling preferred? Can only probability samples be
useful?
A probability design provides a known selection distribution and
therefore permits design-based inferences and estimation of sampling
variability under explicit conditions. This is an enormous advantage
when the objective is to infer to a defined population.
But “nonprobability” does not automatically mean “useless.”
Convenience, judgment, quota, network, or self-selected samples may be
appropriate for exploration, qualitative research, instrument
development, mechanism studies, hard-to-reach populations, or questions
for which design-based population inference is not the objective.
The problem arises when such samples are attributed properties that
their selection mechanism does not justify. If a researcher studies a
localized group because it possesses a rare characteristic, valid
knowledge may be produced about that group or about particular
mechanisms. One cannot infer without additional assumptions that the
prevalence of that characteristic in the country is equal to the
prevalence observed in the group.
The word representativeness should be used
cautiously. A probability sample may suffer from undercoverage,
differential nonresponse, or measurement error. It is therefore
preferable to state exactly what property has been secured: a defined
coverage frame, known probabilities, calibration to particular totals,
balance on auxiliary variables, or inferential capacity under a
specified design.
Methodological ethics require documenting the selection method and
the limits of inference. A nonprobability sample should not be presented
as probabilistic; a probability sample should likewise not be presented
as free from the remaining sources of survey error.
21.
“Randomization is a physical operation”: what does that mean?
Kish insists that a probability sample requires more than writing a
distribution on paper. There must be an effective selection procedure
whose operation is congruent with the specified probability model.
The word “physical” should not be understood as opposed to
computation. An algorithm implemented on a computer can perfectly well
form part of the material operation of selection. What Kish contrasts is
an actually executed chance mechanism with a mere belief, assumption, or
declaration that the units “are as if they had been random.”
but a probability design requires correspondence between them. If the
protocol states that each of \(N\)
units has equal probability of selection, the actual procedure—a
random-number table, an audited pseudorandom algorithm, a draw, or
another mechanism—must implement that property.
This distinction is philosophically interesting. Probability in a
probability survey is not merely a formal property of the language used
to describe selection; it is linked to an objective, reproducible
practice. The theory acquires inferential capacity because a controlled
relation exists between the material mechanism and the mathematically
defined sample space.
22.
What does it mean that the frame includes “physical lists” and
procedures that do not literally list all units?
Kish uses frame in a broader sense than “a file
containing every name.” A physical list may be a register of persons,
establishments, addresses, plots, or administrative units. But there may
also be procedures that allow units to be selected without constructing
an exhaustive list of all final elements.
An area frame, for example, may divide a territory into selectable
segments; dwellings are then listed within the selected segments. In
random-digit dialing, the frame may be conceptual or algorithmic: the
space of eligible numbers is defined and selections are generated
without previously possessing a file of all subscribers.
“Actually listing” means explicitly enumerating all relevant units in
an operational list. Avoiding that effort does not mean replacing the
physical by “the computational” in the abstract; it means constructing a
coverage and selection mechanism that does not require an exhaustive
prior enumeration of all final units.
23.
Why is it so difficult to construct a frame for human populations?
Because target population, frame, and field location are not the same
thing. An electoral register, for example, may be excellent for a
population of registered voters and at the same time inadequate for a
population defined as “all resident persons” if it excludes minors,
unregistered persons, or other groups.
Human populations also change. People are born, die, migrate, move
homes, form or dissolve households, use multiple telephones, lose
numbers, share devices, and may reside temporarily in different places.
A perfect frame would be costly not because we need to know where every
person is at every hour, but because it must maintain a sufficiently
good correspondence between target units and selectable units.
Large statistical systems address this problem through different
strategies: address frames, integrated administrative registers, area
frames, dwelling listings within PSUs, dual or multiple frames, and
periodic updates. Each solution distributes costs and risks of
undercoverage, duplication, and obsolescence differently.
The correct methodological question is not “does a complete list of
every inhabitant exist?” but “what frame or combination of frames
provides a documented path by which units of the target population have
inclusion probabilities that are known or can be modeled in accordance
with the design?”
24. What is multistage
sampling?
It is a design in which selection occurs in two or more stages. In a
household survey, for example, one might select:
PSUs or geographic segments;
dwellings within the PSUs;
one person within each dwelling.
If the selections are conditional, the overall inclusion probability
of person \(i\) may be written
schematically as the product of the probabilities at each stage:
depending on the notation adopted for PSU, dwelling, and person.
The basic design weight is then
\[
w_i=\frac{1}{\pi_i}.
\]
In practice, that weight may later be modified for nonresponse,
calibration, poststratification, weight trimming, or other procedures.
The basic design weight must always be distinguished
from final analytical weights.
Multistage sampling makes it possible to work with enormous
populations without first constructing a national list of every final
element. Its cost is usually much lower, although geographic
concentration can increase variance relative to a simple random sample
of the same size.
25.
Multiplicity, unequal probabilities, and Horvitz-Thompson
estimation
Suppose a telephone frame allows a household with two lines to appear
twice while another household with one line appears once. If lines are
selected with equal probability and households are the final target,
household inclusion probabilities may be unequal. If that multiplicity
is unknown and ignored, it may produce bias.
But it does not follow that all random sampling requires equal
probability. Survey theory explicitly includes unequal-probability
designs. What is fundamental is that the probabilistic mechanism be
specified and that the probabilities required for estimation be known or
calculable.
For a population \(U\) and a
total
\[
T_Y=\sum_{i\in U}Y_i,
\]
if each unit has positive inclusion probability \(\pi_i>0\), the Horvitz-Thompson
estimator is
Its logic is immediate: a unit that is difficult to select represents
more units of the population than a unit with a higher inclusion
probability. Hence the inverse of \(\pi_i\) appears.
Under the appropriate design,
\[
E_p\left(\widehat T_{HT}\right)=T_Y,
\]
where \(E_p\) denotes expectation
with respect to the sampling design. The historical importance of the
Horvitz and Thompson (1952) result lies precisely in showing how samples
without replacement and with unequal probabilities can be handled
without thereby turning them into “nonrandom” samples.
This allows us to return to the problem of duplicates with greater
precision. If multiplicity changes \(\pi_i\) in a known way and the estimator
incorporates it correctly, the inequality can be handled. If
multiplicity is unknown, it becomes a frame problem that prevents the
probabilities from being properly known and can distort inference.
· · ·
Some General Consequences
Four principles that cut across survey theory can be drawn from the
preceding problems.
First, design and estimation form a unity. There is
no estimator whose inferential meaning can be completely separated from
the way the sample was produced. Weighting, variance estimation, and the
interpretation of intervals depend on the design.
Second, randomness does not necessarily mean
equality. A design may be probabilistic and assign unequal
probabilities; what matters is that the mechanism be probabilistically
defined and that its relevant probabilities can be incorporated into
inference.
Third, sampling error is not total survey error. A
narrow interval may coexist with undercoverage, differential
nonresponse, poor measurement, or processing errors. The mathematical
precision of one component should not be confused with overall
validity.
Fourth, the statistical operation is also a material
operation. Frames, listings, interviews, selection algorithms,
questionnaire skips, and editing rules are concrete practices. Theory
does not float above them: its assumptions are realized—or violated—in
the actual process by which data are produced.
Groves, R. M., Fowler, F. J. Jr., Couper, M. P., Lepkowski, J. M.,
Singer, E., & Tourangeau, R. (2009). Survey Methodology
(2nd ed.). Wiley.
Horvitz, D. G., & Thompson, D. J. (1952). A generalization of
sampling without replacement from a finite universe. Journal of the
American Statistical Association, 47(260), 663-685.
https://doi.org/10.1080/01621459.1952.10483446
Kalton, G., & Kasprzyk, D. (1986). The treatment of missing
survey data. Survey Methodology, 12(1), 1-16.
Kish, L. (1965). Survey Sampling. Wiley.
Lohr, S. L. (2021). Sampling: Design and Analysis (3rd ed.).
CRC Press.
Särndal, C.-E., Swensson, B., & Wretman, J. (1992). Model
Assisted Survey Sampling. Springer.
The following resources may be useful for quick orientation,
discussion, examples, or bibliographic navigation. They do not replace
the methodological sources cited above.
CRAN — survey package: documentation
for the R ecosystem for analysis of complex samples; particularly useful
for connecting theory to reproducible implementations.
https://cran.r-project.org/package=survey
Statistics Canada — Survey Methodology: a
specialized journal publishing theoretical and applied research on
sampling, weighting, nonresponse, integration, and quality.
https://www150.statcan.gc.ca/n1/en/catalogue/12-001-x
National Survey on Aspects of Virtuality Linked to the COVID-19 Pandemic (ENAVIRPA 2021)
Economic Impact Module, descriptive results, inferential design, and reproducible evaluation
José Mauricio Gómez Julián · 2021
Authorship and scope. ENAVIRPA 2021 was a collective project carried out by the students of Introduction to Sample Surveys. The authorship indicated here corresponds to the Economic Impact module, the analytical strategy developed around it, and the writing of this report. The remaining modules are retained as components of the collective project and are attributed to their respective authors.
PROLOGUE
The National Survey on Aspects of Virtuality Linked to the
COVID-19 Pandemic (ENAVIRPA 2021) was a collective effort
carried out by the students enrolled in Introduction to Sample
Surveys at the University of Costa Rica. Fieldwork, questionnaire
integration, and the different thematic modules belong to that
collective project. This document focuses primarily on the
Economic Impact (AE) module, whose design and analysis
correspond to José Mauricio Gómez Julián, and makes
complementary use of questions from other modules developed by other
members of the course. The presence of those items in the analysis does
not imply that their construction is attributed to the author of the
economic module.
The exercise had a twofold purpose. First, to carry out a real
telephone survey during the health crisis and describe material aspects
associated with the pandemic. Second, to use the data as a pedagogical
setting for studying what can —and cannot— be done with a sample survey
when moving from description to inference, generalized linear models,
and predictive evaluation.
The scope must be established from the outset. The 235 interviews
constitute a real data set, but the number of observations alone is not
enough to turn every sample statistic into an unbiased national
estimate. Representativeness also depends on the selection mechanism,
frame coverage, inclusion probabilities, nonresponse, weighting,
measurement error, and questionnaire constraints. The design was carried
out under the time and coordination limitations inherent in an academic
exercise; moreover, the modules did not originate from a single common
theoretical framework. The results are therefore interpreted primarily
as results from this sample and as methodological evidence concerning
the procedures employed.
It is also useful to distinguish a survey from a
psychometric instrument. A survey is a procedure for
collecting information and may contain demographic, labor, economic,
attitudinal, or psychometric-scale variables. Not every questionnaire
is, merely by virtue of being a questionnaire, a psychometric
instrument. When a module seeks to measure a latent construct,
additional problems of reliability, validity, and measurement error
arise and require specific procedures. ENAVIRPA did not undertake a
global psychometric validation of the questionnaire; this constitutes a
limitation only for interpretations that seek to attribute the
measurement of latent constructs to sets of items.
The criterion for incorporating complementary modules was to study
the multidimensional distribution of social losses associated with the
pandemic: work, income, access to virtual environments, food, hydration,
physical activity, and other living conditions. The economy does not
exist separately from these concrete determinations, and for that reason
the AE module is also analyzed in relation to sociodemographic
information and variables from other modules.
One final methodological clarification applies throughout the
document: whenever the questionnaire, analytical database, and a
published table appear to suggest different numerical codings,
the unit of interpretation will always be the substantive
category, not the number arbitrarily assigned to it. The
ENAVIRPA2021csv.csv database stores AE3-AE9 as textual
labels —“Aumentó”, “Disminuyó”, “Sin cambios”, “No es una fuente de
ingresos/apoyo”, and “No responde”—. The reproducible analysis in this
report uses those labels directly and does not depend on an undocumented
numerical recoding.
I. OBJECTIVES
I.1. General objective
To plan, conduct, and analyze a sample survey associated with the
health crisis caused by COVID-19, with particular emphasis on its
economic impact.
I.2. Specific objectives
To describe the main results of the Economic Impact module.
To integrate, when conceptually appropriate, information from the
sociodemographic, virtual education, technology, telework, and
health-habits modules.
To examine what types of inference can be formulated from the
collected data and under which restrictions.
To study generalized linear models, particularly probit and logit,
as tools for analyzing binary variables.
To show the complementarity between statistical inference and
supervised learning, distinguishing fitting, inference, and
out-of-sample generalization.
To make explicit the restrictions imposed by the sampling design,
nonresponse, absence of weighting, coding, skip patterns, and sample
size.
II. DESCRIPTIVE METHODOLOGY
II.1. General summary
Element
Description
Study population
Persons aged 18 or older, cell-phone users, and residents of Costa
Rica.
Operational frame
Active cellular-number banks constructed from operator prefixes,
according to the information used by the course.
Data-collection mode
Computer-assisted telephone interviewing (CATI), using CSPro
7.4.
Selection procedure
Sampling from active cellular-number banks using the Waksberg
procedure as a reference.
Originally planned sample size
300 interviews, 30 for each of the ten participating students.
Final sample size
235 completed interviews.
Fieldwork
June–July 2021, according to the course chronology.
Reference sampling error
±6.39 percentage points for a proportion under the idealized SRS
calculation with p=0.5; this is not a measure of total
survey error.
Weighting
A complete system of design weights, nonresponse adjustments, and
calibration was not available.
Scope
Academic exercise with real data; descriptive results are presented
primarily as sample results.
II.2. General
description of the research process
Fieldwork was carried out by ten students from a graduate program at
the University of Costa Rica. The group received training in CSPro 7.4;
the modules prepared by the different participants were subsequently
assembled, a pilot test of approximately three interviews per student
was conducted, and fieldwork then proceeded. The collective target was
300 interviews. A total of 235 were completed.
For the fieldwork carried out by José Mauricio Gómez Julián, 332
calls and approximately 18 hours of telephone contact were recorded. The
summary log reports 34 busy numbers, 94 unanswered calls, and 183 calls
after inactive numbers were excluded. From those three figures one can
compute 1-(128/183)=0.300546; however, that
quantity should not automatically be called a “response rate.”
The 55 residual cases are not necessarily completed interviews, and the
denominator does not fully classify eligibility, refusal, contact, and
unknown eligibility. A standardized response rate would require final
dispositions for all cases under an explicit definition, such as those
used by AAPOR.
Accordingly, this report retains the raw call counts but does not
assign the 30.0546% figure the meaning of a standardized response rate.
The verifiable fact for the author of the economic module is that the 30
interviews assigned to him were completed; the verifiable collective
fact is that 235 of the 300 planned interviews were completed, or 78.3%
of the production target. Neither ratio is, by itself, a probabilistic
response rate.
II.2.1. Activity schedule
Schedule of activities in the ENAVIRPA
2021 process.
II.2.2. Telephone-number
banks
Telephone-number banks assigned and used
during fieldwork.
II.2.3. General
chronology of fieldwork
Collective chronology of completed
interviews.
II.2.4. Call log
Example of the call log used during
fieldwork.
II.3.
Presentation of the Economic Impact (AE) module
ECONOMIC IMPACT
AE1
Have you received, or did you receive, any financial benefit or support
from the national or local government since the health
emergency/quarantine caused by COVID-19 began?
YES 2. NO (GO TO AE3) 3. DOES NOT KNOW/NO ANSWER
(GO TO AE3)
AE2
Please indicate which of the following benefits/support you receive or
received (Multiple response)
Yes, food/groceries
Yes, financial resources
Yes, medical prevention supplies (gloves, masks, disinfectant, etc.)
As a result of the health emergency/quarantine caused by COVID,
please indicate how your personal resources have been affected: have
they increased, decreased, or remained unchanged?
Increased
No change
Decreased
Not a source of
income/support
AE3
Income or earnings from paid work
4
3
2
1
AE4
Money or goods received from family/friends living elsewhere in the
country
4
3
2
1
AE5
Money or goods received from family/friends living in another
country
4
3
2
1
AE6
Income from rental property, investments, or savings
4
3
2
1
AE7
Pensions and/or retirement benefits or other social payments
4
3
2
1
AE8
Government support
4
3
2
1
AE9
Support/donation from NGOs, civil-society organizations,
foundations, or other nonprofit organizations
4
3
2
1
AE10
Besides you, has any other member of your household experienced a change
in economic income since the health emergency/quarantine caused by
COVID-19 began?
No change in income 2. Income increased 3. Income decreased
AE11
Since the health emergency/quarantine caused by COVID-19 began, would
you say that the total salary or income your family receives each month
is enough or not enough to live on? (PROBE FOR THE BEST
ANSWER)
It is not enough; they have great difficulties
It is not enough; they have difficulties
It is just enough, without great difficulties
It is enough; they can save
DK/NA
II.3.1. Note on the
coding of AE3-AE9
In the data-collection instrument, AE3-AE9 appear with the codes
4 = Increased, 3 = No change,
2 = Decreased, and
1 = Not a source of income/support. A later table may order
the same categories using a different numbering solely for presentation.
A reader could quite reasonably believe, when comparing the two places,
that the data were interpreted using incompatible codes. That
need not be the case, because the number is only a label and
can be recoded; what would be problematic is being unable to determine
which substantive category each value represents during analysis.
The available analytical database removes that ambiguity because
AE3-AE9 are stored directly as text. Consequently, every table and
constructed variable here uses the semantic categories rather than a
numerical sequence. Reproducibility therefore does not depend on
reconstructing an intermediate recoding that was not documented.
II.4. Items used from other
modules
II.4.1. SOCIODEMOGRAPHIC
MODULE (SD)
SOCIODEMOGRAPHIC
SD1
INTERVIEWER:
RECORD RESPONDENT’S SEX
MAN
WOMAN
SD2
Please tell me, how old are you?
YEARS /____/____/
SD3
Are you Costa Rican? 1. YES 2. NO
SD5
What is this household’s total monthly income?
(PROBE)
LESS THAN 200 THOUSAND COLONES
200 THOUSAND TO LESS THAN 400 THOUSAND
400 THOUSAND TO LESS THAN 600 THOUSAND
600 THOUSAND TO LESS THAN 800 THOUSAND
800 THOUSAND TO LESS THAN 1 MILLION
1 MILLION TO LESS THAN 1.5 MILLION
1.5 MILLION OR MORE
DOES NOT KNOW / NO ANSWER
II.4.2. VIRTUAL EDUCATION
MODULE (E)
CHALLENGES OF VIRTUAL EDUCATION
E6
What is the reason you have not participated in or enrolled in any
virtual/online education or training program?
Does not have enough time 2. Does not have enough money
Is not currently interested in training 4. Lacks computer skills
Has low motivation 6. Finds the virtual environment boring
Poor personal time organization 8. Repeatedly postpones the decision
to begin
Finds the virtual environment uncomfortable 10. Does not want to
start alone
Online education is too expensive 88. Other:
________________________
DK/NA
II.4.3. TECHNOLOGY MODULE
(TC)
TECHNOLOGY – EVERYONE
TC1
Do you have fixed internet/modem service in your home?
YES 2. DOES NOT HAVE (GO TO TC3) 9. DK/NA
(GO TO TC3)
II.4.4. TELEWORK MODULE (TE)
TELEWORK – JORDAN/CARLOS
At present, during a typical week, what is your main work activity?
SELECT THE OPTION THAT BEST APPLIES
Works for an employer (whether a person, company, or household)
Helps in a family business (unpaid)
I have my own business and employ other people
I have my own business without employing other people
Does not work; is a pensioner/retiree
IF RESPONSE IS 5 TO 99, GO TO V1
Does not work; homemaker
Does not work; full-time student
Does not work because of a physical/mental limitation that prevents
working
Does not work, is not looking for work, and is not available for work
Does not work, but is looking for work
Other
DK/NA
II.4.5. PHYSICAL
AND MENTAL HEALTH MODULE (FN)
PHYSICAL-HEALTH AND NUTRITION HABITS – LUIS
FN2
Regarding your water consumption, during the pandemic have you increased
the amount of water you drink?
Yes, increased 2. No, remained the same 3. No, decreased 9. DK/NA
Regarding mealtime habits, comparing current frequency with the year
before the pandemic, would you say they increased, decreased, or
remained the same?
Remained the same
Increased
Decreased
DK/NA
FN6
Breakfast
1
2
3
9
FN7
Lunch
1
2
3
9
FN8
Dinner
1
2
3
9
Regarding the foods I am going to mention, comparing current
frequency with your habits in the year before the pandemic, would you
say your consumption of … (READ FOOD) increased,
decreased, or remained the same?
HAS NOT EATEN IT
YES
DK/NA
Remained the same
Increased
Decreased
FN9
Fruits and vegetables
0
1
2
3
9
FN10
Legumes (beans, chickpeas, lentils)
0
1
2
3
9
FN11
Dairy products (milk, yogurt, cheese)
0
1
2
3
9
FN12
Starches (rice, pasta)
0
1
2
3
9
FN13
Meat or eggs (beef, pork, chicken, fish, processed meats)
0
1
2
3
9
FN14
Foods/sweets/beverages that are sources of sugar (cookies, sodas,
Hi-C, Powerade, etc.; sweets, chocolates, candy, ice cream)
0
1
2
3
9
FN15
Fats and fast foods (butter, sour cream, dressings, mayonnaise;
fried chicken, French fries, pizza, hamburgers, tacos, pastries,
packaged snacks, etc.)
0
1
2
3
9
III. PRESENTATION OF
DESCRIPTIVE RESULTS
III.1. AE module: economic
impact
III.1.1. AE1.
Government financial support
Response
n
%
Yes
56
23.8
No
179
76.2
Total
235
100.0
Fifty-six people, 23.8% of the sample, reported having received some
benefit or financial support from the national or local government since
the beginning of the emergency; 179, or 76.2%, answered that they had
not.
III.1.2. AE2. Type of
support received
AE2 was conditional on AE1: only the 56 people who answered
“yes” to AE1 were supposed to answer it. In the database, the
other 179 records correctly appear as missing values generated by the
questionnaire skip. They are not “does not know/no answer”; they are
not applicable. Since AE2 allowed multiple responses,
each percentage must be calculated over the 56 eligible people, and the
percentages need not add to 100%.
Type of support
Yes (n)
% of the 56
No (n)
% of the 56
Food/groceries
23
41.1
33
58.9
Financial resources
48
85.7
8
14.3
Medical prevention supplies
4
7.1
52
92.9
Personal-hygiene supplies
2
3.6
54
96.4
Thus, among those who received some form of support, 41.1% reported
food and 85.7% financial resources. It is not correct to divide each
selection by the total number of selections made and describe the
resulting figure as a percentage of people.
III.1.3.
AE3-AE9. Changes in sources of income and support
Item/source
Decreased
Increased
No change
Not a source
NR
AE3 — Income or earnings from paid work
87 (37.0%)
9 (3.8%)
90 (38.3%)
43 (18.3%)
6 (2.6%)
AE4 — Money/goods from family or friends within the country
26 (11.1%)
3 (1.3%)
33 (14.0%)
168 (71.5%)
5 (2.1%)
AE5 — Money/goods from family or friends in another country
11 (4.7%)
0 (0.0%)
17 (7.2%)
202 (86.0%)
5 (2.1%)
AE6 — Income from rental property, investments, or savings
13 (5.5%)
5 (2.1%)
21 (8.9%)
192 (81.7%)
4 (1.7%)
AE7 — Pensions, retirement benefits, or other social payments
7 (3.0%)
0 (0.0%)
39 (16.6%)
185 (78.7%)
4 (1.7%)
AE8 — Government support
8 (3.4%)
18 (7.7%)
22 (9.4%)
185 (78.7%)
2 (0.9%)
AE9 — Support from NGOs, civil society, foundations, or other
nonprofit organizations
4 (1.7%)
2 (0.9%)
13 (5.5%)
214 (91.1%)
2 (0.9%)
Paid work was the source with the greatest presence and also the
largest number of contractions: 87 people, 37.0% of the entire sample,
reported a decrease; nine, 3.8%, an increase; and 90, 38.3%, no change.
In AE6, 192 people, 81.7%, indicated that income from rental property,
investments, or savings was not a source of
income/support during the observed period.
Means of production
as capital: scope of AE6
In the specific sense used in this analysis, the possession
of means of production does not refer merely to ownership of instruments
personally used by an independent producer, but to their possession as
capital, that is, as property generating income separable from the
owner’s direct labor.
The distinction is substantive. A self-employed worker may own tools,
a vehicle, or a machine and reproduce materially through his or her own
labor without the observed income thereby arising from capital in the
sense defined here. AE6, by contrast, asks about income from rental
property, investments, or savings and therefore serves as an empirical
indicator of the presence of property or patrimonial income. Under this
operationalization, the 192 cases stating that AE6 is not a source are
classified as an observed absence of income associated with
property-capital; the 39 cases reporting increase, decrease, or
stability are classified as presence of that source; four cases remain
indeterminate because of nonresponse.
This is not equivalent to a legal inspection of assets. A person may
own an asset that temporarily produces no rent or whose profits are
reinvested. That is an observational limitation, not an
objection to the concept. The inference should therefore be
formulated as the observed absence or presence of income indicative of
property-capital within the categories captured by AE6.
TE1 separately retains information on labor status and business
ownership. It is useful for distinguishing wage workers, employers, and
independent producers, but it should not be mechanically confused with
AE6: “own business without employees” and “receives income from
property-capital” are related but nonidentical variables.
III.1.4.
AE10. Income change among other household members
Response
n
%
No change in income
112
47.7
Income increased
8
3.4
Income decreased
104
44.3
No response
11
4.7
A total of 44.3% indicated that another member of the household had
experienced a decrease in income; 47.7% reported no change and 3.4%
reported an increase.
III.1.5. AE11.
Sufficiency of family income
Response
n
%
Not enough; great difficulties
24
10.2
Not enough; difficulties
57
24.3
Just enough, without great difficulties
111
47.2
Enough; can save
40
17.0
DK/NA
3
1.3
A total of 34.5% reported that income was not enough to live on
—10.2% with great difficulties and 24.3% with difficulties—; 47.2% said
it was just enough, and 17.0% said it was enough and allowed them to
save. AE11 directly measures subjective income sufficiency and is kept
separate from a formal poverty line.
III.2. TE module: work and
telework
III.2.1. TE1. Main activity
Activity
n
%
Works for an employer
105
44.7
Helps in an unpaid family business
5
2.1
Own business with employees
11
4.7
Own business without employees
33
14.0
Pensioner/retiree
12
5.1
Homemaker
40
17.0
Full-time student
17
7.2
Does not work because of a physical/mental limitation
1
0.4
Does not work, is not seeking work, and is unavailable
2
0.9
Does not work, is seeking work
8
3.4
Other
1
0.4
The sample contains 105 wage workers, 33 producers with their own
business and no employees, and 11 business owners who employ other
people. Only the last category directly identifies an employer relation
involving the labor of others; the own-business-without-employees
category describes independent production. This distinction prevents
every ownership of instruments or of a small business from being
transformed into capitalist ownership in the substantive sense used for
AE6.
III.2.2.
TE6. Change in working hours or remuneration
Response
n
% among 38 applicable cases
Fewer hours
2
5.3
More hours
16
42.1
Lower pay for the same amount of work
6
15.8
Lower pay for more work
7
18.4
Higher pay for more work
1
2.6
Higher pay for less work
1
2.6
Other
5
13.2
Not applicable because of questionnaire flow
197
—
TE6 produced 38 substantive responses and 197 cases that were not
applicable because of the module flow. Among the 38 people exposed to
the question, 16 —42.1%— reported working more hours. This percentage
should not be projected onto all 235 interviews because the question was
not asked of every participant.
III.3. FN
module: physical-health and nutrition habits
III.3.1. FN2. Hydration
Response
n
%
Increased
87
37.0
Remained the same
133
56.6
Decreased
14
6.0
DK/NA
1
0.4
III.3.2. FN6-FN8.
Frequency of meals
Meal
Same
Increased
Decreased
Breakfast
183 (77.9%)
24 (10.2%)
28 (11.9%)
Lunch
193 (82.1%)
19 (8.1%)
23 (9.8%)
Dinner
185 (78.7%)
18 (7.7%)
32 (13.6%)
III.3.3. FN9-FN15.
Changes in food groups
Group
Does not consume
Same
Increased
Decreased
DK/NA
Fruits and vegetables
7
158
49
19
2
Legumes
10
179
31
14
1
Dairy products
12
166
26
30
1
Starches
2
176
28
28
1
Meat or eggs
1
170
38
25
1
Foods/beverages that are sources of sugar
42
109
27
56
1
Fats and fast foods
33
115
23
63
1
A change in frequency does not by itself have a nutritional sign.
Reducing sugary drinks or fast food does not have the same meaning as
reducing fruits, vegetables, or protein sources. Any index of “diet
deterioration” must therefore rest on an explicit nutritional rule
rather than on the simple operation “decreased = worsened.”
III.3.4.
FN17. Hours of sleep during the pandemic
Change
n
%
Increased
35
14.9
Remained the same
134
57.0
Decreased
63
26.8
DK/NA
3
1.3
The data do not show that 57% slept more: 35 people —14.9%— reported
an increase in hours of sleep, while 63 —26.8%— reported a decrease and
134 —57.0%— stability. The 57% figure corresponds to “remained the
same.”
III.3.5. FN18. Physical
activity
Change
n
%
Increased
61
26.0
Remained the same
110
46.8
Decreased
57
24.3
DK/NA
7
3.0
Physical activity increased for 61 people —26.0%— and decreased for
57 —24.3%—.
III.4. E module: virtual
education
E6 has 161 applicable responses and 74 nonapplicable cases.
Reason
n
% of 161 applicable cases
Insufficient time
27
16.8
Insufficient money
11
6.8
Not interested in training
59
36.6
Lacks computer skills
8
5.0
Low motivation
6
3.7
Virtual environment is boring
1
0.6
Poor time organization
5
3.1
Repeatedly postpones starting
1
0.6
Virtual environment is uncomfortable
4
2.5
Does not want to start alone
1
0.6
Online education is too expensive
1
0.6
Other
22
13.7
DK/NA
15
9.3
Lack of money was reported by 11 people, 6.8% of applicable cases and
4.7% of the entire sample. Lack of time was reported by 27, 16.8% of
applicable cases and 11.5% of the total. The denominator must be stated:
using 235 describes prevalence in the full sample; using 161 describes
the composition of those who actually received E6.
IV. GENERAL
DESIGN OF THE INFERENTIAL METHODOLOGY
IV.1. Information of
interest
The analytical design sought to extract or construct information on
age; internet access; geographic location; nationality; barriers to
virtual education; relation to social wealth; changes in diet,
hydration, sleep, and physical activity; variation in income; sex; and
household economic sufficiency. The intention was to study jointly
dimensions that, although separated in the questionnaire for operational
reasons, are materially related.
Transforming some responses into dichotomous variables is useful for
binary models, but every dichotomization sacrifices information. Binary
variables are therefore treated as analytical constructions rather than
ontological substitutes for the continuous or multinomial phenomena from
which they arise.
IV.2.
Measurement mechanism and operationalization
Age: SD2, retained quantitatively whenever
possible; for some models adult25 = 1 is also constructed
if the person is 25 years of age or older.
Nationality: SD3; Costa Rican/non-Costa Rican is
distinguished and DK/NA is treated as missing.
Sex: SD1.
Fixed internet: TC1.
Rural/urban location: the design intended to
construct it from SD13 and INEC’s geographic classification. That
classification was not completed during the exercise and therefore
does not enter the models actually estimated.
Observed property-capital: AE6, according to the
substantive definition given above. 1 if the source exists
—increased, decreased, or remained unchanged—; 0 if the
person states that it is not a source; NA if there is no
response.
Occupational position/business ownership: TE1 is
retained as a separate variable. Employer, independent producer, and
wage worker are not collapsed into a single indicator of “capital.”
Income contraction: may be defined as the existence
of at least one decrease in AE3-AE9 or a decrease in the income of
another household member in AE10. AE11 should not be mechanically
included in this indicator because it measures current sufficiency, not
temporal change.
Monthly economic stress: AE11, retained ordinally
or dichotomized only when the objective requires it.
Barriers to virtual education: E6 is analyzed among
applicable cases. It cannot simply be converted into “access/no access”
for all 235 people, because absence generated by a skip has a different
meaning from a negative response.
Diet: FN6-FN15 require differentiated substantive
rules by food type. A decrease is not necessarily negative, and an
increase is not necessarily positive.
Hydration: FN2.
Sleep: FN17 and the level of hours in FN16, where
relevant.
Physical activity: FN18.
IV.3. Dichotomous working
variables
To reproduce the core models, the following variables are
defined:
VD1: nationality, 1 = non-Costa Rican, 0 = Costa
Rican.
VD2: observed presence of property-capital income
according to AE6.
VD4: sex, 1 = woman, 0 = man.
VD7: 1 = age 25 or older, 0 = younger than 25.
VD8: income contraction under the explicit rule defined
in IV.2.
The rurality variable remains a design proposal rather than an
estimated variable. The barrier to virtual education is used
descriptively unless the analytical universe is restricted to cases for
which E6 applies.
IV.4. Proposed combined
analyses
The first model studies the observed presence of property-capital
income as a function of sex, age, and nationality:
\[
VD2_i = f(VD4_i,VD7_i,VD1_i).
\]
Rurality is not included because it was not constructed
reproducibly.
A second analysis could study income contraction in relation to sex,
age, nationality, and barriers to virtuality, but only after precisely
defining the E6 universe and the contraction variable. It is therefore
retained as an analytical extension rather than being confused with the
model actually estimated in Section IX.
IV.5. Correlation and
causality
Correlation can describe covariation; it does not by itself transform
an association into a causal mechanism. In social research, causal
interpretation requires substantive theory, temporality, design, and
identification assumptions that are not automatically contained in a
coefficient.
Ritchey uses examples involving poverty, racial composition, and
crime to show how an aggregate association may reflect institutional
history, segregation, economic exclusion, and omitted variables. The
methodological argument is not to replace one correlation with another
monocausal explanation, but to remember that the coefficient does not
contain the entire causal structure of the phenomenon.
The same caution applies to contemporary racial categories. Findings
on the African origin of modern human lineages and later evidence of
admixture with archaic populations do not turn social categories of race
into discrete biological units capable of replacing historical and
causal analysis. Regression quantifies relations under a model;
causality requires an additional theory of how the phenomenon is
produced.
V. FOUNDATIONS OF SAMPLE
SURVEYS
V.1.
Mathematical statistics, estimation, and surveys
Cochran emphasizes that survey theory historically adopted simple and
robust procedures because a single survey may contain many attributes
with different distributions. This does not imply a separation between
sampling theory and regression: ratio and regression estimators use
auxiliary information to improve precision.
It is useful, however, to distinguish two objects:
\[
\text{regression estimator in sampling}
\neq
\text{regression model fitted to survey variables}.
\]
The former uses known auxiliary information to improve estimation of
a population mean or total; the latter represents a conditional
relationship among variables and may serve inferential or predictive
purposes. The fact that both use the word “regression” does not make
their objectives identical.
V.2.
Sample size and the actual role of the Central Limit Theorem
A reader could quite reasonably believe that using p=0.5
in a sample-size formula is justified because, as n
increases, the original responses “become normal,” eventually distribute
themselves symmetrically, and therefore half must fall in each category.
That is not the case.
For a Bernoulli variable X_i taking values 0 and 1, the
sample proportion is:
The Central Limit Theorem enters elsewhere. Under
appropriate conditions, it allows the sampling distribution of the
standardized proportion to be approximated by a normal distribution:
This is a statement about the distribution of a statistic
across repeated samples, not a claim that the original
distribution of responses itself becomes normal. Nor does it imply that
p tends to 0.5.
The reason for using p=0.5 when the population
proportion is unknown is algebraic. Bernoulli variance depends on:
\[
f(p)=p(1-p)=p-p^2.
\]
Its derivative is:
\[
f'(p)=1-2p,
\]
and the maximum occurs at:
\[
p=\frac12,
\qquad p(1-p)=\frac14.
\]
Therefore:
\[
p(1-p)\le 0.25.
\]
Choosing p=0.5 maximizes the variance and yields the
most conservative sample size for a prespecified margin of error. For a
large population, or one of unknown size:
\[
n_0=\frac{z_{\alpha/2}^2p(1-p)}{d^2}.
\]
With z=1.96, p=0.5, and
d=0.0639:
\[
n_0\approx235.2.
\]
This gives the scale of the 235 interviews. The result makes sense as
an idealized calculation of sampling precision for a proportion
under SRS. By itself, it does not demonstrate that the actual
design has total error of ±6.39%.
If sample size approached the size of a finite population, the factor
(N-n)/(N-1) would tend to zero. The reason is elementary:
when nearly the entire population is observed, progressively less
uncertainty remains because of sampling. The original responses do not
undergo a “normalization.”
V.3.
Nonresponse and the Birnbaum-Sirken formula
Birnbaum and Sirken, as discussed by Cochran, studied bias due to
nonavailability. The expression discussed in the original paper can be
written, using the notation employed there, as:
\[
n=\frac{t_\alpha^2}{4d(d-W_2)W_1}-1.
\]
The condition built into the formula itself shows that there is no
admissible n when W_2>d. If substitution of
a nonresponse rate larger than the tolerated error changes the sign of
the denominator and produces n<0, the result is
not a physically negative magnitude that should be repaired by taking
its absolute value. It indicates that the calculation has left
the domain in which the formula can satisfy the stated guarantee.
An analogy with the absolute value of an economic elasticity does not
repair this violation of conditions. The correct conclusion is simply:
the formula does not provide an admissible solution for that
combination of nonresponse and tolerated error.
This point is also consistent with Cochran’s warning: substantial
amounts of nonresponse are not mechanically neutralized by increasing
sample size. If nonrespondents systematically differ from respondents,
bias may persist even with a large n.
V.4. Types of
nonresponse and call dispositions
Cochran distinguishes problems such as noncoverage, temporary
absence, inability to respond, and persistent refusal. In a modern
telephone survey it is also useful to distinguish completed interview,
partial interview, refusal, noncontact, nonresidential number,
ineligible case, and unknown eligibility. Only with such final
dispositions can a standardized response rate be constructed.
The ENAVIRPA fieldwork manual distinguished busy number, no answer,
inactive, completed, pending, not completed, incomplete, refusal,
business, and duplicate. The raw log is useful for documenting the
process, but a standard rate requires the final disposition of each unit
and explicit denominator rules.
V.5. Margin of
error and total survey error
Under an ideal SRS, n=235, p=0.5, and 95%
confidence give:
\[
1.96\sqrt{\frac{0.25}{235}}\approx0.0639.
\]
That is, ±6.39 percentage points. This number refers to
idealized sampling error. It does not automatically
incorporate coverage, differential nonresponse, measurement, processing,
telephone selection, weighting, or the additional uncertainty of
subsequent models.
V.6. Expansion factor and
weighting
The base weight of a probabilistically selected unit is the inverse
of its inclusion probability:
\[
w_i=\frac1{\pi_i}.
\]
In a multistage design, if a geographic unit h, a
household j within h, and a person
i within the household have conditional probabilities
f_h, f_(j|h), and f_(i|jh), the
joint probability is:
Similarity between some sample and population proportions
does not prove that weighting is unnecessary. The
decision depends on inclusion probabilities and subsequent adjustments
for nonresponse and calibration. ENAVIRPA did not reconstruct a complete
weighting system; therefore its estimates are not presented as though
every observation had been demonstrated to carry the same population
weight.
VI. GENERALIZED LINEAR
MODELS
The generalized linear model is one of the clearest examples of how a
statistical theory can develop by preserving an earlier structure while
simultaneously extending its domain of application. The classical linear
model does not disappear: it remains contained as a special case within
a more general construction. The essential idea is to preserve a
linear systematic component,
\[
\eta_i=x_i^T\beta,
\]
while abandoning the requirement that every response variable be
Gaussian and that its mean coincide directly with the linear predictor.
The conditional mean,
\[
\mu_i=E(Y_i\mid x_i),
\]
is connected to the predictor through a link function:
\[
g(\mu_i)=\eta_i.
\]
In this way, Gaussian linear regression, logistic regression, Poisson
count models, and certain gamma specifications can be studied within a
common framework.
VI.1.
Preliminary concepts: variables, scales, and predictors
A traditional classification of measurement scales distinguishes
nominal, ordinal, interval, and ratio variables. The distinction between
discrete and continuous, however,
belongs to a different axis. Number of children, for example, is
discrete but has a meaningful zero and interpretable ratios; it can
therefore be regarded as a discrete variable on a ratio scale. It is not
appropriate to turn “discrete/continuous” into additional levels of the
nominal-ordinal-interval-ratio hierarchy.
The word covariate also deserves clarification. Some
applied traditions used it in a restricted sense for continuous
predictors. In modern regression theory it is clearer to use it broadly:
a covariate or predictor may be continuous, discrete, binary, or
categorical through appropriate coding. This is different from
covariance, which denotes a measure of association
between variables.
The word factor likewise depends on context. In
experimental design it may denote a controlled or explanatory
categorical variable; in factor analysis it denotes a latent construct.
Neither meaning should be inferred solely from the name assigned to a
column by a software package.
These clarifications matter because the model is not determined by
the computer format of a variable, but by the mathematical and
probabilistic structure of the phenomenon one wishes to represent.
VI.2. Genetic
connection with linear regression
Gujarati and Porter recall that the term regression
originated in Galton’s work on the heights of parents and children. Its
contemporary meaning is much broader: the aim is to represent how the
distribution of a response —and very often its conditional mean— changes
when one or more predictors change.
In the simple linear model:
\[
E(Y_i\mid x_i)=\alpha+\beta x_i.
\]
In matrix form:
\[
\mu=X\beta.
\]
The fitted line is not merely a geometric object superimposed on
points. Its coordinates represent observed magnitudes, and its
parameters acquire statistical meaning from a probabilistic
specification. This distinction allows us to separate geometric
fitting from a statistical model, even when
both share mathematical tools.
VI.2.1. Regression and
causality
Regression does not automatically transform an association into
causality. A coefficient can quantify a conditional relationship under a
set of assumptions without identifying, by itself, the mechanism that
produces it. Causal interpretation requires substantive theory, temporal
structure, design, interventions, or additional identification
assumptions.
Ritchey uses examples involving poverty, racial composition, and
crime to show that an aggregate correlation may condense institutional
history, segregation, economic exclusion, selection, and omitted
variables. The methodological point is not to replace a bivariate
association with another monocausal explanation; it is to deny that the
coefficient contains, by itself, the totality of the causal process.
The same caution applies to contemporary racial categories. Genetic
evidence concerning a recent African origin of modern human lineages and
later admixture with archaic populations does not transform social
racial categories into discrete biological units that can replace
historical analysis. Regression measures relations under a
representation; causal explanation requires reconstructing how those
relations are produced.
VI.3.
Regression and least squares are not synonyms
Three objects should be distinguished: model,
estimation criterion, and numerical
algorithm. In the classical Gaussian model:
This is the source of the close historical relation between linear
regression and least squares. But regression can use other criteria
—absolute deviations, robust losses, penalization— and least squares can
also be used in problems that do not seek to construct a complete
probabilistic model. The coincidence in the Gaussian case does not
justify identifying the two concepts.
VI.4.
Geometric digression: norms, metrics, convexity, and discrepancy
Geometry helps explain why least squares has such a natural form.
If
\[
e=y-X\beta,
\]
OLS minimizes \(\|e\|_2^2\). In a
finite-dimensional vector space, for \(p\ge1\),
\[
\|x\|_p=\left(\sum_i|x_i|^p\right)^{1/p}
\]
is a norm and induces the metric
\[
d(x,y)=\|x-y\|_p.
\]
The logical relation should not, however, be reversed: not every
metric is induced by a norm, and a topology does not by itself determine
a unique distance. Topological structure determines which sets are open
and which notions of continuity are preserved; metric structure adds
further information about distance.
Convexity should likewise not be confused with
subadditivity and positive homogeneity. A function \(F\) is convex when
Norms are convex and satisfy additional properties, but those
properties are not the general definition of convexity.
McCullagh and Nelder use discrepancy in a broader
sense than metric distance. In least squares, discrepancy has an
immediate Euclidean interpretation. In a GLM, by contrast, a central
measure is the deviance:
Deviance arises from log-likelihoods and need not satisfy the axioms
of a metric. The geometric intuition can be preserved —searching within
a class for a representation that disagrees as little as possible with
the data under a criterion— but the criterion need not be an \(L_p\) norm.
VI.5. Exponential families
Nelder and Wedderburn identified a class of distributions broad
enough to contain several models of interest and structured enough to
support a common theory. A standard form of an exponential dispersion
family is:
apart from known weight factors introduced by particular
parameterizations. The function \(V(\mu)\) is the variance
function. This expression displays an essential generalization:
in the homoskedastic Gaussian model variance may be constant, whereas in
Bernoulli and Poisson models it depends systematically on the mean.
For example:
Family
Mean
Variance function \(V(\mu)\)
Gaussian
\(\mu\in\mathbb
R\)
\(1\)
Bernoulli
\(0<\mu<1\)
\(\mu(1-\mu)\)
Poisson
\(\mu>0\)
\(\mu\)
Gamma
\(\mu>0\)
\(\mu^2\)
VI.6. The three components
of a GLM
VI.6.1. Stochastic component
The response belongs to an exponential family. A standard GLM
generally works with conditionally independent responses:
\[
Y_i\mid x_i\sim\mathcal F(\mu_i,\phi).
\]
This does not require identical distributions in the sense of
sharing the same mean, because
\[
\mu_i=g^{-1}(x_i^T\beta)
\]
may vary from one observation to another.
That statement should be distinguished from a different historical
observation by McCullagh and Nelder. In discussing general principles of
discrepancy, the authors state that observations should be independent
or at least interchangeable in some sense that permits
impartial treatment. That formulation belongs to their conceptual
framework and is not equivalent to requiring equality of all conditional
means in a regression.
The link makes it possible to model the mean on a scale appropriate
to its domain. A probability must remain between 0 and 1; a Poisson mean
must be positive. The transformation allows the linear predictor to
operate on a more convenient scale without violating these
restrictions.
VI.7. Identity link and
canonical link
The identity link is:
\[
g(\mu)=\mu,
\]
and only in that case:
\[
\mu=\eta.
\]
A canonical link means something different: \(g\) is chosen so that the linear predictor
coincides with the natural parameter of the family:
\[
\boxed{\eta_i=\theta_i}.
\]
Thus identity is the canonical link for the Gaussian, logit for the
binomial, and log for the Poisson. For Gamma, the canonical link is
inverse, with the sign convention depending on the parameterization.
Distribution
Canonical link
Gaussian
\(g(\mu)=\mu\)
Bernoulli/Binomial
\(g(\mu)=\log[\mu/(1-\mu)]\)
Poisson
\(g(\mu)=\log\mu\)
Gamma
\(g(\mu)\propto1/\mu\)
The canonical link has algebraic advantages, but it is not
compulsory. A binomial response may use probit instead of logit if the
theoretical or empirical construction justifies it.
do not admit a closed-form algebraic solution. This leads to
iterative procedures.
VI.9.
IRLS: distinguishing two algorithms that share a name
There is a family of algorithms called iteratively reweighted
least squares used for \(L_p\)
losses, approximations to least absolute deviations, and robust
regression. In that setting weights such as
\[
w_i\propto|e_i|^{p-2}
\]
may appear. The formulation discussed by Burrus belongs to this
context. It is a legitimate IRLS algorithm, but it does not explain the
IRLS ordinarily used to fit GLMs.
In GLMs, IRLS arises from applying Fisher scoring to
the log-likelihood; with canonical links there is an especially close
relationship with Newton-Raphson. The conceptual sequence is:
Hence the name of the algorithm: at each iteration a weighted
least-squares problem is solved, but the weights and the working
variable change because they depend on the estimated mean at the current
iteration.
The procedure can be summarized as follows:
choose admissible initial values;
compute \(\eta^{(t)}\);
obtain \(\mu^{(t)}=g^{-1}(\eta^{(t)})\);
construct \(W^{(t)}\);
construct \(z^{(t)}\);
solve the weighted problem;
repeat until a convergence criterion is satisfied.
Three cases show the unity of the method:
Model
\(d\mu/d\eta\)
\(V(\mu)\)
Weight apart from scale
Gaussian + identity
\(1\)
\(1\)
constant
Poisson + log
\(\mu\)
\(\mu\)
\(\mu\)
Binomial + logit
\(\mu(1-\mu)\)
\(\mu(1-\mu)\)
\(\mu(1-\mu)\)
The Gaussian case reveals the connection with OLS: because the
weights are constant, the iteration reduces to the ordinary linear
problem.
VI.10. What does
not explain IRLS convergence
It may be tempting to think that reweighting “brings” observations
closer together, reduces predictor variance, and that the Central Limit
Theorem makes the algorithm converge toward a normal distribution.
That does not happen. The weights depend on conditional
variance and the derivative of the link; they do not physically move the
values of \(X\) or force \(\operatorname{Var}(X)\to0\).
The CLT appears elsewhere in the theory: under regularity conditions
it contributes to the asymptotic normal approximation of
maximum-likelihood estimators. That is an inferential property of
sequences of estimators, not the numerical mechanism of IRLS.
Nor is it sufficient to write
\[
\beta^{(t+1)}=F(\beta^{(t)})
\]
to invoke Banach’s fixed-point theorem. That theorem requires proving
that \(F\) is a contraction on an
appropriate complete space. The mere existence of an iteration does not
prove contractivity. In practice, GLMs may exhibit convergence problems
due to poor numerical conditioning, collinearity, separation, boundary
solutions, or problematic specifications.
VI.11.
Sufficient statistics under a canonical link
When
\[
\theta_i=\eta_i=x_i^T\beta,
\]
the part of the log-likelihood jointly linking \(y\) and \(\beta\) contains:
\[
\frac1{a(\phi)}\beta^TX^Ty.
\]
For fixed dispersion and under the usual conditions of an exponential
family, the relevant dependence of the sample on \(\beta\) appears through \(X^Ty\). This explains the
sufficient-statistic structure emphasized in classical GLM theory. In
canonical log-linear models with factors, the score equations may
additionally imply equality between certain observed and fitted margins;
this is a property of those specifications, not a universal rule for
every link.
The conceptual unity can finally be summarized as:
The generalization does not consist in erasing differences among
distributions, but in identifying which structure can remain while their
particular determinations change systematically.
VII. PROBIT AND LOGIT MODELS
Probit and logit models arise when the response is binary and the
immediate object is to model a conditional probability:
\[
p_i=P(Y_i=1\mid x_i).
\]
The problem with the linear probability model is that \(x_i^T\beta\) can take any real value,
whereas a probability must remain in \([0,1]\). Probit and logit links solve this
incompatibility by transforming the probability onto an unrestricted
scale.
VII.1. Probit model
The probit uses the standard normal distribution function:
\[
\Phi^{-1}(p_i)=x_i^T\beta,
\]
so that:
\[
p_i=\Phi(x_i^T\beta).
\]
The observed response remains Bernoulli; the normal distribution
appears in the link function or, equivalently, in a
latent-variable interpretation in which an unobserved normal variable
crosses a threshold and generates the 0/1 response. It should therefore
not be claimed that the observed binary variable is normal.
whereas their logarithm ranges over the entire real line. Inverting
the link:
\[
p_i
=
\frac{1}{1+\exp(-x_i^T\beta)}.
\]
The general logistic function can be written:
\[
f(x)=\frac{L}{1+e^{-k(x-x_0)}},
\]
with asymptotes 0 and \(L\) and
central symmetry around \((x_0,L/2)\).
In ordinary binary regression one takes \(L=1\).
VII.2.1. Interpretation
of coefficients
In logit, a coefficient \(\beta_j\)
represents the change in log-odds associated with a one-unit increase in
\(x_j\), holding the other covariates
constant. Therefore:
\[
e^{\beta_j}
\]
is the multiplicative odds ratio associated with that change. An odds
ratio greater than 1 implies increased odds; less than 1, reduced odds;
equal to 1, no multiplicative change.
This should not be confused with a constant marginal effect on
probability. Since
so it depends on the individual’s position on the logistic curve.
VII.3.
Probit and logit: similarities and differences
Both links are sigmoidal, monotonic, and yield admissible
probabilities. Their results are often qualitatively similar in many
applications; their coefficients, however, are not on the same scale.
Logit has a particularly convenient interpretation through odds ratios;
probit is naturally connected to a normal latent-variable
formulation.
The choice should not be reduced to habit. It may depend on
disciplinary tradition, interpretability, substantive assumptions, fit
comparison, or computational convenience.
VII.4. Inference
Maximum likelihood yields \(\hat\beta\). Under regularity conditions,
the inverse information matrix approximates the covariance matrix of the
estimators. An individual Wald test uses:
These quantities answer different questions. An individual p-value
does not summarize predictive ability; an AIC does not prove causality;
and a model that classifies reasonably well does not automatically make
all of its coefficients well-identified parameters.
VII.5. Separation and
unstable estimates
In binary regression, complete separation may occur
when a combination of predictors perfectly classifies the cases, or
quasi-complete separation when separation occurs except for some
overlaps. Under those conditions, ordinary maximum likelihood may drive
some coefficients toward very large magnitudes; Wald standard errors
grow and conventional inference ceases to be reliable.
Thus enormous coefficients accompanied by enormous standard errors
should not simply be interpreted as “very large but nonsignificant
effects”: they may be a geometric symptom of separation or extremely
sparse cells. Possible responses include reviewing coding, simplifying
categories when substantively defensible, obtaining more observations,
penalization, or bias-reduction methods such as Firth’s correction.
VIII. STATISTICAL LEARNING
THEORY
VIII.1. General definition
Following James, Witten, Hastie, and Tibshirani, an elementary
representation of supervised learning is:
\[
Y=f(X)+\varepsilon.
\]
The problem is to estimate the unknown function
\(f\) from the data. In some problems
the main interest is predicting new observations; in others,
understanding which variables are associated with the response and how;
in many cases both goals coexist.
The expression learning from data does not mean dispensing
with theory. Every choice of variables, representation, functional
class, loss, and validation procedure contains decisions about which
regularities are regarded as possible and relevant.
Historically, statistics developed a tradition particularly concerned
with probability models, estimation, uncertainty, and inference, whereas
machine learning emerged under a strong influence from computer science,
algorithms, and predictive performance. This difference helps explain
cultural emphases, but it does not establish an essential boundary.
Statistics predicts, and machine learning uses probability and
inference.
Nor is it correct to say that machine-learning methods “make few
assumptions” in an absolute sense. Many shift assumptions from an
explicit parametric form toward an inductive bias:
hypothesis class, architecture, loss function, regularization,
invariances, and training rules.
A hypothesis space or class can be written:
\[
\mathcal H=\{h:X\rightarrow Y\}.
\]
It is not the same object as the \(H_0\) and \(H_1\) hypotheses of Neyman-Pearson. There
is a very broad logical kinship —delimiting possibilities— but the
mathematical objects and inferential problems are different.
VIII.2. Learning paradigms
In an elementary classification:
supervised learning: pairs \((x_i,y_i)\) are observed and the aim is to
learn a relation that predicts \(y\)
from \(x\);
unsupervised learning:\(x_i\) are observed without an explicit
supervising response, and patterns or representations are sought;
reinforcement learning: an agent interacts with an
environment through states, actions, and rewards.
Online learning belongs to another axis. It
describes a procedure that updates the model as observations arrive.
There can be supervised online learning, unsupervised online learning,
and so forth.
In unsupervised learning, clustering is only one possibility. Others
include dimensionality reduction, density estimation, anomaly detection,
association rules, and representation learning.
VIII.3. Binary
classification
If the positive class is the event of interest, there are four
possibilities:
true positive (TP): actual positive, predicted
positive;
false positive (FP): actual negative, predicted
positive;
true negative (TN): actual negative, predicted
negative;
false negative (FN): actual positive, predicted
negative.
The confusion matrix organizes these cases:
Predicted negative
Predicted positive
Actual negative
TN
FP
Actual positive
FN
TP
The matrix may be computed on training, validation, test, or external
data. When it is computed on the same cases used to estimate the model,
it describes in-sample performance.
VIII.4. Classification
metrics
Accuracy is:
\[
Accuracy=\frac{TP+TN}{TP+TN+FP+FN}.
\]
The error rate is its complement:
\[
Error=\frac{FP+FN}{N}=1-Accuracy.
\]
Sensitivity or recall is:
\[
Sensitivity=\frac{TP}{TP+FN},
\]
and measures the proportion of actual positives detected.
Specificity is:
\[
Specificity=\frac{TN}{TN+FP}.
\]
Classification precision, also called positive predictive
value, is:
\[
Precision=\frac{TP}{TP+FP}.
\]
Negative predictive value is:
\[
NPV=\frac{TN}{TN+FN}.
\]
A terminological ambiguity should be avoided: classification
precision is not metrological precision understood as low
dispersion among repeated measurements. They are different concepts that
share a word.
Accuracy can be misleading with imbalanced classes. If 90% of cases
belong to the negative class, a classifier that always answers
“negative” obtains 90% accuracy and yet has zero sensitivity. Every
evaluation should therefore be compared with a baseline
and with metrics consistent with the scientific cost of errors.
VIII.5.
Training error and generalization error
For a classifier \(\hat f\), the
observed error on the training data is:
The difference is fundamental. A highly flexible model may fit the
training data extraordinarily well and fail on new observations. This is
overfitting. Test sets, cross-validation, or other
procedures are used to estimate generalization while preventing the
algorithm from being evaluated only on cases it already used to
learn.
VIII.6.
Probabilities, thresholds, and classification
A probabilistic model such as logit produces \(\hat p_i\), not logically necessary
classes. To classify, a threshold \(c\)
must be chosen:
\[
\hat Y_i=I\{\hat p_i>c\}.
\]
Changing \(c\) changes the confusion
matrix. Lowering the threshold usually detects more positives and raises
sensitivity, but it may also produce more false positives and reduce
specificity. Thus 0.5 is not a sacred value, and
0.25 cannot be adopted without explanation either. The
choice should follow costs, prevalence, the study objective, or a rule
defined on validation data, not the value that produces the most
favorable appearance on the training sample.
ROC curves examine sensitivity against the false-positive rate across
all thresholds. In problems with a rare positive class, precision-recall
curves may be especially informative because they display directly the
tradeoff between positive detection and the purity of positive
predictions.
VIII.7. GLMs and
supervised learning
GLMs are historically statistical models. Nevertheless, when fitted
to \((X,Y)\) pairs to predict new
responses they also function as supervised-learning procedures. Bayesian
treatment is not what creates this status: a frequentist, Bayesian, or
penalized GLM may be used predictively.
Logistic regression is the clearest example. It models:
By its structure, it is a probabilistic regression model. But its
probabilities can legitimately be converted into classes through a
threshold. There is no contradiction:
\[
\boxed{
\text{it can be used as a supervised classifier}
}.
\]
The historical origin of the method explains its construction, but
does not exhaust all of its later scientific uses.
VIII.8.
Inference and prediction are not two different models
Different questions can be asked of the same logit. From an
inferential perspective: how much does the conditional association
change with each covariate? How uncertain is the coefficient? Which
model is compatible with the data? From a predictive perspective: what
probability does it assign to an unseen case? Does it discriminate
better than a baseline? What errors does it make out of sample?
These questions require different diagnostics, but they do not
automatically turn logit into two algorithms. The same fit can be
studied for both inferential and predictive properties. This is
precisely why an individual coefficient may be imprecise while a
combination of predictors still has some predictive utility; or,
conversely, a model may contain statistically detectable associations
yet discriminate new cases poorly.
The ENAVIRPA evaluation that follows deliberately keeps the two
questions separate.
IX. REPRODUCIBLE
INFERENTIAL RESULTS
IX.1. Analytical
database and coding audit
The ENAVIRPA2021csv.csv database contains 235 rows and
161 variables. AE1 contains 56 “SÍ” and 179 “NO”. In AE2A-AE2D, the 179
cases excluded by the AE1 skip appear as NA, confirming
that they must be classified as not applicable rather
than DK/NA.
AE3-AE9 already appear in the database as textual labels. The visible
discrepancy between the questionnaire codes 4-3-2-1 and the
1-2-3-4 order used in some presentation tables therefore
ceases to affect reproducibility: categories are processed by name.
IX.2. Main
variable: property-capital income
AE6 contains:
192 cases “No es una fuente de ingresos/apoyo”;
21 “Sin cambios”;
13 “Disminuyó”;
5 “Aumentó”;
4 “No responde”.
The main binary variable is therefore defined with 39 positive cases,
192 negative cases, and four missing cases. After also removing four
missing ages and one DK/NA nationality, the complete model sample
consists of 227 observations: 39 positive and 188
negative.
IX.3.
Correlations among the model’s binary variables
With capital=1 for presence of the AE6 source,
mujer=1, adulto25=1, and
extranjero=1, the Pearson correlation matrix —equivalent to
the phi coefficient when both variables are binary— is:
Variable
capital
adult25
female
foreign
capital
1.000
0.011
-0.070
-0.011
adult25
0.011
1.000
0.145
0.056
female
-0.070
0.145
1.000
0.009
foreign
-0.011
0.056
0.009
1.000
The associations are small in magnitude. This anticipates that a
model using these three predictors will have little ability to explain
variation in the AE6 indicator within this sample.
The model contains 227 observations, a log-likelihood of
-103.51, a null log-likelihood of
-104.13, McFadden’s pseudo-R² of
0.0060, and a joint likelihood-ratio test with
p=0.740. None of the three predictors provides individual
statistical evidence of an association different from zero at
conventional levels in this specification.
Unlike the operationalization based on TE1 business ownership, the
AE6 indicator does not produce explosive coefficients or standard errors
measured in thousands of units. This difference confirms that construct
specification and cell distribution can radically alter the numerical
behavior of a model.
IX.5. Probit model
Term
Coef.
SE
z
p
95% CI for coef.
Intercept
-0.9099
0.3095
-2.940
0.003
[-1.517, -0.303]
Woman (1 = woman)
-0.2161
0.1988
-1.087
0.277
[-0.606, 0.174]
Age ≥ 25
0.0952
0.3200
0.297
0.766
[-0.532, 0.722]
Foreign (1 = non-Costa Rican)
-0.0653
0.3631
-0.180
0.857
[-0.777, 0.646]
The probit leads to the same substantive conclusion: sex,
dichotomized age, and nationality together have very little explanatory
ability for the observed property-capital income indicator in AE6. Logit
and probit use different link scales, so their coefficients should not
be compared one by one in magnitude.
IX.6. Rurality and
other planned predictors
Rurality appeared in the conceptual design but was not constructed
during the available period. It would not be methodologically correct to
include it by pretending that a textual locality is already a
rural/urban classification. INEC classifies geographic units using
specific criteria; until that classification is applied reproducibly to
SD13, the variable must remain outside the model.
Similarly, E6 does not provide a universal variable of “access to
virtual education”: it was asked only of 161 cases according to
questionnaire flow. It can be analyzed as a barrier among applicable
cases or incorporated into a model restricted to that universe, but it
cannot be imputed as “yes” or “no” to the 74 cases omitted by the
skip.
X.
PREDICTIVE EVALUATION: WHAT IT SHOWS AND WHAT IT DOES NOT SHOW
The same logistic regression can be studied from two perspectives. In
inference, we ask what the coefficients and their uncertainty indicate
about a modeled relationship. In prediction, we ask how well the
estimated probabilities generalize to observations the algorithm did not
see during fitting. These are not necessarily two different
models: they can be two evaluations of the same model.
A reader might believe that it is enough to fit the logit to the 235
observations and then compute a confusion matrix on those same
observations. That answers only: “how well does the model reproduce the
data on which it was estimated?” It does not answer: “how well will it
predict new cases?” This is the difference between in-sample
performance and generalization.
Under the AE6 operationalization used here, the fitted logit
probabilities range approximately from 0.129 to 0.208.
With the threshold c=0.25, no observation exceeds the
cutoff. The resulting classifier predicts “no property-capital income”
for all 227 people:
Metric at threshold 0.25
Result
True positives
0
True negatives
188
False positives
0
False negatives
39
Accuracy
82.8%
Sensitivity
0.0%
Specificity
100.0%
The 82.8% accuracy is not a predictive victory: it
coincides with the proportion of the majority class —82.8%— and is
obtained at the cost of zero sensitivity. The model identifies no
positive cases at this threshold.
This illustrates why accuracy should not be evaluated in
isolation with imbalanced classes. An algorithm that always predicts the
majority class can achieve high accuracy and nevertheless be useless for
detecting the minority class.
The threshold is not a universal mathematical constant either.
Choosing 0.25, 0.5, or another value changes the tradeoff between
sensitivity and specificity. It should be defined by a cost function, a
substantive need, or a validation procedure, not by post-hoc inspection
of the same sample.
Finally, five-fold stratified cross-validation on these three
predictors yields, as a reference, an approximate ROC AUC of
0.485 and an average precision close to
0.167. These results are compatible with virtually no
discriminative ability in this specification. The pedagogical objective
is not to make “classical statistics” or “machine learning” win, but to
show that a predictive claim requires out-of-sample evaluation.
XI. LIMITATIONS
XI.1. Collective
character of the design
The modules were designed by different members of the course and
assembled for a common survey. There was no single theoretical framework
determining every question from the outset. This limits later
constructions that require combining items originally written for
different objectives.
XI.2. Number of interviews
Three hundred interviews were planned and 235 were completed. The
difference reduces precision and, above all, limits subgroup analyses
and models with many categories. The issue is not that 235 is
intrinsically “small”; adequacy depends on prevalence, the number of
parameters, and cell structure.
XI.3. Design, coverage, and
weighting
The telephone frame excludes persons outside operational coverage and
may produce unequal inclusion. Complete design weights and
nonresponse/calibration adjustments were not reconstructed. Results are
therefore not presented as fully weighted national estimates.
XI.4. Nonresponse
The aggregate call-log data do not permit calculation of a complete
AAPOR response rate. In addition, nonresponse and noncontact may be
associated with socioeconomic conditions, so merely increasing
n does not guarantee absence of bias.
XI.5. Rurality
The rural/urban variable was conceived but not constructed. INEC
assigns degrees of urbanization to specific geographic units; the work
needed to link SD13 to that classification was not completed.
Example of geographic-classification
criteria used by INEC.
XI.6. Skip patterns
and analysis universes
AE2, TE6, and E6 show why NA does not have a single
meaning. It may mean not applicable because of a skip, nonresponse, or
missing data. The correct denominator depends on the universe of each
question. Treating every missing value as DK/NA changes percentages and
may bias derived variables.
XI.7. Dichotomous variables
Dichotomizing age, diet, income, or economic stress simplifies
modeling but sacrifices gradients. Whenever possible, original variables
should be retained and dichotomies used only when justified by the model
or substantive question.
XI.8. Capital as an
observed variable
AE6 is an indicator of property-capital income, not an asset census.
It can distinguish observed presence/absence of that source during the
period, but it cannot legally verify every asset owned by a person or
detect capital with no observed flow. This is an observational
limitation.
XI.9. Income and poverty
SD5 records bands of gross monthly household income, not continuous
equivalized disposable income. It therefore cannot directly implement
the 60%-of-median-equivalized-disposable-income methodology used by the
European/UNECE at-risk-of-poverty indicator.
XI.10. Causality
The study is observational and cross-sectional. Regression
associations do not, by themselves, identify causal effects of sex, age,
nationality, or other variables.
XI.11. Predictive evaluation
Training performance is not a measure of generalization. Any
predictive claim should rely on independent test data or appropriate
cross-validation and should consider class imbalance and threshold
selection.
XII. CONCLUSIONS
Government support. Fifty-six people, 23.8% of
the sample, reported having received support. Among them, 85.7% reported
financial resources and 41.1% food. Because AE2 allows multiple
responses, those percentages are calculated over eligible people and may
sum to more than 100%.
Labor income. Income or earnings from paid work
decreased for 37.0% of the full sample, increased for 3.8%, and remained
unchanged for 38.3%.
Household income. In AE10, 44.3% reported a
decrease in the income of another household member. In AE11, 34.5%
indicated that family income was insufficient to live on and 47.2% that
it was just enough; 17.0% stated that it was enough and allowed them to
save.
Observed property-capital. For 81.7% of
respondents, AE6 was not a source of income/support. In the specific
sense used in this analysis, this indicates an observed absence of
income derived from property-capital within the categories asked. It
does not mean that an exhaustive legal inspection of assets was carried
out.
Own business and independent producer. TE1 shows
33 people with an own business and no employees and 11 with an own
business employing other people. Those positions should not be collapsed
into one another or automatically confused with AE6.
Civil organizations. For 91.1% of the sample,
support from NGOs, foundations, or nonprofit organizations was not a
source of support in AE9.
International remittances. AE5 was an effective
source for 28 people —17 with no change and 11 with a decrease— plus
five nonresponses; 202 reported that it was not a source. Among the 28
people with a substantive response confirming the source, 39.3% reported
a decrease.
Work. A total of 44.7% worked for an employer.
TE6 was applicable to only 38 people; within that universe, 42.1%
reported more working hours.
Health and habits. Hydration increased for
37.0%. Hours of sleep remained the same for 57.0%, decreased for 26.8%,
and increased for 14.9%. Physical activity increased for 26.0% and
decreased for 24.3%.
Virtual education. Among the 161 applicable E6
cases, 6.8% reported lack of money and 16.8% lack of time. Relative to
all 235 interviews, these correspond to 4.7% and 11.5%,
respectively.
Sample size. The value p=0.5 is
used because it maximizes p(1-p) and yields a conservative
calculation, not because the CLT forces responses to split 50/50. The
±6.39% is a reference sampling error under ideal SRS, not a guarantee of
ENAVIRPA’s total error.
Nonresponse. The 30.0546% figure computed from
busy and unanswered calls does not by itself constitute a standardized
response rate. The Birnbaum-Sirken formula cannot be repaired by taking
an absolute value when its conditions produce an inadmissible
n.
Inference on capital. Under the AE6
operationalization, logit and probit provide no evidence of a
substantive association between observed property-capital income and
sex, age ≥25, or nationality in the analytical sample of 227
cases.
Prediction. With the same predictors, the model
has little discriminative ability. A 0.25 threshold classifies every
case as negative and obtains 82.8% accuracy only because that is the
majority class. Out-of-sample evaluation is indispensable.
Poverty. No “UNECE poverty rate” is presented by
taking 60% of mean gross household income. The relative standard
requires the median of equivalized disposable income; SD5 does not
contain that variable in the required form.
Scope. ENAVIRPA 2021 is especially valuable as
an exercise in applied methodology: it shows that design, skips, coding,
nonresponse, operationalization, and evaluation criteria determine what
can be claimed from data. Technical correction does not diminish the
empirical value of the survey; it more precisely delimits its
informational content.
XIII.
APPENDIX A. TOPOLOGICAL DISTANCES, METRIC DISTANCES, AND COLLECTIVE
BEHAVIOR
In graph theory, a graph is a pair G=(V,E). An
isomorphism between G_1 and G_2 is a bijection
f:V(G_1)→V(G_2) preserving adjacency:
Preservation of adjacency implies preservation of graph
distance, defined as the minimum number of edges in a path
between two vertices. It does not imply preservation of Euclidean
distances in a particular drawing of the graph.
Two representations of isomorphic
graphs.Numerical example of graph
isomorphism.
Three ideas must be kept separate: graph isomorphism; topological
invariance under homeomorphisms in general topology; and “topological
distance” in studies of collective behavior. A homeomorphism does not in
general preserve metric distances —that is the role of an isometry—. It
is therefore incorrect to define a topological distance simply as a
distance that remains invariant under perturbations.
In Ballerini and colleagues’ work on starling flocks, “topological
distance” means neighbor rank: first neighbor, second,
third, and so on. The empirical evidence indicated interaction with
approximately six or seven neighbors, relatively independently of metric
density. The conceptual distinction is:
metric rule: a physical radius is kept fixed and
the number of neighbors inside it changes;
topological rule: approximately the number/rank of
neighbors is kept fixed and the physical radius containing them
changes.
The anisotropy of the angular distribution of neighbors made it
possible to estimate up to what rank interaction persisted; for an
isotropic distribution, the expected value of the relevant factor is
1/3. Later studies of jackdaws also showed that the regime
can change with context, with topological interactions appearing during
transit and metric interactions in other situations. The methodological
lesson is material: the relevant structure must be determined
empirically and may change with the concrete conditions of the
system.
XIV.
APPENDIX B. INCOME DISTRIBUTION AND THE POVERTY CRITERION
SD5 recorded bands of total monthly household income. The database
contains:
Reported band
n
% of total
DK/NA
55
23.4
200 thousand to less than 400 thousand
53
22.6
Less than 200 thousand colones
42
17.9
400 thousand to less than 600 thousand
24
10.2
1 million to less than 1.5 million
18
7.7
600 thousand to less than 800 thousand
17
7.2
1.5 million or more
14
6.0
800 thousand to less than 1 million
12
5.1
The problem is not that poverty cannot be studied with a survey, but
that the available variable must be matched with a definition
corresponding to what it actually measures. A reader might believe that
it is enough to take 60% of national mean income and
compare that amount with gross monthly household income. That is
not the relative criterion used by Eurostat/UNECE.
The usual at-risk-of-poverty measure uses 60% of the median
equivalized disposable income. There are three important
differences:
median, not mean;
disposable income, not unadjusted gross
income;
equivalized, that is, adjusted for household size
and composition.
SD5 records intervals of total household income and a nonresponse
category. Without sufficient information to reconstruct individual
equivalized disposable income and its population median, it is not
methodologically legitimate to call a percentage obtained by applying
60% of mean gross income a “UNECE poverty rate.”
It is possible to describe how many households in the sample fall
within each band, and AE11 may be used as an indicator of subjective
income sufficiency. A future measurement compatible with the relative
standard could also be designed by collecting disposable income,
household composition, and the elements required for equivalization.
XV. R CODE FOR REPRODUCTION
The following code is designed to run with
ENAVIRPA2021csv.csv in the same directory as the analysis
file. The database is encoded in Windows-1252. Variable names and
categorical values remain in Spanish because they are the literal values
stored in the original database.
datos <-read.csv("ENAVIRPA2021csv.csv",fileEncoding ="Windows-1252",stringsAsFactors =FALSE,check.names =FALSE)stopifnot(nrow(datos) ==235)stopifnot(all(c("AE1","AE2A","AE2B","AE2C","AE2D","AE3","AE4","AE5","AE6","AE7","AE8","AE9","AE10","AE11") %in%names(datos)))
XV.1.
Verification of AE1-AE2 and skip patterns
table(datos$AE1, useNA ="ifany")table(datos$AE2A, useNA ="ifany")table(datos$AE2B, useNA ="ifany")table(datos$AE2C, useNA ="ifany")table(datos$AE2D, useNA ="ifany")# There must be 179 NAs in AE2A-AE2D because AE1=NO skips to AE3.stopifnot(sum(is.na(datos$AE2A)) ==179)stopifnot(sum(is.na(datos$AE2B)) ==179)stopifnot(sum(is.na(datos$AE2C)) ==179)stopifnot(sum(is.na(datos$AE2D)) ==179)
XV.2.
AE3-AE9 tables using labels rather than numerical codes
XV.3.
Construction of the observed property-capital indicator
datos$capital <-ifelse( datos$AE6 =="No es una fuente de ingresos/apoyo", 0,ifelse( datos$AE6 %in%c("Disminuyó", "Aumentó", "Sin cambios"), 1, NA ))table(datos$capital, useNA ="ifany")
set.seed(2021)K <-5fold <-rep(NA_integer_, nrow(modelo))# Simple stratified assignment by classfor (cl insort(unique(modelo$capital))) { idx <-which(modelo$capital == cl) fold[idx] <-sample(rep(1:K, length.out =length(idx)))}p_cv <-rep(NA_real_, nrow(modelo))for (k in1:K) { train <- modelo[fold != k, ] test <- modelo[fold == k, ] fit_k <-glm(capital ~ mujer + adulto25 + extranjero,family =binomial(link="logit"), data=train) p_cv[fold == k] <-predict(fit_k, newdata=test, type="response")}# AUC function without additional packages (Mann-Whitney / ranks)auc_rank <-function(y, p) { pos <- y ==1; neg <- y ==0 r <-rank(p, ties.method="average") (sum(r[pos]) -sum(seq_len(sum(pos)))) / (sum(pos) *sum(neg))}auc_cv <-auc_rank(modelo$capital, p_cv)auc_cv# Confusion matrix at the same threshold, only as an example.y_cv <-ifelse(p_cv >0.25, 1, 0)table(Real=modelo$capital, Predicho=y_cv)
XV.8.
Income contraction without mixing it with AE11 sufficiency
vars_ingreso <-paste0("AE", 3:9)disminucion_fuente <-apply( datos[vars_ingreso], 1,function(x) any(x =="Disminuyó", na.rm =TRUE))datos$contraccion_ingreso <-as.integer( disminucion_fuente | datos$AE10 =="Ingreso disminuido")# AE11 is kept separate as an indicator of sufficiency/economic stress.table(datos$contraccion_ingreso, useNA="ifany")table(datos$AE11, useNA="ifany")
XVI. REFERENCES
Aldrich, J. H., & Nelson, F. D. (1984). Linear Probability,
Logit, and Probit Models. Sage.
American Association for Public Opinion Research. (2016).
Standard Definitions: Final Dispositions of Case Codes and Outcome
Rates for Surveys (9th ed.). AAPOR.
Ballerini, M., Cabibbo, N., Candelier, R., Cavagna, A., Cisbani, E.,
Giardina, I., et al. (2008). Interaction ruling animal collective
behavior depends on topological rather than metric distance: Evidence
from a field study. Proceedings of the National Academy of Sciences,
105(4), 1232-1237.
Birnbaum, Z. W., & Sirken, M. G. (1950). Bias due to
non-availability in sampling surveys. Journal of the American
Statistical Association, 45(249), 98-111.
Bishop, C. M. (2006). Pattern Recognition and Machine
Learning. Springer.
Cann, R. L., Stoneking, M., & Wilson, A. C. (1987). Mitochondrial
DNA and human evolution. Nature, 325, 31-36.
Cochran, W. G. (1977). Sampling Techniques (3rd ed.).
Wiley.
Departamento Administrativo Nacional de Estadística. (2003).
Methodological documentation on expansion factors and sampling design.
DANE.
Greene, W. H. (2012). Econometric Analysis (7th ed.).
Pearson.
Gujarati, D. N., & Porter, D. C. (2009). Basic
Econometrics (5th ed.). McGraw-Hill.
Hastie, T., Tibshirani, R., & Friedman, J. (2009). The
Elements of Statistical Learning: Data Mining, Inference, and
Prediction (2nd ed.). Springer.
Instituto Nacional de Estadística y Censos de Costa Rica. (2016).
Manual de Clasificación Geográfica con Fines Estadísticos de Costa
Rica. INEC.
Instituto Nacional de Estadística y Censos de Costa Rica. (2019).
ENIGH 2018: Cuadros sobre ingresos de los hogares. INEC.
James, G., Witten, D., Hastie, T., & Tibshirani, R. (2013).
An Introduction to Statistical Learning with Applications in R.
Springer.
Kolmogorov, A. N., & Fomin, S. V. (1975). Introductory Real
Analysis. Dover.
Ling, H., Mclvor, G. E., van der Vaart, K., Vaughan, R. T., Thornton,
A., & Ouellette, N. T. (2019). Local interactions and their
group-level consequences in flocking jackdaws. Nature
Communications, 10, 5174.
Lohr, S. L. (2019). Sampling: Design and Analysis (2nd ed.).
CRC Press.
McCullagh, P., & Nelder, J. A. (1989). Generalized Linear
Models (2nd ed.). Chapman & Hall.
Nelder, J. A., & Wedderburn, R. W. M. (1972). Generalized Linear
Models. Journal of the Royal Statistical Society, Series A,
135(3), 370-384.
Reich, D., Green, R. E., Kircher, M., Krause, J., Patterson, N.,
Durand, E. Y., et al. (2010). Genetic history of an archaic hominin
group from Denisova Cave in Siberia. Nature, 468,
1053-1060.
Ritchey, F. J. (2008). The Statistical Imagination: Elementary
Statistics for the Social Sciences (2nd ed.). McGraw-Hill.
United Nations Economic Commission for Europe. (2017). Guide on
Poverty Measurement. United Nations.
Vapnik, V. N. (1998). Statistical Learning Theory.
Wiley.
Waksberg, J. (1978). Sampling methods for random digit dialing.
Journal of the American Statistical Association, 73(361),
40-46.
Wooldridge, J. M. (2010). Econometric Analysis of Cross Section
and Panel Data (2nd ed.). MIT Press.
Prediction, classification, generalization error, and the relationship
between statistics and machine learning
José Mauricio Gómez Julián · 2021
Statistical learning refers, in broad terms, to a collection of methods through which
one attempts to estimate an unknown function from data. Following the formulation used
by James, Witten, Hastie, and Tibshirani, we may imagine a response variable \(Y\)
related to a set of input variables \(X\) through:
\[
Y=f(X)+\varepsilon,
\]
where \(f\) represents an unknown systematic relationship and \(\varepsilon\) collects
variation not explained by the model. The problem is therefore to obtain from the
available observations an estimate \(\hat f\) sufficiently useful for the purpose of
the investigation.
That purpose may be predictive, inferential, or descriptive. In some applications the
primary concern is predicting new observations; in others it is understanding which
variables are related to the response and in what manner; and in many investigations
both aims appear simultaneously.
Learning from data does not mean eliminating theory: it means using the information
contained in observations to estimate regularities that can be described, tested,
or used for prediction.
1. Statistical learning and machine learning
Hastie, Tibshirani, and Friedman use the term statistical learning to describe
a broad collection of methods for data analysis, including prediction, inference,
classification, variable selection, regularization, clustering, and other forms of
structure extraction.
Machine learning developed historically under a strong influence from computer science
and algorithm design. Statistics, by contrast, developed a tradition particularly
concerned with probability models, estimation, uncertainty, and inference.
This historical difference helps explain certain emphases, but does not constitute a
rigid logical boundary. Statistics also builds predictors, while machine learning also
uses probabilistic models, estimation, regularization, and inference. The two
traditions have increasingly converged because they frequently address the same
underlying problems.
A difference of emphasis, not essence
Much of modern machine learning emphasizes predictive performance and
out-of-sample generalization, whereas classical statistics often emphasized
estimation and inference. Neither field, however, is exclusively reducible to one
of these purposes.
Nor is it correct to say that machine-learning methods make no assumptions. Many impose
fewer explicit parametric assumptions about the distribution of the data, but they
still embody an inductive bias through the allowed function class,
algorithmic architecture, loss function, regularization, invariances, or representation.
In this context, a hypothesis space is a set of candidate functions
or rules from which a learning procedure may select:
\[
\mathcal H
=
\{h:X\rightarrow Y\}.
\]
This should not be confused with the hypotheses \(H_0\) and \(H_1\) of classical
Neyman–Pearson hypothesis testing. There is a broad logical analogy, but the
mathematical objects and inferential problems are different.
2. Learning paradigms
Paradigm
Available information
Typical objective
Supervised learning
Pairs \((x_i,y_i)\)
Predict a target variable or label
Unsupervised learning
Only \(x_i\)
Discover structure without an explicit target
Reinforcement learning
States, actions, and rewards
Learn a decision policy
Online learning belongs to another classificatory dimension. It refers
to procedures that update the model as new observations arrive. One may therefore have
supervised online learning, unsupervised online learning, and so forth.
Unsupervised methods include clustering, dimensionality reduction, anomaly detection,
density estimation, and representation learning, among others.
3. Positives and negatives in binary classification
True positive (TP): the case is positive and the model predicts positive.
False positive (FP): the case is negative and the model predicts positive.
True negative (TN): the case is negative and the model predicts negative.
False negative (FN): the case is positive and the model predicts negative.
In medicine, for example, “positive” might represent the presence of a disease.
A false positive would classify a healthy person as diseased, while a false negative
would fail to detect the disease in someone who has it.
4. The confusion matrix
Actual class
Predicted class
Negative
Positive
Negative
TN True negative
FP False positive
Positive
FN False negative
TP True positive
The main diagonal contains correct classifications; the off-diagonal cells contain
errors.
A confusion matrix can be computed on training data, but also on validation data,
test data, or genuinely new external observations. This distinction is fundamental
when the objective is to assess generalization.
Accuracy may be misleading under strong class imbalance. A classifier that always
predicts a 99% majority class can achieve 99% accuracy while learning virtually
nothing about the minority class.
In diagnostic terminology this quantity is commonly called the
positive predictive value.
Terminological distinction
Classification precision should not be confused with metrological
precision, which refers to the low dispersion of repeated measurements.
The concepts are unrelated despite sharing the same English word.
5.5. Negative predictive value
\[
\operatorname{NPV}
=
\frac{TN}{TN+FN}.
\]
5.6. Summary
Metric
Formula
Question answered
Accuracy
\((TP+TN)/N\)
What fraction was classified correctly?
Error
\((FP+FN)/N\)
What fraction was classified incorrectly?
Sensitivity / Recall
\(TP/(TP+FN)\)
How many actual positives were detected?
Specificity
\(TN/(TN+FP)\)
How many actual negatives were detected?
Precision / PPV
\(TP/(TP+FP)\)
How many predicted positives were truly positive?
NPV
\(TN/(TN+FN)\)
How many predicted negatives were truly negative?
6. Training error and generalization error
If \(\hat f\) is a classifier estimated from \(n\) training observations, its training
error is:
This measures how well the procedure reproduces the observations used to fit it, but
does not necessarily answer the central predictive question: what happens on new data?
Here \((X_0,Y_0)\) denotes a new observation not used during training.
A model has learned successfully not when it merely memorizes known data, but when
the estimated regularity retains predictive power on observations that were not
used to fit it.
Validation sets, test sets, cross-validation, and related procedures are designed to
estimate this out-of-sample performance.
An extremely small training error may even indicate overfitting when
performance deteriorates substantially on new data.
7. Statistics and machine learning
The relationship between statistics and machine learning cannot be reduced to a simple
opposition. Both fields employ functions, optimization, probability, geometry,
regularization, and computation in order to extract structure from data.
One historical difference concerns the degree to which functional form is specified
explicitly before parameter estimation.
\[
Y
=
\beta_0+\beta_1X_1+\beta_2X_2+\beta_3X_3+\varepsilon.
\]
If theory or evidence suggests a nonlinear relationship with \(X_2\), we may instead
specify:
\[
Y
=
\beta_0+\beta_1X_1+\beta_2X_2^2+\beta_3X_3+\varepsilon.
\]
The relationship is nonlinear in \(X_2\), yet the model remains
linear in the parameters.
Decision trees, random forests, support-vector machines, and neural networks use
different function classes and can represent highly nonlinear relationships without
requiring the analyst to write a particular polynomial equation in advance.
This does not mean that such methods are “structure-free.” Their structure is embodied
in the hypothesis class, algorithmic architecture, optimization criterion, and
regularization.
8. Generalized linear models as supervised learning
Generalized linear models provide a particularly clear example of the overlap between
statistics and machine learning.
Historically and theoretically, they are statistical models. They specify a response
distribution, a linear predictor:
\[
\eta_i=x_i^\top\beta,
\]
and a link function:
\[
g(\mu_i)=\eta_i.
\]
Yet when a GLM is fitted to pairs:
\[
\{(x_i,y_i)\}_{i=1}^{n}
\]
for the purpose of predicting \(Y\) for new values of \(X\), it is also functioning as
a supervised-learning method.
Bayesian treatment is not what creates this status. A GLM may be used for supervised
learning under frequentist, Bayesian, or penalized estimation. What matters is the
learning problem and how the model is used.
The object being modeled is a conditional probability. Logistic regression is
therefore unequivocally a regression model.
At the same time, an estimated probability can legitimately be converted into a
classification rule:
\[
\widehat Y
=
I\left\{
\widehat P(Y=1\mid X)>c
\right\}.
\]
There is no contradiction
Logistic regression is a probabilistic regression model and can simultaneously be
used as a supervised classifier. “Regression” describes the statistical structure
of the model; “classification” describes one possible use of its estimated
probabilities.
8.2. The elementary criterion for supervision
In the simplest classification, a problem is supervised when training data contain
paired inputs and targets:
\[
(x_i,y_i).
\]
The \(y_i\) values provide the signal against which predictions can be assessed.
In an unsupervised problem we instead observe:
\[
x_1,\ldots,x_n
\]
without a target variable associated with each observation. Clustering is one
possibility in this setting, but by no means the only one.
· · ·
Statistical learning theory occupies precisely this common territory between statistics,
mathematics, and computation. Its purpose is not to replace one discipline with another,
but to study systematically how generalizable information can be extracted from data.
data
↓
hypothesis class
↓
learning criterion
↓
estimated model
↓
prediction, classification, or inference
The quality of learning cannot be assessed solely by asking how well a model reproduces
the data used to construct it. The decisive question is whether the learned structure
represents a sufficiently stable regularity to retain validity when confronted with
new information.
Terminological note
In this article, precision refers to the classification metric
\(TP/(TP+FP)\), also known as positive predictive value. It should not be confused
with metrological precision. Likewise, supervised learning denotes problems in which
a target variable associated with the inputs is available during training.
References
Hastie, T., Tibshirani, R., & Friedman, J. (2009).
The Elements of Statistical Learning: Data Mining, Inference, and Prediction
(2nd ed.). New York: Springer.
James, G., Witten, D., Hastie, T., & Tibshirani, R. (2013).
An Introduction to Statistical Learning with Applications in R.
New York: Springer.
McCullagh, P., & Nelder, J. A. (1989).
Generalized Linear Models (2nd ed.).
London: Chapman & Hall.
Vapnik, V. N. (1998).
Statistical Learning Theory.
New York: Wiley.
Bishop, C. M. (2006).
Pattern Recognition and Machine Learning.
New York: Springer.
Mathematical Statistics · Regression · Maximum Likelihood
Generalized Linear Models
From the classical linear model to a unified theory for Gaussian,
binary, count, and other exponential-family responses
José Mauricio Gómez Julián · 2021
The generalized linear model provides one of the clearest examples of how a scientific
theory can develop not by absolutely negating a previous structure, but by preserving
what is general within it while modifying the restrictions that limit its field of
application. The classical linear model does not disappear: it remains contained as a
particular case within a broader structure.
The central idea is remarkably economical. We retain a linear systematic component,
\[
\eta_i=x_i^\top\beta,
\]
but no longer require the response to be Gaussian or its mean to coincide directly
with the linear predictor. The mean \(\mu_i=E(Y_i\mid x_i)\) is related to
\(\eta_i\) through a link function:
\[
g(\mu_i)=\eta_i.
\]
From this relatively simple modification one obtains a common theory encompassing
Gaussian linear regression, logistic regression, Poisson count models, certain gamma
models, and other members of the exponential family.
What is generalized is not the absence of linear structure. What is generalized
is the manner in which that linear structure is related to the probability
distribution of the response.
1. Preliminary concepts
A traditional classification of measurement scales distinguishes nominal, ordinal,
interval, and ratio variables. The distinction between discrete and
continuous, however, belongs to another classificatory dimension and
should not be treated as another level of the same hierarchy.
Example
Number of children is discrete, but it also possesses a substantive zero and
meaningful ratios. It is therefore naturally described as a discrete variable on
a ratio scale.
The term covariate has also been used differently across applied traditions.
Some texts restrict it to continuous predictors. In contemporary regression and GLM
usage, it is more useful to employ the broader sense: a covariate or predictor may be
continuous, discrete, binary, or categorical when appropriately coded.
Likewise, a factor may denote a categorical explanatory variable in
experimental design, while in factor analysis it denotes an unobserved latent
construct. Context determines the intended meaning.
2. The genetic connection with linear regression
Gujarati and Porter recall that the term regression originates in Francis
Galton’s work on the heights of parents and children. The modern meaning is much
broader: regression studies how the distribution —and commonly the conditional mean—
of a response changes with one or more explanatory variables.
\[
E(Y_i\mid x_i)=\alpha+\beta x_i.
\]
In matrix notation:
\[
\mu=X\beta.
\]
The fitted line is therefore not merely a geometric object drawn through points.
Its coordinates correspond to measured quantities, while its parameters receive
statistical meaning from the model specification.
3. Regression, correlation, and causality
A crucial warning follows immediately. Gujarati and Porter, drawing on Kendall and
Stuart, stress that statistical association does not by itself establish a causal
connection. Causal knowledge requires information external to the estimated
coefficient: theory, design, temporal structure, interventions, historical knowledge,
or additional identifying assumptions.
Ritchey illustrates this problem with correlations among racial composition, poverty,
and crime in certain U.S. communities. The methodological lesson is not that one
bivariate correlation should simply be replaced by another monocausal story. Rather,
an aggregate association may reflect omitted variables, selection, institutional
history, and social mechanisms that the original coefficient cannot identify.
\[
\operatorname{Corr}(X,Y)\neq0
\quad\centernot\Longrightarrow\quad
X\longrightarrow Y.
\]
The argument advanced here is broader: no variable acquires causal status merely
because it is associated with an outcome. The mechanism must be established and
biological, economic, historical, and institutional relations must be distinguished.
This is especially important with contemporary racial categories. Mitochondrial-DNA
research by Cann, Stoneking, and Wilson provided important evidence for a recent
African origin of human maternal lineages. Later genomic evidence also established
some admixture between non-African modern human populations and archaic populations,
including Neanderthals and Denisovans. None of this turns contemporary social racial
categories into discrete biological units capable of substituting for causal analysis.
4. Regression and least squares are not synonyms
The statistical model, the fitting criterion, and
the numerical algorithm used to obtain a solution must be
distinguished.
This explains the special role of ordinary least squares, but it does not make
regression synonymous with least squares. One can instead use absolute-deviation
criteria, robust procedures, penalized estimation, and many other methods.
5. Exponential families
A standard exponential-dispersion-family representation is:
in the usual GLM notation, apart from known prior-weight factors that may be included
under particular parameterizations.
6. The three components of a GLM
6.1. Random component
\[
Y_i\mid x_i\sim\mathcal F(\mu_i,\phi).
\]
Responses are typically assumed conditionally independent within the standard GLM
framework, but they need not share the same conditional mean:
\[
\mu_i=g^{-1}(x_i^\top\beta).
\]
Historical note: independence and interchangeability
McCullagh and Nelder also make a different observation when discussing general
principles of discrepancy: observations should be independent or at least
interchangeable in a sense sufficient to justify impartial treatment. That
statement concerns comparability of contributions and should not be confused with
requiring every conditional response distribution in a regression model to have
the same mean.
The \(x_{ij}\) are covariates or predictors, not covariances. They may represent
continuous quantities, indicator variables, coded factors, transformations, and
interactions.
A canonical link means instead that the linear predictor equals the
natural parameter:
\[
\boxed{\eta_i=\theta_i}.
\]
Distribution
Variance function
Canonical link
Gaussian
\(1\)
Identity
Bernoulli / Binomial
\(\mu(1-\mu)\)
Logit
Poisson
\(\mu\)
Log
Gamma
\(\mu^2\)
Inverse, up to sign convention
A canonical link is mathematically convenient, but it is not compulsory. A binomial
model may use a probit rather than a logit link when that structure is scientifically
or empirically preferable.
8. Discrepancy, norms, and the geometry of fitting
This geometric language is useful, but its scope must be kept precise. Not every
metric is induced by a norm, and topological structure does not by itself determine a
particular metric.
Subadditivity and positive homogeneity arise naturally in the theory of norms and
sublinear functionals, but should not be substituted for the general definition of
convexity.
8.2. Statistical discrepancy is broader than metric distance
McCullagh and Nelder use discrepancy more broadly than strict metric
distance. In a Gaussian least-squares problem there is a particularly clear Euclidean
geometry. In a GLM the natural discrepancy is likelihood-based.
The deviance is therefore a log-likelihood discrepancy and need not satisfy the axioms
of a metric.
9. Maximum likelihood and IRLS
The coefficients of a GLM are normally estimated by maximum likelihood. Except in
special cases, the score equations:
\[
\frac{\partial\ell}{\partial\beta}=0
\]
do not possess a closed-form algebraic solution.
9.1. Two different uses of the name IRLS
One class of iteratively reweighted least-squares algorithms is used to minimize
\(L_p\)-type losses or construct robust estimators, with weights that may depend on
residual powers such as:
\[
w_i\propto|e_i|^{p-2}.
\]
That is the setting of the IRLS formulation discussed by Burrus. It is mathematically
legitimate, but it is not the derivation of ordinary GLM fitting.
For GLMs, IRLS arises from Fisher scoring, and for canonical links is
closely related to Newton-Raphson applied to the likelihood.
exponential family
→
log-likelihood
→
score
→
Fisher information
→
Fisher scoring
→
IRLS
Repeat until the chosen convergence criterion is satisfied.
Model
\(d\mu/d\eta\)
\(V(\mu)\)
Weight, apart from scale
Gaussian + identity
\(1\)
\(1\)
Constant
Poisson + log
\(\mu\)
\(\mu\)
\(\mu\)
Binomial + logit
\(\mu(1-\mu)\)
\(\mu(1-\mu)\)
\(\mu(1-\mu)\)
IRLS locally transforms a nonlinear maximum-likelihood problem into a sequence of
linear weighted least-squares problems.
10. Convergence: the proper role of the CLT and Banach
The Central Limit Theorem does not explain the numerical convergence of IRLS.
Reweighting does not progressively collapse the variance of the predictors or force
the observations toward one another.
The CLT belongs instead to the asymptotic inferential theory that, under regularity
conditions, contributes to the approximate normality of maximum-likelihood estimators.
Banach’s fixed-point theorem provides a powerful sufficient condition for convergence:
a contraction on an appropriate complete metric space has a unique attracting fixed
point. But writing:
\[
\beta^{(t+1)}=F(\beta^{(t)})
\]
does not itself prove that \(F\) is contractive. Thus Banach cannot be invoked as a
general guarantee that every GLM IRLS iteration must converge.
Numerical difficulties may arise from ill-conditioning, collinearity, unsuitable
starting values, logistic separation, boundary solutions, or misspecification.
11. Canonical links and sufficient statistics
With a canonical link:
\[
\theta_i=\eta_i=x_i^\top\beta.
\]
The portion of the log-likelihood coupling \(y\) and \(\beta\) becomes:
\[
\frac{1}{a(\phi)}
\beta^\top X^\top y.
\]
For fixed dispersion and under the usual regularity conditions, the dependence of the
sample on \(\beta\) therefore enters through:
\[
\boxed{X^\top y}.
\]
This explains the sufficient-statistic structure emphasized in the classical GLM
theory. In canonical log-linear models with categorical factors, the score equations
also imply equality between certain fitted and observed margins under the corresponding
model specifications.
Changing the family changes the relationship between mean and variance. Changing the
link changes the relationship between the mean and the predictor. What remains is the
linear structure of the systematic component.
· · ·
a common linear structure
+
different probability laws
+
different link functions
Gaussian linear regression, logistic regression, and Poisson regression are therefore
not unrelated techniques. They are particular manifestations of the same
mathematical-statistical construction.
The broader methodological lesson is equally important. A unified theory does not
arise by erasing the differences among its objects, but by identifying the structure
that remains valid while their particular determinations are systematically changed.
Terminological note
In the GLM fitting sections, IRLS denotes iteratively reweighted least squares as
derived from Fisher scoring. Other algorithms also bear the IRLS name —for example
those used for \(L_p\) loss and robust regression— but employ a different weighting
mechanism.
References
Cann, R. L., Stoneking, M., & Wilson, A. C. (1987).
Mitochondrial DNA and human evolution.
Nature, 325, 31–36.
Green, R. E., et al. (2010).
A draft sequence of the Neandertal genome.
Science, 328(5979), 710–722.
Gujarati, D. N., & Porter, D. C. (2010).
Basic Econometrics.
McGraw-Hill.
Kolmogorov, A. N., & Fomin, S. V. (1978).
Elements of the Theory of Functions and Functional Analysis.
Moscow: Mir.
McCullagh, P., & Nelder, J. A. (1989).
Generalized Linear Models (2nd ed.).
London: Chapman & Hall.
Nelder, J. A., & Wedderburn, R. W. M. (1972).
Generalized Linear Models.
Journal of the Royal Statistical Society, Series A, 135(3), 370–384.
Reich, D., et al. (2010).
Genetic history of an archaic hominin group from Denisova Cave in Siberia.
Nature, 468, 1053–1060.
Ritchey, F. J. (2002).
The Statistical Imagination.
McGraw-Hill.
A Theoretical Justification for the Use of Regression Methods with Psychometric Instruments
The survey case: measurement, sampling, auxiliary variables, and measurement error
José Mauricio Gómez Julián · 2021
An objection occasionally encountered in applied research consists in assuming that
regression methods are, for some reason, alien to data obtained through surveys or
psychometric instruments. Such a conclusion follows neither from sampling theory nor
from statistical theory. A proper answer, however, requires us to distinguish problems
that may initially appear identical but in fact belong to different levels of the
research process.
The fact that a variable was obtained through a survey does not by itself determine
which statistical procedure may be applied to it. What matters is the nature of the
variable, the mechanism through which it was measured, the design used to observe it,
the properties of the statistical model, and, finally, the inferential problem one is
attempting to solve.
The procedure used to collect information and the model used to analyse it are
related parts of the scientific process, but they are not the same thing.
1. A survey is not necessarily a psychometric instrument
It is useful to begin with an elementary distinction. A survey is a
procedure for obtaining information. It may contain questions about age, income,
occupation, number of children, political preferences, consumption, household
characteristics, or countless other directly observable or self-reported variables.
A psychometric instrument, by contrast, seeks systematically to
measure a characteristic that may not be directly observable: an attitude, ability,
trait, perception, or latent construct. It commonly does so through multiple items
whose responses are combined in some manner to produce a score.
although a survey may contain one or more psychometric instruments. This distinction
matters because problems of sampling, measurement, and statistical modelling are not
interchangeable.
2. Regression in Cochran’s theory of surveys
In Sampling Techniques, Cochran explicitly analyses the use of auxiliary
information in sample surveys. His starting point is that statistical theory provides
very general estimation procedures, while survey practice often benefits especially
from methods that can exploit additional information without necessarily requiring a
complete specification of the distribution of every attribute under observation.
It is in this context that ratio estimators and regression
estimators appear. Suppose that we wish to estimate the population mean of a
variable \(Y\) and that an auxiliary variable \(X\), correlated with \(Y\), is
available with known population mean \(\bar X\). A classical form of the regression
estimator is:
The logic is straightforward. If the auxiliary variable in the sample departs from its
known population value, that difference contains information that can be used to adjust
the estimate of \(Y\). When the relation between the two variables is sufficiently
stable, auxiliary information can increase precision.
What Cochran establishes
Classical sampling theory does not regard regression as incompatible with survey
data. On the contrary, it explicitly incorporates estimators based on regression
relations in order to exploit auxiliary information and improve estimation of
population parameters.
3. Two different uses of regression
It does not follow, however, that every regression model fitted to questionnaire
variables is automatically justified by Cochran’s regression estimator. Two different
problems must be distinguished:
Problem
Primary purpose
Example
Regression estimation in sampling
Use auxiliary information to improve estimation of a population mean,
total, or another population parameter.
\(\bar y_{\mathrm{reg}}=\bar y+b(\bar X-\bar x)\)
Regression model fitted to survey data
Study associations, make predictions, or represent a conditional
relationship between variables.
\(E(Y\mid X)=\beta_0+\beta_1X\)
Both problems belong to the same statistical tradition and exploit relations among
variables, but they do not have exactly the same inferential objective. Cochran’s
regression estimator therefore demonstrates clearly that the origin of data in a
survey is not an objection to using regression relations; it does not, however,
replace the specific justification required for whatever statistical model is
subsequently fitted.
4. The specifically psychometric problem
When a variable comes from a psychometric instrument, an additional issue arises:
measurement. An observed score should not automatically be identified
with the theoretical attribute that the instrument is intended to measure.
In the elementary formulation of classical test theory:
\[
X=T+E,
\]
where \(X\) is the observed score, \(T\) the true score in the sense of the model,
and \(E\) the measurement-error component.
This has consequences when a psychometric score is used in a regression. Suppose, in
the simplest case, that the relationship of interest is:
\[
Y=\alpha+\beta T+\varepsilon,
\]
but that we do not observe \(T\); instead, we observe an imperfect measurement
\(X=T+E\). Under the simplest classical model with independent measurement error,
using \(X\) as a predictor tends to reduce the estimated slope in absolute value.
In this elementary case, attenuation can be expressed approximately as:
corresponds, under this classical formulation, to a notion of reliability. The greater
the proportion of variance attributable to measurement error, the lower the reliability
and the greater the possible distortion produced by treating the observed score as if
it had been measured without error.
With several correlated predictors, the situation may become considerably more
complex: measurement error need not result merely in uniform attenuation of all
coefficients. For this reason, the psychometric quality of an instrument is not
separate from the statistical analysis that follows it.
The fact that a score can mathematically be entered into a regression does not
mean that its measurement error has ceased to exist.
5. When regression can be used
There is therefore no general prohibition against applying regression methods to data
obtained through psychometric instruments. The correct question is different:
which model corresponds to the properties of the variables and to the purpose
of the investigation?
If a composite score can reasonably be treated as a quantitative variable and the
objective is to represent a conditional mean, linear regression may be appropriate,
provided the relevant assumptions are defensible. But the form of the model must change
when the structure of the response variable changes.
Response variable
Possible model
Approximately continuous quantitative variable
Linear regression or another appropriate continuous-response model
Binary
Logistic or probit regression
Ordinal
Ordinal models, such as ordinal logit or probit
Count
Poisson, negative binomial, or another count model
Latent construct modelled directly
Latent-variable models, SEM, IRT, or other suitable approaches
It is therefore not the label “psychometric” that decides whether regression can be
used. The decision depends on how the variable was constructed, its measurement scale,
its measurement error, the form of the response, and the scientific relationship one
is attempting to represent.
6. Survey design also matters
One further distinction should not be overlooked. A regression may be correctly
specified with respect to its variables and yet produce inadequate inference if the
procedure by which observations entered the sample is ignored.
Data from complex sample designs may involve:
unequal probabilities of selection;
stratification;
cluster sampling;
sampling weights;
and dependence among observations induced by the design itself.
Under such circumstances, estimation procedures and standard errors may need to account
explicitly for the sampling design. The legitimate use of regression on survey data
does not imply that the survey design itself can be ignored.
Three levels that must remain distinct
Sampling: how did the units enter the sample?
Measurement: how was the attribute under study transformed into
an observable variable?
Modelling: what probabilistic or functional relationship is
assumed among the variables?
7. A methodological conclusion
A justification for the use of regression methods with survey data does not require
claiming that a survey is by nature a psychometric instrument. Nor does it require
deducing from regression estimators in sampling theory that every subsequent regression
analysis is automatically valid.
The conclusion is more precise. Classical survey theory demonstrates that regression
relations can legitimately play a central role even within the sampling-estimation
process itself. Psychometrics, in turn, shows that scores obtained through measurement
instruments can be analysed statistically, but that reliability and measurement error
must form part of the interpretation of the resulting model.
· · ·
There is therefore no essential incompatibility between surveys, psychometrics, and
regression. What exists is a chain of distinct scientific problems, each of which must
be solved at its corresponding level:
Each link imposes conditions upon the next. A poorly designed sample is not repaired by
using a reliable scale; deficient measurement does not disappear because a regression
model has been correctly estimated; and a correctly measured variable does not make
correct a model whose mathematical form fails to correspond to the phenomenon.
The origin of a variable in a survey does not by itself determine which statistical
method may be applied to it. What matters is the structure of the variable, the
process through which it was measured, the sampling design, and the inferential
problem one intends to solve.
This is ultimately the general criterion. Statistical methods are not legitimized by
the name of the instrument from which the data originate, but by the correspondence
between their mathematical properties, the properties of measurement, and the real
characteristics of the object under investigation.
Terminological note
In this article, “regression with psychometric instruments” means regression involving
variables or scores obtained through such instruments. The object entering the
regression is the observed or latent variable defined by the model, not the
questionnaire as a material object.
References
Cochran, W. G. (1991).
Técnicas de muestreo.
Mexico: Compañía Editorial Continental.
Fuller, W. A. (1987).
Measurement Error Models.
New York: John Wiley & Sons.
Lord, F. M., & Novick, M. R. (1968).
Statistical Theories of Mental Test Scores.
Reading, Massachusetts: Addison-Wesley.
DeVellis, R. F. (2017).
Scale Development: Theory and Applications (4th ed.).
Los Angeles: Sage.
Lumley, T. (2010).
Complex Surveys: A Guide to Analysis Using R.
Hoboken, New Jersey: John Wiley & Sons.
Topology · Graph Theory · Complex Systems · Collective Biology
Topological and Metric Distances
Structure, interaction, and stability in collective animal behaviour
José Mauricio Gómez Julián · 2021
In mathematics and the natural sciences, a distinction repeatedly appears which,
although taking different forms in different fields, is of enormous importance: the
difference between properties that depend on a particular metric realization and those
that depend primarily on the structure of relations among the components of a system.
This distinction does not authorize us to identify different mathematical concepts with
one another, but it does allow us to investigate a common problem: what changes when a
system is deformed, and what relations remain relevant to its behaviour?
Graph theory provides a first intuitive way into the problem. Collective bird behaviour
then offers an especially interesting empirical application. In the latter case, an
apparently simple question —does a bird interact with those situated within a certain
number of metres, or with a certain number of neighbours?— leads to two radically
different structures of interaction.
The decisive question is not whether a property can be measured in metres or
represented by a graph, but which objective relation actually organizes the
behaviour of the system under study.
1. Graphs, structure, and geometric representation
In graph theory, a graph is a pair:
\[
G=(V,E),
\]
where \(V\) is a set of vertices and \(E\) is a set of edges relating pairs of
vertices. A graph may be drawn on a plane, but the drawing must not be confused with
the mathematical object itself. The exact positions of the points, the angles, and the
lengths of the lines used to represent it may change without changing the structure of
the graph.
Figure 1
An elementary graph. The particular geometry of the drawing does not by itself
constitute the combinatorial structure. Image source: Wikimedia.
Now consider two graphs \(G_1\) and \(G_2\). A graph isomorphism is a bijection:
If such a function exists, the graphs possess the same combinatorial structure even
when their geometric representations look quite different.
Figure 2
The same pattern of connections may admit different geometric representations.
Image source: Jose (2020).
Preservation of edges also implies preservation of graph distance,
understood as the minimum number of edges that must be traversed to connect two
vertices:
\[
d_G(u,v)
=
\min\{\text{number of edges in a path joining }u\text{ and }v\}.
\]
This does not mean that a graph isomorphism preserves the Euclidean distances of a
particular drawing. Two vertices may be two centimetres apart in one representation and
twenty centimetres apart in another without changing the graph. What remains is the
structure of adjacency and, as a consequence, the combinatorial distance.
Figure 3
Example of a correspondence between isomorphic graphs. Image source: Wikipedia.
2. Three different meanings of “topological”
Before turning to collective behaviour, an important qualification is required. The
word topological appears in different mathematical and scientific contexts,
but the use of the same word does not make those concepts equivalent.
Concept
What it preserves or measures
What it must not be confused with
Graph isomorphism
The adjacency structure among vertices.
An isometry of a geometric drawing.
Homeomorphism in general topology
Topological structure: open sets, continuity, and properties invariant under continuous deformation.
Preservation of lengths or distances.
Topological distance or range in flocks
Neighbour rank: first neighbour, second neighbour, third neighbour, and so on.
Graph distance or a metric belonging to general topology.
A homeomorphism, for example, need not preserve distances. A transformation that
preserves a metric exactly is an isometry, which is a stronger condition.
Likewise, the “topological distance” used in flocking studies is neither graph distance
nor a topological metric: operationally, it is the ordinal rank of a
neighbour.
Conceptual precision
If bird \(j\) is the third closest individual to bird \(i\), its topological rank
relative to \(i\) is \(n=3\), whether it happens to be one, three, or five metres
away. This is the relevant meaning of “topological” in the experiment considered
below.
There is nevertheless a legitimate structural analogy between these fields. Each
requires us to distinguish a particular metric realization from relations that can
remain identifiable while that realization changes. The analogy can be philosophically
fruitful provided it is not converted into mathematical identity.
3. The problem of animal flocks
Models of collective behaviour seek to explain how local interactions among individuals
can generate macroscopic properties: coordinated motion, cohesion, group formation, and
collective responses to perturbations.
A natural way of constructing such models is to suppose that interaction depends on
metric distance. If \(r_{ij}\) is the physical distance between two birds, we may
imagine an interaction intensity:
\[
I_{ij}=F(r_{ij}),
\]
where, in general terms, influence decreases as \(r_{ij}\) increases, or vanishes once
a certain radius \(r_c\) is exceeded.
Under such a model, a bird might interact with all individuals located within five
metres. The consequence is immediate: the number of relevant neighbours depends on
flock density. For the same metric radius, a dense flock contains more neighbours than
a sparse one.
The alternative hypothesis makes interaction depend on neighbour rank.
If \(n_{ij}\) represents the rank of bird \(j\) among the neighbours of bird \(i\),
we may write schematically:
\[
I_{ij}=G(n_{ij}).
\]
In its simplest form, each individual interacts primarily with its first \(n_c\)
neighbours, regardless of the number of metres separating them.
In the metric paradigm, a spatial radius remains fixed while the number of
individuals may vary. In the topological paradigm, the number of relevant neighbours
remains approximately fixed while the spatial radius containing them may vary.
4. The empirical evidence from STARFLAG
For a long time, the choice between these two structures was made mainly through
modelling assumptions. The situation changed when the STARFLAG project succeeded in
reconstructing the three-dimensional positions of individual birds within large
starling flocks.
This spatial reconstruction made it possible to study not only the distances between
individuals but also the angular distribution of each neighbour relative to a focal bird
and to the direction of motion of the flock.
The first striking result was marked anisotropy: the nearest neighbour
was not equally likely to appear in every direction. In particular, there was a relative
scarcity of neighbours lying exactly along the direction of travel.
Figure 4
Angular distribution of the nearest neighbour around a focal bird. The structure
is not isotropic. Source: Instituto dei Sistemi Complessi / STARFLAG.
The distribution of the tenth nearest neighbour, by contrast, was much closer to an
isotropic distribution. This suggested that the structure created by interaction
weakened as neighbour rank increased.
Figure 5
For sufficiently high neighbour ranks, the angular distribution approaches the
isotropic case. Source: Instituto dei Sistemi Complessi / STARFLAG.
5. Anisotropy and interaction range
Ballerini et al. (2008) quantified this structure by means of an anisotropy factor
\(\gamma(n)\). It is important to define it correctly, because this is not the
parameter \(\gamma\) used with entirely different meanings in geophysics, mechanics,
or wave theory. The use of the same Greek letter does not imply identity between the
quantities.
Let \(\vec u_i^{(n)}\) be the unit vector pointing from bird \(i\) toward its
\(n\)-th nearest neighbour. Construct the matrix:
The unit eigenvector \(\vec W^{(n)}\) associated with the smallest eigenvalue of
\(M^{(n)}\) identifies the direction of minimum density of the vectors pointing to the
\(n\)-th neighbour. If \(\vec V\) represents the direction of collective motion, define:
\[
\gamma(n)
=
\left(
\vec W^{(n)}\cdot\vec V
\right)^2.
\]
For an isotropic spatial distribution, the expected value is:
\[
\gamma_{\mathrm{iso}}=\frac{1}{3}.
\]
Systematic values above \(1/3\) indicate anisotropic structure relative to the direction
of motion. In the starling data, \(\gamma(n)\) falls as neighbour rank increases until
it reaches approximately the isotropic value.
The point at which the structure becomes indistinguishable from the isotropic state
allows an interaction range \(n_c\) to be defined. The central empirical result was:
\[
n_c\approx6\text{–}7.
\]
In other words, each starling appeared to respond, on average, to a relatively stable
number of neighbours —approximately six or seven— rather than to every individual
contained within a fixed distance measured in metres.
6. The decisive test: changing density
A single value of \(n_c\) is not by itself sufficient to distinguish the hypotheses,
because a particular number of neighbours could also arise accidentally from a metric
radius in a flock of a particular density. The difference becomes identifiable when
flocks of different densities are compared.
Let \(r_1\) denote the average distance to the nearest neighbour, serving as a measure
of flock sparseness, and let \(r_c\) be the physical distance corresponding to the
neighbour at the topological limit \(n_c\).
If interaction were fundamentally metric, we would expect \(r_c\) to
remain approximately constant as density changed. The number of neighbours contained
inside that radius would therefore have to vary.
If interaction were fundamentally topological, we would expect
\(n_c\) to remain approximately constant, while \(r_c\) would become larger in sparse
flocks and smaller in dense flocks.
Figure 6
A metric rule preserves a spatial radius; a topological rule preserves neighbour
rank. Changing density makes the two hypotheses empirically distinguishable.
Source: Instituto dei Sistemi Complessi.
The results of Ballerini et al. clearly favoured the second hypothesis. Topological
range remained approximately stable across flocks of different densities, while the
corresponding metric range changed with flock sparseness.
The essential difference
Two birds separated by five metres in a sparse flock may occupy the same neighbour
rank as two birds separated by one metre in a dense flock. If interaction depends
on topological rank, these two relationships can be dynamically equivalent despite
the large metric difference.
7. Cohesion and robustness under perturbation
The distinction is not merely descriptive. It has dynamical consequences. Suppose a
flock governed by a metric radius expands abruptly in response to a predator. If
inter-individual distances exceed the interaction radius, some links may disappear
precisely when the system is undergoing an intense perturbation.
A rule based on a number of neighbours is less sensitive to this kind of expansion:
although physical separation increases, each bird can continue responding to roughly
the same number of individuals. Simulations accompanying the STARFLAG results showed
substantially greater cohesion under topological interactions than under a standard
metric rule.
This gives a concrete dynamical meaning to structural stability. What remains is not a
particular geometric distance, but a relation of neighbourhood capable of surviving
substantial changes in density and shape.
A flock may contract, expand, deform, or divide without preserving the same metric
distances; what matters for its cohesion may instead be the persistence of certain
relations among individuals.
8. Interaction rules can change
The preceding result should not, however, be converted into a new universal claim that
all collective animal behaviour is “topological.” Later research offers an even more
interesting lesson.
Ling et al. (2019), studying wild jackdaws through three-dimensional trajectory
reconstruction, found that the same species could use different interaction rules
depending on ecological context.
Context
Observed dominant rule
Approximate scale
Transit flight toward the roost
Topological interaction
Approximately 7–8 neighbours
Collective anti-predator mobbing
Metric interaction
Approximately 5 metres
This profoundly changes the interpretation. An interaction rule need not be an eternal
property of a species. It may instead be a property of the
concrete dynamical regime in which the individuals find themselves.
During coordinated transit, maintaining relations with a relatively stable number of
neighbours may favour collective order across different densities. In a localized
anti-predator situation, a metric rule may permit a different organization of
responses. The effective structure of interaction changes with the material conditions
of behaviour.
Far from weakening the importance of the topological result, this plasticity prevents
an empirical regularity from becoming a dogma. It obliges us to investigate which
relation is objectively dominant in each process.
9. A structural interpretation
We may now return to the starting point. In graph theory, geometrically very different
representations may possess the same adjacency structure. In the starling flocks studied
by STARFLAG, different densities and metric distances could preserve approximately the
same interaction range. These results belong to different fields and must not be
mathematically conflated. But both allow us to pose the same philosophical question:
which properties of a system are contingent upon a particular realization, and which
actually organize its behaviour?
It would not be correct to define a “topological distance” in general as a distance
that remains invariant under perturbations. Mathematical topology is not defined in
this manner, and homeomorphisms do not necessarily preserve distances. Nor would it be
correct to identify STARFLAG’s ordinal neighbour rank with graph distance.
We can, however, make a more precise and, in my view, more important statement: a
relational property may prove more stable and explanatorily deeper than a particular
metric magnitude. When a system changes density while preserving a neighbourhood rule,
that regularity constitutes objective information about its organization.
· · ·
From a materialist standpoint, what is essential cannot be determined by terminological
decree. We cannot assume in advance that “the topological” is always the essence and
“the metric” merely an appearance. The evidence from jackdaws itself shows that a metric
rule may become the dynamically relevant relation under particular conditions.
Essence, if we wish to employ that category, must be sought in the ensemble of
relations that generate, reproduce, and transform the behaviour of the system under
concrete conditions. The same material form may pass through different regimes and,
with them, change the effective structure of its interactions.
What is most intimate and characteristic of a phenomenon is not whatever a
particular branch of mathematics happens to call “topological,” but whatever
investigation demonstrates to organize objectively its movement, stability,
and transformations.
The case of bird flocks is especially instructive because this determination can be
subjected to empirical test. The question “metres or neighbours?” is not settled by
philosophical preference. It is settled by reconstructing positions, comparing
densities, measuring anisotropies, and observing which variable retains explanatory
power.
Here lies the methodological importance of the example. Mathematics offers different
ways of representing an object; science must determine which of them corresponds,
within the relevant limits, to the real relations that produce the phenomenon.
Terminological note
In this article, “topological range” in collective behaviour denotes neighbour order
—first, second, third neighbour, and so forth— following the usage of Ballerini et al.
It does not denote graph distance or a metric of general topology. Likewise,
\(\gamma(n)\) is the anisotropy measure specifically defined for the spatial
distribution of neighbours within the flock.
References
Ballerini, M., Cabibbo, N., Candelier, R., Cavagna, A., Cisbani, E.,
Giardina, I., Lecomte, V., Orlandi, A., Parisi, G., Procaccini, A.,
Viale, M., & Zdravkovic, V. (2008).
Interaction ruling animal collective behavior depends on topological rather
than metric distance: Evidence from a field study.
Proceedings of the National Academy of Sciences, 105(4), 1232–1237.
https://doi.org/10.1073/pnas.0711437105
Cavagna, A., Giardina, I., Orlandi, A., Parisi, G., Procaccini, A.,
Viale, M., & Zdravkovic, V. (2008).
The STARFLAG handbook on collective animal behaviour: 1. Empirical methods.
Animal Behaviour, 76(1), 217–236.
Ling, H., Mclvor, G. E., Westley, J., van der Vaart, K.,
Vaughan, R. T., Thornton, A., & Ouellette, N. T. (2019).
Behavioural plasticity and the transition to order in jackdaw flocks.
Nature Communications, 10, 5174.
https://doi.org/10.1038/s41467-019-13281-4
Wilson, A. (2010).
Limited interactions in flocks: relating model simulations to empirical data.
Related modelling literature on STARFLAG anisotropy and interaction range.
Mathematical Statistics · Generalized Linear Models
Logit Model or Logistic Regression
On statistical specification, the logit transformation, and the relation
between probabilities, odds, and linear predictors
José Mauricio Gómez Julián · 2021
As Aldrich and Nelson (1984) point out, every statistical inference
presupposes some specification of the phenomenon one intends to study.
It is therefore not enough to possess a mathematically elegant model, nor
to have a computational procedure capable of estimating it. A prior
problem remains: determining whether the mathematical properties of the
model bear a scientifically defensible correspondence to the properties
of the real object under investigation.
This question precedes estimation. Statistical-mathematical theory can tell
us what properties an estimator possesses under certain conditions; it
cannot, by itself, guarantee that those conditions adequately describe the
material, economic, social, or natural process from which the data arise.
When specification fails, the inferential properties upon which our
conclusions rest may fail as well.
The logit model provides a useful illustration of this general problem. Its
usefulness does not simply follow from its popularity, nor from the ease
with which statistical software can estimate it. Rather, it derives from
the specific relation it establishes between a dichotomous response
variable, a conditional probability, and a mathematical function capable
of transforming that probability into a quantity representable by means of
a linear predictor.
Simplicity is a reasonable starting hypothesis when no knowledge requires
us to do otherwise. But where theory or evidence indicates a different
structure, simplicity ceases to justify imposing it.
1. The problem with the linear probability model
Suppose that \(Y_i\) is a dichotomous variable that can take only the
values zero and one. We may define:
\[
P_i \equiv P(Y_i=1\mid X_i).
\]
The conditional expectation of a Bernoulli variable coincides precisely
with its probability of success:
\[
E(Y_i\mid X_i)=P_i.
\]
One first possibility is to represent that probability through a linear
function of the explanatory variables:
The mathematical problem appears immediately. A probability must satisfy:
\[
0\leq P_i\leq1,
\]
whereas a linear predictor such as
\(\beta_0+\beta_1X_{i1}+\cdots+\beta_kX_{ik}\) does not, in general,
possess such bounds. It may produce numbers below zero or above one.
A linear probability model can be useful in certain contexts as an
approximation and has some interpretive advantages, but this incompatibility
between the range of the linear predictor and the range of a probability
constitutes a fundamental reason to seek another specification.
We do not need to abandon the linear predictor. What we can do is transform
the probability.
2. From probability to odds and the logit
If \(0<P_i<1\), we can construct the ratio:
\[
\frac{P_i}{1-P_i}.
\]
This quantity is commonly called the odds. It compares the
probability that the event occurs with the probability that it does not.
For example, if \(P_i=0.75\):
\[
\frac{0.75}{1-0.75}=3.
\]
The odds are therefore 3 to 1 in favor of the event. This transformation
removes the upper bound of the probability, but it does not remove all
restrictions:
\[
\frac{P_i}{1-P_i}\in(0,\infty).
\]
Odds remain necessarily positive. To obtain a quantity capable of spanning
the entire real line, we apply the natural logarithm:
The probability \(P_i\) lies in the interval \((0,1)\); the odds
\(P_i/(1-P_i)\) lie in \((0,\infty)\); and the log-odds, or logit,
range across the entire real line \((-\infty,\infty)\). These are three
different scales and should not be confused.
3. The logistic function
Once the preceding relation has been established, we can solve for
\(P_i\). We begin from:
We have arrived at the standard logistic function. The transformation
solves precisely the problem of interest: \(Z_i\) may take any real value,
while the output of the function always lies between zero and one.
01
If \(Z_i\rightarrow-\infty\), then \(P_i\rightarrow0\).
02
If \(Z_i=0\), then \(P_i=0.5\).
03
If \(Z_i\rightarrow+\infty\), then \(P_i\rightarrow1\).
The function is continuous, smooth, and monotonically increasing. Its
shape is the familiar sigmoid, or S-shaped curve. The standard logistic
function also possesses rotational symmetry around the point \((0,1/2)\).
A more general expression of the logistic function is:
\[
f(x)
=
\frac{L}{1+e^{-k(x-x_0)}},
\]
where \(L\) determines the upper limit, \(k\) regulates the rate of
growth, and \(x_0\) determines the position of the midpoint. The standard
logistic function commonly used to transform a linear predictor into a
probability corresponds to:
\[
L=1,\qquad k=1,\qquad x_0=0.
\]
It is also important to distinguish the logistic function
used here as the inverse of the link function from the
logistic distribution. The two objects are related, but
they are not synonymous.
4. Why a logistic function?
Finding a mathematically convenient function does not, by itself, settle
the problem of specification. As Aldrich and Nelson (1984) observe, many
functions can transform an unrestricted predictor into a probability. The
logistic function is not the only possibility.
Among the best-known alternatives is the probit model,
which uses the standard normal cumulative distribution function as the
inverse link. Another possibility is the complementary log-log
link. Each choice imposes a different mathematical structure on the
relationship between the predictor and the probability.
Model
Link function
Main feature
Logit
\(\log[p/(1-p)]\)
Natural interpretation through odds and odds ratios.
Probit
\(\Phi^{-1}(p)\)
Uses the cumulative normal distribution.
Complementary log-log
\(\log[-\log(1-p)]\)
Introduces an asymmetric probability response.
Logit and probit often produce very similar empirical results in a wide
range of applications, particularly in the central regions of their
respective curves. This does not mean that they are mathematically
identical, nor that the choice between them can always be treated as
irrelevant. The proper criterion remains substantive and statistical:
what structure is justifiable for the phenomenon, what inferential
properties are needed, and what aspects of the response one wishes to
represent.
The availability of a statistical model does not constitute evidence that
the model corresponds to the object. Choosing a link function is itself
a hypothesis about the mathematical form of the relationship under study.
5. The statistical model
Up to this point we have examined mainly the geometry of the transformation.
But logistic regression is not merely the drawing of an S-shaped curve. It
is a probabilistic model.
When each observation represents an individual dichotomous outcome, the
natural formulation is:
This distinction matters. It is not precise simply to say that “the data
set follows a binomial distribution.” The probability distribution is
specified for the response variable conditional on the covariates and
depends on the observational structure of the data.
In the language of generalized linear models, logistic regression combines
three elements:
I
Random component: a Bernoulli or binomial response.
II
Systematic component: the linear predictor
\(X_i\beta\).
III
Link function:
\(g(P_i)=\log[P_i/(1-P_i)]\).
The logistic function
\(g^{-1}(Z)=1/(1+e^{-Z})\) is therefore the inverse of this link.
6. Estimation by maximum likelihood
The coefficients of a logistic regression are not usually obtained by
minimizing the sum of squared residuals as in ordinary linear regression.
They are estimated by maximum likelihood.
For conditionally independent Bernoulli observations, the contribution of
each observation to the likelihood can be written as:
The procedure searches for the parameter values \(\beta\) that make the
actually observed outcomes most likely under the specified model. In
practice, one normally maximizes the logarithm of the likelihood:
In general there is no closed-form expression analogous to the ordinary
least squares formula for obtaining the coefficients. The solution is
found through iterative numerical procedures.
7. How to interpret the coefficients
This is one of the points that most often generates confusion when moving
from linear to logistic regression. If:
then \(\beta_j\) does not directly represent the change in probability
produced by a one-unit increase in \(X_j\). It represents the change in the
log-odds, holding the other variables in the predictor
constant.
Exponentiating the coefficient gives a more intuitive interpretation:
\[
e^{\beta_j}.
\]
This is the factor by which the odds are multiplied when \(X_j\) increases
by one unit, ceteris paribus.
Example
If \(\beta_j=0.5\), then:
\[
e^{0.5}\approx1.65.
\]
A one-unit increase in \(X_j\) multiplies the odds by approximately 1.65,
that is, increases them by approximately 65%, holding the other variables
constant. This does not mean that the probability rises
by 0.5 or by 50 percentage points.
The effect on probability is not constant
The reason is that the relationship between \(Z_i=X_i\beta\) and \(P_i\)
is nonlinear. For a continuous variable \(X_j\), under the simple additive
specification, the marginal effect is:
Thus, the same coefficient \(\beta_j\) may correspond to different changes
in probability depending on the point of the curve at which each
observation lies. The response is more sensitive in the central region of
the logistic function and less sensitive near its extremes.
This is not an accidental difficulty of the model. It is a direct
consequence of the mathematical structure we have chosen to use.
8. Evaluation and diagnostics
Estimating a set of coefficients does not settle the problem. We must ask
whether the model adequately describes the information we seek to explain
and, above all, whether the inferences we wish to draw from it are
defensible.
Likelihood-ratio test
A classical comparison contrasts a model containing explanatory variables
with a model containing only the intercept. The likelihood-ratio statistic
can be written as:
\[
LR
=
2\left[
\ell(\widehat{\beta}_{\text{model}})
–
\ell(\widehat{\beta}_{\text{restricted}})
\right],
\]
and, under regularity conditions, it approximately follows a chi-squared
distribution with degrees of freedom corresponding to the number of
restrictions being tested.
This test can indicate whether the set of predictors improves fit relative
to a more restricted model. It should not, however, be confused with a
complete evaluation of the model’s scientific usefulness.
Statistical significance is not enough
Depending on the purpose of the investigation, one should also examine
aspects such as:
the calibration of estimated probabilities;
the ability to discriminate between outcomes;
deviance and residuals appropriate to generalized linear models;
the stability of the coefficients;
the presence of influential observations;
out-of-sample performance when the objective is predictive;
and, above all, the adequacy of the functional form and assumptions to the scientific problem.
9. Specification returns to the center
We thus return to the problem with which we began. Logistic regression
elegantly solves a mathematical difficulty: it allows an unrestricted
predictor to be related to a probability necessarily bounded between zero
and one. But this mathematical virtue does not make the logit an automatic
choice for every dichotomous phenomenon.
Its use presupposes a particular structure. Among other things, one should
examine whether the linear predictor is an adequate representation of the
log-odds, whether dependence among observations has been modeled correctly,
whether relevant interactions or nonlinearities are present, and whether
complete or quasi-complete separation occurs, a circumstance capable of
producing problematic or non-finite maximum-likelihood estimates.
Some questions prior to inference
Is there a scientific justification for the variables included and for
the way in which they enter the predictor?
Does the approximately linear relationship assumed actually hold for
the log-odds, or are transformations, nonlinear terms, or interactions
required?
Is the dependence structure among observations represented adequately?
Is there enough information in the data to identify the parameters?
Is the purpose explanatory, predictive, descriptive, or causal?
The last question deserves particular attention. An association obtained
through logistic regression does not become causal merely because it has
been expressed through coefficients, probabilities, or odds ratios.
Causality requires assumptions and a design capable of justifying such an
interpretation.
Likewise, a model may be a useful approximation without being a literally
exact description of the data-generating process. The scientific problem is
then to determine which properties of that approximation are sufficiently
robust for the specific inferential purpose.
· · ·
The broader lesson therefore extends beyond logistic regression. A
statistical model is a mathematical instrument containing a specific
structure: a space of possible outcomes, a probability distribution, a
functional form, parameters, and assumptions concerning the relationships
among magnitudes. To apply it is to affirm—explicitly or implicitly—that
these properties bear some relevant correspondence to the phenomenon under
study.
From this standpoint, the problem of specification has a genuinely
epistemological content. Mathematics is not a decoration subsequently
placed upon the data. Nor do the data, by themselves, determine which model
must be used. Between the real object and the mathematical expression there
is a theoretical mediation that must be examined, criticized, and tested.
The logit constitutes a particularly elegant solution because it transforms
a restricted probability into an unrestricted quantity and subsequently
allows a valid probability to be recovered through the logistic function:
But the elegance of the transformation does not replace the investigation
of the object. Precisely because the model possesses determinate
mathematical properties, we must ask when those properties are pertinent.
There lies the point of contact between statistics, mathematics, and
scientific knowledge.
Terminological note
In this text, logit denotes the link function
\(\log[p/(1-p)]\), while logistic function denotes its inverse
\(1/(1+e^{-z})\). In applications with individual binary responses, a
Bernoulli distribution conditional on the covariates is used; with grouped
counts of successes, a binomial distribution may be used.
References
Aldrich, J. H., & Nelson, F. D. (1984).
Linear Probability, Logit, and Probit Models.
Beverly Hills: Sage University Papers Series,
Quantitative Applications in the Social Sciences.
Liao, T. F. (1994).
Interpreting Probability Models: Logit, Probit, and Other
Generalized Linear Models.
Sage University Papers Series, Quantitative Applications in the Social
Sciences.
McCullagh, P., & Nelder, J. A. (1989).
Generalized Linear Models (2nd ed.).
London: Chapman & Hall.
Mathematics · R Programming · Discrete Dynamical Systems
The Collatz Conjecture as a Custom Function in R
An introduction to functions, iteration, and recursion through an extraordinarily simple mathematical rule whose global behavior continues to resist a general proof.
José Mauricio Gómez Julián · 2021
A particularly pleasant example of a custom function is one built to study the celebrated Collatz conjecture computationally. The choice is useful because the mathematical rule is very simple, whereas its global behavior is not: one need only distinguish between even and odd numbers and repeatedly apply the same transformation. This combination allows us to concentrate on programming logic without losing sight of the mathematical object being programmed.
In elementary terms, the conjecture states that if we begin with any positive integer and divide it by two when it is even, or multiply it by three and add one when it is odd, the resulting sequence will eventually reach one. It is important to formulate this carefully: a program can verify that this happens for a particular starting value—or for a finite collection of values—but such computational verification does not, by itself, constitute a proof that it happens for every positive integer. That is precisely where the mathematical problem lies.
1. The Collatz rule and what it means to verify it
Mathematically, the rule generating successive images can be expressed by the following piecewise-defined function:
T(n) =
n/2
if n is even,
3n + 1
if n is odd.
Condition
Operation
New image
n is even
Divide by 2
T(n) = n/2
n is odd
Multiply by 3 and add 1
T(n) = 3n + 1
Table 1. The local Collatz rule. Each step is completely determined by the parity of the present state.
If we begin from an origin or seed value n0, successive applications of the function construct an orbit:
n0, n1 = T(n0), n2 = T(n1), … , nk = Tk(n0).
This notation lets us introduce from the outset a distinction that will later matter in R. If the orbit reaches one for the first time after k applications of the rule, then k iterations or transitions have occurred, whereas the complete list of states contains k + 1 values, because the starting value is counted as well.
A useful distinction
The total stopping time may be defined as the number of applications of T required to reach 1. If it is denoted by τ(n), the conjecture can be written compactly as: τ(n) < ∞ for every positive integer n.
Consequently, what we shall program below is not a “proof” of the conjecture in the mathematical sense of a universal demonstration. It will instead be a mechanism capable of generating and examining particular orbits, recording their states, and counting how many transformations were required to reach 1 whenever that value is indeed reached.
· · ·
2. A first custom function in R
To construct the preceding rule in R, it is useful to recall that a custom function can take an input, subject it to a set of instructions, and return an output. At this first stage there will be no iteration yet: a single number will be evaluated and its next Collatz image produced.
The fundamental condition is parity. In R, the operator %% returns the remainder of a division. If n %% 2 == 0, the number is divisible by two and is therefore even. If the remainder is nonzero, it is odd.
R · one-step ruleCollatzFunction <- function(n) {
if (length(n) != 1L || !is.finite(n) || n < 1 || n != floor(n)) {
stop("n must be a positive integer.")
}
if (n %% 2 == 0) {
j <- n / 2
} else {
j <- 3 * n + 1
}
return(j)
}
The function receives a positive integer n, determines whether it is even or odd, and stores the result in j. The instruction return(j) does not, strictly speaking, mean “print j on the screen”; it means that j will be the value returned by the function. When the function is run directly in R’s interactive console, that returned value is usually displayed automatically, which explains why the two ideas can easily be confused when one is beginning to program.
Return and print are not the same
return(x) terminates the function and supplies x as its result. print(x), by contrast, explicitly requests that x be printed. A function can return a value without containing any print() instruction.
Notice also that there is no need to prevent this function from being evaluated at 1: under the standard rule, 1 is odd and its next image would be 4. What the algorithm constructed below will do is stop the orbit upon reaching 1; that is, it will not apply the rule again once the target has been reached.
3. From a single step to an iterative algorithm
The preceding function performs only one transformation. To obtain a complete orbit, it must be repeated while the current value differs from 1. Here we encounter the “while” loop—while-loop—whose logic is exactly what its name suggests: execute a given block of instructions for as long as a condition remains true.
This second function is therefore iterative. It is not recursive yet, because it does not call itself; rather, it explicitly repeats a block of code by means of while().
R · iterative algorithmIterativeCollatzAlgorithm <- function(m, max_iter = 1000000L) {
if (length(m) != 1L || !is.finite(m) || m < 1 || m != floor(m)) {
stop("m must be a positive integer.")
}
trajectory <- m
iterations <- 0L
while (m != 1) {
if (iterations >= max_iter) {
stop("max_iter was reached before 1.")
}
m <- CollatzFunction(m)
trajectory <- c(trajectory, m)
iterations <- iterations + 1L
}
return(trajectory)
}
The logic is simple. The vector trajectory is created inside the function itself and initially contains the seed value. Then, each time the loop runs, m is replaced by its next image and that new value is appended to the end of the vector. When m reaches 1, the condition m != 1 ceases to hold and the loop terminates.
The letter m is used here simply to distinguish visually the argument of this second function from the n used in the first. There is no syntactic need to do so: arguments and objects created inside each function have their own local scope, so two different functions may use an argument called n without conflict.
Defining the vector inside the function has an important advantage: each execution retains its own state and does not depend on objects already present in R’s global environment. In other words, if the function is run once with 27 and then with 8, the second orbit does not inherit values from the first.
The argument max_iter is not part of the Mathematics of Collatz; it is a computational precaution. Since the general statement one wishes to prove cannot simply be assumed when writing the program, it is prudent to prevent a loop from continuing without limit if it is used with unexpected data or a modified implementation.
Object
Type
Role
CollatzFunction
function
Computes a single image under the Collatz rule.
IterativeCollatzAlgorithm
function
Repeats the rule with while() and constructs the complete trajectory down to 1.
trajectory
numeric vector
Exists locally during one execution and stores the states visited.
Table 2. A conceptual equivalent of what would be observed in the R environment after defining the functions. The trajectory vector need not remain in the global environment.
· · ·
4. The orbit of 27: 112 states and 111 iterations
We can now evaluate any number in the algorithm we have constructed. Take the classic example of 27. The sequence begins 27, 82, 41, 124, 62, 31… and continues through rises and falls until it finally reaches 1.
This is a good place to make the terminology precise. The stored orbit contains 112 states, because it includes both the starting point 27 and the endpoint 1. However, between 112 states there are only 111 transitions. Consequently, the total stopping time of 27, understood as the number of applications of the rule required to reach one, is 111.
k=027
k=182
k=241
k=3124
k=462
k=531
k=694
k=747
k=8142
k=971
k=10214
k=11107
k=12322
k=13161
k=14484
k=15242
k=16121
k=17364
k=18182
k=1991
k=20274
k=21137
k=22412
k=23206
k=24103
k=25310
k=26155
k=27466
k=28233
k=29700
k=30350
k=31175
k=32526
k=33263
k=34790
k=35395
k=361186
k=37593
k=381780
k=39890
k=40445
k=411336
k=42668
k=43334
k=44167
k=45502
k=46251
k=47754
k=48377
k=491132
k=50566
k=51283
k=52850
k=53425
k=541276
k=55638
k=56319
k=57958
k=58479
k=591438
k=60719
k=612158
k=621079
k=633238
k=641619
k=654858
k=662429
k=677288
k=683644
k=691822
k=70911
k=712734
k=721367
k=734102
k=742051
k=756154
k=763077
k=779232
k=784616
k=792308
k=801154
k=81577
k=821732
k=83866
k=84433
k=851300
k=86650
k=87325
k=88976
k=89488
k=90244
k=91122
k=9261
k=93184
k=9492
k=9546
k=9623
k=9770
k=9835
k=99106
k=10053
k=101160
k=10280
k=10340
k=10420
k=10510
k=1065
k=10716
k=1088
k=1094
k=1102
k=1111
Table 3. Complete orbit of 27. The label k indicates how many applications of the rule have been performed. The maximum, 9232, appears at k = 77; one appears at k = 111.
The trajectory also reveals a property that makes the problem so suggestive: an extraordinarily simple deterministic rule does not necessarily generate a visually simple evolution. The fact that the system is perfectly determined step by step does not mean that its global behavior is obvious.
If one wishes to retain the traditional graph in R, it can be generated, for example, with:
R · optional visualizationplot(
orbit_27,
type = "l",
xlab = "Iteration k",
ylab = "n_k"
)
The table presents the complete orbit so that each state can be read directly and followed step by step.
5. A second solution: recursion
There is another way to design the algorithm. It may be somewhat less intuitive when first imagined, but it has a notable elegance: instead of constructing a while() loop, the function itself calls itself again after calculating the next value.
The problem now requires a function with two principal characteristics: its input is a positive integer representable by the numerical system being used; its output contains, on the one hand, the trajectory followed and, on the other, the number of transformations performed in order to reach one.
R · recursive versionRecursiveCollatz <- function(n, v = NULL) {
if (length(n) != 1L || !is.finite(n) || n < 1 || n != floor(n)) {
stop("n must be a positive integer.")
}
v <- c(v, n)
if (n == 1) {
return(list(
steps = v,
iterations = length(v) - 1L
))
}
if (n %% 2 == 0) {
n <- n / 2
} else {
n <- 3 * n + 1
}
return(RecursiveCollatz(n, v))
}
Here recursion is used in the precise programming sense: during the execution of RecursiveCollatz(), a new call to RecursiveCollatz() appears. That new call receives a different value of n and an enlarged copy of the vector v.
The condition n == 1 is the base case. Without a reachable base case, a recursive definition would continue producing additional calls until the available resources were exhausted. When 1 is reached, no new call is created: the list containing the orbit and the number of iterations is returned.
Three standard functions used
c() concatenates elements or vectors. list() constructs a list whose components may have different names and types. length() returns the number of elements in an object such as a vector or list; it should not be confused with dim(), which reports the dimensions of objects that possess a dimensional attribute.
The expression iterations = length(v) – 1L deserves attention. If v contains both the initial value and the final one, its length counts states, not transformations. Subtracting one corrects exactly that difference.
Seed
Returned states
Iterations
8
8 → 4 → 2 → 1
3
27
112 states from 27 to 1
111
Table 4. The difference between counting states and counting applications of the function. In the trajectory 8 → 4 → 2 → 1 there are four values, but only three steps.
A practical qualification must be added. Recursion is an excellent tool for understanding the logical structure of the problem, but it is not always the most robust way to traverse long orbits in R: each recursive call adds a new execution frame, and the available depth is finite. For intensive computational work, the iterative version is usually preferable; for understanding what it means for a function to invoke itself, the recursive version is particularly transparent.
· · ·
6. How to think about recursion mathematically
Before programming a recursive solution, it is useful to separate two things which, although intimately related, are not identical: the mathematical dynamics and the program’s call structure. The fundamental mathematical function remains T. What changes is the way in which the program organizes the calculation of its iterations.
The algorithm can be thought of as follows:
Logical step
Action
1
Enter a positive integer N.
2
Record N as a new state of the trajectory.
3
If N = 1, return the trajectory and terminate.
4a
If N is even, assign N ← N/2.
4b
If N is odd, assign N ← 3N + 1.
5
Execute the same function again using the new value of N.
Table 5. Use case for the recursive solution. Recursion appears in the last step: the function is executed again with a new input.
Mathematically, however, there is no need to define a new function C(n) whose value is always 1 whenever the recursion terminates. Such a notation would conceal the object that actually matters. It is cleaner to retain T as the Collatz map and define the orbit through successive iterations:
nk+1 = T(nk), k = 0, 1, 2, …
The total stopping time may then be written as the first index at which the orbit reaches one:
τ(n) = min { k ≥ 0 : Tk(n) = 1 }, whenever such a k exists.
This formulation makes the real difficulty visible. We know exactly the local rule that takes one state to the next. What does not follow automatically from that definition is that τ(n) is finite for every positive integer.
Take n = 8:
k = 0
k = 1
k = 2
k = 3
8
→
4
→
2
→
1
Table 6. From 8 to 1 there are four states and three applications of T. Therefore, τ(8) = 3.
The recursive function reproduces this same chain computationally, but each arrow now corresponds not only to a mathematical transformation but also to a new function call. The mathematical sequence advances from 8 to 4, from 4 to 2, and from 2 to 1; meanwhile, the program creates successive execution levels until it encounters the base case.
7. The call stack: why it is LIFO
To understand what happens during recursion, we can use a deliberately simple example. Suppose there is a “Listing X” with the following instructions:
Listing X
1. Execute A1.
2. Execute A2.
3. Execute the instructions in Listing X.
4. Return and print “Hello, Fernanda”.
Upon reaching step 3, the program begins another execution of the same listing. That new execution reaches its own step 3 and creates another, and so on. Because there is no base case here, step 4 is never executed: the resources that the environment permits for nested calls will be exhausted first.
Level
A1
A2
Step 3
Result
Listing X₀
executes
executes
calls X₁
remains pending
Listing X₁
executes
executes
calls X₂
remains pending
Listing X₂
executes
executes
calls X₃
remains pending
⋮
⋮
⋮
⋮
⋮
Table 7. Structure of recursive calls. Each call is suspended while it waits for the call created within it to finish.
When a base case does exist, as in our algorithm when 1 is reached, the situation changes. The deepest call terminates first; then the call that created it can terminate; then the preceding one, and so on. This is why the natural structure of nested calls is a stack, organized as LIFO: Last In, First Out.
TOP OF STACK · call with n = 1 · terminates first
call with n = 2 · waits for the result of n = 1
call with n = 4 · waits for the result of n = 2
BASE · call with n = 8 · created first
Table 8. The call stack for 8 → 4 → 2 → 1. The call with 1 is the last to enter and the first able to finish; the pending calls are then resolved in reverse order.
The analogy with a stack of plates remains useful: if several plates are stacked one on top of another, the last one placed sits at the top and is the first that can be removed without dismantling the stack. It is nevertheless useful to specify the technical reason: recursive calls are organized in this way because of the nested structure of program control. The relationship with memory locality or possible cache effects may matter in other performance contexts, but it is not what explains why the call stack is LIFO.
A call A that invokes B cannot continue beyond that point until B has finished; and if B invokes C, B cannot continue until C finishes either. The order C → B → A therefore arises naturally.
· · ·
8. What Collatz teaches us about Mathematics and Computation
There is still a conceptual question that deserves attention. At first glance, it might seem that the mathematical formulation offers us a “continuous” process whereas the program turns it into a collection of discrete steps. That opposition, however, does not correctly describe this problem. Collatz dynamics are discrete in the mathematical definition itself: iteration time is indexed by 0, 1, 2, 3, … and each state belongs, in the usual formulation, to the set of positive integers.
The interesting difference, therefore, is not between continuous Mathematics and discrete Computation. It lies elsewhere: between defining a rule, calculating its consequences for particular cases, and proving a global property of all its orbits.
Level
What we know
What does not follow automatically
Mathematical rule
For each state, we know exactly what the next one is.
From this alone, we do not know the global fate of every possible orbit.
Computational calculation
We can follow a particular orbit step by step and verify whether it reaches 1.
A finite number of verifications is not equivalent to a universal proof.
Mathematical proof
It would seek to establish a proposition valid for every positive integer.
It cannot simply be replaced by enumerating more and more cases.
Table 9. Three levels of knowledge that Collatz forces us to distinguish: local specification, computational experimentation, and global proof.
This distinction allows us to formulate more precisely the epistemological reflection that makes the example attractive. Mathematics does not necessarily consist in placing a phenomenon inside an analytical form whose behavior is already known. Collatz shows exactly the opposite: we can possess a perfectly defined rule and still lack a complete characterization of its global behavior.
Nor can Computation be reduced to attending to “particularities” that Mathematics has supposedly abstracted away. Here both operate on the same discrete object, but they ask different questions. The program allows us to execute the rule, inspect orbits, measure stopping times, discover regularities, and subject auxiliary conjectures to numerical testing. Mathematical proof, by contrast, asks what can necessarily be asserted for an infinite class of cases.
Knowing exactly the law that governs each step is not the same as knowing in advance the global behavior of the system.
This is probably one of the most interesting lessons that can be drawn from the problem from the joint perspective of Mathematics and Computer Science. In Collatz there is local determination, effective computability of every step, and an enormous body of evidence for particular values; but those three things must not be confused with a universal proof.
9. A precaution: mathematical integers are not machine integers
Finally, there is an additional difference between the mathematical object and its concrete implementation that should be made explicit. The expression “any N ∈ ℕ” describes an unlimited mathematical domain. A computer, by contrast, represents numbers by means of finite structures.
Base R includes, among other things, values of type integer, whose range is limited, and numeric values, which normally use double-precision arithmetic. The latter can represent all integers exactly only up to a certain size; above 253, not every consecutive integer has an exact representation as a double-precision number.
The issue is particularly relevant in Collatz because an orbit can grow far above its initial value before beginning to descend. Consequently, an implementation intended to investigate very large numbers must use exact integer arithmetic of greater capacity—for example, arbitrary-precision integers—and carefully check for possible overflow or loss of exactness.
Mathematics versus implementation
Mathematical object:T acts on all positive integers. Concrete program: it can operate correctly only on values that its numerical representation and memory resources can manipulate exactly.
This does not invalidate the pedagogical use of the preceding code. For small seeds such as 8 or 27, the implementation is perfectly adequate. What it prevents is our attributing to a finite computational representation the same unlimited domain possessed by the abstract mathematical object.
· · ·
Final considerations
The Collatz conjecture is an extraordinarily fertile example for learning to program because it allows us, almost without introducing artificial devices, to move from an elementary mathematical rule to several central ideas in Computer Science. First we construct a function that chooses between two operations; then that operation is turned into an iteration; next the orbit is stored; finally the same process is reconstructed through recursion, and we observe how nested calls are organized in a stack.
But the example is equally fertile for a deeper reason. A sequence may be governed by a completely deterministic rule and yet pose enormous difficulties when one tries to establish a global property for all of its trajectories. The program knows what to do at each step. The mathematical difficulty lies in justifying what will happen after all the necessary steps, for every possible starting point.
In this sense, programming does not replace proof, nor does proof make programming unnecessary. The former allows us to experiment with the object, traverse it, and produce concrete evidence; the latter seeks to establish relations that do not depend on having previously enumerated every case. Collatz provides an especially clean setting in which to observe this difference because there is no obscurity whatsoever in the elementary rule: the difficulty emerges from the dynamics produced by repeating it.
And precisely for that reason, a custom function in R is more than an exercise in syntax. It allows us to observe, on a small and manageable scale, the passage between definition, algorithm, execution, numerical representation, and mathematical reasoning; that is, between different levels of the same scientific activity which should remain connected without being confused.
When calculus is first studied, the integral usually appears as a procedure for accumulating quantities over an interval. Later, the same idea is extended: integration is no longer carried out only along an axis, but also over curves, regions of the plane, volumes, and surfaces. Line integrals, multiple integrals, and surface integrals are precisely some of the forms taken by this generalization.
In general terms, line integrals allow us to accumulate a quantity along a curve. Multiple integrals allow us to do so over regions of two or more dimensions. Surface integrals, in turn, allow us to integrate over a surface located in space. At the level of university calculus, this distinction is enough to understand why each kind of integral requires different techniques while keeping in view that all of them belong to the same mathematical idea: infinitesimally summing a magnitude over a given domain.
The main theorems associated with these integrals are also related. For line integrals there is the Fundamental Theorem for Line Integrals; when studying multiple integrals one encounters Fubini’s Theorem, the Pappus–Guldinus Theorems, and Green’s Theorem; and in the study of vector fields on surfaces one encounters Stokes’ Theorem and Gauss’ Theorem, also known as the Divergence Theorem.
The fundamental difference does not lie in the idea of integration itself, but in the geometric object over which accumulation is carried out.
Green, Stokes, and Gauss are not literally the same theorem in an elementary calculus course, but they express a common structure: they relate an integral carried out in the interior of a region to another integral carried out over its boundary. In a more general treatment, this unity is formalized through the generalized Stokes theorem; however, for an undergraduate course it is enough to understand them as different manifestations of the same principle.
Line Integrals
A line integral is an integral whose domain of integration is a curve. Instead of moving through the points of an interval on the real axis, one moves through the points of a path that may lie in the plane or in space. To perform the calculation, the usual procedure is to parameterize the curve.
To parameterize means to describe the coordinates of every point on the curve through an auxiliary variable, usually \(t\). In the case of a straight line, the parameterization may take a simple form such as \(x=c+kt\). For a general curve, however, it is more appropriate to think in terms of expressions such as \(x=x(t)\), \(y=y(t)\), and, when necessary, \(z=z(t)\). The procedure therefore does not require a single constant direction vector; that feature belongs to the particular case of a straight line.
FIGURE 1 · A scalar line integral accumulates the values of a function along a curve. Original source indicated in the article: Greg School.
There are two especially important cases. In a line integral of a scalar function, a magnitude is accumulated along the curve. If a wire has variable density, for example, a line integral can be used to obtain its total mass. In a line integral of a vector field, by contrast, one is usually interested in the effect of the field along the displacement: the classical example is the work done by a force along a path.
Scalar line integral: ∫C f ds
Vector line integral: ∫C F · dr
FIGURE 2 · Different kinds of line integrals: integration with respect to arc length and integration of vector fields along a path. Original source indicated in the article: YouTube.
When the curve is closed, the symbol \(\oint\) is often used. The circle drawn over the integral sign indicates precisely that the path returns to its starting point. This detail is particularly important when studying circulation, because the integral is taken around the entire closed boundary.
The Fundamental Theorem for Line Integrals
The Fundamental Theorem for Line Integrals plays a role analogous to the Fundamental Theorem of Calculus in one variable. If a vector field is conservative and can be written as the gradient of a potential function, then the integral between two points depends only on the initial point and the final point, not on the particular path followed from one to the other.
If F = ∇φ, then
∫C F · dr = φ(B) − φ(A)
This is one of the first indications of an idea that will appear repeatedly: certain complicated integrals can be transformed into simpler expressions when the geometric structure of the problem allows the appropriate theorem to be applied.
Multiple Integrals
Multiple integrals generalize the process of integration to domains involving more than one variable. A double integral is carried out over a two-dimensional region and a triple integral over a three-dimensional region. Their geometric interpretation depends on what is being integrated.
For example, if the constant function \(1\) is integrated over a region of the plane, the double integral gives the area of that region. If a nonnegative function \(f(x,y)\) is integrated over a region \(R\), the integral may be interpreted as the volume lying below the surface \(z=f(x,y)\) and above \(R\). Likewise, a triple integral of \(1\) over a region of space gives its volume. One should therefore not mechanically identify “double integral” with “volume” or “triple integral” with “hypervolume”: the meaning depends on the integrand and on the domain.
FIGURE 3 · Interpretation of a double integral as the accumulation of infinitesimal sections over a region. Original source indicated in the article: AlgebraHD.
Fubini’s Theorem
Fubini’s Theorem is fundamental because, under the usual conditions studied in calculus, it allows a multiple integral to be computed by means of iterated integrals. In practical terms, this means integrating first with respect to one variable and then with respect to another. In triple integrals there are as many as six possible orders of integration, and choosing a suitable order can simplify the calculation considerably.
∬R f(x,y) dA
may be computed, depending on the region, as
∫ [ ∫ f(x,y) dy ] dx
or as
∫ [ ∫ f(x,y) dx ] dy
Conceptually, Fubini’s principle is not limited to triple integrals. It is a general result concerning integration on product spaces. In an undergraduate calculus course, however, it is most often applied to double and triple integrals, which are also the cases that can be represented geometrically most easily.
FIGURE 4 · A triple integral can be set up using different orders of integration. The geometry of the region determines which order is most convenient. Original source indicated in the article: SlidePlayer.
The Pappus–Guldinus Theorems
The two Pappus–Guldinus theorems relate centroids to objects generated by revolution. Intuitively, both say that when a figure rotates around an axis, a geometric magnitude generated by that rotation can be calculated by multiplying the original magnitude by the distance traveled by its centroid.
The first theorem relates the length of a plane curve to the area of the surface of revolution generated by that curve. The second theorem relates the area of a plane region to the volume of the solid of revolution generated when it is rotated around an axis that does not intersect the region. This is the relevant formulation of the two classical theorems in calculus.
Green’s Theorem
Green’s Theorem establishes a relation between a double integral over a plane region and a line integral along the closed curve forming its boundary. If \(C\) is the positively oriented boundary of a region \(R\), then, under the usual hypotheses:
∮C P dx + Q dy
=
∬R (∂Q/∂x − ∂P/∂y) dA
The conceptual importance of the theorem is greater than the formula itself. Green’s Theorem allows an accumulation performed around a boundary to be replaced by one performed throughout the interior, or vice versa. It therefore forms a natural bridge between line integrals and double integrals.
Surface Integrals
A surface integral is an integral carried out over a surface located in space. Here it is useful to distinguish two cases, in a way analogous to what occurred with line integrals.
In a scalar surface integral, a scalar function is accumulated over the surface. If a curved sheet has variable surface density, for example, an integral of this kind can provide its mass. By contrast, when a vector field is integrated through the dot product with the normal vector, one computes the flux of the field through the surface.
Scalar surface integral:
∬S f dS
Flux of a vector field:
∬S F · n dS
FIGURE 5 · Surface integral of a scalar function. The surface may be described by a parameterization, and the area element must be adjusted to its geometry. Original source indicated in the article: SlidePlayer.
If a surface can be written as \(z=g(x,y)\), it may be parameterized by \((x,y,g(x,y))\). The differential surface element is not simply \(dx\,dy\), because it must account for the local inclination of the surface. For the graph \(z=g(x,y)\), the factor that appears is:
dS = √(1 + (∂g/∂x)² + (∂g/∂y)²) dA
This factor corrects the area projected onto the \(xy\)-plane so that it becomes the actual area on the inclined surface. If the surface is described in another way—for example, by \(x=g(y,z)\)—the corresponding parameterization is used.
Gauss’ Theorem or the Divergence Theorem
When \(S\) is a closed surface enclosing a volume \(V\), Gauss’ Theorem relates the total flux of a vector field through the surface to the divergence of the field throughout the interior volume. If \(\mathbf F=(P,Q,R)\), its divergence is:
div F = ∂P/∂x + ∂Q/∂y + ∂R/∂z
and the theorem states:
∯S F · n dS
=
∭V div(F) dV
The symbol \(\oiint\)—or, typographically, a double integral sign with a circle—indicates that the surface is closed. Conceptually, Gauss’ Theorem says that the net flux leaving the boundary of a volume is determined by the total contribution of the “sources” and “sinks” of the field within that volume.
Green, Stokes, and Gauss: One Underlying Idea
At this point we can return to the initial observation and formulate it more precisely. Green’s, Stokes’, and Gauss’ theorems should not be treated as isolated results. All three connect what happens in a region with what happens on its boundary, although each one does so in a different geometric situation.
Green works in the plane: it relates a double integral over a region to a line integral along its boundary. Stokes works with an oriented surface in space: it relates the circulation of a field around the curve forming its boundary to an integral of the curl over the surface. Gauss works with a volume: it relates the flux through the closed surface enclosing it to the divergence throughout the volume.
Conceptual Scheme
Green: plane region ↔ boundary curve.
Stokes: surface ↔ boundary curve.
Gauss: volume ↔ boundary surface.
This resemblance is not accidental. In more advanced courses, the generalized Stokes theorem allows these results to be gathered within a single mathematical structure. Even without differential forms, however, the central intuition can already be understood at undergraduate level: under suitable conditions, an integral over the interior can be transformed into an integral over the boundary, and vice versa.
In this sense, the progression from line integrals to multiple integrals and surface integrals is not an arbitrary collection of techniques. It is a gradual extension of the same idea of accumulation and, at the same time, an introduction to one of the deepest relations in vector calculus: the relation between a region and its boundary.
Comparative Summary
Type of integral
Domain
Typical interpretations
Related theorems
Line integral
Curve
Mass of a wire, work, circulation
Fundamental Theorem for Line Integrals; Green
Double integral
Plane region
Area, volume under a surface, mass of a lamina
Fubini; Green
Triple integral
Region in space
Volume, mass, volumetric accumulation
Fubini; Gauss
Surface integral
Surface in space
Weighted area, surface mass, flux
Stokes; Gauss
The difference among these integrals can therefore be summarized simply. A line integral accumulates along a path; a multiple integral accumulates over a region; and a surface integral accumulates over a surface. What changes is the geometry of the domain and, with it, the differential element that must be used. The fundamental idea of integration, however, remains the same.
To integrate is to accumulate. What changes from one integral to another is where the accumulation takes place and what magnitude is being accumulated.