Missing Data
Missing data is any value absent from a dataset where a value was expected — a survey question left blank, a sensor reading that failed to record, a database field that was never populated. The naive response is to simply exclude incomplete records or ignore the gap, but that response is only statistically safe under a specific and often unverifiable assumption about why the data is missing, which is why missing data is treated as a formal methodological problem in statistics rather than a simple data-cleaning nuisance.
Donald Rubin's 1976 classification of missingness mechanisms — missing completely at random (MCAR), missing at random (MAR), and missing not at random (MNAR) — is the foundational framework the field still uses, and the distinction between the three determines which handling methods are statistically valid and which quietly introduce bias. Data is MCAR when the probability of a value being missing has no relationship to any variable, observed or unobserved — a sensor randomly dropping readings due to a transient hardware glitch. Data is MAR when the probability of missingness depends on other observed variables but not on the missing value itself — older survey respondents being less likely to answer an online-only questionnaire, a pattern explainable by age (observed) rather than by the unrecorded answer itself. Data is MNAR when the probability of missingness depends on the missing value itself — high earners being less likely to report their income, where the very thing being measured is driving the gap in measuring it. Simple exclusion (deleting incomplete rows) is unbiased only under MCAR; under MAR or MNAR, deleting incomplete rows systematically skews the remaining dataset in a way that doesn't announce itself in the numbers.
Listwise deletion — dropping any record with even one missing field — is the simplest and most common response to missing data in practice, and it carries two costs beyond the bias risk under non-MCAR mechanisms: it discards every other, fully observed value in a dropped record along with the one that's actually missing, and it can eliminate a large share of a dataset when missingness is spread across many different fields even if no single field is missing often. A dataset where ten different fields each have 5% of values missing independently can lose nearly half its rows to listwise deletion even though no individual field looks badly incomplete, which is a counterintuitive consequence that makes listwise deletion a worse default than it initially appears.
Imputation — filling in missing values with estimated replacements rather than discarding the record — ranges from simple methods (filling with the column mean, median, or most common category) to more sophisticated ones (regression imputation, predicting the missing value from other fields in the same record; k-nearest-neighbors imputation, borrowing values from similar records; and multiple imputation, developed by Rubin in the same body of work as the MCAR/MAR/MNAR framework, which creates several plausible imputed datasets and combines results across them to properly account for the uncertainty the imputation itself introduces). Simple mean or median imputation is fast but systematically understates the dataset's true variance, since every imputed value is identical and clustered at the center of the distribution — a statistically convenient but distorting shortcut, while multiple imputation is more defensible precisely because it doesn't pretend the imputed value is known with certainty.
Missingness itself can be informative and worth encoding as its own signal rather than purely a problem to erase — in many real datasets, whether a value is missing correlates with the outcome being predicted, independent of what the value would have been had it been observed (a loan applicant who leaves the income field blank may differ systematically from one who fills it in, regardless of what their true income is). Creating an explicit "was this field missing" binary indicator alongside an imputed value is a standard technique in applied machine learning specifically to preserve this signal, since naive imputation alone discards the information carried by the missingness pattern itself.
Read missing data as a problem whose correct handling depends entirely on why a value is absent, not just that it's absent: Rubin's MCAR/MAR/MNAR framework is the test for whether a given handling method is statistically safe, listwise deletion is the default that's most often used and least often appropriate, and the field's more careful methods — multiple imputation, explicit missingness indicators — exist because both discarding incomplete records and silently filling them in with a single best guess can each, in their own way, quietly distort what a dataset actually says.