STAT 350: 97-1

Midterm, 19 February 1997Instructor: Richard Lockhart


Instructions: This is an open book test. You may use notes, text, other books and a calculator. Your presentations of statistical analysis will be marked for clarity of explanation. I expect you to explain what assumptions you are making and to comment if those assumptions seem unreasonable. The exam is out of 25.


1.
Suppose two objects with weights $\alpha_1$ and $\alpha_2$are weighed separately and then together. The resulting data points Y1, Y2 and Y3 satisfy $Y_1 = \alpha_1 + \epsilon_1$, $Y_2 = \alpha_2 + \epsilon_2$ and $Y_3 = \alpha_1+\alpha_2+\epsilon_3$.

(a)
What is the design matrix of this linear model? [2 marks]

(b)
If

\begin{displaymath}(X^TX)^{-1}= \left[\begin{array}{rr} \frac{2}{3} & -\frac{1}{3} \\
-\frac{1}{3} & \frac{2}{3}\end{array}\right]\end{displaymath}

what is the hat matrix? [2 marks]

(c)
Write $\hat\alpha_1$ in the form a1Y1+a2Y2+a3Y3 giving specific numerical values for the ai. [2 marks]

(d)
What is the standard error of $\hat\alpha_1$? [2 marks]

(e)
What is the variance of the residual corresponding to Y1? [2 marks]

2.
A company measures its annual sales Y in each of 26 regions, along with the values of 4 covariates, X1, the advertising expenditure in the region, X2, the number of active accounts in the region, X3, the number of competing brands, and X4, a measure of the potential for sales in the region. I attach some SAS code and an edited version of the output.

(a)
Is the regression significant? [3 marks]

(b)
Can advertising expenditure and sales potential be dropped from the full model? [3 marks]

(c)
In a model which includes all 4 covariates test the hypothesis that the advertising expenditure is an unimportant predictor. [3 marks]

(d)
What final fitted model seems best? (You will not be able to examine plots or diagnostics). [3 marks]

(e)
Give a 95% confidence interval for the coefficient of X3. [3 marks]

data roofing;
  infile 'roofing.dat' ;
  input Sales Promo Active Compet Potent;
proc glm  data=roofing;
   model Sales = Promo Active Compet Potent;
run ;
proc glm  data=roofing;
   model Sales = Promo Active Compet;
run ;
proc glm  data=roofing;
   model Sales = Promo Active Potent;
run ;
proc glm  data=roofing;
   model Sales = Promo Compet Potent;
run ;
proc glm  data=roofing;
   model Sales = Active Compet Potent;
run ;
proc glm  data=roofing;
   model Sales = Promo Active ;
run ;
proc glm  data=roofing;
   model Sales = Promo Compet;
run ;
proc glm  data=roofing;
   model Sales = Promo Potent;
run ;
proc glm  data=roofing;
   model Sales = Active Compet ;
run ;
proc glm  data=roofing;
   model Sales = Active Potent;
run ;
proc glm  data=roofing;
   model Sales = Compet Potent;
run ;
proc glm  data=roofing;
   model Sales = Promo ;
run ;
proc glm  data=roofing;
   model Sales = Active ;
run ;
proc glm  data=roofing;
   model Sales = Compet;
run ;
proc glm  data=roofing;
   model Sales = Potent;
run ;
Dependent Variable: SALES
                             Sum of            Mean
Source          DF          Squares          Square   F Value     Pr > F
Model            4     176777.06150     44194.26538    479.10     0.0001
Error           21       1937.13696        92.24462
Corrected Total 25     178714.19846

          R-Square             C.V.        Root MSE           SALES Mean
          0.989161         5.642757       9.6044061            170.20769

Source          DF        Type I SS     Mean Square   F Value     Pr > F
PROMO            1       4510.59804      4510.59804     48.90     0.0001
ACTIVE           1     105117.72438    105117.72438   1139.55     0.0001
COMPET           1      67104.34254     67104.34254    727.46     0.0001
POTENT           1         44.39655        44.39655      0.48     0.4954

