Eqn 1: Variance in general= sum of (xi - mean of x)^2 / (n-1)
Eqn 2: Formula to find slope coefficient, b1 = Cov(y,x)/var(x) where var(x) = sum of (xi - mean of x)^2
Notice that Eqn 2’s var(x) does not divide by (n-1)
I’m just wondering what is the difference in definition between variance in general (Eqn1) and var(x) used to calculate the slope coefficient, b1 (Eqn2) such that both the variances are calculated differently?
Thanks 
Hello,
You have to make a distinction between variance and population variance.
Eqn 1:
Population variance = sum of (xi - mean of x)^2 / (n)
Sample variance = sum of (xi - mean of x)^2 / (n - 1)
Eqn 2:
If you know the X variance (population varianceT then b1 = Cov(y,x)/var(x) where var(x) = sum of (xi - mean of x)^2/n
If you estimate X variance (sample variance) then b1 = Cov(y,x)/var(x) where var(x) = sum of (xi - mean of x)^2/(n-1)
Hi there, I agree with your statement on population variance vs sample variance.
And theoretically, I thought that b1 = Cov(y,x)/var(x) where var(x) = sum of (xi - mean of x)^2 / (n-1) as you have quoted below too.
“If you estimate X variance (sample variance) then b1 = Cov(y,x)/var(x) where var(x) = sum of (xi - mean of x)^2/(n-1)”
But if you look at CFAI text practice question 6D, the formula is Cov(y,x)/var(x) where var(x) is sum of (xi-mean of x)^2
Hence i was wondering why it did not divide by (n-1)
OK i re-read it. I missed out the part where (n-1) numerator and denominator cancels out
That’s because the numerator Cov(x,y) has (n-1) as the denominator var(x) has (n-1) which effectively cancels out.

I think I found the problem, Both covariance and variance (sample) are divided by n - 1. So their ratio does away with n - 1
Cov = sum(xi - meanX) * sum (yi - meanY)/(n-1)
Var sum of (xi - mean of x)^2 / (n - 1)
Cov/Var = sum(xi - meanX) * sum (yi - meanY)/(n-1) / sum of (xi - mean of x)^2 / (n - 1)
=sum(xi - meanX) * sum (yi - meanY)/ sum of (xi - mean of x)^2