Homework #7, Math 320, Spring 2001

Name:____________________________      Section:____

## Answers to Math 320 Homework #7

Include your name, section number, and homework number on every page that you hand in. Enter ``Section 1'' for the morning class (10-11AM) and ``Section 2'' for Professor Sawyer's class (12-1PM).

Begin the exposition of your work on this page. If more room is needed, continue on sheets of paper of exactly the same size (8.5 x 11 inches), lined or not as you wish, but not torn from a spiral notebook. You should do your initial work and calculations on a separate sheet of paper before you write up the results to hand in.

SHOW ALL STEPS in your calculation of confidence intervals, starting from the appropriate ``magic number'' (like 1.960 or 1.645, technically called a quantile) for a normal or Student's t-distribution. In particular, DO NOT just enter the numbers into a calculator, press a button, and write down the results. (However, you are free to check your results using a calculator. It is OK to use a calculator to find the sample mean Xbar and the sample standard deviation s.)

1. (10 points) Do exercise 6.70 on page 288. (This asks you to find a 95% confidence interval for the population standard deviation of a normal population.)

Answer: For a sample of size n=18 from a normal population with population standard deviation sigma, the sample standard deviation Sx is distributed like sigma sqrt(X/(n-1)) where X has a chi-square distribution with d=n-1=17 degrees of freedom. This leads to a 95% confidence interval (L,U) with L=Sx*sqrt(17/X(0.975,17)) and U=Sx*sqrt(17/X(0.025,17)), where X(p,17) is the pth quantile of the chi-square distribution with 17 degrees of freedom. From Table A4, X(0.025,17)=7.564 and X(0.975,17)=30.19.

The problem gives Sum(X)=16.196 and Sum(X2)=14.572876 for the 18 observations. From this, Sx=sqrt((Sum(X2)-Sum(X)*Sum(X)/18)/17) = 0.002102.
WARNING: Since the 18 observations are all very close to one, most of the higher-order digits in Sum(X) and Sum(X2) will cancel out, so that Sum(X) and Sum(X2) must be entered very accurately. For example, if you use Sum(X2)=14.5729 instead of 14.572876, you will get Sx=0.0024, which is a 15% error.
If you were NOT given Sum(X) and Sum(X2), the easiest way to find Sx would be to first enter the 18 numbers in Problem 6.70 into List L1 of a TI-83. Press STAT then 1: for EDIT. If there are numbers in L1 already, clear the TI-83 by pressing MEM (2nd PLUS) then 5 then 1 then 2 and then press STAT and 1: again. After entering the data, press STAT again then CALC then 1: for 1-Var Stats then L1 (2nd 1) then Enter. The value Sx=0.00210 should appear.
Given Sx=0.002102, the 95% confidence interval is (L,U)=(0.001578,0.00315).

2. (10 points) Do exercise 7.6 on page 301. (This asks you to find the alternative hypothesis H1 in several settings.)
Answer: Change ``not increased'' to ``increased'' in part (a), ``are unchanged'' to ``are changed'' in part (b), and ``is not higher'' to ``is higher'' in part (c).

3. (15 points) A lamb farmer is considering whether to add antibiotics to his lamb feed. Specifically, he or she wants to carry out a statistical test to see whether the use of antibiotics increases lamb weight.

Without antibiotics, the weights of a particular breed of lamb at one year of age are known to be normally distributed with mean mu=27.2kg and standard deviation sigma=3.7kg. The lamb farmer raises a group of n=20 lambs for one year in a special barn and measures their weights. The sample mean of the 20 lambs is Xbar=29.3kg with sample standard deviation s=3.14kg. This encourages the farmer, since he or she wants to use the antibiotics, even though the farmer has read about humans who have died from antibiotic-resistant bacteria that have been traced to the use of antibiotics in livestock feed.
(i) What is the farmer's hypothesis H0 in this case? his or her hypothesis H1? (Assume a one-sided test.)
(ii) Using T=Xbar as a test statistic, what is the P-value of the observed value of T? Assume that the sample lamb weights have the same standard deviation of sigma=3.7kg as untreated lambs, so that the normalized test statistic has a normal distribution.
(iii) Formalize the farmer's test procedure by defining a decision rule for a one-sided test with level of significance alpha=0.05 . What is the critical value for this test? What is the rejection region? Is the observed value of Xbar in the rejection region or not? Does the farmer accept or reject H0 on the basis of this decision rule?

