CCalclabhub

Statistics

Residual sum of squares

Square each observed minus predicted gap and add them all. Squaring removes the sign, so large misses count much more than small ones and cannot cancel out.

Last updated

The Formula

SSresidual = sum of (yi - pi)^2

Square each observed minus predicted gap and add them all. Squaring removes the sign, so large misses count much more than small ones and cannot cancel out.

SymbolMeaning
yiObserved value for case i
piPredicted value for case i

What Each Symbol Means

yivalue units

Observed value for case i

The actual measured value paired with prediction pi.

pivalue units

Predicted value for case i

The model's fitted value for the same case, sometimes written as y-hat.

See It Worked With Real Numbers

A formula on its own does not tell you which number goes where. The how to calculate the coefficient of determination page applies this equation to a concrete case, shows every intermediate step, and names the mistakes that produce a wrong answer even when the algebra is right.

Where This Formula Appears

This equation is the working core of How To Calculate The Coefficient Of Determination, filed under Math. Every number the guide produces comes from substituting into this one line.

Common Questions

What is the formula for Residual sum of squares?

The formula for Residual sum of squares is SSresidual = sum of (yi - pi)^2. Square each observed minus predicted gap and add them all. Squaring removes the sign, so large misses count much more than small ones and cannot cancel out.

What does each symbol in Residual sum of squares stand for?

yi is observed value for case i; pi is predicted value for case i.

What units should I use with Residual sum of squares?

Substitute yi in value units, pi in value units. Convert every input to those units before you start, because the equation only returns the right answer when the units on both sides agree.

What is a common mistake when using Residual sum of squares?

Using the wrong baseline for total variation. The total sum of squares compares observations with their own mean of 6, not with zero or with the model's predictions. Using zero as the baseline gives 3 + 25 + 49 + 81 = 158 instead of 20, which collapses the ratio and destroys the result. Compute the mean first and subtract it from each observed value.