# What does linear regression tell us?

Jul 23, 2015

Linear regression, by the practical interpretation, tells us how well a set of data agrees with predicted linearity.

The ${R}^{2}$ value indicates that agreement.
The $y = m x + b$ result is the fit line equation.

If you want to use LINEST to give more exact answers for your data, here is how:

Windows:
1. Have test or real data at the ready. Try it on test data if you want.
2. Double-left-click on any random, empty cell in Excel. Type in =LINEST(.
3. Left-click-drag to select your y-values, then type in one comma.
4. Left-click-drag to select your x-values, then type in one comma.
5. Type TRUE,TRUE), then press Enter.
6. Left-click-drag from the cell you just typed into, and create a 2x5 selection, LxW.
7. Click in the f(x) text box at the top of Excel, then press Ctrl+Shift+Enter. It's an array, so the 2x5 must be selected while this is done.

MAC:
1. Have test or real data at the ready. Try it on test data if you want.
2. Double-left-click on any random, empty cell in Excel. Type in =LINEST(.
3. Left-click-drag to select your y-values, then type in one comma.
4. Left-click-drag to select your x-values, then type in one comma.
5. Type TRUE,TRUE), then press Enter.
6. Left-click-drag from the cell you just typed into, and create a 2x5 selection, LxW.
7. Click in the f(x) text box at the top of Excel, then press Command+Shift+Enter/Return. It's an array, so the 2x5 must be selected while this is done.

If you use LINEST on excel, you should get the following...

Let (x,y) indicate (column, row) coordinates in the 2x5 array of values you make with LINEST.

(1, 1): Slope
(1, 2): Slope's Standard Error (multiply by 1.96 to get the Associated Error)
(1, 3): ${R}^{2}$ (regression coefficient)
(1, 4): F, for the F-test in statistics where $F = {s}_{1}^{2} / {s}_{2}^{2}$, and ${s}_{1} > {s}_{2}$.
(1, 5): Regression sum of squares $\left({\sum}_{n = 1}^{\infty} {\left({y}_{i} + \overline{y}\right)}^{2}\right)$
(2, 1): y-intercept
(2, 2): y-intercept Standard Error
(2, 3): Standard Deviation of y values
(2, 4): Degrees of Freedom ($N \text{ pieces of data} - 2$ indicates the number of standard deviations from the mean)
(2, 5): residual sum of squares $\left({\sum}_{n = 1}^{\infty} {\left({y}_{i} + \hat{y}\right)}^{2}\right)$

Most of the time, you will only need the slope, the slope's SE, the ${R}^{2}$, the y-intercept, and the y-intercept's SE. Even in college physics and quantitative analysis, I did not need to know more than that.