4/24/98 252x9842 - West Chester University's - On-line...

25
252solngr4-072 11/15/07 (Open this document in 'Page Layout' view!) Name Student Number: Class days and time: Please include this on what you hand in! Graded Assignment 4 The data set is part of a problem due to Groebner et. al.. 14 Testers were sent out to 3 branches of a Mexican fast-food chain (Store 1-3). Though the order of the visits was random, each tester visited each store once. They rated the restaurant on a number of characteristics and their ratings were totaled and shown. Only neat and legible papers with written answers in complete sentences will be read! Make sure that you have access to a copy of Excel with statistical functions enabled. To enable statistical functions, enter Excel and use the Tools pull-down menu. Select Add-Ins and check Analysis Tool Pack and MegaStat. This is available in Anderson. Tester Str 1 Str 2 Str 3 1 830 647 630 2 743 840 786 3 652 747 730 4 885 639 617 5 814 943 632 6 733 916 410 7 770 923 727 8 829 903 726 9 847 760 648 10 878 856 668 11 728 878 670 12 693 990 825 13 807 871 564 14 901 980 719 Do this problem in Excel as follows. Use columns A, B, C, D, and E on the Excel spreadsheet for data In the first row of Columns B, C, and D put in Str1, Str2, and Str3. Head column A with the word ‘Tester.’ Starting in Cell A2 Put in the letters 1 through 14 to identify the testers – unless, of course, you want to suggest some names. Now put in the data in columns B, C, and E, skipping column D If you bring this document into Word, the data can be moved into the Excel worksheet by highlighting the cells you want and copying and pasting. To fill column D in cell D2 write =E2. After your 'enter' this cell should read '630' Use the 'edit' pull-down menu and 'copy' cell D2

Transcript of 4/24/98 252x9842 - West Chester University's - On-line...

Page 1: 4/24/98 252x9842 - West Chester University's - On-line …courses.wcupa.edu/rbove/eco252/252solngr4-072.doc · Web viewWarning! Though I have used this procedure before, I haven’t

252solngr4-072 11/15/07 (Open this document in 'Page Layout' view!)

Name Student Number:Class days and time:Please include this on what you hand in!

Graded Assignment 4The data set is part of a problem due to Groebner et. al..14 Testers were sent out to 3 branches of a Mexican fast-food chain (Store 1-3). Though the order of the visits was random, each tester visited each store once. They rated the restaurant on a number of characteristics and their ratings were totaled and shown. Only neat and legible papers with written answers in complete sentences will be read! Make sure that you have access to a copy of Excel with statistical functions enabled. To enable statistical functions, enter Excel and use the Tools pull-down menu. Select Add-Ins and check Analysis Tool Pack and MegaStat. This is available in Anderson.

Tester Str 1 Str 2 Str 3 1 830 647 630 2 743 840 786 3 652 747 730 4 885 639 617 5 814 943 632 6 733 916 410 7 770 923 727 8 829 903 726 9 847 760 648 10 878 856 668 11 728 878 670 12 693 990 825 13 807 871 564 14 901 980 719

Do this problem in Excel as follows.Use columns A, B, C, D, and E on the Excel spreadsheet for data In the first row of Columns B, C, and D put in Str1, Str2, and Str3. Head column A with the word ‘Tester.’ Starting in Cell A2 Put in the letters 1 through 14 to identify the testers – unless, of course, you want to suggest some names.Now put in the data in columns B, C, and E, skipping column DIf you bring this document into Word, the data can be moved into the Excel worksheet by highlighting the cells you want and copying and pasting.To fill column D in cell D2 write =E2. After your 'enter' this cell should read '630'Use the 'edit' pull-down menu and 'copy' cell D2Use the 'edit' pull-down menu and ‘paste’ in cells E3 through E14 or use handle on lit-up cell. Now column D will be identical to E except for the heading. This can also be done as a simple copy and paste. Save your data as rating1.xls

Version A – One-way ANOVAUse the 'tools' pull-down menu and pick ‘data analysis.' (If you cannot find this, use Tools and Add-Ins to put in the analysis packs.)Pick 'ANOVA: Single Factor. Set input range to $B$1:$D$15. Select 'New worksheet ply' and ‘columns’, check 'labels in first row' hit 'OK' and save your results as rreslt1.xls. Version B – Two-way ANOVAIn order to check for the effect of the fact that the data is blocked by employees, repeat the analysis using ‘ANOVA: Two-Factor without replication. Set input range to $A$1:$D$15, check ‘labels,’ and save your results as rreslt2.xlsAnswer the following: Is there a significant difference between the store ratings? How is this conclusion affected by blocking by testers? Cite p-values and /or F-testsVersion C – One way ANOVA

