2) Now read the following data into R. Use R for all statistical procedures. Sample Sample A B 0.7969 1.4731 1.2669 3.2137 1.5856 2.2486 0.4959 1.1156 0.5022 10.6207 0.5524 1.9835 10.3060 31.2243 0.6244 3.7984 1.9789 1.4710 1.6788 9.0351 (a) Make q-q plots of both samples. (b) Perform a t-test (unequal variances). (c) Perform a MWU test. (d) Which test gave you the better p-value now? Why? (e) What is a “better” p-value? Why? 3) You measure the length of 5 radish seedlings at 7 days and 10 days and get the following results in mm (do NOT use R except for part (d)): seedling #: 1 2 3 4 5 ¯y s 5 days: 30 20 38 49 32 33.8 10.686 7 days: 35 27 46 58 34 40 12.145 difference: -5 -7 -8 -9 -2 -6.2 2.775 (a) Is there a difference in length? (b) Repeat (a), but now use a regular (unpaired) t-test. (c) What happened in (b)? (d) Verify the normal distribution assumption for the paired t-test you did in (a). (You may use R for this part). 4) Here are data on the lengths of male and female roaches (in mm). Your job is to find out if there is a difference between male and female roaches. males 15.4 13.9 12.7 9.6 6.6 10.7 9.9 13.3 16.2 9.0 11.4 16.6 12.2 females 16.7 16.3 12.8 16.9 15.1 12.8 18.7 18.3 8.6 13.6 15.3 16.2 13.4 It's up to you to figure out what the best procedure is, what kind of hypotheses to use, which α to use, what test to use, and so on. Make sure you follow all the steps. You should probably use R as you’ll get done much quicker. Remember to very clearly state your results in writing. Never turn in just an R printout. Hint: how do you decide which test to use? What kind of distributions do the data have? 5) You want to determine the effect of soap on bacterial colonies. In order to make sure that the environment does not affect your experiment, you divide 12 different petri dishes in half - one side is exposed to soap, the other is a control. You measure the number of colonies that grow in each petri dish and come up with the following results: petri dish 1 2 3 4 5 6 7 8 9 10 11 12 soap 11 5 4 10 14 7 13 12 17 8 11 9 control 20 17 11 17 26 18 21 25 24 17 17 17 Perform a complete hypothesis test to see if there is a difference in bacterial colonies between the soap and control dishes.
2)
the R code is below for the problem
samples=c(0.7969, 1.4731, 1.2669, 3.2137 ,1.5856 ,2.2486, 0.4959
,1.1156, 0.5022
,10.6207, 0.5524 ,1.9835, 10.3060 ,31.2243, 0.6244 ,3.7984 ,1.9789
,
1.4710 ,1.6788, 9.0351)
length(samples)
A=samples[seq(1,20,2)]
B=samples[seq(2,20,2)]
#part a
qqplot(A,rnorm(10),main="qqplot of A")
qqline(A)
qqplot(B,rnorm(10),main="qqplot of B")
qqline(B)
#part b and c
t.test(A,B,var.equal=F) #p-value=0.1598
wilcox.test(A,B) #p-value=0.01469
#part d
here we much high p-value in case of t-test compared to wilcox
test.
this is because we have used non-parametric method for
wilcox.
the wilcox is more appropriate since the data is not normal
isfollowed from qqplot.
Get Answers For Free
Most questions answered within 1 hours.