Does a boxplot assume interval data? If not, is it then fine to use a box plot to represent Likert-scale (ordinal) data?
-
6$\begingroup$ See stats.stackexchange.com/questions/658744/… for a concurrent thread in which the main issues are aired for data that are small counts but pose essentially the same challenges. My short answer: Box plots are defensible for this kind of data, but never ideal. $\endgroup$Nick Cox– Nick Cox2024-12-15 12:19:29 +00:00Commented Dec 15, 2024 at 12:19
-
$\begingroup$ stats.stackexchange.com/questions/323908/… is one of several relevant threads. $\endgroup$Nick Cox– Nick Cox2024-12-15 12:22:30 +00:00Commented Dec 15, 2024 at 12:22
-
$\begingroup$ Boxplots display sets of numbers. They don't care how you intend to interpret them. $\endgroup$whuber– whuber ♦2024-12-15 13:32:42 +00:00Commented Dec 15, 2024 at 13:32
6 Answers
Boxplots don't really "assume" anything. You can certainly use them with Likert scale data; the question is whether that visualization helps you see things about the data, or whether some other graphic would do a better job.
This depends on your particular data and on what you want to visualize about it.
They wouldn't make much sense with data that wasn't at least ordinal.
-
3$\begingroup$ Agreed, but they don't make any sense whatsoever for nominal data. $\endgroup$Nick Cox– Nick Cox2024-12-15 13:02:06 +00:00Commented Dec 15, 2024 at 13:02
A boxplot may hide more than it reveals, especially for discrete distributions as equal medians and quartiles may mask substantial differences. If it is misleading, it might be better to use something else.
As an example, using R, take a set of frequencies summing to $1000$ cases:
# Likertscale 1 2 3 4 5
freqA <- c(499, 250, 249, 1, 1)
Now move $247$ cases (almost a quarter of the total) from $1$ to $5$. This is not quite enough to change the median or quartiles
freqB <- c(252, 250, 249, 1, 248)
The boxplots are identical
boxplot(cbind(rep(1:5, times=freqA), rep(1:5,
times=freqB)))
while barcharts of the same data would look substantially different
barplot(cbind(freqA,freqB), beside=TRUE)
Now make a further minor change moving another $3$ cases from $1$ to $5$. The third boxplot now looks completely different despite the small change
freqC <- c(249, 250, 249, 1, 251)
boxplot(cbind(rep(1:5, times=freqA),
rep(1:5, times=freqB),
rep(1:5, times=freqC)))
while the second and third barcharts are almost identical as the change was small
barplot(cbind(freqA,freqB, freqC), beside=TRUE)
-
$\begingroup$ Nice example. However, I cannot reproduce all your results in Wolfram Mathematica: Quartiles[freqA] gives {1., 249., 312.25}, Quartiles[freqB] gives {186.25, 249., 250.5}, and Quartiles[freqC] gives {187., 249., 250.25}. BoxWhiskerChart[{freqA,freqB,freqC}] returns different plots for freqA and freqB, and identical plots for freqB and freqC. $\endgroup$Romke Bontekoe– Romke Bontekoe2024-12-19 09:07:29 +00:00Commented Dec 19, 2024 at 9:07
-
$\begingroup$ @RomkeBontekoe That is due to a confusion between frequencies and values. All the quantiles must be between the minimum of 1 and the maximum of 5.
freqA <- c(499, 250, 249, 1, 1)means $499$ responses of value 1, and $250$ responses of 2, and $249$ responses of 3, and $1$ response of 4 and $1$ response of 5. The median is 2 and the other two quartiles are 1 and 3. $\endgroup$Henry– Henry2024-12-19 09:27:34 +00:00Commented Dec 19, 2024 at 9:27
A boxplot does not strictly assume interval data, but it is typically used for continuous (interval or ratio) data. Boxplots are designed to display the distribution of numerical data through their quartiles, highlighting the median, interquartile range, and potential outliers. While boxplots can be used for Likert-scale data, it's important to be cautious about the interpretation and consider alternative visualizations that might better represent the ordinal nature of the data.
-
1$\begingroup$ Discrete variables can be interval or ratio scale. Anything counted is a good simple example. $\endgroup$Nick Cox– Nick Cox2025-04-23 05:35:27 +00:00Commented Apr 23 at 5:35
I assume you mean (the most commonly used version of) a Tukey boxplot here, though I address a variant boxplot at the end that can potentially avoid the issues, albeit it may have some less desirable characteristics needed to make it purely-ordinal.
A boxplot treats linear combinations of data values as meaningful.
Perhaps most notably, the (inner) fences are compared to the data values in order to locate the ends of the whiskers.
Somewhat loosely, let's call the upper hinge "UQ" and the lower hinge "LQ", since Tukey's hinges (or fourths) are simple definitions for sample quantiles that are convenient for hand calculation.
These fences are located at 2.5 LQ-1.5 UQ and 2.5 UQ - 1.5 LQ, which are then compared with data values. For example, in order to find the upper inner fence, we find the observation $y_i$ that has the smallest positive value for 2.5 UQ - 1.5 LQ - $y_i$.
Further, the hinges themselves may be averages of observations (as might the median, but I'll leave that issue aside). Each of the above comparisons could then be a linear combination of five observations, but in any case the comparison involves giving a numerical value to a combination of never fewer than three values.
As a result we are relying on such combinations of observations being meaningful. People that use Stevens' typology would say this is not meaningful with ordinal variables, only with interval or ratio variables.
Whether you decide to assert that an individual Likert item allows meaning to be assigned to linear combination is not of itself a stats issue, in my opinion. Such a claim is a matter of belief about the properties of your instrument (at least to some reasonable approximation), and is more a question for the area you're in and perhaps even the specific instrument. If you think (and can likewise convince your audience) that a Likert item can be treated as if it were interval, you'd have plenty of company, since this would be the basis of constructing Likert scales from Likert items.
Consequently if the quantities you're doing this with are not Likert items but actual Likert scales (sums or averages of Likert items), then this assertion of meaning of linear combinations has already taken place for the items, when they were added to produce the scale; it's not necessary to do it again for their sum.
Some variants of the boxplot don't require this assertion of meaning to linear combinations of values (making every component of the plot - the center line, the box ends and the whisker ends - each a specific order statistic, whose index is computable from only the sample size would suffice), but you'd have to be careful to avoid then making comparisons involving combinations of values (like comparing box lengths that are not 'nested' or share a common endpoint, for example, since the notion of 'box length' is not a numerical quantity that is comparable across distinct sets of values).
There would not be much point to such a display with a 5-point Likert item, of course, since you're displaying a 5-point summary of a distribution over 5 values - you can get the complete empirical distribution out of the 5 ordered proportions but since the proportions add to 1, any fixed set of 4 of them would completely specify the distribution. Using a 5 number summary of a distribution that you could have perfectly represent with four numbers is arguably silly; you're using additional numbers to represent less information. It might be a useful thing to use on something that takes say 9 ordered values or so, where comparing such a distribution across many groups might start to feel a little unwieldy. A 0-10 pain scale would presumably be 11 point ordinal, so such a pure single-order-statistic-based quantile boxplot might make sense in that case, perhaps.
-
$\begingroup$ This starts from the premise that a box plot uses being within 1.5 IQR of the nearer quartile as a criterion for which data points are shown individually. As you know, that is a common convention, but not universal. It is quite common for example to show so-called whiskers out to paired quantiles, such as 5% and 95% points. $\endgroup$Nick Cox– Nick Cox2025-04-23 05:40:07 +00:00Commented Apr 23 at 5:40
-
$\begingroup$ Yes I presume the OP intended a Tukey type box plot. I believe that's the intent. I addressed a pure quantile-based box plot at the end of my answer already (but we'd still need to rely on not averaging distinct values for those, as I discuss). I'll edit to make my presumption of a Tukey box plot explicit $\endgroup$Glen_b– Glen_b2025-04-23 05:44:14 +00:00Commented Apr 23 at 5:44
-
$\begingroup$ It's a different issue. but I advocate abandoning the 1.5 IQR rule. It's sadly true that many, perhaps even most, recent texts either don't explain it or explain it incorrectly or at least in mangled form. I've often pointed this out in book reviews. Its original motivation by Tukey was that 1.5 was about right in practice, 1 being too small and 2 being too large, the entire context being recommending what only needed hand calculation (not even calculators). Worse, the 1.5 IQR rule has somehow morphed in some circles into an automated criterion for outlier rejection! $\endgroup$Nick Cox– Nick Cox2025-04-23 06:03:35 +00:00Commented Apr 23 at 6:03
-
$\begingroup$ Back to your answer:: The term hinge may need some explanation. It was Tukey's term for a version of quartile, arising from (I think) his preference for homely terms (box plot being another) and a wish to emphasise that his way of calculating hinges, which never gets more complicated than averaging two values, is not the only way to do it. As exposed more recently there are many ways to calculate quartiles and other quantiles. In the 1970s and 1980s hinge (and also fourth) was quite often used, especially by Tukey's students and co-authors, but recently it seems to have faded away. $\endgroup$Nick Cox– Nick Cox2025-04-23 07:09:46 +00:00Commented Apr 23 at 7:09
-
$\begingroup$ I believe the sentence 'Somewhat loosely, let's call the upper hinge "UQ" and the lower hinge "LQ"' conveys the approximate meaning of hinge, but I have expanded on that. I wanted to use hinge specifically for a Tukey boxplot rather than suggest some other (non-Tukey) quartile in order to speak a little more concretely, though the point I make carries over to other defintions, naturally enough. I don't think it's necessary to explain that a problem caused by taking linear combinations of observations remains if you change the coefficients. $\endgroup$Glen_b– Glen_b2025-04-23 07:35:37 +00:00Commented Apr 23 at 7:35
Boxplots rely on sample quantiles and as has been clearly explained above sample quantiles do not perform satisfactorily when there are many ties in the data. Box plots also hide bimodality and digit preferences. For these reasons I use spike histograms as covered here using functions in the R Hmisc package. See below for an example.
Spike histograms use either 100 or 200 bins independent of sample size, but fewer bins when the spacing between two adjacent distinct data values is more than the total data range divided by the number of bins.
This example used plotly interactive graphics. Clicking on a statistic description in the legend will remove that statistic from the plot. Go to the original chapter to work with an interactive version instead of the static image shown here.
-
1$\begingroup$ Are spike histograms just normal histograms with a lot of bins? How exactly is the number of bins chosen? $\endgroup$COOLSerdash– COOLSerdash2025-04-23 13:17:17 +00:00Commented Apr 23 at 13:17
-
3$\begingroup$ Yes. Always use 100 or 200 bins with a special algorithm for adjacent distinct values that are apart by more than the total width divided by the number of bins. $\endgroup$Frank Harrell– Frank Harrell2025-04-23 13:37:11 +00:00Commented Apr 23 at 13:37
-
1$\begingroup$ Could you tell us the package for your code? $\endgroup$2025-04-23 15:05:40 +00:00Commented Apr 23 at 15:05
-
$\begingroup$ I just expanded the answer. $\endgroup$Frank Harrell– Frank Harrell2025-04-23 15:15:59 +00:00Commented Apr 23 at 15:15
A boxplot could be used for any type of data, as long as it is numerical in nature. Now Likert-scale data is most often expressed as a number (1,2,3...), but honestly could just as well be expressed as letters (A,B,C...) or as words (nominal) (Agree, Partially agree, Neutral...).
Likert data also has only a few possible values (5 typically, or 7); this leads to artifacts in quartiles (and percentiles), where 2 quartiles could easily coincide; after all, you have only 5 possible values, but 3 quartiles, and 100 percentiles; so quartiles and median may overlap, and many percentiles will overlap.
Therefore, box plots are not really the most informational plots for such data.
Instead, you could start with simple bar charts, with the counts (and maybe proportions) for each level. You could add mean and medians to it, but means are of debatable merit for ordinal scale data, and the median will overlap with many other possible percentiles (because of the limited number of possible values).
A pie chart would also carry more information than a box plot.
-
2$\begingroup$ This doesn't seem to add much to previous answers, especially the well developed answer by @Henry. $\endgroup$Nick Cox– Nick Cox2024-12-16 11:06:41 +00:00Commented Dec 16, 2024 at 11:06




