Docsity

Solved Assignment for Applied Multivariable Statistics | STAT 873, Assignments of Statistics

Toggle sidebar
bg1
HW for Chapter 5
#1 – d) We will discuss this test in Chapter 6 and Chapter 10
Hint:
If p=3, then
11 11
11 12 13 12 13
22 12 22 23 22 12 23
13 23 33 13 23
33 33
1/ 0 0 1/ 0 0 1
0 1/ 0 0 1/ 0 1
1
0 0 1/ 0 0 1/

.
Let A=
11
22
33
1/ 0 0
0 1/ 0
0 0 1/
. Note that |AA| = |A||||A|.
#6 – I used SAS for this problem and see the addition of part e.
a) Yes (or use the correlation matrix)
b) Code and output:
dm 'log;clear;output;clear;';
options ps=50 ls=70 pageno=1;
goptions reset=global border ftext=swiss gunit=cm htext=0.4 htitle=0.5;
options mprint symbolgen mlogic;
goptions display noprompt;
**********************************************************************;
** **;
** AUTHOR: Chris Bilder **;
** COURSE: STAT 873 **;
** DATE: 9-14-03 **;
** PURPOSE: Chapter 5 HW **;
** **;
** NOTES: **;
** **;
**********************************************************************;
title1 'Chris Bilder, STAT 873';
data big8;
length school $ 14; *This makes sure the full name is in the data set;
*Otherwise, school would have the length of colorado;
input SCHOOL$ GAMES RO_YDS RD_YDS PO_YDS PD_RAT TO_YDS TD_YDS SO SD TOM
WINS;
datalines;
COLORADO 11 291.5 114.2 203.8 125.2 495.3 343.7 36.2 19.2 0.55 10
IOWA_STATE 11 178.0 272.8 137.1 137.1 315.1 460.7 17.5 33.0 -0.64 0.0
KANSAS 11 247.1 171.2 140.9 135.8 363.3 400.7 28.5 22.0 0.73 6.0
KANSAS_STATE 11 125.6 167.5 237.6 94.3 363.3 312.5 27.7 14.2 1.18 9.0
MISSOURI 12 107.9 235.3 202.5 138.5 310.4 414.9 17.3 27.1 0.17 3.5
1
pf3
pf4
pf5

Partial preview of the text

Download Solved Assignment for Applied Multivariable Statistics | STAT 873 and more Assignments Statistics in PDF only on Docsity!

HW for Chapter 5

#1 – d) We will discuss this test in Chapter 6 and Chapter 10

Hint:

If p=3, then

(^11 11 12 13 1112 ) 22 12 22 23 22 12 23 33 13 23 33 33 13 23

0 0 1/ 0 0 1/^1

 ^  ^ ^ ^  ^  ^ 

  ^ ^ ^    ^  

Let A=

11 22 33

. Note that |AA| = |A||||A|.

#6 – I used SAS for this problem and see the addition of part e.

a) Yes (or use the correlation matrix)

b) Code and output:

dm 'log;clear;output;clear;'; options ps= 50 ls= 70 pageno= 1 ; goptions reset=global border ftext=swiss gunit=cm htext= 0.4 htitle= 0.5 ; options mprint symbolgen mlogic; goptions display noprompt; **********************************************************************; ** **; ** AUTHOR: Chris Bilder **; ** COURSE: STAT 873 **; ** DATE: 9-14-03 **; ** PURPOSE: Chapter 5 HW **; ** **; ** NOTES: **; ** **; **********************************************************************; title1 'Chris Bilder, STAT 873'; data big8; length school $ 14 ; *This makes sure the full name is in the data set; *Otherwise, school would have the length of colorado; input SCHOOL$ GAMES RO_YDS RD_YDS PO_YDS PD_RAT TO_YDS TD_YDS SO SD TOM WINS; datalines; COLORADO 11 291.5 114.2 203.8 125.2 495.3 343.7 36.2 19.2 0.55 10 IOWA_STATE 11 178.0 272.8 137.1 137.1 315.1 460.7 17.5 33.0 -0.64 0. KANSAS 11 247.1 171.2 140.9 135.8 363.3 400.7 28.5 22.0 0.73 6. KANSAS_STATE 11 125.6 167.5 237.6 94.3 363.3 312.5 27.7 14.2 1.18 9. MISSOURI 12 107.9 235.3 202.5 138.5 310.4 414.9 17.3 27.1 0.17 3.

NEBRASKA 12 340.0 79.3 137.8 96.7 477.8 258.8 36.3 12.1 0.08 12

OKLAHOMA 11 182.2 148.5 173.9 107.5 356.1 295.7 19.8 21.6 -0.18 6.

