-
Notifications
You must be signed in to change notification settings - Fork 0
/
homework6_data.sas
56 lines (50 loc) · 982 Bytes
/
homework6_data.sas
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
/* For question 1*/
data hw6_independent_samples;
input subject$ diet$ weight;
cards;
1 meat 181.7430
2 meat 177.4771
3 meat 191.2686
4 meat 165.0295
5 meat 180.2135
6 meat 170.0580
7 meat 196.7114
8 meat 180.6256
9 meat 178.3083
10 meat 212.3657
11 spam 178.0479
12 spam 176.0893
13 spam 174.0887
14 spam 170.7987
15 spam 176.2029
16 spam 174.4232
17 spam 167.7596
18 spam 174.6495
19 spam 165.7547
20 spam 188.5495
;
run;
/* First, we treat them as independent samples*/
proc ttest data=hw6_independent_samples;
class diet;
var weight;
run;
/* For question 4*/
data hw6_dependent_samples;
input subject$ meat_weight spam_weight;
cards;
1 181.7430 178.0479
2 177.4771 176.0893
3 191.2686 174.0887
4 165.0295 170.7987
5 180.2135 176.2029
6 170.0580 174.4232
7 196.7114 167.7596
8 180.6256 174.6495
9 178.3083 165.7547
10 212.3657 188.5495
;
run;
proc ttest data=hw6_dependent_samples;
paired meat_weight*spam_weight;
run;