Histogram Vs Bar Graph

Download as PDF

They both use bars, but histograms and bar graphs tell very different stories about data. Confusing them can lead to incorrect conclusions. This lesson will break down their unique purposes, structures, and uses, ensuring you can visualize your data accurately.

Histogram Vs Bar Graph — an original Algebra911 reference diagram defining histogram vs bar graph with its key formula and a worked example.
Histogram vs. Bar Graph: What's the Real Difference?

What is the Core Difference Between a Histogram and a Bar Graph?

The core difference between a histogram and a bar graph is that a histogram displays the frequency distribution of continuous numerical data, while a bar graph compares the values of discrete categorical data. This distinction in data type is the single most important factor that determines which chart you should use, and it influences every aspect of how the chart is constructed and interpreted.

To understand this fully, let's define these two types of data:

  • Discrete Data: This type of data can only take on specific, separate values. You can count it. Think of categories like car models ('Ford', 'Toyota', 'Honda'), favorite colors ('Red', 'Blue', 'Green'), or the number of pets a person owns (1,2,3, but not 1.5). The categories are distinct and have no intermediate values. This is the domain of bar graphs.
  • Continuous Data: This type of data can take on any value within a given range. It is measured, not counted. Examples include the height of a person (175.3 cm), the weight of an apple (120.7 grams), or the time it takes to run a race (25.42 seconds). Because the values can exist anywhere on a spectrum, we group them into ranges or intervals to visualize them. This is the domain of histograms.

Ultimately, a bar graph is for comparing distinct items, while a histogram is for understanding the shape and spread of a single, continuous variable.

What Is a Bar Graph? A Closer Look

A bar graph (or bar chart) is a visual tool that uses rectangular bars of varying heights or lengths to represent and compare data across different, distinct categories. Each bar corresponds to a specific category, and its length is proportional to the value or frequency of that category.

Let's break down the key features of a bar graph:

  • Categorical X-Axis: The horizontal axis (x-axis) of a bar graph lists the discrete categories you are comparing. These are not numbers on a continuous scale; they are labels, such as 'Grade 9', 'Grade 10', 'Grade 11', or 'Dogs', 'Cats', 'Fish'.
  • Gaps Between Bars: A defining visual characteristic of a bar graph is the presence of spaces between the bars. These gaps are crucial because they emphasize that the categories are separate and unrelated in a sequential way. The data for 'Dogs' does not flow into the data for 'Cats'.
  • Frequency or Value on Y-Axis: The vertical axis (y-axis) is a numerical scale that represents the frequency (count) or value for each category. For example, it could show the number of students who prefer a certain subject or the total sales for different products.
  • Flexible Bar Order: The order of the bars on a bar graph can typically be rearranged without changing the chart's meaning. You could list the categories alphabetically, from highest frequency to lowest, or in any other logical grouping. This flexibility can be used to make the graph easier to interpret.

In short, if you have data that you can sort into named buckets and you want to see which bucket is biggest, a bar graph is your best choice.

How Do You Create a Bar Graph?

Creating a bar graph is a straightforward process of turning a frequency table into a visual chart. Let's walk through an example.

Example 1

A survey was conducted at a high school to find out students' preferred method of transportation to school. The results from 150 students are shown in the table below.

Transportation MethodNumber of Students (Frequency)
Bus65
Walk30
Car45
Bicycle10

Step 1: Identify Categories and Frequencies
The categories are the transportation methods: Bus, Walk, Car, and Bicycle. The frequencies are the number of students for each method.

Step 2: Draw and Label the Axes
Draw a horizontal x-axis and a vertical y-axis. Label the x-axis 'Transportation Method' and the y-axis 'Number of Students'.

Step 3: Set the Scale for the Y-Axis
The highest frequency is 65. We need a scale on the y-axis that can accommodate this value. Let's create a scale from 0 to 70, with increments of 10 for clarity.

Step 4: Draw the Bars for Each Category
On the x-axis, mark positions for each category. For 'Bus', draw a rectangular bar up to the 65 mark on the y-axis. For 'Walk', draw a bar up to 30. For 'Car', draw a bar up to 45. For 'Bicycle', draw a bar up to 10. Crucially, leave a distinct space between each bar to show the categories are separate.

Step 5: Add a Title
Give the graph a clear title, such as 'Preferred Transportation Methods for School'. The resulting bar graph provides an immediate visual comparison, clearly showing that the bus is the most popular method.

What Is a Histogram? Unpacking the Details

A histogram is a graphical representation that organizes a set of continuous data into a frequency distribution. It looks like a bar graph, but it serves a very different purpose and has a different structure. Instead of comparing categories, a histogram shows how frequently data points fall into specified numerical ranges, called 'bins' or 'intervals'.

