What it is
Digit preference occurs when respondents or enumerators systematically report values that end in specific digits — most commonly 0 and 5 — rather than the true distribution of last digits. A question asking for household income might produce a distribution clustered at 1000, 1500, 2000, and 2500, while the true distribution would be more spread. Similarly, age reporting in many settings shows excess mass at ages ending in 0 (30, 40, 50) because respondents do not know their exact age and round to a nearby decade.
Digit preference is sometimes called “heaping” (when values pile up at round numbers) and is related to but distinct from outlier inflation (which is about extreme values, not round values). It is widespread in self-reported numeric data in low-literacy, low-documentation settings where respondents lack precise knowledge of the true value and default to convenient approximations.
When to use it
Digit preference checks should be applied to any continuous or count variable where rounding is possible and where precision matters for analysis. The most common targets are: age and year of birth; income, expenditure, and wages; quantities of goods (grain, livestock, land); physical measurements (height, weight, blood pressure when self-reported); and time variables (hours worked, months lived somewhere).
Bound, Brown and Mathiowetz (2001) review measurement error in survey data and show that heaping in wage and hours variables biases OLS estimates of wage equations. Siegel and Swanson (2004) document the demographic implications of age heaping for age-specific rates. The Whipple index and Myers’ blended method are standard demographic tools for quantifying age heaping; similar ideas extend to economic variables.
How it works
Last-digit frequency analysis. For a variable that should have uniformly distributed last digits (exact age in years, wage in local currency), compute the frequency of each last digit (0–9). A uniform distribution would give approximately 10% for each digit. Excess mass at 0 and 5 — the most common round numbers — indicates heaping.
The Whipple index (originally developed for age data) divides the sum of respondents reporting ages ending in 0 and 5 by one-fifth of all respondents in the age range. A value of 100 indicates no heaping; values above 105 indicate mild heaping; values above 125 indicate strong heaping.
For income and expenditure variables, a similar approach computes the ratio of observed frequency at multiples of 100 (or 500, 1000) to the expected frequency under the assumption of no heaping. Plotting the empirical distribution and overlaying an expected smooth distribution visually reveals the heaping pattern.
Bendford’s Law check. For variables spanning multiple orders of magnitude (income, land area, population), the leading digit should follow Benford’s law — a logarithmic distribution where 1 is the most common first digit (30% of values) and 9 the least common. Deviations from Benford’s law indicate fabrication or systematic rounding at the order-of-magnitude level, though this is less applicable to narrow-range variables.
Key decisions
Variable selection. Not all variables are subject to meaningful heaping. Variables with a restricted range (a 1–5 Likert scale) or discrete outcomes (number of household members) do not exhibit digit preference in the same way. Focus the check on continuous variables where the true value is not precisely known and rounding is psychologically natural.
Enumerator-level breakdowns. If heaping varies substantially across enumerators — one enumerator records much more heaping than peers — this is diagnostic of that enumerator recording convenient approximations rather than asking follow-up questions to pin down the value. Enumerator-level Whipple indices are a useful enumerator quality metric.
Response to heaping. Heaping in a variable does not necessarily invalidate it for analysis. Heaping introduces classical measurement error in the heaped variable, which attenuates regression coefficients but does not produce bias if the heaping is independent of the outcome. However, if heaping is correlated with respondent characteristics (poorer respondents or those with less documentation are more likely to round), measurement error is non-classical and can produce bias. The appropriate response to heavy heaping is to document it, consider whether it is correlated with the analysis variables, and potentially recode into broader categories that are less affected.
Caveats & common mistakes
Treating heaping as only a respondent error. Enumerators contribute to heaping when they record approximate values without probing for precision. Training enumerators to probe — “you said about 2000, can you tell me more precisely?” — and using interviewer-administered calculators for income modules reduces enumerator-induced heaping.
Ignoring heaping in derived variables. Age heaping distorts age-specific rates (mortality, fertility, enrolment) even when the analysis variable is derived from the heaped raw measure. Checking for heaping in the input variable and documenting its implications for derived measures is important.
Confusing heaping with bunching. Bunching occurs when there are genuine economic reasons for respondents to cluster at specific values — the minimum wage is an example, where true wages can genuinely bunch at the statutory minimum. Bunching at economically meaningful round numbers should not be automatically corrected as heaping.
Analysis Guide
import pandas as pd
import numpy as np
from scipy import stats
import matplotlib.pyplot as plt
# age: continuous age variable; income: continuous income variable
# 1. Last-digit frequency for age — a variable with no rounding should have
# each last digit (0 to 9) appearing roughly 10 percent of the time;
# excess mass at 0 and 5 is the signature of respondents or enumerators
# defaulting to round numbers rather than reporting precise values
df['last_digit'] = df['age'].astype('Int64') % 10
observed = df['last_digit'].value_counts().sort_index()
expected = np.full(10, observed.sum() / 10)
chi2, p = stats.chisquare(f_obs=observed, f_exp=expected)
print(observed / observed.sum(), 'chi2=', chi2, 'p=', p)
# 2. Whipple index — formalises the last-digit check for ages 23 to 62 by
# comparing the observed count of 0s and 5s to the expected count under
# a uniform distribution; values above 125 indicate systematic rounding
# severe enough to distort age-specific rates
age_range = df['age'].between(23, 62)
n_05 = ((df.loc[age_range, 'age'] % 10).isin([0, 5])).sum()
n_total = age_range.sum()
whipple = (n_05 / (n_total / 5)) * 100
print('Whipple index:', round(whipple, 1))
# 3. Income heaping — share of values that are exact multiples of 100 or 1000;
# high shares mean artificial precision loss that attenuates regression
# coefficients in income-based estimates
print('Share rounds to 100:', (df['income'] % 100 == 0).mean())
print('Share rounds to 1000:', (df['income'] % 1000 == 0).mean())
# 4. Histogram to visualise heaping — visible spikes at round values confirm
# the quantitative diagnostics and communicate severity more intuitively
# than summary statistics
df['income'].plot.hist(bins=range(0, int(df['income'].max()) + 100, 100))
plt.title('Income distribution'); plt.show()
# 5. By enumerator — rank enumerators by share of ages ending in 0 or 5;
# outliers at the top are failing to probe for precise values and should
# be retrained or back-checked
enum_round = (df.assign(round_05=(df['age'] % 10).isin([0, 5]))
.groupby('enum_id')
.agg(pct_round_05=('round_05', 'mean'), n=('round_05', 'size'))
.sort_values('pct_round_05', ascending=False))
print(enum_round.head(10)) Reading the output
- Whipple index < 105: acceptable heaping (close to what random rounding would produce). 105–125: moderate heaping, worth documenting. > 125: strong heaping, indicates systematic rounding that may bias age-specific rates.
- Under a uniform last-digit distribution, each digit should appear about 10% of the time. A last digit of 0 or 5 appearing more than 20–25% of the time combined signals meaningful heaping.
- For income: if more than 40% of values are exact multiples of 100, or more than 20% are exact multiples of 1000, heaping is likely inflating measurement error in income-based estimates.
- Enumerator-level Whipple indices substantially above the survey median (e.g., more than 20 points higher) indicate that specific enumerators are recording approximate rather than precise values — follow up with enumerator-specific training or back-checks.
- If the histogram of a continuous variable shows visible spikes at round numbers (1000, 2000, 5000), this is confirmatory visual evidence of heaping that should be reported alongside the quantitative diagnostics.
References
Bound, J., Brown, C., & Mathiowetz, N. (2001). Measurement error in survey data. In J. J. Heckman & E. Leamer (Eds.), Handbook of Econometrics, Vol. 5 (pp. 3705–3843). Elsevier.
Siegel, J. S., & Swanson, D. A. (Eds.). (2004). The Methods and Materials of Demography (2nd ed.). Elsevier.