Tech Notes

My notes on Statistics, Big Data, Cloud Computing, Cyber Security

Sum of Squares, R Square

The method of least squares is a criterion for fitting a specified model to observed data. For example, it is the most commonly used method of defining a straight line through a set of points on a scatterplot.


The y-hat line above is the line of best fit (predictor line, estimator line)

To find the line of best fit, we have to square the residuals and add them together (otherwise the total would be 0). This is the sum of squares



SSR also called ESS – Explained sum of squares

SSE also called RSS  – Residual sum of squares

Y-bar line is the mean. (dotted blue line)

The black x mark represents the predicted value of Y. But the actual value is even higher. So diff between mean and predicted value is the explained deviation (green). Diff between the x and actual value is the unexplained deviation(red).


R-Square – is the proportion of the variation in Y being explained by the variation in X. Gives an indication of the goodness of fit of the model (also called coefficient of determination)


As the points are further away from the line, Rsquare decreases. That is – X is explaining less of Y. The relationship is getting weaker. R Square is the measure of the strength of the relationship between X & Y

Disclaimer : These are my study notes – online – instead of on paper so that others can benefit. In the process I’ve have used some pictures / content from other original authors. All sources / original content publishers are listed below and they deserve credit for their work. No copyright violation intended.

References for these notes :

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

%d bloggers like this: