Enter two data sets and this calculator will find the equation of the regression line and correlation coefficient. The calculator will generate a step by step explanation along with the graphic representation of the data sets and regression line.
solution
You entered the following data:
$$\begin{array}{c|cccccccccc}X&6&7&8&9&10&11&12&13&14&15\\Y&109199&108012&115849&103144&100650&93376&94043&94133&98779&92099\end{array}$$The equation of the regression line is:
$$y~=~123945 ~-~ 2192 \cdot x$$The graph of the regression line is:
explanation
We will find an equation of the regression line in 4 steps.
Step 1: Find $X \cdot Y$ and $X^2$ as it was done in the table below.
$X$ | $Y$ | $X\cdot Y$ | $X \cdot X$ |
6 | 109199 | 655194 | 36 |
7 | 108012 | 756084 | 49 |
8 | 115849 | 926792 | 64 |
9 | 103144 | 928296 | 81 |
10 | 100650 | 1006500 | 100 |
11 | 93376 | 1027136 | 121 |
12 | 94043 | 1128516 | 144 |
13 | 94133 | 1223729 | 169 |
14 | 98779 | 1382906 | 196 |
15 | 92099 | 1381485 | 225 |
Step 2: Find the sum of every column:
$$ \sum{X} = 105 ~,~ \sum{Y} = 1009284 ~,~ \sum{X \cdot Y} = 10416638 ~,~ \sum{X^2} = 1185 $$Step 3: Use the following equations to find $a$ and $b$:
$$ \begin{aligned} a &= \frac{\sum{Y} \cdot \sum{X^2} - \sum{X} \cdot \sum{XY} }{n \cdot \sum{X^2} - \left(\sum{X}\right)^2} = \frac{ 1009284 \cdot 1185 - 105 \cdot 10416638}{ 10 \cdot 1185 - 105^2} \approx 123945 \\ \\b &= \frac{ n \cdot \sum{XY} - \sum{X} \cdot \sum{Y}}{n \cdot \sum{X^2} - \left(\sum{X}\right)^2} = \frac{ 10 \cdot 10416638 - 105 \cdot 1009284 }{ 10 \cdot 1185 - \left( 105 \right)^2} \approx -2192\end{aligned}$$Step 4: Substitute $a$ and $b$ in regression equation formula
$$ \begin{aligned} y~&=~a ~+~ b \cdot x \\y~&=~123945 ~-~ 2192 \cdot x\end{aligned}$$Consider the following set of points: ${(-3 , -4), \, (2 , 3), \, (7 , 11)}$
a) Find the regression line for the given data points.
b) Plot the given points and the regression line.
The values of $X$ and their corresponding values of $Y$ are shown in the table below:
$$ \begin{array}{c|ccccc} X & ~1~ & ~2~ & ~3~ & ~4~ & ~5 \\ Y & ~4~ & ~8~ & ~9~ & ~11~& ~16 \end{array} $$Find a Pearson correlation coefficient.
Please tell me how can I make this better.