Homework #8, Math 320, Spring 2001

Name:____________________________      Section:____

Answers to Math 320 Homework #8

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.

1. (Similar to exercise 7.28 on page 313.) A company is concerned about a machine that fills cans with ground coffee. The machine is tested each day by weighing all of the cans filled by the machine during the first hour of production, which is always n=29 cans. The machine is assumed to be working properly if the sample standard deviation of the weights of the cans is not too large. The company will repair the machine only if there is convincing evidence that the standard deviation is greater than 2.6. Otherwise, it is assumed that the standard deviation equals 2.6 and that the machine is working properly. Assume that the weights of the coffee cans are normally distributed with the same mean.

(a) State the hypotheses H0 and H1.
(b) Suppose that the production manager measures T=3.08 for the sample standard deviation of the n=29 coffee cans on one day. Does he or she accept H0 or reject H0? What is the P-value? (Hint: It may be easier to work with sample variances rather than sample standard deviations.)
(c) Find the critical value lambda0 for the test at level of significance alpha=0.10 based on the sample standard deviation T. Is the observed value T=3.08 below or above that value? In this way, if the manager decides to become concerned about the machine only when the P-value is 0.10 or less, then he or she just has to check whether the observed sample standard deviation T is greater or less than lambda0 without having to calculate a new P-value each day.

Answers: (a) H0 is that the machine is working properly and that T has the distribution stated. That is, the population standard deviation of the coffee can weights is sigma=2.6. H1 is that sigma>2.6.