Answer: (i) Hypothesis H0 is that the population mean weight of the new lambs is the same as the population mean of the standard lambs. That is, that mu=27.2kg. Hypothesis H1 is that mu>27.2kg. Thus this will be an upper one-tailed test as opposed to a lower one-tailed test or a two-sided test. An implicit part of the assumptions is that the standard deviation of the new lambs is known to be sigma=3.7kg, but that is considered background information instead of part of H0 or H1.

(ii) Since the distribution of T=Xbar depends on mu and sigma, we define T1=(Xbar-mu)/(sigma/sqrt(n)) as a first step to finding the P-value. Since mu and sigma are assumed to be known, T1 has a standard normal distribution given H0. Here Xbar=29.3kg, mu=27.2kg, sigma=3.7kg, and n=20, so that T1Obs = (29.3-27.2)/(3.7/sqrt(20)) = 2.538. Thus the upper-tailed one-sided P-value is P(Z>=2.538) = 0.0055 from Table A2* (using 2.54 instead of 2.538).
ALTERNATIVELY, you can use the TI-83 to do the algebra and also find the normal P-value: Enter STAT then TESTS then 1: for Z-Test. In the Z-Test menu, highlite Stats (instead of Data) and press Enter to record your option (Stats instead of Data). Enter mu0=27.2, sigma=3.7, Xbar=29.3, and n=20. Highlight ``>mu0'' for a one-sided upper-tailed test and press Enter to record your choice. Highlight Calculate and press Enter. A screen will appear with Z=2.538 and P=0.0055.
The problem didn't ask what the farmer decides. However, since P=0.0055<0.05, he would reject H0 at level of significance alpha=0.05. Since P=0.0055<0.01, he would also reject H0 at level of significance alpha=0.01.
(iii) The critical value lambda0 for an upper one-tailed test with level of significance alpha=0.05 is exactly that value of Xbar that would lead to the P-value P=0.05. Since z(0.95)=1.645 (P(Z<1.645)=0.95 or P(Z>1.645)=0.05), this would be lambda0=1.645 if we were to use T1 as the test statistic instead of Xbar. For Xbar, lambda0=mu + z(0.95)*sigma/sqrt(n) = 27.2 + 1.645*3.7/sqrt(20) = 28.56kg. Since Xbar=29.3kg > 28.56, we reject H0 at alpha=0.05, which is consistent with P=0.0055.

4. (15 points) A teacher gives an exam to a class of n=16 students. The sample mean of the n=16 scores was Xbar=74.7 with sample standard deviation s=12.3 . In every previous year in which the exam was given, the mean was exactly 70.0. The teacher wants to test whether this year's exam was easier than the tests of previous years (or else that this year's class was more gifted). The alternative would be that the apparently higher class average of 74.7 was just sampling error.

(i) What is the teacher's hypothesis H0? his or her hypothesis H1? (Use a one-sided test.)
(ii) Using T=Xbar as a test statistic and taking s=12.3 and n=16 into account, what is the P-value of his data? Is it less than 0.05 or greater than 0.05, using a one-sided test?
(iii) Formalize the decision procedure by defining a decision rule for a one-sided test with level of significance alpha=0.05 . What is the critical value for this test? What is the rejection region? Is the observed value of T=Xbar in the rejection region or not? Does the teacher accept or reject H0 on the basis of this decision rule?

