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|cccccccccccccccccccccccccccccccccccc}X&95.42&95.88&93.05&94.58&98.22&99.65&98.75&100.21&97.02&96.48&95.85&97.44&95.66&96.99&94.71&98.66&95.32&95.00&90.65&88.41&87.02&86.05&82.78&81.52&79.81&80.40&79.53&80.25&79.72&81.40&80.19&80.66&80.26&80.32&82.14&81.54\\Y&1.1174&1.1311&1.1339&1.1099&1.1092&1.0859&1.0877&1.0736&1.1235&1.1221&1.1139&1.0995&1.1213&1.1149&1.0779&1.0837&1.1349&1.1621&1.2331&1.2472&1.2672&1.2901&1.3316&1.3539&1.3592&1.3732&1.3812&1.3822&1.3658&1.3610&1.3703&1.3492&1.3634&1.3347&1.3309&1.3080\end{array}$$The equation of the regression line is:
$$y~=~2.578 ~-~ 0.01515 \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$ |
95.42 | 1.1174 | 106.622308 | 9104.9764 |
95.88 | 1.1311 | 108.449868 | 9192.9744 |
93.05 | 1.1339 | 105.509395 | 8658.3025 |
94.58 | 1.1099 | 104.974342 | 8945.3764 |
98.22 | 1.1092 | 108.945624 | 9647.1684 |
99.65 | 1.0859 | 108.209935 | 9930.1225 |
98.75 | 1.0877 | 107.410375 | 9751.5625 |
100.21 | 1.0736 | 107.585456 | 10042.0441 |
97.02 | 1.1235 | 109.00197 | 9412.8804 |
96.48 | 1.1221 | 108.260208 | 9308.3904 |
95.85 | 1.1139 | 106.767315 | 9187.2225 |
97.44 | 1.0995 | 107.13528 | 9494.5536 |
95.66 | 1.1213 | 107.263558 | 9150.8356 |
96.99 | 1.1149 | 108.134151 | 9407.0601 |
94.71 | 1.0779 | 102.087909 | 8969.9841 |
98.66 | 1.0837 | 106.917842 | 9733.7956 |
95.32 | 1.1349 | 108.178668 | 9085.9024 |
95.00 | 1.1621 | 110.3995 | 9025 |
90.65 | 1.2331 | 111.780515 | 8217.4225 |
88.41 | 1.2472 | 110.264952 | 7816.3281 |
87.02 | 1.2672 | 110.271744 | 7572.4804 |
86.05 | 1.2901 | 111.013105 | 7404.6025 |
82.78 | 1.3316 | 110.229848 | 6852.5284 |
81.52 | 1.3539 | 110.369928 | 6645.5104 |
79.81 | 1.3592 | 108.477752 | 6369.6361 |
80.40 | 1.3732 | 110.40528 | 6464.16 |
79.53 | 1.3812 | 109.846836 | 6325.0209 |
80.25 | 1.3822 | 110.92155 | 6440.0625 |
79.72 | 1.3658 | 108.881576 | 6355.2784 |
81.40 | 1.3610 | 110.7854 | 6625.96 |
80.19 | 1.3703 | 109.884357 | 6430.4361 |
80.66 | 1.3492 | 108.826472 | 6506.0356 |
80.26 | 1.3634 | 109.426484 | 6441.6676 |
80.32 | 1.3347 | 107.203104 | 6451.3024 |
82.14 | 1.3309 | 109.320126 | 6746.9796 |
81.54 | 1.3080 | 106.65432 | 6648.7716 |
Step 2: Find the sum of every column:
$$ \sum{X} = 3221.54 ~,~ \sum{Y} = 44.0047 ~,~ \sum{X \cdot Y} = 3906.417053 ~,~ \sum{X^2} = 290362.335 $$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{ 44.0047 \cdot 290362.335 - 3221.54 \cdot 3906.417053}{ 36 \cdot 290362.335 - 3221.54^2} \approx 2.578 \\ \\b &= \frac{ n \cdot \sum{XY} - \sum{X} \cdot \sum{Y}}{n \cdot \sum{X^2} - \left(\sum{X}\right)^2} = \frac{ 36 \cdot 3906.417053 - 3221.54 \cdot 44.0047 }{ 36 \cdot 290362.335 - \left( 3221.54 \right)^2} \approx -0.01515\end{aligned}$$Step 4: Substitute $a$ and $b$ in regression equation formula
$$ \begin{aligned} y~&=~a ~+~ b \cdot x \\y~&=~2.578 ~-~ 0.01515 \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.