Histograms: Definition, Method and Examples

MathPublished

Histograms: Definition, Method and Examples

A histogram is a graphical representation of grouped continuous numerical data. It uses touching bars to display the frequency distribution. Unlike a standard bar chart, the area of each bar in a histogram represents the frequency, meaning the height of the bar is the frequency density when the class intervals have unequal widths.

What is a histogram?

A histogram provides a visual summary of how numerical data is distributed across continuous intervals. The data is first organised into frequency tables or grouped frequency tables, which group continuous measurements—such as time, mass, or length—into ranges.


Because the data is continuous, a histogram plots values on a continuous number line. The bars touch one another to show that there are no breaks between the intervals.

A histogram showing continuous data with touching bars of unequal widths. The vertical axis is labeled Frequency Density and the horizontal axis is continuous.

Distinguish histograms from bar charts

Although they look similar, histograms and bar charts are used for different types of data.

  • Data Type: Bar charts show discrete or categorical data. Histograms show continuous numerical data.
  • Spacing: Bar charts have gaps between the bars to show separate categories. Histograms have touching bars to show a continuous number line.
  • Bar Height vs Area: In a bar chart, the height of the bar represents the frequency. In a histogram, the area of the bar represents the frequency.

Because a histogram's bars can have unequal widths, the vertical axis is always plotted as frequency density rather than frequency.

Find class width and frequency density

To draw a histogram, you must calculate the frequency density for every class interval. This ensures that the area of the bar correctly represents the frequency.


First, determine the class width by finding the difference between the upper limit and the lower limit of the interval.


Class Width = Upper Limit − Lower Limit


Next, calculate the frequency density by dividing the frequency by the class width.


Frequency Density = Frequency ÷ Class Width


For example, if an interval is 10≤t<3010 \leq t < 30 and its frequency is 4040:

  • Class Width: 30−10=2030 - 10 = 20
  • Frequency Density: 40÷20=240 \div 20 = 2

Draw touching bars

Follow these steps to construct a histogram from a grouped frequency table:

  1. Calculate the class width for each interval.
  2. Calculate the frequency density for each interval.
  3. Draw the horizontal axis using a continuous scale that covers all data values. Label it with the measurement and units.
  4. Draw the vertical axis to accommodate the maximum frequency density. Label it "Frequency Density".
  5. Draw the bars. The width of each bar spans its exact class interval, and the height matches its frequency density. The bars must touch with no gaps.

Read frequencies from bar area

Because the area of each bar in a histogram equals the frequency, you can work backward to find the frequency from a completed graph.


Rearrange the frequency density formula to solve for frequency:

Frequency = Frequency Density × Class Width


To find the frequency of a complete bar, multiply its width by its height. You can also find the frequency for a smaller interval within a bar. Find the width of the specific section you want, and multiply it by the height of that bar.

A single histogram bar spanning from 20 to 50 on the horizontal axis with a height of 0.6. The area represents a frequency of 18.

Worked examples


Example 1: Calculating frequency densities


Question: A survey recorded the masses of 4545 parcels. Calculate the frequency density for each interval.


Method:

  1. Calculate the class width for each interval by subtracting the lower limit from the upper limit.
  2. Divide the frequency by the class width to find the frequency density.

Answer:

Mass, mm (kg)

Class Width

Frequency

Frequency Density

0≤m<20 \leq m < 2

22

1010

55

2≤m<52 \leq m < 5

33

2424

88

5≤m<105 \leq m < 10

55

1111

2.22.2

Check: Add the original frequencies (10+24+11=4510 + 24 + 11 = 45) to ensure the total matches the original information.


Example 2: Finding frequency from a histogram bar


Question: A histogram shows the time taken to complete a test. One bar covers the interval 10≤t<3010 \leq t < 30 minutes and has a frequency density of 1.51.5. How many people took between 1010 and 3030 minutes?


Method:

  1. Find the class width by subtracting the lower limit from the upper limit (30−10=2030 - 10 = 20).
  2. Multiply the class width by the frequency density to find the area, which represents the frequency (20×1.5=3020 \times 1.5 = 30).

Answer: 3030 people.


Example 3: Estimating frequency for a partial interval


Question: A histogram shows the ages of people at a concert. The bar for 20≤a<4020 \leq a < 40 years has a frequency density of 33. Estimate the number of people aged between 2020 and 2525.


Method:

  1. Assume the data is evenly distributed across the original interval.
  2. Find the width of the target interval (25−20=525 - 20 = 5).
  3. Multiply this new width by the original frequency density (5×3=155 \times 3 = 15).

Answer: 1515 people.

Common mistakes

  • Using frequency instead of frequency density: A histogram's vertical axis must be frequency density. Plotting frequency as the height makes the graph inaccurate whenever the class intervals have different widths.
  • Leaving gaps between bars: Continuous data has no breaks. The end of one class interval is the exact beginning of the next, so the bars must touch.
  • Treating the horizontal axis as separate categories: The horizontal axis is a continuous number line. You must position the bars exactly at their lower and upper limits on a scaled axis, rather than just spacing them evenly.

Frequently asked questions

Can a histogram have equal class widths?

Yes. When the class widths are all exactly the same, the frequency density is directly proportional to the frequency. The resulting shape will look just like a bar chart without gaps. However, histograms are most powerful when analyzing real-world continuous data that falls into unequal intervals.


Why does the area equal the frequency?

In a rectangle, the area is calculated as length multiplied by height. For a histogram bar, the length is the class width and the height is the frequency density. Because Frequency Density=FrequencyClass Width\text{Frequency Density} = \dfrac{\text{Frequency}}{\text{Class Width}}, multiplying the width by the density cancels out the width and leaves exactly the frequency.


What other graphs show continuous data?

Frequency polygons and cumulative frequency graphs are also used to analyze the distribution of continuous grouped data.

Practice questions

Question

A histogram with the first bar from 0 to 10 having a frequency density of 2.5.

What is the frequency of the interval 0≤x<100 \leq x < 10?

  • 2.52.5

  • 1010

  • 2525

  • 3535

Answer:

2525

Question

A frequency table records times, tt, in minutes. The frequency for the interval 15≤t<3515 \leq t < 35 is 6060. What is the frequency density for this class?

  • 2020

  • 33

  • 1.51.5

  • 44

Answer:

33

Question

A histogram with two bars. The first bar spans from 0 to 5 with a height of 4. The second bar spans from 5 to 20 with a height of 2.

What is the total frequency of all the data shown in this histogram?

  • 66

  • 2525

  • 5050

  • 8080

Answer:

5050

Question

Which statement correctly describes a property of a histogram?

  • The height of every bar always equals its frequency.

  • There should be visible gaps between the bars.

  • The area of each bar represents the frequency.

  • The horizontal axis always shows separate categories.

Answer:

The area of each bar represents the frequency.

Question

A single histogram bar spanning from 20 to 60 on the horizontal axis with a frequency density of 1.2.

Using the histogram, estimate the number of values that fall in the interval 40≤m<5040 \leq m < 50.

  • 1010

  • 1212

  • 4848

  • 2424

Answer:

1212