Page 2: 4/24/98 252x9842 - West Chester University's - On-line …courses.wcupa.edu/rbove/eco252/252solngr4-072.doc · Web viewWarning! Though I have used this procedure before, I haven’t

252grass4-072

Take the last digit of your student number (if it's zero, use 10). Go back to your original data or use the 'file' pull-down menu to open rating1.xls. To fill column D this time in cell D2 write =E2+x, replacing x with the last digit of your student number.Use the 'edit' pull down menu and 'copy' cell D2Use the 'edit' pull down menu and ‘paste’ in cells D3 through D14. Now column D will be more than the original D by the amount of your value of x. Save your data as rating3.xls. Relabel the column as Str 3yy, where yy is 01 – 10, depending on what you added to the column.Run the one-way ANOVA again and save your results as rreslt3.xls

Submit the data and results with your Student number. The most effective way to do this is to paste the results into a Word document and then add neat hand or typed notes. Indicate what hypotheses were tested, what the p-value was and whether, using the p-value, you would reject the null if (i) the significance level was 5% and (ii) the significance level was 10%, explaining why. You will have two answers for each of your two problems.For your Version C do a Scheffe confidence interval and a Tukey-Kramer interval or procedure for each of the possible differences between means and report which are different at the 5% level according to each of the 2 methods.

Extra Credit: 1) Show that you learned something from computer problem 2 by doing part B on Minitab. There should be very little difference in your result.The easiest way to do this is to copy the first five columns from the original Excel spreadsheet. Enter Minitab and use ‘editor’ to enable commands. Highlight the column labels and cells 1-14 of the first five columns. Remember that your column labels should be written in above the columns (Put row labels in column 1). Just to make sure that you are in the right place. Try the following Minitab commands.

print c1-c4AOVO c2-c4;Tukey 5;Fisher 5.

You should get results equivalent to your first ANOVA but with individual and Tukey intervals done for you.To set up for a 2-way ANOVA stack your data in columns 11 and 12.

Stack c2 c3 c4 c11;Subscripts c12 ;UseNames.

To move the row labels, copy the labels from column 1 to column 13. Label column 11-13 ‘Rating,’ ‘Store’ and ‘Tester1.’ Every number should now have a correct row label. Use the table commands from computer assignment 2 to check your data. I combined the ANOVA, and the table of means command by using the following.

Twoway c11 c13 c12;Means c13 c12.

2) Take the data from your last ANOVA. Use the instructions in 1) above to copy it into the Minitab spreadsheet and perform Levene and Bartlett tests on it using the third example in 252mvarex as a pattern for your calculations using Minitab. Make sure that you explain what is being tested and what you conclude. There are two ways to do this. If you want to do it on the unstacked data use the following.

Vartest c2-c4;Unstacked.

To do the tests on the stacked data use the following. Save and layout your graphs.Vartest c11 c12.

You should also test the columns for Normality. The Lilliefors test for column 2 would be the following.NormTest c2;KSTest.

2

Page 3: 4/24/98 252x9842 - West Chester University's - On-line …courses.wcupa.edu/rbove/eco252/252solngr4-072.doc · Web viewWarning! Though I have used this procedure before, I haven’t

252grass4-072

Now answer the following. What requirements must your individual columns meet for ANOVA to be valid? What evidence do you have that these requirements were met?

Extra Extra Credit: Do Bartlett and Levene tests ‘by hand’ using the examples in 252mvar as your pattern. This is an awful lot of work unless you cheat and use the computer. If you cover your tracks, I’ll never know. To do the Bartlett test you need logarithms of variances. Label Columns 10-12 ‘stdev,’ ‘var’ and ‘log.’ Use the data that you already have in four columns in Minitab c2-c5 (labels in c1) and get the variances as follows:

name k2 ‘stdv1’ name k3 ‘stdv2’name k4 ‘stdv3’stdev c2 k2 stdev c3 k3 stdev c4 k4 print k2-k5 #These are the standard deviations of the columns.stack k2-k4 c6let c7 = c6 * c6 #Now you have variances. Label c7 ‘Vars’let c8 = logten(c7)let k7= mean(c7) #This is the pooled variance when you have equal sized samples.let k8 = logten(k7)print k7 – k8print c6 – c8.

Now you are on your own. The rest of this should be pretty easy because all your s are equal. Warning! Though I have used this procedure before, I haven’t had time to check these results out. Tune in tomorrow.

The Levene test looks longer, but should be much more familiar and perhaps easier to fake.Copy columns 1 through 4 to c14-c17. You might want to label them as ‘Tester*,’ Str1*’ etc. Then find their medians and subtract them from the columns and convert the columns to absolute values.

