Tutorials › Exam PA - Predictive Analytics › Selection Bias in Observed Data

Exam PA · Limitations, Assumptions, and Monitoring · Tutorial 807 of 966

Selection Bias in Observed Data

Trace how selection into a modeling sample can distort outcome estimates, and identify which predictions the observed data can support.

Intermediate 11 min read

What You'll Learn

  • Define a selection indicator and distinguish the target population from the observed sample
  • Explain how selection related to outcomes can distort observed event rates
  • Identify when selection based only on observed predictors changes the sample mix
  • Calculate an inverse-probability weighted estimate under stated assumptions
  • State why a model cannot establish reliable predictions for cases with no representation in development data

Why Selection Into the Data Matters

A predictive model is developed from records that were collected and retained, not from every case that could matter operationally. Eligibility rules, referral practices, reporting behavior, and follow-up procedures can all determine which cases have usable predictors and outcomes. If inclusion is related to the outcome, the observed outcome patterns may differ from those in the population to which the model is meant to apply.

The central question is not simply whether the development data are large. It is how a case came to be observed. A large sample assembled through a selective process can give a precise description of that selected sample while still giving a misleading answer for the intended population.

Definition: Let \(S=1\) indicate that a case is included in the model-development data, and let \(S=0\) indicate that it is not. The target population is the set of cases for which predictions are intended. The observed sample consists of target-population cases with \(S=1\) and usable data. Selection bias occurs when the selection process makes relationships or outcome distributions in the observed sample differ from those relevant to the target population.

Selection is not automatically harmful in every respect. If cases are selected according to observed predictors, the predictor mix can change even while outcome rates within predictor groups remain the same. Conversely, if inclusion depends on the outcome even among cases with the same predictors, the observed outcome rate within those groups can be distorted. These situations have different implications and should not be conflated.

This discussion is aligned with the SOA Exam PA (Predictive Analytics) syllabus. The earlier material on representativeness of the modeling population motivates the target-population comparison; here the emphasis is on the mechanism that determines which records and outcomes are actually observed.

Selection Rules and Missing Outcomes

A case can be absent from a development data set in several ways. A policy application may be excluded because it did not meet an eligibility rule. A claim may be observed only if it was reported. A customer may enter a study only after referral. Or the predictors may be available while the outcome is not yet known because follow-up ended too soon. Each process defines, explicitly or implicitly, who has \(S=1\).

For outcome analysis, it is useful to distinguish inclusion of a case from observation of its outcome. Let \(R=1\) mean that the outcome is observed and \(R=0\) mean that it is missing. An outcome may be missing for reasons related to recorded predictors, the outcome itself, or both. For example, a follow-up outcome might be less likely to be recorded for cases with a particular service channel, or cases with an adverse outcome might be more likely to leave a program before the outcome is measured.

Definition: Outcome observation is missing completely at random when the chance that an outcome is observed does not depend on recorded predictors or the outcome. It is missing at random conditional on observed predictors when, within groups with the same recorded predictors, observation does not depend on the outcome. It is missing not at random when outcome observation still depends on the outcome after conditioning on the recorded predictors.

These descriptions concern the outcome-observation mechanism, not whether the recorded predictors themselves are accurate. Even under missingness at random conditional on predictors, simply analyzing observed outcomes can change the mix of predictors in the sample. If the objective is an overall population rate, that changed mix matters. For conditional predictions, the key question is whether, at a given predictor value, observed outcomes represent the outcomes that would have been seen for all cases at that value.

How Selection Changes an Outcome Rate

Consider a binary outcome \(Y\), where \(Y=1\) denotes an event and \(Y=0\) denotes no event. At a given predictor value \(X=x\), define \(s_1(x)=P(S=1\mid X=x,Y=1)\) and \(s_0(x)=P(S=1\mid X=x,Y=0)\). If both selection probabilities are positive, the event probability among selected cases at that predictor value is

$$ P(Y=1\mid X=x,S=1) = \frac{s_1(x)P(Y=1\mid X=x)} {s_1(x)P(Y=1\mid X=x)+s_0(x)P(Y=0\mid X=x)}. $$

The expression follows directly from conditional probability. The numerator is the probability of both an event and selection, given \(X=x\). The denominator is the probability of selection given \(X=x\), which includes selected event cases and selected non-event cases. Dividing the first quantity by the second gives the event proportion among selected cases.

$$ P(Y=1,S=1\mid X=x)=s_1(x)P(Y=1\mid X=x), \qquad P(S=1\mid X=x)=s_1(x)P(Y=1\mid X=x)+s_0(x)P(Y=0\mid X=x). $$

