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 rr squared (often written r^2r2) is simply
color(white)("XXXXX")XXXXXr xx rr×r for whatever the value of rr is

For example if r =16r=16
then rr squared (or r^2r2) = 16 xx 16 = 256=16×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)) r2=1SSErrSSTot

Explanation:

The SS_(Err)SSErr or the sum of squares residuals is:
\sum y_i^2 - B_0\sumy_i-B_1\sum x_iy_iy2iB0yiB1xiyi
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_1xB0andB1x (i.e. Y=B_0+B_1xY=B0+B1x).

For a system with 2 unknown parameters/variables, x_1x1 and x_2x2, the calculated y-value would be the sum of B_0 B0, B_1xB1x, and B_2x_2B2x2 (i.e. Y=B_0+B_1x_1+B_2x_2Y=B0+B1x1+B2x2).

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.