Why Exclusion Rules Matter
After defining who may enter a study, an analyst may apply additional rules that remove some otherwise eligible records from the analysis. Those rules can be operationally necessary, such as removing duplicate rows, or they can make the analysis easier, such as retaining only records with every desired field present. In either case, an exclusion changes which observations contribute to the results.
The central question is not simply whether a rule reduces the data set. It is which records it removes, and what population the remaining records describe. A model built after excluding records is directly informed by the retained records, not automatically by every entity that met the original cohort definition.
Eligibility and exclusion are related but distinct. Eligibility rules define entry into the cohort; exclusion rules then identify which eligible records will not be used for a specified analysis. For example, a study might define eligible policy-periods as policies active on a particular date, then exclude a subset because a predictor field is unavailable. The retained data can therefore describe a narrower group than the eligible cohort.
The intended prediction population should guide these choices. If the intended use includes every eligible policy-period, excluding records with a predictor that will often be unavailable in practice may make the analysis less relevant to that use. Conversely, if the model is explicitly intended only for a well-defined subset, a narrower analysis can be appropriate. The important requirement is to state the scope rather than letting exclusions define it silently.
Counting What the Rules Remove
When several rules apply, a record that fails two rules is still one excluded record. Adding the separate rule counts without checking overlap can therefore overstate the total number removed. The calculation follows the same inclusion-exclusion principle used to count overlapping sets.
Here, \(A\) and \(B\) are the sets of records failing two different rules. The intersection is subtracted because those records appear in both separate counts. For more than two rules, a table that records combinations of rule failures is often the clearest audit trail.
Worked Example: Two Rules With Overlap
A hypothetical insurer defines 1,000 eligible policy-periods for a pricing analysis. One rule excludes 80 policy-periods with a nonstandard occupancy code. A second excludes 60 with a missing roof-age field. Twenty policy-periods fail both rules. Find the number retained and the fraction of eligible records retained.
Method. Count the union of the two excluded sets, subtracting their overlap once. This avoids the common mistake of counting a record that fails both rules twice.
Let \(A\) be the nonstandard-code records and \(B\) the missing-roof-age records. Then:
The number retained is \(1{,}000 - 120 = 880\). The retained fraction is \(880/1{,}000 = 0.88\), or 88%. The excluded fraction is \(120/1{,}000 = 0.12\), or 12%.
Check. The records failing only the first rule number \(80-20=60\); those failing only the second number \(60-20=40\); and 20 fail both. Thus \(60+40+20=120\) are excluded, consistent with the union calculation.
How Exclusions Change a Summary
Removing records can change the composition of the analyzed group, even when no retained value has been altered. A useful way to see this is to split the original records into the retained and excluded groups. For an unweighted mean, the original mean is a size-weighted average of the means in those two groups.
Here, \(n_R\) and \(n_E\) are the numbers retained and excluded, \(n=n_R+n_E\), and \(\bar{y}_R\) and \(\bar{y}_E\) are their respective outcome means. This identity follows by partitioning the total outcome sum: \(\sum_{\text{all}} y_i=\sum_R y_i+\sum_E y_i=n_R\bar{y}_R+n_E\bar{y}_E\). Dividing by \(n\) gives the displayed formula. It applies to an ordinary unweighted mean of the same outcome measured on all records; it does not by itself describe weighted estimates or outcomes unavailable for some records.
If the excluded group has a different outcome average or a different mix of characteristics, the retained-sample average need not equal the full-cohort average. This difference is not automatically an error: the retained group may be the intended target. But it is important to distinguish a result for the retained group from a claim about the broader eligible cohort.
Worked Example: Excluding a Distinct Segment
A hypothetical portfolio has 700 residential policy-periods, of which 56 have a claim, and 300 small-business policy-periods, of which 72 have a claim. A rule excludes all small-business records because a predictor is not collected for that segment. Calculate the claim proportions before and after exclusion, and state what each describes.
Method. Calculate the event proportion for each defined set using claims divided by policy-periods. The common mistake is to report the retained result as if it described the original mixed portfolio.
For the full eligible portfolio, there are \(700+300=1{,}000\) policy-periods and \(56+72=128\) claims. Its claim proportion is \(128/1{,}000=0.128\), or 12.8%.
The exclusion removes all 300 small-business records, so 700 residential records remain. Their claim proportion is \(56/700=0.08\), or 8.0%. The two results differ because both the number of records and the segment composition differ. The 8.0% result describes the residential records retained for this analysis; it is not the claim proportion for the original 1,000-record portfolio.
Check using the partition identity. The residential proportion is \(56/700=0.08\), and the small-business proportion is \(72/300=0.24\). Weighting by group sizes gives \((700/1{,}000)(0.08)+(300/1{,}000)(0.24)=0.056+0.072=0.128\), matching the full-portfolio result.
Common Exclusion Rules and Their Interpretation
A rule should be assessed in context: what records does it remove, why are those records being removed, and is the resulting scope consistent with the intended prediction use? Common examples include:
- Unavailable predictor: records lacking a field needed by the chosen analysis are omitted. The remaining sample is limited to records for which that field is available.
- Invalid or inconsistent value: a record may be removed when a documented data-quality check establishes that a value cannot be used as recorded. If a value can be corrected reliably, correction may be preferable to dropping the whole record.
- Duplicate record: repeated rows may be removed when they are confirmed to represent the same intended observation. The analyst must first check that the rows are not valid repeated observations with distinct meanings.
- Extreme value: a threshold may remove unusually large or small values. An extreme observation is not necessarily erroneous; the rule can remove genuine cases that matter to the prediction task.
- Restricted operational scope: records outside a stated use case may be excluded, such as a class of products the model is not intended to score. This can be appropriate when the intended scope is clearly specified.
The rule should be described in terms of records, not just a technical action. “Removed rows with missing values” is incomplete if the analyst has not said which fields were checked, how many rows were affected, whether rules overlapped, and what kinds of records remained.
Worked Example: An Extreme Value Rule
A hypothetical model is intended to predict claim cost per policy-period. Ten eligible records have recorded costs of $100, $120, $80, $100, $100, $90, $110, $100, $1,000, and $2,000. An analyst proposes excluding costs above $500 as “outliers.” Calculate the mean before and after that rule, then assess whether the rule is justified by the information given.
Method. Sum the observed costs and divide by the number of records in each set. The common mistake is to assume that a large value is a data error merely because it is large.
The first eight costs sum to \(100+120+80+100+100+90+110+100=800\). The two larger costs sum to \(1{,}000+2{,}000=3{,}000\). Thus the total is \(800+3{,}000=3{,}800\), and the mean for all ten records is \($3{,}800/10=$380\).
Both $1,000 and $2,000 exceed $500, so the rule retains eight records. Their mean is \($800/8=$100\). The proposed exclusion therefore changes the analyzed mean from $380 to $100. This calculation does not establish that either value is erroneous. If they are valid claims and the model is meant to predict claim costs for all eligible records, excluding them removes outcomes that belong to the stated task. The analyst needs evidence for a data-quality rule or a clearly narrower target before applying the cutoff.
Check. The excluded records contribute $3,000 of the $3,800 total, so the full mean must exceed the retained mean. The calculated means, $380 and $100, satisfy that check.
A Defensible Exclusion Process
A disciplined process makes exclusions auditable and helps prevent convenience from silently changing the analysis population. It also separates the reason for a rule from its numerical consequences.
Describe which entities or records the model is meant to support. Compare each proposed rule with that scope.
State the field, threshold, time point, or record condition that triggers exclusion. Avoid vague labels such as “bad data” without an operational definition.
Report the eligible count, the count failing each rule, the combined number excluded, and the retained count. Track overlaps so records are not counted twice.
Summarize relevant characteristics of retained and excluded records where those characteristics are available. This helps explain how the analysis scope changed.
When a rule is uncertain, compare results under reasonable alternatives, such as retaining a verified extreme value or limiting the analysis to records with a clearly specified field available.
A sensitivity comparison does not make an unjustified rule acceptable. It shows whether an analytical conclusion depends on that choice. The final report should identify the rule used and state the population to which the resulting analysis applies. That documentation is part of the data design, not merely a technical appendix.
Common Mistakes
- Adding rule counts without subtracting overlap. A record failing two rules is one record removed, not two.
- Treating exclusions as neutral. A smaller sample can have a different mix of records and a different outcome summary.
- Equating extreme with erroneous. A high value may be a valid observation. Use evidence and the intended outcome definition to decide how it should be handled.
- Reporting only the final sample size. Without counts by rule and overlap, readers cannot tell how the retained set was formed.
- Generalizing beyond the retained scope. State whether a result describes all eligible records or only those satisfying the analysis rules.
Check Your Understanding
For each problem, identify what the rule removes and interpret the resulting count or summary.
- A cohort contains 600 eligible records. Rule A removes 45, Rule B removes 35, and 15 records fail both. How many records remain? (Answer: 535 records remain.)
- A hypothetical lender has 400 eligible applications: 300 with a complete income field and 100 without it. The complete-field records include 24 defaults. What default proportion is observed among the retained records, and which group does it describe? (Answer: \(24/300=0.08\), or 8.0%; it describes applications with a complete income field.)
- A study has 120 eligible units. One rule excludes 18 duplicate records, and another excludes 12 records with an invalid code; 5 records are in both counts. How many unique records are excluded, and how many remain? (Answer: \(18+12-5=25\) unique exclusions; \(120-25=95\) remain.)
- A hypothetical portfolio has 90 records with mean cost $200 and 10 records with mean cost $1,100. An analyst excludes the latter group. Find the mean before and after exclusion, and state why the result changes. (Answer: Before exclusion, \((90\times$200+10\times$1{,}100)/100=$290\); after exclusion, $200. The excluded group has a higher mean and contributes to the full-cohort result.)
- An eligible data set contains 250 records. A proposed rule excludes every outcome above $5,000, leaving 230 records. What additional information is needed before concluding that the rule improves the analysis? (Answer: Evidence that the removed outcomes are invalid or a clearly stated target limited to records below the threshold; the rule’s effect on the retained group and intended prediction scope should also be assessed.)