If \(s_1(x)=s_0(x)\), the common selection factor cancels, so the observed event probability at \(x\) equals the target event probability at \(x\). This is the key case in which selection does not alter the conditional outcome rate at that predictor value. If the two probabilities differ, the observed rate generally changes. If either type of case has zero probability of selection in a region, the observed data cannot directly reveal the outcome rate there.

Worked Example: Reporting Selects More Event Cases

A hypothetical portfolio contains 1,000 eligible contracts. During the measurement period, 200 have a specified event and 800 do not. Event cases are included in a reporting-based development file with probability 0.80, while non-event cases are included with probability 0.40. Find the event rate in the file and compare it with the rate in the eligible portfolio.

Method. Calculate the expected number selected in each outcome group, then take the selected event count divided by the total selected count.

Selected event cases. The number is \(200(0.80)=160\).

Selected non-event cases. The number is \(800(0.40)=320\). Thus the total selected count is \(160+320=480\).

Observed event rate. The rate in the file is \(160/480=0.3333\), or 33.33% to two decimal places. The target portfolio rate is \(200/1{,}000=0.20\), or 20%.

Check and trap. The selected counts sum to 480, and the event and non-event counts sum to that total. Using 33.33% as the eligible-portfolio event rate would be wrong: event cases were twice as likely to enter the file as non-event cases. The file’s rate describes its selected records, not automatically the portfolio.

Selection on Predictors Can Change the Mix

Now suppose the chance of inclusion depends on a recorded predictor \(X\), but, within each value of \(X\), does not depend on the outcome. In that case the outcome rate conditional on \(X\) is preserved, but the distribution of \(X\) in the selected sample can differ from its distribution in the target population. An overall event rate, which averages conditional rates over the predictor distribution, can therefore change.

This distinction matters for interpretation. A model may estimate useful conditional risks for predictor groups represented in the data, while a summary of the selected sample’s overall risk does not describe the target population. A conditional model can also fail to generalize if it is misspecified or if the intended prediction cases have predictor values not represented in development data. The selection mechanism alone does not guarantee that a fitted model is valid.

Worked Example: An Oversampled Complex-Risk Group

A hypothetical group of 1,000 applicants has 800 routine cases with an event rate of 5% and 200 complex cases with an event rate of 25%. A review process includes 25% of routine cases and 75% of complex cases. Assume that, within each group, inclusion does not depend on whether the event occurs. Calculate the target and selected-sample event rates.

Method. First calculate the target event counts. Then apply the inclusion rates to the group counts and event counts separately.

Target event counts. Routine cases contribute \(800(0.05)=40\) events. Complex cases contribute \(200(0.25)=50\) events. The target total is 90 events out of 1,000, or \(90/1{,}000=9.00\%\).

Selected group counts. The process includes \(800(0.25)=200\) routine cases and \(200(0.75)=150\) complex cases, for 350 selected cases.

Selected event counts. Because inclusion is independent of the outcome within each group, the selected routine group has \(200(0.05)=10\) events, and the selected complex group has \(150(0.25)=37.5\) expected events. The expected total is 47.5, so the selected-sample event rate is \(47.5/350=0.135714\), or 13.57% to two decimal places.

Check and trap. The group-specific rates remain 5% and 25%, while the mix changes: complex cases are \(150/350=42.86\%\) of the selected sample, compared with \(200/1{,}000=20\%\) of the target group. Reporting 13.57% as the target rate would use the selected mix instead of the target mix. The target calculation, \(0.80(0.05)+0.20(0.25)=0.09\), confirms the 9.00% result.

When Weighting Can Help—and When It Cannot

If outcome observation depends only on recorded predictors, and the observation probabilities are known or can be credibly estimated, inverse-probability weighting can restore the target predictor mix for an overall rate. A case with observation probability \(r(X)\) receives weight \(1/r(X)\). Cases that were less likely to be observed then represent more target-population cases. This adjustment requires that observation probabilities be positive for every relevant predictor pattern and that the stated conditional observation assumption be reasonable.

Weighting does not manufacture outcomes for cases that are never observed. Nor does it correct selection related to the unobserved outcome after conditioning on the recorded predictors unless further assumptions or information are available. A weighted estimate is therefore not automatically unbiased just because weights were calculated; its interpretation depends on the selection assumptions and the quality of the observation-probability estimates.

Worked Example: Reweighting Outcomes Under Conditional Observation

