Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

R Problem Use the following code to access data from the Getting To Know You Survey that was just con- ducted. The dataset can also

image text in transcribed
R Problem Use the following code to access data from the Getting To Know You Survey that was just con- ducted. The dataset can also be found online at the link: shorturl.at/wxGJT 1. Are US students more likely to favor legalizing marijuana? The following two variables will be used. e intemational.student International student? Two categories \"US." or "International" e legalizingmarijuana Favor legalizing marijuana? Two categories \"Yes\" or "No"(although three categories are available, we only care about yes or no group) (a) Run the command below to construct a contingency table. table (international . student , legalizing marijuana) (b) Let p1 and p2 denote the proportion favoring marijuana legalization among international students and US students. respectively. Use prop.tast() command to construct a 95% condence interval for comparing p1 and 132. Can you conclude which of p1 and p2 is larger? Explain. (c) Test your conclusion in (b) at the .05 level using prop.test() command. You only need to show your code and output. (d) Interpret the reported p-value. 2. Students who live on campus spend more time exercising? The following two variables will be used. c live.on.campus Do you live on campus? Two categories \"Yes\" or "No\" e physicalexercise Number of hours spent exercising last week. You may use the code below to separate the students who live on campus and those who live on campus. PEon=physicaL exercise [live . on.canpue=="Yes"] PEof=phyaical . exercise [live . on . canpue="llo"] (a) Construct a side-byside boxplot (R command boxplotO) to compare the amount of time spent exercising between the students who live on campus vs. those who live off campus. (b) According to the boxplot, how does the amount of time spent exercising depends on whether a student live on campus? State the statistic you have based your answer upon. STAT 3011 Homework 8 (Due: Tues., April 14, 2020) Spring 2020 (c) That your conclusion in (b) at the .05 level using t.teat() wmmand. You only need to show your code and output. (d) Make a decision based on the reported pvalue and interpret. (e) Use qqnormO and qqlineO to check if the two samples are approximately normal. If the as- sumption about the shape of the population distribution is not valid, does this invalidate your conclusion in ((1)? Explain

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Managerial Accounting

Authors: Karen W. Braun, Wendy M. Tietz

7th Edition

0137858515, 9780137858514

Students also viewed these Mathematics questions