I am trying to plot data that only has two possible values – 1 (present) or 0 (absent) – clearly not a normal distribution. The max value could be 1, but my standard deviation bars go to 1.3, which is impossible. I tried increasing the sample size, but the max column value + standard deviation are still 1.3. Is it OK to manipulate my graph and cap my column bars off at 1 since it is not possible to have a sample value larger than 1?

  • 3
    $\begingroup$ What "standard deviation bars" are you talking about? What are you doing? What sort of graph? What are you trying to show? $\endgroup$ – Peter Flom May 29 '14 at 22:18
  • $\begingroup$ See the wikipedia page and search here for binomial distribution. $\endgroup$ – John May 29 '14 at 22:35
  • 2
    $\begingroup$ Define exactly what these "standard deviation bars" are giving, please. I suspect their definition (whatever it is) makes the value not "impossible", and you're simply plotting something other than your present needs. $\endgroup$ – Glen_b May 29 '14 at 23:17

What you have is a binomial distribution. The mean of your 0's and 1's is the proportion of 1's. The standard deviation is $\sqrt{p (1-p)}$, and the standard error is $\sqrt{\frac{p (1-p)}{n}}$ where $n$ is the number of samples. If you're trying to figure out a 95% confidence interval on the proportion (the mean), that would be $\pm 1.96 {\sqrt{\frac{p (1-p)}{n}}}$.

The maximum value of the proportion is 1, but that would only be the case when every sample point is equal to 1, and in that case, the standard deviation would be 0.

| cite | improve this answer | |
  • 4
    $\begingroup$ @Andre The data have a Binomial$(1,p)$ distribution while a particular statistic--their sum--has a Binomial$(n,p)$ distribution. To that extent the language in this answer is correct. It also contains a lot of relevant information--thank you, Sofia! In its present form it falls a little short of addressing the question, though. It should be pointed out that because $\sqrt{p(1-p)}\le 1/2$ and $p+\sqrt{p(1-p)}$ never exceeds $1.20711$, the "standard deviation bars" of the question cannot possibly extend to $1.3$. Thus we need clarification from the OP in order to develop good answers. $\endgroup$ – whuber May 29 '14 at 23:16

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.