Here are the defining characteristics of a histogram:

  • Numerical X-Axis: The x-axis of a histogram is a continuous number line. It's broken down into equal-width intervals or bins that cover the entire range of the data. For example, if you are graphing test scores, the x-axis might be marked with intervals like 5059, 6069, 7079, etc.
  • No Gaps Between Bars: This is the most obvious visual difference from a bar graph. The bars in a histogram touch each other. This signifies that the x-axis variable is continuous and there are no gaps in the data ranges from one bin to the next. The end of one interval is the beginning of the next.
  • Frequency on Y-Axis: As with a bar graph, the y-axis represents the frequency, or the count of data points that fall within each bin.
  • Fixed Bar Order: Unlike a bar graph, the order of the bars in a histogram cannot be changed. They must be arranged in numerical order along the x-axis, as this shows the distribution of the data. Rearranging them would destroy the meaning of the chart.

Histograms are powerful because they don't just show values; they reveal the underlying shape of the data's distribution—whether it's symmetric (like a bell curve), skewed to one side, or has multiple peaks.

How Do You Create a Histogram?

Building a histogram requires an extra step compared to a bar graph: grouping the data into bins. Let's see how it's done.

Example 2

A botanist measures the height, in centimeters, of 25 seedlings of a particular plant species. The measurements are:

12.1,15.5,8.2,10.3,11.5,13.8,14.2,9.7,10.8,12.9,16.1,14.5,11.9,10.0,9.1,13.3,14.9,15.8,12.5,13.1,11.2,10.6,12.8,13.5,14.0

Step 1: Determine the Range of the Data
First, find the minimum and maximum values. Min = 8.2, Max = 16.1. The range is 16.18.2=7.9.

Step 2: Decide on the Number and Width of Bins
There's no single perfect rule, but a common starting point is to use 510 bins. Let's choose 5 bins. To find the width of each bin:

Bin Width = RangeNumber of Bins=7.95=1.58

It's best to round this up to a convenient number. Let's use a bin width of 2. This is a clean, easy-to-read interval.

Step 3: Create the Bins and Tally the Data
Starting from a value slightly below our minimum, let's create bins of width 2. We define the intervals carefully (e.g., including the lower bound but not the upper bound, except for the last bin).

  • Bin 1: 8.09.9 cm
  • Bin 2: 10.011.9 cm
  • Bin 3: 12.013.9 cm
  • Bin 4: 14.015.9 cm
  • Bin 5: 16.017.9 cm

Now, we tally how many data points fall into each bin:

Bin (Height in cm)TallyFrequency
8.09.9III3
10.011.9IIIIII7
12.013.9IIIIIII8
14.015.9IIIII6
16.017.9I1

Step 4: Draw and Label the Axes and Bars
Draw the x-axis as a number line and mark the bin intervals (8,10,12,14,16,18). Label it 'Seedling Height (cm)'. Label the y-axis 'Frequency'. Draw bars for each bin corresponding to its frequency. Make sure the bars are adjacent, with no gaps.

Step 5: Add a Title
Title the chart 'Distribution of Seedling Heights'. The resulting histogram shows that most seedlings are between 10 and 16 cm tall, with a peak in the 12.013.9 cm range.

Histogram vs. Bar Graph: A Side-by-Side Comparison

Sometimes the best way to understand two similar concepts is to compare them directly. This table summarizes the key distinctions between histograms and bar graphs.

FeatureBar GraphHistogram
Type of DataDiscrete, categorical data (e.g., favorite colors, types of cars).Continuous, numerical data (e.g., height, weight, time).
X-AxisRepresents distinct, separate categories.Represents a continuous number line divided into intervals (bins).
BarsBars are separated by gaps to emphasize that the categories are distinct.Bars are adjacent (touching) to show that the data is continuous across intervals.
Order of BarsCan be reordered (e.g., alphabetically, by size) without changing the meaning.Is fixed by the numerical order of the bins on the x-axis and cannot be changed.
Main PurposeTo compare the values or frequencies across different categories.To show the shape and spread of the distribution of a set of numerical data.
What Bar Width RepresentsThe width of the bars is arbitrary and does not represent anything.The width of each bar represents the width of the numerical interval (the bin).

Which Chart Is Right for Your Data?

Choosing the correct chart is a critical skill in data analysis. Making the wrong choice can misrepresent your data and lead to false conclusions. The decision always comes back to one question: Is my data categorical or continuous?

  • Use a Bar Graph when:
    • You are comparing counts of different items (e.g., number of votes for different candidates).
    • Your data can be sorted into distinct, named groups (e.g., sales figures for different months).
    • The x-axis labels are words or distinct numerical labels that are not part of a continuous range (e.g., model years of cars: 2020, 2021, 2022).
  • Use a Histogram when:
    • You are analyzing the distribution of a single variable's measurements (e.g., the spread of student test scores).
    • Your data is continuous and can take any value within a range (e.g., the time it takes for students to complete a puzzle).
    • You want to see the shape of the data—where it peaks, how spread out it is, and if it's skewed.
