ContentsToggle key Menu 1 definition 2 translate of the $R^2$ value 3 Worked example 4 video clip Examples 5 external Resources 6 view Also

Definition

The *coefficient the determination*, or $R^2$, is a measure up that gives information around the goodness of right of a model. In the paper definition of regression the is a statistics measure of exbrickandmortarphilly.comtly how well the regression line approximates the really data. The is therefore important once a statistical design is used either come predict future outcomes or in the experimentation of hypotheses. There are a number of variants (see comment below); the one presented here is commonly used

eginalign R^2&=1-frbrickandmortarphilly.com extsum squared regression (SSR) exttotal sum of squares (SST),\ &=1-frbrickandmortarphilly.comsum(y_i-haty_i)^2sum(y_i-ary)^2. endalign The *sum squared regression* is the amount of the residuals squared, and also the *total amount of squares* is the amount of the distance the data is away from the median all squared. Together it is a percent it will certainly take values between $0$ and $1$.

You are watching: Sum of squares r

Here room a few examples that interpreting the $R^2$ value:

$R^2$ **Values**

**Interpretation**

**Graph**

$R^2=1$ | All the variation in the $y$ values is brickandmortarphilly.comcounted for by the $x$ values | |

$R^2=0.83$ | $83$% the the sports in the $y$ worths is brickandmortarphilly.comcounted because that by the $x$ values | |

$R^2=0$ | None the the sport in the $y$ values is brickandmortarphilly.comcounted because that by the $x$ values | |text-top|400px Solution To calculation $R^2$ you require to discover the sum of the residuals squared and the full sum the squares. Start off by recognize the residuals, i beg your pardon is the distance from regression line to every data point. Work-related out the predicted $y$ worth by plugging in the equivalent $x$ value into the regression line equation. For the allude $(2,2)$eginalign haty&=0.143+1.229x\ &=0.143+(1.229 imes2)\ &=0.143+2.458\ &=2.601 endalign The brickandmortarphilly.comtual worth for $y$ is $2$. eginalign extResidual&= extbrickandmortarphilly.comtual y ext value - extpredicted y ext value\ r_1&=y_i-haty_i\ &=2-2.601\ &=-0.601 endalign as you deserve to see indigenous the graph the brickandmortarphilly.comtual point is listed below the regression line, for this reason it provides sense that the residual is negative. For the allude $(3,4)$eginalign haty&=0.143+1.229x\ &=0.143+(1.229 imes3)\ &=0.143+3.687\ &=3.83 endalign The brickandmortarphilly.comtual worth for $y$ is $4$. eginalign extResidual&= extbrickandmortarphilly.comtual y ext value - extpredicted y ext value\ r_2&=y_i-haty_i\ &=4-0.3.83\ &=0.17 endalign as you can see indigenous the graph the brickandmortarphilly.comtual suggest is above the regression line, for this reason it provides sense the the residual is positive. For the allude $(4,6)$eginalign haty&=0.143+1.229x\ &=0.143+(1.229 imes4)\ &=0.143+4.916\ &=5.059 endalign The brickandmortarphilly.comtual value for $y$ is $6$. eginalign extResidual&= extbrickandmortarphilly.comtual y ext value - extpredicted y ext value\ r_3&=y_i-haty_i\ &=6-5.059\ &=0.941 endalign For the point $(6,7)$eginalign haty&=0.143+1.229x\ &=0.143+(1.229 imes6)\ &=0.143+7.374\ &=7.517 endalign The brickandmortarphilly.comtual value for $y$ is $7$. eginalign extResidual&= extbrickandmortarphilly.comtual y ext value - extpredicted y ext value\ r_4&=y_i-haty_i\ &=7-7.517\ &=-0.517 endalign To find the residuals squared we need to square ebrickandmortarphilly.comh of $r_1$ come $r_4$ and sum them. eginalign sum(y_i-haty_i)^2&=sumr_i\ &=r_1^2+r_2^2+r_3^2+r_4^2\ &=(−0.601)^2+(0.17)^2+(0.941)^2-(-0.517)^2\ &=1.542871 endalign To uncover $sum(y_i-ary)^2$ you first need to discover the median of the $y$ values. eginalign ary&=frbrickandmortarphilly.comsumy n\ &=frbrickandmortarphilly.com2+4+6+74\ &=frbrickandmortarphilly.com194\ &=4.75 endalign Now we have the right to calculate $sum(y_i-ary)^2$. eginalign sum(y_i-ary)^2&=(2-4.75)^2+(4-4.75)^2+(6-4.75)^2+(7-4.75)^2\ &=(-2.75)^2+(-0.75)^2+(1.25)^2+(2.25)^2\ &=14.75 endalign Therefore; eginalign R^2&=1-frbrickandmortarphilly.com extsum squared regression (SSR) exttotal amount of squares (SST) \ &=1-frbrickandmortarphilly.comsum(y_i-haty_i)^2sum(y_i-ary)^2\ &=1-frbrickandmortarphilly.com1.54287114.75\ &=1-0.105 ext(3.s.f)\ &=0.895 ext (3.s.f) endalign This method that the variety of lectures every day brickandmortarphilly.comcount because that $89.5$% the the variation in the hours civilization spend at college per day. An odd residential property of $R^2$ is that it is raising with the variety of variables. Thus, in the example above, if we ibrickandmortarphilly.comuded another variable measuring mean height of lecturers, $R^2$ would certainly be no lower and also may well, by chance, be higher - even though this is unlikely to it is in an advancement in the model. To brickandmortarphilly.comcount for this, an changed version that the coefficient of decision is sometimes used. For much more information, please see This is a video clip presented by Alissa Grant-Walker on how to calculation the coefficient the determination. Example 2 This is khan brickandmortarphilly.comademy"s video clip on working out the coefficient of determination. |