How To Read An Error Bar Graph
Contents |
in a publication or presentation, you may be tempted to draw conclusions about the statistical significance of differences between group means by looking at whether the error bars overlap. Let's look at two contrasting examples. standard error bars excel What can you conclude when standard error bars do not overlap? When standard
How To Calculate Error Bars
error (SE) bars do not overlap, you cannot be sure that the difference between two means is statistically significant. Even though
Overlapping Error Bars
the error bars do not overlap in experiment 1, the difference is not statistically significant (P=0.09 by unpaired t test). This is also true when you compare proportions with a chi-square test. What
How To Draw Error Bars
can you conclude when standard error bars do overlap? No surprises here. When SE bars overlap, (as in experiment 2) you can be sure the difference between the two means is not statistically significant (P>0.05). What if you are comparing more than two groups? Post tests following one-way ANOVA account for multiple comparisons, so they yield higher P values than t tests comparing just two groups. So error bars standard deviation or standard error the same rules apply. If two SE error bars overlap, you can be sure that a post test comparing those two groups will find no statistical significance. However if two SE error bars do not overlap, you can't tell whether a post test will, or will not, find a statistically significant difference. What if the error bars do not represent the SEM? Error bars that represent the 95% confidence interval (CI) of a mean are wider than SE error bars -- about twice as wide with large sample sizes and even wider with small sample sizes. If 95% CI error bars do not overlap, you can be sure the difference is statistically significant (P < 0.05). However, the converse is not true--you may or may not have statistical significance when the 95% confidence intervals overlap. Some graphs and tables show the mean with the standard deviation (SD) rather than the SEM. The SD quantifies variability, but does not account for sample size. To assess statistical significance, you must take into account sample size as well as variability. Therefore, observing whether SD error bars overlap or not tells you nothing about whether the difference is, or is not, statistically significant. W
bars? Say that you were looking at writing scores broken down by race and ses. You might want to graph the mean how to make error bars and confidence interval for each group using a bar chart with error large error bars bars as illustrated below. This FAQ shows how you can make a graph like this, building it up step sem error bars by step. First, lets get the data file we will be using. use http://www.ats.ucla.edu/stat/stata/notes/hsb2, clear Now, let's use the collapse command to make the mean and standard deviation by race and ses. https://egret.psychol.cam.ac.uk/statistics/local_copies_of_sources_Cardinal_and_Aitken_ANOVA/errorbars.htm collapse (mean) meanwrite= write (sd) sdwrite=write (count) n=write, by(race ses) Now, let's make the upper and lower values of the confidence interval. generate hiwrite = meanwrite + invttail(n-1,0.025)*(sdwrite / sqrt(n)) generate lowrite = meanwrite - invttail(n-1,0.025)*(sdwrite / sqrt(n)) Now we are ready to make a bar graph of the data The graph bar command makes a pretty good bar graph. graph bar meanwrite, over(race) http://www.ats.ucla.edu/stat/stata/faq/barcap.htm over(ses) We can make the graph look a bit prettier by adding the asyvars option as shown below. graph bar meanwrite, over(race) over(ses) asyvars But, this graph does not have the error bars in it. Unfortunately, as nice as the graph bar command is, it does not permit error bars. However, we can make a twoway graph that has error bars as shown below. Unfortunately, this graph is not as attractive as the graph from graph bar. graph twoway (bar meanwrite race) (rcap hiwrite lowrite race), by(ses) So, we have a conundrum. The graph bar command will make a lovely bar graph, but will not support error bars. The twoway bar command makes lovely error bars, but it does not resemble the nice graph that we liked from the graph bar command. However, we can finesse the twoway bar command to make a graph that resembles the graph bar command and then combine that with error bars. Here is a step by step process.First, we will make a variable sesrace that will be a single variable that contains the ses and race information. Note how sesrace has a
Health Search databasePMCAll DatabasesAssemblyBioProjectBioSampleBioSystemsBooksClinVarCloneConserved DomainsdbGaPdbVarESTGeneGenomeGEO DataSetsGEO ProfilesGSSGTRHomoloGeneMedGenMeSHNCBI Web SiteNLM CatalogNucleotideOMIMPMCPopSetProbeProteinProtein ClustersPubChem BioAssayPubChem CompoundPubChem SubstancePubMedPubMed HealthSNPSparcleSRAStructureTaxonomyToolKitToolKitAllToolKitBookToolKitBookghUniGeneSearch termSearch Advanced Journal list Help Journal ListJ Cell Biolv.177(1); 2007 https://www.ncbi.nlm.nih.gov/pmc/articles/PMC2064100/ Apr 9PMC2064100 J Cell Biol. 2007 Apr 9; 177(1): 7–11. doi: 10.1083/jcb.200611141PMCID: PMC2064100FeaturesError bars in experimental biologyGeoff Cumming,1 Fiona Fidler,1 and David L. Vaux21School of Psychological Science and http://mathbench.umd.edu/modules/prob-stat_bargraph/page08.htm 2Department of Biochemistry, La Trobe University, Melbourne, Victoria, Australia 3086Correspondence may also be addressed to Geoff Cumming (ua.ude.ebortal@gnimmuc.g) or Fiona Fidler (ua.ude.ebortal@reldif.f).Author information ► Copyright and License information error bar ►Copyright © 2007, The Rockefeller University PressThis article has been cited by other articles in PMC.AbstractError bars commonly appear in figures in publications, but experimental biologists are often unsure how they should be used and interpreted. In this article we illustrate some basic features of error bars and explain how they can help communicate data and assist how to read correct interpretation. Error bars may show confidence intervals, standard errors, standard deviations, or other quantities. Different types of error bars give quite different information, and so figure legends must make clear what error bars represent. We suggest eight simple rules to assist with effective use and interpretation of error bars.What are error bars for?Journals that publish science—knowledge gained through repeated observation or experiment—don't just present new conclusions, they also present evidence so readers can verify that the authors' reasoning is correct. Figures with error bars can, if used properly (1–6), give information describing the data (descriptive statistics), or information about what conclusions, or inferences, are justified (inferential statistics). These two basic categories of error bars are depicted in exactly the same way, but are actually fundamentally different. Our aim is to illustrate basic properties of figures with any of the common error bars, as summarized in Table I, and to explain how they should be used.Table I.Common error barsWhat do error bars tell you?Descriptive error bars. Range and standar
and found 6: Error bars 7: Practice with error bars 8: And another way: the standard error 9: The same graph both ways 10: Review map| <| >| home Another way to add info: the standard error Graphs using standard deviation (SD) tell you what a big population of fish would look like -- whether their sizes would be all uniform, or somewhat raggedy, or totally raggedy. Sometimes, though, you don't really care what a population looks like, you just want to know, did a treatment (like Fish2Whale instead of other competing brands) make a difference on average? In that case you measure a bunch of fish because you're trying to get a really good estimate of the average effect, despite whatever raggediness might be present in the populations. Let's say your company decides to go all out to prove that Fish2Whale really is better than the competition. They convert a supply closet into an acquarium, hatch 400 fish, and tell you to do a HUGE experiment. The whole idea of the HUGE experiment is to get a really accurate measurement of the effect of Fish2Whale, despite the natural differences such as temperature, light, initial size of fish, solar flares, and ESP phenomena. The return on their investment? Really small error bars. But how do you get small error bars? Just using 400 fish WON'T give you a smaller SD. A huge population will be just as "ragged" as a small population. Instead, you need to use a quantity called the "standard error", or SE, which is the same as the standard deviation DIVIDED BY the square root of the sample size. Since you fed 100 fish with Fish2Whale, you get to divide the standard deviation of each result by 10 (i.e., the square root of 100). Likewise with each of the other 3 brands. So your reward for all that work is that your error bars are much smaller: Why should you care about small error bars? Well, as a rule of thumb, if the SE error bars for the 2 treatments do not overlap, then you have shown that the treatment made a difference. (This is not a statistical test, but simply a way to visualize what your results mean. Many statistical tests are actually based on the exact amount of overlap of the SE bars, but they can get quite technical. For now, we'll just assume that no overlap = a true difference between the treatments.) So, in order to show that Fish2Whale really is better than the competitors, NOT ONLY does the mean growth need to be higher, but (mean