# How to Make a Histogram

Statistics is all about reading patterns in the numbers. One of the easiest ways to read patterns is to look at a picture, or graph, of the data. In fact, it is so easy, it should be the first thing that you do as a part of any analysis. The most common type of statistical graph is a histogram. They’re super easy to read and even more fun to make!

## What is a Histogram?

At its most basic level, a histogram is a graph of frequency. It shows how frequently certain values occur in the data. The nice thing about histograms is that they can be used to show the frequency of any type of variable.

Before we get into the nitty-gritty of building a histogram, let’s take a look at some of the essential parts of the histogram.

The first thing that you need to notice is the labels. Every good histogram has three. First is the title; it should be short and descriptive of what the data are. Second, the y-axis is always labeled frequency because that is what a histogram shows. Third, the x-axis should be labeled telling the reader what variable is being measured.

In the case of our example above, you can tell that the graph is about the height of black cherry trees. The x-axis tells us the range of heights that were measured. And the y-axis tells how frequent each range of data is.

The second thing that you should notice is the bars. Histograms are made with bars instead of lines or data points. I promise that your teacher, professor, and/or fellow stat study buddies will roll their eyes if you use lines or dots. I know I would, lol. The bars should be in contact with each other unless there is a gap in the data. In the case of our example, you can see that all the black cherry trees measure between 65 and 90 feet, with the most frequent measurement being between 75 and 80 feet.

That brings us to the third point: scales. The scale on the y-axis starts at zero and should go to the highest frequency in the data. In our case, the most frequent measurement is 75-80 with 10 measurements, so that is the top of our scale. Along the x-axis, I recommend starting at your smallest value and only going to your highest value. In our case, the smallest tree was 60-65 feet and the tallest was 85-90, so that is the range.

But the scale itself is in 5-ft increments. In the case of this data, I tallied the trees by how tall they were in 5-ft groups. You could certainly make an individual bar for each foot measure, but it would be a lot of work to achieve the same overall effect. Histograms usually group data into discrete categories for easy visualization, if they are not already in groups or categories.

## Let’s Build One!

When you go forth to build a histogram, you should start with, of course, your data. I once did an experiment with my students for which they had to measure each other’s temperatures. Their data is below.

With a quick glance, you should notice that the most frequent measurements are between 97 and 98, the average body temperature. This should be the tallest bar of our graph. The highest frequency is 15, so that will be the maximum of your y-axis. The data table is broken into chunks that we will use for our scale on the x-axis. So, our skeleton graph should look like this

The next part is to add the bars. The bar should be a rectangle that covers the entire range along the x-axis and goes to the appropriate frequency at the y-axis for each data range. Do not forget that the bars have to touch each other! So your graph should look something like this

And hot diggity dog! You have a histogram! It’s not too shabby either. All statistical software can make them and most spreadsheet software as well, but building them yourself is so satisfying.

See? It is no scary thing to read or build a histogram. The real goal of a histogram is to give you a sense of how the data looks and notice any patterns that may appear. Looking for a normal distribution is a big one! But that is for another post.

Happy statistics!