Error Bar Below Zero
Contents |
here for a quick overview of the site Help Center Detailed answers to any questions you might have Meta Discuss the workings and policies of can standard error be negative this site About Us Learn more about Stack Overflow the company Business
How To Read Error Bars
Learn more about hiring developers or posting ads with us MathOverflow Questions Tags Users Badges Unanswered Ask Question
Overlapping Error Bars
_ MathOverflow is a question and answer site for professional mathematicians. Join them; it only takes a minute: Sign up Here's how it works: Anybody can ask a question Anybody
Standard Deviation Greater Than Mean
can answer The best answers are voted up and rise to the top Is it alright for STD error bars to be below zero? up vote 1 down vote favorite 1 I have some statistical data from which I want to graph the means and use the standard deviations as error bars. However this produces a graph with some of the what is an error bar error bars passing below zero. A negative value is silly for this data (mean trip times), so I was wondering what is a sensible way to graph the data. st.statistics mathematical-writing exposition share|cite|improve this question edited Jul 6 '12 at 8:44 Federico Poloni 8,36323460 asked Nov 10 '09 at 10:50 hoju 12216 1 Perhaps you could clarify what you mean by STD? Is it standard deviation? Also, you could use the [statistics] tag. –Sonia Balagopalan Nov 10 '09 at 12:47 1 Yes, "STD" is an unfortunate acronym. –Theo Johnson-Freyd Nov 10 '09 at 19:04 in the context of a math question, do you really need clarification what STD means? –hoju Nov 10 '09 at 20:30 add a comment| 4 Answers 4 active oldest votes up vote 7 down vote accepted Your error bars may be giving you a hint to look more closely at the distribution of your data: it may not be symmetric. For example, if your data is essentially log-normal you could work with the logs of your numbers and the problem will automatically go
Tour Start here for a quick overview of the site Help Center Detailed answers to any questions you might have Meta Discuss the workings and policies of this site About Us Learn more about Stack Overflow how to calculate error bars the company Business Learn more about hiring developers or posting ads with us Cross Validated error bars in excel Questions Tags Users Badges Unanswered Ask Question _ Cross Validated is a question and answer site for people interested in statistics, machine standard error excel learning, data analysis, data mining, and data visualization. Join them; it only takes a minute: Sign up Here's how it works: Anybody can ask a question Anybody can answer The best answers are voted up and rise http://mathoverflow.net/questions/4840/is-it-alright-for-std-error-bars-to-be-below-zero to the top I am getting a number below zero when calculating out two standard deviations from the mean. Is this ok? up vote 6 down vote favorite I am not a math wizard, so please keep your response simple enough. I need to complete a statistics screening exam for a methods course later on today, and I am hung up on one topic that came up during the practice test. The data http://stats.stackexchange.com/questions/47926/i-am-getting-a-number-below-zero-when-calculating-out-two-standard-deviations-fr set I got was in reference to the number of homicides that have occurred in a number of cities. The range of this data is 0-5. When I am putting together confidence intervals and calculating out as much as two standard deviations from the mean I am getting low values that are negative. Obviously you cannot have a negative number of homicides. When calculating the confidence intervals out to two standard deviations from the mean should I present the low value at ZERO or should I actually present the negative number? For example, if a 95% CI caused the calculation to be -1.5 to 3, would I present that or would I present 0 to 3? Thanks. standard-deviation share|improve this question edited Jan 17 '13 at 9:24 Scortchi♦ 18.4k63370 asked Jan 17 '13 at 8:09 Rick 3112 2 This issue is common when dealing with positive numbers. To the best of my knowledge, both are accepted depending on point of view. However, what people most often do is to construct a confidence interval for the logarithm of the parameter ($\in \mathbb{R}$) and then exponentiate the confidence interval. –ocram Jan 17 '13 at 8:14 Thanks for the help. Logs aren't part of the practice test material so I am going to assume that they will not ex
here for a quick overview of the site Help Center Detailed answers to http://stackoverflow.com/questions/13312820/how-do-i-plot-just-the-positive-error-bar-with-pyplot-bar any questions you might have Meta Discuss the workings and policies of this site About Us Learn more about Stack Overflow the company Business Learn more about hiring developers or posting ads with us Stack Overflow Questions Jobs Documentation Tags Users Badges Ask Question x Dismiss Join the Stack Overflow Community error bar Stack Overflow is a community of 4.7 million programmers, just like you, helping each other. Join them; it only takes a minute: Sign up How do I plot just the positive error bar with pyplot.bar? up vote 9 down vote favorite 2 I'm trying to plot 4 average values with positive error error bar below bars and the max value within the plot. means = [26.82,26.4,61.17,61.55] # Mean Data stds = [4.59,4.39,4.37,4.38] # Standard deviation Data peakval = ['26.82','26.4','61.17','61.55'] # String array of means ind = np.arange(len(means)) width = 0.35 colours = ['red','blue','green','yellow'] pyplot.figure() pyplot.title('Average Age') for i in range(len(means)): pyplot.bar(ind[i],means[i],width,color=colours[i],align='center',yerr=stds[i],ecolor='k') pyplot.ylabel('Age (years)') pyplot.xticks(ind,('Young Male','Young Female','Elderly Male','Elderly Female')) def autolabel(bars,peakval): for ii,bar in enumerate(bars): height = bars[ii] pyplot.text(ind[ii], height-5, '%s'% (peakval[ii]), ha='center', va='bottom') autolabel(means,peakval) However I can can't find out how to plot only the positive error bars. So I end up with a graph like this: Any suggestions would be greatly appreciated. python matplotlib bar-chart share|improve this question edited Nov 9 '12 at 19:40 Bakuriu 45.2k674117 asked Nov 9 '12 at 17:17 Limited Intelligence 15027 add a comment| 1 Answer 1 active oldest votes up vote 9 down vote accepted If I understood correctly you can do this: import numpy as np from matplotlib import pypl