252grass3-071 3/02/07 (Open this document in 'Page Layout' view!) Name: Class days and time: Please include this on what you hand in! Graded Assignment 3 Part 1. In your outline there are 6 methods to compare means or medians, methods D1, D2, D3, D4, D5a and D5b. Methods D6a and D6b compare proportions and method D7 compares variances or standard deviations. In the following cases, identify H 0 and H 1 and identify which method to use. Method E1 is a chi-squared test that compares multiple proportions. Method F1 is analysis of variance (ANOVA), which compares multiple means. If the hypotheses involve two means, state the hypotheses in terms of both and D 1 2 . If the hypotheses involve two proportions, state them in terms of both p and p p1 p 2 . If the hypotheses involve two standard deviations or variances, state them in terms of both 2 and 12 22 or 22 12 . All the questions involve means, medians, proportions or variances. One of these problems is a chi-squared test. Note that Problem D8 is a similar assignment to that below. Note: Look at 252thngs (252thngs) on the syllabus supplement part of the website before you start (and before you take exams). Neatness and clarity of explanation are expected. Note that from now on neatness means paper neatly trimmed on the left side if it has been torn, multiple pages stapled and paper written on only one side. ----------------------------------------------------------------------------------------------------------------------------Example: This may seem long but it appears on a previous graded assignment 3. A group of supervisors are given exams on management skills before and after taking a course in management. Scores are as follows. Supervisor Before After 1 63 78 2 93 92 3 84 91 4 72 80 5 65 69 6 72 85 7 91 99 8 84 82 9 71 81 10 80 87 11 68 93 If we assume that the distribution of results is Normal, what method should we use to answer the question “Has the course improved the scores of the managers?” What are our hypotheses? Solution: You are comparing means before and after the course. You can get away with using means because the parent distributions are Normal. If 2 is the mean of the second sample, you are hoping that 2 1 , which, because it contains no equality is an alternate hypothesis. So your hypotheses are H 0 : 1 2 H 0 : 1 2 0 H 0 : D 0 or . If D 1 2 , then . The important thing to notice H 1 : 1 2 H 1 : 1 2 0 H 1 : D 0 here is that the data are in before and after pairs, so you use Method D4. 252solngr3-071 3/9/07 In most of these problems you have to define what you mean by group or sample one and group 2. For example in problem 3 you will probably let x1 be earnings of corporate lawyers and x 2 be the earnings of private practice lawyers. 1. You have profit rates, x1 , for a sample of the European operations of 20 pharmaceutical firms. You also have profit rates, x 2 , for the American operations of the same 20 firms. You believe that they are normally distributed and you wish to see whether the European firms were more profitable than the American firms. 2. You have a sample of 15 US cities, with a typical salary for a corporate lawyer and a typical salary for a lawyer in private practice. You wish to compare the earnings of the two types of lawyers. You do not believe that the underlying distribution is Normal. 3. You have a sample of the earnings of 43 randomly chosen corporate lawyers and another independent sample of salaries of 43 lawyers in private practice. You wish to show that the average corporate lawyer makes more than the average lawyer in private practice. You believe that the parent (underlying) distribution is normal and you think that you know the population variances for each group. 4. You find out that you were wrong about the variances in problem 3 and have to recompute the variances of the salaries for each of the two groups in Problem 3 from the samples that you had gathered. First you wish to compare the reliability of earnings for the two groups. 5. Your null hypothesis in Problem 4 was rejected and you, once again, are trying to show that corporate lawyers make more than lawyers in private practice. 6. Royal Crown Cola recruits a panel of 115 men and 56 women. The entire group is polled to see if they like the current formulation of Royal Crown better than Coca Cola. Then they are asked to compare a new formulation of Royal Crown against Coca Cola. Our data consists of the number of each panel member and whether 1) each member liked Royal Crow better than Coke originally and 2) whether each member liked Royal Crown Better than Coke with the new formulation for Royal Crown. Has the new formulation improved the sales prospects of Royal Crown? 7. Using the panel above and only the new formulation, the numbers of men and women who preferred Royal Crown is tabulated separately and the data is examined to see if gender plays a role in preferences. 8. In addition to the 115 men and the 56 women, the Royal Crown people find 45 monsters to tell them whether they prefer the new formulation of RC to Coke. We wish to compare the preferences of the three groups. 9. A group of 25 male accountants with working wives was asked to rate their job satisfaction on a 1 to 10 scale. Another group of 20 male accountants whose wives do not work were also asked to rate their satisfaction. We want to test whether the satisfaction of accountants with working wives is below that of those whose wives do not work and do not want to use a method that assumes an underlying Normal distribution. Solution: General considerations. 1) All methods in section D are methods that can only be used for comparison of 2 samples. This is because, if (theta) is a parameter like or p, 1 2 is easy to define and will be zero if 1 and 1 are equal. If we go to more than two samples, say 3, we need something like 1 0 2 2 0 2 3 0 2 , where 0 is some sort of average of the parameters of the samples. This will equal zero if all the parameters are equal and will not allow positive discrepancies in one sample to cancel out negative discrepancies in another. This is what takes us to chi-squared and ANOVA methods. Saying 2 2 2 0 is not the same as saying D 3 0 , because 1 0 2 0 3 0 1 2 3 D 3 would be negative if 1 2 3 , but saying 1 0 2 2 0 2 0 is the same as saying D 2 1 2 0 . (Try proving this – it’s simple algebra.) 2) You can always substitute a method for the median for a method for the mean, but not vice versa. However, if a Normal distribution applies, a method involving means will be more efficient and powerful. 2 252solngr3-071 3/9/07 3) The computer will used Method D3 when it is not told what method to use. This is quite general because if the sample variances are similar, it gives results like D2 and if the sample sizes are large, it gives results like D1. However, if variances are equal D2 is easier to use and if the samples are large D1 is easier to use. 4) The K-S and Lilliefors methods only exist because chi-square performs so poorly for small samples. K-S needs , or other parameters. Lilliefors uses x or s and only works to test for a Normal distribution. 5) ‘Significant’ in statistics means that we have rejected a hypothesis like H 0 : 0 and ‘significantly different’ means that we have rejected a hypothesis like H 0 : 1 2 . Of course, if two parameters are significantly different, their difference is significant. 6) Be careful of inequalities. If 1 2 or 2 1 and D 1 2 , then D 0. Please remember A hypothesis containing , or is an alternative hypothesis. 7) In most problems you are better off trying to figure out what the alternative hypothesis is before you try to state the null hypothesis. 8) Do not lose sight of the fact that the purpose of samples is to compare populations. We may look at numbers in methods D6b and chi-squared tests, but our purpose is to deal with proportions of a population. The methods were listed in the outline in the following table. Paired Samples Location - Normal distribution. Method D4 Compare means. Independent Samples Methods D1- D3 Location - Distribution not Normal. Compare medians. Method D5b Method D5a Proportions Method D6b Method D6a Variability - Normal distribution. Compare variances. Method D7 1. You have profit rates, x1 , for a sample of the European operations of 20 pharmaceutical firms. You also have profit rates, x 2 , for the American operations of the same 20 firms. You believe that they are normally distributed and you wish to see whether the European firms were more profitable than the American firms. Let x1 represent the European branches and x 2 represent the American branches. If you use means and European firms are more profitable, you have 1 2 . Because it does not contain an equality, we have to consider it an alternate hypothesis. H 0 : 1 2 H 0 : 1 2 0 H 0 : D 0 or . If D 1 2 , then . If you have decided to use H 1 : 1 2 H 1 : 1 2 0 H 1 : D 0 means, you must believe that the Normal distribution applies. Since the data is paired by corporations use Method D4. You may want to see the methodology below. If we use a confidence interval it will be of the form D d t s d . If we use a test ratio, we will compare t d D0 with t . sd If we use a critical value for d , we will use d cv D0 t s d . If you do not believe that a Normal distribution applies, use method D5b and compare medians. 3 252solngr3-071 3/9/07 2. You have a sample of 15 US cities, with a typical salary for a corporate lawyer and a typical salary for a lawyer in private practice. You wish to compare the earnings of the two types of lawyers. You do not believe that the underlying distribution is Normal. Let x1 represent the corporate lawyers and x 2 represent the lawyers in private practice. Data are paired by cities. If you do not believe that a Normal distribution applies, use method D5b and compare H : 2 medians. 0 1 H 1 : 1 2 3. You have a sample of the earnings of 43 randomly chosen corporate lawyers and another independent sample of salaries of 43 lawyers in private practice. You wish to show that the average corporate lawyer makes more than the average lawyer in private practice. You believe that the parent (underlying) distribution is normal and you think that you know the population variances for each group. Let x1 represent the corporate lawyers and x 2 represent the lawyers in private practice. If you use means and corporate lawyers make more, you have 1 2 . Because it does not contain an equality, we have to consider it an alternate hypothesis. H 0 : 1 2 H 0 : 1 2 0 H 0 : D 0 or . If D 1 2 , then . If you have decided to use H 1 : 1 2 H 1 : 1 2 0 H 1 : D 0 means, you must believe that the Normal distribution applies. If you know the variances, use Method D1. 4. You find out that you were wrong about the variances in problem 3 and have to recompute the variances of the salaries for each of the two groups in Problem 3 from the samples that you had gathered. First you wish to compare the reliability of earnings for the two groups. Let x1 represent the corporate lawyers and x 2 represent the lawyers in private practice. The population variance is considered a measure of reliability or riskiness. If you have no belief about which earnings are more reliable and you believe that the Normal distribution applies, use method D7. H 0 : 1 2 2 2 2 . You can test the variance ratio 12 or 22 against 1. H 1 : 12 1 . This means that the 2 2 1 H 1 : 1 2 null hypothesis is H 0 : and s 22 s12 12 22 1 . Since you are comparing variances, use Method D7, compare the ratios s12 s 22 against F42,42 . If you do not believe the Normal distribution applies, use the Levene test, which 2 will be discussed at the end of section F. 5. Your null hypothesis in Problem 4 was rejected and you, once again, are trying to show that corporate lawyers make more than lawyers in private practice. Let x1 represent the corporate lawyers and x 2 represent the lawyers in private practice... H 0 : 1 2 H 0 : 1 2 0 or . If D 1 2 , then H 1 : 1 2 H 1 : 1 2 0 variances, use Method D3. H 0 : D 0 . Since we cannot assume equal H 1 : D 0 4 252solngr3-071 3/9/07 6. Royal Crown Cola recruits a panel of 115 men and 56 women. The entire group is polled to see if they like the current formulation of Royal Crown better than Coca Cola. Then they are asked to compare a new formulation of Royal Crown against Coca Cola. Our data consists of the number of each panel member and whether 1) each member liked Royal Crown better than Coke originally and 2) whether each member liked Royal Crown Better than Coke with the new formulation for Royal Crown. Has the new formulation improved the sales prospects of Royal Crown? The fact that there are 115 men and 56 women is irrelevant. (For those of you who don’t know what irrelevant means, it’s what the Philadelphia zoo no longer has.) This can be called a paired comparison of proportions and the method is D6b. Let p1 represent proportion of the population that preferred Royal Crown before the new recipe and p 2 represent proportion of the population that preferred Royal Crown after the new recipe. We want to test for p 2 p1 or p1 p 2 . Whichever way we write it, it’s an alternative hypothesis because it contains no equality. Let x11 be those who preferred RC both before and after, x12 those who preferred RC before but not after, x 21 be the number that preferred RC after but not before and x 22 be those who never preferred RC. Our hypotheses are given along with the table to be H : p p 2 analyzed. 0 1 or if p p1 p 2 , H 1 : p1 p 2 H 0 : p 0 H 1 : p1 0 question 1 question 2 yes no yes x11 x12 x no 21 x 22 7. Using the panel above and only the new formulation, the numbers of men and women who preferred Royal Crown is tabulated separately and the data is examined to see if gender plays a role in preferences. Let p1 represent proportion of the population of men who preferred Royal Crown after the new recipe and p 2 represent proportion of the population of women who preferred Royal Crown after the new recipe. H 0 : p1 p 2 These are independent samples, so we are using method D6a. or if p p1 p 2 , H 1 : p1 p 2 H 0 : p 0 H 1 : p1 0 8. In addition to the 115 men and the 56 women, the Royal Crown people find 45 monsters to tell them whether they prefer the new formulation of RC to Coke. We wish to compare the preferences of the three groups. Let p1 represent proportion of the population of men who preferred Royal Crown after the new recipe, p 2 represent proportion of the population of women who preferred Royal Crown after the new recipe and p 3 represent proportion of the population of monsters who preferred Royal Crown after the new recipe. We are H 0 : p1 p 2 p 3 comparing three independent samples, so this is a chi-squared test of homogeneity. H 1 : not all ps equal 9. A group of 25 male accountants with working wives was asked to rate their job satisfaction on a 1 to 10 scale. Another group of 20 male accountants whose wives do not work were also asked to rate their satisfaction. We want to test whether the satisfaction of accountants with working wives is below that of those whose wives do not work and do not want to use a method that assumes an underlying Normal distribution. Let x1 represent the accountants with working wives and x 2 represent the accountants without working wives. Since we do not want to use a method that presumes a Normal distribution, we must compare medians. If the (job) satisfaction of the first group is below that of the other group, we have 1 2 , which H 0 : 1 2 must be an alternative hypothesis. . Because we have independent samples, use method D5a. H 1 : 1 2 5 252solngr3-071 3/9/07 Part 2. Do problems 6 and 7 using the following data. Men 12 Liked 1st, liked 2nd Liked 1st, didn’t like 2nd Didn’t like 1st , liked 2nd Didn’t like 1st , didn’t like 2nd Total Women 8 Total 20 3 3 6 5 3 8 95 42 137 115 56 171 Problem 6: Royal Crown Cola recruits a panel of 115 men and 56 women. The entire group is polled to see if they like the current formulation of Royal Crown better than Coca Cola. Then they are asked to compare a new formulation of Royal Crown against Coca Cola. Our data consists of the number of each panel member and whether 1) each member liked Royal Crown better than Coke originally and 2) whether each member liked Royal Crown Better than Coke with the new formulation for Royal Crown. Has the new formulation improved the sales prospects of Royal Crown? H : p p 2 Solution: Note that I added a total column to the original data. 0 1 . We use the following table. H 1 : p1 p 2 question 1 yes no question 2 yes no Let x11 20 be those who preferred RC both before and after, x12 6 those x12 x 22 x11 x 21 who preferred RC before but not after, x 21 8 be the number that preferred RC after but not before and question 1 x 22 137 be those who never preferred RC. The table is as follows. z x12 x 21 x12 x 21 68 68 2 14 4 14 0.53 . Since p1 yes no question 2 yes no 6 20 8 137 x11 x12 x x 21 and p 2 11 prospects 171 171 only improve if x 21 is larger than x12 and z is negative. If we use a 5% significance level, we have a left sided test where we reject the null hypothesis if our computed z is below z .05 1.645 . We will not reject the null hypothesis. Problem 7: Using the panel above and only the new formulation, the numbers of men and women who preferred Royal Crown is tabulated separately and the data is examined to see if gender plays a role in preferences. Solution: Let p1 represent proportion of the population of men who preferred Royal Crown after the new recipe and p 2 represent proportion of the population of women who preferred Royal Crown after the new H 0 : p1 p 2 recipe. These are independent samples, so we are using method 6a. or if p p1 p 2 , H 1 : p1 p 2 H 0 : p 0 12 5 83 .14783 and for Women p 2 .20755 . This means . For Men p1 115 53 H : p 0 1 1 6 252solngr3-071 3/9/07 p1 p 2 .14783 .20755 .05972 . The overall proportion that liked RC is p0 12 5 8 3 28 .1666667 , so p 115 53 168 1 1 1 1 .16667 .83333 p 0 q 0 115 53 n n 2 1 .13889 .0086957 .0188679 .0038283 .061873 . If the significance level is 5%, use z .025 1.960 p1 p2 p1 p2 z s p , where .14783 .85217 .20755 .79245 .001095446 .003103264 (i). Confidence Interval: p p z s p or 2 s p p1 q1 p 2 q 2 n1 n2 115 2 53 .00419871 .064797 . p p z 2 s p .05972 1.960.064797 .0597 0.127 Compare this interval with p0 . p p 0 p1 p p10 p 20 .05972 .96519 where p10 (ii). Test Ratio: z p p .061873 and p 20 come from the null hypothesis if specified and p p1q1 p 2 q 2 although n1 n2 sp may have to be used if p1 and p 2 are unknown. Also note that if the null hypothesis is p1 p2 or p0 0 , we use p 1 1 , where p 0 q 0 n1 n 2 n1 p1 n 2 p 2 x1 x 2 and x1 and x2 are the number of successes in sample 1 n1 n 2 n1 n 2 and sample 2, respectively. (iii). Critical Value: pCV p0 z p or p1 p 2 CV p10 p 20 z 2 p . 2 p0 Test this against p1 p2 . For calculation of p , see Test Ratio above. Part 3. (Extra Credit) Invent and solve 4 problems. One each for methods D1 thru D4. Obviously, there is a lot of room for whimsy here. Entries will be judged for originality. Here is a possibility. The data below represent samples of cost overruns (in millions of dollars) over a period of two years by two companies in Federal contracts. Below I have calculated the means, the standard errors and the variances for the columns. If we are to choose one of these firms for future contracts on the basis of cost overruns, do we have enough information to make a choice? Company 1 Company 2 Difference x2 d x1 x 2 x1 1 2 3 4 5 6 7 8 9 10 11 1.49 3.69 6.79 1.09 0.09 0.89 3.99 -1.21 0.89 0.19 0.59 0.69 1.49 0.69 1.99 0.99 -0.11 -1.31 -0.11 1.99 -2.31 -0.41 0.8 2.2 6.1 -0.9 -0.9 1.0 5.3 -1.1 -1.1 2.5 1.0 n1 11 x1 1.681 s x1 0.684 s1 2.267 n 2 11 x 2 0.326 s x2 0.406 s 2 1.347 n d 11 d 1.355 s d 0.756 s d 2.508 7 252solngr3-071 3/9/07 Note: In case you didn’t know, cost overruns are undesirable. We only have a basis for choice if we can show a significant difference between the mean cost overruns. I am assuming a significance level of 5%. Problem 1: The data above represent cost overruns, where each line represents jobs of comparable size and scope. Problem 2: The data above represents two independent samples of cost overruns by the two firms in government contracts. Problem 3: The data above represents two independent samples of cost overruns. Use a test for equality of variances before deciding on what method to use. Problem 4: Assume that the means and variances that you got from the columns apply to two independent random samples, each of size 80. I will only use the t-ratio in the solutions that follow. Problem 1: The data above represent cost overruns, where each line represents jobs of comparable size and scope. If the lines of the table represent numbers with a unique relationship between them we have paired data, Method D4. Interval for Confidence Hypotheses Test Ratio Critical Value Interval Difference H 0 : D D0 * D d t 2 s d d cv D0 t 2 s d d D0 t between Two H 1 : D D0 , sd d x1 x 2 Means (paired D 1 2 s data.) df n 1 where sd d n1 n 2 n n n d 11 d 1.355 s d 0.756 s d 2.508 df 11 1 10 . d D0 1.355 0 1.792 Since this is a two-sided test, the ‘do not reject’ region is between sd 0.756 t 10 2.228 . Since our computed t is between these two values, do not reject the null hypothesis. t .025 This agrees with the Minitab solution below. MTB > Paired c5 c6. Paired T-Test and CI: xc1, xc2 Paired T for xc1 - xc2 N Mean StDev SE Mean xc1 11 1.68091 2.26736 0.68363 xc2 11 0.32636 1.34705 0.40615 Difference 11 1.35455 2.50773 0.75611 95% CI for mean difference: (-0.33017, 3.03926) T-Test of mean difference = 0 (vs not = 0): T-Value = 1.79 Value = 0.103 P- Note that since the p-value is above the 5% significance level, we cannot reject the null hypothesis and thus have no basis for choosing between the firms. Problem 2: The data above represents two independent samples of cost overruns. If the variances are not equal and we are assuming a Normally distributed population, we can use method D3, the Satterthwaite approximation. The formula table has the following formulas. 8 252solngr3-071 3/9/07 Interval for Confidence Interval D d t 2 s d Difference between Two Means( unknown, variances assumed unequal) s12 s22 n 1 n2 Test Ratio H 0 : D D0 * s12 s22 n1 n2 sd DF Hypotheses t H 1 : D D0 , D 1 2 2 s12 2 n1 s 22 2 n2 n2 1 n1 11 x1 1.681 s x1 0.684 s1 2.267 n 2 11 x 2 0.326 s x2 0.406 s 2 1.347 s12 n1 0.684 2 0.467856 s 22 n2 0.406 2 0.164836 s12 s 22 n1 n 2 DF d cv D0 t 2 s d d D0 sd n1 1 Thus s d Critical Value d 1.355 =0.632692 s12 s 22 0.632692 0.79542 n1 n 2 s12 s 22 n1 n 2 2 2 2 s12 s 22 n1 n2 n1 1 n2 1 0.63692 2 0.467856 2 0.164836 2 10 10 0.40030 16 .27 .246060 10 d D0 1.355 0 1.703 . Since this is a two-sided test, the ‘do not reject’ region is between sd 0.79542 t 29 2.045 . Since our computed t is between these two values, do not reject the null hypothesis. t .025 MTB > TwoSample c5 c6. Two-Sample T-Test and CI: xc1, xc2 Two-sample T for xc1 vs xc2 N Mean StDev SE Mean xc1 11 1.68 2.27 0.68 xc2 11 0.33 1.35 0.41 Difference = mu (xc1) - mu (xc2) Estimate for difference: 1.35455 95% CI for difference: (-0.33116, 3.04026) T-Test of difference = 0 (vs not =): T-Value = 1.70 0.108 DF = 16 P-Value = Note that since the p-value is above the 5% significance level, we cannot reject the null hypothesis and thus have no basis for choosing between the firms. 9 252solngr3-071 3/9/07 Problem 3: The data above represents two independent samples of cost overruns. Use a test for equality of variances before deciding on what method to use. All right, I cheated and ran the variance comparison on Minitab. MTB > VarTest c5 c6; SUBC> Unstacked. Test for Equal Variances: xc1, xc2 95% Bonferroni confidence intervals for standard deviations N Lower StDev Upper xc1 11 1.50962 2.26736 4.35771 xc2 11 0.89687 1.34705 2.58894 F-Test (normal distribution) Test statistic = 2.83, p-value = 0.116 Levene's Test (any continuous distribution) Test statistic = 0.57, p-value = 0.458 Since both tests give us a p-value above our significance level, we cannot reject the null hypothesis of equal variances. The formula table gives us the formulas below. (Method D2 – Comparison of two means with samples coming from populations with similar variances.) Interval for Confidence Hypotheses Test Ratio Critical Value Interval Difference H 0 : D D0 * D d t 2 s d d cv D0 t 2 s d d D0 t between Two H 1 : D D0 , sd 1 1 Means ( sd s p D n1 1s12 n2 1s22 1 2 n n 2 unknown, 1 variances assumed equal) sˆ p 2 n1 n2 2 DF n1 n2 2 n1 11 x1 1.681 s x1 0.684 s1 2.267 n 2 11 x 2 0.326 s x2 0.406 s 2 1.347 d 1.355 Since our samples are of equal size we can use the simplified formula for the pooled standard deviation. sˆ 2p 11 12.267 2 11 11.347 2 11 11 2 2.267 2 1.347 2 3.4768 sˆ p 3.4768 1.8646 2 1 0.6322 0.7951 df 11 11 2 20 11 11 Note that if I use the more exact values for the standard deviations given in the Minitab printout above, I get a pooled standard deviation of 1.8649. Note that s d and the t-ratio are the same as in the last version except sd 3.4769 1 for a rounding error. d D0 1.355 0 t 1.704 . Since this is a two-sided test, the ‘do not reject’ region is between sd 0.7951 20 t .025 2.086 . Since our computed t is between these two values, do not reject the null hypothesis. MTB > TwoSample c5 c6; SUBC> Pooled. Two-Sample T-Test and CI: xc1, xc2 Two-sample T for xc1 vs xc2 N Mean StDev SE Mean xc1 11 1.68 2.27 0.68 xc2 11 0.33 1.35 0.41 Difference = mu (xc1) - mu (xc2) Estimate for difference: 1.35455 95% CI for difference: (-0.30417, 3.01327) T-Test of difference = 0 (vs not =): T-Value = 1.70 0.104 DF = 20 Both use Pooled StDev = 1.8649 P-Value = 10 252solngr3-071 3/9/07 Note that since the p-value is above the 5% significance level, we cannot reject the null hypothesis and thus have no basis for choosing between the firms. Problem 4: Assume that the means and variances that you got from the columns apply to two independent random samples, each of size 80. If the sample size is very large, we can use method D1 with our values of the sample standard deviation replacing the population standard deviation. The formula table has the following formulas. Interval for Confidence Hypotheses Test Ratio Critical Value Interval Difference H 0 : D D0 * d cv D0 z d D d z 2 d d D0 z between Two H 1 : D D0 , d Means ( 12 22 D d 1 2 known) n n 1 2 d x1 x 2 sd z n1 80 n 2 80 x1 1.681 x 2 0.326 s12 s 22 n1 n 2 2.267 2 1.347 2 80 80 s1 2.267 s 2 1.347 d 1.355 0.08692 0.2948 d D0 1.355 0 4.596 Since this is a two-sided test, the ‘do not reject’ region is between sd 0.2948 z .025 1.960 . Since our computed t is not between these two values, reject the null hypothesis. Of course, we cannot force the computer to use a z test, but the results below produce an essentially identical p-value, since for the above, we have pvalue 2.5 P0 z 4.59 2.5 .5 0. MTB > TwoT 80 1.68071 2.26736 80 0.32636 1.34705. Two-Sample T-Test and CI Sample N Mean StDev SE Mean 1 80 1.68 2.27 0.25 2 80 0.33 1.35 0.15 Difference = mu (1) - mu (2) Estimate for difference: 1.35435 95% CI for difference: (0.77092, 1.93778) T-Test of difference = 0 (vs not =): T-Value = 4.59 0.000 DF = 128 P-Value = Note that since the p-value is not above the 5% significance level, we can reject the null hypothesis and thus have a basis for choosing between the firms. Notice the affect of the restrictiveness of the assumptions. The most restrictive assumption is assuming paired data. We got a p-value of .103.The assumption of equal variances is considerably less restrictive, and the p-value rose to .104. When we relaxed the assumption of equal variances, the p-value rose to .108. None of this is very impressive, but it does indicate that generally more restrictive assumptions seem to be yielding more powerful tests. Of course having 80 pairs of numbers instead of 22 trumps any assumptions and the last test, whether done using method D1 or, more correctly, using method D4 as the computer does, is much more powerful than the first three. A large part of the difference in power comes from the size of the denominators in the t ratio. There are three important rules governing variances. First, x1 , x 2 …. x n are independent, as they are if a sample is random, Var ( x1 x 2 x n ) Var ( x1 ) Var ( x 2 ) Var ( x n ) . Second, if x1 and x 2 are not independent Vard s d Var( x1 x 2 ) Var x1 Varx 2 2Covx1 , x 2 , where Covx1 , x 2 is a measure of the relationship between x1 and x 2 that is positive if the two variables tend to move together. 11 252solngr3-071 3/9/07 Note: this is true because x y 2 x 2 y 2 2 xy . Finally, Var(ax) a 2Var( x) . Since 1 di n variance d di n , but that each individual d in the sample has the same expected value (mean) and i Var dni Var dn Var 1n d 12 Vard n 12 Vard 1n Vard n n s d2 Var d 1 1 2 Var x1 Var x 2 Covx1 , x 2 . This indicates that s d for paired data will be smaller than s d for n n n independent samples where Covx1 , x 2 = 0. s12 s 22 1 1 and s d sˆ 2p where n1 n 2 n n It’s hard to say anything about the relative size of s d n 1s12 n 2 1s 22 sˆ p 1 n1 n 2 2 . As we have seen in the computer solutions to methods D2 and D3 above, if the sample sizes are equal, so that sˆ 2p s 2 s 22 s12 s 22 and s d 1 2 n 1 1 n n s 2 s 22 2 s2 s2 1 2 . That is s d will be the same for D2 and D3. Method D2 seems to gain 1 2 n n n power because of the larger numbers of degrees of freedom. In general for method D2 n 1s12 n 2 1s 22 sd 1 n1 n 2 2 n1 n 2 n1 n 2 n1 1n1 n 2 s12 n 2 1n1 n 2 s 22 n1 n 2 2n 2 n1 n1 n 2 2n1 n 2 This will give a s12 s2 and 2 are both less than one. However, a little n1 n2 experimentation shows that that is not the case. For example if n1 100 and n 2 50 smaller s d if the fractions multiplying sd 100 1150 s12 50 1150 s 22 148 50 n1 148 100 n 2 2.006 s12 s2 .4966 2 n1 n2 So that if we say n 2 n1 a sd n1 12n1 a s12 n1 a 12n1 a s 22 2n1 a 2n1 a n1 2n1 a 2n1 n 2 As a gets larger 2n1 a 2n1 a 2 n1 1 s12 n1 a 1 s 22 n1 a n1 n1 n2 n 1 n a 1 2n1 a will change very slowly but 1 will grow and 1 will shrink. 2n1 a 2 n1 a n1 The largest a is when n2 n1 a 2 or a n1 2 , n1 1 s12 n1 a 1 s 22 n1 a n1 n1 n2 large and the fraction multiplying n1 1 s12 1 s 22 2 n1 n1 n 2 2n1 a 2n1 a 2 n1 2 and n1 , so that the fraction multiplying s12 is extremely n1 s 22 is extremely small. n2 12