Source          DF      Type III SS     Mean Square   F Value     Pr > F
PROMO            1       257.753913      257.753913      2.79     0.1094
ACTIVE           1     38269.428409    38269.428409    414.87     0.0001
COMPET           1     66682.540623    66682.540623    722.89     0.0001
POTENT           1        44.396549       44.396549      0.48     0.4954

                                T for H0:    Pr > |T|   Std Error of
Parameter          Estimate    Parameter=0                Estimate
INTERCEPT       178.3203403          13.76     0.0001    12.96031930
PROMO             1.8070643           1.67     0.1094     1.08103934
ACTIVE            3.3178334          20.37     0.0001     0.16289176
COMPET          -21.1849842         -26.89     0.0001     0.78793899
POTENT            0.3245124           0.69     0.4954     0.46776444

Dependent Variable: SALES
                             Sum of            Mean
Source          DF          Squares          Square   F Value     Pr > F
Model            3     176732.66495     58910.88832    654.06     0.0001
Error           22       1981.53351        90.06970
Corrected Total 25     178714.19846

          R-Square             C.V.        Root MSE           SALES Mean
          0.988912         5.575839       9.4905060            170.20769

Source          DF        Type I SS     Mean Square   F Value     Pr > F
PROMO            1       4510.59804      4510.59804     50.08     0.0001
ACTIVE           1     105117.72438    105117.72438   1167.07     0.0001
COMPET           1      67104.34254     67104.34254    745.03     0.0001

Source          DF      Type III SS     Mean Square   F Value     Pr > F
PROMO            1       228.908656      228.908656      2.54     0.1252
ACTIVE           1     49843.667563    49843.667563    553.39     0.0001
COMPET           1     67104.342537    67104.342537    745.03     0.0001

                                T for H0:    Pr > |T|   Std Error of
Parameter          Estimate    Parameter=0                Estimate
INTERCEPT       179.8442849          14.25     0.0001    12.62132900
PROMO             1.6772431           1.59     0.1252     1.05209332
ACTIVE            3.3693924          23.52     0.0001     0.14323065
COMPET          -21.2165097         -27.30     0.0001     0.77729880

Dependent Variable: SALES
                             Sum of            Mean
Source          DF          Squares          Square   F Value     Pr > F
Model            3     110094.52088     36698.17363     11.77     0.0001
Error           22      68619.67758      3119.07625
Corrected Total 25     178714.19846
          R-Square             C.V.        Root MSE           SALES Mean
          0.616037         32.81208       55.848691            170.20769

Source          DF        Type I SS     Mean Square   F Value     Pr > F
PROMO            1       4510.59804      4510.59804      1.45     0.2419
ACTIVE           1     105117.72438    105117.72438     33.70     0.0001
POTENT           1        466.19846       466.19846      0.15     0.7028

Source          DF      Type III SS     Mean Square   F Value     Pr > F
PROMO            1       190.680080      190.680080      0.06     0.8070
ACTIVE           1     74129.881595    74129.881595     23.77     0.0001
POTENT           1       466.198464      466.198464      0.15     0.7028

                                T for H0:    Pr > |T|   Std Error of
Parameter          Estimate    Parameter=0                Estimate
INTERCEPT      -79.72317175          -1.57     0.1297    50.64582944
PROMO            1.55420109           0.25     0.8070     6.28590108
ACTIVE           4.45836475           4.88     0.0001     0.91451733
POTENT           1.04982923           0.39     0.7028     2.71547768

Dependent Variable: SALES
                             Sum of            Mean
Source          DF          Squares          Square   F Value     Pr > F
Model            3     138507.63309     46169.21103     25.26     0.0001
Error           22      40206.56537      1827.57115
Corrected Total 25     178714.19846
          R-Square             C.V.        Root MSE           SALES Mean
          0.775023         25.11643       42.750101            170.20769

Source          DF        Type I SS     Mean Square   F Value     Pr > F
PROMO            1       4510.59804      4510.59804      2.47     0.1305
COMPET           1     122378.39935    122378.39935     66.96     0.0001
POTENT           1      11618.63570     11618.63570      6.36     0.0194

