Open StatClinic →
🔎 Data Quality & Diagnostics

How to Detect and Handle Outliers
in Medical Research Data

🕑 25 min read 📅 July 2026 ✅ Peer-reviewed content 📚 3700+ words
S
StatClinic Editorial Team Statistical content for medical researchers and clinicians
A single erroneous value in a dataset of 40 patients changed a published regression finding from statistically significant to non-significant — a result that influenced clinical guideline recommendations for three years before a reanalysis caught the discrepancy. In another case, a serum ferritin value of 164 µg/L in an iron-deficiency anaemia study went unquestioned and inflated the group mean by 8.2 µg/L, masking a genuine treatment effect. Outliers in medical research data are not merely a statistical nuisance — they are clinically consequential. They can arise from data entry errors, instrument malfunction, transcription mistakes, or represent genuine extreme biological values in patients at the tail of the clinical distribution. The appropriate response depends entirely on the source: errors should be corrected; genuine extreme measurements must be retained and reported. What is never acceptable is silent removal — dropping inconvenient values without documentation or justification. This article covers every major method for detecting outliers, a framework for deciding how to handle them, and the reporting standards that make your decisions transparent and reproducible.

What Is an Outlier?

An outlier is an observation that deviates markedly from the other values in a dataset — but this definition conceals important distinctions that determine the correct analytical response. In clinical research, it helps to distinguish three overlapping categories:

The conceptually critical question is always: Is this value the result of a mistake, or is it a genuine measurement of a real patient? A BMI of 68 in a bariatric surgery outcomes study is extreme but real — it must be included. A BMI of 680, on the other hand, is a data entry error — it must be corrected. The detection methods that follow identify outlier candidates; the decision about what to do with them requires investigation of the original source record.

The three types of outlier origin: (1) Error outliers — arise from data entry mistakes, transcription errors, instrument malfunction, laboratory processing failures, or unit recording errors (e.g., recording weight in lbs when the field expects kg). These should be corrected to the true value or excluded if the true value cannot be recovered. (2) Genuine extreme observations — biologically real but statistically rare values at the far end of the clinical distribution. These should be retained. (3) Influential observations — values that substantially change model estimates; may or may not be errors; always require sensitivity analysis regardless of origin.

Detection Methods

No single detection method is universally superior. A practical approach uses visual inspection first, followed by at least one quantitative method matched to the data’s distributional shape. The goal of detection is to flag candidates for investigation, not to justify automatic removal.

Visual

Boxplot & Histogram

Boxplot displays the IQR, median, and whiskers extending to the Tukey fence (1.5×IQR). Points beyond the whiskers are plotted individually as potential outliers. Histogram shows the overall distribution shape — long tails, gaps, or isolated bars reveal outliers at a glance.

First step for every continuous variable. Essential for all data.
Visual

Q-Q Plot

Quantile-quantile plot compares the observed distribution against a theoretical normal distribution. Outliers appear as points that deviate sharply from the diagonal reference line at one or both ends — particularly useful for identifying extreme observations that distort normality.

Use alongside histogram for normality assessment and outlier identification simultaneously.
Univariate — Parametric

Z-Score Method

Converts each value to standard deviation units from the mean: z = (x​ᵢ − x̄) / s. Values with |z| > 3 are flagged. Standard threshold assumes normality. The Z-score uses the mean and SD — both distorted by the very outlier being evaluated (masking), making it less reliable for skewed data or multiple outliers.

Use for approximately normal distributions with no suspected multiple outliers.
Univariate — Non-parametric

IQR Method (Tukey Fences)

Uses quartile-based fences immune to distortion by extremes. Mild outlier fences: Q1 − 1.5×IQR to Q3 + 1.5×IQR. Extreme fences:  ± 3.0×IQR from Q1/Q3. Robust to skewed distributions and not affected by the masking problem. The standard method underlying boxplot displays.

Recommended for skewed clinical data (LOS, lab values, pain scores, counts).
Univariate — Robust

Modified Z-Score (MAD)

Replaces mean/SD with median (x̃) and Median Absolute Deviation (MAD): MAD = median(|x​ᵢ − x̃|); M​ᵢ = 0.6745×(x​ᵢ − x̃)/MAD. Flag: |M​ᵢ| > 3.5. The 0.6745 factor ensures M ≈ z under normality. Most robust univariate method — immune to masking by multiple outliers.

