Analyzing the Setup
Imagine you are standing on a vast, flat plain, and you are tasked with finding a single point that best represents a set of data points x1,x2,…,xn. You want to minimize the 'spread' or 'deviation' of these points from your chosen point c. This is the essence of Mean Square Deviation (MSD).
When we define the function:
MSD(c)=n1i=1∑n(xi−c)2
we are describing a beautiful, upward-facing parabola. If you expand
(xi−c)2, you get
xi2−2cxi+c2.
When you sum this over all n points and divide by n, you get a quadratic expression in terms of c. Every quadratic function f(c)=Ac2+Bc+C is a parabola. The lowest point, or the vertex, occurs exactly at the arithmetic mean, xˉ.
Translating the Problem into Algebra
The problem provides two specific points on this parabola. We are told the MSD about c=−1 is 7, and the MSD about c=1 is 3.
For
c=−1, we have:
n1i=1∑n(xi+1)2=7
Expanding this, we get
n1∑xi2+2xˉ+1=7. Let us call this
Equation (1).
For
c=1, we have:
n1i=1∑n(xi−1)2=3
Expanding this, we get
n1∑xi2−2xˉ+1=3. This is
Equation (2).
The Elegant Cancellation
We now have a system of two linear equations with two unknowns: the mean of squares n1∑xi2 and the mean xˉ.
If we subtract Equation (2) from Equation (1), the mean of squares and the constant
1 vanish:
(2xˉ)−(−2xˉ)=7−3
4xˉ=4⇒xˉ=1
To find the mean of squares, we add the two equations:
2(n1∑xi2+1)=10
n1∑xi2+1=5⇒n1∑xi2=4
Connecting to Variance and the Final Answer
The variance
σ2 is defined as the mean of the squares minus the square of the mean:
σ2=n1∑xi2−(xˉ)2
Substituting our calculated values:
σ2=4−(1)2=3
Geometrically, this variance is the minimum value of our MSD parabola. Since the mean is 1, and we were given that the MSD at c=1 is 3, we have confirmed that the vertex of our parabola is at c=1 with a minimum value of 3.
Finally, the standard deviation
σ is the square root of the variance: