Welcome. In our preceding lessons, we developed the mechanical skills to identify outliers and fill in missing data. We saw firsthand how a single point can warp a regression line and how mean imputation can complete a dataset. These actions, however, are not neutral; every decision to alter your raw data carries a set of consequences.
This lesson addresses that critical next step: evaluating the trade-offs of your data cleaning strategies. As a statistician, you know that there is no perfect, one-size-fits-all solution. Our goal today is to move beyond the "how" and into the "why" and "what if." We will analyze the potential costs and benefits of removing an outlier versus keeping it, and of deleting an incomplete record versus imputing a value. By working through the numerical impact of these choices in our established scenarios, you will build the judgment necessary to defend your data preparation methodology.
The Consequences of Handling Outliers
An outlier can be a nuisance, an error, or the most insightful data point you have. The decision to keep or remove it fundamentally changes the story your data tells.
-
Strategy 1: Remove the Outlier. This is often done when you believe the point is an error (e.g., data entry mistake) or represents a phenomenon so different from the rest that it doesn't belong in the same model.
- Pro: The resulting model often provides a better fit and a more stable, interpretable description for the vast majority of your data. Your statistical measures (mean, correlation) become more robust and less skewed.
- Con: You lose information. If the outlier is a legitimate, rare event, removing it renders your model blind to that reality. You might be discarding a crucial insight into a niche but important subgroup.
-
Strategy 2: Keep the Outlier. This is appropriate when you believe the outlier is a genuine reflection of the natural variation in your data.
- Pro: You retain the complete dataset, forcing your analysis to account for the full spectrum of possibilities. It may push you toward more advanced, robust methods that are less sensitive to extreme values.
- Con: The outlier can dramatically skew summary statistics and model parameters. A linear regression, for example, might be distorted to accommodate the single point, resulting in a poor fit for all other points.
Let's look at the effect of removing an outlier on a linear model.

