New User Special Price Expires in

Let's log you in.

Sign in with Facebook


Don't have a StudySoup account? Create one here!


Create a StudySoup account

Be part of our community, it's free to join!

Sign up with Facebook


Create your account
By creating an account you agree to StudySoup's terms and conditions and privacy policy

Already have a StudySoup account? Login here


by: Clyde McLaughlin II

StatisticalInferenceII STAT3503

Clyde McLaughlin II

GPA 3.83


Almost Ready


These notes were just uploaded, and will be ready to view shortly.

Purchase these notes here, or revisit this page.

Either way, we'll remind you when they're ready :)

Preview These Notes for FREE

Get a free preview of these Notes, just enter your email below.

Unlock Preview
Unlock Preview

Preview these materials now for free

Why put in your email? Get access to more of this material and other relevant free materials for your school

View Preview

About this Document

Class Notes
25 ?




Popular in Course

Popular in Statistics

This 0 page Class Notes was uploaded by Clyde McLaughlin II on Monday November 2, 2015. The Class Notes belongs to STAT3503 at California State University - East Bay taught by YanyanZhou in Fall. Since its upload, it has received 11 views. For similar materials see /class/234382/stat3503-california-state-university-east-bay in Statistics at California State University - East Bay.


Reviews for StatisticalInferenceII


Report this Material


What is Karma?


Karma is the currency of StudySoup.

You can buy or earn more Karma at anytime and redeem it for class notes, study guides, flashcards, and more!