Preferred when multiple outliers may be present or distribution is non-normal.
Univariate — Formal Test

Grubbs Test

Formally tests whether the most extreme value in a dataset is a statistically significant outlier: G = max|x​ᵢ − x̄| / s. Compares to a critical value adjusted for sample size. Assumptions: single outlier; approximately normal distribution. Extended versions (ESD — Extreme Studentized Deviate) handle multiple suspected outliers sequentially.

Use when a formal test with a p-value is required for reporting (e.g., laboratory QC).
Regression Diagnostics

Cook’s Distance

Measures how much all fitted values (regression model estimates) change when observation i is deleted. D​ᵢ = (e​ᵢ²/(p×MSE)) × h​ᵢᵢ/(1−h​ᵢᵢ)². Threshold: D > 4/n (flag) or D > 1 (serious). Combines the observation’s leverage (extreme X) and residual (extreme Y) into one influence measure.

Essential diagnostic for all linear and logistic regression models.
Multivariate

Mahalanobis Distance

Detects multivariate outliers — unusual combinations of values across multiple variables. MD = √((x−μ)ᵀ Σ⁻¹ (x−μ)). Follows χ²(df=p) distribution; flag if MD exceeds χ² critical value at α=0.001. Accounts for correlations between variables; univariate methods miss these cases entirely.

Use for multiple regression, structural equation modelling, cluster analysis, or any multivariate procedure.

Z-Score and IQR Formulas

Z-Score Outlier Detection
z​ᵢ = (x​ᵢ − x̄) / s    Flag: |z| > 3.0 (or > 2.5 for n < 50)
Masking risk: inflated SD hides true Z of the outlier. Use IQR method when outliers are suspected.
Tukey IQR Fences
IQR = Q3 − Q1
Mild fences: Q1 − 1.5×IQR    to    Q3 + 1.5×IQR
Extreme fences: Q1 − 3.0×IQR    to    Q3 + 3.0×IQR
Values beyond mild fences are plotted as points beyond boxplot whiskers. Robust to skew and masking.
Modified Z-Score (Iglewicz & Hoaglin, 1993)
MAD = median(|x​ᵢ − x̃|)
M​ᵢ = 0.6745 × (x​ᵢ − x̃) / MAD    Flag: |M​ᵢ| > 3.5
x̃ = median • Most robust univariate method • Preferred for non-normal and small samples

When to Remove, Correct, or Keep Outliers

Detection identifies candidates; decision-making requires investigation. Always return to the original data source — the case record, laboratory report, or raw data file — before making any decision about an outlier.

❌ Remove or Correct When…

  • Original source document shows a different value (transcription error)
  • The value is biologically impossible (BMI = 0, age = −3, SBP = 800)
  • Laboratory log documents instrument failure for that assay run
  • The patient should not have been enrolled (revealed by outlier value)
  • Unit recording error confirmed (weight recorded as lbs, field expected kg)
  • Field duplication — value is a repeated row in the database

✅ Keep and Report When…

  • The value is extreme but biologically plausible for the population
  • No documentation of error in the source record
  • The extreme value is clinically important to the research question
  • The outlier represents a high-risk patient subgroup relevant to the findings
  • Removing it would introduce selection bias toward less severe presentations
  • Confirmed by independent verification (re-measurement, repeat test)
The sensitivity analysis obligation: Regardless of whether you remove or retain an outlier, you must report a sensitivity analysis — the analysis both with and without the outlier — for any primary outcome where the outlier may influence results. If results are consistent across both analyses, report the primary analysis with the outlier included and note the sensitivity result in a footnote or supplementary table. If results diverge (different direction or significance), both must be reported in the main text with a full explanation. Divergent sensitivity results are not a problem to hide — they are important scientific information about the fragility of the finding.

Effect of Outliers on Statistical Analysis

