Go into R and view all of the data sets preloaded in R by using the...

50.1K

Verified Solution

Question

Statistics

Go into R and view all of the data sets preloaded in R by usingthe data() command. As you see there are quite a few data setsloaded into R. Now retrieve the dataset women using data(women).This data is from a random sample of 15 women, recording the heightand weight of each woman in the sample. I want you to create a 95%confidence interval for the population mean using this data andR.

First find the sample mean using the mean() command and samplestandard deviation using the sd() command. Now find t* using theqt() function. Look up help for this function to learn how to useit. Remember that for a 95% CI value, t* you want to find the valuet for which P(T14 < t∗) = .975. Construct the margin of errorusing the R math functions. Now find the upper and lower ends ofthe confidence interval.

Now go to R help and look up the t.test function. Use the t.testto conduct the hypothesis testH0 : μ = 62.5 with Ha : μ ̸= 62.5.For this application, use women$height in place of x, mu=62.5 forthe second argument, and alternative=“two.sided” for the third.Interpret the p-value in terms of your typical test sizes.

Does the null hypothesis value H0 : μ = 62.5 fall in thecondfidence interval you constructed earlier? Now pick any valuethat falls inside the confidence interval you constructed. Conductthe t-test on that as the null value and report the p-value. Tryother null values that fall inside your CI and conduct the t-teston these. What is the relationship between a 95% CI and a two-sidedhypothesis test withα = .05?

Answer & Explanation Solved by verified expert
4.1 Ratings (654 Votes)
R codes and output datawomen women height weight 1 58 115 2 59 117 3 60 120 4 61 123 5 62 126 6 63 129 7 64 132 8 65 135 9 66 139 10 67 142 11 68 146 12 69 150 13 70 154 14 71 159 15 72 164 attachwomen The following objects are masked from women pos 3 height weight mmeanheightm 1 65    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