-4

I have a normal distribution of data with a mean of 0. I know that 80% of the data falls within 3 units of the mean. So 80% of the data is from -3 to 3. How do I figure out the standard deviation?

I'd like to implement this in Java. Input the percent (80 in this case) and the distance from the mean (3 in this case) and have it tell me the standard deviation.

Jeremy
  • 1,023
  • 3
  • 18
  • 33
  • Start by figuring out the math. Then try to implement it in Java. Let us know if you have any (specific) problems. – pamphlet Jul 24 '14 at 17:48
  • 1
    Start here: http://en.wikipedia.org/wiki/Normal_distribution There is a table taht will help you derive your answer – Destruktor Jul 24 '14 at 18:10

1 Answers1

0

In case anyone else is looking to figure out the standard deviation when you know X% of the population is within Y units of the mean, I think I figured it out with Java. Commons Math has a nice library for error functions so I used that.

SD = Math.sqrt(2) * Erf.erfcInv(1 - p) where 0 <= p <= 1

So that will give you the standard deviation for Y units from the mean. Hope that helps.

Jeremy
  • 1,023
  • 3
  • 18
  • 33