Source          DF      Type III SS     Mean Square   F Value     Pr > F
PROMO            1       3866.54364      3866.54364      2.12     0.1599
COMPET           1     102542.99381    102542.99381     56.11     0.0001
POTENT           1      11618.63570     11618.63570      6.36     0.0194

                                T for H0:    Pr > |T|   Std Error of
Parameter          Estimate    Parameter=0                Estimate
INTERCEPT       318.3828110           6.51     0.0001    48.89801708
PROMO             6.8154836           1.45     0.1599     4.68567717
COMPET          -25.3644484          -7.49     0.0001     3.38617636
POTENT            4.6714561           2.52     0.0194     1.85272878

Dependent Variable: SALES
                             Sum of            Mean
Source          DF          Squares          Square   F Value     Pr > F
Model            3     176519.30759     58839.76920    589.77     0.0001
Error           22       2194.89087        99.76777
Corrected Total 25     178714.19846

          R-Square             C.V.        Root MSE           SALES Mean
          0.987718         5.868349       9.9883816            170.20769

Source          DF        Type I SS     Mean Square   F Value     Pr > F
ACTIVE           1     109524.08874    109524.08874   1097.79     0.0001
COMPET           1      66979.66755     66979.66755    671.36     0.0001
POTENT           1         15.55129        15.55129      0.16     0.6968
Source          DF      Type III SS     Mean Square   F Value     Pr > F
ACTIVE           1     41878.218139    41878.218139    419.76     0.0001
COMPET           1     66615.466790    66615.466790    667.71     0.0001
POTENT           1        15.551292       15.551292      0.16     0.6968

                                T for H0:    Pr > |T|   Std Error of
Parameter          Estimate    Parameter=0                Estimate
INTERCEPT       186.1147426          14.80     0.0001    12.57591387
ACTIVE            3.3797683          20.49     0.0001     0.16496353
COMPET          -21.1735255         -25.84     0.0001     0.81940907
POTENT            0.1891620           0.39     0.6968     0.47912158

Dependent Variable: SALES
                             Sum of            Mean
Source          DF          Squares          Square   F Value     Pr > F
Model            2     109628.32242     54814.16121     18.25     0.0001
Error           23      69085.87604      3003.73374
Corrected Total 25     178714.19846
          R-Square             C.V.        Root MSE           SALES Mean
          0.613428         32.19968       54.806329            170.20769

Source          DF        Type I SS     Mean Square   F Value     Pr > F
PROMO            1       4510.59804      4510.59804      1.50     0.2328
ACTIVE           1     105117.72438    105117.72438     35.00     0.0001

Source          DF      Type III SS     Mean Square   F Value     Pr > F
PROMO            1        104.23367       104.23367      0.03     0.8539
ACTIVE           1     105117.72438    105117.72438     35.00     0.0001

                                T for H0:    Pr > |T|   Std Error of
Parameter          Estimate    Parameter=0                Estimate
INTERCEPT      -76.02301958          -1.56     0.1330    48.80506813
PROMO            1.13159365           0.19     0.8539     6.07459320
ACTIVE           4.63122881           5.92     0.0001     0.78286879

Dependent Variable: SALES
                             Sum of            Mean
Source          DF          Squares          Square   F Value     Pr > F
Model            2     126888.99739     63444.49870     28.16     0.0001
Error           23      51825.20107      2253.26961
Corrected Total 25     178714.19846

          R-Square             C.V.        Root MSE           SALES Mean
          0.710011         27.88864       47.468617            170.20769

Source          DF        Type I SS     Mean Square   F Value     Pr > F
PROMO            1       4510.59804      4510.59804      2.00     0.1705
COMPET           1     122378.39935    122378.39935     54.31     0.0001
Source          DF      Type III SS     Mean Square   F Value     Pr > F
PROMO            1       2886.95904      2886.95904      1.28     0.2693
COMPET           1     122378.39935    122378.39935     54.31     0.0001

                                T for H0:    Pr > |T|   Std Error of
Parameter          Estimate    Parameter=0                Estimate
INTERCEPT       385.6567000           8.48     0.0001    45.49998215
PROMO             5.8703132           1.13     0.2693     5.18617945
COMPET          -27.1183132          -7.37     0.0001     3.67973775