Date Created: 11/02/15
Minitab Notes for STAT 3503 Dept of Statistics CSU Hayward Unit 4 Block Designs as a Generalization of Paired tTests 41 The Data Insurance adjusters took each of 15 damaged automobiles to both Garage 1 and Garage 2 obtaining estimates for repair at each garage These two garages are of particular interest because they have reputations for doing good work and they are conveniently located Data are estimated repair costs in hundreds of dollars The issue is whether one of the garages tends to give higher bids than the other Bids in 100 For Repairing 15 Damaged Automobiles Garage 1 Garage 2 76 73 102 91 95 84 13 15 30 27 63 58 53 49 62 53 22 20 48 42 113 110 121 110 69 61 76 67 84 75 Note The data as shown below are from Table 66 of Ott An Introduction to Statistical Methods and Data Analysis 4th ed page 292 These data appear in the 5th edition by Ott and Longnecker in Table 660 page 300 but in modified form The modification is that 10 that is 1000 has been added to each observation presum ably to re ect in ation in auto repair costs It is useful to consider which computations are changed by this modifications and which are not see problem 454 We do not know whether the original data above are real or contrived it seems clear that the modified data are not real These are quotpairedquot data each row of the data table shows two bids on the same car The two columns are not independent a heavily damaged car as in rows 11 and 12 will be expensive to repair at either garage and a car with relatively minor damage as in row 4 will receive a lower bid at both Minitab Notes for STAT 3503 Unit 4 2 Problems 411 This problem deals with preparation of the data for exploration and analysis a Label c1 and c2 of a Minitab worksheet as Garl and Gar 2 respectively Then cut these data from Word or your browser and paste them into c1 and c2 When pasting put the cursor in the rst row of c1 use spaces as delimiters b Anticipating our work in the next section put the differences in bids into c3 labeled Diff CALC Egt Calculator results in c3 expression cl c2 MTB gt let c3 cl 02 c Print the results to the Session Window and verify that they are correct Your output should be similar to that shown below except that the display shown here has been edited into three panels for more compact display DATA igt Display Data menu called quotMANTPH before MTB 14 MTB gt print cl c3 ROW Garl Gar2 Diff ROW Garl Gar2 Diff ROW Garl Gar2 Diff 1 76 73 03 6 63 58 0 5 11 113 110 03 2 102 91 11 7 53 49 0 4 12 121 110 11 3 95 84 11 8 62 53 0 9 13 69 6 1 08 4 13 15 02 9 22 20 0 2 14 76 67 09 5 30 27 03 10 48 42 0 6 15 84 75 09 412 Suppose that you have 30 randomly chosen damaged cars available How could this experiment have been designed in order to produce data that are not paired Rewrite the rst sentence of this section above the data to indicate the experimental procedure you have in mind to produce two independent columns of data Which design paired or independent do you think is best for the purpose at hand and why 413 Return now to the original paireddata experiment It can be viewed as a twofactor experiment One factor is Garage and the other is Car In Units 1 and 2 we dealt with xed factors the levels of which are determined to be of particular interest to the experimenters For example the three levels of type of hot dogs in Unit 2 were Beef Meat and Poultry In Unit 3 we dealt with a random factor in which the levels were four randomly chosen batches The individual batches are of interest only insofar as they may re ect random batchtobatch variability In the current experiment one of the factors is xed and the other is random Which is the xed factor which is the random factor and why 42 Descriptive Techniques Separate dotplots for the two repair shops mainly show the high variability among the 15 cars as to the amount of damage to be repaired But a comparison of the two dotplots shows no important difference between the garages This graphical comparison is ineffective partly because we do not know which dot in one plot compares to which dot in the other the paired nature of the data is obscured GRAPH Egt Character 9 Dotplot same scale MTB gt gstd MTB gt dotp cl 02 SUBCgt same Minitab Notes for STAT 3503 Unit 43 Dotplot Garl Gar2 2 0 4 0 60 8 0 10 0 120 However if we look at a dotplot of the differences below we see that all but one are positive Thus Garage 1 tends to give higher bids than Garage 2 From this dotplot we can also see that on average bids from Garage 1 are about 60 higher than those from Garage 2 for our small sample of cars If the two garages have equivalent bidding rules it is difficult to imagine that such a large difference resulted just because of random error GRAPH Egt Character 9 Dotplot MTB gt dotp c3 Dotplot Diff 025 000 025 050 075 100 Problems 421 It was claimed above that we should expect the bids by the two garages to be associated For example a heavily damaged car will get a high bid at both garages Make a scatterplot of Garl vs Gar2 and describe what you see Where do the points lie relative to the line Gar l Gar2 Use either character or pixel graphics Note that the syntax for gpro mode requires an asterisk between the column numbers GRAPH gtCharacter w Scatterplot MTB gstd MTB plot cl 02 Graph Egt Plot MTB gpro MTB plot cl 02 422 Reproduce the two dotplots on the same scale as shown above Make a printout and connect each dot for Garage 1 with the corresponding dot same damaged car for Garage 2 43 Paired tTest Assuming that the data are approximately normally distributed an appropriate test to confirm what we saw in the dotplot of the differences is a paired ttest In Minitab this can be performed as a one sample ttest of the null hypothesis that the population of differences has zero mean We conclude that the difference between garages is highly significant as indicated by the Pvalue lt 000005 Minitab Notes for STAT 3503 Unit 44 STAT Basic gtlsample t test mean 0 MTB gt ttest 0 C3 TEST OF MU 0000 VS MU NE 0000 N MEAN STDEV SE MEAN T P VALUE Diff 15 0613 0394 0102 602 00000 Recent releases of Minitab have a paired procedure that nds the differences and performs the above test on them with a single command or menu box The two columns used must be of equal length Compare the printout below with the one just above STAT Basic Pairedt MTB gt Paired c1 c2 Paired TTest and Cl Gar1 Gar2 Paired T for Garl Gar2 N Mean StDev SE Mean Garl 15 684667 320399 082727 Gar2 15 623333 294125 075943 Difference 15 0613333 0394365 0101825 95 CI for mean difference 0394941 0831725 T Test of mean difference 0 vs not 0 T Value 602 P Value 0000 It is crucial to take the paired nature of the data into account If we had incorrectly analyzed these data using a twosample ttest we would have failed to detect the signi cant effect note the 0589 Pvalue below This is the computational equivalent of the incorrect and futile graphical comparison of the separate dotplots for the two garages that we made in Section 42 INCORRECT PROCEDURE STAT Basic gt2sample t different columns assume equal variances MTB gt twos cl c2 SUBCgt pool TwoSample TTest and Cl Gar1 Gar2 Two sample T for Garl vs Gar2 N Mean StDev SE Mean Garl 15 685 320 083 Gar2 15 623 294 076 Difference mu Garl mu Gar2 Estimate for difference 0613333 95 CI for difference 1687000 291366 T Test of difference 0 vs not T Value 055 P Value 0589 DF 28 Both use Pooled StDev 30754 Minitab Notes for STAT 3503 Unit 45 Problems 431 Looking at the dotplot of differences one may legitimately wonder whether they are normally distributed Perform one of the three formal tests of normality available in the menu path STAT dgt Basic gt Normality Give the Pvalue and say what it indicates Also try the normal probability plot in the menu path GRAPH gt Normal probability plot What device does the latter plot use to help you judge whether the data are normal Note The null hypothesis of normality is not rejected But even if this hypothesis had been rejected at the borderline many statisticians would say that the conclusion from the ttest is still valid The criteria for using the ttest are that i the sample size is moderately large ii there is no obvious skewness and iii there are no outliers The Central Limit Theorem suggests that the sample mean would be nearly normally distributed even if the original data were not These criteria indicate that the t statistic has nearly a tdistribution 432 Ifone chose to do a nonparametric test either a sign test STAT gt Nonparametrics 9 1Samp1e Sign command stest 0 c3 or a Wilcoxon signedrank test STAT gt Nonparametrics ED 1 Sample Wi 1coxon command wtest 0 c3 would be appropriate Remember that for these tests the null hypothesis is that the population of differences has zero median Perform both tests give Pvalues and interpret the results 433 In Problem 314 you were asked to consider redesigning this experiment so that the data are in two independent groups Could data collected in this way be correctly analyzed according to the twosample tprocedure shown at the end of this section Explain briefly 44 Stacked Data MTB gt MTB gt SUBCgt An important goal of this unit is to show that a randomized block design is a generalization of the paired ttest shown above However we need to put the data into stacked format before we can continue Instead of the last subcommand you could use the set command with data l 2 15 name cll Bid 012 Garage stack cl 02 cll subs 012 But there is one more step in order for the stacked data to fully represent the structure of the experiment We need to identify which car produced which bids This requires another column labeled Car The results are shown after the problems for this section name 013 Car set 013 2 l 15 end Now we have Bids in cl 1 subscripts l and 2 for Garages in c12 and subscripts 1 through 15 for Cars in cl3 At the top of the next page is a printout of the stacked data Study it carefully to make sure that you understand how all of the information in the columns Garl and Gar2 have been re expressed in the columns Bid Garage and Car For your convenience columns Garl and Gar2 are shown again Minitab Notes for STAT 3503 Unit 4 6 In stacked format each row gives full information on how a particular bid aroseiits amount which garage and which car The order in which these selfsufficient rows are recorded in the worksheet is not important for an analysis of variance For example as long as each row stays intact it is not necessary for all of the bids for Garage 1 to appear first nor for the Cars to be listed in any particular order However if the data were collected in a particular known order one would hope based on randomization then the actual order of collection should be re ected in the order of the rows of the stacked format in the worksheet In each format locate the data for the first four five cars Problems 441 Which format would you choose if you were presenting data in a report stacked or unstacked Give reasons briefly STACKED FORMAT UNSTACKED FORMAT Bid Garage Car ROW Garl Gar2 76 1 1 1 76 73 102 1 2 2 102 91 95 1 3 3 95 84 13 1 4 4 13 15 30 1 5 5 30 27 63 1 6 6 63 58 53 1 7 7 53 49 62 1 8 8 62 53 22 1 9 9 22 20 48 1 10 10 48 42 113 1 11 11 113 110 121 1 12 12 121 110 69 1 13 13 69 61 76 1 14 14 76 67 84 1 15 15 84 75 73 2 1 91 2 2 84 2 3 15 2 4 27 2 5 58 2 6 49 2 7 53 2 8 20 2 9 42 2 10 110 2 11 110 2 12 61 2 13 67 2 14 75 2 15 Minitab Notes for STAT 3503 Unit 47 442 How could the data table at the very beginning of this unit be modi ed to make it clearer to the reader that the data are paired and that each row shows the results for a particular car 443 In conducting an experiment such as this one damaged cars would be sampled and then each car would be taken to the two garages to get bids for repair Perhaps the toss of a coin would decide whether a particular car was taken to Garage 1 or Garage 2 rst Which format stacked or unstacked would be natural for recording the results of this experiment as data collection progresses 45 Block Design The randomized block design explained in OttLongnecker Sec 153 is a generalization of the twosided paired ttest that is able to handle more than two treatments The word block should be considered as a generalization of the word pair When paired data are treated according to a block design the conclusion should be the same as for the paired ttest We use Minitab39s balanced ANOVA procedure to analyze the data as a block design STAT ANOVA gtBalanced Response Bid Model Garage Car Random Car Storage Residuals MTB gt anova c11 c12 c13 SUBCgt random c13 SUBCgt restrict SUBCgt resids c14 ANOVA Bid versus Garage Car Factor Type Levels Garage fixed 2 Car random 15 Factor Values Garage 1 2 Car 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 Analysis of Variance for Bid Source DF SS MS F P Garage 1 2821 2821 3628 0000 Car 14 263742 18839 24226 0000 Error 14 1089 0078 Total 29 267652 S 0278858 R Sq 9959 R Sqadj 9916 Notes on Minitab s anova procedure 0 The notation for the model in the quotModelquot box for the menu or after the equal sign for the command is shorthand for the model YyuxBjej Minitab Notes for STAT 3503 Unit 48 where 139 l 2 j l 15 20c 0 B iid N0 03932 and 67 iid N0 0392 A grand mean u and an error term must be present in every ANOVA model and so there is no need for these terms to appear in the syntax What we must mention is cl2 Garage and cl3 Car together with the column of measurements cll Bid We take Garage to be a xed effect Greek letter 0L because the two garages are of speci c interest Perhaps they are the garages most conveniently located to an insurance company that routinely seeks bids The restriction that the X39s sum to 0 is expressed in the subcommand re str i ct We take Car to be a random effect Latin letter B because the 15 cars are chosen at random Minitab requires random effects to be declared using the subcommand random With a design as simple as the current one it happens that no damage would have resulted in the output if the commands random and restrict had been omitted However we shall soon see models for which these specifications are crucial and it is a good idea to start now to include all of the specifications needed to make the model correct 0 The residuals subcommand is used to store the residuals from the model in empty column cl4 When using the subcommand residuals be careful to use an empty column because this subcommand will overwrite data without warning With menus Minitab automatically selects an empty column for the residuals but it may not be especially conveniently located in the worksheet The Fratio for testing the Garage effect is F 2821300778 363 The corresponding Pvalue printed as 0000 indicates a value smaller than 00005 Clearly the difference between the garages is highly significant This F test is equivalent to the paired ttest performed above F 363 6022 is the square of the tstatistic for the paired ttest Depending on the release of Minitab the Pvalues may be written as 00000 or 0000 but even if expressed to different numbers of decimal places they are actually identical The Car effect quotblock effectquot can be tested with the statistic F 18838700778 24226 it is very highly significant Of course this is no surprise We used Cars as blocks precisely because we anticipated large differences from car to car The reason for introducing the blocking factor into an experimental design is the suspicion that it will be significant thus helping to explain variability that would otherwise have wound up in ating MSError making the Fratio for the quotmainquot effect small and possibly leading to a Type 11 error See Problem 454 for an illustration If Blocks are not significant it may be a signal that a block design should not have been used In performing any ANOVA you should always generate the residuals and look at them graphically usually starting with a boxplot and a normal probability plot The symmetry of the normal probability plot results from the fact that there are only two observations per Car and thus each car gives two residuals equal in absolute value and opposite in sign The normal probability plot gstd mode of the residuals is shown below It is not precisely linear but the departure from normal is not extreme Various tests of normality have Pvalues around 01 GRAPH gt Probability plot normal MTB gt gstd MTB gt nscores 14 15 MTB gt plot 14 15 Minitab Notes for STAT 3503 Unit 49 15 3 3 e 3 0 0 2 e 3 3 el5 3 7 7 7 7 7 7 77 77777777Cl4 7030 7015 000 015 030 Alternatively you could request a high resolution normal probability plot gpro mode of the residuals by using the Graphs option in menu box for the balanced ANOVA or by using the menu path shown below results printed after the character graphics version Without some practice the greater precision of the high resolution plot and the way it treats repeated values can lead to overinterpretation of small deviations from linearity It is a good idea for beginners to include quoterror bandsquot in their high resolution plots See the graph on the next page Normal Probability Plot of Residuals Normal 95 CI ANOVA for Block Design Mean 518104E17 StDev 01938 95 N 30 90 AD 0614 PValue 0100 80 7o 60 g 50 40 392 3o 20 10 5 1 075 050 025 000 025 050 RESII Minitab Notes for STAT 3503 Unit 410 Problems 451 Suppose we want to use the fixed significance level 1 for testing whether there is a difference between the two garages Find the critical values for both the paired ttest and the F test of the block procedure Show that the square of the critical values oft is the critical value of F Note Critical values for a given signi cance level can be obtained by using the invcdf command or by selecting CALC E39gt Probability distributions gt t or F inverse cumulative from menus The inverse cumulative distribution function gives the cutoff value that has a designated probability below adjust appropriately to get the critical values for each test The tdistribution has 14 degrees of freedom there is 1 degree of freedom in the numerator and there are 14 degrees of freedom in the denominator of the Fdistribution 452 Use Minitab39s general linear model procedure STAT gt ANOVA gt GLM to get mainly the same output as at the beginning of this section Notice that the standardized residuals for one of the cars are barely greater than 2 in absolute value and hence the observations for that car are noted as quotunusualquot Which car Make a boxplot of the residuals or standardized residuals What outliers if any are indicated 453 Earlier in this unit we looked at nonparametric alternatives to the onesample ttest There are also nonparametric alternatives for analyzing a block design Perhaps the best known of them is the Friedman test menu path STAT gt Nonparametrics 2gt Friedman or command f riedman cl 1 c12 c13 Do the Friedman test for the present data and interpret the result 454 Read the footnote to the data table in section 41 Add 10 to each observation shown in the table and repeat the ANOVA of section 45 for the modified data Comment on which results changed and which did not Would a linear transformation of the data affect the Fstatistic 455 In this problem we ask you to perform two INCORRECT procedures so that you will understand the consequences of ignoring or misunderstanding the block structure of an experimental design What result do you obtain if you analyze the data as given in section 41 0 As a oneway ANOVA ignoring Cars 0 As a oneway ANOVA ignoring Garages Why is each of these analyses incorrect Which one corresponds to the incorrect twosample ttest done at the end of Section 43 Finally compare the values of MSError for the correct analysis as a block design and for the incorrect analysis ignoring Cars and comment In this comparison what two sums of squares in the correct ANOVA table sum to SSError in the incorrect one Can the correct ANOVA table be constructed from information in the two incorrect tables Minitab Notes for STAT 3503 Unit 411 456 For some years the quotTaster s Choicequot column was a regular feature in the Wednesday Food Section of the San Francisco Chronicle The column of December 17 2003 reported results when ve professional tasters rated four brands of creamy horseradish a common condiment for prime rib of beef declaring Mezzetta as the quotwinnerquot The taster s scores are shown below Treat Tasters as random blocks analogous to Cars in the example of this unit and Brands of horseradish as the xed main effect analogous of Garages Each score is out of a total of 20 points According to the appropriate ANOVA are there any statistically signi cant differences among brands Because there are now more than two observations per block a paired ttest is no longer an option In a subsequent unit we take a more careful look at such block designs BRAND TASTER Mezzetta Sosnick Beaver Tulelake Carroll l6 l3 l6 3 Halperin 19 10 9 l3 Hatfield 18 14 12 16 KatZl l6 l6 l4 l6 Passot l6 l6 l6 9 M initab Notes for Statistics 3503 by Bruce E Trumbo Department of Statistics CSU Hayward Hayward CA 94542 Email btr39umbo csuhamardedu Comments and corrections welcome Copyright 1991 1995 1997 1998 2000 2001 2002 2004 2005 by Bruce E Trumbo All rights reserved These notes are intended for use by students at California State University Hayward Please contact the author for permission to use elsewhere Preparation of early versions these notes was partially supported by NSF grant USE9150433 Modi ed 105 Minitab Notes for STAT 3503 Dept of Statistics CSU Hayward Unit 1 OneFactor ANOVA as a Generalization of the TwoSample tTest 11 Data and Worksheet Preparation Consider two randomly chosen samples of a particular drug Bottles in Group 1 are chosen from current production those in Group 2 have been stored under regulated conditions for one year There are 10 bottles in each group The potency of each bottle is assayed and recorded The issue is whether potency of the population of yearold bottles is the same as for the population of the ones currently being made The potency data are as shown below Groupl 102 105 103 108 98 106 107 102 100 106 GroupZ 98 96 101 102 101 97 95 96 98 99 These data are from Table 62 page 269 Ott and Longnecker An Introduction to Statistical Methods and Data Analysis 5th ed Duxbury 2001 One way to put these data into a Minitab worksheet is to quotcut and pastequot from the MS Word or HTML version of this unit Be sure Minitab commands are quotenabledquot before you start The goal is to make the Session Window look as shown below by using the bulleted instructions quotEnable commandsquot in the Minitab Session Window using the EDITOR menu First activate the Session window by clicking anywhere within it you cannot modify the Session window when a Worksheet is active Second be sure to use the EDITOR menu not EDIT Type the rst two lines below the ones with the name and set commands The DATAgt prompt should appear automatically at the beginning of the third line In the third line instead of typing the data In your browser highlight the data for Group 1 and quotcu quot these 10 observations using CTRL C In the Minitab Session Window make sure the cursor follows the DATAgt prompt and quotpastequot the data with CTRL V Then press ENTER It s OK if the spacing is a little different than you see below but make sure that you captured all 10 observations Similarly cut and paste the data for Group 2 into the fourth line 0 Finally type end on the fifth line to signal that data entry for cl is complete MTB gt name cl Potency MTB gt set cl DATAgt 102 105 103 108 98 106 107 102 100 106 DATAgt 98 96 101 102 101 97 95 96 98 99 DATAgt end Now display the data in cl using either the menu path or the command shown below Minitab Notes for STAT 3503 Unit 12 DATA MANIP in Releases 13 and earlier E3 Display Data MTB gt print cl This produces a horizontal printout of the 20 observations in cl Also look in the worksheet to see the data there Next we need a column of quotsubscriptsquot in c2 to show which observations come from which group Name c2 39Group either with a command or by typing the name directly into the worksheet Then enter the subscripts using either the menus bold type or the set command Type Group atop column 2 in the Worksheet CALC E9 Patterned Data Simple values from 1 to 2 each individual value repeated 10 times MTB gt name 02 Group MTB gt set 02 DATAgt 1210 DATAgt end This way of organizing data with all observations in a single column and groups designated in a separate column of subscripts is called quotstackedquot format For such a small dataset you could just type the 20 39Potency determinations and the 20 39Group numbers directly into the worksheet However when using documents in DOC or HTML format you may nd it convenient to learn i to cut and paste data into a worksheet and ii to use the quotpatterned dataquot features of the set command It is best to start learning with the current relatively simple data to do these two things Once you have entered data into a worksheet you should always proofread your work before continuing You can do this either by printing the data to the Session window using the print command or by looking directly at the Worksheet Proofreading should become an automatic part of data entry for you Beyond the rst few units these notes will not remind you to do this Problems lll Here is an alternate way to prepare the worksheet Follow through the steps cutting and pasting data where appropriate What menu choices would produce the same results Look at the DATA MANIP menu Explain what each command does Compare cl3 and cl4 with cl and c2 MTB gt name cll Fresh 012 Stored MTB gt set cll DATAgt 102 105 103 108 98 106 107 102 100 106 DATAgt end MTB gt set 012 DATAgt 98 96 101 102 101 97 95 96 98 99 DATAgt end MTB gt stack cll 012 cl3 SUBCgt subs 014 112 In the process of working Problem lll you put the data for each group into a separate column cll and c12 Data in separate columns are said to be in quotunstackedquot format Look at the DATA MANIP menu and figure out how the stacked data in cl can be put into unstacked format using the subscripts in c2 Use the column names c21 New and c22 39Old for this What command subcommand combination could you use to unstack the data without the help of the menus Minitab is a commandbased package The menus are sometimes a convenient way to generate commands which appear in the Session window when the command language is active Minitab Notes for STAT 3503 Unit 13 12 Descriptive Methods Whenever possible data analysis should begin with descriptive methods both numerical and graphical Here it seems clear from the dotplot that the potency of the stored bottles is less than the potency of the fresh ones Group 1 mean above 1025 has generally higher values than Group 2 mean below 1000 PLOT 3 Character E9 Dotplot by variable MTB gt gstd MTB gt dotp cl SUBCgt by c2 Group 1 Potency Group 2 Potency 950 975 1000 1025 1050 1075 Now we compute numerical descriptive statistics broken out by the subscript variable in c2 into two groups STAT E9 Basic E9 Descriptive statistics by variable MTB gt describe c1 SUBCgt by c2 Variable Group N N Mean SE Mean StDev Minimum Q1 Median Potency 1 10 0 10370 0102 0323 9800 10150 10400 2 10 0 98300 00761 02406 95000 96000 98000 Variable Group Q3 Maximum Potency 1 10625 10800 2 101000 102000 Note The printout above was made using Release 14 Release 13 produces a slightly different result Problems 121 Minitab makes graphical displays in one of two formats 0 Standard or Character graphics These are composed of text symbols and appear in the Session window They have relatively low resolution but they are easy to paste into reports using a work processor Be sure to use a monospace font such as Courier and to proofread to make sure the graph looks the same after pasting as it did before cutting from Minitab They are also quick and convenient to transmit over the web We mainly show standard graphics in these notes To activate stande graphics use the command gstd and then issue the command for the kind of graph desired Alternatively select a character graphic from the GRAPH menu Professional or Pixel graphics These are true graphic images using Windows technology They appear in separate boxes on your screen not in the Session window These images can be saved in a variety of graphics formats some of which can be edited with graphics software MTB gt MTB gt SUBCgt MTB gt MTB gt MTB gt Minitab Notes for STAT 3503 Unit 14 They can be included as graphic images on the web and can be imported into word processing and desktop publishing documents They greatly increase the le size of documents that incorporate them Minitab starts in professional graphics mode To reactivate professional graphics after using character graphics use the command gpro Illustrate both types of graphics by making boxplots as follows gstd boxp cl by c2 gpro boxp cl 02 dotp cl 02 Comment on the results as follows a Do the boxplots show the differences between the two groups as clearly as do the dotplots More clearly Defend your answer b Look at one of the dotplots above Can you see exactly how many data points are represented Now look at one of the boxplots above Can you see how many data points are represented c Minitab39s boxplots sometimes indicate the presence of outliers Are outliers indicated for either of our groups d What descriptive statistics are used in making box plots e Comment on the differences between standardgraphics and professionalgraphics boxplots f We have given several commands above What menu choices can be used to produce each style of boxplot 13 tTest and OneFactor ANOVA The descriptive methods in Section 12 strongly suggest that fresh samples of the drug tend to be more potent than stored ones Now we look at several different ways to con rm this impression with formal statistical tests That is we test H0 the 2 groups have equal potency against Ha the 2 groups have dz erentpotencz39es The rst of these is the two tailed pooled twosample ttest The command for a twosample ttest on stacked data is twot Minitab defaults for twosample ttests 0 The twotailed alternative is the default onesided alternatives require the subcommand alternative followed by either 1 rightsided alternative or 1 leftsided The separate variances quottprimequot test is the default Pooling requires the subcommand pool Computer simulation results have established that the separate variances test is often preferable for twosample tests Here we use the pooled test because it generalizes more readily to the ANOVA methods of these notes Minitab Notes for STAT 3503 Unit 15 Note on stacked vs unstacked data The command twosample would be used if the potency measurements for the two groups had been entered into two separate columnsone for Fresh and one for Stored Such quotunstackedquot data are seldom used for computer analysis outside of elementary statistics classes Minitab is one of the few serious computer packages that makes direct use of unstacked dataand even then only for a few elementary procedures STAT Egt Basic Egt 2sample t one column assume equal variances MTB gt twot c1 c2 SUBCgt pool Two sample T for Potency Group N Mean StDev SE Mean 1 10 10370 0323 010 2 10 9830 0241 0076 Difference mu 1 mu 2 Estimate for difference 0540000 95 CI for difference 0272230 0807770 vs not T Value 424 P Value 0000 DF 18 T Test of difference 0 Both use Pooled StDev 02850 We see from the very small Pvalue that the difference between the two groups is very highly signi cant This is what we guessed would be the case from looking at the dotplots above Either the Fresh samples were manufactured to have a higher potency or the potency of the Stored samples deteriorated with a year of storage The onefactor or oneway ANOVA design also sometimes called the quotcompletely randomized designquot is a generalization of the two sided pooled twosample ttest that can handle more than two groups Thus when it is applied to only two groups its result should agree with that of the ttest STAT 13gt ANOVA D Oneway MTB gt oneway c1 c2 MTB gt onew 39Potency39 39Group39 Alternatively One way ANOVA Potency versus Group DF SS MS 1 14580 14580 1795 0000 14620 00812 Total 19 29200 Source 932 R Sqadj 4715 Individual 95 CIs For Mean Based on Pooled StDev Level N Mean StDev 10 10370 0323 2 10 9830 0241 9 75 1000 10 25 10 50 Pooled StDev 0285 Note Releases 13 and earlier omit some of the information shown in this Release 14 printout MTB gt SUBCgt MTB gt SUBCgt Minitab Notes for STAT 3503 Unit 16 The Pvalue for both the ttest and the oneway ANOVA is 000049 Depending on the release of Minitab this may be printed as 0000 meaning less than 00005 or rounded to 00005 The square of a t distributed random variable with 18 df is an F distributed random variable with 1 df in the numerator and 18 df in the denominator In fact the squares of the 025 values for tV are the 05 values for F1 V as you can verify by looking at tables Upon squaring the negative left and positive right tails oft both go into the right tail of F 025 025 05 Also the square of the tstatistic obtained in our t test above is the Fstatistic in our ANOVA 4242 1795 Note In Minitab the oneway procedure is the simplest of several ways to perform a oneway ANOVA on stacked data This command requires column identi ers such as c1 and c2 or 39Potency and 39Group column names inside single quotes It does only oneway ANOVAs and provides separate con dence intervals for each level Fresh or Stored of the single factor Group Problems 131 For a twosample design with n 10 observations in each group and a xed signi cance level 0L 05 nd the critical values for the twosided pooled ttest and the Ftest discussed above Use Minitab39s invcdf command invcdf 0975 t 18 invcdf 095 Fl 18 Compare your results with tables in your text Verify that the square of the critical value for t is the critical value for F In this problem why do you need to use y 0975 for the t distribution and 095 for the F distribution For each distribution draw a sketch and shade in the area corresponding to probability 005 Recall that the cumulative distribution function cdf F x of a random variable X is PX x Thus the inverse cdf function for a particular value y gives the value c such that PX c y The inverse cdf function is sometimes called the quantilefunction 132 Consider a balanced twosample design in which each group has n observations Let the group totals be T1 and T2 and denote the grand total of all observations as T1 T2 G Express the formulas for both the pooled tstatistic and the Fstatistic discussed above in terms of this notation Then use simple algebra to verify that the Fstatistic is the square of the tstatistic 14 MoreGeneral Procedures Minitab s general anova procedure will handle a great variety of ANOVA models many of which we shall study in these notes 0 With commands designate the response variable Potency here followed by an equal Sign followed by the design or independent variables containing subscripts here only one Minitab Notes for STAT 3503 Unit 17 39Group Use of single quotes apostrophes around variable names is optional unless the first character of the name is a number or a symbol With Windows menus you must select the response variable in one dialog box and the subscript variables that specify the model in another For now ignore the box for quotrandomquot factors For more complicated designs than the completely randomized design ANOVA will handle only balanced situations ie only designs where each treatment or treatment combination has the same number of replications Because it is programmed to handle such a wide variety of ANOVA designs the general ANOVA procedure does not provide con dence intervals STAT G ANOVA D39Balanced select 39Potency39 as Response 39Group39 as Model MTB gt anova Potency Group Factor Type Levels Values Group fixed 2 l 2 Analysis of Variance for Potency Source DF SS MS Group 1 14580 14580 1795 0000 Error 18 14620 00812 Total 19 29200 S 0284995 R Sq 4993 R Sqadj 4715 Finally the GLM procedure stands for quotgeneral linear modelquot has the same syntax as ANOVA It requires more intensive computation and more computer memory perhaps noticeable with large datasets and complex designs can handle unbalanced cases uses a regression approach and automatically warns us about quotunusualquot observations For more complex designs the two procedures have somewhat different options and capabilities STAT 3 ANOVA E9 General linear model MTB gt glm Potency Group Factor Levels Values Group 2 l 2 Analysis of Variance for Potency Source DF Seq SS Adj SS Adj MS F P Group 1 14580 14580 14580 1795 0000 Error 18 14620 14620 00812 Total 19 29200 S 0284995 RSq 4993 R Sqadj 4715 Unusual Observations for Potency Obs Potency Fit StdevFit Residual StResid 5 98000 103700 00901 O57OO R 211 R denotes an obs with a large st resid Technical note Because Group and Error correspond to orthogonal subspaces of the 20dimensional vector space of observations the Sequential and Adjusted Sums of Squares are identical for our data Minitab Notes for STAT 3503 Unit 18 Problems 141 The GLM procedure indicates that observation 5 is unusual Minitab s criterion for calling an observation unusual is based on Studentized residuals of absolute value greater than 2 So this observation with its value of 2 11 is borderline We will not go into the computations involved in nding Studentized residuals Very roughly the idea is that this observation is relatively far from the mean of the rest of the observations in its group In this ANOVA the ordinary residual of an observation is its difference from its group means Using menus in the oneway ANOVA procedure select the option to store residuals Verify the values of the residuals for observations 1 5 and 11 of the stacked data by hand Make a box plot of the residuals Does it indicate any outliers 142 Use the menu path STAT D Basic statistics 12gt Normality test to test the null hypothesis that the residuals t a normal distribution against the alternative that they are not normal In the resulting normal probability plot normal residuals should nearly t a straight line Do ours What is the Pvalue of the AndersonDarling test of normality 143 Test the hypothesis that the two groups come from populations with equal variances against the twosided alternative Use the cdf command to nd the Pvalue of this test The FmaXtest for t treatment groups is equivalent to the F test if t 2 Verify this for the Potency data Tables of the FmaXdistribution are available in OttLongnecker and in some other texts 15 Nonparametric Alternatives Here we mention several nonparametric tests You should read the descriptions of them in your text In Windows all menu paths for Minitab s implementations of these tests begin with STAT gt Nonparametric 0 The nonparametric alternative to the twosample ttest is the MannWhitneyWilcoxon test command marm It works only for unstacked data Both of the nonparametric alternatives to the general oneway ANOVA are programmed to be used with stacked data the Mood test Minitab command mood and the KruskalWallis test Minitab command kruskal The KruskalWallis test is a generalization of the Mann WhitneyWilcoxon test in the same sense that the oneway ANOVA is a generalization of a pooled twosample ttest Unlike the ttest and ANOVA none of these nonparametric tests assume normal data They all test null hypotheses about equal population medians rather than means Like their normaltheory counterparts these nonparametric tests assume that The data are random samples from their respective populations The data for different levels eg Fresh and Stored groups are independent of one another The population dispersions are equal For the normal tests the speci c form of the quotequal dispersionquot assumption is that variances are equal For the nonparametric tests it is that all population distributions are of the same shape differing if at all only by a translation that shifts the entire distribution along with the value of the median Minitab Notes for STAT 3503 Unit 19 0 The populations are continuous to the extent necessary to avoid quottiesquot repeated values Normal theory tests usually work quite well unless rounding or some other process has produced severe granularity many clumps of repeated values Nonparametric tests require approximate quotcorrectionquot procedures to adjust for any ties that may be present due to rounding There is no evidence that our present data are other than normally distributed For example the dotplots and boxplots show no marked skewness or probable outliers Even so you should experiment with the nonparametric procedures kruskal and mood to see how they work Here they yield the same conclusion as the normal theory tests the potency of the stored bottles is less than for the fresh ones Problems 151 Theoretically for continuous data there should be no ties at all In reality we are always dealing with rounded data so ties may be present For example truly distinct values 101990213 and 102037681 would both be recorded here as quottiedquot at 102 even with twodecimal accuracy both would be recorded as 1020 Looking at the 20 observations in our dataset do you nd any ties If so how many observations are involved in ties 152 The Wstatistic reported in the output of Minitab s implementation marm of the Mann WhitneyWilcoxon test is computed as follows consider all of the data in both groups as a whole nd the ranks of these observations and nd the sum of the ranks of the observations in Group 1 A small value of W indicates that Group 1 comes from a population with a smaller median than Group 2 a large value indicates that the population median for Group 1 may be larger a Under the null hypothesis that the two populations are the same the expected value of W can be shown to be MW n1n1 n 12 What is this value for our data b Assume that c5 c6 and c7 are empty columns that the stacked data are in c1 and that the subscripts are in c2 The following Minitab commands can be used to illustrate how Wis computed MTB gt rank cl c5 MTB gt unstack c5 c6 c7 SUBCgt subs 2 MTB gt sum 06 Go through these steps carefully looking at the worksheet after each step and making sure you understand what each step does Then unstack the data and use the marm command to perform the MannWhitneyWilcoxon test Compare the value of Wwith your computations above Carefully compare the interpretation of this nonparametric test with the interpretation of the ttest and the ANOVA above Justify your answer Minitab Notesfor Statistics 3503 by Bruce E Trumbo Department of Statistics CSU Hayward Hayward CA 94542 Email btrumbocsuhamardedu Comments and corrections welcome Copyright 1991 1995 1997 1998 2000 2001 2002 2004 by Bruce E Trumbo All rights reserved These notes are intended for use at CSU Hayward in classes where Ott Longnecker is a required text Please contact the author at the address above to request permission for other uses Preparation of early versions of these notes was partially supported by NSF grant USE9150433 Revised 12004 Minitab Notes for STAT 3503 Dept of Statistics CSU Hayward Unit 6 A Latin Square Design 61 The Data An oil company tested four different blends of gasoline for fuel ef ciency according to a Latin square design in order to control for the variability of four different drivers and four different models of cars Fuel ef ciency was measured in miles per gallon mpg after driving cars over a standard course Fuel Ef ciencies mpg For 4 Blends of Gasoline Latin Square Design Blends Indicated by Letters AD These data are from Ott Statistical Methods and Data Analysis 4th ed Duxbury 1993 page 866 Similar data are given in the 5th edition by OttLongnecker in problem 1510 page 889 The design is called a quotLatinquot Square design because Latin letters are often used to show how levels of one factor are assigned to combinations of levels of the other two factors It is often the case that one of the effects is of principal interest here Blend while the other two are quotblockingquot effects to control variability here Driver and Model For our data notice that each Driver tests each of the four Blends also each Blend is tested in each Model of car However not all combinations of BlendModelDriver are present For example Driver 3 did not test Blend A in Model IV In a Latin square each of the three factors must have the same number i of levels and there are m t2 observations altogether Problems 611 This Latin Square design has 42 l6 observations As noted just above not all 3way combinations of the three effects are present How many observations would have been required in order to include all 3way combinations of Blend Model and Driver 612 Suppose that there were 5 Blends 5 Drivers and 5 Models A full quotfactorialquot design with one observation on each 3way combination would require 125 observations Make a table showing how you could assign Blends AE to make a Latin Square design for this situation 613 For your convenience the 16 observations in the fuel efficiency study are listed below reading across the rows of the table above 155 339 132 291 163 266 194 228 108 311 171 303 147 340 197 216 Put these observations into cl of a Minitab worksheet Use the patterned data procedure to put subscripts for Driver into c2 and Model into c3 use 1 for I 2 for II etc The subscripts for Blend use 1 for A 2 for B etc will have to be entered directly into the worksheet one at a time because the Latin Square pattern cannot be entered automatically by Minitab Use the original data table in Minitab Notes for STAT 3503 Unit 62 this section above to do this Use the printout below only to check your work Label the four columns appropriately MPG Driver Model Blend When you are nished entering the data print out the results Here is what you should get without the spaces between lines which have been introduced for easy reading MTB gt print cl c4 ROW 0040101 waH GRAPH gt 3D gt Groups Data View TOOLS gt Toolbars gt 3D Graph MPG Driver Model Blend 155 1 1 4 339 1 2 2 132 1 3 3 291 1 4 1 163 2 1 2 266 2 2 3 194 2 3 1 228 2 4 4 108 3 1 3 311 3 2 1 171 3 3 4 303 3 4 2 147 4 1 1 340 4 2 4 197 4 3 2 216 4 4 3 614 Because this experiment was done by an oil company it is reasonable to assume that the main issue is whether there are differences among the four Blends and that Blend is a fixed effect because four particular blends are currently under study Also it may be reasonable to assume that Models of car and Drivers were chosen at random from among available models and drivers Subject to these assumptions write the model for this experiment In specifying the range of the subscripts for Driver you can use quoti 1 2 3 4quot and for Model you can use quot 39 1 2 3 4quot However for Blend you need to say something like quotthe 4 values of the Blend subscript k are assigned to the 16 observations according to a Latin Square designquot in order to make it clear that there are only 16 observations 615 The design space of this Latin Square is really a very carefully chosen subset of a cube There are 43 64 possible combinations of the levels of the three factors of which only 16 are observed The table at the beginning of this unit can be viewed as a twodimensional representation of the cube with dimensions 2 Driver height y Model width and x Blend depth Minitab makes threedimensional scatterplots in Minitab 14 they can be conveniently rotated 2 39Driverquot y 39Model 39 x 39Blend39 symbols and lines GroupBlend rotate about appropriate axes Release 14 The initial view is shown first followed by the view that results when the plot is rotated so that its Zaxis is perpendicular to the viewer so that the connecting lines disappear behind the plotting symbols This is like viewing the initial view from the top In Minitab 14 use the tools to rotate such a plot so that first the yaxis is perpendicular to your view and then the x axis Also with some fussing you should be able to orient the cube to match the data table If visible on your copy of this unit the colors of the symbols for Blend match the colors of the letters in the data table in section 61 Minitab Notes for STAT 3503 Unit 63 3D Scatterplot of Driver vs Model vs Blend Blend 1 l 2 cw 3 4 4 Driver 2 1 3D Scatterplot of Driver vs Model vs Blend Blend 1 l 2 gt 3 4 Driver Minitab Notes for STAT 3503 Unit 64 62 ANOVA for a Latin Square Design Interpretation of Results Although Latin square designs have the particular kind of quotbalancequot described in of the previous section these designs are not balanced in the sense that each combination of the three factors occurs equally often Some combinations occur once e g Driver 1 Model I and Blend D But there are only 16 observations and so most of the combinations do not occur at all eg Driver 1 Model I and Blend A For this reason Minitab39s quotbalanced ANOVAquot procedure does not work for Latin square designs The word cube may be more descriptive of these designs than square Imagine this particular design as a cube with 64 cells and try to visualize which 16 cells are lled ie contain an observation and which are not What would the cube look like when viewed from each face In a Latin Square design all three effects must have the same number I of levels called the order of the Latin Square Here I 4 Because the Latin Square design is not balanced as required by Minitab s quotBalanced ANOVAquot procedure we must use the quotGeneral Linear Modelquot procedure in order to obtain an ANOVA table for the fuel efficiency data STAT gt ANOVA gt General linear model MTB gt SUBCgt SUBCgt SUBCgt glm MPG Driver Model Blend random Driver Model resid c5 ems General Linear Model Factor Driver Model Blend Analysis of Variance for MPG Source Driver Model Blend Error Total Type Levels Values random 1 2 3 4 random 4 l 2 3 4 fixed 4 l 2 3 4 using Adjusted SS for Tests DF Seq ss Adj ss Adj MS F p 3 5897 5897 1966 050 0699 3 736912 736912 245637 6190 0000 3 108982 108982 36327 915 0012 6 23809 23809 3968 15 875599 Note Expected Mean Squares Error Terms and Variance Components have been omitted here See Problem 623 We conclude that the blends are significantly different at the 5 level but not at the 1 level It is not surprising that the fuel efficiencies vary among various models of cars which might range from small compacts to large RVs It does not appear however that there are any significant differences among our Drivers In the general population some drivers are easier on fuel than others perhaps the drivers for this study have been carefully trained so that their driving styles are similar Notes on orthogonality and GLM 0 The GLM procedure gives two types of Sums of Squares here the Sequential Sums of Squares are the same as the Adjusted Sums of Squares because the special structure of the Latin Square design ensures that the three 1 J39 39 39 39 1 col r 39 to the three effects Driver Model and Blend are orthogonal Minitab Notes for STAT 3503 Unit 65 0 A signal that a design is not orthogonal is that the Sequential and Adjusted sums of squares do not agree 0 In its GLM output Minitab quottriesquot to compute Ftests and Pvalues for all effects These are correct for our orthogonal design but for some nonorthogonal designs this information can be misleading Problems 621 Use the following procedure and the stackedsubscripted data to make a table that resembles the original data table of Section 1 STAT gt Tables gt Cross tabulation classification variables 39Driver39 39Model39 Sumaries associated variables 39MPG39 39Blend39 checkbox data MTB gt table Driver Model SUBCgt data 39MPG39 Blend Now by hand make a table similar to the original data table except that the rows are Drivers the columns are Blends and the labels within cells are Roman numerals IIV designating Models Verify your result in Minitab with a procedure similar to the one shown just above Repeat both by hand and in Minitab for a table in which Drivers are designated within the cells 622 Try to use Minitab s balanced ANOVA procedure menu path STAT a ANOVA 2gt Balanced ANOVA or command ANOVA to analyze this block design What happens A Latin Square is quotbalancedquot in the sense that the four subspaces corresponding to the three factors and error are orthogonal In Minitab39s quotBalanced ANOVAquot all combinations of treatment levels must have the same number of observations here 16 frequencies are 1 and 64 s 16 48 are 0 623 Repeat the GLM procedure shown in this section to obtain the EMS table and components of variance and make a column of residuals Notice that we have not used the restrict subcommand because it is not available with GLM for a Latin Square design this causes no difficulty Answer the following questions a What mean square is in the denominator of each Fratio How do the EMSs lead you to the conclusion that this is correct b What is strange about the component of variance for Driver How do you interpret this result in practice c What is the Pvalue of the AndersonDarling test for normality of the residuals and how do you interpret it 624 Multiple comparison procedures for a Latin Square design We have established that there are significant differences among the Blends By hand establish the pattern of significant differences using Fisher39s LSD procedure and Tukey s HSD procedure both at the 5 level The formulas are similar to the ones for a oneway ANOVA except that you must use MSError from the ANOVA table as the variance estimate ie instead of SW2 and n t The exact formula for LSD is given in OttLongnecker page 1061 Note For Latin square designs the Minitab GLM procedure performs Tukey s HSD and other multiple comparisons but in Releases 14 and earlier not Fisher39s LSD The output format of GLM is somewhat different from the one Minitab uses for comparisons in oneway AN OVAs both confidence intervals and tests are available We suggest that you do the Fisher and Tukey comparisons using a calculator and then verify your answers for Tukey comparisons using GLM As we see in Section 63 you will get incorrect results if you try to use a oneway ANOVA procedure on data from a Latin Square design so that is not a feasible procedure for getting LSDs for our data Minitab Notes for STAT 3503 Unit 66 625 Missing data in a Latin Square design a Suppose that the MPG value for Driver 3 Model 11 is missing Copy cl MPG to cll and name the copied column MPGM Replace the appropriate observation with a the asterisk is Minitab39s symbol for a missing observation and run glm cll c2 c3 c4 How can you tell from the output that the Latin square design with a missing value is not an orthogonal design Try running both glm cll c2 c4 c3 and glm cll c4 c2 c3 What changes and what remains the same Interpret Minitab39s approximate Fratios Note What Minitab calls a sequential sum of squares Seq SS SAS calls a Type I sum of squares What Minitab calls an adjusted sum of squares Adj SS SAS calls a Type HI sum of squares Within reason this method can be used for more than one missing value The more missing values the harder it is to draw valid inferences Some extreme con gurations of missing values cannot be run successfully b Some textbooks show a procedure for handling a Latin Square design with one missing value by quotestimatingquot the missing value For example see OttLongnecker page 1059 The formula can be written as M tTModel TDriver TBlend 2TGrandt lt 7 2 where Tammi is the total of all the t2 7 l nonmissing observations the first three totals correspond to the t7 l nonmissing observations for the level of Model Driver and Blend respectively that involve the missing observation and t 4 for out data Again here suppose that the MPG value for Driver 3 Model 11 is missing What estimated replacement value M does the formula provide Copy cl MPG to cll and name the copied column MPGM Go into the worksheet and enter this value into the appropriate cell in cl 1 Then use Minitab s GLM procedure to find the ANOVA table using cll instead of clTwo adjustment are necessary on account of the quotfakequot replacement value Each of the quantities DFTotal and DFError needs to be reduced by l to re ect the number of actual nonmissing observations Because of the missing observation the MSEs for each factor are biased estimates of the corresponding EMSs and they need to be adjusted to remove the bias The formulas are shown in OttLongnecker on page 1059 and illustrated with a numerical example 0 Approximate F tests for each factor are done using AdeSEFactorMSEError Carry out this method and compare your results with those of part a For practical purposes this method is limited to one missing value 63 Connections With Simpler ANOVA Designs If we incorrectly ignored both the Driver and the Model structure of the design we might treat the data as a oneway AN OVA with Blend as the only effect to be tested This procedure is shown below INAPPROPRIATE ANALYSIS STAT E1gt ANOVA gt Oneway MTB gt oneway MPG Blend ANALYSIS OF VARIANCE ON MPG E SOURCE MS E p Blend 3 1090 363 057 0646 ERROR 12 7666 639 TOTAL 15 875 6 LEVEL 1 2 3 4 POOLED Minitab Notes for STAT 3503 Unit 67 95 PCT CI S FOR MEAN D ON POOLED STDEV I ND I VI DUAL BAS MEAN 575 050 050 350 ugtugtugtugtz STDEV 7993 Notice that the SSBlend here is the same as in the Latin square ANOVA table and that SSErr0r here gets split into SSModel SSDriver and SSErr0r in the Latin square table similarly for degrees of freedom Finally notice that the bogus oneway analysis fails to detect the Blend effect Problems 631 Perform two additional incorrect oneway ANOVAs using rst Driver and then Model as the single factor Ifyou were forced to use a spreadsheet program that will compute only oneway ANOVAs how could you piece together results from this program to construct a correct ANOVA table for a Latin Square design In other words how can you combine information from three incorrect oneway ANOVAs to give the correct analysis of a Latin Square 632 Perform incorrect analysis on these data treating them as if they came from a block design with Blends as the xed effect and Models as the blocking effect ignoring Drivers Compare sums of squares and degrees of freedom in the resulting ANOVA table with the correct ones from the Latin Square analysis Ifyou were to use the Fratios from this incorrect procedure to draw conclusions about the significance of Blend and Model effects would your conclusions happen to be correct or incorrect What about the conclusions drawn from an incorrect block design that ignores Models instead of Drivers Comment 3D Scatterplot of Driver vs Model vs Blend Driver 3 Model Blend The View From Problem 615 That Matches the Original Data Table Minitab Notes for Statistics 3503 by Bruce E Trumbo Department of Statistics CSU Hayward Hayward CA 94542 Email btrumbo csuhaywardedu Comments and corrections welcome Copyright c 1991 1995 1997 2000 2001 2004 by Bruce E Trumbo All rights reserved These notes are intended mainly for the use of students at California State University Hayward Please contact the author in advance if other use is contemplated Preparation of earlier versions of this document was partially supported by NSF grant USE 9150433 Modified 104 Minitab Notes for STAT 3503 Dept of Statistics CSU Hayward Unit 2 OneFactor Analysis of Variance With Multiple Comparisons and Nonparametric Tests 21 The Data In June 1986 Consumer Reports published results of a survey in which hot dogs of three types were sampled and measured for calorie content All Beef Meat mainly pork but may also contain some beef poultry or other kinds of meat and Poultry These data are also available in Moore and McCabe An Introduction to the Practice ofStatistics 2nd ed page 36 Although the survey was probably not conducted as a simple random sample of hot dogs of each type we treat the data as if they are random observations Furthermore we assume that the three populations of hot dogs have calorie contents that are normally distributed with equal variances The question is whether the three populations have equal means The data are shown below Notice that this is an unbalanced design There are 20 observations on Beef hot dogs but only 17 in each of the Meat and Poultry groups 0 Cl is labeled Beef39 0 c2 is labeled 39Meat 0 c3 is labeled 39Poultry CALORIES IN HOT DOGS BY TYPE OF ANIMAL CONTENT Beef 186 181 176 149 184 190 158 139 175 148 152 111 141 153 190 157 131 149 135 132 Meat 173 191 182 190 172 147 146 139 175 136 179 153 107 195 135 140 138 Poultry 129 132 102 106 94 102 87 99 170 113 135 142 86 143 152 146 144 Problems 211 Enter the data into three appropriately labeled columns of a Minitab worksheet unstacked format Print the data 212 Just from looking at the number of digits in the observations what do you suspect may be true of the Poultry group Minitab Notes for STAT 3503 Unit 22 22 Descriptive Techniques Below we show dotplots of the data They are plotted on a common scale for easy comparison PLOT D Character D Dotplot same scale MTB gt gstd MTB gt dotp cl c3 SUBCgt same Beef Meat Pou1try 100 120 140 160 180 200 From the dotplots it appears that on average Poultry hot dogs contain fewer calories than the other two types but that Beef and Meat hot dogs are similar to each other Numerical descriptive statistics can be obtained command describe as in Unit 1 but the most important descriptive statistics appear in the output from other procedures that we will do later and so we do not show them here Problems 221 Use the menus to make a high resolution quotprofessional graphicsquot dotplots on the same scale Discuss the differences between this graphic and the collection of three dotplots shown above 222 Make a compact display of the data involving numerical or graphical descriptive methods suitable for presentation in a report The purpose is to display the important features of the data for a non statistical audience 23 OneWay Analysis of Variance We now confirm the impressions of the previous section with a formal analysis of variance We do this analysis in two ways first with the quotunstackedquot data in clc3 The null hypothesis all population means equal is overwhelmingly rejected The Pvalue printed as 0000 is less than 00005 Ifthere were no real differences among the population means for the different types of hot dogs we would see such extreme differences among sample means by chance alone in less than five datasets in 10000 The pattern of con dence intervals confirms what we saw in the dotplots Calorie counts of Poultry hot dogs differ from calorie counts of those made of Beef and M eat STAT D ANOVA D Oneway Unstacked MTB gt aovoneway C1C3 ANALYSIS OF VARIANCE SOURCE SS MS F p FACTOR 2 14491 7245 1219 0000 ERROR 51 30320 595 TOTAL 53 44 811 Minitab Notes for STAT 3503 Unit 23 INDIVIDUAL 95 PCT CI S FOR MEAN BASED ON POOLED STDEV LEVEL N MEAN Beef 20 156 85 Meat 17 158 71 2524 poultry 17 12247 2548 POOLED STDEV 2438 120 140 160 180 We have said in Unit 1 that data for computer analysis is usually presented in stacked format Next we stack the data and use them to perform the oneway ANOVA The results are the same as above but Minitab s oneway ANOVA procedure for stacked data makes it possible to obtain the residuals from the ANOVA model As we shall see here and in other units an examination of residuals can be used to check whether basic assumptions are really satis ed You should look at the worksheet on screen studying the contents of cll and c12 compared with clc3 Henceforth in this course we will almost always deal with data in stacked format and so you should learn how to enter data directly in that format DATA MANIP D StackUnstack gt Stack store subscripts Use MANIP menu in Release 13 and earlier MTB gt stack 1 3 11 SUBCgt subscripts 12 No menu item enter variable names into data window MTB gt name 11 Calories MTB gt name 12 Type STAT 12gt ANOVA 12gt Oneway store residuals MTB gt onew 11 12 13 lt Residuals will go into 13 ANALYSIS OF VARIANCE ON Calories SOURCE F p Type 2 14491 7245 1219 0000 ERROR 51 30320 595 TOTAL 53 44811 INDIVIDUAL 95 PCT CI S FOR MEAN BASED ON POOLED STDEV LEVEL N MEAN 1 20 15685 2 17 15871 2524 3 17 12247 2548 120 140 160 180 POOLED STDEV 2438 Problems 231 How would you cut and paste from your browser to enter the hot dog data into a single column How would you use the set command to enter the subscripts 232 Minitab boxplots for comparing groups can most conveniently be made using stacked data Use the menus to learn how to make three box plots on the same scale for the three groups of hot dog calorie measurements Minitab Notes for STAT 3503 Unit 24 24 Multiple Comparisons Once we have determined that not all types of hot dogs have the same population mean calories the next question is which means differ from which other ones From our first dotplots we have suspected that Beef and Meat are essentially the same and that Poultry differs significantly from both Beef and Meat Con dence intervals for individual group population means The 95 Confidence Intervals CIs provided in the output of Minitab s oneway ANOVA procedure offer a somewhat crude way to confirm these impressions The CIs for Beef and Meat are quite similar whereas the CI for Poultry overlaps neither of the other CIs There are two reasons for saying that the CIs offer a quotsomewhat crudequot way to compare group means 0 First when comparing two groups what criterion do we use for judging them to be different Should we use the stringent requirement that the CIs do not overlap at all as occurred just above Or should be use the more relaxed requirement that the mean of one group is not contained within the CI of the other but possibly allowing some overlap Comparisons of several means can be even more complicated 0 Second each 95 CI carries a 5 error rate So the error rate for statements based on two independent 95 CIs would be 1 7 952 975 Our intervals are not independent but the error rate for a comparison of three CIs could be nearly 142 Clearly some caution is required in interpreting Minitab39s CIs for group means One overall rule is never to draw conclusions that means are different unless the overall null hypothesis is rejected If the null hypothesis is rejected 7 especially with a very low Pvalue 7 you are quite sure that there are real differences to detect Then the CIs that overlap least must represent true group differences But 7 especially if you have many groups to compare 7 it is not always easy to know where to stop in claiming differences to be real Con dence intervals for differences between two group means In the case where we reject the null hypothesis that all group means are equal we have just discussed the use of CIs for individual means as a crude method to see which means differ from other means A more precise approach is to find CIs for differences in 7 u between the population means of two groups The corresponding difference in sample means is used as a point estimate of the difference in population means MSError is used to find the margin of error If there are a levels of the factor that is a groups or treatment levels then there is a family of a 3 7 poss1ble d1fferences In our case there are 3 d1fferences to look at There are 2 2a 2 2 several different methods of constructing these families of CIs depending on how many members of the family are important and on whether the error rate say 5 is to apply to each individual difference or to the whole family of differences We confine our discussion here to the methods of Fisher and Tukey Both of them are covered in most elementary texts and both are available as part of the oneway ANOVA procedure in recent releases of Minitab 0 Fisher39s Least Signi cant Difference LSD Essentially this method gives the same CI as Minitab39s pooled twosample ttest except that the variance estimate is MSError which pools variance information from all t groups instead of using just the two groups being compared in any one CI The error rate is valid only for each individual difference Minitab Notes for STAT 3503 Unit 25 0 Tukey39s Honest Signi cant Difference HSD This method provides CIs that are just enough longer than the ones provided by Fisher so that the error rate is valid for the family of all group differences The Tukey CIs are only approximate for unbalanced designs but are of practical use unless the sample sizes of the groups are quite different These two multiple comparison procedures may be invoked by using subcommands fisher and tukey with the command oneway or by marking the appropriate options boxes in Windows You should look at the results of both Fisher and Tukey procedures for the current dataset Here we show the menu path and the commands but not the output STAT D ANOVA 13gt Oneway Comparisons Fisher 596 Tukey 59s MTB gt oneway cll 12 SUBCgt Fisher 5 Actually 5 is the default error SUBCgt Tukey 5 level and need not be specified A difference between two group sample means is considered to be significant if its confidence interval does not contain 0 that is if its endpoints both have the same sign For our data it should be no surprise by now that according to both Fisher and Tukey procedures the differences BeefPoultry and MeatPoultry are significant and BeefMeat is not Problems 241 Use the Fisher LSD method to interpret the pattern of differences among group means for the hot dog data 242 Show that the formula in the text for the Fisher LSD method gives the same results as the output from Minitab s procedure Recall that this is an unbalanced design so that the three LSDs are not all equal Use the group means and MSError given in the ANOVA outputs from the previous section 243 Use the Tukey HSD method to interpret the pattern of differences among group means 244 Show that the formula in your text for the Tukey HSD method gives the same numerical results as the output from Minitab s procedure Recall that this is an unbalanced design so that the Minitab output and the formulas in the text give only approximate results Again here use the group means and MSError given in the ANOVA outputs from the previous section 25 Checking Assumptions The analysis of variance assumes that data are normally distributed and that the population variance is the same for each group Looking at the dotplots for the three groups we see no evidence of unequal variances Furthermore the sample standard deviations shown in the ANOVA outputs are nearly equal We could do one of several tests of the hypothesis of equal variances but there appears to be no evidence for rejecting this hypothesis If the original data are normally distributed each group about its own population mean then the residuals taken together should have a normal distribution One way to investigate the normality of data is to make a normal probability plot For normal data the points on such a plot should lie nearly in a straight line While the normal probability plot of the residuals does show clear evidence that they are not normal the degree of departure from normal is not enough to call into doubt our conclusions from the ANOVA Sample sizes are moderately large and there is no evidence of extreme outliers or skewness Minitab Notes for STAT 3503 Unit 26 GRAPH E9 Probability plot Normal shows bands expected to contain normal data or STAT E3 Basic Egt Normality test AndersonDarling no bands MTB gt nsco 013 014 MTB gt name 013 RESIl cl4 NSResil perhaps C13 already named MTB gt gstd MTB gt plot 013 014 Scatterplot NSResil a 15 2 7 2 7 3 2 7 k 7 2 00 22 7 2 2 7 32 7 2 7 2 71 5 7 k k 7 k a a a a aaRESIl 760 74o 720 0 2o 40 Probability Plot of RESI1 Normal 95 CI Mean 160530E14 StDeV 2392 95 N 54 AD 0918 90 PValue 0018 80 m a s 60 u m I a 40 30 20 m 5 1 I 80 o 40 20 0 2390 40 60 80 Minitab Notes for STAT 3503 Unit 27 A dotplot of the residuals shows the nature of the nonnormality the distribution is bimodal Furthermore when the dotplot of residuals is separated out by type of hot dog we see that the bimodal pattern seems to appear for each type Some factor unrecognized in our dataset that cuts across our three quottypesquot seems to be important in determining the caloric content of hot dogs PLOT E9 Character E9 Dotplot MTB gt gstd MTB gt dotp cl3 PLOT 3 Character E9 Dotplot By variable MTB gt gstd MTB gt dotp cl3 SUBCgt by 012 Type 1 Resil Type 2 Resil Type 3 Resil 6O 4O 20 O 20 40 Notice that for this simple model the residuals for the three types are just translated versions of the original data within each type We might have noticed the bimodality in the dotplots we made at the start of this unit However the pattem of bimodality is much more striking when all 58 residuals are plotted together The cause of the bimodality is not difficult to discover if one reads the Consumer Reports article carefully there are quotlargequot and quotsmallquot hot dogs in each group Some hot dogs have more calories not because their formulation is richer in calories but just because they are larger in size It might be argued that presenting data on a quotper dogquot basis makes sense because people usually eat hot dogs one dog at a timeirather than one ounce at a time But it can be shown that the bimodality disappears if the data are presented in terms of calories per ounce Problems 251 Use menus in Minitab to do an AndersonDarling test of the null hypothesis that the data t a normal distribution Say what menu path you used What is your conclusion 252 Use menus to do Bartlett39s test for homogeniety of variances Say what menu path you used What is your conclusion 253 Use menus stacked oneway ANOVA to nd the quot tsquot for this ANOVA How are the quot tsquot found for each group in this case Make a scatterplot ofresiduals vs f1ts GRAPH 12gt Plot Yresiduals Xfits and interpret the result 26 Minitab Notes for STAT 3503 Unit 28 A Nonparametric Test As mentioned in Unit 1 nonparametric alternatives are available for some experimental designs including the completely randomized oneway design Below we show the KruskalWallis test of the null hypothesis that all three population medians are equal against the alternative that they are not all equal This test is a generalization of the twosample MannWhitneyWilcoxon rank sum test The KruskalWallis test does not make the assumption that the populations are normal and so it may be useful if we are concerned that the data may depart from normal enough to spoil our conclusion from an ANOVA of the kind we did above It does assume that the population distributions are continuous and have the same shape For normal data this test is less powerful less likely to detect real differences than the ANOVA Here highly signi cant differences among group medians are in fact detected STAT D Nonparametric D Kruskal MTB gt kruskal Calories Type KruskalWallis Test Calories versus Type Kruskal Wallis Test on Calories Type N Median Ave Rank Z 1 20 1525 331 202 2 17 1530 335 189 3 17 1290 149 399 Overall 54 275 Hl589 DF2 P0000 H 1590 DF 2 P 0000 adjusted for ties Con dence intervals for individual group means each based only on the information in one group can be found from unstacked data using methods similar to those of the Wilcoxon signed rank test For the hot dog data results are very similar to those displayed by Minitab39s oneway ANOVA procedure STAT E9 Nonparametric E9 Wilcoxon 1samp1e MTB gt WInterval 950 Beef Meat Poultry Wilcoxon Signed Rank Cl Beef Meat Poultry Confidence Estimated Achieved Interval N Median Confidence Lower Upper Beef 20 1573 950 1450 1675 Meat 17 1595 948 1430 1725 Poultry 17 1220 948 1080 1375 Problem 261 An approximate nonparametric test results from ranking the data and performing a standard ANOVA on the ranks ignoring that the ranks are not normal If we rank the data in 39Calories39 then the smallest Calorie value will be assigned rank 1 and the largest will be assigned rank 54 Below are commands to carry out the procedure which gives results similar to those already seen Notice that the resulting con dence intervals are on the rank scale Approximately what are the Calorie values that correspond to the endpoints shown for the three con dence intervals Minitab Notes for STAT 3503 Unit 29 MTB gt name 15 RnkCal MTB gt rank Calorie RnkCal MTB gt onew RnkCal Type 27 A Simulation A simulation can show the danger of quotshoppingquot for significant differences between groups when the overall null hypothesis has not been rejected One way to do this is to simulate data from several groups with equal means Problem 271 Use Minitab s capability to generate random samples Sample 10 observations from each of 15 groups all known to have a normal distribution with mean 100 and standard deviation 10 Thus we know that there are no real differences among means Yet by comparing the two groups that happen to have the largest and smallest group sample means we can often find a bogus signi cant difference with the Fisher procedure CALC D Make Patterned Data D Simple Store in c22 From 1 to 15 List each 10 times CALC D Random Data D Normal 150 rows in column c21 mean 100 sd 10 STAT D ANOVA D Oneway Comparison Fisher 596 In the display of CIS generated by the Fisher procedure look for at least one that does not cover 0 thus indicating a bogus quotsigni cantquot difference in group means Make several runs until you nd such a result In successive runs of this simulation the quotpatterned dataquot step need not be repeated If possible do this as a class project Make as many runs as your instructor asks recording for each run a whether the overall null hypothesis is rejected at the 5 level and b whether you find a bogus signi cant difference between most extreme groups For the class as a whole we suggest summarizing the results of 100 runs on the board The expected number of overall null hypotheses rejected is of course 5 The expected number of bogus results for differences of extreme pairs is much larger How many bogus signi cant differences would you have quotfoundquot using the sensible rule that you do not do multiple comparisons at all unless the overall hypothesis is rejected Minitab Notes for Statistics 3503 by Bruce E Trumbo Department of Statistics CSU Hayward Hayward CA 94542 Copyright c 1991 1995 1997 1998 2000 2002 2004 by Bruce E Trumbo All rights reserved These notes are intended primarily for use at California State University Hayward Department of Statistics Please request permission from the author for other uses Email btrumbo csuhaywardedu Comments and corrections welcome Preparation of early versions these notes was partially supported by NSF grant USE9150433 Our interpretation of partial data taken from Consumer Reports is not intended to imply by the publisher Consumers Union Modi ed 104


