Visualising Forensic Data
Histograms, box plots, scatter plots, and kernel density estimates are the primary tools for exploring and communicating distributions in forensic datasets. This topic covers the mathematics of each graph type, the choices that can clarify or distort, and the reporting standards expected in peer-reviewed forensic science.
Last updated:
Visualising forensic data means selecting and constructing graphical representations, histograms, box plots, scatter plots, and kernel density estimates, that accurately convey the distribution, spread, and relationships within a dataset to analysts, courts, and peer reviewers. The choice of graph type, scale, bin width, and bandwidth is not decorative: each decision changes what features of the data are visible and what comparisons are possible. Forensic scientists use these visualisations both to explore data during an investigation and to communicate findings, with the result that a poorly chosen graphic can obscure genuine differences between samples or create the appearance of separation where none statistically exists.
Each major graph type encodes different information. A histogram shows frequency counts by binned interval, making the overall shape and centre of a distribution visible. A box plot compresses the same information into a five-number summary and allows direct comparison of multiple groups on the same panel. A scatter plot maps two continuous variables against each other, making correlation, outliers, and clustering detectable at a glance. A kernel density estimate produces a smooth probability density curve that removes the arbitrary bin boundaries of a histogram. All four appear in forensic disciplines from glass analysis to gunshot residue profiling to digital forensics.
Peer-reviewed journals and standards bodies in multiple jurisdictions now specify what graphical information must be reported alongside any forensic dataset. The OSAC (Organisation of Scientific Area Committees) in the United States, the Forensic Science Regulator in England and Wales, and bodies such as the European Network of Forensic Science Institutes all emphasise that figures must be reproducible, that parameter choices must be stated, and that scales must not be selected to emphasise a conclusion. Understanding both the mathematics of each graph type and the reporting standards that govern its use is part of competent forensic practice.
By the end of this topic you will be able to:
- Construct and interpret a histogram, including explaining how bin width affects apparent distribution shape.
- Read a box plot, identify its five-number summary, and use it to compare the spread of two or more forensic populations.
- Describe what a scatter plot reveals about relationships between variables and identify correlation, clusters, and outliers.
- Explain what a kernel density estimate is, how bandwidth selection affects the curve, and when it is preferable to a histogram.
- Apply peer-reviewed reporting standards to a forensic figure, identifying axis, label, and parameter-disclosure requirements.
- Histogram
- A bar chart in which data are grouped into contiguous equal-width intervals (bins) and the bar height represents the count or relative frequency of observations in each bin. The total area of all bars equals the total count or 1.0 for a density histogram.
- Box plot (box-and-whisker plot)
- A graphic showing the five-number summary of a distribution: the minimum, first quartile (Q1), median (Q2), third quartile (Q3), and maximum. Whiskers extend to the most extreme non-outlier values; points beyond 1.5 times the interquartile range from the box edges are plotted individually as outliers.
- Scatter plot
- A two-dimensional graph in which each observation is plotted as a point at coordinates (x, y), where x and y are two measured variables. Used to detect correlation, clustering, and anomalies in paired measurements.
- Kernel density estimate (KDE)
- A non-parametric method that estimates a probability density function by placing a smooth kernel function, commonly Gaussian, at each observed data point and summing. The bandwidth parameter controls the width of each kernel and therefore the smoothness of the resulting curve.
- Bandwidth
- The smoothing parameter in a kernel density estimate. A small bandwidth produces a jagged curve that follows every data point; a large bandwidth over-smooths and can merge distinct subpopulations. Silverman's rule of thumb provides a common default: h = 0.9 min(s, IQR/1.34) n^(-1/5).
- Interquartile range (IQR)
- The difference between the third quartile and the first quartile: IQR = Q3 - Q1. It measures the spread of the central 50 percent of the data and is the basis for identifying outliers in a box plot. Resistant to extreme values, unlike the standard deviation.
Histograms: construction, interpretation, and bin choice
A histogram is constructed by dividing the range of the data into k contiguous bins of equal width w, counting the number of observations in each bin, and drawing a bar whose height equals that count (or, for a density histogram, whose height equals count divided by n times w, so that total area equals 1). The choice of k and w is the central decision in histogram construction. Sturges' rule suggests k = 1 + log2(n), which works adequately for moderate symmetric samples. Scott's rule sets w = 3.5 s n^(-1/3), where s is the sample standard deviation, and is better for approximately normal data. The Freedman-Diaconis rule, w = 2 IQR n^(-1/3), is more resistant to outliers and often preferred for forensic data that may be skewed.
In forensic practice, histograms are used to assess whether a dataset is approximately normal before applying parametric tests, to identify bimodal distributions suggesting the mixing of two source populations, and to compare a questioned sample distribution against a reference distribution. A glass refractive index study, for example, might histogram the RI values of fragments from a crime scene alongside fragments from a known source to visualise whether the two populations overlap.
Reading a histogram correctly requires attention to the y-axis scale. A frequency histogram shows raw counts; a relative frequency histogram shows proportions; a density histogram shows probability density so areas (not heights) give probabilities. Courts and lay readers most easily understand frequency or relative frequency histograms. Density histograms are mathematically cleaner for overlaying a fitted distribution curve but can be misread if the scale is not explained.
Box plots: five-number summary and group comparison
A box plot encodes five statistics: the minimum non-outlier value (lower whisker end), Q1, the median (centre line), Q3, and the maximum non-outlier value (upper whisker end). Any observation below Q1 - 1.5 IQR or above Q3 + 1.5 IQR is plotted as an individual point and flagged as a potential outlier. Modified box plots extend the whiskers to the actual minimum and maximum and use stricter thresholds for outlier marking; the convention used must be stated in the figure caption.
Box plots are most valuable when comparing multiple groups. A single panel can show side-by-side boxes for ten or more populations, allowing rapid visual identification of differences in median and spread. In elemental profiling studies, where ICP-MS measurements of a dozen elements are made on questioned and known glass samples, box plots are a standard display for comparing each element's distribution across source groups.
| Feature | Histogram | Box plot |
|---|---|---|
| Shows distribution shape | Yes (directly) | Indirectly (skew visible from median position in box) |
| Compares multiple groups cleanly | Difficult beyond 3 groups | Designed for multi-group comparison |
| Displays outliers | Not individually | Individual points plotted |
| Shows sample size | Via bar heights | Must be stated separately |
| Best for small n (< 20) | Misleading (bin choice dominates) | Adequate; whiskers span range |
A common mistake is reading the whisker endpoints as minimum and maximum without checking whether the figure uses the standard 1.5 IQR rule or a different convention. In some forensic software outputs, whiskers extend to the 5th and 95th percentiles. The figure caption is the authority. Where the group sizes differ greatly, overlaying a strip chart (individual points jittered to avoid overplotting) alongside the box gives the reader a sense of the actual n in each group.
Scatter plots: relationships, correlation, and outliers
A scatter plot places each observation at coordinates determined by two measured variables. The visual pattern reveals whether the two variables are positively correlated (points trending up-right), negatively correlated (points trending down-right), uncorrelated (scattered without direction), or non-linearly related (curved patterns). Pearson's correlation coefficient r quantifies the linear relationship, but the scatter plot is essential: the same r value can arise from patterns as different as a linear cloud, a banana-shaped curve, or a cluster with a single outlier dragging the line.
Anscombe's quartet, four datasets with nearly identical summary statistics but visually distinct scatter plots, has been cited in forensic statistics teaching since the 1970s to illustrate why numerical summaries must always be accompanied by a plot. In forensic contexts, scatter plots appear in handwriting examination (two morphological measurements plotted for questioned versus known specimens), toxicology (drug concentration versus time post-administration), and digital forensics (file creation timestamp versus modification timestamp to detect backdating).
Identifying outliers in a scatter plot requires care. A point that appears distant from the main cluster may represent a genuine unusual specimen, a measurement error, or a contamination event. In trace evidence analysis, an outlier in an elemental scatter plot might indicate a fragment from a different source glass that was inadvertently collected. The outlier should be investigated, not automatically removed. Reporting standards require that any excluded points be documented with justification.
For datasets with more than two variables, scatter plot matrices (sometimes called pairs plots) display all pairwise combinations simultaneously. A 5-element trace analysis produces a 5x5 matrix of 10 unique scatter plots, which can reveal which pairs of elements most strongly discriminate between source groups. See also Common Distributions in Forensic Science for the distributional assumptions that underlie linear correlation tests.
Kernel density estimates: smooth density curves and bandwidth selection
A kernel density estimate constructs a continuous probability density function from a sample without assuming the data follow any parametric family. At each observed value x_i, a kernel function K is centred and scaled by the bandwidth parameter h. The KDE at any point x is: f_hat(x) = (1 / nh) * sum_i K((x - x_i) / h). For the Gaussian kernel, K(u) = (1 / sqrt(2pi)) * exp(-u^2 / 2). The bandwidth h is the analogue of the histogram bin width: small h produces a spiky curve, large h produces a flat one.
Silverman's rule of thumb selects h = 0.9 * min(s, IQR/1.34) * n^(-1/5). This is optimal for Gaussian data and performs adequately in practice for moderately skewed forensic datasets. For bimodal or heavily skewed data, data-driven selectors such as cross-validation or plug-in bandwidth estimators are more reliable. The bandwidth used must always be reported alongside any KDE figure.
In the forensic context, KDEs appear in glass refractive index studies, soil particle size comparisons, gunshot residue particle size analysis, and in the construction of score-based likelihood ratios where the KDE provides the density estimate for the score distributions under same-source and different-source propositions. The score-based likelihood ratio framework, which is foundational to evaluative reporting in disciplines ranging from speaker recognition to fingerprint comparison, relies directly on accurate KDE construction. This connects visualisation to the broader inferential framework covered in Role of Statistics in Evidence Evaluation.
Graphical choices that clarify or mislead
Every graphical decision is an editorial decision. The y-axis of a frequency histogram must start at zero; truncating it inflates the apparent difference between bars. For scatter plots, axes need not start at zero but must use the same scale for both axes if the relative magnitude of measurements matters. For comparative box plots, all groups must share the same y-axis range. These requirements are not arbitrary style rules; they follow from the geometry of how humans interpret area and distance in two-dimensional space.
A documented failure mode in forensic graphics is selective colour or shading that draws the eye to one group and away from another. A monochrome standard with consistent fill patterns for all groups, combined with direct labelling rather than a remote legend, reduces this risk. The UK Forensic Science Regulator's Codes of Practice and Conduct and the OSAC published standards for several forensic disciplines include requirements that figures not be constructed so as to emphasise a conclusion in advance of the quantitative analysis.
Over-smoothed KDEs present a specific misleading pattern. If the bandwidth is set wide enough, a bimodal distribution, two source populations mixed in the data, can appear as a broad unimodal hump. A naive reader interprets this as evidence of a single homogeneous population. The remedy is to plot the KDE alongside the histogram and to report the bandwidth, so that a reviewer can assess whether the smoothing is hiding structure. In high-stakes forensic comparisons, sensitivity plots at two or three different bandwidths should accompany any KDE figure.
Peer-reviewed reporting standards for forensic figures
Reporting standards for forensic data visualisation are set at the discipline level rather than by a single international instrument, but several convergent requirements have emerged. The Journal of Forensic Sciences, Science and Justice, and Forensic Science International all require that figure captions include: the graph type, the variable on each axis with units, the sample size n, and any parameter choices (bin width, bandwidth, whisker convention). The raw data or a full summary table must be available, either in supplementary material or on request.
In court contexts, the demands are different but not less stringent. The Daubert framework (United States) and its equivalents require that the methodology underlying any expert graphic be testable, peer-reviewed, and applied with a known error rate. A figure submitted as evidence must be reproducible: the axis choices, the sample used, and any exclusions must be documented so that an opposing expert or the court's own assessor can regenerate the figure from the stated inputs. In India, under the Bharatiya Sakshya Adhiniyam 2023 (which replaced the Indian Evidence Act 1872), expert opinion on scientific matters is admissible under Section 39, and the factual foundation including the data and the graphical method is subject to cross-examination. The position is analogous in England and Wales under the Civil Evidence Act 1995 and Criminal Procedure Rules, and in European jurisdictions under their respective criminal procedure codes.
Software transparency is part of the standard. A figure produced by R, Python (matplotlib or seaborn), or specialist forensic software must state the software name and version. Default parameter values differ between software packages: a default KDE in R's density() function uses a bandwidth rule different from Python's scipy.stats.gaussian_kde. Two scientists using different defaults with the same data can produce visually different figures. The Royal Statistical Society's 2020 guidance on statistics in court explicitly identifies software version reporting as a minimum requirement for any statistical output presented as evidence.
Population databases that underlie reference distributions in forensic comparisons must also be documented when a figure compares a questioned sample to a reference. The source, size, sampling method, and demographic scope of the reference population directly affect the shape of the reference distribution in a histogram or KDE. This links visualisation practice to the broader question of Population Databases for Forensic Statistics, where database construction and representativeness are treated in detail.
A forensic scientist plots a histogram of soil particle sizes with a bin width of 0.1 mm. A reviewer asks them to also plot with a bin width of 0.5 mm. The two plots look quite different. What does this demonstrate?
Key Takeaways
- Histograms, box plots, scatter plots, and kernel density estimates each encode different aspects of a dataset. The choice of graph type should match the goal: shape assessment (histogram or KDE), group comparison (box plot), or relationship between two variables (scatter plot).
- Bin width in histograms and bandwidth in KDEs are the central parameter choices. Both must be stated in any forensic report, and sensitivity plots at alternative values are good practice in high-stakes comparisons.
- Box plots condense the five-number summary and allow side-by-side comparison of multiple groups more cleanly than overlaid histograms. The whisker convention (1.5 IQR, 5th-95th percentile, or other) must be declared.
- Graphical choices can clarify or mislead: a truncated y-axis, inconsistent axis scales across compared groups, or an over-smoothed KDE can each make two distributions appear more different or more similar than the data warrant.
- Peer-reviewed reporting standards and court admissibility frameworks in multiple jurisdictions require that forensic figures state graph type, axis labels with units, sample sizes, parameter choices, software name and version, and any data exclusions.
What is a kernel density estimate and when should you use it in forensic science?
How does bin width choice affect a forensic histogram?
What does a box plot show that a histogram does not?
How can graphical choices mislead in forensic reporting?
What reporting standards apply to forensic data visualisation?
Test yourself on Forensic Statistics with free, timed mocks.
Practice Forensic Statistics questionsSpotted an error in this page? Report a correction or read our editorial standards.