In this article, we explain how to derive the expanded form of the S_{xx} formula from the original expression for the sum of squares S_{xx}. We will prove that both of the formulae for S_{xx} are equal. We will show that,

S_{xx }= ∑(X_{i} – X̅)^{2} = (∑X_{i}^{2}) – n*X̅^{2}

**Step 1: Write the original expression for Sxx and expand the square.**

We know that *(a-b) ^{2} = a^{2} – 2ab + b^{2}*. Therefore we have,

S_{xx} = ∑(X_{i} – X̅)^{2} = ∑(X_{i}^{2} – 2*X_{i}*X̅ + X̅^{2})

We then put the summation sign on each of the three terms,

S_{xx} = ∑X_{i}^{2} – ∑2*X_{i}*X̅ + ∑X̅^{2} (**Equation 1**)

Now, since the summation is taken from i=1 to i=n, over all of the X_{i} data values and since the mean X̅ is a constant, we have **∑X̅ ^{2} = nX̅^{2}**.

Similarly, we can pull the constant 2*X̅ out of the summation in the middlemost term to get, **∑2*X _{i}*X̅ = 2*X̅ ∑X_{i}**.

Substituting these expressions for the second and third term *in Equation 1* we get,

S_{xx} = ∑X_{i}^{2} – 2*X̅ ∑X_{i} + nX̅^{2} (**Equation 2**)

**Step 2: Use the formula for the Mean X̅ to substitute in the middle term.**

We know that the mean X̅ of the data values is given by the formula,

X̅ = ∑X_{i}/n.

This implies that,

∑X_{i} = n*X̅

Substituting the value of ∑X_{i} *in Equation 2* we get,

S_{xx} = ∑X_{i}^{2} – 2*X̅ *n*X̅ + nX̅^{2}

S_{xx} = ∑X_{i}^{2} – 2nX̅^{2} + nX̅^{2}* *

Since -2nX̅^{2}+nX̅^{2} = -nX̅^{2} we conclude that,

S_{xx }= (∑X_{i}^{2}) – n*X̅^{2}.

This concludes the derivation of the S_{xx} formula.