
| Quantitative Techniques to Transport Planning | Courses Index | ![]() | ![]() |
Page 36
of 88
pages. Chapter: 7: Regression ![]() |
Calculating the Equation of the LineTo specify the equation of any straight line we need two values:
Calculating the equation of the line needs the same values to be calculated as for the correlation coefficient. To do this, we can use a spreadsheet with a regression option – in this case, all you have to worry about is interpreting the coefficients, or a calculator, in which case you will need to calculate the extra columns and work out the column totals in order to find the coefficients. For a straight line equation:
Slope:
Intercept:
Example 6.1: We will calculate the regression coefficient for the following data:
Since we will wish to find the effect of advertising expenditure on sales, the advertising expenditure is the independent variable x, and the resulting sales are the dependent variable y. By plotting the scatter chart and fitting the linear trend line, the ‘best fit’ line will be plotted on the chart. It is also possible to display the r 2 value and the regression equation on the chart. Figure 6.3 Scatter Chart of Advertising and Sales
If you don’t have a regression option, or are using a calculator, you need to calculate the means and SDs for x values and the y values, together with
Slope:
Intercept:
Alternatively . . . Slope:
Hence; y = 17.4476 + 0.6312x |
![]() ![]() ![]() ![]() ![]() ![]() |