name k15 ‘med1’ name k16 ‘med2’name k17 ‘med3’let k15 = median(c15)let k16 = median(c16)let k17 = median (c17)let c15 = c15- k15let c16 = c16- k16let c17 = c24 – k17describe c15 – c17 #All the columns should have zero medians now.print c14 – c17let c15 = absolute(c15)let c16 = absolute(c16)let c17 = absolute(c17)

#You are now ready for an ANOVA using:AOVO c15-c17 #You should get the same p-value as you got for the first Levene test

# that you did.

3

Page 4: 4/24/98 252x9842 - West Chester University's - On-line …courses.wcupa.edu/rbove/eco252/252solngr4-072.doc · Web viewWarning! Though I have used this procedure before, I haven’t

252grass4-072

ResultsVersion A – One-way ANOVA

Use the 'tools' pull-down menu and pick ‘data analysis.' (If you cannot find this, use Tools and Add-Ins to put in the analysis packs.)Pick 'ANOVA: Single Factor. Set input range to $B$1:$D$15. Select 'New worksheet ply' and ‘columns’, check 'labels in first row' hit 'OK' and save your results as rreslt1.xls. Data for 1st and 2nd ANOVA Tester

Str 1

Str 2

Str 3  

1 830 647 630 6302 743 840 786 7863 652 747 730 7304 885 639 617 6175 814 943 632 6326 733 916 410 4107 770 923 727 7278 829 903 726 7269 847 760 648 648

10 878 856 668 66811 728 878 670 67012 693 990 825 82513 807 871 564 56414 901 980 719 719

Results for 1st ANOVA Anova: Single Factor

SUMMARYGroups Count Sum Average Variance

Str 1 14 11110 793.5714 5715.495 Str 2 14 11893 849.5 12572.27 Str 3 14 9352 668 10383.69

ANOVASource of Variation SS df MS F P-value F crit

Between Groups 241912.7 2 120956.4 12.656115.81E-

05 3.238096Within Groups 372728.9 39 9557.152

Total 614641.6 41        

4

Page 5: 4/24/98 252x9842 - West Chester University's - On-line …courses.wcupa.edu/rbove/eco252/252solngr4-072.doc · Web viewWarning! Though I have used this procedure before, I haven’t

252grass4-072

Version B – Two-way ANOVAIn order to check for the effect of the fact that the data is blocked by employees, repeat the analysis using ‘ANOVA: Two-Factor without replication. Set input range to $A$1:$D$14, check ‘labels,’ and save your results as rreslt2.xlsResults for 2 nd ANOVA First null hypothesis to be tested -

Second null hypothesis to be tested - Anova: Two-Factor Without Replication

SUMMARY Count Sum Average Variance1 3 2107 702.3333 12296.332 3 2369 789.6667 2362.3333 3 2129 709.6667 2566.3334 3 2141 713.6667 22137.335 3 2389 796.3333 24414.336 3 2059 686.3333 65642.337 3 2420 806.6667 10612.338 3 2458 819.3333 7902.3339 3 2255 751.6667 9952.333

10 3 2402 800.6667 13321.3311 3 2276 758.6667 11521.3312 3 2508 836 2214313 3 2242 747.3333 26232.3314 3 2600 866.6667 17914.33

Str 1 14 11110 793.5714 5715.495 Str 2 14 11893 849.5 12572.27 Str 3 14 9352 668 10383.69

ANOVASource of Variation SS df MS F P-value F crit

Rows 116605 13 8969.614 0.910536 0.554751 2.119166Columns 241912.7 2 120956.4 12.27868 0.000176 3.369016Error 256124 26 9850.921

Total 614641.6 41        

Answer the following: Is there a significant difference between the store ratings? How is this conclusion affected by blocking by testers? Cite p-values and /or F-tests.

Answer: In the first ANOVA we get a p-value of .0000581. Since this is below any significance level we are likely to use, we reject the null hypothesis that the mean rating is the same for all stores. In the second ANOVA, the p-value for columns (.000176) is still very low, so we again reject the original null hypothesis. Note that the p-value for rows is 0.554751, which is above any significance level we might care to use. The null hypothesis that row (tester) means are equal cannot be rejected, so we conclude that there is no significant difference between testers.

5

Page 6: 4/24/98 252x9842 - West Chester University's - On-line …courses.wcupa.edu/rbove/eco252/252solngr4-072.doc · Web viewWarning! Though I have used this procedure before, I haven’t

252grass4-072