Now, let's quantify these consequences in our scenarios.
Numerical Example 1: Bra-Fitting Business
Scenario: You are analyzing the relationship between a client's age and their typical annual spending at your bra-fitting business. You have data for 8 clients, one of whom (Client 8) is a clear outlier: a young student who received a large gift certificate and spent an unusually high amount.
Data:
| Client ID | Age (X) | Annual Spending (Y) |
|---|---|---|
| C1 | 25 | $250 |
| C2 | 30 | $320 |
| C3 | 38 | $350 |
| C4 | 45 | $410 |
| C5 | 52 | $440 |
| C6 | 60 | $480 |
| C7 | 65 | $500 |
| C8 (Outlier) | 22 | $900 |
Analysis: The Trade-off
Let's compare the mean spending and the Pearson correlation between age and spending, both with and without the outlier.
1. With the Outlier (Complete Data):
- Mean Age:
- Mean Spending:
- Using the formula for Pearson's , the correlation is . (Calculation omitted for brevity, but it's near zero).
2. Without the Outlier (Client 8 Removed):
- Mean Age:
- Mean Spending:
- The correlation for this subset is now , a near-perfect positive relationship.
Consequences:
- Keeping the outlier: The mean spending is inflated to $456.25. The relationship between age and spending is obscured (correlation is almost zero). Your conclusion would be that age has no linear relationship with spending. This might cause you to misallocate marketing resources.
- Removing the outlier: The mean spending of your "typical" client is a more representative $392.86. The analysis reveals a very strong, clear trend: as clients age, they tend to spend more. This is a powerful insight for planning loyalty programs or targeted promotions. However, by removing Client 8, you lose the information that a younger demographic can be a source of high revenue, perhaps through gift cards or special events. The practical decision is not just to delete the data, but to investigate why that outlier exists.
Numerical Example 2: Polyandrous Relationship Study
Scenario: In your study of "vee" relationships, you measure the average number of dedicated one-on-one dates per month with each partner and a relationship satisfaction score. One relationship (R5) is an outlier, reporting an extremely high number of dates but low satisfaction, possibly due to the dates being low-quality or obligatory.
Data:
| Relationship ID | Dates per Month (X) | Satisfaction (Y, 1-10) |
|---|---|---|
| R1 | 2 | 7 |
| R2 | 3 | 8 |
| R3 | 4 | 8 |
| R4 | 5 | 9 |
| R5 (Outlier) | 12 | 4 |
| R6 | 1 | 6 |
Analysis: The Trade-off
1. With the Outlier (Complete Data):
- Mean Dates:
- Mean Satisfaction:
- The Pearson correlation is , suggesting a slight, almost negligible, negative relationship.
2. Without the Outlier (Relationship 5 Removed):
- Mean Dates:
- Mean Satisfaction:
- The Pearson correlation is now , a strong positive relationship.
Consequences:
- Keeping the outlier: Your analysis would conclude that there's no meaningful linear relationship between the quantity of dates and satisfaction. You might wrongly advise that simply increasing date frequency is not a useful strategy.
- Removing the outlier: Your analysis shows a strong positive association: for most couples in your sample, more dates are linked to higher satisfaction. This is a clear, actionable finding. However, removing R5 ignores a critical piece of the puzzle: the existence of "junk food" dates. The true insight, prompted by the outlier, is that the quality of the interactions, not just the quantity, is a vital (and unmeasured) variable. The consequence of simply deleting the outlier is a simplistic and potentially misleading conclusion.
The Consequences of Handling Missing Data
In the previous lesson, we used mean imputation to create a complete dataset. The alternative is often listwise deletion, where we discard any record with a missing value. Let's compare the consequences.
-
Strategy 1: Listwise Deletion.
- Pro: Simple and transparent. If the data are Missing Completely at Random (MCAR), the remaining sample is still unbiased, although smaller.
- Con: Can drastically reduce sample size, leading to a loss of statistical power. If the data are not MCAR, this can introduce significant bias. For example, if unhappy people are more likely to have missing data, deleting them will make your sample look happier than it really is.
-
Strategy 2: Mean Imputation.
- Pro: Preserves the full sample size, maintaining statistical power.
- Con: Artificially reduces the variance of the imputed variable. It also weakens the covariance and correlation with other variables. Standard errors of estimates become artificially small, leading to overly optimistic p-values and a false sense of precision.
Let's quantify these effects using the datasets from our last lesson.
Numerical Example 1: Bra-Fitting Business (Revisited)
Original Data (with NAs): Band Tightness Preference: {7, 5, 8, 4, NA, NA, 6, 9, 5, 7}
The 8 observed values have a variance . The mean of these 8 values is 6.375.
Analysis: The Trade-off
1. After Listwise Deletion (n=8):
- The dataset only includes the 8 complete records.
- Consequence: You lose 20% of your data. Your analysis will not include any information from clients C5 and C6, who might be systematically different (e.g., if the missingness was MAR related to age).
- The variance of the
Band Tightnessvariable is simply the variance of the observed values, .
2. After Mean Imputation (n=10):
- The dataset is now: {7, 5, 8, 4, 6.375, 6.375, 6, 9, 5, 7}.
- Consequence: We have a full dataset, but let's check the new variance.
The mean remains 6.375. The sum of squared deviations for the original 8 points is . The two new imputed points have a deviation of (6.375 - 6.375) = 0. So the new total sum of squares is still 17.5.
- The variance has been artificially reduced from 2.5 to 1.94. This is the primary distortion of mean imputation. It makes the preferences seem more consistent than they really are, which could lead to under-stocking bras in less popular sizes because you've underestimated the true spread of preferences.
Numerical Example 2: Polyandrous Relationship Study (Revisited)
Original Data (with NAs): Relationship Satisfaction: {8, 6, NA, 5, 7, NA, 9, 8, 6, 4, NA, 7}
The 9 observed values have a variance . The mean of these 9 values is approximately 6.67.
Analysis: The Trade-off
1. After Listwise Deletion (n=9):
- The dataset is reduced to 9 records.
- Consequence: You lose 3 out of 12 participants (25% of your sample). This is a substantial loss of statistical power. If, for instance, those in very long-term or very new relationships were the ones not responding (MAR), your sample is now biased toward mid-length relationships. Your ability to make generalizable claims is weakened.
- The variance of
Satisfactionis .
2. After Mean Imputation (n=12):
- The imputed dataset is: {8, 6, 6.67, 5, 7, 6.67, 9, 8, 6, 4, 6.67, 7}.
- Consequence: The sample size is preserved. The original sum of squared deviations is . The three new points add 0 to this sum.
- The variance is artificially suppressed from 2.25 to 1.64. This makes the satisfaction scores in your study appear more clustered around the mean than they are in reality. This could cause you to underestimate the true diversity of experiences (from very unhappy to very happy) within these relationships.
Conclusion
Today we moved from the mechanics of data cleaning to the strategic implications of our choices. There are no easy answers, only trade-offs to be intelligently managed. Your expertise as a statistician lies not just in executing the calculation, but in understanding and articulating these consequences.
Key Takeaways:
- Handling Outliers: The core trade-off is between building a model that represents the majority versus one that encompasses all data, including rare events. Removing an outlier can clarify a common trend but may blind you to important exceptions. Keeping it can distort your model but may force a more nuanced investigation.
- Handling Missing Data: The primary trade-off is between statistical power and bias/distortion. Listwise deletion reduces power and can introduce bias if data are not MCAR. Mean imputation preserves power but artificially reduces variance and weakens relationships between variables, leading to a false sense of precision.
Your choice of strategy is not just a statistical decision but a research decision. It depends on your goals, your hypothesis about the data, and your domain knowledge.
Having now established how to prepare a clean, complete dataset, we are ready to build more powerful explanatory models. In our next lesson, we will advance from the simple two-variable correlations we've used so far and into the world of multiple linear regression, where we can analyze how several factors simultaneously influence an outcome.