### Create a StudySoup account

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

Already have a StudySoup account? Login here

# Class Note for EMSE 171 with Professor Dorp at GW (2)

### View Full Document

## 16

## 0

## Popular in Course

## Popular in Department

This 31 page Class Notes was uploaded by an elite notetaker on Saturday February 7, 2015. The Class Notes belongs to a course at George Washington University taught by a professor in Fall. Since its upload, it has received 16 views.

## Reviews for Class Note for EMSE 171 with Professor Dorp at GW (2)

### 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: 02/07/15

EMSE 171271 DATA ANALYSIS For Engineers and Scientists Session 11 One Way Analysis of Variance ANOVA THE GE 0 RG E WASHINGTON UNIVERSITY WASHINGTON DC Lecture Notes by J Ren van Dorp1 wwwseasgwuedudorpjr 1 Department of Engineering Management and Systems Egineering School of Engineering and Applied Science The George Washington University 1776 G Street NW Suite 110 Washington DC 20052 Email dorpjrgwuedu ONEWAY ANOVA Summary of Tests Univariate T test H0 L M0 H1 1 7E M0 Scalar M0 is speci ed Compare Independence within Sample A Sample x X11 X12 X1n H0 Two Sample Univariate Ttest H0 M1 M2 H1 M1 7E M2 4 Independence within Samples x and y 77 Compare Sampley y11 Y12 y1n V133 Independence between Sample x and Sample y EMSE 171271 FALL 2006 JR van Dorp 112906 dorpjrgwuedu Page 281 ONEWAY ANOVA Summary of Tests Hotelling T2 test H0 p 0 H1 p 7E 0 Vector 40 is speci ed Compare lndependence within Sample i gt A a Sample 1 X11 1 X12 g X1n H10 0 C 0 X EX 5 X g a a Sample2 21 5 2 2n C E E I 8 a lt5 a m U E 5 D I Sample p Xp1 g Xp2 Xpn Hod x I a vector observation EMSE 171271 FALL 2006 JR van Dorp 112906 dorpjrgwuedu Page 282 ONEWAY ANOVA Summary of Tests Two Sample Hote ing Tz test H0 11 42 H1 11 75 M2 4 lndependence within Sample i gt D Sample 1 X11 l X12 g X1n 8 C 3 a s g 8 a Sample 2 X21 5X22 X2n C E E 8 5 U m m D D I l 7 Sample p Xp1 g Xp2 Xpn lndepe lence within Sample i gt Compare CD Sample 1 3 11 EY12 Y1n E C 8 i g T g 8 a Sample 2 V21 3 22 Y2n C E E 8 5 5 a m D D I l Sample p yp1 g yp2 ypn 375 r EMSE 171271 FALL 2006 JR van Dorp 112906 dorpjrgwuedu Page 283 ONEWAY ANOVA Objective of Analysis of Variance ANOVA lt lndependence within Sample i Introduction x x x a Sample 1 11 12 1n 1 H10 p 0 g 8 3 Sample 2 X21 X22 X211 H20 2 2 g Q 8 5 g Paired g m Comp e arisons Sample p Xp1 Xp2 Xpn Xp Mp0 Tensile Strength Example The tensile strength of synthetic fiber used to make cloth for men39s shirts is of interest to a manufacturer It is suspected that the strength is affected by the percentage of cotton in the fiber Five levels of cotton percentages are of interest 15 20 25 30 and 35 Five observations are to be taken at each level of cotton percentage and the 25 total observations are to be run in random order 5 Total number of paired comparisons 2 10 EMSE 171271 FALL 2006 JR van Dorp 112906 dorpjrgwuedu Page 284 ONEWAY ANOVA Introduction It seems that this problem can be solved by performing a two sample t test on all possible pairs However this solution would be incorrect since it would lead to a considerable distortion in the type I error Tensile Strength Example There are 10 possible pairs If the probability of accepting the null hypothesis there is no difference between a pair for all 10 tests is 1 0 095 then the probability of correctly accepting the null hypothesis for all 10 tests ie there is no difference between the 10 samples equals 09510 060 ltgt Type 1 error 1 060 040 if the tests are independent Thus a substantial increase of Type I error has occurred The appropriate procedure for testing equality of several means in the setting above is the ANALYSIS OF VARIANCE It is interesting to note that we are testing equality of means here by analyzing variances To see how does works we need to study some of the mechanics EMSE 171271 FALL 2006 JR van Dorp 112906 dorpjrgwuedu Page 285 ONEWAY ANOVA Introduction In ANOVA samples are referred to as quottreatmentsquot Hence we have 4 Independence within Treatment i gt 0 Treatment 1 X11 X12 X1n YR M10 2 2 P C C 8 g Treatment2 X21 X22 X2n X22 H29 2 C 33 3 Paired g m i Comp r gt arisons Treatment p Xp1 Xp2 Xpn X39p Hpg39 239 1 p XijZMTi ij 1 j n L a parameter common to all treatments called the overall mean Ti a parameter unique to the i th treatment called the treatment e ett eij a random error component eij N N0 a for all i and EMSE 171271 FALL 2006 JR van Dorp 112906 dorpjrgwuedu Page 286 ONEWAY ANOVA Mechanics The mean of treatment i equals the sum of the overall mean plus the i th treatment effect 13 p Ti i 1 1 Convention E Ti 0 i1 We are interested in testing the equality of the 10 treatment means H0 M1 L2 up H1 m 75 foraleastoneij If H 0 is true all treatments have common mean M An equivalent way to write the above hypotheses is in terms of the treatment effects Ti H0371 7392 Tp 0H1739Z75 0 foraleastonei Notation n 1 16 E ZUZ39j Ei Ui n J1 p n 1 13 E E ibij 5 xquot N np total number of observations j1 j1 EMSE 171271 FALL 2006 JR van Dorp 112906 dorpjrgwuedu Page 287 ONEWAY ANOVA Mechanics 0 Total sum of squares SST in I fi39 Ei39 Equot2 Z 2 mz22cij 51 3Z Jr l E 2 2 imj ZUZ 2 1 2 51 EZ 5 4 2 ilt z E 2 xlj 5 U E 2 Cross product term equals zero because TL TL E ivj 51 E Uij nfinfi nEZ0 i1 i1 EMSE 171271 FALL 2006 JR van Dorp 112906 dorpjrgwuedu Page 288 ONEWAY ANOVA Mechanics 0 Total sum of squares p n n p SST Z in Z xij fry n ii inf i1 i1 i1 j1 i1 Of SST SSTreatmem s where P n p n SSE 2 mm Z Ecum i1 i1 i1 j1 The sum of squares Within an treatment i summed over all treatments 13 E 2 SSTreatmem s n 15139 6 i1 The sum of squares of treatment means 3 against the overall mean in EMSE 171271 FALL 2006 JR van Dorp 112906 dorpjrgwuedu Page 289 ONEWAY ANOVA Mechanics The sample variance in the i th treatment equals 1 n n 5Z2 n 1Zmij 102 ltgt n 1SZ2 i2 j1 i1 These Sf39s can be combined to get an estimate of overall variance as follows TL Dis 2 2 amp W lm pal np p 131quot Ei 2 1J amp Sl N p N p TL z1 j Recalling eij N N 0 a and denoting SSE MS E Np gtEMSE El 39UIH E1352 1302 02 iii p F1 EMSE 171271 FALL 2006 JR van Dorp 112906 dorpjrgwuedu Page 290 ONEWAY ANOVA Mechanics Recalling eij N N 0 a observe that the estimators of the i th treatment means 1 H Xi E Xi J n J1 are all random variables i 1 pwith common variance 0271 0 If the treatments means are all equal we also have that 7 mix ii I ij p i1 n j1 np i1 j1 is an unbiased estimate of the common treatment mean M 0 Hence if the treatments means are all equal 1 El p 1 Z Ya 732 0 2ltgtEl flit if 02 P TL 1 EMSE 171271 FALL 2006 JR van Dorp 112906 dorpjrgwuedu Page 291 ONEWAY ANOVA Mechanics Denoting TL Z 72 i1 p 1 p 1 p 712Yi X2 M STreatmem s Treatment 10 11 we have when all the treatments means are equal 2 EMSTreatmem s a It can be shown that if the treatment means are not necessarily equal EMSTreatments 02 n Elf39239 We have shown that regardless of the value of the treatment means SSE EMSE E EMSE 171271 FALL 2006 JR van Dorp 112906 dorpjrgwuedu Page 292 ONEWAY ANOVA Mechanics Conclusion If the value of M STreatments is close to that of M S E this can be seen as an indication that the treatment means are equal Moreover if the treatment means are different it follows that M STreatments is larger than MSE But how large does M STreatments have to be before we decide that the treatment means are different MSTreatmem s SSTreatmem sp N F MSE SSEN p p LN p Hence when MSTreatmem s F0 M S39E gt Fp17p1 0 we reject the null hypothesis of no differences between the treatment means p Value of this hypothesis test equals P7 Fp17vp gt M STreatments M S E EMSE 171271 FALL 2006 JR van Dorp 112906 dorpjrgwuedu Page 293 ONEWAY ANOVA Mechanics 0 ANALYSIS OF VARIANCE ANOVA TABLE Source Sum of Degrees of Mean F0 Squares Freedom Square Bemeen SSTreatmem s p 1 MSTreatmem W treatments Error S S E N p M S E within treatments Total SST N 1 Convenient calculation formulas also for the unbalanced case p m 2 13 SST Z N i1 j1 i1 2 2 I7 51 Z I SSTreatmem s E i1 i N unbalanced different number of observations in each treatment EMSE 171271 FALL 2006 JR van Dorp 112906 dorpjrgwuedu Page 294 ONEWAY ANOVA Example Tensile Strength Example The tensile strength of synthetic fiber used to make cloth for men39s shirts is of interest to a manufacturer It is suspected that the strength is affected by the percentage of cotton in the fiber Five levels of cotton percentage are of interest 15 20 25 30 and 35 Five observations are to be taken at each level of cotton percentage and the 25 total observations are to be run in random order Table Tensile Strength of Synthetic Fiber lbin2 Percentage of Observations Cotton 1 2 3 4 5 xi 15 7 7 15 1 1 9 49 20 12 17 12 18 18 77 25 14 18 18 19 19 88 30 19 25 22 19 23 108 35 7 10 1 1 15 1 1 54 X 376 EMSE 171271 FALL 2006 JR van Dorp 112906 dorpjrgwuedu Page 295 ONEWAY ANOVA Example Degrees Source of Sum of of Mean Variation Squares Freedom Square FO pvalue SSTreatments 47576 4 11894 1476 913EO6 SSE 1612 20 806 SST 63696 24 p Value lt 0 for 0 E 1 5 10 gt Reject Hg for all these 0439s Conclusion At least one of the treatment means differs 0 Estimation of parameters can be done using the least squares approach similar to linear regression analysis Recall Xij r Ti eij ZYquot 7 i Yi Yui 1p 7 u 32ZMSEZSSENp EMSE 171271 FALL 2006 JR van Dorp 112906 dorpjrgwuedu Page 296 ONEWAY ANOVA Confidence Intervals 1001 a con dence intervals treatment means Mi Xi l ta27Np 2500 1 i i i A i U 1 1 1 1 2000 L quotL L quot1 H U 1 1 1 1 a 1 1 1 1 93 1 A 1 1 1 g 1 1 1 1 g 1500 7 777777777777 7777 7 7777 7777 quot9 7777 77777777777 777777777777 H C 1 1 1 1 Q 1 1 1 1 E A i i i i C 1 1 1 1 I 1000 a 77777777777 r1 77777777777 777777777777 r1 77777777777 1 777777777777 8 I 1 1 1 1 o 1 1 1 1 500 l l l l 1 2 3 4 5 Treatment 9 Lower Bound 5 I Mean A Upper Bound 95 EMSE 171271 FALL 2006 JR van Dorp 112906 dorpjrgwuedu Page 297 ONEWAY ANOVA Con denceInunvak One way ANOVA 1 Source Factor Error Total S Level 15 20 25 30 35 2839 U IU IU IU IU IZ 15 17 21 10 Pooled StDev 5 20 25 30 35 SS MS F P 47576 11894 1476 0000 16120 806 63696 R Sq 7469 R Sqadj 6963 Individual 90 CIs For Mean Based on Pooled StDev Mean StDev 800 3347 400 3130 600 2074 600 2608 800 2864 100 150 200 250 2839 EMSE171Q71FALL2006 JR van Dorp 112906 dorpjrgwuedu Page 298 ONEWAY ANOVA Confidence Intervals MINITAB BOX Plot of Treatment Means BOXpIOt 0f 1500 ZOOo 2500 3000 35 o 25 20 3 8 15 1039 5 I I I I I 15 20 25 30 35 EMSE 171271 FALL 2006 JR van Dorp 112906 dorpjrgwuedu Page 299 ONEWAY ANOVA Confidence Intervals 1001 a con dence intervals difference treatment means Mi Mk Xi 7k 1 ta27Np 2MSE7 L Comparison of M3 to other treatment means 1500 1000 7777 J 77777777777 77777777777 77777777777 7777 77 7777 n 2 I 1 1 1 1 2 1 1 1 1 D L quotL quoti quoti H 15 500 1 1 1 o 8 1 I 1 1 1 5 000 1 1 I 1 1 E 39 1 0 1 1 A 1 g 1 1 2 1 3 1 4 1 5 O 1 1 1 I 1 5007 777777777777 71 77777777777 71 77777777777 quot1 77777777777 quot1 77777777777 n 1 1 1 o 1 1000 1 1 1 1 Treatment 9 Lower Bound 5 I Mean A Upper Bound 95 Conclusion We only fail to reject the nullHypothesis that 43 42 EMSE 171271 FALL 2006 JR van Dorp 112906 dorpjrgwuedu Page 300 ONEWAY ANOVA Contrasts Using the 1001 04 confidence intervals for differences of treatment means of M3 Mk k 1 2 4 and 5 we tested the hypotheses H03M3IMI 7H13M375M These hypotheses could be tested by investigating an appropriate linear combination of treatment totals say X3 Xk If we had suggested that the average of cotton percentages 1 and 3 did not differ from the average of cotton percentages 4 and 5 then the hypothesis would have been H03M1M3ZM4M5H13M1M375M4M5 which implies the linear combination X1X3 X4 X5 0 p p A linear combination of treatments totals C such that ZCZ39 0 is i1 i1 called a contrast EMSE 171271 FALL 2006 JR van Dorp 112906 dorpjrgwuedu Page 301 ONEWAY ANOVA Contrasts The sum of squares for any contrast equals 17 550 Zcixi2i 1mcg z where m is the number of observations in treatment i and it has a single degree of freedom and hence M So S39ch Hence MSG ssc MSE SSEN p Conclusion Many important comparisons regarding treatment means may be made using contrasts 13 Two contrasts and are orthogonal when Zcidi 0 i1 EMSE 171271 FALL 2006 JR van Dorp 112906 dorpjrgwuedu Page 302 ONEWAY ANOVA Contrasts For 10 treatments a set of p 1 orthogonal contrast partition the sum of squares due to treatments into 10 1 independent single degree of freedom components Thus the test performed on orthogonal contrast are independent Hence if the type 1 error of each individual test is 1 0 the type 1 error of the p 1 orthogonal contrast tests equals 1 0p1 Without orthogonality of these contrasts we cannot say anything about the combined type 1 error probability There are many ways to choose orthogonal contrast coefficient for a given set of treatments For example if there are p 3 treatments with treatment 1 a control and treatments 2 and 3 actual levels of the factor of interest then appropriate orthogonal contrast might be as follows Treatment 1Control Treatment 2Level 1 Treatment 3 LevelZ CZ 2 1 1 di 0 1 1 EMSE 171271 FALL 2006 JR van Dorp 112906 dorpjrgwuedu Page 303 ONEWAY ANOVA Contrasts Contrast coefficient must be chosen prior to running the experiment and prior to examining the data Otherwise bias in Type I error may occur Tensile Strength Example H02M4ZM5 01Z X4X5 Compares the average of Treatment 4 and with that of Treatment 5 H03M1M3ZM4M5 C2X1X3 X4 X5 Compares the average of Treatments 1 and 3 with that of Treatments 4 and 5 HOEMZLg 03X1 X3 Compares the average of Treatment 1 and with that of Treatment 3 H0 3402 M1M3 M4M504 X14X2 X3 X4 X5 Compares the average of Treatments 2 with that of Treatments 1 3 4 and 5 Notice that the contrast coef cients are orthogonal EMSE 171271 FALL 2006 JR van Dorp 112906 dorpjrgwuedu Page 304 ONEWAY ANOVA Contrasts Degrees Source of Sum of of Mean Variation Squares Freedom Square F0 pvalue C1 2916 1 2916 3618 701E06 C2 3125 1 3125 388 630 C3 1521 1 1521 1887 315E04 C4 081 1 081 010 755 SSTreatments 47576 4 11894 1476 913E06 885 1612 20 806 SST 63696 24 Conclusion There are differences between the treatment means Furthermore differences are observed between Treatment 4 and Treatment 5 C1 and differences of Treatment 1 and Treatment 3 C3 No difference is observed between the average of 1 and 3 and the average of 4 and 5 C2 No difference is observed between treatment 2 and the average of treatments 1 3 4 and 5 C4 EMSE 171271 FALL 2006 JR van Dorp 112906 dorpjrgwuedu Page 305 ONEWAY ANOVA Model Adequacy Checking It was assumed in the model that the error terms eij are normal distributed with a mean 0 and a variance 02 The normality assumptions of the residuals eij can be checked via a normal probability plot It is important to recognize that we are testing the equality of treatment means by testing for the equality of variances The required assumption that allows us to do this is that the variance of the error terms eij is constant across treatments i 1 p The assumption of equality of variance may be visually veri ed by plotted the residuals of each treatment against one another Alternatively we may also use Bartlett39s test to test for equality of variance across treatment EMSE 171271 FALL 2006 JR van Dorp 112906 dorpjrgwuedu Page 306 ONEWAY ANOVA Model Adequacy Checking Residual Plots for C1 Normal Probability Plot of the Residuals Residuals Versus the Fitted Values 99 5390 O 90 2 5 o E Tsquot I o 39 g 50 0390 o 1 p a 25 o 10 o o 1 50 50 25 00 25 50 100 125 150 175 200 Residual Fitted Value Histogram of the Residuals Residuals Versus the Order of the Data 60 50 1 quotMA A m JVVVVV 00 50 4 2 0 2 4 2 4 6 8 10 12 14 16 18 20 22 24 Residual Observation Order Frequency Residual EMSE 171271 FALL 2006 JR van Dorp 112906 dorpjrgwuedu Page 307 ONEWAY ANOVA Model Adequacy Checking Probability Plot of RES11 Normal 95 CI 99 Mean 0 StDev 2839 95 N 25 90 AD 0465 PValue gt0250 Pe rce nt 0quot I 10 EMSE 171271 FALL 2006 JR van Dorp 112906 dorpjrgwuedu Page 308 ONEWAY ANOVA Model Adequacy Checking Bartlett39s Test for Equality of Variance across treatments H0 012 a 0123 H1 Not true for at least one 012 Test Statistic 1 X3 E N X24 2 p 2 p q N p X LnSpOOled 1 X LnSZ N s2 Z2 1 Z1 1V 1 pooled 7 C T 1101 Z Tensile Strength Example N 25 p 5 830016 m 806q m103c m110xg 093 p value 092 Conclusion Fail to Reject the null Hypothesis EMSE 171271 FALL 2006 JR van Dorp 112906 dorpjrgwuedu Page 309 ONEWAY ANOVA Model Adequacy Checking Test for Equal Variances for Tensile Strength 15 39 o I Ba Itlett39s Test I Test Statistic 093 PVa lue 0920 20 i 0 i Levene39s Test Test Statistic 032 s 25 I o I PValue 0863 30 i o I 35 i o l l I O 2 4 6 8 10 12 14 16 95 Bonferroni Confidence Intervals for StDevs EMSE 171271 FALL 2006 JR van Dorp 112906 dorpjrgwuedu Page 310

### 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

#### "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!"

#### "Selling my MCAT study guides and notes has been a great source of side revenue while I'm in school. Some months I'm making over $500! Plus, it makes me happy knowing that I'm helping future med students with their MCAT."

#### "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."

### Refund Policy

#### STUDYSOUP CANCELLATION 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 support@studysoup.com

#### STUDYSOUP REFUND POLICY

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: support@studysoup.com

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 support@studysoup.com

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.