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|cccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc}X&18&4&23&17&12&4&17&4&4&11&4&22&17&4&4&19&1&12&23&17&23&29&4&17&13&12&4&1&4&12&17&12&17&17&17&17&23&4&17&4&25&22&25&29&26&27&27&4&1&19&17&15&12&4&12&17&19&11&19&23&28&28&29&4&4&24&26&28&23&3&11&4&17&17&12&17&17&9&9&12&17&11&24&14&19&1&5&10&12&12&14&17&17&17&17&22&1&17&9&1&1&1&1&1&1&1&1&1&1&1&1&4&4&27\\Y&3401&4100&3402&3210&3100&3150&3408&3350&3300&3218&3311&4115&3421&3800&3200&3450&3300&3150&3530&3512&3502&2500&3200&3430&3320&3200&3609&3210&3198&3110&3150&3120&3210&3205&3200&3820&3350&3400&3310&3100&3200&3450&3610&3208&3664&3320&4100&3910&3700&3352&3350&3305&3325&3200&3016&3343&3311&3420&3510&3500&3208&3200&3450&3200&3200&4000&3250&3350&3602&3300&3410&4010&3400&3325&3210&3221&3308&3410&3150&3187&3218&3100&3451&3431&3451&3301&3930&3200&3220&3205&3420&3420&3350&3620&3350&3421&3200&3260&4305&3405&3300&3219&3212&3210&3219&3400&3300&3250&3230&3300&3520&3300&3350&4388\end{array}$$The equation of the regression line is:
$$y~=~3334 ~+~ 3.436 \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$ |
18 | 3401 | 61218 | 324 |
4 | 4100 | 16400 | 16 |
23 | 3402 | 78246 | 529 |
17 | 3210 | 54570 | 289 |
12 | 3100 | 37200 | 144 |
4 | 3150 | 12600 | 16 |
17 | 3408 | 57936 | 289 |
4 | 3350 | 13400 | 16 |
4 | 3300 | 13200 | 16 |
11 | 3218 | 35398 | 121 |
4 | 3311 | 13244 | 16 |
22 | 4115 | 90530 | 484 |
17 | 3421 | 58157 | 289 |
4 | 3800 | 15200 | 16 |
4 | 3200 | 12800 | 16 |
19 | 3450 | 65550 | 361 |
1 | 3300 | 3300 | 1 |
12 | 3150 | 37800 | 144 |
23 | 3530 | 81190 | 529 |
17 | 3512 | 59704 | 289 |
23 | 3502 | 80546 | 529 |
29 | 2500 | 72500 | 841 |
4 | 3200 | 12800 | 16 |
17 | 3430 | 58310 | 289 |
13 | 3320 | 43160 | 169 |
12 | 3200 | 38400 | 144 |
4 | 3609 | 14436 | 16 |
1 | 3210 | 3210 | 1 |
4 | 3198 | 12792 | 16 |
12 | 3110 | 37320 | 144 |
17 | 3150 | 53550 | 289 |
12 | 3120 | 37440 | 144 |
17 | 3210 | 54570 | 289 |
17 | 3205 | 54485 | 289 |
17 | 3200 | 54400 | 289 |
17 | 3820 | 64940 | 289 |
23 | 3350 | 77050 | 529 |
4 | 3400 | 13600 | 16 |
17 | 3310 | 56270 | 289 |
4 | 3100 | 12400 | 16 |
25 | 3200 | 80000 | 625 |
22 | 3450 | 75900 | 484 |
25 | 3610 | 90250 | 625 |
29 | 3208 | 93032 | 841 |
26 | 3664 | 95264 | 676 |
27 | 3320 | 89640 | 729 |
27 | 4100 | 110700 | 729 |
4 | 3910 | 15640 | 16 |
1 | 3700 | 3700 | 1 |
19 | 3352 | 63688 | 361 |
Step 2: Find the sum of every column:
$$ \sum{X} = 1480 ~,~ \sum{Y} = 385213 ~,~ \sum{X \cdot Y} = 5030407 ~,~ \sum{X^2} = 27770 $$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{ 385213 \cdot 27770 - 1480 \cdot 5030407}{ 114 \cdot 27770 - 1480^2} \approx 3334 \\ \\b &= \frac{ n \cdot \sum{XY} - \sum{X} \cdot \sum{Y}}{n \cdot \sum{X^2} - \left(\sum{X}\right)^2} = \frac{ 114 \cdot 5030407 - 1480 \cdot 385213 }{ 114 \cdot 27770 - \left( 1480 \right)^2} \approx 3.436\end{aligned}$$Step 4: Substitute $a$ and $b$ in regression equation formula
$$ \begin{aligned} y~&=~a ~+~ b \cdot x \\y~&=~3334 ~+~ 3.436 \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.