Data Quality
Issues
Learn to identify and handle missing data, outliers, and measurement errors that compromise statistical analysis.
What Is Data Quality?
Data quality measures how well a dataset serves its intended purpose. High-quality data is accurate, complete, consistent, and timely. When any of these properties break down, the conclusions we draw from statistical analysis become unreliable.
The Three Core Problems
Why Data Quality Matters
Types of Missing Data
Handling Missing Data
What Is an Outlier?
An outlier is a data point that lies significantly outside the typical range of values. Formally, using the IQR method, a value is an outlier if it falls below \( Q_1 - 1.5 \times \text{IQR} \) or above \( Q_3 + 1.5 \times \text{IQR} \), where \( \text{IQR} = Q_3 - Q_1 \).
Detecting Outliers
Outliers vs. Errors
| Outlier (Legitimate) | Error (Data Quality Issue) | |
|---|---|---|
| Source | Natural variation or rare event | Typo, sensor malfunction, or wrong unit |
| Example | A \(\$2\text{M}\) home in a \(\$300\text{K}\) neighborhood | Age entered as 999 instead of 29 |
| Action | Keep but note its influence | Correct or remove |
| Effect on \(\bar{x}\) | Shifts mean but reflects reality | Shifts mean in a misleading direction |
Measurement Issues
Effect on Key Statistics
Consider a dataset of 10 employee salaries (in thousands): \( 35, 38, 40, 42, 44, 45, 47, 50, 52, 55 \). The mean is \( \bar{x} = 44.8 \) and the median is \( 44.5 \).
The IQR Rule Formally
Data Quality Checklist
Example 1: Finding Outliers
A store records daily sales (in units): \( 12, 15, 14, 13, 16, 15, 14, 42, 13, 15, 14, 16 \). Identify outliers using the IQR method.
Example 2: Handling Missing Data
A customer satisfaction survey has 500 responses. The "household income" field is blank for 80 respondents (16% missing). Analysis shows that younger respondents (< 25) are twice as likely to skip this question.
Example 3: Measurement Error
A warehouse logs package weights in kilograms. One clerk enters weights in pounds by mistake. The dataset contains: \( 2.3, 2.1, 4.8, 2.5, 2.2, 5.1, 2.4, 4.6, 2.3, 2.0 \) kg.
Common Mistakes
Summary Comparison
| Missing Data | Outliers | Measurement Error | |
|---|---|---|---|
| What is it? | Absent values | Extreme values | Incorrect values |
| Detection | Count blanks, check patterns | IQR, z-score, box plots | Domain knowledge, unit checks |
| Best Fix | Multiple imputation | Investigate, then decide | Correct at the source |
| Risk if Ignored | Biased sample | Skewed \(\bar{x}\) and \(s\) | Systematically wrong results |
Let's Practice
Time to test your understanding of data quality issues. The following 5 questions cover missing data, outliers, and measurement errors.
Question 1 of 5
A dataset has \( Q_1 = 20 \), \( Q_3 = 40 \). Using the IQR method, what is the upper fence for outlier detection?
Question 2 of 5
In a medical study, patients with severe symptoms are less likely to complete follow-up surveys. The missing data mechanism is most likely:
Question 3 of 5
Replacing all missing values with the column mean \( \bar{x} \) is problematic primarily because it:
Question 4 of 5
A scale consistently reads 1.5 kg too high. This is an example of:
Question 5 of 5
Which measure of center is most resistant to the influence of outliers?