Answered step by step
Verified Expert Solution
Link Copied!

Question

00
1 Approved Answer

Name: R17: Hypothesis Test on a Single Mean Do not round at all. . We'll use another data set already stored in R, called 'Loblolly'.

image text in transcribedimage text in transcribed
image text in transcribedimage text in transcribed
Name: R17: Hypothesis Test on a Single Mean Do not round at all. . We'll use another data set already stored in R, called 'Loblolly'. We will consider this data set to be an SRS, and perform an hypothesis test on the heights of trees using this sample. Suppose that historically, the mean height of Loblolly pine trees in a certain forest has been known to be 37 feet. But a current forest expert claims that the average height of these trees has decreased, and is actually smaller than 37. Set up the two expressions, and also the two hypotheses: Get the mean, standard deviation and number of rows in the sample, storing them in R using the variable names below, and also recording the values of each below: xbar s 11 Looking at the point estimate above, the trees in the sample clearly have a mean smaller than 37. But the standard deviation is pretty large, so with such variation, it may be that we just got a sample of unusually small trees. The hypothesis test will help us decide. Using your formula sheet, nd and simplify the test statistic (you can use a calculator, or use R as a calculator). Using R, nd the p-value associated with this test statistic. Test the claim with a = .05 using the p-value method. Do you reject the null or fail to reject it? What does this mean about tree height? Test the claim with a = .01 using the p-value method. Do you reject the null or fail to reject it? What does this mean about tree height? Using R, nd the critical value associated with a = .05. Then use the critical method to test the claim, drawing a picture below, and shading the critical region. Do you reject the null or fail to reject it? Does this agree with the p-value method? 8. Using R, find the critical value associated with a = .01. Then use the critical method to test the claim, drawing a picture below, and shading the critical region. Do you reject the null or fail to reject it? Does this agree with the p-value method? 9. There is a shortcut for doing an hypothesis test on a mean in R. Try the following command (notice we specify the variable, then the null hypothesis, then indicate what alternate hypothesis is): t.test(Loblolly$height, mu=37, alternative="less") Look at the first line that contains numbers in the response that R gives you. Those three numbers are the test statistic, the degrees of freedom, and the p-value. What test statistic and p=value did R give you? Do they agree with what you computed before? 10. The command above performed a left-tailed test. Now let's try a right-tailed test. Suppose the mean age of the entire population of Loblolly trees had historically been 10 years, but now someone claims the trees are living longer. To test that hypothesis use the following command t.test(Loblolly$age, mu=10, alternative="greater") What is your test statistic and p-value? Would you reject the null for o = .005? What does this mean about the age of current trees? 11. Finally, let's try a two-tailed test. Suppose the mean age of the entire population of Loblolly trees had historically been 12 years, but is now someone claims that is no longer true. To test that hypothesis use the following command: .test(Loblolly$age, mu=12, alternative="two.sided") What is your test statistic and p-value? Would you reject the null for a = .01? What does this mean about the age of current trees? 12. The response R gives to the t.test command includes more than the test statistic, degrees of freedom and p-value. Below that, R also gives a 95% confidence on the variable in the hypothesis test. If you'd like to get a different confidence level, you can use an additional argument in the command. For instance, find the 99% confidence level on the mean height of the trees, with the following command, and record your confidence interval below: t.test(Loblolly$height, mu=34, alternative="two.sided", conf.level=.99) Notice that if you instead type t.test(Loblolly$height, mu=20, alternative="two.sided", conf.level=.99), you'll get the same confidence interval (since the confidence interval does not depend on the null hypothesis, only on the sample, and the fact that we want a 2-sided confidence interval)

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access with AI-Powered Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Introduction To Health Care Management

Authors: Sharon B. Buchbinder, Nancy H. Shanks

3rd Edition

128408101X, 9781284081015

Students also viewed these Mathematics questions