Example for Linear Regression
Total Page:16
File Type:pdf, Size:1020Kb
STAT 482 EXAMPLE FOR LINEAR REGRESSION
The vice president of a national chain of restaurants wants to study the impact of local advertising on sales. To study this relationship, a simple random sample of 30 restaurants was selected from the population of restaurants in the chain. For each restaurant in the sample, the total sales(Y) and the amount of money spent on local advertising (X) were recorded. The data are given below.
Sample # Sales Local Adv 1 29128 984 2 57478 5636 3 62755 5864 4 84411 5842 5 27545 1691 6 65942 4903 7 35459 2857 8 18470 2420 9 23297 3460 10 24422 1325 11 16023 1669 12 64275 4750 13 18424 1971 14 60943 4699 15 73784 5811 16 60504 5001 17 61673 4801 18 12345 1026 19 38035 2464 20 69122 5858 21 65388 4601 22 39250 2447 23 28654 3140 24 41290 3201 25 32647 3097 26 37275 1875 27 19568 1019 28 98025 5525 29 53179 2893 30 35353 3448 In addition, some summary statistics are given below.
Sum of Y
Sum of Y = 1354664
Sum of X
Sum of X = 104278
Sum of XY
Sum of XY = 5663368961
Sum of X^2
Sum of X^2 = 442666322
Scatterplot of Y vs X 100000
80000
60000 Y
40000
20000
0 1000 2000 3000 4000 5000 6000 X Regression Analysis: Y versus X
The regression equation is Y = 3782 + 11.9 X
Predictor Coef SE Coef T P Constant 3782 4528 0.84 0.411 X 11.903 1.179 10.10 0.000
S = 10556.8 R-Sq = 78.5% R-Sq(adj) = 77.7%
Analysis of Variance
Source DF SS MS F P Regression 1 11363065057 11363065057 101.96 0.000 Residual Error 28 3120514831 111446958 Total 29 14483579887
Unusual Observations
Obs X Y Fit SE Fit Residual St Resid 9 3460 23297 44966 1927 -21669 -2.09R 28 5525 98025 69545 3090 28480 2.82R
R denotes an observation with a large standardized residual.
Fitted Line Plot Y = 3782 + 11.90 X
100000 S 10556.8 R-Sq 78.5% R-Sq(adj) 77.7% 80000
60000 Y
40000
20000
0 1000 2000 3000 4000 5000 6000 X The fitted values and the residuals are given in the attached worksheet and some relevant sums are as follows.
Sum of FITS1
Sum of FITS1 = 1354664
Sum of RESI1
Sum of RESI1 = -8.22183E-10
Sum of RESI1^2
Sum of RESI1^2 = 3120514831