Docsity

Solved Homework 5 - Applied Multivariate Analysis I | STAT 8108, Assignments of Descriptive statistics

Toggle sidebar
bg1
Page 1 of 10
Homework Problems - Set 5 (due on 11/1/07)
Ex. 7.21 (based on air-pollution data in Table 1.5)
Let
1 2
Y NO
and
2 3
Y O
be the two responses (pollutants) corresponding to the predictor
variables
1
Z
=wind and
2
Z
=solar radiation.
(a) Perform a regression analysis using only the 1st response
1
Y
.
(i) Suggest and fit appropriate linear regression models.
This is a univariate case with only one response variable. As calculated by SAS (see Appendix
7.21a, under ā€œParameter Estimatesā€)
1
10.1145
( ' ) ' -0.2113
0.0206
hat
Z Z Z y


 
 
 ļ€½ļƒŖ 
 
 
0 1 j1 2 j2
= z z
j j
Y
   
  
1 1 2
10.1145-0.2113z 0.0206z
hat
y 
The Standard Deviations of the least squares coefficients are 3.626 for
0

, 0.3392 for
1

, and
0.03094 for
2

. (See Appendix 7.21a under ā€œStandard Errorsā€ of ā€œParameter Estimates.ā€)
In the ANOVA table (See Appendix 7.21a under ā€œAnalysis of Varianceā€), we see that the p
value for the model (which includes both
1
Z
and
2
Z
on
1
Y
), is 0.6338, which is greater than

(=0.05). Thus,
1
Z
and
2
Z
jointly do not contribute significantly toward the prediction of
1
Y
.
Next, looking at the p values for
1
Z
and
2
Z
individually (which are 0.5369 and 0.5104
respectively), we see that neither of these two predictor variables individually contributes
significantly toward the prediction of
1
Y
.
(ii) Analyze the residuals.
Our assumptions require normality i.e. the data must be normally distributed. Normality is
diagnosed based on the residuals. We can use the Shapiro-Wilk test, which tests for normality
by using multiple regression analysis. We can also examine normality by looking at a plot of
Stat 8108: Multivariate Dr. Sarkar
J.J. Singh, 11-2-07
pf3
pf4
pf5
pf8
pf9
pfa

Partial preview of the text

Download Solved Homework 5 - Applied Multivariate Analysis I | STAT 8108 and more Assignments Descriptive statistics in PDF only on Docsity!

Homework Problems - Set 5 (due on 11/1/07)

Ex. 7.21 (based on air-pollution data in Table 1.5)

Let 1 2

Y  NO

and

2 3

Y  O

be the two responses (pollutants) corresponding to the predictor

variables 1

Z

=wind and

2

Z

=solar radiation.

(a) Perform a regression analysis using only the 1

st

response

1

Y

(i) Suggest and fit appropriate linear regression models.

This is a univariate case with only one response variable. As calculated by SAS (see Appendix

7.21a, under ā€œParameter Estimatesā€)

1

hat

 Z Z Z y



0 1 j1 2 j

= z z

j j

Y      

1 1 2

10.1145-0.2113z 0.0206z

hat

y  

s  3.

The Standard Deviations of the least squares coefficients are 3.626 for 0

, 0.3392 for

1

, and

0.03094 for 2

. (See Appendix 7.21a under ā€œStandard Errorsā€ of ā€œParameter Estimates.ā€)

In the ANOVA table (See Appendix 7.21a under ā€œAnalysis of Varianceā€), we see that the p

value for the model (which includes both 1

Z

and

2

Z

on

1

Y

), is 0.6338, which is greater than

(=0.05). Thus, 1

Z

and

2

Z

jointly do not contribute significantly toward the prediction of

1

Y

Next, looking at the p values for 1

Z

and

2

Z

individually (which are 0.5369 and 0.

respectively), we see that neither of these two predictor variables individually contributes

significantly toward the prediction of 1

Y

(ii) Analyze the residuals.

Our assumptions require normality i.e. the data must be normally distributed. Normality is

diagnosed based on the residuals. We can use the Shapiro-Wilk test, which tests for normality

by using multiple regression analysis. We can also examine normality by looking at a plot of

Stat 8108: Multivariate Dr. Sarkar

residuals vs. normal quantiles (which is in SAS known as a ā€œqqplotā€) and hope that it is a

straight unbroken line.

From Appendix 7.21a, we see that, using the Shapiro-Wilk test, for residy1 (the residual for

variable 1

y ), the p value is 0.0324, which is LESS than

(=0.05). Therefore, we cannot

conclude normality for the residual (of the one variable 1

y ). Therefore, our assumptions are not

met. (Note that the Shapiro-Wilk test only works for univariate analysis.)

Furthermore, our plot of residuals vs. normal quantiles is not a straight unbroken line for residy

(see Appendix 7.21a), which also confirms that we cannot conclude normality. The plot is

rather a winding curve, with what appears to be a changing slope. If the plot had been a

straighter line and had had fewer outliers, it may have looked like it reflected normality, but I

judge that the plot is neither sufficiently straight nor sufficiently unbroken.

(iii) Construct a 95% prediction interval for

2

NO

corresponding to

1

z  10 and

2

z  80 .

As shown by Johnson (p. 379 and p. 381), the 95% prediction interval is:

1

0 1 0 0

hat

n r

z t s z Z Z z







 

, where

1

n r

t

 

is the upper

th

percentile of a t-

distribution with n-r-1 degrees of freedom.

Using SAS, we calculate this as (2.44, 16.85). (See Appendix 7.21a.)

Appendix 7.21a

Model: MODEL

Dependent Variable: y

Number of Observations Read 42

Number of Observations Used 42

Analysis of Variance

Sum of Mean

Source DF Squares Square F Value Pr > F

Model 2 10.76918 5.38459 0.46 0.

Error 39 455.13558 11.

Corrected Total 41 465.

Root MSE 3.41616 R-Square 0.

Dependent Mean 10.04762 Adj R-Sq -0.

Coeff Var 33.

Stat 8108: Multivariate Dr. Sarkar

(b) Perform a multivariate multiple regression analysis using both responses

1

Y

and

2

Y

(i) Suggest and fit appropriate linear regression models.

Just as in question 7.21a, SAS calculates ā€œParameter Estimatesā€ (see Appendix 7.21b) for the

dependent variable (aka response variable) 1

y as follows:

1

hat

 Z Z Z y



0 1 j1 2 j

= z z

j j

Y      

1 1 2

10.1145-0.2113z 0.0206z

hat

y  

s  3.

And of course again, the Standard Deviations of the least squares coefficients are 3.626 for 0

0.3392 for 1

, and 0.03094 for

2

. (See Appendix 7.21b under ā€œStandard Errorsā€ of ā€œParameter

Estimates.ā€)

And again, in the ANOVA table (See Appendix 7.21b under ā€œAnalysis of Varianceā€), we see

that the p value for the model (which includes both 1

Z

and

2

Z

on

1

Y

), is 0.6338, which is greater

than

(=0.05). Thus,

1

Z

and

2

Z

jointly do not contribute significantly toward the prediction of

1

Y

. Next, looking at the p values for

1

Z

and

2

Z

individually (which are 0.5369 and 0.

respectively), we see that neither of these two predictor variables individually contributes

significantly toward the prediction of 1

Y

However, it is a different story for the dependent variable (aka response variable) 2

y :

1

hat

 Z Z Z y



0 1 j1 2 j

= z z

j j

Y      

2 1 2

8.2762-0.7868z 0.09518z

hat

y  

s  5.

Stat 8108: Multivariate Dr. Sarkar

The Standard Deviations of the least squares coefficients are 5.5804 for 0

, 0.5220 for

1

, and

0.0476 for 2

. (See Appendix 7.21b under ā€œStandard Errorsā€ of ā€œParameter Estimates.ā€)

In the ANOVA table (See Appendix 7.21b under ā€œAnalysis of Varianceā€), we see that the p

value for the model (which includes both 1

Z

and

2

Z

on

2

Y

), is 0.0408, which is LESS than

(=0.05). Thus, 1

Z

and

2

Z

jointly do seem to be jointly significantly effective at predicting

2

Y

However , when we next look at the p values for 1

Z

and

2

Z

individually (which are 0.1398 and

0.0526 respectively), we see that neither of these two predictor variables individually

contributes significantly toward the prediction of 2

Y

(ii) Analyze the residuals.

Remember that our assumptions require normality, which is diagnosed based on the residuals via

the Shapiro-Wilk test (which only works for univariate multiple regression analysis), or by

examining a plot of residuals vs. normal quantiles (a ā€œqqplotā€)—which, when a straight

unbroken line, confirms normality. From Appendix 7.21b, we see that, using the Shapiro-Wilk

test, we find the same p value of 0.0324 for residy1 as in question 7.21a, which of course is

LESS than

(=0.05). Therefore, we cannot conclude normality for the residual (of the one

variable 1

y

). Therefore, our assumptions are not met. The same conclusion holds for the plot of

residuals vs. normal quantiles (again, just as in question 7.21a).

From Appendix 7.21b, we also see that Shapiro-Wilk test (which only works for univariate

multiple regression analysis) shows that the p value for residy2 is 0.0067, which of course is

LESS than

(=0.05). Therefore, we cannot conclude normality for the residual (of the one

variable 2

y ). Therefore, our assumptions are not met. The same conclusion holds for the plot of

residuals vs. normal quantiles which, like as it was for residy1 is a winding curve, with what

appears to be a changing slope. If the plot had been a straighter line and had had fewer outliers,

it may have looked like it reflected normality, but I judge that the plot is neither sufficiently

straight nor sufficiently unbroken.

(iii) Construct a 95% prediction ellipse for both

2

NO

and

3

O

for

1

z  10 and

2

z  80

. Compare this ellipse with the prediction interval in Part a (iii).

Comment.

As explained on Johnson, p.399, the

prediction ellipsoid for

0

Y

becomes:

1

1

0 0 0 0 0 0 ,

(Y ' ) ' (Y ' ) (1 ' ( ' ) ) ( )

hat hat hat

m n r m

n m n r

z z z Z Z z F

n r n r m





 

The right side of the inequality is known as the variable ā€œBorder,ā€ and represents the outer edges

of the ellipse.

Stat 8108: Multivariate Dr. Sarkar

Appendix 7.21b

Dependent Variable: y

Sum of

Source DF Squares Mean Square F Value Pr > F

Model 2 10.7691802 5.3845901 0.46 0.

Error 39 455.1355817 11.

Corrected Total 41 465.

R-Square Coeff Var Root MSE y1 Mean

0.023115 33.99969 3.416159 10.

Source DF Type III SS Mean Square F Value Pr > F

z1 1 4.52890133 4.52890133 0.39 0.

z2 1 5.14966799 5.14966799 0.44 0.

Standard

Parameter Estimate Error t Value Pr > |t|

Intercept 10.11454142 3.62606754 2.79 0.

z1 -0.21129082 0.33917379 -0.62 0.

z2 0.02054992 0.03093561 0.66 0.

Dependent Variable: y

Sum of

Source DF Squares Mean Square F Value Pr > F

Model 2 192.152768 96.076384 3.48 0.

Error 39 1077.966279 27.

Corrected Total 41 1270.

R-Square Coeff Var Root MSE y2 Mean

0.151287 55.90137 5.257391 9.

Source DF Type III SS Mean Square F Value Pr > F

z1 1 62.8038991 62.8038991 2.27 0.

z2 1 110.4722807 110.4722807 4.00 0.

Standard

Parameter Estimate Error t Value Pr > |t|

Intercept 8.276191957 5.58043537 1.48 0.

z1 -0.786823809 0.52198073 -1.51 0.

z2 0.095180347 0.04760920 2.00 0.

Stat 8108: Multivariate Dr. Sarkar

The UNIVARIATE Procedure

Variable: residy1 (Residual)

Tests for Normality

Test --Statistic--- -----p Value------

Shapiro-Wilk W 0.941566 Pr < W 0.

Kolmogorov-Smirnov D 0.107998 Pr > D >0.

Cramer-von Mises W-Sq 0.097709 Pr > W-Sq 0.

Anderson-Darling A-Sq 0.659933 Pr > A-Sq 0.

The UNIVARIATE Procedure

Variable: residy2 (Residual)

Tests for Normality

Test --Statistic--- -----p Value------

Shapiro-Wilk W 0.921324 Pr < W 0.

Kolmogorov-Smirnov D 0.148608 Pr > D 0.

Cramer-von Mises W-Sq 0.133626 Pr > W-Sq 0.

Anderson-Darling A-Sq 0.910587 Pr > A-Sq 0.

Stat 8108: Multivariate Dr. Sarkar

CENTER

INVNOVERNMINUSRMINUS1TIMESINVE

0.0869065 -0.

-0.006685 0.

BORDER

References

  1. Johnson RA and Wichern DW, ā€œApplied Multivariate Statistical Analysis,ā€ 2007.
  2. www.wikipedia.org

Stat 8108: Multivariate Dr. Sarkar