Albert Ludwgs Unverst Freburg Department of Emprcal Research and Econometrcs Appled Econometrcs Dr Kestel ummer 9 EXAMPLE IMPLE LINEAR REGREION ANALYI uppose Mr Bump observes the sellng prce and sales volume of mlk gallons for randoml selected weeks as follows Week Weekl sales level, Y* ellng prce, X, $ 3 6 3 5 7 4 5 5 6 6 5 7 5 6 8 4 9 7 * Thousand of gallons catter Dagram 5 sales 5 5 5 5 5 prce Correlaton coeffcent: r ()493 (44) ()56 44 ()488 86
WEEK ^ ^ 3 69 3 6 4 36 3 7 5 89 5 85 4 5 5 44 8 5 6 56 6 6 5 44 5 8 7 6 5 56 5 8 8 4 96 44 68 9 7 89 7 4 sum 44 56 488 493 Normal equatons: n () 44 493 44 56 n n n ( ( ) ) ()56 (44) ()488 84 336 ()49 (44)() 98 ()(493) (44) 98 454 ()(56) (44) 84 ( 454) 44 34 Lnear Regresson Model (Ftted model): 34 4 54 tandard error of estmate (se): week Actual Estmated error error^ 3 338-338 48464 6 36 94 86436 3 7 5 74-4 586684 4 5 33 67 7889 5 6 8876 4 63376 6 5 469 38 94864 7 6 5 8876-3876 5338 8 4 784 6 46656 9 7 76-6 36 646 3854 48533 sum 44 4 59448 ( ) error σ e n n 594 8 7
Evews Output Dependent Varable: ALE Method: Least quares Date: 5/8/9 Tme: 8:3 ample: Included observatons: Coeffcent td Error t-tatstc Prob PRICE -453883 3445-48433 3 C 3359 448588 78939 R-squared 74563 Mean dependent var Adjusted R-squared 7385 D dependent var 59466 E of regresson 75453 Akake nfo crteron 53 um squared resd 594476 chwarz crteron 585 Log lkelhood -3 Hannan-Qunn crter 495366 F-statstc 34487 Durbn-Watson stat 345368 Prob(F-statstc) 84 ANOVA Table: Test for Equalt of Means Between eres Date: 5//9 Tme: : ample: Included observatons: Method df Value Probablt t-test 8 64749 atterthwate-welch t-test* 96349 64749 Anova F-test (, 8) 36577 Welch F-test* (, 96349) 36577 *Test allows for unequal cell varances Analss of Varance ource of Varaton df um of q Mean q Between 47688 47688 Wthn 8 3444 3356 Total 9 77 374589 3
Resdual Plot 4 3 - - -3-4 3 4 5 6 7 8 9 ALE Resduals Q-Q Plot of Resduals (Normalt check) 6 4 Quantles of Normal - -4-6 -4-4 Quantles of REID 4
Predctng Y for a gven value of : uppose Mr Bump wshed to forecast the quantt of mlk sold f the prce were set at $63 E Y 63 34 (454)63 844 or 8,44 gallons tandard error of the forecast measures when 63 s ( ) ( 63 44) σ p σ e 7 9 n 84 ( ) 95% predcton nterval for 63 s 844 ± t n-, 5 9 > 844±36(9) > (753, 5) 4 6 8 4 Forecast: ALEF Actual: ALE Forecast sample: Included observatons: Root Mean quared Error 6 Mean Absolute Error 398 Mean Abs Percent Error 7984 Thel Inequalt Coeffcent 587 Bas Proporton Varance Proporton 763 Covarance Proporton 98377 3 4 5 6 7 8 9 ALEF ± E Inference on : tandard error of estmator of σ e σ e 7 σ 3 ( ) 84 5
The 95% confdence nterval for s ± c se( ) s: -4,54± t n-, 5 (3) > -454± 698 > (-458, -76) Hpothess Testng H : vs H A : 454 t 48 < -36 Reject Ho 3 p-value: Pr( T 4 8) Pr( T > 4 8) 3 6
Albert Ludwgs Unverst Freburg Department of Emprcal Research and Econometrcs Appled Econometrcs Dr Kestel ummer 9 EXAMPLE MULTIPLE LINEAR REGREION ANALYI uppose Mr Bump observes the sellng prce, sales volume of mlk gallons and advertsng epense for randoml selected weeks as follows Week Weekl sales level, Y* ellng prce, X, $ Advertsng**, X 3 9 6 7 3 5 7 5 4 5 4 5 6 5 6 5 7 5 6 6 8 4 9 7 5 * Thousand of gallons; ** hundreds of dollars Correlaton Matr sales prce sales 86 r prce 86 ads 89 65 ads 89 65 E-Vews Output of Correlaton matr Covarance Analss: Ordnar Date: 5/8/9 Tme: 8:59 ample: Included observatons: Covarance Correlaton ALE PRICE ALE 336 ADVERTIIME NT PRICE -98 84-863489 ADVERTIIMENT 3-886 4 89497-65449 7
catter Dagram Y versus X 5 sales 5 5 5 5 5 prce catter dagram Y versus X sales 5 5 5 5 5 5 advertsng 8
9 week X X ^ X ^ X ^ X X X X 3 9 69 8 3 9 7 6 7 36 4 49 4 4 3 5 7 5 5 89 5 85 5 85 4 5 4 44 5 96 8 68 5 6 5 56 5 6 5 4 6 5 5 44 44 8 8 44 7 5 6 6 5 56 36 8 3 96 8 4 44 96 68 4 9 7 5 89 5 7 55 5 4 44 4 3 sum 44 488 56 5 493 48 553 Normal equatons: n 5 553 44 48 553 56 44 493 4 44 In matr form: 5 553 4 553 56 44 4 44 7 9 3 6 X X X Y ( ) 585 8476 6464 ) ( ) ( X Y X X X X X Y 336 ()488 ) ( n Multple Lnear regresson (Ftted or estmated ) Model 3 59 85 64
tandard error of estmate: week Prce Advertsng Actual Estmated error error^ 3 9 95-95 93 7 6 4 99 397 3 7 5 5 53-3 967 4 5 4-5 5 6 5 98-98 3947 6 5 353 46 59 7 6 6 5 67-7 96 8 4 7 8 6 9 5 7 693 64 4 96 379 4355 UM 59 σ e R error ( ) 59 5 n k n k 3 Eplaned Re sdual 5,9,93 Total total 33,6 Corrected or adjusted R A σ u σ r : 5,9/ 7 33,6/9,948 Varables used to eplan r ( ) varance of Y none 336 Prce 75 594 Prce and advertsement 93 59 Predcton on gven fed values of and : uppose Mr Bump wshed to forecast the quantt of mlk sold f the prce were set at $5 and advertsng ependtures of $ E Y 5, 64 85(5) 59() 993 or 993 gallons
Inferences on Parameters: H : vs H A : 585 t 4,37 >36 Reject Ho 3367 Evews Output Dependent Varable: ALE Method: Least quares Date: 5/8/9 Tme: 8:54 ample: Included observatons: Coeffcent td Error t-tatstc Prob PRICE -84758 9657-375563 7 ADVERTIIMENT 585 3367 437745 3 C 64637 43459 377875 69 R-squared 9399 Mean dependent var Adjusted R-squared 948 D dependent var 59466 E of regresson 5796 Akake nfo crteron 3975 um squared resd 5949 chwarz crteron 39948 Log lkelhood -6585 Hannan-Qunn crter 384 F-statstc 479657 Durbn-Watson stat 335677 Prob(F-statstc) 8 ANOVA Table: Test for Equalt of Means Between eres Date: 5//9 Tme: :55 ample: Included observatons: Method df Value Probablt Anova F-test (, 7) 95938 Welch F-test* (, 863) 3654 *Test allows for unequal cell varances Analss of Varance ource of Varaton df um of q Mean q Between 648337 34653 Wthn 7 45684 6994 Total 9 555 38878
Resdual Plot 3 - - -3 3 4 5 6 7 8 9 ALE Resduals Q-Q plot of resduals (Normalt check) 3 Quantles of Normal - - -3-3 - - 3 Quantles of REID