Statistic / TestHow Outliers Distort ItImpactRobust Alternative
Mean (x̄) Pulled toward the outlier; inflated or deflated by a single value; no upper bound on distortion High Median (x̃)
Standard Deviation (s) Inflated by extreme values; reflects distance from the pulled mean; artificially increases spread High IQR or MAD
Cohen’s d Inflated SD reduces d (underestimates effect size); can mask a genuine between-group difference High Rank-biserial r
Pearson r A single bivariate outlier can change r from 0.05 to 0.70 or eliminate a genuine correlation; worst sensitivity of any common statistic Very High Spearman ρ
Independent t-test Inflated SD reduces t-statistic; genuine effects become non-significant; also violates normality assumption if n is small High Mann-Whitney U
ANOVA F-test Inflated residual variance (MSE) reduces F-statistic and power; increases Type II error rate Medium Kruskal-Wallis
Linear Regression High-leverage outliers change slope direction; inflate or deflate SE; alter p-values; may flip significance Very High Robust regression (M-estimators)
Median (x̃) Robust — unaffected by any single extreme value; unchanged unless outlier displaces the middle observation Minimal — (already robust)
Spearman ρ Rank transformation greatly reduces outlier influence; outlier becomes the most extreme rank (n or 1) rather than an extreme value Low — (already robust)

Clinical Examples

