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|cccccccccccc}X&48.91&49.10&45.92&38.34&33.75&33.62&37.04&41.65&46.59&45.09&49.20&47.12\\Y&95.42&95.88&93.05&94.58&98.22&99.65&98.75&100.21&97.02&96.48&95.85&97.44\end{array}$$The equation of the regression line is:
$$y~=~105.1 ~-~ 0.1908 \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$ |
48.91 | 95.42 | 4666.9922 | 2392.1881 |
49.10 | 95.88 | 4707.708 | 2410.81 |
45.92 | 93.05 | 4272.856 | 2108.6464 |
38.34 | 94.58 | 3626.1972 | 1469.9556 |
33.75 | 98.22 | 3314.925 | 1139.0625 |
33.62 | 99.65 | 3350.233 | 1130.3044 |
37.04 | 98.75 | 3657.7 | 1371.9616 |
41.65 | 100.21 | 4173.7465 | 1734.7225 |
46.59 | 97.02 | 4520.1618 | 2170.6281 |
45.09 | 96.48 | 4350.2832 | 2033.1081 |
49.20 | 95.85 | 4715.82 | 2420.64 |
47.12 | 97.44 | 4591.3728 | 2220.2944 |
Step 2: Find the sum of every column:
$$ \sum{X} = 516.33 ~,~ \sum{Y} = 1162.55 ~,~ \sum{X \cdot Y} = 49947.9957 ~,~ \sum{X^2} = 22602.3217 $$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{ 1162.55 \cdot 22602.3217 - 516.33 \cdot 49947.9957}{ 12 \cdot 22602.3217 - 516.33^2} \approx 105.1 \\ \\b &= \frac{ n \cdot \sum{XY} - \sum{X} \cdot \sum{Y}}{n \cdot \sum{X^2} - \left(\sum{X}\right)^2} = \frac{ 12 \cdot 49947.9957 - 516.33 \cdot 1162.55 }{ 12 \cdot 22602.3217 - \left( 516.33 \right)^2} \approx -0.1908\end{aligned}$$Step 4: Substitute $a$ and $b$ in regression equation formula
$$ \begin{aligned} y~&=~a ~+~ b \cdot x \\y~&=~105.1 ~-~ 0.1908 \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.