Source codeVideos
Statistics

Histogram

Nabil Akbarazzima Fatih

Mathematics

Introduction to Histograms

You've probably seen bar charts used to present data. Well, a histogram is a close relative of the bar chart, but it has a specific purpose. Let's compare the two so we understand their differences.

Bar Chart vs Histogram

Bar charts are used for categorical data (such as phone brands or favorite sports):

Bar Chart of Phone Brands Used by High School Students
Shows the number of students per phone brand.

In the bar chart above:

  • Apple is the most used brand (12 students)
  • Samsung is in second place (10 students)
  • Xiaomi is in third place (8 students)
  • Oppo and Lenovo are both used by 5 students each

Notice that each bar is separated from the others because they represent different categories.

Histograms, on the other hand, are used for numerical data grouped into intervals, such as time duration or height. The bars touch each other because the intervals of values are continuous.

Histogram of Mobile Phone Usage by High School Students
Shows the distribution of time students spend on their phones daily.

From the histogram above, we can see the pattern of phone usage among high school students:

  • 10 students use their phones for 0-2 hours per day
  • 12 students use their phones for 2-4 hours per day
  • The highest number is 32 students who use their phones for 4-6 hours per day
  • 28 students use their phones for 6-8 hours per day
  • 8 students use their phones for 8-10 hours per day

From this data, we can conclude that the majority of students use their phones between 4-8 hours per day, with the peak in the 4-6 hour range.

Key Differences

DifferenceHistogramBar Chart
Type of dataQuantitative, grouped into intervalsCategorical, each bar for a single category
Bar shapeBars touch each other, no gapsSpaces between bars
Bar widthBar area represents frequencyEqual width, bar height shows quantity

When to Use a Histogram?

Use a histogram when:

  1. Data consists of measurable numbers (quantitative)
  2. You want to see the distribution or spread of data
  3. Data can be grouped into intervals

Examples of data suitable for histograms:

  • Student heights
  • Test scores
  • Travel time to school
  • Body weight
  • Device usage time

Histograms are very useful for viewing patterns in numerical data distribution. With histograms, we can identify the most frequent values, dominant value ranges, and the shape of data distribution (even, skewed left/right, or centered in the middle).