OKLAHOMA_STATE 11 204.6 192.5 133.5 130.3 338.1 385.9 16.4 23.3 -0.45 3.

run ; title2 'PCA using the correlation matrix'; proc princomp data=big8 out=scores; var RO_YDS RD_YDS PO_YDS PD_RAT TO_YDS TD_YDS SO SD TOM; run ; Chris Bilder, STAT 873 1 PCA using the correlation matrix The PRINCOMP Procedure Observations 8 Variables 9 Simple Statistics RO_YDS RD_YDS PO_YDS Mean 209.6125000 172.6625000 170. StD 79.5444429 62.2110908 39. Simple Statistics PD_RAT TO_YDS TD_YDS Mean 120.6750000 377.4250000 359. StD 18.4135625 70.4542962 68. Simple Statistics SO SD TOM Mean 24.96250000 21.56250000 0. StD 8.35975692 6.69774749 0. Correlation Matrix RO_YDS RD_YDS PO_YDS PD_RAT TO_YDS RO_YDS 1.0000 -.7377 -.4691 -.1943 0. RD_YDS -.7377 1.0000 -.0781 0.6682 -. PO_YDS -.4691 -.0781 1.0000 -.3241 0. PD_RAT -.1943 0.6682 -.3241 1.0000 -. TO_YDS 0.8403 -.8759 0.0730 -.4438 1. TD_YDS -.4265 0.8839 -.2327 0.9069 -. SO 0.7521 -.8260 0.1657 -.4763 0. SD -.4630 0.8862 -.2923 0.8337 -. TOM -.0180 -.3912 0.6748 -.3652 0.

%MACRO PLOTS(data, analysis, order); Scatter plot of the first two principal components; proc gplot data=&data; plot prin2prin1 / vaxis=axis1 haxis=axis2 frame grid vref= 0 href= 0 cvref=green chref=green; title2 "&analysis: Prin. Comp. #1 vs. Prin. Comp. #2"; symbol1 v=dot pointlabel=('#SCHOOL' h= 0.4 ) h= 0.25 cv=blue; axis1 label = (a= 90 'Prin. Comp. #2') length = 12 order = (&order); axis2 label = ('Prin. Comp. #1') length = 12 order = (&order); run; Bubble plot of the first three principal components; proc gplot data=&data; bubble prin2prin1 = prin3 / vaxis=axis1 haxis=axis2 frame grid bcolor=blue bsize= 10 vref= 0 href= 0 cvref=green chref=green; title2 "&analysis:Prin. Comp. #1 vs. Prin. Comp. #2 with bubble proportional to Prin. Comp. #3"; axis1 label = (a= 90 'Prin. Comp. #2') length = 12 order = (&order); axis2 label = ('Prin. Comp. #1') length = 12 order = (&order); run; 3D scatter plot of the first three principal components; proc g3d data=&data; scatter prin2prin1 = prin3 / grid zticknum= 6 xticknum= 6 yticknum= 6 shape='cube' color='blue' rotate= 140 tilt= 40 ; title2 "&analysis: 3D scatter plot"; run; *Find Min and put into a data set; proc means data=&data noprint; var prin3; output out=out_set1 min=min; run; data null; set out_set1; call symput('min_prin3', min); run; *Test it - the value should appear in the LOG Window; %put &min_prin3;

*Adjust prin3; data score2; set &data; prin3_adj = prin3 - &min_prin3 + 0.001 ; run; Bubble plot of the first three principal components; proc gplot data=score2; bubble prin2prin1 = prin3_adj / vaxis=axis1 haxis=axis2 frame grid bcolor=blue bsize= 10 vref= 0 href= 0 cvref=green chref=green; title2 "&analysis:Prin. Comp. #1 vs. Prin. Comp. #2 with bubble proportional to Prin. Comp. #3 adj."; axis1 label = (a= 90 'Prin. Comp. #2') length = 12 order = (&order); axis2 label = ('Prin. Comp. #1') length = 12 order = (&order); run; %MEND PLOTS; % PLOTS (scores, Correlation matrix, - 5 to 5 by 1 );

e)

The first PC tends to follow what the actual standings were for this year (of course, if you did

not know this beforehand it may be difficult to answer this question!).

PC #1 appears to contrast offensive and defensive statistics. In football, large offensive and

small defensive numbers are the most desirable for the variables given in this data set. Notice

how Nebraska has the largest PC #1 value!

PC#2 appears to be a contrast between rushing offense vs. passing offense. Turnover margin

also plays a role. Kansas State may be an outlier. This particular year, Kansas State had a

more passing oriented offense versus most other Big 8 schools which had run oriented

offenses.

NOTE: Nebraska was the NATIONAL CHAMPION in 1994!