Buy Material

Are you sure you want to buy this material for

25 Karma

Buy Material

BOOM! Enjoy Your Free Notes!

We've added these Notes to your profile, click here to view them now.


You're already Subscribed!

Looks like you've already subscribed to StudySoup, you won't need to purchase another subscription to get this material. To access this material simply click 'View Full Document'

Why people love StudySoup

Bentley McCaw University of Florida

"I was shooting for a perfect 4.0 GPA this semester. Having StudySoup as a study aid was critical to helping me achieve my goal...and I nailed it!"

Allison Fischer University of Alabama

"I signed up to be an Elite Notetaker with 2 of my sorority sisters this semester. We just posted our notes weekly and were each making over $600 per month. I LOVE StudySoup!"

Jim McGreen Ohio University

"Knowing I can count on the Elite Notetaker in my class allows me to focus on what the professor is saying instead of just scribbling notes the whole time and falling behind."


"Their 'Elite Notetakers' are making over $1,200/month in sales by creating high quality content that helps their classmates in a time of need."

Become an Elite Notetaker and start selling your notes online!

Refund Policy


All subscriptions to StudySoup are paid in full at the time of subscribing. To change your credit card information or to cancel your subscription, go to "Edit Settings". All credit card information will be available there. If you should decide to cancel your subscription, it will continue to be valid until the next payment period, as all payments for the current period were made in advance. For special circumstances, please email


StudySoup has more than 1 million course-specific study resources to help students study smarter. If you’re having trouble finding what you’re looking for, our customer support team can help you find what you need! Feel free to contact them here:

Recurring Subscriptions: If you have canceled your recurring subscription on the day of renewal and have not downloaded any documents, you may request a refund by submitting an email to

Satisfaction Guarantee: If you’re not satisfied with your subscription, you can contact us for further help. Contact must be made within 3 business days of your subscription purchase and your refund request will be subject for review.

Please Note: Refunds can never be provided more than 30 days after the initial purchase date regardless of your activity on the site.