Dependent Variable: SALES
                             Sum of            Mean
Source          DF          Squares          Square   F Value     Pr > F
Model            2     35964.639285    17982.319642      2.90     0.0755
Error           23    142749.559177     6206.502573
Corrected Total 25    178714.198462

          R-Square             C.V.        Root MSE           SALES Mean
          0.201241         46.28543       78.781359            170.20769

Source          DF        Type I SS     Mean Square   F Value     Pr > F
PROMO            1      4510.598039     4510.598039      0.73     0.4027
POTENT           1     31454.041246    31454.041246      5.07     0.0342
Source          DF      Type III SS     Mean Square   F Value     Pr > F
PROMO            1      6321.588775     6321.588775      1.02     0.3234
POTENT           1     31454.041246    31454.041246      5.07     0.0342

                                T for H0:    Pr > |T|   Std Error of
Parameter          Estimate    Parameter=0                Estimate
INTERCEPT       48.79477924           0.80     0.4320    61.00084351
PROMO            8.70202008           1.01     0.3234     8.62244495
POTENT           7.52230240           2.25     0.0342     3.34145820

Dependent Variable: SALES
                             Sum of            Mean
Source          DF          Squares          Square   F Value     Pr > F
Model            2     176503.75630     88251.87815    918.27     0.0001
Error           23       2210.44216        96.10618
Corrected Total 25     178714.19846

          R-Square             C.V.        Root MSE           SALES Mean
          0.987631         5.759655       9.8033760            170.20769

Source          DF        Type I SS     Mean Square   F Value     Pr > F
ACTIVE           1     109524.08874    109524.08874   1139.62     0.0001
COMPET           1      66979.66755     66979.66755    696.93     0.0001
Source          DF      Type III SS     Mean Square   F Value     Pr > F
ACTIVE           1     52501.717952    52501.717952    546.29     0.0001
COMPET           1     66979.667554    66979.667554    696.93     0.0001

                                T for H0:    Pr > |T|   Std Error of
Parameter          Estimate    Parameter=0                Estimate
INTERCEPT       186.6940191          15.23     0.0001    12.25868869
ACTIVE            3.4080772          23.37     0.0001     0.14581370
COMPET          -21.1929644         -26.40     0.0001     0.80277876

Dependent Variable: SALES
                             Sum of            Mean
Source          DF          Squares          Square   F Value     Pr > F
Model            2     109903.84080     54951.92040     18.37     0.0001
Error           23      68810.35766      2991.75468
Corrected Total 25     178714.19846

          R-Square             C.V.        Root MSE           SALES Mean
          0.614970         32.13541       54.696935            170.20769

Source          DF        Type I SS     Mean Square   F Value     Pr > F
ACTIVE           1     109524.08874    109524.08874     36.61     0.0001
POTENT           1        379.75206       379.75206      0.13     0.7249

Source          DF      Type III SS     Mean Square   F Value     Pr > F
ACTIVE           1     80260.790290    80260.790290     26.83     0.0001
POTENT           1       379.752055      379.752055      0.13     0.7249

                                T for H0:    Pr > |T|   Std Error of
Parameter          Estimate    Parameter=0                Estimate
INTERCEPT      -72.89888526          -1.75     0.0929    41.58849196
ACTIVE           4.51110643           5.18     0.0001     0.87095225
POTENT           0.93307219           0.36     0.7249     2.61895580

Dependent Variable: SALES
                             Sum of            Mean
Source          DF          Squares          Square   F Value     Pr > F
Model            2     134641.08945     67320.54473     35.13     0.0001
Error           23      44073.10901      1916.22213
Corrected Total 25     178714.19846

          R-Square             C.V.        Root MSE           SALES Mean
          0.753388         25.71839       43.774675            170.20769

Source          DF        Type I SS     Mean Square   F Value     Pr > F
COMPET           1     124002.03835    124002.03835     64.71     0.0001
POTENT           1      10639.05111     10639.05111      5.55     0.0274

