Calculating the linear model confidence percentage
The regression line represents the relationship between the variables. The best case is that the difference between the expected values and the model line is minimal, with a low mean and standard deviation. The difference is on the red line in Figure 8.8.
This line follows the formula Y = B0 + B1X:
B1 is the slope of the regression line, the change in the Y value (sales – an increase or decrease) for every unit of change in the X value (marketing investment). The formula for B1 is as follows:
Let's look at this formula in more detail:
- Subtract the mean of all the X values from each value.
- Subtract the mean of all the Y values from each value.
- Subtract the mean of all the X values from each value and then square it.
For this example, the B1 slope is 0.0489.