01 / 22

Data Quality
Assessment

Learn to identify and evaluate missingness, outliers, duplicates, and bias in datasets: the four pillars of trustworthy analysis.

Business Analytics

What Is Data Quality?

Data quality measures how well a dataset serves the purpose of the analysis it supports. High-quality data is accurate, complete, consistent, and unbiased. Poor data quality leads to flawed conclusions, costing businesses billions of dollars every year.

The Four Pillars of Data Quality Issues

Missingness
Empty cells, null values, or fields that should contain data but do not.
Outliers
Values far outside the expected range that may distort statistical results.
Duplicates
Repeated records that inflate counts and skew averages or totals.
Bias
Systematic distortion from sampling, collection, or processing methods.

Why Data Quality Matters

Dirty Data Missing, biased Analysis Models, charts Wrong Decisions Lost revenue, risk Clean Data Analysis Sound Decisions "Garbage In, Garbage Out" Data quality determines outcome quality ✕ BAD PATH ✓ GOOD PATH

Understanding Missingness

Missing data occurs when expected values are absent. We classify missingness into three types based on the mechanism that caused the data to be missing:

MCAR
Missing Completely At Random: missingness is unrelated to any variable. Safe to ignore if small.
MAR
Missing At Random: missingness depends on observed data, not the missing value itself.
MNAR
Missing Not At Random: missingness depends on the unobserved value. Most dangerous for analysis.

Detecting Outliers

An outlier is a data point that lies significantly outside the typical range. The IQR method defines outliers as values below \( Q_1 - 1.5 \cdot \text{IQR} \) or above \( Q_3 + 1.5 \cdot \text{IQR} \), where \( \text{IQR} = Q_3 - Q_1 \).

\(Q_1\)
Median
\(Q_3\)
\(Q_1 - 1.5 \cdot \text{IQR}\)
\(Q_3 + 1.5 \cdot \text{IQR}\)
Outlier Outlier Box Plot: IQR Outlier Method Points beyond the fences are flagged

The Z-Score Method

For normally distributed data, the Z-score measures how many standard deviations a value is from the mean. A common rule flags values with \( |z| > 3 \) as outliers:

IQR Method
Robust to non-normal data. Uses medians and quartiles. Preferred for skewed distributions.
Z-Score Method
Assumes normal distribution. Simple to compute. Works well when data is symmetric.

Identifying Duplicates

Duplicate records appear when data is merged from multiple sources, entered manually more than once, or copied during ETL processes. They inflate counts and distort metrics like averages, totals, and proportions.

ID Name Revenue 1001 Acme Corp
\(\$45{,}000\)
1001 Acme Corp
\(\$45{,}000\)
✕ DUP 1002 Beta Inc
\(\$32{,}000\)
1003 Gamma LLC
\(\$58{,}000\)
With duplicate: Total = \(\$180{,}000\) | Without: \(\$135{,}000\)

Recognizing Bias in Data

Bias is a systematic error that makes the data unrepresentative of the population it claims to describe. Unlike random error, bias does not cancel out with more data.

Selection Bias
The sample is not representative: surveying only social media users about internet access.
Survivorship Bias
Analyzing only successes: studying only companies that survived ignores failed ones.
Measurement Bias
Flawed instruments or leading questions that systematically shift responses one direction.

Missing vs Biased Data

Missing Data Biased Data
What it is Values are absent (null, blank) Values are present but skewed
Visibility Easy to detect programmatically Hard to detect without domain knowledge
Impact on mean Depends on mechanism (MCAR / MAR / MNAR) Systematically shifts the mean
Fix Imputation, deletion, or collection Re-sampling, weighting, or redesign
More data helps? Yes (reduces uncertainty) No (bias persists at scale)

The Data Quality Framework

Data Quality Complete- ness Accuracy Consis- tency Fairness No missing values No outlier errors No duplicates No bias

How to Assess Data Quality

1
Profile the dataset. Count rows, columns, data types, and compute summary statistics (\( \mu \), \( \sigma \), min, max).
2
Check for missingness. Calculate the percentage of nulls per column. Flag columns above the \( 5\% \) threshold.
3
Detect outliers. Use the IQR fence or Z-score method. Decide whether each outlier is an error or a genuine extreme.
4
Find duplicates. Check for exact matches and near-duplicates (fuzzy matching on names, IDs).
5
Evaluate bias. Compare your sample demographics to the known population. Look for systematic gaps.

Example: Checking Missingness

A customer survey dataset has 500 rows. You count null values per column:

Age
\(2\%\)
Income
\(18\%\)
Gender
\(1\%\)
Email
\(12\%\)
\(5\%\) threshold

Example: Outlier Calculation

Monthly sales data (in thousands): 12, 15, 14, 13, 16, 15, 14, 95. Is \( 95 \) an outlier?

1
Sort the data: \( 12, 13, 14, 14, 15, 15, 16, 95 \)
2
Find quartiles: \( Q_1 = 13.5 \), \( Q_3 = 15.5 \)
3
Compute IQR: \( \text{IQR} = 15.5 - 13.5 = 2.0 \)
4
Upper fence: \( Q_3 + 1.5 \cdot \text{IQR} = 15.5 + 3.0 = 18.5 \)
5
Compare: \( 95 > 18.5 \). Yes, 95 is an outlier.

Example: Spotting Bias

A company surveys employee satisfaction using an online-only form. Here is the response breakdown compared to the actual workforce:

Department Workforce % Survey % Gap
Office Staff 40% 72% +32%
Warehouse 35% 14% -21%
Field Sales 25% 14% -11%

Common Mistakes

✕ Deleting All Missing Rows
Dropping every row with a null can eliminate large portions of your data, especially if missingness is concentrated in certain groups.
✕ Removing All Outliers
Not every outlier is an error. Some are genuine extremes (e.g., a viral product). Investigate before removing.
✕ Ignoring Bias
Assuming your sample is representative without checking demographics against the population leads to systematically wrong conclusions.

Summary: Data Quality at a Glance

Issue Detection Remediation Risk If Ignored
Missingness Null counts, % missing Impute, collect, or drop Reduced sample size, bias
Outliers IQR fence, Z-score Investigate, cap, or remove Skewed mean, bad models
Duplicates Exact and fuzzy matching Deduplicate, merge records Inflated counts, wrong totals
Bias Demographic comparison Re-sample, weight, redesign Systematic error at scale

Question 1 of 5

A dataset column has \( 22\% \) of its values missing. These missing values all come from respondents who declined to report their income. What type of missingness is this most likely?

Question 2 of 5

Given the sorted dataset \( 5, 7, 8, 9, 11, 13, 40 \), with \( Q_1 = 7 \) and \( Q_3 = 13 \), which value is flagged as an outlier using the IQR method?

Question 3 of 5

A retail company merges data from its website and in-store systems. After merging, the total customer count jumps from 10,000 to 14,200. Which data quality issue is the most likely cause?

Question 4 of 5

A study on average household income surveys people at a shopping mall during weekday business hours. The resulting mean income is higher than the census figure. Which type of bias is most responsible?

Question 5 of 5

Which statement about data quality is FALSE?