How do you calculate r squared by hand?

2 Answers
May 31, 2015

Assuming this is a general question and not a reference to some undeclared statistical equation,

and assuming you know how to multiply two numbers together by hand,

then r squared (often written r^2) is simply
color(white)("XXXXX")r xx r for whatever the value of r is

For example if r =16
then r squared (or r^2) = 16 xx 16 = 256

However I suspect you had some specific statistical relationship in mind; please resubmit with explicit references if this is the case.

r^2 = 1- (SS_(Err))/(SS_(Tot))

Explanation:

The SS_(Err) or the sum of squares residuals is:
\sum y_i^2 - B_0\sumy_i-B_1\sum x_iy_i
or
simply the square of the value of the residuals. The residual value is difference between the obtained y-value and the expected y-value. The expected y-value is the calculated value from the equation of line/plane.

For example, for a system with 1 unknown parameter/variable x, the calculated y-value would be the sum of B_0 and B_1x (i.e. Y=B_0+B_1x).

For a system with 2 unknown parameters/variables, x_1 and x_2, the calculated y-value would be the sum of B_0 , B_1x, and B_2x_2 (i.e. Y=B_0+B_1x_1+B_2x_2).

And in general, Y=B_0+B_1x_1+B_2x_2+B_3x_3+B_4x_4+...+B_nx_n

Furthermore, the SS_(Tot) = \sumy_i^2 - ((sumy_i)^2)/(n) where n is the number of observations or trials.