1
Serum Ferritin in Iron-Deficiency Anaemia: Transcription Error Detected and Corrected
A researcher is analysing serum ferritin (µg/L) in 62 women with confirmed iron-deficiency anaemia (haemoglobin <11.5 g/dL; serum ferritin <30 µg/L at screening). During data cleaning, one value of 164 µg/L is flagged. The clinical context: ferritin 164 µg/L would suggest iron overload, not deficiency — inconsistent with confirmed anaemia diagnosis.
62
Sample n
18.4 µg/L
Group mean (incl. outlier)
11.2 µg/L
Group SD (incl. outlier)
164 µg/L
Flagged value
Step 1 — Z-Score Method z = (164 − 18.4) / 11.2 = 145.6 / 11.2 = 13.00 Threshold: |z| > 3.0 → FLAGGED (z = 13.00 is extreme) Note: SD is already inflated by this outlier — true z even higher Step 2 — IQR Method (Tukey Fences) Q1 = 10.2 µg/L, Q3 = 24.6 µg/L IQR = 24.6 − 10.2 = 14.4 µg/L Mild upper fence = 24.6 + 1.5 × 14.4 = 24.6 + 21.6 = 46.2 µg/L Extreme upper fence = 24.6 + 3.0 × 14.4 = 24.6 + 43.2 = 67.8 µg/L Observed value: 164 µg/L >> extreme upper fence (67.8 µg/L) → Flagged as extreme outlier by both methods Step 3 — Modified Z-Score Confirmation Median (x̃) = 16.8 µg/L MAD = median(|xᵢ − 16.8|) = 5.4 µg/L (computed from full dataset) M₁₆₄ = 0.6745 × (164 − 16.8) / 5.4 = 0.6745 × 27.26 = 18.38 Threshold: |M| > 3.5 → FLAGGED (M = 18.38) Step 4 — Source Record Investigation Chart review of the original laboratory report: ferritin = 16.4 µg/L Database entry: 164 µg/L → decimal point omitted during data entry Action: CORRECT to 16.4 µg/L (error, not a genuine observation) Step 5 — Impact of Correction on Descriptive Statistics Before correction: mean = 18.4 µg/L, SD = 11.2 µg/L, median = 16.8 µg/L After correction: mean = 16.2 µg/L, SD = 6.3 µg/L, median = 16.7 µg/L [Mean dropped 2.2 µg/L; SD halved — the outlier had been inflating SD by 77%]
The value 164 µg/L was flagged as a transcription error (confirmed: original record showed 16.4 µg/L) and corrected. The corrected dataset showed mean ferritin 16.2 µg/L (SD 6.3), compared to 18.4 µg/L (SD 11.2) before correction. The 77% reduction in SD substantially improved the power of the planned t-test comparison.
Key lesson — errors must be corrected, not excluded: The correct action here is to amend the value to 16.4 µg/L, not to delete the observation. Deleting would reduce n from 62 to 61 and lose a genuine patient’s data. The source record is the gold standard — whenever a flagged value can be verified against the original lab report, GP record, or case report form, the true value should be substituted. Document the correction in a data cleaning log: “Patient ID 047: serum ferritin corrected from 164 µg/L to 16.4 µg/L per original laboratory report (data entry error).” This log should be retained as part of the study’s audit trail.
2
BMI in Bariatric Surgery Outcomes: Genuine Extreme Value Retained
An outcomes study of n = 45 patients undergoing laparoscopic sleeve gastrectomy examines length of hospital stay (LOS, days) in relation to preoperative BMI. One patient has BMI = 68.3 — flagged by the boxplot as a potential outlier. All other BMIs range from 34.8 to 56.4.
45
Sample n
43.1
Mean BMI (SD 7.8)
68.3
Flagged BMI
3.23
Z-score
Step 1 — Univariate Detection Z-score: z = (68.3 − 43.1) / 7.8 = 25.2 / 7.8 = 3.23 → FLAGGED (|z| > 3.0) IQR check: Q1 = 38.2, Q3 = 46.7, IQR = 8.5 Upper mild fence = 46.7 + 1.5 × 8.5 = 46.7 + 12.75 = 59.45 Upper extreme fence = 46.7 + 3.0 × 8.5 = 46.7 + 25.50 = 72.20 BMI 68.3 > mild fence (59.45) but < extreme fence (72.20) → Mild-to-moderate outlier; not at extreme fence level Step 2 — Source Record Investigation Chart review: preoperative weight 178.6 kg, height 162 cm BMI = 178.6 / (1.62)² = 178.6 / 2.624 = 68.1 ≈ 68.3 (measurement rounding) Clinical note confirms Class IV super-obesity; patient enrolled per eligibility criteria BMI recording: CONFIRMED GENUINE (no error) Step 3 — Decision: RETAIN (genuine extreme clinical measurement) Super-obesity (BMI ≥ 50) is a known high-risk subgroup in bariatric surgery Excluding this patient would underrepresent the most severe cases — which is precisely the population where outcomes are most clinically relevant Step 4 — Analytical Adjustments Primary analysis: Mann-Whitney U (non-parametric, robust to outlier) LOS: median 4.0 (IQR 3–6) vs comparison group median 3.0 (IQR 2–4) Mann-Whitney U = 287, z = 2.14, p = 0.032, rank-biserial r = 0.24 Sensitivity analysis (excluding BMI 68.3): LOS: median 3.5 (IQR 3–5) vs 3.0 (IQR 2–4) Mann-Whitney U = 261, z = 1.98, p = 0.048, r = 0.20 → Results consistent in direction and significance; difference is marginal Additional: ANCOVA controlling for BMI as covariate confirms primary result unchanged
BMI 68.3 was confirmed as a genuine clinical measurement (Class IV super-obesity, verified against source record) and retained in all analyses. Non-parametric analysis was selected given the skewed BMI distribution. Sensitivity analysis excluding this observation yielded consistent results (p = 0.048 vs 0.032). Both results are reported transparently.
Why removing this patient would be scientific misconduct: In a bariatric surgery outcomes study, patients with super-obesity (BMI ≥ 50) represent a clinically important high-risk subgroup. Removing them because they are statistically extreme would produce a dataset that systematically understates the association between BMI and LOS — the opposite of what the study aims to establish. Genuine extreme observations represent real clinical variation that must be represented in the literature. The appropriate response is not removal but robust statistical methods (non-parametric tests, quantile regression, or covariate-adjusted models) that are less sensitive to extreme values, combined with transparent sensitivity analysis. Note also that the choice of Mann-Whitney U over t-test was doubly justified: BMI itself was skewed, and LOS data almost always follows a right-skewed distribution in surgical populations.
3
Regression Influential Observation: Cook’s Distance Changes Everything
A diabetes researcher regresses HbA1c (%) on self-reported exercise hours per week in n = 42 patients with Type 2 diabetes. The regression appears significant. One patient (ID 31) reports 12 exercise hours/week but has HbA1c = 9.8% — unexpectedly high for a very active patient. The researcher is preparing to publish the result but first runs standard regression diagnostics.
42
Sample n
β = −0.41
Slope (with patient 31)
p = 0.041
p-value (with patient 31)
R² = 0.098
Variance explained
Step 1 — Identify the Unusual Observation Patient 31: Exercise = 12 hrs/week (high — 3rd highest in sample) HbA1c = 9.8% (high — above the sample mean of 7.4%) Standardised residual: e_31 = 9.8 − (intercept + β×12) = 9.8 − 6.89 = 2.91 Threshold: |e| > 2 → FLAGGED as regression outlier (large residual) Leverage: h₃₁ = 0.18 (extreme X value with few neighbours at 12 hrs/week) High leverage + large residual = high influence Step 2 — Cook's Distance Cook's D formula (simplified): D₃₁ = (e²₃₁ / (p × MSE)) × h₃₁/(1 − h₃₁)² = (8.47 / (2 × 1.38)) × 0.18/(0.82)² = (8.47 / 2.76) × 0.18/0.672 = 3.069 × 0.268 = 0.822 Threshold: D > 4/n = 4/42 = 0.095 → INFLUENTIAL D > 1.0 → NOT reached, but D = 0.822 is very close Step 3 — Sensitivity: Regression Excluding Patient 31 Without Patient 31 (n = 41): β = −0.28, SE = 0.22, t(39) = −1.27, p = 0.212, R² = 0.039 Compare: With patient 31: β = −0.41, p = 0.041, R² = 0.098 Without patient 31: β = −0.28, p = 0.212, R² = 0.039 The statistically significant result (p = 0.041) depends on ONE patient. Step 4 — Clinical Investigation of Patient 31 Chart review: medication change (corticosteroid course for COPD exacerbation) during the measurement period — corticosteroids induce transient hyperglycaemia This patient's HbA1c reflects steroid effect, not exercise non-response Decision: Flag in results; include sensitivity analysis; note steroid confounding [Documentation: "Patient 31: HbA1c 9.8% during a 6-week corticosteroid course; this observation has Cook's D = 0.82 and results are reported both with and without."]
Cook’s Distance identified Patient 31 as highly influential (D = 0.82). Chart review revealed a corticosteroid course during the measurement period, explaining the discordant HbA1c. The primary regression (β = −0.41, p = 0.041) changed to non-significant (β = −0.28, p = 0.212) without this patient. Both results are reported with the clinical explanation. Conclusions are appropriately cautious.
The critical role of regression diagnostics: Without Cook’s distance analysis, this researcher would have published a statistically significant result (“exercise significantly reduces HbA1c, β = −0.41, p = 0.041”) that was entirely driven by one patient whose high HbA1c was caused by corticosteroids, not by failure to exercise. Regression diagnostics — Cook’s distance plot, leverage plot, standardised residual plot — are not optional quality checks; they are a core part of every regression analysis. SPSS produces these plots automatically under Regression → Plots → standardised residuals and influence statistics. In R, plot(model) generates Cook’s distance, leverage, and Q-Q plots in one call. The appropriate final conclusion acknowledges the fragility of the association and recommends a larger confirmatory study.

