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&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\end{array}$$The equation of the regression line is:
$$y~=~369.8 ~-~ 3.344 \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 |
Step 2: Find the sum of every column:
$$ \sum{X} = 3221.54 ~,~ \sum{Y} = 2538.59 ~,~ \sum{X \cdot Y} = 220229.5907 ~,~ \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{ 2538.59 \cdot 290362.335 - 3221.54 \cdot 220229.5907}{ 36 \cdot 290362.335 - 3221.54^2} \approx 369.8 \\ \\b &= \frac{ n \cdot \sum{XY} - \sum{X} \cdot \sum{Y}}{n \cdot \sum{X^2} - \left(\sum{X}\right)^2} = \frac{ 36 \cdot 220229.5907 - 3221.54 \cdot 2538.59 }{ 36 \cdot 290362.335 - \left( 3221.54 \right)^2} \approx -3.344\end{aligned}$$Step 4: Substitute $a$ and $b$ in regression equation formula
$$ \begin{aligned} y~&=~a ~+~ b \cdot x \\y~&=~369.8 ~-~ 3.344 \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.