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|cccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc}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&83.38&83.40&81.81&83.17&82.00&79.23&79.87&80.16&79.99&80.03&81.22&82.71&81.75&83.13&78.85&79.14&78.79&79.42&80.52&78.49&76.31&79.08&74.17&74.04\\Y&48.91&49.10&45.92&38.34&33.75&33.62&37.04&41.65&46.59&45.09&49.20&47.12&59.47&60.30&59.63&47.60&49.76&48.24&53.27&66.15&80.54&91.16&95.96&98.17&105.37&102.71&99.74&101.58&102.59&97.49&98.42&92.72&96.38&102.33&107.65&105.03&96.56&91.97&93.46&97.23&92.05&97.49&91.82&88.91&86.24&92.19&96.49&88.06&84.96&86.53&104.87&103.02&107.07&98.48&98.83&100.36&93.19&79.20&88.81&95.70\end{array}$$The equation of the regression line is:
$$y~=~328 ~-~ 2.895 \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 | 48.91 | 4666.9922 | 9104.9764 |
95.88 | 49.10 | 4707.708 | 9192.9744 |
93.05 | 45.92 | 4272.856 | 8658.3025 |
94.58 | 38.34 | 3626.1972 | 8945.3764 |
98.22 | 33.75 | 3314.925 | 9647.1684 |
99.65 | 33.62 | 3350.233 | 9930.1225 |
98.75 | 37.04 | 3657.7 | 9751.5625 |
100.21 | 41.65 | 4173.7465 | 10042.0441 |
97.02 | 46.59 | 4520.1618 | 9412.8804 |
96.48 | 45.09 | 4350.2832 | 9308.3904 |
95.85 | 49.20 | 4715.82 | 9187.2225 |
97.44 | 47.12 | 4591.3728 | 9494.5536 |
95.66 | 59.47 | 5688.9002 | 9150.8356 |
96.99 | 60.30 | 5848.497 | 9407.0601 |
94.71 | 59.63 | 5647.5573 | 8969.9841 |
98.66 | 47.60 | 4696.216 | 9733.7956 |
95.32 | 49.76 | 4743.1232 | 9085.9024 |
95.00 | 48.24 | 4582.8 | 9025 |
90.65 | 53.27 | 4828.9255 | 8217.4225 |
88.41 | 66.15 | 5848.3215 | 7816.3281 |
87.02 | 80.54 | 7008.5908 | 7572.4804 |
86.05 | 91.16 | 7844.318 | 7404.6025 |
82.78 | 95.96 | 7943.5688 | 6852.5284 |
81.52 | 98.17 | 8002.8184 | 6645.5104 |
79.81 | 105.37 | 8409.5797 | 6369.6361 |
80.40 | 102.71 | 8257.884 | 6464.16 |
79.53 | 99.74 | 7932.3222 | 6325.0209 |
80.25 | 101.58 | 8151.795 | 6440.0625 |
79.72 | 102.59 | 8178.4748 | 6355.2784 |
81.40 | 97.49 | 7935.686 | 6625.96 |
80.19 | 98.42 | 7892.2998 | 6430.4361 |
80.66 | 92.72 | 7478.7952 | 6506.0356 |
80.26 | 96.38 | 7735.4588 | 6441.6676 |
80.32 | 102.33 | 8219.1456 | 6451.3024 |
82.14 | 107.65 | 8842.371 | 6746.9796 |
81.54 | 105.03 | 8564.1462 | 6648.7716 |
83.38 | 96.56 | 8051.1728 | 6952.2244 |
83.40 | 91.97 | 7670.298 | 6955.56 |
81.81 | 93.46 | 7645.9626 | 6692.8761 |
83.17 | 97.23 | 8086.6191 | 6917.2489 |
82.00 | 92.05 | 7548.1 | 6724 |
79.23 | 97.49 | 7724.1327 | 6277.3929 |
79.87 | 91.82 | 7333.6634 | 6379.2169 |
80.16 | 88.91 | 7127.0256 | 6425.6256 |
79.99 | 86.24 | 6898.3376 | 6398.4001 |
80.03 | 92.19 | 7377.9657 | 6404.8009 |
81.22 | 96.49 | 7836.9178 | 6596.6884 |
82.71 | 88.06 | 7283.4426 | 6840.9441 |
81.75 | 84.96 | 6945.48 | 6683.0625 |
83.13 | 86.53 | 7193.2389 | 6910.5969 |
Step 2: Find the sum of every column:
$$ \sum{X} = 5142.2 ~,~ \sum{Y} = 4792.08 ~,~ \sum{X \cdot Y} = 400513.4553 ~,~ \sum{X^2} = 444220.9588 $$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{ 4792.08 \cdot 444220.9588 - 5142.2 \cdot 400513.4553}{ 60 \cdot 444220.9588 - 5142.2^2} \approx 328 \\ \\b &= \frac{ n \cdot \sum{XY} - \sum{X} \cdot \sum{Y}}{n \cdot \sum{X^2} - \left(\sum{X}\right)^2} = \frac{ 60 \cdot 400513.4553 - 5142.2 \cdot 4792.08 }{ 60 \cdot 444220.9588 - \left( 5142.2 \right)^2} \approx -2.895\end{aligned}$$Step 4: Substitute $a$ and $b$ in regression equation formula
$$ \begin{aligned} y~&=~a ~+~ b \cdot x \\y~&=~328 ~-~ 2.895 \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.