degrees of freedom

On Page 144 of Schweser book 1, why was degree of freedom calculated as n-2 in test of hypothesis.

For a test of a sample correlation with n points in each data set, the number of degrees of freedom is n – 2 (this is mentioned on page 143, I believe).

In general, the number of degrees of freedom is the number of data points less the number of parameters you are estimating. (Things will get a bit technical from here on; sorry.) When doing a regression analysis, the general assumption is that the X values are known with certainty, while the Y values are uncertain. (This is the reason that we measure the distance from a data point to the regression line only in the Y direction (which keeps the X value unchanged), instead of, say, perpendicular to the regression line (which would change both the X and Y values).) Because the correlation coefficient r = Cov(X,Y)/(sX × sY), two parameters for Y have to be estimated: μY (estimated as Y-bar, used in Cov(X,Y)) and σY (estimated as sY); thus we lose two degrees of freedom.

Thanks

Wow! That is heavy detail S2000. Love it!

Personally, I’d rather understand why it’s n – 2, rather than have to memorize that it’s n – 2 without understanding.

Glad I could be of some small help.