Example 3

A gym manager records the ages of 50 members. The data includes ages like 21,45,33,19,62,28,35,.... Should the manager use a bar graph or a histogram to visualize the age distribution of members?

Analysis: Age is a continuous numerical variable. A person can be 28.5 years old, for example. While we often state age in whole numbers, it exists on a continuous timeline. The manager is not interested in comparing a few specific ages but in understanding the overall age distribution of the entire membership. Are the members mostly young, middle-aged, or older?

Conclusion: A histogram is the correct choice. The manager would create bins (e.g., 1825, 2635, 3645, etc.) and plot the frequency of members in each age range. A bar graph would be inappropriate because it would require a separate bar for every single age (19, 20, 21...), which would be cluttered and fail to show the overall distribution pattern.

Common Mistakes to Avoid

When first learning about these charts, students often make a few common errors. Being aware of these can help you create accurate and effective data visualizations.

  1. Using a Histogram for Categorical Data: This is the most frequent mistake. If your data is 'Apples', 'Oranges', and 'Bananas', you cannot create a histogram because there is no continuous numerical scale. You must use a bar graph.
  2. Putting Gaps in a Histogram: The touching bars of a histogram are non-negotiable. Adding gaps implies the data is discrete, which misrepresents the continuous nature of the variable.
  3. Making Bar Graph Bars Touch: Conversely, making the bars of a bar graph touch is incorrect. This can confuse the reader into thinking they are looking at a histogram and that the categories are part of a continuous range.
  4. Choosing Inappropriate Bin Widths: In a histogram, the choice of bin width is crucial. If the bins are too wide, you might lose important details about the distribution's shape. If they are too narrow, the chart can become noisy and hard to interpret, with many bins having zero or very low frequencies.
  5. Mislabeling Axes: Always provide clear, descriptive labels for both the x-axis and y-axis. For a histogram, ensure you specify the units of measurement on the x-axis (e.g., 'Height in cm'). For a bar graph, make sure the category labels are legible.
  6. Forgetting a Title: A graph without a title is incomplete. The title should be a concise summary of what the chart displays, providing context for the viewer.

Quick Summary: The Key Takeaways

If you're in a hurry, here are the absolute essential points to remember:

  • Data Type is Key: The choice between a histogram and a bar graph depends entirely on whether your data is continuous (measured) or discrete (counted/categorized).
  • Bar Graph = Categories: Use a bar graph for discrete, categorical data. Think 'comparing separate things'. Visually, bar graphs have gaps between the bars.
  • Histogram = Continuous: Use a histogram for continuous, numerical data. Think 'showing the shape of a distribution'. Visually, histograms have no gaps; the bars touch.
  • X-Axis Tells the Story: Look at the x-axis. If it's a list of names or separate items, it's a bar graph. If it's a number line broken into intervals, it's a histogram.

Frequently Asked Questions

Why do the bars in a histogram touch?

The bars touch to show that the x-axis represents a continuous range of numerical data. Each bar represents an interval (or bin), and the next bar begins exactly where the previous one ends, leaving no gaps in the data range.

Can I reorder the bars on a bar graph?

Yes, you can. Since the x-axis of a bar graph represents distinct categories, their order doesn't have a mathematical meaning. You can arrange them alphabetically, by size (ascending or descending), or in any order that makes the chart easier to read.

What is a 'bin' in a histogram?

A 'bin' is a range or interval used to group continuous data in a histogram. For example, if you are graphing student test scores, you might create bins like 6069, 7079, and 8089. The width of the bar represents the width of the bin.

Is a bar chart with numerical categories (like shoe size) a histogram?

Not necessarily. If the numbers represent discrete, individual categories (like shoe sizes 7,8,9), it's a bar graph. A histogram is for continuous data that is grouped into ranges, like heights from 160cm to 165cm.

What's the most important question to ask before choosing a chart?

The most important question is: 'What type of data am I working with?' If the answer is discrete categories (like names, types, or places), use a bar graph. If it's continuous numerical data (like measurements, time, or weight), use a histogram.

Can the bars in a histogram have different widths?

Yes, they can, but it requires careful construction. When bin widths are unequal, the *area* of the bar (not just the height) must be proportional to the frequency. For most introductory purposes, you will work with histograms that have equal bin widths.

What does the y-axis represent in each chart?

In both a standard bar graph and a histogram with equal bin widths, the y-axis represents the frequency. This is the count of how many times a value or category appears in the dataset.