APPENDIX VI: Putting Error Bars on Graphs
(back to table of contents; back to stats page)
When displaying mean values on scatterplots or bar graphs,
it's almost never OK to display the mean values without somehow representing spread or variation in the data. Just as you (or a statistical test) need to know something about variation in the data to determine whether a mean value of 5 is meaningfully different from a mean value of 7, a graph should display variation around mean values so that viewers can correctly interpret possible differences between those means.
The examples below give some tips for using error bars (as opposed to graphing all raw data) to represent variation around mean values. The first example is for a scatterplot, the second for a bar graph. These examples assume that you already know how to make these basic types of graphs. If you need help getting started with your graphs, try these links for basic directions:
scatterplot,
bar graph,
graph formatting.
Scatterplots vs. Bar Graphs
By convention, scatterplots are used for displaying data that are numerical measurements such as size, weight, etc. By contrast, bar graphs are typically used for displaying data that represent counts, percentages, or frequencies.
What Values to Use for Error Bars
-
The three most common choices for error bars are standard deviation, standard error, and two standard errors (= 2 x the standard error). As long as you state what you used in your figure description, any of these options is acceptable. One advantage of using two standard errors is that visually, two standard errors roughly corresponds to statistical significance: if the error bars representing two standard errors for different mean values do not overlap at all, it's likely that those mean values are statistically different.
-
The next graph shows the same mountain lion data with error bars representing two standard errrors. Even though the error bars are smaller than in the previous graph, they do overlap, and, in this example the means are not significantly different (df=18, p=0.20, t-Test assuming equal variances).
Figure VIb. Scatterplot showing the mean weights for the mountain lion data from Chapter 1. Error bars represent two standard errors. Even though the error bars are smaller than in Figure VIa, they still overlap. (If there is no overlap between error bars representing two standard errors, the mean values are likely to be significantly different.)
An Example Using a Bar Graph
-
The same method described above can be used to add error bars to a bar graph, though often the error bars are only represented extending above the main bars of the graph. Remember, you graph must be clicked or highlighted, then go to the Chart Tools, Layout tab to see the Error Bars option. This screenshot shows the options you would choose in the Format Error Bars window before you click the Specify Values button:
-
Note: In your Custom Error Bars window, be sure to enter values for both Positive Error Value and Negative Error Value options even if only displaying error bars above the main bars in your graph; if you leave the Negative Error Values blank (or the default ={1}), Excel may not display your error bars correctly.
-
The following two graphs are based on the butterfly data introduced in Chapter 2. You can find the data for these graphs on the butterfly data sheet of this Excel Workbook.
Figure VId. Bar chart showing mean survival from the caterpillar data from Chapter 2. Because no variability in the data is shown (only mean values), we have no way of knowing whether the wild mustard diet results in consistently higher survival rates. For example, some of the values for survival on wild mustard could have been extremely low.
Figure VId. Bar chart showing the caterpillar survival data from Chapter 2. Error bars represent two standard errors. Because error bars are represented, we can see that there appears to be little difference between the broccoli and cabbage diets (high overlap between error bars). However, the wild mustard diet appears to result in higher survival rates as its error bar has little overlap with those for the other diets. Of course, a formal statistical test (such as Anova) should be done to confirm that the means are significantly different.
-
Templates - There are two sheets (scatterplot with error bars, bar graph with error bars) in this Excel Workbook that might be useful as templates if you have mean values and standard deviations for data you would like to graph. Of course, you'll have to adjust the formatting. Good luck!