STA 6166 UNIT 2 Section 1 Answers
 Welcome < Begin < Section 1 < Unit 2 Section 1 Answers > Section 2

# Unit 2 Section 1 Answers

You can choose to work some or all of the problems listed below. We recommend that you at least work the problems listed in your major area of interest.

 General Questions. How should you interpret the statement "the 95% confidence interval for the mean is (8.9, 12.7)"?The wrong interpretation is to assume that you have a 1 in 20 chance that the true mean is in the interval. The correct interpretation is that with confidence coefficient of 0.95, in repeated samples from the same populations, intervals constructed as this was will encompase the true mean in 95 samples out of 100. That is that we have a 1 in 20 chance that our confidence interval actually includes the true population mean. As the level of confidence (a/2) goes up, does the sample size go up or down? If we hold the desired precision (E) and population standard deviation (s) constant, as the level of confidence increases, the critical value z1-a/2 gets larger and hence the sample size must get larger as well (see page 205 in text). As the underlying level of variance goes up, does the sample size go up or down? If we hold the desired precision (E) and the level of confidence (a/2) fixed, as the level of variance goes up, the sample size goes up (see page 205 in text). What are the five steps of a statistical test? (commit this to memory!) State the research hypothesis Ha. State the null hypothesis Ho. Define the test statistic - compute its value from the available data. Define the rejection region - compute the specific cut-off point(s). Make a decision to either reject Ho or not to reject Ho. Define what is meant by a Type I error. (Commit this to memory also!) In hypothesis testing, to commit a Type I error is to reject the null hypothesis when in truth the null hypothesis is true. Define what is meant by a Type II error. In hypothesis testing, to commit a Type II error is to not reject the null hypothesis when in fact the null hypothesis is false. (That is, to select the null hypothesis when in fact you should select the alternative hypothesis). Define what is meant by the Power of a test. The power of a test is the probability of correctly rejecting the null hypothesis when in fact the null hypothesis is false - this is equivalent to 1 minus the probability of a Type II error. With a two-tailed test, is the rejection region composed of one region or two? A two-tailed test is descriptive of a statistical test in which the rejection region is defined by both the left and right tail areas of the sampling distribution of the test statistic under the null hypothesis. A two-tailed test has an alternative hypothesis which is the negative of the null hypothesis. What does an OC curve tell us? The OC curve is defined on page 214. It is a plot of the probability of a Type II error versus specific alternative hypotheses values (in particualar m0-m1 differences). It shows us how fast the probability of a Type II error decreases as a function of increasing m0-m1 for the given sample size. We can look at the OC curve and see immediately whether the test with the given sample size provides us a small enough chance of making a Type II error. It provides similar information as that of a Power Curve. What is a p-value? (see section 5.6). Once we have computed the test statistic and determined its sampling distribution under the null hypothesis, it is a simple matter to compute the probability of a value of the test statistic that is greater than the specific value we obtained. For example, suppose our test statistic is the sample mean. We transform our specific value of the sample mean to a standardized normal (z) score. From a standard normal table we can then determine the associated p-value which is P(Z>z) for the right-tail alternative hypothesis, P(Z|z|) for the two-tailed alternative. Note that most statistical packages will print out the associated p-value, but only for the two-tailed alternative hypothesis. What is the differences between the z-test and the t-test? The z-test relies on prior knowledge of the population standard deviation, s. The t-test acknowledges that we do not know the true value of the population standard deviation but must estimate it using the sample standard deviation, s. To perform the t-test requires that we specify a degrees of freedom parameter for the t-critical value that defines the rejection region. The shape of the t-distribution is indexed by one parameter. What is this parameter referred to as? The parameter that specifies the shape of the t-distribution is called the degrees of freedom. For hypothesis testing, this is typically it is defined as the number of independent components that combine to estimate the sample variance, usually this is n-1. Using the table of percentage points for the Student's t distribution given on page 1093, compute the following. ( n is the degrees of freedom). Note that the n I am giving you is the actual value of the degrees of freedom, not the sample size. The value of t where P(T>t | n=26)=.05 (i.e. the 5% critical value for a t-distribution with 26 degrees of freedom.) 1.706 (note that the 5% critical value specifies that there is 0.05 probability in the upper tail of the distribution. In some books this may be specified as t26,.95and in other books as t26,.05 P(T>3.169 | n=10) = ? 0.005 (find the n=10 row and move across until you find 3.169. Note that if I had asked for T>4.0, you would have to interpolate between the two values you can get from the table. For students in agriculture and environmental fields. A oil company advertises that its new brand of tractor fuel significantly decreases fuel consumption in heavy use. You have been charged with determining whether the company's claim is valid. Your records indicated that the average fuel consumption for a standard configuration of tractor/plow is 10 liters per hour under a common standard plowing protocol (i.e. specified speed, depth of plow and soil conditions). You wish to determine if, using the new fuel, average fuel use is less than 10 l/hr. You decide to test this hypothesis by using a standard tractor/plow configuration and repeated measurements over similar field conditions. Initially you will do 15 of these replications, three per day for five days. At the end of the week, you will be testing a null hypothesis that the average fuel consumption is 10 l/h against an alternative that consumption is less than 10 l/h. Assuming the true standard deviation in consumption is roughly (s=) 1.5 l/h, and the test is being done at a Type I error rate of (a=) 0.05, what would the statistical power be for significant differences of +.5, +1.0 and +1.5 l/h (D) less than the expected 10 l/h. We begin by putting down all that we know using the shorthand notation of the book. H0: m=10l/h HA: m<10l/h Test Statistics: Average fuel consumption based on 15 replications, We will convert the average consumption to a z-score using the prior knowledge that the true population standard deviation is s=1.5l/h. That is z=(mean-m)/(s/Ö(n)). Since this is a one-tailed (left-tailed alternative) test, the critical value that defines the rejection region is given by z0.05 = -1.645. Power is 1 minus the probability of a Type II error. The probability of a Type II error for a specified alternative is given by the equation on page 216. This equation is a little confusing since it is not clear what you plug in for za, The description on pages 214 and 215 is a little vague as well. It turns out that we always use the right tail value (the positive value, in this case 1.645). It has to do with our taking the absolute value of the differences of the mean in the right hand part of the equation. With this understanding we plug in the value for za=1.645, and D = |m0-ma| = {0.5, 1.0, and 1.5), s=1.5, n=15. Answer b(0.5)=P(Z<1.645-1.291) = 0.6787 -> Power = 0.3216 Answer b(1.0)=P(Z<1.645-2.58) = 0.1749 -> Power = 0.8251 Answer b(1.5)=P(Z<1.645-3.873) = 0.0129 -> Power = 0.9871 From this we conclude that at this level of replication and with this statistical test, we have greater than a 90.1% chance of rejecting the null hypothesis that average fuel consumption is 10l/h when it is actually 9.5l/h on average. We are almost certain to show as significant a reduction in fuel consumption of 1l/h or more. You decide to run the experiment with 15 replications, with the results produced in the following table. With these data, test the null hypothesis that fuel consumption is 10 l/d against the alternative that the average is less than 10 l/d. (Note: The data table below can be directly cut and pasted into a spreadsheet or stat package - i.e. no html codes are imbedded.) ``` Replication Consumption 1 8.99 2 9.16 3 10.20 4 9.82 5 11.54 6 9.48 7 10.65 8 9.71 9 11.43 10 9.97 11 9.11 12 8.24 13 8.44 14 8.50 15 11.34``` A SAS program that reads in these data and outputs basic statistics is given here (SAS PROGRAM and OUTPUT). All we really need from this output is the sample mean, so running the program is overkill here. The test statistic is computed as: The rejection region is Z |t| <.0001 Sign M 7.5 Pr >= |M| <.0001 Signed Rank S 60 Pr >= |S| <.0001 ``` To have SAS automatically test for a specific central tendency value (mean or median), create a new variable which is the old variable minus the null hypothesis mean and rerun the Univariate procedure. The test results below suggest that both the t-test and the Sign test would not reject the null hypothesis. ``` Tests for Location: Mu0=0 Test -Statistic- -----p Value------ Student's t t -0.81139 Pr > |t| 0.4307 Sign M -2.5 Pr >= |M| 0.3018 Signed Rank S -17 Pr >= |S| 0.3591 ``` For students in engineering fields. A copper mine manager is interested in installing new equipment that is expected to increase production. In the current process, average daily production varies by plus or minus 50 tons per day with an average of about 50 tons per day. The manager can perform a trial run with the new equipment for (n=) 15 days. At the end he will be testing a null hypothesis that the average is 50 t/d against an alternative that production is greater than 50 t/d. Assuming the true standard deviation of the process is roughly (s=) 100/4=25 t/d, and the test were being done at a Type I error rate of (a=) 0.05, what would the power be for significant differences of +10, +20 and +40 t/d (D) greater than the expected 50 t/d. We begin by putting down all that we know using the shorthand notation of the book. H0: m=50 t/d HA: m>50 t/d Test Statistics: Average fuel consumption based on 15 replications, We will convert the average production to a z-score using the prior knowledge that the true population standard deviation is s=25 t/d. That is z=(mean-m)/(s/Ö(n)). Since this is a one-tailed (right-tailed alternative) test, the critical value that defines the rejection region is given by z0.95 = 1.645. Power is 1 minus the probability of a Type II error. The probability of a Type II error for a specified alternative is given by the equation on page 216. This equation is a little confusing since it is not clear what you plug in for za, The description on pages 214 and 215 is a little vague as well. It turns out that we always use the right tail value (the positive value, in this case 1.645). It has to do with our taking the absolute value of the differences of the mean in the right hand part of the equation. With this understanding we plug in the value for za=1.645, and D = |m0-ma| = {10, 20 and 40 t/d), s=25, n=15. Answer b(10)=P(Z<1.645-1.549) = 0.5359 -> Power = 0.4641 Answer b(20)=P(Z<1.645-3.098) = 0.073 -> Power = 0.927 Answer b(40)=P(Z<1.645-6.197) = 0.000003 -> Power > 0.9999 From this we conclude that at this level of replication and with this statistical test, we only have a 46.4% chance of rejecting the null hypothesis that average production is 50 t/d when it is actually 60 t/d on average. We are almost certain to show as significant an increase in production to 70 t/d or more. So, this test is not very powerful in showing only a 10 t/d increase but would be adequate to show a 20 t/d or more increase. The manager decided to run the experiment over 15-days with the results produced in the following table. With these data, test the null hypothesis that the average production is 50 tons per day against the alternative that the average is greater than 50 tons. (Note: The data table below can be directly cut and pasted into a spreadsheet or stat package - i.e. no html codes are imbedded.) ``` Day Yield 1 57.8 2 58.3 3 50.3 4 38.5 5 47.9 6 157.0 7 38.6 8 140.2 9 39.3 10 138.7 11 49.2 12 139.7 13 48.3 14 59.2 15 49.7 ``` A SAS program that reads in these data and outputs basic statistics is given here (SAS PROGRAM and OUTPUT). All we really need from this output is the sample mean, so running the program is overkill here. The test statistic is computed as: The rejection region is Z |t| <.0001 Sign M 7.5 Pr >= |M| <.0001 Signed Rank S 60 Pr >= |S| <.0001 ``` To test that the true population is centered around 50, we create a new variable by dividing production by 50 and re-run these tests for location.. ``` Tests for Location: Mu0=0 Test -Statistic- -----p Value------ Student's t t 2.119643 Pr > |t| 0.0524 Sign M 0.5 Pr >= |M| 1.0000 Signed Rank S 16.5 Pr >= |S| 0.3666 ``` Now you find that both the Student's T-test and the Sign test produce similar conclusions - do not reject the null hypothesis. For students in toxicology and health science fields. A tobacco company advertises that the average nicotine content of its cigarettes is at most 14 milligrams. You have been charged with determining whether the company's claim is valid. If the average nicotine is greater than 14.75 milligrams the company could be in trouble with government oversight agencies. You decide to test 20 cigarettes selected at random, one per day over 20 days of production. At the analysis step, you will be testing a null hypothesis that the average is 14 mg against an alternative that nicotine content is greater than 14 mg. Assuming the true standard deviation in nicotine content is roughly (s=) .8 mg, and the test were being done at a Type I error rate of (a=) 0.05, what would the power be for significant differences of +.2, +.4 and +.75 mg (D) greater than the expected 14 mg. We begin by putting down all that we know using the shorthand notation of the book. H0: m=14 mg HA: m>14 mg Test Statistics: Average nicotine content based on 20 replications, We will convert the average nicotine content to a z-score using the prior knowledge that the true population standard deviation is s=0.8 mg. That is z=(mean-m)/(s/Ö(n)). Since this is a one-tailed (right-tailed alternative) test, the critical value that defines the rejection region is given by z0.95 = 1.645. Power is 1 minus the probability of a Type II error. The probability of a Type II error for a specified alternative is given by the equation on page 216. This equation is a little confusing since it is not clear what you plug in for za, The description on pages 214 and 215 is a little vague as well. It turns out that we always use the right tail value (the positive value, in this case 1.645). It has to do with our taking the absolute value of the differences of the mean in the right hand part of the equation. With this understanding we plug in the value for za=1.645, and D = |m0-ma| = {.2, .4, and .75 mg), s=0.8, n=20. Answer b(.2)=P(Z<1.645-1.118) = 0.7019 -> Power =0.298 Answer b(.4)=P(Z<1.645-2.236) = 0.2776 -> Power = 0.7224 Answer b(.75)=P(Z<1.645-4.193) = 0.0054 -> Power > 0.9946 From this we conclude that at this level of replication and with this statistical test, we only have a 29.8% chance of rejecting the null hypothesis that average nicotine is 14 mg when it is actually 14.2 mg on average. We have a better chance of showing an increase .4 mg and the statistical test is almost certain to declare a difference of 0.75 mg as significant. . You decide to run the experiment on 25 cigarettes, with the results produced in the following table. With these data, test the null hypothesis that nicotine content is 14 mg against the alternative that the average is greater than 14 mg. (Note: The data table below can be directly cut and pasted into a spreadsheet or stat package - i.e. no html codes are imbedded.) ``` Cigarette Nicotine 1 13.96 2 15.33 3 15.01 4 14.46 5 14.71 6 15.35 7 16.03 8 15.22 9 14.35 10 15.56 11 15.87 12 14.82 13 13.82 14 14.19 15 13.84 16 14.33 17 13.79 18 15.32 19 12.50 20 14.17 21 14.07 22 14.58 23 13.28 24 16.60 25 13.37 ``` A SAS program that reads in these data and outputs basic statistics is given here (SAS PROGRAM and OUTPUT). All we really need from this output is the sample mean, so running the program is overkill here. The test statistic is computed as: The rejection region is Z>z0.95=1.645. Since3.242 is greater than 1.645 we reject the null hypothesis and conclude that the nicotine content is significantly greater than the target value. You are concerned by the number of cigarettes with nicotine levels over 14.5 and think that the true production mean might really be 14.5 mg. You want to do more sampling to get more definitive results. How many more cigarettes would you need to determine that the true population mean was really 14.5 mg (the specific alternative hypothesis) instead of 14 mg (the null hypothesis) if the true standard deviation is (s =) .90 mg. The test is to be performed at a Type I error probability of (a=) 0.05 and we wish 90% power for the test (i.e. Type II error probability of b=0.10). [Hint: page 221] I have given you all the information you need to use the equation on page 221 to figure out the needed sample size. Simply plugging in the values we get. For comparison purposes, redo the test in step 2 using the Sign Test. How do the results compare? The sign test is given on page 246. For this test we only need the number of observations greater than the median stated in the null hypothesis. We will take the target median M0 to be 14 mg. In this case, B=18 observations greater than the specified median, and the rejection region for the right-tailed test is Reject Ho if B³n-C0.05,20 from Table 4 Since B =18 is greater than n-C=20-5=15 from the table, we reject the null hypothesis that the population median is 14 mg and conclude that average nicotine levels are different from the target. Note that in the SAS output, we have there test for location reported. The resuts reported for the Nicotine variable test whether this value is truely zero. All tests conclude that Nicotine is significantly different from zero. ``` Tests for Location: Mu0=0 Test -Statistic- -----p Value------ Student's t t 77.02162 Pr > |t| <.0001 Sign M 12.5 Pr >= |M| <.0001 Signed Rank S 162.5 Pr >= |S| <.0001 ``` But this does not test whether the mean or median are equal to 14. The same tests applied to a new variable with Nicotine less 14 gives us the p-value for the two-sided tests. If we divide the p-value by two, we get the comporable p-values for the one-sided test. Note that in this case, all test have p-values less than the nominal 0.05 set for the test. ``` Tests for Location: Mu0=0 Test -Statistic- -----p Value------ Student's t t 3.070047 Pr > |t| 0.0053 Sign M 5.5 Pr >= |M| 0.0433 Signed Rank S 99.5 Pr >= |S| 0.0048 ``` For students in community development, education and social services fields. The University is concerned that married graduate students may be spending a large proportion of their graduate stipends on health care costs. When figuring out the total amount of stipends to offer, University officials factor in about \$500 per year for health care expenses. You have been charged with determining, using a sample survey, if this number is a good estimate for average health care costs. If the average cost is greater than \$500, the University might increase stipends appropriately. As a first step, you decide to question 40 married male graduate students in the College of Agriculture, selected at random from the spring enrollment list. At the analysis step, you will be testing a null hypothesis that the average health care cost is \$500 against an alternative that costs are greater than \$500. Assuming the true standard deviation in costs is roughly (s=) \$150, and the test is being done at a Type I error rate of (a=) 0.05, what would the power be for significant differences of +\$50, +\$75 and +\$100 mg (D) greater than the expected \$500. We begin by putting down all that we know using the shorthand notation of the book. H0: m=\$500 HA: m>\$500 Test Statistics: Average costs based on 40 replications, We will convert the average costs to a z-score using the prior knowledge that the true population standard deviation is s=\$150. That is z=(mean-m)/(s/Ö(n)). Since this is a one-tailed (right-tailed alternative) test, the critical value that defines the rejection region is given by z0.95 = 1.645. Power is 1 minus the probability of a Type II error. The probability of a Type II error for a specified alternative is given by the equation on page 216. This equation is a little confusing since it is not clear what you plug in for za, The description on pages 214 and 215 is a little vague as well. It turns out that we always use the right tail value (the positive value, in this case 1.645). It has to do with our taking the absolute value of the differences of the mean in the right hand part of the equation. With this understanding we plug in the value for za=1.645, and D = |m0-ma| = {\$50, \$75 and \$100), s=\$150, n=40. Answer b(50)=P(Z<1.645-2.236) = 0.2776 -> Power = 0.7223 Answer b(75)=P(Z<1.645-3.354) = 0.0437 -> Power = 0.9563 Answer b(150)=P(Z<1.645-4.472) = 0.0023 -> Power > 0.9977 From this we conclude that at this level of replication and with this statistical test, we have a 72% chance of rejecting the null hypothesis if the average cost is \$50 more than currently believed. We are almost certain to find significant differences of \$75 an more greater than expected with a sample of 45 students. You decide to run the study with 40 students, with the results produced in the following table. With these data, test the null hypothesis that average costs is \$500 against the alternative that the average is greater than \$500. (Note: The data table below can be directly cut and pasted into a spreadsheet or stat package - i.e. no html codes are imbedded.) ``` Person Expenditure 1 417 2 788 3 605 4 475 5 577 6 496 7 585 8 512 9 482 10 569 11 505 12 516 13 408 14 696 15 575 16 702 17 596 18 627 19 444 20 500 21 534 22 181 23 338 24 604 25 519 26 606 27 482 28 551 29 550 30 494 31 356 32 551 33 426 34 541 35 511 36 758 37 328 38 438 39 520 40 480 ``` A SAS program that reads in these data and outputs basic statistics is given here (SAS PROGRAM and OUTPUT). All we really need from this output is the sample mean, so running the program is overkill here. The test statistic is computed as: The rejection region is Z>z0.95=1.645. Since 0.888 is less than 1.645 we do not reject the null hypothesis and conclude that average costs are about what we expected them to be. These data seem to indicate that true health care costs might be closer to \$550 than to \$500. You want to do more sampling to get more definitive results. How many more students would you need to determine that the true population mean was really \$550 (the specific alternative hypothesis) instead of \$500 (the null hypothesis) if the true standard deviation is (s =) \$110. The test is to be performed at a Type I error probability of (a=) 0.05 and we wish 90% power for the test (i.e. Type II error probability of b=0.10). [Hint: page 221] I have given you all the information you need to use the equation on page 221 to figure out the needed sample size. Simply plugging in the values we get. For comparison purposes, redo the test in step 2 using the Sign Test. How do the results compare The sign test is given on page 246. For this test we only need the number of observations greater than the median stated in the null hypothesis. We will take the target median M0 to be \$500. In this case, B=24 observations are greater than the specified median, and the rejection region for the right-tailed test is Reject Ho if B³n-C0.05,40 from Table 4 Since B =24 is less than n-C=40-14=26 from the table, we do not reject the null hypothesis that the population median is \$500 and conclude that average costs are not different from the target. Note that in the SAS output, we have three tests for location reported. The results reported for the variable Expenditure considers whether the center of the distribution for this value is truely zero. All tests conclude that Expenditure is significantly different from zero. ``` Tests for Location: Mu0=0 Test -Statistic- -----p Value------ Student's t t 28.74492 Pr > |t| <.0001 Sign M 20 Pr >= |M| <.0001 Signed Rank S 410 Pr >= |S| <.0001 ``` But this does not test whether the mean or median are equal to \$500. The same tests applied to a new variable with Expenditure less the \$500 gives us the desired tests. Note that now all tests lead us to conclude that the null hypothesis should not be rejected. But also notice that each test is a two-sided test and hence is not directly applicable here. The p-value for the appropriate one-sided test would be half the p-value reported here. This still suggests that we do not reject the null hypothesis that the average costs is \$500 since these p-values will still be greater than the nominal 0.05 for the tests. ``` Tests for Location: Mu0=0 Test -Statistic- -----p Value------ Student's t t 1.162595 Pr > |t| 0.2521 Sign M 4.5 Pr >= |M| 0.1996 Signed Rank S 102.5 Pr >= |S| 0.1551 ``` Final Comments For this assignment I used the SAS system to perform the analysis. Notice how easy it is to pass on to you the SAS program (code) that I used to perform the analysis. You can easily copy my code and re-run it for yourself. In addition, the SAS output here was a simple text and hence I could send you a copy of the text quite easily. Note also that SAS has a new output delivery system (ODS) tool that lets me output results to html web pages. The last exercise I could have used the following code to produce html output. ```ods html file="c:/site/sta6166/images/univ.htm"; proc univariate; var Expenditure cExp ; title " Insurance Problem 2 Unit 2 Section 1 "; run; ods html close; ``` The resulting univ.htm files created by this program can be viewed here.