Thesis Writing Recommendations

Outlier handling is one of the areas most scrutinised by thesis examiners and journal peer reviewers, because it is also one of the most commonly manipulated (intentionally or inadvertently) in published research. Transparent, documented, pre-specified handling is the standard.

In the Statistical Analysis Section

State the detection method(s) used and the criterion for flagging. State the decision rule for retention vs exclusion. Reference the source record investigation. If you planned to use the IQR method and then switched to the modified Z-score after seeing the data, report both and explain why.

Model Outlier Detection Paragraph — Methods Section
“Potential outliers in continuous variables were identified using the Tukey IQR method (values beyond Q1 − 1.5×IQR or Q3 + 1.5×IQR) and confirmed by visual inspection of boxplots and Q-Q plots. All flagged values were cross-verified against original source documents (laboratory reports and case notes). Outliers attributable to confirmed transcription or data entry errors were corrected to the documented true value. Genuine extreme observations were retained in primary analyses. For all outcomes where flagged observations were present, sensitivity analyses were conducted with and without these observations and results are reported in Supplementary Tables.”
Model Results Paragraph — Outlier Disclosure
“Data cleaning identified two observations requiring attention: (1) Patient 047 had a serum ferritin value of 164 µg/L, which was confirmed as a transcription error upon review of the original laboratory report (true value: 16.4 µg/L) and was corrected accordingly. (2) Patient 031’s HbA1c (9.8%) was identified as a highly influential observation (Cook’s D = 0.82) in the regression analysis; chart review revealed a concurrent corticosteroid course. This value was retained in the primary analysis and a sensitivity analysis excluding this participant is reported in Supplementary Table 3. The primary regression result changed from significant (β = −0.41, p = 0.041) to non-significant (β = −0.28, p = 0.212) in the sensitivity analysis.”

Common Mistakes

Mistake 1: Removing Outliers Without Investigating Their Source

The most consequential error: flagging a value as an outlier by Z-score or IQR and removing it from the dataset without checking whether it is a genuine measurement or an error. A ferritin of 164 µg/L may be a decimal error (true value 16.4); it may also be a real result in a patient with iron overload who was inadvertently enrolled. These two scenarios require opposite responses — correction vs retention — and the distinction can only be made by reviewing the source record.

