In the dataset airways (see R code), we have the change in airflow from moderate exercise...

90.2K

Verified Solution

Question

Statistics

In the dataset airways (see R code), we have the change inairflow from moderate exercise for 19 subjects under 2 differentexposure conditions – regular air (air) and 0.25% sulpher dioxide(so2).

a) Look at the correlation, and use the t-table to test the nullhypothesis that air flow change under these two conditions isuncorrelated. Test at significance level 0.05. Show your work.

b) Use a linear model and the summary function in R to test thenull hypothesis that air flow changes are uncorrelated among peopleat the alpha = 0.05.

c) Look at the scatterplot of the airway changes. Does a linearmodel fully explain the relationship between these variables? Whyor why not?

R codes:

##################

subject = 1:19

air =c(0.82,0.86,1.86,1.64,12.57,1.56,1.28,1.08,4.29,1.37,14.68,3.64,3.89,0.58,9.50,0.93,0.49,31.04,1.66)

so2 =c(0.72,1.05,1.40,2.30,13.49,0.62,2.41,2.32,8.19,6.33,19.88,8.87,9.25,6.59,2.17,9.93,13.44,16.25,19.89)

airways = data.frame(subject,air,so2)

airways

# part a, get the correlation

cor(air,so2)

# part b, make a model and get the summary

fit = lm(air ~ so2, data=airways)

summary(fit)

## part c, to see a scatterplot...

plot(air ~ so2, data=airways)

Answer & Explanation Solved by verified expert
4.1 Ratings (469 Votes)
After running the given R code we get the following outputThis is the data framethis is the correlation between air so2From this correlation we need to test the null hypothesis thatair flow change under these two conditions is uncorrelated by usingttableDegrees of freedom df n 2 19 2 17Null hypothesis There is no correlation between air andso2Alternative hypothesis    See Answer
Get Answers to Unlimited Questions

Join us to gain access to millions of questions and expert answers. Enjoy exclusive benefits tailored just for you!

Membership Benefits:
  • Unlimited Question Access with detailed Answers
  • Zin AI - 3 Million Words
  • 10 Dall-E 3 Images
  • 20 Plot Generations
  • Conversation with Dialogue Memory
  • No Ads, Ever!
  • Access to Our Best AI Platform: Flex AI - Your personal assistant for all your inquiries!
Become a Member

Other questions asked by students