A hypothetical population has 1,000 cases: 500 in group A and 500 in group B. The event rates are 10% in A and 30% in B. Outcomes are observed for 50% of A and 90% of B. Assume that within each group outcome observation is independent of the outcome. Calculate the unweighted observed event rate and an inverse-probability weighted rate.

Method. Compare the observed-case rate with the rate obtained by weighting each observed case by the inverse of its group’s observation probability.

Observed counts. Group A has \(500(0.10)=50\) events and \(500-50=450\) non-events. Of these, \(500(0.50)=250\) outcomes are observed, including \(50(0.50)=25\) events under the stated assumption. Group B has \(500(0.30)=150\) events and 350 non-events. Its observed count is \(500(0.90)=450\), including \(150(0.90)=135\) events.

Unweighted rate. The observed file contains \(250+450=700\) cases and \(25+135=160\) events. Its rate is \(160/700=0.228571\), or 22.86% to two decimal places.

Weighted rate. The weights are \(1/0.50=2\) for group A and \(1/0.90=10/9\) for group B. The weighted event total is \(25(2)+135(10/9)=50+150=200\). The weighted case total is \(250(2)+450(10/9)=500+500=1{,}000\). The weighted rate is \(200/1{,}000=20.00\%\).

Check and trap. The result agrees with the population calculation: \(500(0.10)+500(0.30)=200\) events among 1,000 cases. Treating the missing outcomes as non-events would instead give \(160/1{,}000=16\%\), which is not justified. The correction relies on the assumption that, within A and within B, observed cases represent unobserved cases with respect to the outcome.

Limits on Predictions for Excluded Cases

A model’s predictions are supported by evidence only to the extent that the relevant cases and outcomes are represented in the development data, or that a defensible selection adjustment connects the data to the target. If a class of cases was excluded by design, predictions for that class may require extrapolation. If no outcomes were recorded for a group, the model-development data cannot establish whether its predictions are calibrated for that group.

A limitation should specify the affected cases and the consequence for the intended decision. For example, if an underwriting model was developed only on contracts meeting a particular eligibility rule, its measured performance does not by itself establish performance on contracts that failed that rule. The model might still be applied there as a provisional assumption, but the evidence does not validate that use. This is different from saying the model is certainly wrong; it means the available data do not settle the question.

1
Define the target.
State which cases should receive predictions and what outcome period or definition is intended.
2
Describe inclusion.
Identify eligibility, referral, reporting, and follow-up rules that determine which predictors and outcomes appear in the data.
3
Ask what selection depends on.
Determine whether inclusion varies with recorded predictors, the outcome, or factors not recorded in the development data.
4
Bound the claim.
Separate conclusions supported for represented cases from predictions for excluded cases that require additional assumptions or evidence.

A common reporting error is to describe a model as applicable to “all applicants” when the development records contain only applicants who completed a particular process. A more defensible statement names the observed population and the unsupported extension. Selection bias is not resolved by a high sample size, a strong validation score on the selected records, or precise wording about model performance; those facts do not show that excluded cases follow the same outcome process.

Key takeaway: Always separate the observed-sample result from the target-population claim. Selection based on predictors can alter the population mix; selection related to outcomes can alter conditional outcome rates. For excluded cases with no outcome support, state the limitation rather than treating a model prediction as validated evidence.

Check Your Understanding

For each problem, distinguish the observed result from what can be concluded about the target population.

  1. A hypothetical program has 40% event cases. Event cases are included with probability 0.75 and non-event cases with probability 0.50. What fraction of the selected sample has the event? (Answer: 50.00%)
  2. A target population is 60% group A and 40% group B. Event rates are 2% and 12%, respectively. Inclusion probabilities are 0.50 for A and 0.75 for B, and selection within each group is independent of the outcome. Find the target event rate and selected-sample event rate. (Answer: Target 6.00%; selected sample 7.00%)
  3. Two equally sized groups have event rates of 8% and 20%. Outcome observation rates are 50% and 80%, respectively, and within each group observation is independent of the outcome. What is the unweighted observed event rate, and what is the target event rate? (Answer: Observed 15.38%; target 14.00%)
  4. At a fixed predictor value, the target event rate is 25%. Event cases are selected with probability 0.90 and non-event cases with probability 0.30. What event rate is expected among selected cases at that predictor value? (Answer: 50.00%)
  5. A model-development file contains outcomes only for cases with predictor values from 0 through 10. Operational predictions are proposed for cases with values from 10 through 20, but no outcomes are available there. What does the development file establish about prediction accuracy in the newly proposed range? (Answer: It does not establish accuracy or calibration there; predictions in that range are unsupported extrapolations unless additional evidence or assumptions are supplied.)
Clinical Biostats