Fix: Treat every flagged value as a hypothesis to investigate, not a confirmed error to delete. Return to the original source document — the lab report, case record, or CRF — for every flagged value. Document the investigation and its outcome in a data cleaning log retained with the study files.

Mistake 2: Using Z-Score on Non-Normal or Small Samples

The standard Z-score method assumes approximate normality. Applied to right-skewed clinical data (creatinine, LOS, viral loads, CRP), it systematically fails in two ways: (1) the high-end outliers deflate toward non-significance because the large SD absorbs them (masking); (2) values on the compressed left tail may be flagged as “outliers” spuriously. For n < 30, extreme observations have large leverage on both x̄ and s, further distorting Z-scores.

Fix: For skewed distributions, use the IQR method or modified Z-score (MAD-based). For n < 30, the modified Z-score is the recommended primary method. Always accompany any quantitative detection method with a boxplot and Q-Q plot visual inspection.

Mistake 3: Reporting Only the Analysis Without the Outlier

When an outlier is removed (or when its removal was found to change the result), some researchers report only the “clean” analysis that produced the significant p-value and mention the outlier handling only in a footnote — or not at all. This is selective reporting, a form of p-hacking. If an outlier’s removal changes whether a result is significant, this change must be reported in the main text, not hidden.

Fix: Pre-register the outlier handling decision rule before data collection. Report sensitivity analyses in the main Results section alongside the primary analysis. If results diverge between analyses (with vs without outlier), both must appear in the main text. Consistent results can be reported as: “Sensitivity analysis excluding [n] outlying observations yielded consistent conclusions (Supplementary Table X).”

Mistake 4: Ignoring Regression Diagnostics Entirely

Many researchers run linear or logistic regression, check the model’s overall p-value and R², and report the result — without ever examining Cook’s distance, leverage plots, or standardised residual plots. This is analytically negligent: a significant regression can depend entirely on one or two influential observations, and the model’s apparent fit can be entirely driven by extreme points rather than a genuine population-level association.

Fix: For every regression model, generate and examine: (1) Standardised residual plot vs fitted values; (2) Normal Q-Q plot of residuals; (3) Cook’s distance plot. In SPSS: Analyze → Regression → Plots and Save → tick Cook’s, leverage, DfFit. In R: plot(model) produces all four diagnostic plots. Flag any observation with Cook’s D > 4/n and investigate its source record.

Mistake 5: Winsorizing Without Reporting It

Winsorizing replaces extreme values with the nearest non-outlying value (e.g., replacing all values above the 95th percentile with the 95th percentile value). This is a legitimate technique for robustifying analyses, but only when pre-specified and reported. Applying Winsorization post-hoc to achieve significance, or without disclosure, is outcome manipulation. Some researchers also confuse Winsorizing (replacement) with trimming (deletion) and apply the wrong method for their analysis.

Fix: If you choose to Winsorize, pre-specify the threshold (e.g., 5th and 95th percentile), report it explicitly in the Statistical Analysis section, and justify the decision clinically. “Values in the top 5% of the creatinine distribution were Winsorized at the 95th percentile value (creatinine 312 µmol/L) to reduce the influence of extreme renal impairment on continuous outcome analyses.” Always also report the unwinsorized result in supplementary material.

Mistake 6: Failing to Check for Multivariate Outliers Before Regression

Univariate outlier detection (Z-score, IQR, boxplot) checks each variable individually. It cannot detect observations that are unusual because of their combination of values across multiple variables — a patient with normal weight and normal height, but a combination suggesting a BMI inconsistent with both measurements, for example. In multiple regression with 4+ predictors, Mahalanobis distance screening is essential and frequently omitted from thesis analyses.

Fix: Before any multiple regression analysis, compute Mahalanobis distance for all cases. In SPSS: in the Regression Save dialog, tick Mahalanobis Distance — it saves MD as a new variable; chi-squared critical value with df = p predictors at α = 0.001 is the flagging threshold. In R: mahalanobis(data, colMeans(data), cov(data)). Report flagged cases and their clinical context.

Scientific Reporting Standards

Practical Guidance

Use Multiple Detection Methods in Parallel

