Is the following dataset possible? "Is it possible to create a data set where $\bar{x}=30.0$, range $R=10$ (meaning the max-min=10), and variance $s^2=40.0$?"
I feel sort of dumb asking this question, but I'm not quite sure I'm on the right track. I know that with two data points, the max variance is $50$ if $x_1=25$ and $x_2=35$, and then when adding a third point, variance seems to drop to a maximum of around $33$ if I stay within the range.
Is that correct, and is there a more mathematical way to show what I've said? The most we've been given so far is the equation for sample variance, mean, and a couple paragraphs on what a standard deviation is.
 A: With a bounded random variable, the population standard deviation can't exceed half the population range (equivalently variance can't exceed one quarter of the square of the range). You can achieve that bound by splitting the population exactly in half and having half the population at the minimum and half at the maximum. So with a population (or in the limit as sample size $\to\infty$), it's impossible for a variable with a range of $10$ to have a standard deviation above $5$ (variance cannot exceed $25$).
Consequently in samples, $s_{n}=\sqrt{\frac{1}{n}\sum_i (x_i-\bar{x})^2}\leq (x_{(n)}-x_{(1)})/2$ (since the ECDF is a valid CDF, the bound must apply)
However because of Bessel's correction with samples, the standard deviation can exceed half the range --- sometimes you can have:
$s_{n-1}=\sqrt{\frac{1}{n-1}\sum_i (x_i-\bar{x})^2} =\sqrt{\frac{n}{n-1}} s_n > (x_{(n)}-x_{(1)})/2$
as long as $n$ is small enough and $s_n$ was already sufficiently close to its upper bound.
In your example, with $n=2$, the maximum value of sd is $s_{n-1}=\sqrt{\frac{2}{1}}s_n=\sqrt{2}\cdot\frac{10}{2}$; equivalently variance can be as high as $2\cdot \frac{10^2}{2^2}= 50$. Indeed, to make the range 10 with $n=2$ you must have $s_n=5$, and as a result sample variance, $s_{n-1}^2$ must be $50$.
But as soon as you add a third observation, there are two effects operating to make it smaller; with the "$s_n^2$ cannot exceed the square of half the range" effect, sample variance is limited to $\frac{3}{2}\cdot 25=37.5$, but in fact that's not achievable because you can't split the third observation equally to the extremes of the range, so you can only get up to $33\frac{1}{3}$; it only goes down more with $n$ after that.

It's possible to put all this reasoning into a formal mathematical argument... but that looks like an exercise to me (i.e. a self-study question), so this outline should be more than sufficient.  (I've also relied on the fact that the population variance is limited to the square of half the range -- you'd need to establish that if you want a formal argument.)
