

Study with the several resources on Docsity
Earn points by helping other students or get them with a premium plan
Prepare for your exams
Study with the several resources on Docsity
Earn points to download
Earn points by helping other students or get them with a premium plan
Community
Ask the community for help and clear up your study doubts
Discover the best universities in your country according to Docsity users
Free resources
Download our free guides on studying techniques, anxiety management strategies, and thesis advice from Docsity tutors
Material Type: Assignment; Class: Introductory Applied Statistics for the Life Sciences; Subject: STATISTICS; University: University of Wisconsin - Madison; Term: Spring 2006;
Typology: Assignments
1 / 2
This page cannot be seen from the preview
Don't miss anything!
Stat 371-003, Solutions to Homework #
(a) Our test statistic is t = (¯y 1 − y¯ 2 )/ SEˆ(¯y 1 − ¯y 2 ) ≈ (31. 72 − 29 .22)/ 5. 06 ≈ 0.494. For a test at significance level α = 0. 10 , we need the 95th percentile of a t distribution with 7.7 degrees of freedom. From the table at the back of the book, we get 1.86. In R, we get qt(0.95, 7.7) ≈ 1.87. Since 0.494 < 1.87, we fail to reject the null hypothesis. Note that we could calculate the P-value in R as 2*(1-pt(0.494, 7.7)) ≈ 0.64. (Using the table, we would just see that the P-value is > 0.4.) (b) The result should not be surprising. Such data could reasonably ascribed to chance variation. If the underlying averages were the same, we would get data like this most of the time.
(a) True (we reject H 0 ), since the P-value = 0.07 < α = 0. 10. (b) True (we fail to reject H 0 ), since the P-value = 0.07 > α = 0. 05. (c) False! The P-value is the chance of getting data this extreme (or more so), if μ 1 = μ 2. First, it doesn’t concern a statement about ¯y 1 and y¯ 2. Second, it concerns the chance of data given μ 1 = μ 2 , not the other way around.
Our test statistic is t = (¯y 1 − ¯y 2 )/ SEˆ(¯y 1 − y¯ 2 ) ≈ (6. 169 − 5 .291)/ 0. 318 ≈ 2.758.
(a) For the two-sided test at α = 0. 05 , we need the 97.5 percentile of a t distribution with 14 degrees of freedom. From the table, we find this is 2.145. (In R, we would use qt(0.975, 14).) Since 2.76 > 2.145, we would reject H 0. From the table, we see that our P-value is between 0.02 and 0.01. In R, we could calculate the p-value via 2*( 1-pt(2.758, 14) ) ≈ 1.5%. (b) For the one-sided test at α = 0. 05 , we need the 95th percentile of a t distribution with 14 degrees of freedom. From the table, we find this is 1.761. (In R, we would use qt(0.95, 14).) Since 2.76 > 1.761, we again reject H 0. The p-value is half of what was calculated in part (a). From the table, we see that our P-value is between 0.01 and 0.005. In R, we could calculate the p-value via 1-pt(2.758, 14) ≈ 0.8%. (c) The two-sided test (against the “nondirectional alternative”) is more appropriate, since we couldn’t anticipate the direction of the possible effect in advance. In appears that the choice of direction was made after looking at the data.
We first load the data: dat <- read.csv("http://www.biostat.wisc.edu/%7Ekbroman/teaching/stat371/data_9-4.csv") We pull out the responses under treatment and control and assign them to x and y, respec- tively. x <- dat$treated y <- dat$control
(a) To get a 95% confidence interval for the true mean difference, we use t.test() with the differences, x - y. t.text(x - y) The 95% confidence interval is (–0.50, 0.74). (b) To get the incorrect 95% confidence interval for the true mean difference, ignoring the paired nature of the data, we type: t.text(x, y) This gives a 95% confidence interval of (–0.83, 1.06). Note that this interval is wider than that calculated in part (a).