Version C – One way ANOVATake the last digit of your student number (if it's zero, use 10). Go back to your original data or use the 'file' pull-down menu to open rating1.xls. To fill column D this time in cell D2 write =E2+x, replacing x with the last digit of your student number.Use the 'edit' pull down menu and 'copy' cell D2Use the 'edit' pull down menu and ‘paste’ in cells D3 through D14. Now column D will be more than the original D by the amount of your value of x. Save your data as rating3.xls. Relabel the column as Str 3yy, where yy is 01 – 10, depending on what you added to the column.Run the one-way ANOVA again and save your results as rreslt3.xlsData for 3rd ANOVA . I added 5

Tester

Str 1

Str 2

Str 305

 

1 830 647 635 6302 743 840 791 7863 652 747 735 7304 885 639 622 6175 814 943 637 6326 733 916 415 4107 770 923 732 7278 829 903 731 7269 847 760 653 648

10 878 856 673 66811 728 878 675 67012 693 990 830 82513 807 871 569 56414 901 980 724 719

Results for 3rd ANOVAAnova: Single Factor

SUMMARYGroups Count Sum Average Variance

Str 1 14 11110 793.5714 5715.495 Str 2 14 11893 849.5 12572.27Str 305 14 9422 673 10383.69

ANOVASource of Variation SS df MS F P-value F crit

Between Groups 227816 2 113908 11.918629.13E-

05 3.238096Within Groups 372728.9 39 9557.152

Total 600545 41        

In this ANOVA we get a p-value of .000091862. Since this is below any significance level we are likely to use, we reject the null hypothesis that the mean rating is the same for all stores.

6

Page 7: 4/24/98 252x9842 - West Chester University's - On-line …courses.wcupa.edu/rbove/eco252/252solngr4-072.doc · Web viewWarning! Though I have used this procedure before, I haven’t

252grass4-072

Submit the data and results with your Student number. The most effective way to do this is to paste the results into a Word document and then add neat hand or typed notes. Indicate what hypotheses were tested, what the p-value was and whether, using the p-value, you would reject the null if (i) the significance level was 5% and (ii) the significance level was 10%, explaining why. You will have two answers for each of your two problems.For your Version C do a Scheffé confidence interval and a Tukey-Kramer interval or procedure for each of the possible differences between means and report which are different at the 5% level according to each of the 2 methods.

Confidence Intervals from the OutlineFor completeness, I have included the individual confidence interval as well as the Tukey and Scheffé.In the problem there are a total of observations in columns.

Individual Confidence Interval If we desire a single interval, we use the formula for the difference between two means when the variance is known. For example, if we want the difference between means of column 1 and column 2.

, where .

Scheffé Confidence IntervalIf we desire intervals that will simultaneously be valid for a given confidence level for all possible

intervals between column means, use .

Tukey Confidence IntervalThis also applies to all possible differences.

. This gives rise to Tukey’s HSD (Honestly Significant

Difference) procedure. Two sample means and are significantly different if is greater

than

The Confidence Intervals from the data

From the Excel output,

and . Assume . ,

and . Note that the Excel output tells us that , which should be more accurate than the table value that I used. The contrasts follow.

Individual:

Scheffé:

7

Page 8: 4/24/98 252x9842 - West Chester University's - On-line …courses.wcupa.edu/rbove/eco252/252solngr4-072.doc · Web viewWarning! Though I have used this procedure before, I haven’t

252grass4-072

Tukey:

Individual:

Scheffé:

Tukey:

Individual:

Scheffé:

Tukey:

Conclusion: I have included individual confidence levels here for completeness. The analysis of variance definitely tells us that the means are not the same, regardless of the significance level we might want to use, because the p-value is microscopic. If we compare the differences in sample means using either of

8

Page 9: 4/24/98 252x9842 - West Chester University's - On-line …courses.wcupa.edu/rbove/eco252/252solngr4-072.doc · Web viewWarning! Though I have used this procedure before, I haven’t

252grass4-072

the two methods requested, we find that there is no difference between the means for stores 1 and 2, but that store 3 is significantly different from the other two stores. The contrasts (intervals) are labeled for not significant and for significant depending on whether the error part of the interval is larger or smaller than the difference between sample means.

9

Page 10: 4/24/98 252x9842 - West Chester University's - On-line …courses.wcupa.edu/rbove/eco252/252solngr4-072.doc · Web viewWarning! Though I have used this procedure before, I haven’t

252grass4-072

Extra Credit: 1) Show that you learned something from computer problem 2 by doing part B on Minitab. There should be very little difference in your result. Comments are in red.

The easiest way to do this is to copy the first five columns from the original Excel spreadsheet. Enter Minitab and use ‘editor’ to enable commands. Highlight the column labels and cells 1-14 of the first five columns. Remember that your column labels should be written in above the columns (Put row labels in column 1). Just to make sure that you are in the right place. Try the following Minitab commands.

