Let us say we have $n$ random values $x_i$ chosen from an interval $[a,b]$. What would be the maximum possible variance $Var(X)=\frac{1}{n}\sum_{i=1}^n(x_i-\bar{x})^2$?
The number $(b-a)/2$ sounds plausible, can we prove this guess?
Let us say we have $n$ random values $x_i$ chosen from an interval $[a,b]$. What would be the maximum possible variance $Var(X)=\frac{1}{n}\sum_{i=1}^n(x_i-\bar{x})^2$?
The number $(b-a)/2$ sounds plausible, can we prove this guess?
This is not a rigorous proof (for that have a look here) but can be useful anyhow.
Also it illustrates how handsome it can be to standardize.
Personally I dislike parameters and always seek for possibilities to get rid of them.
First let's solve this for $a=-1, b=1$ and $n$ is even.
Purely on intuition I state that the variance will take maximal value if the $x_i$ take the extreme values $1,-1$ with equal frequency.
So e.g. if $x_i=-1$ if $i$ is even and $x_i=1$ if $i$ is odd.
Then $\overline x=0$ and $\mathsf{Var}(X)=1$.
If $y_i$ is chosen from $[a,b]$ then we take $y_i=\frac12(b-a)x_i+\frac12(a+b)$ and find easily that $\mathsf{Var}(Y)=\frac14(b-a)^2$.
If $n$ is odd then (again purely on intuition) the same idea except that one of $x_i$ takes value $0$.