0% found this document useful (0 votes)
196 views9 pages

Bar Graphs and Histograms

This document discusses how to create bar graphs and histograms in Excel. It explains that bar graphs display one or two independent variables on the x-axis and a dependent variable on the y-axis. Histograms summarize grouped data by counting values that fall within bins of a variable. The document provides step-by-step instructions for making bar graphs and histograms, including using the FREQUENCY function to calculate bin frequencies for histograms.

Uploaded by

Leon Fourone
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
196 views9 pages

Bar Graphs and Histograms

This document discusses how to create bar graphs and histograms in Excel. It explains that bar graphs display one or two independent variables on the x-axis and a dependent variable on the y-axis. Histograms summarize grouped data by counting values that fall within bins of a variable. The document provides step-by-step instructions for making bar graphs and histograms, including using the FREQUENCY function to calculate bin frequencies for histograms.

Uploaded by

Leon Fourone
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 9

Bar Graphs and Histograms

Introduction

Bar graphs are created in much the same way scatter plots and line graphs are.
Histograms are a specialized type of bar graph used to summarize groups of data.

Creating a bar graph with one independent variable

Data is entered into Excel much in the same way as it is with scatter plots and line
graphs:

Note that the independent variable is placed in the first column while the dependent
variable is placed in the second column. The headers at the top of each column are not
necessary, but they do help identify the variables.

With the data you want graphed highlighted, start the chart wizard:

If the Chart Wizard is not visible, you can also choose Insert > Chart...

Bar Graphs and Histograms


Page 1 of 9
Choose the Column Chart type and the Chart sub-type in the upper left corner
(basic bar graph). This chart type creates a vertical bar graph, which Excel refers to as a
Column chart. If you want to create a horizontal bar graph, choose the Bar chart type.
Click Next when you are done.

Bar Graphs and Histograms


Page 2 of 9
Confirm that your Data Series are in Columns in your spreadsheet. Your Data range
should reflect your selection of the independent and dependent data (plus possibly your
column headers) in absolute cell references. The preview should show a pretty good
representation of what your chart will look like. Click Next when you are done.

Enter your titling. Also make sure to go to the Legend tab and click off the Show
Legend option. You will not need a legend with only one independent variable. Click
Next or Finish when you are done.

Bar Graphs and Histograms


Page 3 of 9
Your final graph should look something like the one above. Note that when the graph is
selected, your independent and dependent variables are highlighted in purple and blue
boxes, respectively.

Return to Top

Creating a bar graph with two independent variables

A multiple bar graph depicting data using two independent variables is created in the
same way as a simple bar graph:

Bar Graphs and Histograms


Page 4 of 9
Some things to note when creating this multiple bar graph:

• The first independent variable, mammal, is still in the first column, with the
dependent variable values in columns two and three. The second and third
columns represent dependent variable values at two different levels of the
second independent variable, week.
• Make sure to select all of the data when creating the graph. The Chart wizard
will automatically recognize you have a second independent variable.
• When you get to the last step of the Chart wizard, keep the legend turned on,
since it shows the coding for the two levels of the second independent variable.

Return to Top

Adjusting bar spacing

The relative widths of bars to the gap between the bars can be adjusted by double-
clicking on one of the bars in the graph:

• Gap width represents the spacing between bars as a percentage of the width of
one bar
• Overlap will overlap touching bars as a percentage of bar width.

Return to Top

Introduction to histograms

In some investigations, you may find yourself collecting a large number of data points
for a single level of an independent variable. That is, you take the same measurement
over and over again. You would do this because a lack of perfect precision in your
Bar Graphs and Histograms
Page 5 of 9
measuring process would not let you get a good estimate of the true value with only a
single measurement. In this example, the fracture stress of a certain type of glass bar is
measured 24 times:

Clearly, the measured stress is not the same for each sample. In fact, the measurements
range from a low of 55 to a high of 169. How can you summarize the results of these
measurements? One way might be to simply calculate the average (mean) of all these
measurements. This would not, however, give you a good feel for how the data is
distributed. A distribution graph, or histogram, allows you to see how many
measurements fall within set ranges, or bins, of the dependent variable. A histogram is
usually depicted as a bar chart, with one bar representing the count of how many
measurements fall with a single bin.

Return to Top

Histograms - using the FREQUENCY function

To start with, it is usually a good idea to scan your data and get a feel for its overall
range. For the data above, the range is from 55 to 169. Next you will want to decide
how fine you want the increment of your bins. The finer the increment, the more bins,
and thus the more bars on your chart. For this example we will choose a bin increment
of 15 starting with 70. Depending on what you want to depict, you may want to show an
empty bin above and/or below the extreme values of your samples to show the viewer
that you are at the extremes of your data set. Type in these bin increments in a column
next to your raw data:

Bar Graphs and Histograms


Page 6 of 9
Though you can manually count the number of measurements that fall within each of
these bins, an easier way is to use the Excel function FREQUENCY. This function is a
bit different than most in that it takes two arguments within the parentheses of the
function (see the figure below):

Follow these steps to enter in this function:

Bar Graphs and Histograms


Page 7 of 9
• Highlight the range of cells which will hold the frequency counts. These will be
all of the cells next to the bin increments. The FREQUENCY function is an
array function, returning values to a range of cells.
• Type the FREQUENCY function into the formula bar (e.g.,
=FREQUENCY(M3:M26,O3:O8)
• Enter the function by typing Control-Shift-Enter on a PC (type Command-
Enter on the Mac).

The frequency values should now fill the cells next to the bin increments. Note that your
first bin increment, 70, holds all the measurements at 70 and below. The next bin, 95,
holds measurements from 71-95, and so on. The result should look like this:

If only the top cell is filled with a frequency value, then you probably either didn't
highlight the range of cells next to the bin increments, or you didn't use the special key
combination to enter the function. Note that in the above figure, the last bin value, 195,
was changed to More to indicate that it represents the count for everything above 170.

Return to Top

Creating a histogram

You can now create a bar graph as you did above using the histogram summary data
rather than the raw data:

Bar Graphs and Histograms


Page 8 of 9
Note again that this histogram is made from the summary data (highlighted in purple
and blue boxes), not the raw data.

Just as you can with other data, you can create a multiple bar histogram. You can either
do this as was shown above or by superimposing two histograms (see the Advanced
module on superimposing graphs).

Bar Graphs and Histograms


Page 9 of 9

You might also like