STAB22 Week 10 problems: solutions 7.2 Easiest is to type these numbers into Minitab and let it do its thing. Select Stat, Basic Statistics, 1-sample t. Select your column of numbers and let it do a 95% interval: T Confidence Intervals Variable N Mean StDev SE Mean 95.0 % CI C1 10 531.0 82.8 26.2 ( 471.8, 590.2) If you prefer, you can use Minitab (or some other means like your calculator if you know how to do it) to find the sample mean, x = 531.0, and the sample SD, s = 82.8, and go the rest of the way by hand. With n = 10, there are 9 degrees of freedom (df), and the number from the table is 2.262, giving an interval of 531.0 ± 2.262 82.8/ 10, which is 531.0 ± 59.2, or from 471.8 to 590.2 as above. Either way, we have a small sample from a very variable population, so we shouldn t expect to learn very much from the confidence interval, as indeed we don t it is nearly $120 wide. 7.4 The only way we know how to do this (unless you have read the textbook) is to use Minitab for the whole thing. The alternative hypothesis is the thing we want good reason for believing : that is, that the population mean is greater than 500. The null hypothesis says that the population mean is equal to 500 (less than or equal to, if you prefer). Enter the data into Minitab (or re-use the data you just entered for problem 7.2), select Stat, Basic Statistics and 1-sample t again. Select your column of data if it isn t selected already, click Test Mean and fill 1
in 500, change the alternative hypothesis to Greater Than, and click OK. I got this: T-Test of the Mean Test of mu = 500.0 vs mu > 500.0 Variable N Mean StDev SE Mean T P C1 10 531.0 82.8 26.2 1.18 0.13 The P-value is 0.13. Compared to α = 0.05, say (pick any α you like), this is not small, so we do not have enough evidence to reject the null hypothesis. There is no good reason to believe that the mean rent is greater than $500 per month. (As with the confidence interval above, the data probably don t contain much information, and with this small a sample size we might not even be able to reject a null hypothesis that s a fair way wrong. Here, the sample mean was over $30 higher than $500, but that wasn t high enough to be good evidence.) 7.20 Enter the data into a column in Minitab, and select Graph and Probability Plot to get the normal quantile plot, as we did it earlier. The data don t look very normal-like. The comments in the question suggest that the t confidence interval will nonetheless be reasonably accurate. Select Stat, Basic Statistics and 1-sample t, and let it give you a 95% interval: T Confidence Intervals Variable N Mean StDev SE Mean 95.0 % CI C1 50 20.90 7.65 1.08 ( 18.73, 23.07) We are 95% confident that the mean cost of Internet access (as of August 2000, at least) is between $18.73 and $23.07. 7.60 We are trying to find evidence that bread loses vitamin C, so the alternative hypothesis states that the mean vitamin C content is greater 2
immediately after baking than it is after 3 days. The null hypothesis says that there is no change over time. For Minitab, enter the two immediate values in one column and the two 3 days values into another. Select Stat, Basic Statistics, 2-sample t. Select Samples in different columns, and select the two columns. Change alternative to greater than. If you re really sneaky, you can do part (b) at the same time by changing confidence level to 90. Two Sample T-Test and Confidence Interval Two sample T for immed vs 3days N Mean StDev SE Mean immed 2 48.70 1.53 1.1 3days 2 21.795 0.771 0.54 90% CI for mu immed - mu 3days: ( 19.2, 34.58) T-Test mu immed = mu 3days (vs >): T = 22.16 P = 0.014 DF = 1 The P-value is 0.014. If you chose α = 0.05, this is small enough to reject the null hypothesis and conclude that vitamin C is lost. Having rejected the null hypothesis, we might wish to know how much vitamin C is lost on average. This is given by the 90% confidence interval, which goes from 19.2 to 34.6 mg per 100 grams. This doesn t pin the vitamin C loss down very precisely, but with only a total of 4 observations, it s pretty unreasonable to expect better. 7.61 The analysis of the previous question assumed 4 loaves altogether, randomly divided into the two groups. But if the same two loaves are measured twice, that scenario no longer applies: we have a matched pairs design. The right analysis requires us to use the differences between the two measurements within each pair. (It s not only a question of what the data are, but also of where they came from.) For this analysis in Minitab, select Stat, Basic Statistics and Paired t. Select the two columns. Click Options, select the Confidence Level (90), and the alternative (Greater Than). Click OK a couple of times. I got this: 3
Paired T-Test and Confidence Interval Paired T for immed - 3days N Mean StDev SE Mean immed 2 48.71 1.53 1.09 3days 2 21.80 0.77 0.54 Difference 2 26.910 0.764 0.540 90% CI for mean difference: (23.501, 30.319) T-Test of mean difference = 0 (vs > 0): T-Value = 49.83 P-Value = 0.006 The P-value for this test is 0.006 (smaller than before), and we would reject the null hypothesis of no vitamin loss at any reasonable α value. There definitely is a loss of vitamin C. The 90% confidence interval goes from 23.5 to 30.3 mg per 100g. Both the test and confidence interval give stronger results than before, because we are taking advantage of the pairing. Notice that the first loaf had less vitamin C at both times, but the drop in vitamin C is very nearly the same for both loaves. 7.69 Type the data into two columns, one for low fitness and one for high fitness. We re looking for any difference, so the alternative hypothesis says that the mean scores for the low-fitness and high-fitness groups are different, while the null hypothesis says that they re the same. In Minitab, select Stat, Basic Statistics and 2-sample t. Select Samples in different columns, and select your two columns of data. The alternative hypothesis should read not equal, and the confidence level can stay at 95. I got this: Two sample T for low vs high N Mean StDev SE Mean low 14 4.640 0.690 0.18 high 14 6.429 0.430 0.12 95% CI for mu low - mu high: ( -2.24, -1.34) T-Test mu low = mu high (vs not =): T = -8.23 P = 0.0000 DF = 21 4
The P-value is very small indeed; there is no doubt that the null hypothesis should be rejected. There is strong evidence that mean ego strength scores are higher for high-fitness college professors than for low-fitness ones. However, college professors are probably not typical of all middle-aged men. They will have certain character traits not possessed by, for example, businessmen. In particular, you might expect ego strength to be smaller for college professors generally than for entrepreneurs, and we don t know how the fitness level will relate to ego strength for entrepreneurs. 7.99 Ignore the word pooled in this question and the next one. (We didn t actually do the so-called pooled version of 2-sample t). Fire up Minitab, and select Power and Sample Size, then 2-sample t. You can use either of the first two alternatives; fill in 80 for the sample size (this is 80 per group), 300 for the difference you hope to detect, and 650 for sigma. If you go back to Exercise 7.70, you ll see that the test has to be one-sided ( does cocaine use cause low birth weight? ), so click Options, click on Greater Than (since our hoped-for difference is positive), and check that alpha is set to 0.05. I got this: 2-Sample t Test Testing mean 1 = mean 2 (versus >) Calculating power for mean 1 = mean 2 + 300 Alpha = 0.05 Sigma = 650 Sample Size Power 80 0.8965 The power is 0.8965. In nearly 90% of all possible samples, we will correctly reject the null hypothesis of equal means in favour of the alternative that the mean birth weight is less among cocaine users. (The answers give 0.8267 for the power, which appears to come from a two-sided test. I don t see how you justify that.) 5
7.102 There are a couple of ways to tackle this question: exactly as it is posed, or by directly finding the sample size needed to get 80% power. To start with the latter: in Minitab, select Power and Sample Size, 2-sample t. Click calculate sample size, and fill in 0.80 for the power, 0.5 for the difference and 0.7 for sigma. Click Options, and make sure the alternative hypothesis says not equal and alpha is 0.05. I got these results: 2-Sample t Test Testing mean 1 = mean 2 (versus not =) Calculating power for mean 1 = mean 2 + 0.5 Alpha = 0.05 Sigma = 0.7 Sample Target Actual Size Power Power 32 0.8000 0.8031 So 32 players are needed in each group. To answer the question as asked: go back to Power and Sample Size, Two-sample t, and click on power for each sample size. Choose some sample sizes (such as 10, 20, 30, 40, 50), and fill in the difference we want to detect (0.5). Enter sigma at the bottom (0.7), and click Options to check that the alternative is not equal and α = 0.05. Also, you can save the sample sizes and power values in columns, which will make it easier to plot them (say c1 and c2). (If you don t do this, you can always type in the values that appear in the output.) To plot the power, go to Graph and Plot; select the power values for y and the sample sizes for x. To make the graph easier to read, you can connect the points on the graph by lines; to do this, look in the Data Display box and click on the arrow next to Display. Select connect here. The word symbol below it changes to connect. My graph is shown below: 6
The power goes up, but at a progressively slower rate as the sample size increases. (The gain in power between n = 40 and n = 50 is less than between n = 10 and n = 20, say.) The power appears to hit 80% for a sample size just over 30, which agrees with Minitab s direct calculation above. 7