In: Statistics and Probability
Consider the following data for a dependent variable y and two independent variables, x2 and x1.
x1 x2 y
30 12 94
46 10 109
24 17 113
50 17 179
41 5 94
51 19 175
75 8 171
36 12 118
59 13 143
77 17 212
Round your all answers to two decimal places. Enter negative values as negative numbers, if necessary.
a. Develop an estimated regression equation relating y to x1 . Predict y if x1=45.
b. Develop an estimated regression equation relating y to x2. Predict y if x2=25.
c. Develop an estimated regression equation relating y to x1 and x2. Predict y if x1=45 and x2=25.
Part a) Estimated regression equation relating y to x1
The following data are passed:
x1 | y |
30 | 94 |
46 | 109 |
24 | 113 |
50 | 179 |
41 | 94 |
51 | 175 |
75 | 171 |
36 | 118 |
59 | 143 |
77 | 212 |
The independent variable is x1, and the dependent variable is y. In order to compute the regression coefficients, the following table needs to be used:
x1 | y | x1*y | x12 | y2 | |
30 | 94 | 2820 | 900 | 8836 | |
46 | 109 | 5014 | 2116 | 11881 | |
24 | 113 | 2712 | 576 | 12769 | |
50 | 179 | 8950 | 2500 | 32041 | |
41 | 94 | 3854 | 1681 | 8836 | |
51 | 175 | 8925 | 2601 | 30625 | |
75 | 171 | 12825 | 5625 | 29241 | |
36 | 118 | 4248 | 1296 | 13924 | |
59 | 143 | 8437 | 3481 | 20449 | |
77 | 212 | 16324 | 5929 | 44944 | |
Sum = | 489 | 1408 | 74109 | 26705 | 213546 |
Based on the above table, the following is calculated:Therefore, based on the above calculations, the regression coefficients (the slope m, and the y-intercept n) are obtained as follows:
Therefore, we find that the regression equation is:
y=48.7428+1.8826x1
Predict y if x1=45
y=48.7428+1.8826*(45)
= 133.4598 answer
Part b estimated regression equation relating y to x2.
The following data are passed:
x2 | y |
12 | 94 |
10 | 109 |
17 | 113 |
17 | 179 |
5 | 94 |
19 | 175 |
8 | 171 |
12 | 118 |
13 | 143 |
17 | 212 |
The independent variable is x2, and the dependent variable is y. In order to compute the regression coefficients, the following table needs to be used:
x2 | y | x2*y | x22 | y2 | |
12 | 94 | 1128 | 144 | 8836 | |
10 | 109 | 1090 | 100 | 11881 | |
17 | 113 | 1921 | 289 | 12769 | |
17 | 179 | 3043 | 289 | 32041 | |
5 | 94 | 470 | 25 | 8836 | |
19 | 175 | 3325 | 361 | 30625 | |
8 | 171 | 1368 | 64 | 29241 | |
12 | 118 | 1416 | 144 | 13924 | |
13 | 143 | 1859 | 169 | 20449 | |
17 | 212 | 3604 | 289 | 44944 | |
Sum = | 130 | 1408 | 19224 | 1874 | 213546 |
Based on the above table, the following is calculated:
Therefore, based on the above calculations, the regression coefficients (the slope m, and the y-intercept n) are obtained as follows:
Therefore, we find that the regression equation is:
y=75.8+5x2
Predict y if x2=25
y=75.8+5*(25)
= 200.8
Part c estimated regression equation relating y to x1 and x2.
These are the data that have been provided for the dependent and independent variables:
yy | x1x1 | x2x2 |
94 | 30 | 12 |
109 | 46 | 10 |
113 | 24 | 17 |
179 | 50 | 17 |
94 | 41 | 5 |
175 | 51 | 19 |
171 | 75 | 8 |
118 | 36 | 12 |
143 | 59 | 13 |
212 | 77 | 17 |
The following matrix and vector are defined in order to conduct the matrix calculation required to compute the estimated multiple regression coefficients:
Now, the vector with the estimated regression coefficients β is computed through the following matrix operation:
β=(X′X)−1X′y
Therefore, based on the data provided, the estimated multiple linear regression equation is:
y=−15.5982+1.8772x1 + 4.9694x2
Predict y if x1=45 and x2=25.
y=−15.5982+1.8772*(45) + 4.9694*(25)
= 193.1108
Hit Thumb up if you like the solution. Thank you