# How could forcing my regression line to go through the origin increase the R^2? [duplicate]

I created the scatterplot on the left in Tableau and ran the regression line, which resulted in an R^2 of 0.63 (confirmed this in excel as well). Then, I used the "Force y-intercept to zero" option in line settings and was surprised to find that the R^2 value of my regression line actually increased (see scatter on right with intercept of 0 and R^2 of 0.67). This is counter-intuitive to me because I thought that the purpose of a regression line was to create the line that results in the highest R^2 value. How could forcing it go to go through (0,0) increase the R^2? Thanks in advance for your help. • Actually the regression line is fit by least squares which minimizes the sum of squared residuals. This is not quite the same as maximizing R$^2$. Also the calculated R$^2$ has strange properties when the line is fit with constraints. Also if I read your graphs correctly the least squares line has an intercept near the origin.. – Michael R. Chernick Mar 7 '18 at 0:57