# R Squared Formula

R Squared is also known as coefficient of determination, represented by Ror rand pronounced as R Squared- is the number indicating the variance in the dependent variable that is to be predicted from the independent variable. It is a statistic model used for future prediction and outcomes, also regarded as testing of hypothesis. The linear relation between the dependent and independent variable is known through this formula.

Following is the Formula for R Squared:

$\large R^{2}=\frac{N\sum xy-\sum x \sum y}{\sqrt{\left[N\sum x^{2}-\left(\sum x\right)^{2}\right]\left[N\sum y^{2}-\left(\sum y\right)^{2}\right]}}$

Where,
N = No of scores given
$\sum$ XY = Sum of paired product
$\sum$ X = X score sum
$\sum$ Y = Y score sum
$\sum$ X2 = square of X score sum
$\sum$ Y2 = square of Y score sum

### Solved Examples

Question 1: Find the coefficient of determination for the following set of data:

 X Y 2 2 5 5 6 4 7 3

Solution:

Given data is

 X Y 2 2 5 5 6 4 7 3

Create the table out of given scores

 X Y XY X2 Y2 2 2 4 4 4 5 5 25 25 25 6 4 24 36 16 7 3 21 49 9 ∑X=20 ∑Y=14 ∑XY=74 ∑X2=114 ∑Y2=54

Here

N = 4
The summation of each column has been given at the end of the column.
Now, according to the formula:

The coefficient of correlation is given by
$R=\frac{N\sum xy-\sum x \sum y}{\sqrt{\left[N\sum x^{2}-\left(\sum x\right)^{2}\right]\left[N\sum y^{2}-\left(\sum y\right)^{2}\right]}}$

$=\frac{4(74)-(20)(14)}{\sqrt{4(114)-20^{2}}\sqrt{4(54)-14^{^{2}}}}\\ = \frac{296-280}{\sqrt{56}\sqrt{20}}\\ = \frac{16}{7.48\times 4.472}\\=0.478$

Coefficient of determination;

R2 = (0.478)2

= 0.22848