MathOverflow is a question and answer site for professional mathematicians. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

Given a set with a known cardinality, least upper and greatest lower bound; how can I calculate the maximum possible standard deviation for any set of values within the set.

As an example:

Given a set {1,50}, with mean of 25.5, the std. dev. for both members at 34.65. This std. dev. is the possible for a set with a cardinality of 2, greatest lower bound of 1, and least upper bound of 50.

Here are some examples I have calculated by hand:

F(2, 1, 50) = 34.65 (as above)

F(3, 1, 50) = 28.29

F(4, 1, 50) = 28.29

F(5, 1, 50) = 26.84

F(6, 1, 50) = 26.84

F(7, 1, 50) = 26.19

F(8, 1, 50) = 26.19

share|cite|improve this question
Are you allowed to repeat values? Does the set {1,1,50} have two or three elements? – Alex R. Dec 14 '10 at 20:16
Unless I am mistaken, the standard deviation should be greatest for a distribution which is bimodal: for your example, as many occurrences of 1 as of 50. If so, should this not simplify the calculation for you? Gerhard "Not Sure About His Statistics" Paseman, 2010.12.14 – Gerhard Paseman Dec 14 '10 at 20:19
up vote 1 down vote accepted

The sample deviation is maximized when half of the observations are at each extreme. If you want a formula for the maximum standard deviation as a function of the interval endpoints and the number of samples, you will probably want to divide the formula up depending on whether the number of samples is even or odd.

share|cite|improve this answer
There is also a stats stackexchange if I am not mistaken, where this question may be more appropriate. – maxdev Dec 14 '10 at 20:27

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

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