print c1-c4AOVO c2-c4;Tukey 5;Fisher 5.

You should get results equivalent to your first ANOVA but with individual and Tukey intervals done for you.To set up for a 2-way ANOVA stack your data in columns 11 and 12.

Stack c2 c3 c4 c11;Subscripts c12 ;UseNames.

To move the row labels, copy the labels from column 1 to column 13. Label column 11-13 ‘Rating,’ ‘Store’ and ‘Tester1.’ Every number should now have a correct row label. Use the table commands from computer assignment 2 to check your data. I combined the ANOVA, and the table of means command by using the following.

Twoway c11 c13 c12;Means c13 c12.

Output:————— 11/5/2007 9:42:54 PM ———————————————————— Welcome to Minitab, press F1 for help.MTB > WOpen "C:\Documents and Settings\RBOVE\My Documents\Minitab\2gr3-072-00.MTW".Retrieving worksheet from file: 'C:\Documents and Settings\RBOVE\MyDocuments\Minitab\2gr3-072-00.MTW'Worksheet was saved on Mon Nov 05 2007Results for: 2gr3-072-00.MTWMTB > erase c11-c100Results for: 2gr3-072-01.MTWMTB > WSave "C:\Documents and Settings\RBOVE\My Documents\Minitab\2gr3-072-01.MTW";SUBC> Replace.Saving file as: 'C:\Documents and Settings\RBOVE\MyDocuments\Minitab\2gr3-072-01.MTW'

MTB > print c1-c4Data Display Here is the input data in column form.Row Tester Str1 Str2 Str3 1 1 830 647 630 2 2 743 840 786 3 3 652 747 730 4 4 885 639 617 5 5 814 943 632 6 6 733 916 410 7 7 770 923 727 8 8 829 903 726 9 9 847 760 648 10 10 878 856 668 11 11 728 878 670 12 12 693 990 825 13 13 807 871 564 14 14 901 980 719

10

Page 11: 4/24/98 252x9842 - West Chester University's - On-line …courses.wcupa.edu/rbove/eco252/252solngr4-072.doc · Web viewWarning! Though I have used this procedure before, I haven’t

252grass4-072

MTB > AOVO c2-c4;SUBC> tukey 5;SUBC> fisher 5.One-way ANOVA: Str1, Str2, Str3 Source DF SS MS F PFactor 2 241913 120956 12.66 0.000 The low p-value means that the null hypothesis Error 39 372729 9557 of equal column means has been rejected.Total 41 614642S = 97.76 R-Sq = 39.36% R-Sq(adj) = 36.25%

Individual 95% CIs For Mean Based on Pooled StDevLevel N Mean StDev ---+---------+---------+---------+------Str1 14 793.57 75.60 (-----*------)Str2 14 849.50 112.13 (-----*------)Str3 14 668.00 101.90 (------*-----) ---+---------+---------+---------+------ 640 720 800 880Pooled StDev = 97.76

Tukey 95% Simultaneous Confidence IntervalsAll Pairwise ComparisonsIndividual confidence level = 98.06%

Str1 subtracted from: Lower Center Upper --------+---------+---------+---------+-Str2 -34.21 55.93 146.07 (-----*-----)Str3 -215.71 -125.57 -35.43 (-----*-----) --------+---------+---------+---------+- -150 0 150 300Str2 subtracted from: Lower Center Upper --------+---------+---------+---------+-Str3 -271.64 -181.50 -91.36 (-----*-----) --------+---------+---------+---------+- -150 0 150 300

Fisher 95% Individual Confidence IntervalsAll Pairwise ComparisonsSimultaneous confidence level = 87.98%Str1 subtracted from: Lower Center Upper -------+---------+---------+---------+--Str2 -18.81 55.93 130.67 (----*----)Str3 -200.31 -125.57 -50.83 (----*----) -------+---------+---------+---------+-- -150 0 150 300

Str2 subtracted from: Lower Center Upper -------+---------+---------+---------+--Str3 -256.24 -181.50 -106.76 (----*----) -------+---------+---------+---------+-- -150 0 150 300MTB > stack c2 c3 c4 c11;SUBC> subscripts c12;SUBC> UseNames.MTB > print c11 c12 c13Data Display Row rating store tester1 This is just to show you what the data looks like in stacked form.

11

Page 12: 4/24/98 252x9842 - West Chester University's - On-line …courses.wcupa.edu/rbove/eco252/252solngr4-072.doc · Web viewWarning! Though I have used this procedure before, I haven’t

252grass4-072

