Written and maintained by CASRAI Editorial Board
Last updated
A multimodal distribution is a distribution with two or more distinct peaks, called modes. With exactly two peaks it is bimodal; with one peak it is unimodal. Multimodality usually means the data mix two or more subpopulations, so a single mean and standard deviation can describe the sample badly. This guide defines the term, works a numerical example, shows how to test for it with the Hartigan dip test, and gives a reporting template.
What is a multimodal distribution?
A mode is a peak in the distribution: a value, or a narrow range of values, that is more common than the values on either side of it. A unimodal distribution has one such peak, a bimodal distribution has two, and a multimodal distribution has two or more. The NIST/SEMATECH e-Handbook of Statistical Methods describes a bimodal histogram as one showing data from a “bimodal (2 peak) distribution”, where each mode appears to have a rough bell-shaped component.
“Bimodal” and “multimodal” are therefore not competing ideas. Bimodal is the special case of two peaks, and the NIST handbook lists “presence of multiple modes in the data” among the features a histogram can reveal. For a wider view of how to read a histogram, see the CASRAI guide to the histogram.
Formula: is there one for multimodality?
There is no single formula that makes a distribution multimodal. The definition is about shape: a mode of a continuous distribution is a local maximum of its probability density function f(x), and a distribution is multimodal when f has more than one local maximum. Two symbols matter in practice:
- f(x): the probability density at value x. A mode sits where f rises, peaks and falls again.
- Dn: the dip statistic returned by the formal test described below.
With a sample, modes are estimated from a histogram or a smoothed density estimate, so the number of peaks you see depends on bin width or smoothing. That is why a formal test is useful.
Worked example: two groups in one sample
Suppose a sample of 20 scores comes from two groups that were pooled without a group label. The first ten values (group A) are 12, 13, 14, 14, 15, 15, 16, 16, 17, 18. The second ten (group B) are 32, 33, 34, 35, 35, 36, 36, 37, 38, 40.
- Group A sum = 150, so its mean = 150 / 10 = 15.0. Group B sum = 356, so its mean = 356 / 10 = 35.6.
- Pooled sum = 150 + 356 = 506, so the pooled mean = 506 / 20 = 25.3.
- Sorted, the 10th value is 18 and the 11th is 32, so the median = (18 + 32) / 2 = 25.0.
- The sum of squared deviations from 25.3 is 2,202.2. The sample variance is 2,202.2 / 19 = 115.91, so SD = √115.91 = 10.77.
Count the values in bins of width 5:
| Bin | Values in bin |
|---|---|
| 10 to under 15 | 4 |
| 15 to under 20 | 6 |
| 20 to under 30 | 0 |
| 30 to under 35 | 3 |
| 35 to under 40 | 6 |
| 40 to under 45 | 1 |
The histogram has two peaks, in the 15 to 20 bin and the 35 to 40 bin, with an empty gap between them. The mean (25.3) and median (25.0) both land in that gap, where no observation lies. The SD of 10.77 is also much larger than the SD within either group (1.83 for group A, 2.37 for group B, by the same arithmetic). This is the central lesson: the summary statistics describe a value nobody has.
How to detect a multimodal distribution
Histogram and bin width
Plot a histogram first. Try more than one bin width, because very wide bins can merge two peaks and very narrow bins can invent extra ones. See relative frequency and frequency distributions for how bins are built.
The Hartigan dip test
The dip test of unimodality (Hartigan and Hartigan, 1985) is implemented in the R package diptest. According to its reference manual, dip.test() treats the data as independent draws from a distribution F. The null hypothesis is that F is unimodal, and the alternative is that it is non-unimodal, “i.e., at least bimodal”. The function returns the dip statistic Dn and a p-value. By default the p-value comes from linear interpolation in a table of critical values; with simulate.p.value = TRUE it is estimated by Monte Carlo simulation from uniform samples (B = 2000 by default).
Two limits from the manual are worth knowing. For n of 3 or fewer there is no possible dip test. And the manual’s own example of two normal samples centred three standard deviations apart is described as borderline bimodal that, most of the time, is not significantly so. A non-significant dip test therefore does not prove the data are unimodal, especially in small samples.
Why multimodality happens and what to do next
The NIST handbook’s guidance for a bimodal histogram is to find out why there are two separate sub-processes and to fit a normal mixture model by least squares or maximum likelihood, using the histogram to supply initial estimates of the location and scale of each component. In practice the cause is most often a mix of groups (for example, two sites, two instruments or two treatment arms pooled together). If a grouping variable exists, split by it and summarise each group separately.
Interpretation: reading guide
| What you see | What it suggests | What to do |
|---|---|---|
| One clear peak | Unimodal; mean and SD are usually reasonable summaries if the shape is also roughly symmetric | Report as usual; see descriptive statistics |
| Two separated peaks with a gap | Bimodal; likely two subpopulations | Look for a grouping variable; summarise each group; consider a mixture model |
| Three or more peaks | Multimodal; possibly several subpopulations or too-narrow bins | Check bin width and smoothing before interpreting |
| Mean and median fall in a sparse region | Central tendency is not typical of any observation | Report the modes or group-wise statistics instead |
Assumptions and common mistakes
- Trusting one histogram. The number of visible peaks changes with bin width. Check several.
- Reporting only the mean and SD. For the example above, “M = 25.3, SD = 10.77” hides the two groups completely. The standard deviation assumes the mean is a meaningful centre.
- Running a normality test and stopping. A bimodal sample will usually fail a normality test, but the failure says nothing about why. See the Shapiro-Wilk test in R.
- Treating a non-significant dip test as proof of one peak. The test has limited power for close peaks and small samples.
- Dip test assumptions. The test assumes independent, identically distributed observations.
How to report it (APA example)
Describe the shape, give the modes or group-wise statistics, and state the test result. Using the worked example, a descriptive report could read: “The distribution of scores was bimodal, with peaks near 15 and 35 (n = 20; overall M = 25.3, SD = 10.77; group A M = 15.0, group B M = 35.6).” If you run the dip test, add its result in the usual form, for example: “Hartigan’s dip test (diptest package, R) gave D = [value], p = [value]”, filling in the values your software returns, and name the software and package version.
How to calculate it in Excel, R or Python
R
x = c(12,13,14,14,15,15,16,16,17,18,32,33,34,35,35,36,36,37,38,40)
hist(x, breaks = seq(10, 45, by = 5))
library(diptest)
dip.test(x)
Python (exploratory peak count)
SciPy’s core library has no dip test. This counts peaks of a kernel density estimate, which depends on the smoothing bandwidth, so treat it as exploratory:
import numpy as np
from scipy.stats import gaussian_kde
from scipy.signal import find_peaks
x = [12,13,14,14,15,15,16,16,17,18,32,33,34,35,35,36,36,37,38,40]
grid = np.linspace(5, 50, 500)
density = gaussian_kde(x)(grid)
peaks, _ = find_peaks(density)
print(grid[peaks])
For the example data this prints peaks near 15.1 and 35.5.
Excel
Type the bin upper limits in a column (for example 14, 19, 29, 34, 39, 44) and the data in another, then select a block of cells one longer than the bins and enter =FREQUENCY(data, bins) as an array formula to get bin counts, then chart them as a column chart. =MODE.MULT(data) returns the most frequent exact values, not histogram peaks: for the example data it returns 14, 15, 16, 35 and 36, each of which occurs twice, so use the binned counts to judge shape.
FAQ
Is bimodal the same as multimodal?
Bimodal means exactly two modes. Multimodal means two or more, so every bimodal distribution is multimodal but not the reverse.
Can the mean or median describe a multimodal distribution?
They can be calculated, but in a well-separated bimodal sample they fall between the peaks, where there may be no data, as in the worked example (mean 25.3, median 25.0). Report group-wise statistics or the modes.
Does multimodality break normality tests?
A clearly bimodal sample is unlikely to look normal, so normality tests will tend to flag it. The more useful question is what the two groups are.
How do I test whether a distribution is multimodal?
Use a histogram with several bin widths for a visual check, and the Hartigan dip test for a formal test of the null hypothesis of unimodality.
Sources
- NIST/SEMATECH e-Handbook of Statistical Methods, section 1.3.3.14.5, Bimodal Histogram: https://www.itl.nist.gov/div898/handbook/eda/section3/histogr5.htm (checked 2026-10-29).
- NIST/SEMATECH e-Handbook of Statistical Methods, section 1.3.3.14, Histogram: https://www.itl.nist.gov/div898/handbook/eda/section3/histogra.htm (checked 2026-10-29).
- CRAN, diptest: Hartigan’s Dip Test Statistic for Unimodality – Corrected, reference manual v0.77-2: https://cran.r-project.org/web/packages/diptest/diptest.pdf (checked 2026-10-29).
- Hartigan, J. A., and Hartigan, P. M. (1985). The dip test of unimodality. Annals of Statistics, 13, 70-84.
- Hartigan, P. M. (1985). Computation of the dip statistic to test for unimodality. Applied Statistics, 34, 320-325.








