BookmarkSubscribeRSS Feed
olivia123456
Fluorite | Level 6
  • The General Social Survey conducted a poll of 668 adults in which the subjects were asked whether they agree that the government should prohibit smoking in public places. In addition, each was asked how many people lived in his or her household. The results are summarized in the following contingency table.

 

Test the hypothesis of independence. Use the α = 0.01 level of significance. 

  • State the null and alternate hypotheses.
  • Report the test statistic and the p-value

 

Household Size

 

1

2

3

4

5

Agree

73

109

48

37

37

No Opinion

31

52

29

20

18

Disagree

42

71

38

40

23

 

 

I don't know what I did wrong, am I perhaps using the wrong type of test?

1 REPLY 1
olivia123456
Fluorite | Level 6

2.1

Ho: The results are independent

Ha: The results are dependent

 

2.2

data household;

      input familysize agree no_opinion disagree;

cards;

1 73  31 42

2 109 52 71

3 48 29  38

4 37 20  40

5 37 18  23

run;

 

proc print data=household;

run;

 

 

proc freq data=household;

      weight familysize;

      tables agree/chisq;

run;

sas-innovate-white.png

Special offer for SAS Communities members

Save $250 on SAS Innovate and get a free advance copy of the new SAS For Dummies book! Use the code "SASforDummies" to register. Don't miss out, May 6-9, in Orlando, Florida.

 

View the full agenda.

Register now!

How to connect to databases in SAS Viya

Need to connect to databases in SAS Viya? SAS’ David Ghan shows you two methods – via SAS/ACCESS LIBNAME and SAS Data Connector SASLIBS – in this video.

Find more tutorials on the SAS Users YouTube channel.

Discussion stats
  • 1 reply
  • 873 views
  • 0 likes
  • 1 in conversation