Why the Sampling Mechanism Matters
In a prospective study, the numbers of people with and without an outcome arise from the population being studied. In a case-control study, researchers instead select people according to outcome status, often sampling more cases than would occur naturally. That changes the outcome frequency in the observed sample. The important question is whether it also changes the logistic relationship between outcome and covariates.
The answer depends on how selection is carried out. If, within each outcome group, selection does not depend on the covariates, it multiplies the outcome odds by the same factor at every covariate value. A constant multiplication changes the log-odds intercept, but not its covariate slopes. The argument is an exact identity for conditional probabilities; it does not require the outcome to be rare.
Suppose the population conditional distribution follows the logistic regression model \(\operatorname{logit}P(Y=1\mid X=x)=\alpha+x^\mathsf{T}\beta\), where \(\operatorname{logit}(p)=\log\{p/(1-p)\}\). Here \(\alpha\) is the population intercept and \(\beta\) is the vector of population slopes. We derive the corresponding conditional model among selected individuals.
The Selection Identity
Write \(p(x)=P(Y=1\mid X=x)\) for the population outcome probability and \(p_S(x)=P(Y=1\mid X=x,S=1)\) for the probability conditional on inclusion. Assume \(P(S=1\mid X=x)>0\) at covariate values under consideration. By the definition of conditional probability, the selected-sample odds are
Applying the selection condition to the numerator and denominator gives the central identity.
The result follows directly from the joint conditional probabilities. The proof also makes clear which part depends on the sampling design.
Using conditional probability and the sampling condition, \(P(Y=1,S=1\mid X=x)=s_1p(x)\), while \(P(Y=0,S=1\mid X=x)=s_0\{1-p(x)\}\).
The ratio of these probabilities is \(\{s_1/s_0\}\{p(x)/(1-p(x))\}\). The factors \(s_1,s_0\) are constant in \(x\).
The log of the selected odds is \(\log(s_1/s_0)+\operatorname{logit}p(x)=\alpha+\log(s_1/s_0)+x^\mathsf{T}\beta\). The added term is constant in \(x\), so every covariate coefficient remains \(\beta\).
This identity is a statement about the conditional outcome distribution among selected individuals. It does not say that the sample has the same case fraction as the population, nor that its intercept equals the population intercept. It also does not say that every feature of the joint distribution of \(X\) and \(Y\) is unchanged.
Worked Consequences
Worked Example: A Binary Exposure and Unequal Sampling
Suppose \(X\in\{0,1\}\) and the population model is \(\operatorname{logit}P(Y=1\mid X=x)=-2+x\log 3\). Cases are sampled with probability \(s_1=0.5\), and noncases with probability \(s_0=0.2\), independently of exposure within each outcome group. Find the selected model and check its odds ratio numerically.
The sampling odds multiplier is \(s_1/s_0=0.5/0.2=2.5\). Therefore the selected logit is \[ -2+\log(2.5)+x\log 3. \] The intercept has changed, but the coefficient of \(x\) is still \(\log 3\), so the selected odds ratio comparing \(X=1\) with \(X=0\) is \(e^{\log 3}=3\).
At \(x=0\), the population odds are \(e^{-2}\); after selection they are \(2.5e^{-2}\). Hence \[ P(Y=1\mid X=0,S=1) =\frac{2.5e^{-2}}{1+2.5e^{-2}} =\frac{2.5}{e^2+2.5} \approx 0.2528. \] At \(x=1\), the population odds are \(e^{-2}e^{\log 3}=3e^{-2}\); the selected odds are \(7.5e^{-2}\). Thus \[ P(Y=1\mid X=1,S=1) =\frac{7.5e^{-2}}{1+7.5e^{-2}} =\frac{7.5}{e^2+7.5} \approx 0.5037. \] The selected odds are \(2.5e^{-2}\) and \(7.5e^{-2}\), so their ratio is \((7.5e^{-2})/(2.5e^{-2})=3\), confirming the slope calculation.
Worked Example: Two Covariates
Let the population model be \(\operatorname{logit}P(Y=1\mid X_1=x_1,X_2=x_2)=-1.5+0.7x_1-0.4x_2\). Suppose cases are sampled with probability \(0.6\) and noncases with probability \(0.15\), with no further dependence on either covariate. Determine the selected coefficients, and compare the selected odds at two covariate profiles.
The sampling odds multiplier is \(0.6/0.15=4\), so the intercept shift is \(\log 4\approx1.3863\). The selected linear predictor is \[ (-1.5+\log 4)+0.7x_1-0.4x_2 \approx -0.1137+0.7x_1-0.4x_2. \] The slope of \(X_1\) remains \(0.7\), and the slope of \(X_2\) remains \(-0.4\). For fixed \(x_2\), increasing \(x_1\) by one multiplies the odds by \(e^{0.7}\approx2.014\), both before and after selection. For fixed \(x_1\), increasing \(x_2\) by one multiplies the odds by \(e^{-0.4}\approx0.6703\) in both distributions.
For a direct profile comparison, take \((x_1,x_2)=(0,0)\) and \((1,1)\). The population log-odds difference is \[ (0.7-0.4)-0=0.3, \] so the population odds ratio is \(e^{0.3}\approx1.350\). The selected log-odds at the two profiles are \(-0.1137\) and \(-0.1137+0.7-0.4=0.1863\); their difference is also \(0.3\). The selected odds ratio is therefore the same \(e^{0.3}\), as required.
Worked Example: Why Covariate-Independent Selection Is Essential
Suppose \(X\in\{0,1\}\) and the population model has intercept \(0\) and slope \(\log 2\). The population odds are \(1\) at \(X=0\) and \(2\) at \(X=1\), giving a population odds ratio of \(2\). Now let noncases have selection probability \(s_0(x)=0.5\) at both exposure values, but let cases have probability \(s_1(0)=0.25\) and \(s_1(1)=0.5\).
At \(X=0\), the selection odds multiplier is \(0.25/0.5=0.5\), so the selected odds are \(1(0.5)=0.5\), and the selected probability is \(0.5/(1+0.5)=1/3\). At \(X=1\), the multiplier is \(0.5/0.5=1\), so the selected odds are \(2(1)=2\), and the selected probability is \(2/(1+2)=2/3\).
The selected odds ratio is \(2/0.5=4\), not \(2\). Equivalently, the selected log-odds difference is \(\log 2-\log 0.5=\log 4\), rather than \(\log 2\). The selection multiplier varies with \(X\), so its logarithm contributes to the slope. This design does not satisfy outcome-group-only sampling.
What the Result Does and Does Not Guarantee
More generally, the proof establishes a useful odds-ratio statement that does not depend on coding a covariate as binary. For any two covariate values \(x\) and \(x'\) with defined probabilities, the selected log-odds contrast equals the population contrast:
The constant \(\log(s_1/s_0)\) cancels when subtracting. Thus, if the population model is logistic and linear in the specified covariates, the selected distribution has the same covariate contrasts and the same slopes. The result applies to categorical indicators, continuous predictors, and interaction terms included in the linear predictor: all their coefficients are unchanged under the stated sampling condition. The intercept is the constant term, so it is the part that absorbs the sampling odds multiplier.
Several qualifications matter in practice. First, the population logistic specification must be correct for the slope claim to identify the population model's \(\beta\) as the selected model's coefficient vector. If the true log odds are not linear in the chosen predictors, outcome-group-only selection still adds a constant to the true log odds function. However, fitting a misspecified linear logistic model can produce different best-fitting slopes because the selected sample may have a different covariate distribution.
Second, selection must have positive probability in both outcome groups over the covariate values being compared. If an outcome group is never observed in a region, its conditional odds there cannot be recovered from the selected sample. Third, a coefficient can be identified only when the design contains enough covariate variation to distinguish the model terms; the selection identity cannot fix a rank-deficient design or guarantee a finite estimate in a particular data set.
Finally, preserving the conditional slopes is not the same as preserving every aspect of inference. The selected sample has been assembled under an outcome-dependent design, and its outcome prevalence is generally not the population prevalence. This tutorial's result concerns the conditional logistic relationship and its slopes; it does not by itself justify treating the observed sample proportion as a population risk or settle how uncertainty should be estimated.
Common Mistake
A common mistake is to reason that because the sample contains an artificially large proportion of cases, every logistic regression coefficient must be biased. That conclusion treats all coefficients as if they played the same role. Under outcome-group-only sampling, the case-to-noncase sampling ratio multiplies the odds by a constant at every covariate value. Taking logarithms adds a constant, which changes the intercept but leaves covariate contrasts unchanged. The opposite mistake is to claim that case-control sampling always preserves slopes. The numerical counterexample above shows why that is false when selection probabilities vary with covariates within outcome groups.
Check Your Understanding
Use the selection identity to answer the following questions.
- In words, state the condition on selection probabilities that is needed for the logistic slopes to be preserved.
- If \(s_1=0.3\) and \(s_0=0.1\), by what factor are the outcome odds multiplied among selected individuals?
- Why does a factor that is constant across \(x\) change the intercept but not the slope in a logistic model?
- In the third worked example, what feature of the design makes the selected odds ratio differ from the population odds ratio?
- Does the slope-preservation identity imply that the selected sample's outcome proportion estimates the population prevalence? Explain briefly.