Answer: (i) Hypothesis H0 is that the population mean score of the class for the test is the same as before; that is, mu=70.0. Hypothesis H1 is that mu>70.0. Thus this will be an upper one-tailed test as in the previous problem. In this problem, we are not told the population standard deviation sigma, so that we will have to use the estimated sample standard deviation. This will lead to a Student-t distribution of the test statistic as opposed to a normal distribution.

(ii) Since the distribution of T=Xbar depends on mu and sigma, we define T1=(Xbar-mu)/(Sx/sqrt(n)) as a first step to finding the P-value. Given H0, T1 has a Student's t distribution with d=n-1=15 degrees of freedom. Here Xbar=74.7, mu=70.0, Sx=12.3, and n=16. so that T1Obs = (74.7-70.0)/(12.3/sqrt(16)) = 1.528. Thus the upper-tailed one-sided P-value is P(T(15)>=1.528). Table A3 tells us that P(T(15)>=1.3406)=0.10=1-0.90 and P(T(15)>=1.7531)=0.05=1-0.95, but that is as close as we can come without using linear interpolation. In particular, we can conclude that 0.05<P<0.10. This says that we would accept H0 at level of significance alpha=0.05 but reject H0 at alpha=0.10.
ALTERNATIVELY, you can use the TI-83 to not only do the algebra but also find the exact Student-t P-value: Enter STAT then TESTS then 2: for T-Test. In the T-Test menu, highlite Stats (instead of Data) and press Enter to record your option (Stats instead of Data), unless it is already highlighted. Enter mu0=70.0, Xbar=74.7, Sx=12.3, and n=16. Highlight ``>mu0'' for a one-sided upper-tailed test and press Enter to record your choice (unless it is already highlighted). Highlight Calculate and press Enter. A screen will appear with T=1.528 and P=0.0736. Note that 0.05<0.0736<0.10.
(iii) The critical value lambda0 for an upper one-tailed test with level of significance alpha=0.05 is exactly that value of Xbar that would lead to the P-value P=0.05. Since t(15,0.95)=1.7531 from Table A3 (P(T(15)<1.7531)=0.95 or P(T(15)>1.7531)=0.05), this would be lambda0=1.7531 if we were to use T1 as the test statistic instead of Xbar. For Xbar, lambda0=mu + z(0.95)*Sx/sqrt(n) = 70.0 1.7531*12.3/sqrt(16) = 75.39. Since Xbar=74.7 < 75.39, we accept H0 at alpha=0.05, which is consistent with P=0.0736.

5. (10 points) (Suggested by exercise 7.36 on page 324.) When negotiating with an insurance company, the owner of a pizza delivery service asserts that at least 75% of his drivers wear seat belts at any given time. However, in a random sample of n=8 of his drivers, only two were wearing seat belts. Is this sufficient evidence to reject the hypothesis that 75% of the drivers wear seat belts at any given time? Find the P-value using a lower one-tailed test. Find the P-value exactly from the binomial distribution, for example from Table A1.

Answer: Here we use a lower-tailed test based on the number T of drivers using seat belts in the sample of size 8. From Table A1, the P-value is P=Prob(T<=2)=0.0042 for n=8 and p=0.75, since, given H0, T has a binomial distribution with n=8 and p=0.75. Since P<0.05, we reject H0.

ALTERNATIVELY, you can use a TI-83 to solve this problem: Enter DISTR (2nd VARS) then space down to option A:BinomCDF and press Enter. The letters `binomcdf(` will appear on the screen. The syntax of `binomcdf(` is `binomcdf(numtrials,p,x)`. Now enter 8 then COMMA then 0.75 then COMMA then 2 then `)` (right parenthesis) then press Enter. The number 0.00423 will appear on the TI-83 screen, which is the P-value.
(Note that the problem does not ask you to actually construct a test or decision rule. If it did, the decision rule would be to reject H0 if T<=x for some integer x. For this test, alpha=P(T<=x) where T has a binomial distribution with n=8 and p=0.75. From Table A1, alpha=0.0273 for x=3 and alpha=0.1138 for x=4 and there is no test of this form with alpha=0.05 exactly.)