,

A histogram shows how numerical observations are distributed across intervals. The horizontal axis retains the order and scale of the numerical variable. The rectangles represent how much data falls within each interval.

A histogram is not a bar chart with the gaps removed. A bar chart compares categories; a histogram groups a numerical scale. Statistics Canada’s histogram guidance explains why grouping and the shape of the distribution belong together.

On this page

Define the variable and the bins

Use these twenty synthetic waiting times, in minutes:

2,4,6,7,9,10,12,13,14,16,18,19,21,23,26,28,31,34,38,44.2,4,6,7,9,10,12,13,14,16,18,19,21,23,26,28,31,34,38,44.

Choose bins [0,10)[0,10), [10,20)[10,20), [20,30)[20,30), [30,40)[30,40) and [40,50][40,50]. The notation [10,20)[10,20) includes 10 but excludes 20. The final bin includes its upper endpoint. This convention assigns every possible value in the displayed span to exactly one bin.

A value of 10 belongs in the second bin, not both of the first two. Explicit boundaries prevent overlapping labels such as “0–10” and “10–20” from creating ambiguity.

The data are recorded in whole minutes for this example. The underlying waiting duration is a continuous quantity, and the bins represent intervals on that scale.

Count the observations

The frequencies are:

Count the observations: reference table
Waiting-time interval, minutes Frequency Relative frequency
0≤x<100\le x<10 5 25%
10≤x<2010\le x<20 7 35%
20≤x<3020\le x<30 4 20%
30≤x<4030\le x<40 3 15%
40≤x≤5040\le x\le50 1 5%

The counts total 20 and the proportions total 100%. With equal bin widths, frequency can be used as the vertical scale because rectangle areas are proportional to their heights and hence to their counts.

Equal-width bins show frequencies

Equal-width bins show frequenciesSynthetic waiting times grouped into the explicit bins in the accompanying table.0246801020304050Number of observationsWaiting time (minutes)57431
Synthetic waiting times, n = 20. Bins include the left boundary; the final right boundary is included.
Diagram explanation and exact data

Five observations lie from 0 to below 10, seven from 10 to below 20, four from 20 to below 30, three from 30 to below 40, and one from 40 through 50. Bar areas are proportional to counts because widths are equal.

Equal-width bins show frequencies: exact reference data
Bin (min) Width (min) Count Plotted height
[0, 10) 10 5 5
[10, 20) 10 7 7
[20, 30) 10 4 4
[30, 40) 10 3 3
[40, 50] 10 1 1

The tallest bin contains seven observations between 10 and 20 minutes. That does not mean the mode of the raw data is a particular value inside that interval. A modal bin and an exact repeated value are different summaries.

Change the bins and see what changes

Smaller bins reveal more local detail but can make a small sample appear irregular. Larger bins produce a simpler picture but can hide gaps or separate clusters. Changing the start point of the bins can also change apparent peaks.

There is no single universal bin width that is best for every question. Start with a defensible width, then check whether reasonable alternatives change the interpretation. Keep the same boundaries when comparing groups, or explain why different boundaries were required.

The observations do not change when you redraw the bins. A claim that appears only under one carefully selected set of bins deserves scrutiny. Retaining the raw values or a downloadable data table makes that check possible.

Unequal-width bins need a density scale

Suppose the same observations are regrouped into [0,10)[0,10), [10,30)[10,30) and [30,50][30,50]. Their widths are 10, 20 and 20 minutes; their counts are 5, 11 and 4.

If raw frequency were used as height, the middle bin would receive both a greater height and twice the width. Its area would exaggerate its share. Instead, use frequency density:

frequency density=bin frequencybin width.\text{frequency density}=\frac{\text{bin frequency}}{\text{bin width}}.

The heights become 5/10=0.55/10=0.5, 11/20=0.5511/20=0.55 and 4/20=0.24/20=0.2 observations per minute. Each rectangle’s area now equals its count:

10(0.5)=5,20(0.55)=11,20(0.2)=4.10(0.5)=5,\qquad20(0.55)=11,\qquad20(0.2)=4.

Unequal-width bins require density

Unequal-width bins require densitySynthetic waiting times grouped into the explicit bins in the accompanying table.00.20.40.601020304050Frequency density (observations/minute)Waiting time (minutes)0.50.550.2
Synthetic waiting times, n = 20. Bins include the left boundary; the final right boundary is included.
Diagram explanation and exact data

Equal-width heights can represent counts. With unequal widths, use count divided by width: each rectangle’s area then represents its count. The unequal bins contain 5, 11 and 4 records, not equal counts suggested by comparing heights alone.

Unequal-width bins require density: exact reference data
Bin (min) Width (min) Count Plotted height
[0, 10) 10 5 0.5
[10, 30) 20 11 0.55
[30, 50] 20 4 0.2

For a relative-frequency density histogram, divide each height by the total count as well. The three heights would be 0.025, 0.0275 and 0.01 per minute. Their rectangle areas would be 0.25, 0.55 and 0.20, summing to 1.

Always label which density is used. Density height is not itself a percentage; the area over an interval represents the proportion.

Read shape, centre and spread

Look for the range of occupied bins, one or more peaks, gaps and long tails. Describe skew using the direction of the tail, not the side containing the tallest rectangle. These waiting times have a longer upper tail, so a right-skewed description is reasonable for this particular illustration.

A histogram does not retain exact positions within a bin. It cannot establish that all seven observations in [10,20)[10,20) were near 15. An estimate of the mean using bin midpoints is an approximation, not generally the exact mean of the raw values.

Small samples can produce unstable apparent shapes. A smooth-looking histogram is not proof that a particular probability model is correct.

Compare groups fairly

When two samples have different sizes, relative frequencies or relative-frequency densities often make their distributional shapes easier to compare. Raw counts can still answer a useful workload question, but they combine sample size with the shape of the distribution.

Use compatible units, matching bins and a clearly labelled vertical scale. Show each sample size. A group with twice as many observations can have taller count bars even if the proportions in every interval are identical.

Histograms also differ from time-series graphs. Sorting waiting times into numerical bins discards the order in which the waits occurred. If you need to study whether waits increased through the afternoon, keep the time-order information and use a suitable additional display.

Practice questions

  1. Under the stated boundaries, which bin contains a value of exactly 10 minutes?
  2. A bin has width 20 minutes and frequency 11. What is its frequency density, and what is its rectangle area?
  3. In the twenty-observation example, what percentage lies between 10 and 30 minutes?
Check your answers
  1. [10,20)[10,20). The first bin excludes 10 and the second includes it, so the observation is counted once.
  2. The density is 11/20=0.5511/20=0.55 observations per minute. Its area is 20×0.55=1120\times0.55=11 observations.
  3. The two original bins contain 7+4=117+4=11 observations, so 11/20=55%11/20=55\%. In the regrouped density histogram, the same share is represented by the middle rectangle’s area.

Related topics

Box Plots offers a compact comparison of ordered summaries. Data Distributions connects observed shapes to models, and Misleading Graphs and Statistics examines choices that distort them.

Sources and further reading