1 830 Str1 1 2 743 Str1 2 3 652 Str1 3 4 885 Str1 4 5 814 Str1 5 6 733 Str1 6 7 770 Str1 7 8 829 Str1 8 9 847 Str1 9 10 878 Str1 10 11 728 Str1 11 12 693 Str1 12 13 807 Str1 13 14 901 Str1 14 15 647 Str2 1 16 840 Str2 2 17 747 Str2 3 18 639 Str2 4 19 943 Str2 5 20 916 Str2 6 21 923 Str2 7 22 903 Str2 8 23 760 Str2 9 24 856 Str2 10 25 878 Str2 11 26 990 Str2 12 27 871 Str2 13 28 980 Str2 14 29 630 Str3 1 30 786 Str3 2 31 730 Str3 3 32 617 Str3 4 33 632 Str3 5 34 410 Str3 6 35 727 Str3 7 36 726 Str3 8 37 648 Str3 9 38 668 Str3 10 39 670 Str3 11 40 825 Str3 12 41 564 Str3 13 42 719 Str3 14

MTB > table c13 c12;SUBC> data rating.Tabulated statistics: tester1, store Rows: tester1 Columns: store This is just a printout of data by cell. Because it was done Str1 Str2 Str3 by cell there were big blanks between each line. I edited 1 830 647 630 them out.2 743 840 7863 652 747 7304 885 639 6175 814 943 6326 733 916 4107 770 923 7278 829 903 7269 847 760 64810 878 856 66811 728 878 67012 693 990 82513 807 871 56414 901 980 719

12

Page 13: 4/24/98 252x9842 - West Chester University's - On-line …courses.wcupa.edu/rbove/eco252/252solngr4-072.doc · Web viewWarning! Though I have used this procedure before, I haven’t

252grass4-072

Cell Contents: rating : DATA

MTB > twoway c11 c13 c12; SUBC> means c13 c12.Two-way ANOVA: rating versus tester1, store Source DF SS MS F P So here is our 2-way ANOVA. The firsttester1 13 116605 8970 0.91 0.555 test tells us that equality of tester means is not store 2 241913 120956 12.28 0.000 rejected. The low p-value in the second test Error 26 256124 9851 tells us that we can reject the hypothesis of Total 41 614642 equal store means.S = 99.25 R-Sq = 58.33% R-Sq(adj) = 34.29% Individual 95% CIs For Mean Based on Pooled StDevtester1 Mean ---+---------+---------+---------+------ 1 702.333 (---------*--------) 2 789.667 (---------*---------) 3 709.667 (---------*---------) 4 713.667 (--------*---------) 5 796.333 (--------*---------) 6 686.333 (---------*---------) 7 806.667 (---------*---------) 8 819.333 (---------*---------) 9 751.667 (---------*--------)10 800.667 (---------*---------)11 758.667 (---------*---------)12 836.000 (---------*--------)13 747.333 (---------*---------)14 866.667 (---------*---------) ---+---------+---------+---------+------ 600 720 840 960

Individual 95% CIs For Mean Based on Pooled StDevstore Mean ---+---------+---------+---------+------Str1 793.571 (------*------)Str2 849.500 (------*------)Str3 668.000 (------*-----) ---+---------+---------+---------+------ 640 720 800 880

13

Page 14: 4/24/98 252x9842 - West Chester University's - On-line …courses.wcupa.edu/rbove/eco252/252solngr4-072.doc · Web viewWarning! Though I have used this procedure before, I haven’t

252grass4-072

2) Take the data from your last ANOVA. Use the instructions in 1) above to copy it into the Minitab spreadsheet and perform Levene and Bartlett tests on it using the third example in 252mvarex as a pattern for your calculations using Minitab. Make sure that you explain what is being tested and what you conclude. There are two ways to do this. If you want to do it on the unstacked data use the following.

Vartest c2-c4;Unstacked.

To do the tests on the stacked data use the following. Save and layout your graphs.Vartest c11 c12.

You should also test the columns for Normality. The Lilliefors test for column 2 would be the following.NormTest c2;KSTest.

Now answer the following. What requirements must your individual columns meet for ANOVA to be valid? What evidence do you have that these requirements were met?

MTB > vartest c2-c4;SUBC> unstacked.Test for Equal Variances: Str1, Str2, Str3 95% Bonferroni confidence intervals for standard deviations N Lower StDev UpperStr1 14 51.2792 75.601 137.075Str2 14 76.0538 112.126 203.300Str3 14 69.1178 101.900 184.759

Bartlett's Test (normal distribution) The only thing that we really need here is the BartlettTest statistic = 1.97, p-value = 0.373 test, assuming that our test for Normality yields a Levene's Test (any continuous distribution) Normal distribution. The high p-value forTest statistic = 0.43, p-value = 0.654 The null hypothesis of equal variances.Test for Equal Variances: Str1, Str2, Str3 means that it cannot be rejected.

