Laboratory 5.pdf - Laboratory 5 Let’s use this datatset...

This preview shows page 1 - 3 out of 5 pages.

Laboratory 5 Let’s use this datatset to learn about conducting a one -sample t test. Consider the following claim: The city of Olympia, WA receives the same amount of rain per year as the average of the 70 cities represented in the precip dataset. (1a) The city of Olympia, WA averages 49.9 inches of rain per year. Find the mean amount of rain per year from the 70 cities represented in the precip dataset. Construct null and alternative hypotheses given the claim, and state whether this is a right, left, or two-tailed test. (3 points) mean amount of rain in 70 cities = 38.9 inches H : average amount of rain in Olympia = average amount of rain of 70 cities H a : average amount of rain in Olympia average amount of rain of 70 cities Two-tailed test (1b) Use R to also calculate the variance and standard deviation of the amount of rain per year in the 70 cities represented in the precip dataset. List your estimates of the variance and standard deviation below. (4 points) variance = 187.9 standard deviation = 13.7 (1c) You have previously conducted a t test by hand. Now, let’s use R to do this for us. R has a built-up function, called t.test() that we can use. To use a one-sample t test, we have to specify a few conditions in the t.test() function: t.test(precip, mu=49.9, alternative=c("X1")) where precip is the dataset you are using, mu is the mean of Olympia, WA that we are testing against the mean of the 70 cities in the precip dataset, and "X1" is the type of test you are using. X1 can be one of the following: "less" "greater"
Image of page 1

Subscribe to view the full document.

"two.sided" depending on if you are conducting a left-tailed test (i.e., less), right-tailed test (i.e., greater),
Image of page 2
Image of page 3
You've reached the end of this preview.

{[ snackBarMessage ]}

What students are saying

  • Left Quote Icon

    As a current student on this bumpy collegiate pathway, I stumbled upon Course Hero, where I can find study resources for nearly all my courses, get online help from tutors 24/7, and even share my old projects, papers, and lecture notes with other students.

    Student Picture

    Kiran Temple University Fox School of Business ‘17, Course Hero Intern

  • Left Quote Icon

    I cannot even describe how much Course Hero helped me this summer. It’s truly become something I can always rely on and help me. In the end, I was not only able to survive summer classes, but I was able to thrive thanks to Course Hero.

    Student Picture

    Dana University of Pennsylvania ‘17, Course Hero Intern

  • Left Quote Icon

    The ability to access any university’s resources through Course Hero proved invaluable in my case. I was behind on Tulane coursework and actually used UCLA’s materials to help me move forward and get everything together on time.

    Student Picture

    Jill Tulane University ‘16, Course Hero Intern