Stat 3011 Midterm 2 (Computer Part)
Rweb:> 1 - pt(2.0, 5) [1] 0.05096974
Rweb:> 1 - pt(10.0, 5) [1] 8.547379e-05The computer's answer means or 0.00008547379.
Rweb:> 2 * (1 - pt(2.0, 5)) [1] 0.1019395
Rweb:> qt(1 - 0.15, 5) [1] 1.155767This could also be looked up in the table of t critical values (Appendix A6 in Wild and Seber) in the column headed .15 under 5 df.
Rweb:> qt(1 - 0.15 / 2, 5) [1] 1.699363This cannot be looked up in Appendix A6 in Wild and Seber, because there is no column headed .075.
You want either a dot plot or a stem and leaf plot. They show pretty much the same thing. A histogram is fairly useless with only 15 data points. The stem and leaf plot is
Rweb:> stem(height) The decimal point is 1 digit(s) to the right of the | 15 | 3479 16 | 044567 17 | 46 18 | 299
Rweb:> t.test(height) One Sample t-test data: height t = 56.6738, df = 14, p-value = < 2.2e-16 alternative hypothesis: true mean is not equal to 0 95 percent confidence interval: 161.6101 174.3233 sample estimates: mean of x 167.9667The confidence interval (161.6101, 174.3233) calculated by R, should according to the rules in Section 7.4.3 in Wild and Seber be rounded to one more significant figure than the width of the interval. That's the units place here, giving (162, 174) for the rounded interval.
Maybe. It's hard to tell with only 15 data points. We need the population to be normal for the t distribution to be correct. The stem and leaf plot doesn't look exactly normal, but then no sample would (the sample is not the population). The population might be a bit skewed, but doesn't appear to be highly skewed. The confidence interval is probably o. k.
Rweb:> t.test(height, conf.level=0.99) One Sample t-test data: height t = 56.6738, df = 14, p-value = < 2.2e-16 alternative hypothesis: true mean is not equal to 0 99 percent confidence interval: 159.1441 176.7893 sample estimates: mean of x 167.9667As in part (b), the confidence interval (159.1441, 176.7893) calculated by R should be rounded to (159, 177).
Rweb:> prop.test(c(213,194), c(250,250)) 2-sample test for equality of proportions with continuity correction data: c(213, 194) out of c(250, 250) X-squared = 4.2799, df = 1, p-value = 0.03856 alternative hypothesis: two.sided 95 percent confidence interval: 0.004113909 0.147886091 sample estimates: prop 1 prop 2 0.852 0.776The confidence interval (0.004113909, 0.147886091) calculated by R, should according to the rules in Section 7.4.3 in Wild and Seber be rounded to one more significant figure than the width of the interval. That's the second decimal place here, giving (0.00, 0.15) for the rounded interval. However, since people often make a big deal out of whether the confidence interval includes zero or not, in this case it is probably better not to round quite so much and leave it as (0.004, 0.148).