The formula for b1 = sum(Yi-Y)(Xi-X) / sum(Xi-X) ^2

This is the formula for the b1 in a regression. Y and X = mean

However, I thought slope was the correct forumla for b1? From the Schweser formula sheet the formula for slope is: cov(xy)/var(x)

So it is somewhat similar to the formula for b1, but not the same. What do we need the slope for?

Sorry for bad notation on formulas! Don’t know how I could do it better, any suggestions?