Source          DF      Type III SS     Mean Square   F Value     Pr > F
COMPET           1     104998.03894    104998.03894     54.79     0.0001
POTENT           1      10639.05111     10639.05111      5.55     0.0274

                                T for H0:    Pr > |T|   Std Error of
Parameter          Estimate    Parameter=0                Estimate
INTERCEPT       359.7830558           8.84     0.0001    40.71321792
COMPET          -25.6291831          -7.40     0.0001     3.46231914
POTENT            4.4558636           2.36     0.0274     1.89105156

Dependent Variable: SALES
                             Sum of            Mean
Source          DF          Squares          Square   F Value     Pr > F
Model            1     4510.5980388    4510.5980388      0.62     0.4382
Error           24   174203.6004228    7258.4833509
Corrected Total 25   178714.1984615

          R-Square             C.V.        Root MSE           SALES Mean
          0.025239         50.05457       85.196733            170.20769

Source          DF        Type I SS     Mean Square   F Value     Pr > F
PROMO            1     4510.5980388    4510.5980388      0.62     0.4382

Source          DF      Type III SS     Mean Square   F Value     Pr > F
PROMO            1     4510.5980388    4510.5980388      0.62     0.4382

                                T for H0:    Pr > |T|   Std Error of
Parameter          Estimate    Parameter=0                Estimate
INTERCEPT       130.5568847           2.46     0.0213    53.00136911
PROMO             7.3322973           0.79     0.4382     9.30134908

Dependent Variable: SALES
                             Sum of            Mean
Source          DF          Squares          Square   F Value     Pr > F
Model            1     109524.08874    109524.08874     37.99     0.0001
Error           24      69190.10972      2882.92124
Corrected Total 25     178714.19846

          R-Square             C.V.        Root MSE           SALES Mean
          0.612845         31.54548       53.692842            170.20769

Source          DF        Type I SS     Mean Square   F Value     Pr > F
ACTIVE           1     109524.08874    109524.08874     37.99     0.0001

Source          DF      Type III SS     Mean Square   F Value     Pr > F
ACTIVE           1     109524.08874    109524.08874     37.99     0.0001

                                T for H0:    Pr > |T|   Std Error of
Parameter          Estimate    Parameter=0                Estimate
INTERCEPT      -71.20836328          -1.76     0.0919    40.55844917
ACTIVE           4.65639276           6.16     0.0001     0.75545947

Dependent Variable: SALES
                             Sum of            Mean
Source          DF          Squares          Square   F Value     Pr > F
Model            1     124002.03835    124002.03835     54.39     0.0001
Error           24      54712.16012      2279.67334
Corrected Total 25     178714.19846

          R-Square             C.V.        Root MSE           SALES Mean
          0.693857         28.05157       47.745925            170.20769

Source          DF        Type I SS     Mean Square   F Value     Pr > F
COMPET           1     124002.03835    124002.03835     54.39     0.0001

Source          DF      Type III SS     Mean Square   F Value     Pr > F
COMPET           1     124002.03835    124002.03835     54.39     0.0001

                                T for H0:    Pr > |T|   Std Error of
Parameter          Estimate    Parameter=0                Estimate
INTERCEPT       418.8538426          11.97     0.0001    34.98969502
COMPET          -27.2776367          -7.38     0.0001     3.69852569

Dependent Variable: SALES
                             Sum of            Mean
Source          DF          Squares          Square   F Value     Pr > F
Model            1     29643.050510    29643.050510      4.77     0.0389
Error           24    149071.147952     6211.297831
Corrected Total 25    178714.198462

          R-Square             C.V.        Root MSE           SALES Mean
          0.165868         46.30331       78.811787            170.20769

Source          DF        Type I SS     Mean Square   F Value     Pr > F
POTENT           1     29643.050510    29643.050510      4.77     0.0389

Source          DF      Type III SS     Mean Square   F Value     Pr > F
POTENT           1     29643.050510    29643.050510      4.77     0.0389

                                T for H0:    Pr > |T|   Std Error of
Parameter          Estimate    Parameter=0                Estimate
INTERCEPT       98.20481928           2.70     0.0126    36.40356320
POTENT           7.28433735           2.18     0.0389     3.33441599


Richard Lockhart
1999-02-10