4) We're going to test the same hypothesis four ways. Assume the people in the dataset...

50.1K

Verified Solution

Question

Statistics

4) We're going to test the same hypothesis four ways. Assume thepeople in the dataset in armspanSpring2020.csv are a random sampleof all adults. For each test, report the test statistic and thep-value. With a 5% significance level, give the conclusion of eachtest.
a) Test the hypothesis that the mean difference between armspan andheight it not equal to 0, using the data in armspanSpring2020.csv.Do this by creating a new variable named diff = (armspan - height).Perform a one-sample t-test.
b) Test the same hypothesis, but use a two-sample t-test withpaired =TRUE.
c) Test the same hypothesis, but use a two-sample t-test withpaired=FALSE and var.equal=FALSE.
d) Test the same hypothesis, but use a two-sample t-test withpaired=FALSE and var.equal=TRUE.
e) Which test(s) do you think are valid for this situation andwhy?  
hint: We almost never use the var.equal=TRUE test. Why? Because itis only valid if the population standard deviations of bothpopulations are equal. You might be in a situation where you knowthis to be true. If so, fine, use it. But usually we don't, inwhich case (a) the var.equal=FALSE test will provide more accuratep-values if the standard deviations are not equal and (b) willprovide pretty accurate p-value if they are. So you can't lose,really, with the var.equal=FALSE test, but you can lose with it theother way.

g)Data cleaning. Identify by row number which observations seemin need of cleaning and why you think so. Provide a table. (Hint:consider the \"which()\" and \"identify()\" functions.) Provide a graphto justify your identifications.

heightarmspanis.female
67NA1
70400
64671
71700
72490
62611
72740
71680
63601
69690
67681
63631
60601
66660
61611
69680
65651
72720
70700
73770
65611
68721
6255NA
71740
72700
66221
65671
64620
65621
73690
67770
60621
70590
68661
65651
72690
62521
69660
68670
65661
65640
66651
62521
64621
66651
69690
64651
70740
65690
70800
63NA1
67701
64641
64621
65.70
67671
72710
73750
68680
67631
66671
67360
68720
73700
70700
70720
60580
70680
62630
68681
6767NA
68710
65481
70760
69700
69660
5855NA
64640

Please help with the r codes. It is my first time doing r studioand I'm having a hard time. Thanks!

Answer & Explanation Solved by verified expert
4.5 Ratings (799 Votes)
We are given a set of data of height and armspanThe size of data is greater than 30So t distribution converges to normal or z distributionaLet us definediff armspan heightWe have to test one sample t testTherefore to testagainst test statistics is given bywhere is    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