(b) The test statistic T (the sample standard deviation) has a distribution given H0 that depends on n and the population standard deviation sigma=2.6. As a first step in calculating the P-value, let T1=(n-1)Sx(squared)/sigma(squared). Given H0, T1 has a chi-square distribution with d=n-1=28 degrees of freedom. The observed value is T1Obs=28*3.08(squared)/2.6(squared) = 39.29. The P-value is Prob(T1>T1Obs) = Prob(X(28)>39.29).
Table A4 tells us that X(28,0.90)=37.92 and X(28,0.95)=41.34. Since, 37.92<39.39<41.34, we can conclude 0.05<P<0.10, but we cannot calculate the P-value more accurately than that from Table A4 without linear interpolation.
However, we can get the P-value exactly from a TI-83 calculator. Enter DISTR (2nd VARS) then 7: for X2cdf(. The syntax for X2cdf( is X2cdf(Lower,Upper,df) where df stands for degrees of freedom. To calculate P(X(28)>39.29), enter 39.29 then COMMA, then 1E99 (1 then 2nd COMMA then 99) then COMMA then 28 for degrees of freedom then ) (right parenthesis) then press Enter. The number 0.07637 should appear on the TI-83 screen, which is the P-value. Note that 0.05<0.7637<0.10, consistent with before.
(c) The critical value C or lambda0 is the value of T=Sx that would give us exactly P=0.10 given H0. For T1 (which has a X(28) distribution given H0), the critical value is C1=X(28,0.90)=37.92, but we need the critical value for T=Sx. This can be found from solving T1=C1 for Sx, which leads to C=Sx=sigma sqrt(C1/(n-1)) = 2.6*sqrt(37.92/28) = 3.026. Since 3.08 > 3.026, we would reject H0 at level of significance alpha=0.10, which is consistent with P=0.07637<0.10.

2. Do exercise 7.44 on page 325. Here a random sample of size n=30 is taken from a population, and H0:p=0.70, H1:p=0.80 for the population proportion of some property. A decision rule is to reject H0 if the number T in the sample with that property satisfies T>23. What is the significance level? What is the power?

Answer: Here alpha=P(T>23)=1-P(T<=23) where T has a binomial distribution with n=30 and p=0.70, and the power is P(T>23)=1-P(T<=23) for n=30 and p=0.80.

If we convert to Z scores for p=0.70 and using a normal approximation with continuity correction, P(T<=23) = P(X<=23 + 1/2) = P((X-np)/root(np(1-p))<=(23+1/2-np)/root(np(1-p)) = P(Z<=0.996) = 0.84, so that alpha=0.16. The power is one minus the same probability for p=0.80, which is 1-0.41=0.59 by a similar calculation.
ALTERNATIVELY (and BETTER), you can use a TI-83 calculator to find the exact values. See Answers for Problem 5 in Homework 7 for the details of using a TI-83 to find a binomial probability. If T has a binomial distribution, alpha = P(T>23) = 1 - P(T<=23) = 1 - 0.8405 = 0.1595 for n=30 and p=0.70 using the TI-83, and the power is P(T>23) = 1 - P(T<=23) = 1 - 0.3930 = 0.6070 for n=30 and p=0.80.

3. Do exercise 7.48 on page 335. What test statistic are you using? What is its distribution given H0? Is this a one-sided or a two-sided test? How does that affect the P-value?

Answer: This is a two-tailed test for H0:mu=25.0g. The easiest test statistic to use is T=(Xbar-25)/(Sx/root(n)), which under the assumption of normality, has a Student's t-distribution with n-1 degrees of freedom. Here n=6, Xbar=23.9, Sx=0.885, T=-3.043, so that the two-sided P-value is P = P(|T(5)|>=3.043) = 2P(T(5)>=3.043), where T(5) denotes a random variable with a Student's t distribution with 5 degrees of freedom.

The easest way to find the P-value, and do the algebra for calculating Sx and T as well, is to use a TI-83. Enter STAT then 1: for EDIT. This leads to a window for entering values for Lists L1, L2, and L3. If there are numbers in L1 already, enter MEM (2nd PLUS) then 5 then 1 then 2 to clear the TI-83 then STAT and 1: again.
After you have entering the six numbers into L1, enter STAT then TESTS then 2: for T-Test. If Stats instead of Data is highlighted, highlight Data and press Enter to record your choice. Enter mu0=25.0, L1 for List 1 (if it is not already entered) and leave Freq at 1. If (notequal)mu0 (for a two-sided test) is not highlighted, then highlight it and press Enter to record your choice. Highlight Calculate and press Enter. A screen with T=-3.043, P=0.02865, Xbar=23.9, and Sx=0.8854 will appear. The (two-sided) P-value is P=0.02865. Since P<0.10, we reject H0 at alpha=0.10.

4. Do exercise 7.72 on page 346.

Answer: Some summary statistics for the n=16 numbers are listed in a table at the bottom of page 346. From this table, n=16, Xbar=1497.50, and Sx=10.708. (Otherwise, you could calculate Xbar and Sx yourself from the 16 numbers.) Assume that the observations are normal. The Z-scores that are listed in Problem 7.70 show no significant outliers, so that this assumption is probably safe.

Given H0:sigma=10, T = (n-1)Sx2/sigma2 has a chi-square distribution with n-1 degrees of freedom. Here the observed T=15(10.708/10)2 = 17.199. Since the alternative is H1:sigma>10, we use an upper-tailed test. The P-value is P(X(15)>=17.199) where X(15) has a chi-square distribution with 15 degrees of freedom.
The easiest way to find the P-value is to use a TI-83. (See the Answers for Problem 1 above for the exact method.) This leads to a P-value of P=0.307. Since P>0.05, we accept H0 at level of significance alpha=0.05.

5. Do exercise 8.6 on page 360. Is this a one-sided or a two-sided P-value?

Answer: The setup of Problem 8.6 has a pair of values (X,Y) for each of n=20 claims. We are to test H0:muX=muY versus H1:muX(notequal)muY, which means a two-sided test. The problem structure suggests the use of paired differences, so that we define the differences Di=Xi-Yi and test H0:muD=0 versus H1:muD(notequal)0.

It is stated that the differences Di are normally distributed, so that the most appropriate test is a one-sample t-test for Di. The Wilcoxon Signed Rank test (see Section 8.2) would also be correct, but if we are sure that the Di are normally distributed, then the paired-sample Student t-test has greater power and would be the better choice.
One way to proceed would be to enter the n=20 differences into a TI-83 and have the TI-83 do the t-test. (See the Answers to Problem 3 above.) However, the text has been nice enough to give us the summary statistics Sum(Di)=124, Sum(Di2)=5346, so that we can avoid entering the n=20 numbers into a TI-83 list. More precisely, Dbar=124/20=6.20 and SD=sqrt((Sum(DiSquared)-Sum(Di)*Sum(Di)/20)/19)=15.5211. Given H0, TD=Dbar/(SD/root(n)) has a Student's t distribution with d=n-1=19 degrees of freedom. The two-sided P-value is 2P(TD>TDOBS) = 2P(T(19)>TDOBS), where T(19) denotes a Student's to distribution with 19 degrees of freedom. Here TDOBS=6.20/(15.5211/sqrt(20))=1.78642 so that the P-value is 2P(T(19)>1.786). Here the two-sided P-value is P=0.0900, which can be found either by having the TI-83 carry out a one-sample t-test from the summary statistics Dbar and SD (click on T-Tests on the TI-83) or else by finding the two-sample P-value directly from TD=1.78642 and the cumulative Student's t-distribution (click on T-Distribution P-values on the TI-83).
The problem never asks you to carry out a test other than calculating the P-value, but does say to use alpha=0.05, presumably if you were motivated to carry out such a test even if not asked. Since P=0.0900>0.05, we accept H0.

6. Do exercise 8.14 on page 375.

Answer: Here we are told explicitly to use the Wilcoxon Signed Rank test for n=10 paired differences for married couples.

The ten differences Di sorted by absolute values are 1, -2, -2, 5, 8, 15, 20, -20, 20, and 35. Note that there is one tied pair and one tied triple (by absolute value). The first step is to assign the tentative ranks 1, 2, 3, 4, 5, 6, 7, 8, 9, and 10 to the ten values. Replace the ranks of observations in tie groups by the average of the ranks for that tie group to obtain the (nontentative) averaged ranks (or ``midranks'') 1, 2.5, 2.5, 4, 5, 6, 8, 8, 8, and 10. For example, the tentative ranks 2 and 3 are averaged to 2.5 each, and the tentative ranks 7,8,9 are averaged to 8. The (Wilcoxon) Signed Ranks are these averaged ranks with the signs of the original differences, so that the final Signed Ranks are 1, -2.5, -2.5, 4, 5, 6, 8, -8, 8, and 10.
We now carry out a one-sample t-test for H0muR=0 using the ten signed ranks R1 through R10. The easiest way to do this is to enter the 10 signed ranks into List L1 of a TI-83 and have the TI-83 find the two-sided P-value for a one-sample t-test. See the Answers to Problem 3 above for the details. When you do this, the TI-83 asserts Rbar=2.9, SR=5.758, T=1.5926, and P=0.1457 for the two-sided test.
You can check Rbar=Sum(R)/n = 29/10 = 2.9 by eye, which suggests that the data were entered corrected into the TI-83. Since P>0.05 (unless otherwise specified, we always assume alpha=0.05), we conclude that there is not enough evidence to reject H0 and accept H0.