We will do this problem with the help of Excel.
Load the data into Excel.
Go to Data>Megastat.
Select the option Correlation/Regression and go
to Regression.
Select percentage alcohol and number of
carbohydrates? as the independent
variable(s), x.
Select calories as the dependent
variable, y.
Click OK.
The output will be as follows:
|
R² |
0.991 |
|
|
|
|
|
Adjusted R² |
0.990 |
n |
35 |
|
|
|
R |
0.995 |
k |
2 |
|
|
|
Std. Error |
4.507 |
Dep. Var. |
Calories |
|
|
|
|
|
|
|
|
|
ANOVA table |
|
|
|
|
|
|
Source |
SS |
df |
MS |
F |
p-value |
|
Regression |
70,230.6558 |
2 |
35,115.3279 |
1728.98 |
2.50E-33 |
|
Residual |
649.9156 |
32 |
20.3099 |
|
|
|
Total |
70,880.5714 |
34 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Regression output |
|
|
|
confidence interval |
variables |
coefficients |
std. error |
t (df=32) |
p-value |
95% lower |
95% upper |
Intercept |
-0.1426 |
|
|
|
|
|
Alcohol% |
19.8187 |
0.7047 |
28.125 |
3.89E-24 |
18.3834 |
21.2541 |
Carbohydrates |
4.2690 |
0.1895 |
22.526 |
3.39E-21 |
3.8830 |
4.6550 |
Therefore, our regression equation is:
Calories = -0.1426 + 19.8187*Alcohol(%) +
4.2690*Carbohydrates
Or
y = -0.1426 + 19.8187*x1 +
4.2690*x2
where x1 = Alcohol(%)
x2 = Carbohydrates
Thus, the above output is the result of the multiple linear
regression.