/* Problem 1 SAS code */ DATA mathscores; INPUT student method $ score; cards; 1 modern 83.1 2 modern 78.6 3 modern 70 4 modern 70.4 5 modern 92.2 6 modern 79.8 7 modern 77.7 8 modern 74.8 9 modern 74.3 10 modern 80.8 11 modern 69.4 12 modern 71.7 13 modern 88.1 14 modern 71.8 15 modern 79.1 16 modern 58.8 17 modern 63.3 18 modern 89.7 19 modern 92.3 20 modern 80.9 21 modern 79.8 22 modern 93.5 23 modern 63.4 24 modern 76.4 25 modern 84.5 26 tradition 85.3 27 tradition 82.4 28 tradition 84 29 tradition 81.5 30 tradition 79.7 31 tradition 80.5 32 tradition 80.9 33 tradition 83.5 34 tradition 80.9 35 tradition 83.4 36 tradition 83.1 37 tradition 80.5 38 tradition 80.5 39 tradition 81.5 40 tradition 78.4 41 tradition 80.3 42 tradition 85.9 43 tradition 80.8 44 tradition 82.2 45 tradition 80.3 46 tradition 86 47 tradition 81 48 tradition 83 49 tradition 80.3 50 tradition 83.4 ; run; PROC UNIVARIATE data=mathscores PLOT; CLASS method; VAR score; run; /* Problem 2 SAS code */ DATA beetles; INPUT weight @@; cards; 113.7 103.5 110.3 100.0 116.2 121.5 118.7 107.0 116.9 106.4 122.6 119.4 120.4 118.6 114.2 123.6 117.9 114.6 115.4 112.3 111.2 119.6 ; run; PROC UNIVARIATE data=beetles PLOT; VAR weight; run; /* Problem 3 SAS code */ DATA smokers; INPUT person group $ rate; cards; 1 heavy 79.1 2 heavy 78.9 3 heavy 78.4 4 heavy 77.8 5 heavy 61.4 6 heavy 74.3 7 heavy 87.4 8 heavy 81.3 9 heavy 73.4 10 heavy 83.8 11 heavy 72.4 12 heavy 79.9 13 heavy 74 14 heavy 82.3 15 light 75 16 light 77.7 17 light 74.7 18 light 72.6 19 light 79.1 20 light 65.2 21 light 63.6 22 light 65.3 23 light 77 24 light 80.3 25 light 73.3 26 light 75.3 27 light 70.1 28 light 71.5 29 non 58 30 non 68.7 31 non 51.1 32 non 51 33 non 52.9 34 non 69 35 non 66.6 36 non 69 37 non 64.2 38 non 53.7 39 non 56.1 40 non 66.6 41 non 60.8 42 non 55 ; run; PROC UNIVARIATE data=smokers PLOT; CLASS group; VAR rate; run; /* Problem 4 SAS code */ DATA college; INPUT student ACTmath GPA; cards; 1 24 2.60 2 26 3.45 3 20 1.67 4 22 3.28 5 18 1.80 6 21 1.38 7 16 2.07 8 14 0.15 9 28 3.42 10 22 2.63 11 17 1.20 12 30 3.51 13 17 2.18 14 18 1.08 15 21 2.48 16 27 3.67 17 18 1.10 18 27 3.15 19 21 2.22 20 27 3.11 21 20 1.71 22 29 3.98 23 25 2.54 24 36 3.91 25 25 3.95 26 17 0.84 27 26 2.11 28 30 3.14 29 22 3.70 30 22 2.47 ; run; PROC UNIVARIATE data=college PLOT; VAR ACTmath GPA; run;