Question: is r squared the residual?
Answer: R2=1−sum squared regression (SSR)total sum of squares (SST),=1−∑(yi−^yi)2∑(yi−ˉy)2. The sum squared regression is the sum of the residuals squared, and the total sum of squares is the sum of the distance the data is away from the mean all squared. As it is a percentage it will take values between 0 and 1.