Why, in a grouped discrete data starting with zero, does the lower boundary start by -0.5?

My statistics book states that:

Special care must be taken with class boundaries when drawing a histogram to represent grouped discrete data.....a continuous scale is used.

Consider the group 0-9. Although it may seem strange, when data are discrete, the lower boundary is taken as — 0.5 and the group 0—9 is represented on a histogram by the interval from —0.5 to 9.5.

It's really confusing to why we have to use a continuous scale with discrete data, can't we just use a histogram but leave a gap between say 9 and the number after it to show that's there's a new interval coming? Second, why do we make the zero negative 0.5

• Technically, you're exactly right. You should use a bar chart with different bars (usually not touching) to represent ordinal categorical values (e.g., Likert values). However, in many statistical software programs, procedures for making histograms are easier to use than those for making bar charts. So people tend to make histograms. Then it is necessary to specify binning (bar boundaries) for the histogram that so each bar is centered on its own level of the categorical variable. Sep 27, 2020 at 0:44

Bar Plots Preferred to Histograms for Graphical Display of Ordinal Categorical Data

Comment continued with an example:

Here are some 7-category Likert scores simulated, summarized, and graphed in R. Data need to be tabulated for a barplot in R, and histogram cutpoints separating bins need to be specified in order to make a useful histogram.

For categorical data, barplots are the preferred graphical display. Spaces between bars emphasize the discreteness of ordinal categorical values. Histogram bars that touch may give the impression that data have continuous numerical values.

Generate data:

set.seed(2020)           # for reproducibility
prop = c(1,2,3,4,3,3,2)  # proportions for scores; need not add to 1
x = sample(1:7, 100, rep=T, p = prop)  # samples data


Describe data:

table
x
1  2  3  4  5  6  7     # scores
6  8 20 21 18 16 11     # frequencies

quantile(x)
0%  25%  50%  75% 100%
1    3    4    6    7


Graph data:

par(mfrow=c(1,2))          # enables two panels per plot
farb = c("maroon", "red", "orange", "khaki",
"green3", "cyan3", "skyblue")  # optional colors
tab.x = tabulate(x)       # tabulate data for plot
barplot(tab.x, names.arg=1:7, col=farb,
main="Barplot of Likert Scores")

cutp = seq(.5, 7.5, by=1) # cut points for histogram bins
hist(x, br=cutp, col="skyblue2",
main="'Histogram' of Likert Scores")

• For discrete numerical data either a histogram or a bar chart may be appropriate. Often the choice depends on the number of distinct discrete values, and on whether we want to show a continuous approximation. // So, If I had binomial data, I'd use a histogram and overlay a density function of the approximating normal distribution. Also, if I had Poisson data with counts out to $X = 70$ or $80,$ I might use a histogram with several values to a bin. Sep 27, 2020 at 4:21
• OK, I think once data is grouped, then a histogram may be the best (or only) feasible choice. If groups are 10-19, 20-29, make sure labeling is clear so no one thinks its 11-20, 21-30, etc. For any kind of numerical data the bias is already toward a histogram. Sep 27, 2020 at 4:35