No single detection method identifies all types of outliers. Apply at least two methods: (1) boxplot visual inspection as a mandatory first step for all continuous variables; (2) IQR method for the primary quantitative flag (robust to skew and masking); (3) modified Z-score as a secondary confirmation when multiple outliers are suspected. For regression models, Cook's distance and standardised residual plots are non-negotiable regardless of what univariate methods showed.

Create a Data Cleaning Log Before Analysis

Before running any inferential analyses, create a dedicated data cleaning log — a spreadsheet or R/SPSS script comment block — that records: every flagged observation, the detection method that flagged it, the result of the source record investigation, and the action taken (corrected, retained, excluded, Winsorized). This log becomes part of the study’s audit trail and is essential if a reviewer or examiner asks you to justify a handling decision made months earlier.

Choose Robust Statistical Methods When Outliers Are Genuine

When genuine extreme values cannot be removed, switch from parametric to robust methods: Spearman ρ instead of Pearson r; Mann-Whitney U instead of t-test; Kruskal-Wallis instead of ANOVA; median regression (quantile regression) instead of OLS; robust M-estimator regression (rlm() in R, or the MASS package) instead of standard OLS. These methods are not inferior — they are more appropriate when outliers represent genuine clinical variation that must not be discarded.

Always Report the Sensitivity Analysis in the Main Text

If a sensitivity analysis (with vs without the outlier) produces different conclusions, both analyses belong in the main Results section — not in a supplementary table that most readers will not examine. Frame it explicitly: “The primary analysis including all participants showed… A pre-specified sensitivity analysis excluding [n] participants with extreme values on [variable] yielded… [consistent / divergent] results.” Consistent results strengthen the finding; divergent results inform readers about the fragility of the conclusion.

Check Clinical Plausibility, Not Just Statistical Extremity

The most reliable outlier check in medical research is often not statistical — it is clinical. Before running any detection algorithm, share the data summary with a clinician who knows the study population. A ferritin of 164 µg/L is immediately suspect in iron-deficiency anaemia; a GFR of 4 mL/min in a healthy volunteer population is obviously impossible. Clinical subject-matter expertise catches errors that pure statistical screening misses, particularly when a plausible-looking value is actually biologically inconsistent with the inclusion criteria.

Run Cook’s Distance for Every Regression Model You Report

Cook’s distance is a five-minute diagnostic in any software package, and the consequences of missing a highly influential observation can invalidate an entire published finding. Make it a personal rule: no regression result is submitted or presented without a Cook’s distance plot reviewed and documented. If any observation has D > 4/n, it must be investigated — source record reviewed — before the result is reported. This is not optional quality assurance; it is analytical completeness.

Frequently Asked Questions