A graph followed. I saved it for later.MTB > vartest c11 c12. Same test on stacked data.Test for Equal Variances: rating versus store 95% Bonferroni confidence intervals for standard deviationsstore N Lower StDev Upper Str1 14 51.2792 75.601 137.075 Str2 14 76.0538 112.126 203.300 Str3 14 69.1178 101.900 184.759

Bartlett's Test (normal distribution)Test statistic = 1.97, p-value = 0.373Levene's Test (any continuous distribution)Test statistic = 0.43, p-value = 0.654Test for Equal Variances: rating versus store

MTB > normtest c2; I had to run the test three times to get each column.SUBC> KStest.Probability Plot of Str1

MTB > normtest c3;SUBC> KStest.Probability Plot of Str2

MTB > normtest c4;SUBC> KStest.Probability Plot of Str3 This time I needed the graphs. They follow.

14

Page 15: 4/24/98 252x9842 - West Chester University's - On-line …courses.wcupa.edu/rbove/eco252/252solngr4-072.doc · Web viewWarning! Though I have used this procedure before, I haven’t

252grass4-072

All the p-values are above 15% so our null hypotheses of Normality are not rejected. Individual columns in ANOVA should be from Normal distrubutions with equal variances. We have shown that these are both Normal and have equal variances.

Extra Extra Credit: Do Bartlett and Levene tests ‘by hand’ using the examples in 252mvar as your pattern. This is an awful lot of work unless you cheat and use the computer. If you cover your tracks, I’ll never know. To do the Bartlett test you need logarithms of variances. Label Columns 10-12 ‘stdev,’ ‘var’ and ‘log.’ Use the data that you already have in four columns in Minitab c2-c5 (labels in c1) and get the variances as follows:

name k2 ‘stdv1’ name k3 ‘stdv2’name k4 ‘stdv3’stdev c2 k2 stdev c3 k3 stdev c4 k4 print k2-k5 #These are the standard deviations of the columns.stack k2-k4 c6let c7 = c6 * c6 #Now you have variances. Label c7 ‘Vars’let c8 = logten(c7)let k7= mean(c7) #This is the pooled variance when you have equal sized samples.let k8 = logten(k7)print k7 – k8print c6 – c8.

Now you are on your own. The rest of this should be pretty easy because all your s are equal. Warning! Though I have used this procedure before, I haven’t had time to check these results out. Tune in tomorrow.MTB > name k2 'stdv1' We are computing standard deviations of theMTB > name k3 'stdv2' columns and storing them as the Minitab constantsMTB > name k4 'stdv3' k2, k3 and k4. We actually want variances.

15

Page 16: 4/24/98 252x9842 - West Chester University's - On-line …courses.wcupa.edu/rbove/eco252/252solngr4-072.doc · Web viewWarning! Though I have used this procedure before, I haven’t

252grass4-072

MTB > stdev c2 k2Standard Deviation of Str1 Standard deviation of Str1 = 75.6009

MTB > stdev c3 k3Standard Deviation of Str2 Standard deviation of Str2 = 112.126

MTB > stdev c4 k4 Standard Deviation of Str3 Standard deviation of Str3 = 101.900

MTB > print k2-k4Data Display stdv1 75.6009stdv2 112.126stdv3 101.900

MTB > stack k2-k4 c6 We put the standard deviations in C6 and squaredMTB > let c7 = c6*c6 them to get variances.MTB > let k7 = mean(c7)MTB > let k8 = logten (k7)MTB > let c8 = logten(c7)MTB > print k7-k8Data Display K7 9557.15 I should have labeled K7 ‘meansdssq’K8 3.98033 I should have labeled K8 ‘logmean’

MTB > print c6-c8Data Display Row C6 vars C8 I should have labeled C6 ‘stdev’ 1 75.601 5715.5 3.75705 I should have labeled C8 ‘logsdsq’ 2 112.126 12572.3 4.09941 Now you are on your own. I finished this but I’ll bet that 3 101.900 10383.7 4.01635 no one actually did the Bartlett test.Bartlett Test computations: From the computations above we have

and .

= 9557.15

Note that the denominator can be written as . The test statistic used is

where

16

Page 17: 4/24/98 252x9842 - West Chester University's - On-line …courses.wcupa.edu/rbove/eco252/252solngr4-072.doc · Web viewWarning! Though I have used this procedure before, I haven’t

252grass4-072

This is not identical to the Bartlett test above, but it’s

close.

This has degrees of freedom and the chi-squared table says that 5.9915. Since

our computed chi-squared is less than the table chi-square, do not reject the null hypothesis.

The Levene test looks longer, but should be much more familiar and perhaps easier to fake.Copy columns 1 through 4 to c14-c17. You might want to label them as ‘Tester*,’ Str1*’ etc. Then find their medians and subtract them from the columns and convert the columns to absolute values.

name k15 ‘med1’ name k16 ‘med2’name k17 ‘med3’let k15 = median(c15)let k16 = median(c16)let k17 = median (c17)let c15 = c15- k15let c16 = c16- k16let c17 = c24 – k17describe c15 – c17 #All the columns should have zero medians now.print c14 – c17let c15 = absolute(c15)let c16 = absolute(c16)let c17 = absolute(c17)

#You are now ready for an ANOVA using:AOVO c15-c17 #You should get the same p-value as you got for the first Levene test

# that you did.MTB > name k15 'med1'MTB > name k16 'med2'MTB > name k17 'med3'MTB > let c14 = c1MTB > let c15 = c2MTB > let c16 = c3 I copied my original data into C14 – C17.MTB > let c17 = c4MTB > let k15 = median (c15)MTB > let k16 = median (c16)MTB > let k17 = median(c17)MTB > let c15 = c15-k15 I subtracted the median from each column.MTB > let c16 = c16-k16MTB > let c17 = c17-k17MTB > describe c15-c17Descriptive Statistics: Str1*, Str2*, Str3* I’m checking for a median of zero.Variable N N* Mean SE Mean StDev Minimum Q1 Median Q3 MaximumStr1* 14 0 -16.9 20.2 75.6 -158.5 -78.8 0.0 44.3 90.5Str2* 14 0 -25.0 30.0 112.1 -235.5 -117.8 0.0 53.5 115.5

17

Page 18: 4/24/98 252x9842 - West Chester University's - On-line …courses.wcupa.edu/rbove/eco252/252solngr4-072.doc · Web viewWarning! Though I have used this procedure before, I haven’t

252grass4-072

Str3* 14 0 -1.0 27.2 101.9 -259.0 -42.3 0.0 58.8 156.0

MTB > print c14-c17Data Display Here is my data after subtracting the medians. Row tester2 Str1* Str2* Str3* 1 1 19.5 -227.5 -39 2 2 -67.5 -34.5 117 3 3 -158.5 -127.5 61 4 4 74.5 -235.5 -52 5 5 3.5 68.5 -37 6 6 -77.5 41.5 -259 7 7 -40.5 48.5 58 8 8 18.5 28.5 57 9 9 36.5 -114.5 -21 10 10 67.5 -18.5 -1 11 11 -82.5 3.5 1 12 12 -117.5 115.5 156 13 13 -3.5 -3.5 -105 14 14 90.5 105.5 50

MTB > let c15 = abs(c15) Now we take absolute values of our columns and print. MTB > let c16 = abs(c16)MTB > let c17 = abs(c17)MTB > print c15-c17Data Display Row Str1* Str2* Str3* 1 19.5 227.5 39 2 67.5 34.5 117 3 158.5 127.5 61 4 74.5 235.5 52 5 3.5 68.5 37 6 77.5 41.5 259 7 40.5 48.5 58 8 18.5 28.5 57 9 36.5 114.5 21 10 67.5 18.5 1 11 82.5 3.5 1 12 117.5 115.5 156 13 3.5 3.5 105 14 90.5 105.5 50

MTB > AOVO c15-c17 We now do an ordinary 1-way ANOVA.One-way ANOVA: Str1*, Str2*, Str3* Source DF SS MS F PFactor 2 3544 1772 0.43 0.654 Since the p-value is above any significance Error 39 161199 4133 level that we might use, we cannot reject

18

Page 19: 4/24/98 252x9842 - West Chester University's - On-line …courses.wcupa.edu/rbove/eco252/252solngr4-072.doc · Web viewWarning! Though I have used this procedure before, I haven’t

252grass4-072

Total 41 164743 the null hypothesis of equal variances.S = 64.29 R-Sq = 2.15% R-Sq(adj) = 0.00% Note that the F and p-value are identical to the

results of the previous Levine test. Individual 95% CIs For Mean Based on Pooled StDevLevel N Mean StDev ---------+---------+---------+---------+Str1* 14 61.29 44.49 (-------------*------------)Str2* 14 83.79 75.40 (-------------*------------)Str3* 14 72.43 68.81 (-------------*-------------) ---------+---------+---------+---------+ 50 75 100 125Pooled StDev = 64.29

MTB > Save "C:\Documents and Settings\RBOVE\My Documents\Minitab\2gr3-072-01.MTW";SUBC> Replace.Saving file as: 'C:\Documents and Settings\RBOVE\MyDocuments\Minitab\2gr3-072-01.MTW'Existing file replaced. Game over.

19