What is an outlier in medical research data? +
An outlier is an observation that deviates markedly from other values in the dataset. Three types matter clinically: (1) Error outliers — data entry mistakes, transcription errors, instrument malfunction, or unit recording errors that produce impossible or highly implausible values. These should be corrected or removed. (2) Genuine extreme observations — biologically real but statistically rare measurements at the tail of the clinical distribution. These should be retained. (3) Influential observations — values that disproportionately affect statistical model estimates, detected by Cook’s distance or leverage in regression. Each type requires a different response; the key question is always whether the value reflects a mistake or a real patient.
What is the Z-score method for detecting outliers? +
The Z-score converts each value to standard deviation units from the mean: z = (x − x̄) / s. Values with |z| > 3 are conventionally flagged. Limitation: the Z-score uses the mean and SD, both distorted by the outlier being evaluated — called masking. A single large outlier inflates the SD, reducing its own Z-score and making it appear less extreme than it is. For skewed data or when multiple outliers are suspected, use the IQR method or modified Z-score (MAD-based) instead. For n < 50, use a more conservative threshold of |z| > 2.5.
What is the IQR method for outlier detection? +
The IQR (interquartile range) method uses Tukey fences based on the 25th and 75th percentiles: IQR = Q3 − Q1. Mild outlier fences: Q1 − 1.5×IQR and Q3 + 1.5×IQR. Extreme outlier fences: Q1 − 3.0×IQR and Q3 + 3.0×IQR. The IQR method is robust to masking because it uses quartiles (not the mean and SD) and is not distorted by extreme values. It is the standard underlying boxplot whisker calculations. Recommended for skewed clinical data — laboratory values, length of stay, pain scores, CRP, creatinine — where the normal distribution cannot be assumed.
What is the modified Z-score and when should I use it? +
The modified Z-score (Iglewicz & Hoaglin, 1993) uses the median and MAD: MAD = median(|x​ᵢ − x̃|); M​ᵢ = 0.6745 × (x​ᵢ − x̃) / MAD. Flag: |M​ᵢ| > 3.5. The 0.6745 factor scales MAD to approximate SD under normality. It is more robust than the standard Z-score because neither the median nor the MAD is distorted by extreme values — eliminating the masking problem even when multiple outliers are present. Use it when: data are non-normal; multiple outliers are suspected; sample size is small (n < 30). It is the preferred method by many biostatisticians for initial outlier screening.
What is Cook’s distance and why does it matter for regression? +
Cook’s distance (D​ᵢ) measures how much all regression fitted values would change if observation i were deleted. It combines leverage (extreme predictor values) with residual (extreme outcome deviation). Threshold: D > 4/n (flag as influential); D > 1 (seriously influential). Cook’s distance matters because a single high-leverage observation with a large residual can change regression slope direction, inflate or deflate SE, and reverse statistical significance — as demonstrated in Example 3, where one patient changed p from 0.041 to 0.212. Every linear and logistic regression analysis should include a Cook’s distance diagnostic plot before results are reported.
When should I remove an outlier from my dataset? +
Remove (or correct) an outlier only when there is documented evidence that it does not represent a true measurement: confirmed data entry or transcription error; instrument failure noted in lab records; biological impossibility (SBP = 800, age = −3); duplicate data row. Never remove an outlier solely because it appears extreme, affects results, or reduces statistical significance. A biologically real but extreme value represents a genuine patient and must be represented in the data. When the source cannot be verified, retain the value, switch to robust statistical methods, and report a sensitivity analysis both with and without the observation.
What is the difference between an outlier and an influential observation? +
An outlier is extreme in the marginal distribution of a variable — detected by Z-score, IQR, or boxplot. An influential observation disproportionately affects a statistical model’s estimates — detected by Cook’s distance or leverage. They are different concepts: an extreme value that sits close to the regression line is an outlier but not influential; a value with an extreme predictor value (high leverage) but small residual is influential but not a univariate outlier. The most dangerous combination — extreme in both Y and X — can reverse the direction and significance of a regression finding.
How do outliers affect statistical tests? +
Outliers distort most common analyses: (1) Mean and SD — pulled toward the extreme value; SD inflates, reducing Cohen’s d. (2) Pearson r — the most sensitive statistic; a single bivariate outlier can change r from near zero to 0.70. (3) t-test — inflated SD reduces t-statistic, converting real effects to non-significance. (4) ANOVA — inflated MSE reduces F and power. (5) Linear regression — high-leverage outliers can reverse slope direction and significance. Robust alternatives (median, IQR, Spearman ρ, Mann-Whitney, Kruskal-Wallis) are substantially less affected and should be used when genuine extreme values must be retained.
How should I report outlier detection and handling in a thesis? +
In Statistical Analysis — Methods: state the detection method (e.g., IQR method and boxplot inspection), the flagging criterion (Q3 + 1.5×IQR), the decision rule for retention vs correction vs exclusion, and the sensitivity analysis plan. In Results: disclose each flagged observation, the outcome of the source record investigation, and the action taken. Report the sensitivity analysis result explicitly. Never use passive constructions that obscure the decision (“outliers were excluded” — excluded by whom, using what criterion?). The decision process must be transparent enough that a reader could replicate it exactly from your methods description.
What is Mahalanobis distance and when is it needed? +
Mahalanobis distance (MD) detects multivariate outliers — observations not extreme on any single variable but unusual in combination across multiple variables. MD = √((x−μ)ᵀΣ⁻¹(x−μ)), where Σ is the covariance matrix. Follows χ²(df=p) under multivariate normality; flag observations where MD exceeds the χ² critical value at α = 0.001. Use before any multiple regression, structural equation modelling, or cluster analysis where multivariate normality is assumed. Univariate methods miss multivariate outliers entirely. In SPSS, save Mahalanobis distances through the Regression Save dialog. In R: mahalanobis(data, colMeans(data), cov(data)).

Explore Your Data with StatClinic

Identify outliers, explore distributions, and run robust statistical analyses — from boxplot inspection to regression diagnostics.

Open StatClinic →