Analysis of Variance (ANOVA) and Multivariate Analysis of Variance (MANOVA) Session 6.

Slides:



Advertisements
Similar presentations
Test of (µ 1 – µ 2 ),  1 =  2, Populations Normal Test Statistic and df = n 1 + n 2 – 2 2– )1– 2 ( 2 1 )1– 1 ( 2 where ] 2 – 1 [–
Advertisements

Chapter 11 Analysis of Variance
1 Chapter 10 Comparisons Involving Means  1 =  2 ? ANOVA Estimation of the Difference between the Means of Two Populations: Independent Samples Hypothesis.
Chapter 10 Comparisons Involving Means
1 1 Slide © 2011 Cengage Learning. All Rights Reserved. May not be scanned, copied or duplicated, or posted to a publicly accessible website, in whole.
ANOVA: Analysis of Variation
1 1 Slide © 2009, Econ-2030 Applied Statistics-Dr Tadesse Chapter 10: Comparisons Involving Means n Introduction to Analysis of Variance n Analysis of.
Statistics for Managers Using Microsoft® Excel 5th Edition
Part I – MULTIVARIATE ANALYSIS
Chapter 11 Analysis of Variance
Statistics for Managers Using Microsoft® Excel 5th Edition
Introduction to the Analysis of Variance
Lecture 9: One Way ANOVA Between Subjects
1 Pertemuan 19 Analisis Ragam (ANOVA)-1 Matakuliah: A0064 / Statistik Ekonomi Tahun: 2005 Versi: 1/1.
Copyright © 2010 Pearson Education, Inc. Publishing as Prentice Hall Statistics for Business and Economics 7 th Edition Chapter 15 Analysis of Variance.
Statistics for Managers Using Microsoft Excel, 4e © 2004 Prentice-Hall, Inc. Chap 10-1 Chapter 10 Analysis of Variance Statistics for Managers Using Microsoft.
Chap 10-1 Analysis of Variance. Chap 10-2 Overview Analysis of Variance (ANOVA) F-test Tukey- Kramer test One-Way ANOVA Two-Way ANOVA Interaction Effects.
Chapter 12: Analysis of Variance
1 1 Slide © 2008 Thomson South-Western. All Rights Reserved Slides by JOHN LOUCKS & Updated by SPIROS VELIANITIS.
1 1 Slide © 2003 South-Western/Thomson Learning™ Slides Prepared by JOHN S. LOUCKS St. Edward’s University.
CHAPTER 3 Analysis of Variance (ANOVA) PART 1
Statistics Design of Experiment.
1 1 Slide 統計學 Spring 2004 授課教師:統計系余清祥 日期: 2004 年 3 月 30 日 第八週:變異數分析與實驗設計.
1 1 Slide © 2014 Cengage Learning. All Rights Reserved. May not be scanned, copied or duplicated, or posted to a publicly accessible website, in whole.
QNT 531 Advanced Problems in Statistics and Research Methods
12-1 Chapter Twelve McGraw-Hill/Irwin © 2005 The McGraw-Hill Companies, Inc., All Rights Reserved.
1 1 Slide © 2006 Thomson/South-Western Slides Prepared by JOHN S. LOUCKS St. Edward’s University Slides Prepared by JOHN S. LOUCKS St. Edward’s University.
1 1 Slide © 2005 Thomson/South-Western Chapter 13, Part A Analysis of Variance and Experimental Design n Introduction to Analysis of Variance n Analysis.
1 1 Slide © 2008 Thomson South-Western. All Rights Reserved Chapter 13 Experimental Design and Analysis of Variance nIntroduction to Experimental Design.
Copyright © 2013, 2010 and 2007 Pearson Education, Inc. Chapter Comparing Three or More Means 13.
1 1 Slide Analysis of Variance Chapter 13 BA 303.
© 2003 Prentice-Hall, Inc.Chap 11-1 Analysis of Variance IE 340/440 PROCESS IMPROVEMENT THROUGH PLANNED EXPERIMENTATION Dr. Xueping Li University of Tennessee.
© 2002 Prentice-Hall, Inc.Chap 9-1 Statistics for Managers Using Microsoft Excel 3 rd Edition Chapter 9 Analysis of Variance.
CHAPTER 12 Analysis of Variance Tests
Basic concept Measures of central tendency Measures of central tendency Measures of dispersion & variability.
Chapter 9 Analysis of Variance COMPLETE BUSINESS STATISTICSby AMIR D. ACZEL & JAYAVEL SOUNDERPANDIAN 7th edition. Prepared by Lloyd Jaisingh, Morehead.
1 Chapter 13 Analysis of Variance. 2 Chapter Outline  An introduction to experimental design and analysis of variance  Analysis of Variance and the.
TOPIC 11 Analysis of Variance. Draw Sample Populations μ 1 = μ 2 = μ 3 = μ 4 = ….. μ n Evidence to accept/reject our claim Sample mean each group, grand.
Testing Hypotheses about Differences among Several Means.
Chapter 19 Analysis of Variance (ANOVA). ANOVA How to test a null hypothesis that the means of more than two populations are equal. H 0 :  1 =  2 =
17-1 COMPLETE BUSINESS STATISTICS by AMIR D. ACZEL & JAYAVEL SOUNDERPANDIAN 6 th edition (SIE)
Lecture 9-1 Analysis of Variance
Analysis of Variance (One Factor). ANOVA Analysis of Variance Tests whether differences exist among population means categorized by only one factor or.
1 ANALYSIS OF VARIANCE (ANOVA) Heibatollah Baghi, and Mastee Badii.
Chapter 12 Introduction to Analysis of Variance PowerPoint Lecture Slides Essentials of Statistics for the Behavioral Sciences Eighth Edition by Frederick.
12-1 Chapter Twelve McGraw-Hill/Irwin © 2006 The McGraw-Hill Companies, Inc., All Rights Reserved.
Chapter 4 Analysis of Variance
Econ 3790: Business and Economic Statistics Instructor: Yogesh Uppal
Econ 3790: Business and Economic Statistics Instructor: Yogesh Uppal
Chap 11-1 A Course In Business Statistics, 4th © 2006 Prentice-Hall, Inc. A Course In Business Statistics 4 th Edition Chapter 11 Analysis of Variance.
Copyright © 2016, 2013, 2010 Pearson Education, Inc. Chapter 10, Slide 1 Two-Sample Tests and One-Way ANOVA Chapter 10.
Formula for Linear Regression y = bx + a Y variable plotted on vertical axis. X variable plotted on horizontal axis. Slope or the change in y for every.
1/54 Statistics Analysis of Variance. 2/54 Statistics in practice Introduction to Analysis of Variance Analysis of Variance: Testing for the Equality.
ENGR 610 Applied Statistics Fall Week 8 Marshall University CITE Jack Smith.
 List the characteristics of the F distribution.  Conduct a test of hypothesis to determine whether the variances of two populations are equal.  Discuss.
1 1 Slide © 2008 Thomson South-Western. All Rights Reserved Slides by JOHN LOUCKS St. Edward’s University.
Chapter 13 Analysis of Variance (ANOVA). ANOVA can be used to test for differences between three or more means. The hypotheses for an ANOVA are always:
ANOVA: Analysis of Variation
Chapter 10 Two-Sample Tests and One-Way ANOVA.
ANOVA: Analysis of Variation
Comparing Three or More Means
Statistics Analysis of Variance.
Statistics for Business and Economics (13e)
Econ 3790: Business and Economic Statistics
Chapter 11 Analysis of Variance
One-Way Analysis of Variance
Chapter 10 – Part II Analysis of Variance
STATISTICS INFORMED DECISIONS USING DATA
Presentation transcript:

Analysis of Variance (ANOVA) and Multivariate Analysis of Variance (MANOVA) Session 6

Using Statistics. The Hypothesis Test of Analysis of Variance. The Theory and Computations of ANOVA. The ANOVA Table and Examples. Further Analysis. Models, Factors, and Designs. Two-Way Analysis of Variance. Blocking Designs. Using the Computer. Summary and Review of Terms. Analysis of Variance

ANOVA (ANalysis Of VAriance) is a statistical method for determining the existence of differences among several population means. ANOVA is designed to detect differences among means from populations subject to different treatments. ANOVA is a joint test The equality of several population means is tested simultaneously or jointly. ANOVA tests for the equality of several population means by looking at two estimators of the population variance (hence, analysis of variance). 6-1 ANOVA: Using Statistics

In an analysis of variance: We have r independent random samples, each one corresponding to a population subject to a different treatment. We have: n = n 1 + n 2 + n n r total observations. r sample means: x 1, x 2, x 3,..., x r  These r sample means can be used to calculate an estimator of the population variance. If the population means are equal, we expect the variance among the sample means to be small. r sample variances: s 1 2, s 2 2, s 3 2,...,s r 2  These sample variances can be used to find a pooled estimator of the population variance. Analysis of Variance: Using Statistics (continued)

We assume independent random sampling from each of the r populations We assume that the r populations under study: are normally distributed, with means m i that may or may not be equal, but with equal variances,  i 2. 11 22 33  Population 1Population 2Population 3 Analysis of Variance: Assumptions

The test statistic of analysis of variance: F (r-1, n-r) = Estimate of variance based on means from r samples Estimate of variance based on all sample observations That is, the test statistic in an analysis of variance is based on the ratio of two estimators of a population variance, and is therefore based on the F distribution, with (r-1) degrees of freedom in the numerator and (n-r) degrees of freedom in the denominator. The hypothesis test of analysis of variance: H 0 :  1 =  2 =  3 =  4 =...  r H 1 : Not all m i (i = 1,..., r) are equal. 6-2 The Hypothesis Test of Analysis of Variance

x x x When the null hypothesis is true: We would expect the sample means to be nearly equal, as in this illustration. And we would expect the variation among the sample means (between sample) to be small, relative to the variation found around the individual sample means (within sample). If the null hypothesis is true, the numerator in the test statistic is expected to be small, relative to the denominator: F (r-1, n-r) = Estimate of variance based on means from r samples Estimate of variance based on all sample observations     When the Null Hypothesis Is True

xxx When the null hypothesis is false: is equal to but not to, is equal to but not to, or,, and are all unequal.           In any of these situations, we would not expect the sample means to all be nearly equal. We would expect the variation among the sample means (between sample) to be large, relative to the variation around the individual sample means (within sample). If the null hypothesis is false, the numerator in the test statistic is expected to be large, relative to the denominator: F (r-1, n-r) = Estimate of variance based on means from r samples Estimate of variance based on all sample observations When the Null Hypothesis Is False

Suppose we have 4 populations, from each of which we draw an independent random sample, with n 1 + n 2 + n 3 + n 4 = 54. Then our test statistic is: F (4-1, 54-4) = F (3,50) = Estimate of variance based on means from 4 samples Estimate of variance based on all 54 sample observations F (3,50) f ( F ) F Distribution with 3 and 50 Degrees of Freedom 2.79  =0.05 The nonrejection region (for a=0.05)in this instance is F £ 2.79, and the rejection region is F > If the test statistic is less than 2.79 we would not reject the null hypothesis, and we would conclude the 4 population means are equal. If the test statistic is greater than 2.79, we would reject the null hypothesis and conclude that the four population means are not equal. The ANOVA Test Statistic for r = 4 Populations and n = 54 Total Sample Observations

Randomly chosen groups of customers were served different types of coffee and asked to rate the coffee on a scale of 0 to 100: 21 were served pure Brazilian coffee, 20 were served pure Colombian coffee, and 22 were served pure African-grown coffee. The resulting test statistic was F = F f ( F ) F Distribution with 2 and 60 Degrees of Freedom  =0.05 Test Statistic=2.02 F (2,60) =3.15 Example 6-1

The grand mean, x, is the mean of all n = n 1 + n 2 + n n r observations in all r samples. 6-3 The Theory and Computations of ANOVA: The Grand Mean

Using the Grand Mean: Table 6-1 Distance from data point to its sample mean Distance from sample mean to grand mean 1050 x 3 =2 x 2 =11.5 x 1 =6 x=6.909 Treatment (j)Sample point(j)Value(x ij ) I=1 Triangle1 4 Triangle Mean of Triangles 6 I=2 Square1 10 Square2 11 Square3 12 Square4 13 Mean of Squares 11.5 I=3 Circle1 1 Circle Mean of Circles 2 Grand mean of all data points If the r population means are different (that is, at least two of the population means are not equal), then it is likely that the variation of the data points about their respective sample means (within sample variation) will be small relative to the variation of the r sample means about the grand mean (between sample variation).

We definean as the difference between a data point and its sample mean. Errors are denoted by, and we have: We definea as the deviation of a samplemean from the grand mean. Treatment deviations, tare givenby: i error deviation treatmentdeviation e exx txx ij i ii  , The ANOVA principle says: When the population means are not equal, the “average” error (within sample) is relatively small compared with the “average” treatment (between sample) deviation. The Theory and Computations of ANOVA: Error Deviation and Treatment Deviation

Consider data point x 24 =13 from table 9-1. The mean of sample 2 is 11.5, and the grand mean is 6.909, so: 1050 x 2 =11.5 x=6.909 x 24 =13 Total deviation: Tot 24 =x 24 -x=6.091 Treatment deviation: t 2 =x 2 -x=4.591 Error deviation: e 24 =x 24 -x 2 =1.5 The total deviation (Tot ij ) is the difference between a data point (x ij ) and the grand mean (x): Tot ij =x ij - x For any data point x ij : Tot = t + e That is: Total Deviation = Treatment Deviation + Error Deviation The Theory and Computations of ANOVA: The Total Deviation

The Theory and Computations of ANOVA: Squared Deviations

The Sum of Squares Principle The total sum of squares (SST) is the sum of two terms: the sum of squares for treatment (SSTR) and the sum of squares for error (SSE). SST = SSTR + SSE The Theory and Computations of ANOVA: The Sum of Squares Principle

SST SSTRSSTE SST measures the total variation in the data set, the variation of all individual data points from the grand mean. SSTR measures the explained variation, the variation of individual sample means from the grand mean. It is that part of the variation that is possibly expected, or explained, because the data points are drawn from different populations. It’s the variation between groups of data points. SSE measures unexplained variation, the variation within each group that cannot be explained by possible differences between the groups. The Theory and Computations of ANOVA: Picturing The Sum of Squares Principle

The number of degrees of freedom associated with SST is (n - 1). n total observations in all r groups, less one degree of freedom lost with the calculation of the grand mean The number of degrees of freedom associated with SSTR is (r - 1). r sample means, less one degree of freedom lost with the calculation of the grand mean The number of degrees of freedom associated with SSE is (n-r). n total observations in all groups, less one degree of freedom lost with the calculation of the sample mean from each of r groups The degrees of freedom are additive in the same way as are the sums of squares: df(total) = df(treatment) + df(error) (n - 1) = (r - 1) + (n - r) The Theory and Computations of ANOVA: Degrees of Freedom

Recall that the calculation of the sample variance involves the division of the sum of squared deviations from the sample mean by the number of degrees of freedom. This principle is applied as well to find the mean squared deviations within the analysis of variance. Mean square treatment (MSTR): Mean square error (MSE): Mean square total (MST): (Note that the additive properties of sums of squares do not extend to the mean squares. MST ¹ MSTR + MSE). The Theory and Computations of ANOVA: The Mean Squares

EMSE EMSTR n ii r i () and () () when thenull hypothesis is true > when thenull hypothesis is false where is the mean of population i and is the combined mean of allr populations.             That is, the expected mean square error (MSE) is simply the common population variance (remember the assumption of equal population variances), but the expected treatment sum of squares (MSTR) is the common population variance plus a term related to the variation of the individual population means around the grand population mean. If the null hypothesis is true so that the population means are all equal, the second term in the E(MSTR) formulation is zero, and E(MSTR) is equal to the common population variance. The Theory and Computations of ANOVA: The Expected Mean Squares

When the null hypothesis of ANOVA is true and all r population means are equal, MSTR and MSE are two independent, unbiased estimators of the common population variance  2. On the other hand, when the null hypothesis is false, then MSTR will tend to be larger than MSE. So the ratio of MSTR and MSE can be used as an indicator of the equality or inequality of the r population means. This ratio (MSTR/MSE) will tend to be near to 1 if the null hypothesis is true, and greater than 1 if the null hypothesis is false. The ANOVA test, finally, is a test of whether (MSTR/MSE) is equal to, or greater than, 1. Expected Mean Squares and the ANOVA Principle

Under the assumptions of ANOVA, the ratio (MSTR/MSE) possess an F distribution with (r-1) degrees of freedom for the numerator and (n-r) degrees of freedom for the denominator when the null hypothesis is true. The test statistic in analysis of variance: (-,-) F MSTR MSE rnr1  The Theory and Computations of ANOVA: The F Statistic

The ANOVA Table and Examples

Source of Variation Sum of Squares Degrees of FreedomMean SquareF Ratio TreatmentSSTR=159.9(r-1)=2MSTR= ErrorSSE=17.0(n-r)=8MSE=2.125 TotalSST=176.9(n-1)=10MST= F (2,8) f(F) F Distribution for 2 and 8 Degrees of Freedom Computed test statistic=37.62 The ANOVA Table summarizes the ANOVA calculations. In this instance, since the test statistic is greater than the critical point for an a=0.01 level of significance, the null hypothesis may be rejected, and we may conclude that the means for triangles, squares, and circles are not all equal. ANOVA Table

TreatValue MTB > Oneway 'Value' 'Treat'. One-Way Analysis of Variance Analysis of Variance on Value Source DF SS MS F p Treat Error Total The MINITAB output includes not only the ANOVA table and the test statistic, but it also gives a p-value corresponding to the calculated F- ratio. In this instance the p-value is approximately 0, so the null hypothesis can be rejected at any common level of significance. Using the Computer

The EXCEL output is created by selecting ANOVA: SINGLE FACTOR option from the DATA ANALYSIS toolkit. The critical F value is based on a = The p-value is very small, so again the null hypothesis can be rejected at any common level of significance. Anova: Single Factor SUMMARY GroupsCountSumAverageVariance TRIANGLE SQUARE CIRCLE3621 ANOVA Source of VariationSSdfMSFP-valueF crit Between Groups E Within Groups Total Using the Computer

Club Med has conducted a test to determine whether its Caribbean resorts are equally well liked by vacationing club members. The analysis was based on a survey questionnaire (general satisfaction, on a scale from 0 to 100) filled out by a random sample of 40 respondents from each of 5 resorts. Source of Variation Sum of Squares Degrees of FreedomMean SquareF Ratio Treatment SSTR= (r-1)= 4 MSTR= ErrorSSE=98356 (n-r)= 195 MSE= TotalSST= (n-1)= 199 MST= Resort Mean Response (x ) i Guadeloupe89 Martinique75 Eleuthra73 Paradise Island91 St. Lucia85 SST=112564SSE=98356 F (4,200) F Distribution with 4 and 200 Degrees of Freedom f(F) Computed test statistic=7.04 The resultant F ratio is larger than the critical point for  = 0.01, so the null hypothesis may be rejected. Example 6-2: Club Med

Source of Variation Sum of Squares Degrees of FreedomMean SquareF Ratio Treatment SSTR= 879.3(r-1)=3 MSTR= Error SSE= (n-r)= 539MSE=34.4 Total SST= (n-1)=542 MST= Given the total number of observations (n = 543), the number of groups (r = 4), the MSE (34. 4), and the F ratio (8.52), the remainder of the ANOVA table can be completed. The critical point of the F distribution for  = 0.01 and (3, 400) degrees of freedom is The test statistic in this example is much larger than this critical point, so the p value associated with this test statistic is less than 0.01, and the null hypothesis may be rejected. Example 6-3: Job Involvement

Anova: Single Factor SUMMARY GroupsCountSumAverageVariance Michael Damon Allen ANOVA Source of VariationSSdfMSFP-valueF crit Between Groups E Within Groups Total The test statistic value is , way over the critical point for F(2, 60) of 3.15 when a = The GM should do whatever it takes to sign Michael. See text for data and information on the problem Example 6-4: NBA Franchise

Data ANOVA Do Not Reject H 0 Stop Reject H 0 The sample means are unbiased estimators of the population means. The mean square error (MSE) is an unbiased estimator of the common population variance. Further Analysis Confidence Intervals for Population Means Tukey Pairwise Comparisons Test The ANOVA Diagram 6-5 Further Analysis

A (1- ) 100% confidence interval for, the mean of population i: i    where t is the value of the distribution with) degreesof freedom that cuts off a right - tailed area of 2. 2  xt MSE n i i  2 tn-r Confidence Intervals for Population Means

The Tukey Pairwise Comparison test, or Honestly Significant Differences (MSD) test, allows us to compare every pair of population means with a single level of significance. It is based on the studentized range distribution, q, with r and (n-r) degrees of freedom. The critical point in a Tukey Pairwise Comparisons test is the Tukey Criterion: where n i is the smallest of the r sample sizes. The test statistic is the absolute value of the difference between the appropriate sample means, and the null hypothesis is rejected if the test statistic is greater than the critical point of the Tukey Criterion The Tukey Pairwise Comparison Test

The test statistic for each pairwise test is the absolute difference between the appropriate sample means. i ResortMean I.H 0 :  1   2 VI.H 0 :  2   4 1 Guadeloupe 89H 1 :  1   2 H 1 :  2   4 2 Martinique 75|89-75|=14>13.7*|75-91|=16>13.7* 3 Eleuthra 73 II.H 0 :  1   3 VII. H 0 :  2   5 4 Paradise Is. 91 H 1 :  1   3 H 1 :  2   5 5 St. Lucia85|89-73|=16>13.7* |75-85|=10<13.7 III.H 0 :  1   4 VIII.H 0 :  3   4 The critical point T 0.05 for H 1 :  1   4 H 1 :  3   4 r=5 and (n-r)=195 |89-91|=2 13.7* degrees of freedom is:IV.H 0 :  1   5 IX.H 0 :  3   5 H 1 :  1   5 H 1 :  3   5 |89-85|=4<13.7 |73-85|=12<13.7 V.H 0 :  2   3 X. H 0 :  4   5 H 1 :  2   3 H 1 :  4   5 |75-73|=2<13.7 |91-85|= 6<13.7 Reject the null hypothesis if the absolute value of the difference between the sample means is greater than the critical value of T. (The hypotheses marked with * are rejected.) The Tukey Pairwise Comparison Test: The Club Med Example

We rejected the null hypothesis which compared the means of populations 1 and 2, 1 and 3, 2 and 4, and 3 and 4. On the other hand, we accepted the null hypotheses of the equality of the means of populations 1 and 4, 1 and 5, 2 and 3, 2 and 5, 3 and 5, and 4 and 5. The bars indicate the three groupings of populations with possibly equal means: 2 and 3; 2, 3, and 5; and 1, 4, and 5. 11 22 33 44 55 Picturing the Results of a Tukey Pairwise Comparisons Test: The Club Med Example

A statistical model is a set of equations and assumptions that capture the essential characteristics of a real-world situation The one-factor ANOVA model: x ij =  i +  ij =  +  i +  ij where e ij is the error associated with the jth member of the ith population. The errors are assumed to be normally distributed with mean 0 and variance  2. A factor is a set of populations or treatments of a single kind. For example: One factor models based on sets of resorts, types of airplanes, or kinds of sweaters Two factor models based on firm and location Three factor models based on color and shape and size of an ad. Fixed-Effects and Random Effects A fixed-effects model is one in which the levels of the factor under study (the treatments) are fixed in advance. Inference is valid only for the levels under study. A random-effects model is one in which the levels of the factor under study are randomly chosen from an entire population of levels (treatments). Inference is valid for the entire population of levels. 6-6 Models, Factors and Designs

A completely-randomized design is one in which the elements are assigned to treatments completely at random. That is, any element chosen for the study has an equal chance of being assigned to any treatment. In a blocking design, elements are assigned to treatments after first being collected into homogeneous groups. In a completely randomized block design, all members of each block (homogeneous group) are randomly assigned to the treatment levels. In a repeated measures design, each member of each block is assigned to all treatment levels. Experimental Design

In a two-way ANOVA, the effects of two factors or treatments can be investigated simultaneously. Two-way ANOVA also permits the investigation of the effects of either factor alone and of the two factors together. The effect on the population mean that can be attributed to the levels of either factor alone is called a main effect. An interaction effect between two factors occurs if the total effect at some pair of levels of the two factors or treatments differs significantly from the simple addition of the two main effects. Factors that do not interact are called additive. Three questions answerable by two-way ANOVA: Are there any factor A main effects? Are there any factor B main effects? Are there any interaction effects between factors A and B? For example, we might investigate the effects on vacationers’ ratings of resorts by looking at five different resorts (factor A) and four different resort attributes (factor B). In addition to the five main factor A treatment levels and the four main factor B treatment levels, there are (5*4=20) interaction treatment levels Two-Way Analysis of Variance

x ijk =  +  i +  j + (  ijk +  ijk where  is the overall mean;  i is the effect of level i(i=1,...,a) of factor A;  j is the effect of level j(j=1,...,b) of factor B;  jj is the interaction effect of levels i and j;  jjk is the error associated with the kth data point from level i of factor A and level j of factor B.  jjk is assumed to be distributed normally with mean zero and variance  2 for all i, j, and k. The Two-Way ANOVA Model

Factor A: Resort Factor B: Attribute Resort R a t i n g Graphical Display of Effects Eleuthra Martinique St. Lucia Guadeloupe Paradise island Friendship Excitement Sports Culture Eleuthra/sports interaction: Combined effect greater than additive main effects Sports Friendship Attribute Resort Excitement Culture Rating Eleuthra Martinique St. Lucia Guadeloupe Paradise Island Two-Way ANOVA Data Layout: Club Med Example

Factor A main effects test: H 0 :  i =0 for all i=1,2,...,a H 1 : Not all  i are 0 Factor B main effects test: H 0 :  j =0 for all j=1,2,...,b H 1 : Not all  i are 0 Test for (AB) interactions: H 0 :  ij =0 for all i=1,2,...,a and j=1,2,...,b H 1 : Not all  ij are 0 Hypothesis Tests a Two-Way ANOVA

l In a two-way ANOVA: x ijk =  +  i +  j + (  ijk +  ijk SST = SSTR +SSE SST = SSA + SSB +SS(AB)+SSE SSTSSTRSSE xxxxxx SSTRSSASSBSSAB x i xx j xx ij x i x j x             ()()() () ()()() Sums of Squares

The Two-Way ANOVA Table

Example 6-4: Two-Way ANOVA (Location and Artist)

Hypothesis Tests

Kimball’s Inequality gives an upper limit on the true probability of at least one Type I error in the three tests of a two-way analysis:  1- (1-  1 ) (1-  2 ) (1-  3 ) Tukey Criterion for factor A: where the degrees of freedom of the q distribution are now a and ab(n- 1). Note that MSE is divided by bn. Overall Significance Level and Tukey Method for Two-Way ANOVA

Three-Way ANOVA Table

A block is a homogeneous set of subjects, grouped to minimize within-group differences. A competely-randomized design is one in which the elements are assigned to treatments completely at random. That is, any element chosen for the study has an equal chance of being assigned to any treatment. In a blocking design, elements are assigned to treatments after first being collected into homogeneous groups. – In a completely randomized block design, all members of each block (homogenous group) are randomly assigned to the treatment levels. – In a repeated measures design, each member of each block is assigned to all treatment levels. 6-8 Blocking Designs

Source of VariationSum of SquaresdfMean SquareF Ratio Blocks Treatments Error Total  = 0.01, F(2, 78) = 4.88 Source of VariationSum of SquaresDegress of FreedomMean SquareF Ratio BlocksSSBLn - 1MSBL = SSBL/(n-1)F = MSBL/MSE TreatmentsSSTRr - 1MSTR = SSTR/(r-1)F = MSTR/MSE ErrorSSE(n -1)(r - 1) TotalSSTnr - 1 ANOVA Table for Blocking Designs: Example 6-5 MSE = SSE/(n-1)(r-1)

MTB > ONEWAY C1, C2; SUBC> TUKEY One-Way Analysis of Variance Analysis of Variance on C1 Source DF SS MS F p Method Error Total Individual 95% CIs For Mean Based on Pooled StDev Level N Mean StDev (--*--) (---*--) (--*--) Pooled StDev = Tukey's pairwise comparisons Family error rate = Individual error rate = Critical value = 3.39 Intervals for (column level mean) - (row level mean) Using the Computer

Using the Computer: Example 6-6 Using Excel

Introduction. The Multivariate Normal Distribution. Discriminant Analysis. Principal Components and Factor Analysis. Using the Computer. Summary and Review of Terms. 6-9 Multivariate Analysis

A k-dimensional (vector) random variable X: X = (X 1, X 2, X 3..., X k ) A realization of a k-dimensional random variable X: x = (x 1, x 2, x 3..., x k ) A joint cumulative probability distribution function of a k-dimensional random variable X: F(x 1, x 2, x 3..., x k ) = P(X 1  x 1, X 2  x 2,..., X k  x k ) 6-10 The Multivariate Normal Distribution

The Multivariate Normal Distribution

f(x 1,x 2 ) x1x1 x2x2 Picturing the Bivariate Normal Distribution

X2X2 X1X1 Group 1 Group 2 11 22 Line L In a discriminant analysis, observations are classified into two or more groups, depending on the value of a multivariate discriminant function. As the figure illustrates, it may be easier to classify observations by looking at them from another direction. The groups appear more separated when viewed from a point perpendicular to Line L, rather than from a point perpendicular to the X 1 or X 2 axis. The discriminant function gives the direction that maximizes the separation between the groups Discriminant Analysis

Group 1Group 2 C Cutting Score The form of the estimated predicted equation: D= b 0 +b 1 X 1 +b 2 X b k X k where the b i are the discriminant weights. b 0 is a constant. The intersection of the normal marginal distributions of two groups gives the cutting score, which is used to assign observations to groups. Observations with scores less than C are assigned to group 1, and observations with scores greater than C are assigned to group 2. Since the distributions may overlap, some observations may be misclassified. The model may be evaluated in terms of the percentages of observations assigned correctly and incorrectly. The Discriminant Function

Discriminant 'Repay' 'Assets' 'Debt' 'Famsize'. Group 0 1 Count Summary of Classification Put into....True Group.... Group Total N N Correct Proport N = 32 N Correct = 23 Prop. Correct = Linear Discriminant Function for Group 0 1 Constant Assets Debt Famsize Discriminant Analysis: Example 6-7 (Minitab)

Summary of Misclassified Observations Observation True Pred Group Sqrd Distnc Probability Group Group 4 ** ** ** ** ** ** ** ** ** Example 6-7: Misclassified Observations

1 0 set width 80 2 data list free / assets income debt famsize job repay 3 begin data 35 end data 36 discriminant groups = repay(0,1) 37 /variables assets income debt famsize job 38 /method = wilks 39 /fin = 1 40 /fout = 1 41 /plot 42 /statistics = all Number of cases by group Number of cases REPAY Unweighted Weighted Label Total Example 6-7: SPSS Output (1)

D I S C R I M I N A N T A N A L Y S I S On groups defined by REPAY Analysis number 1 Stepwise variable selection Selection rule: minimize Wilks' Lambda Maximum number of steps Minimum tolerance level Minimum F to enter … Maximum F to remove Canonical Discriminant Functions Maximum number of functions Minimum cumulative percent of variance Maximum significance of Wilks' Lambda Prior probability for each group is Example 6-7: SPSS Output (2)

Variables not in the Analysis after Step Minimum Variable Tolerance Tolerance F to Enter Wilks' Lambda ASSETS INCOME DEBT FAMSIZE JOB * * * * * * * * * * * ** * * * * * * * * * * * * * * * * * * * * * At step 1, ASSETS was included in the analysis. Degrees of Freedom Signif. Between Groups Wilks' Lambda Equivalent F Example 6-7: SPSS Output (3)

Variables in the Analysis after Step Variable Tolerance F to Remove Wilks' Lambda ASSETS Variables not in the Analysis after Step Minimum Variable Tolerance Tolerance F to Enter Wilks' Lambda INCOME DEBT FAMSIZE JOB At step 2, DEBT was included in the analysis. Degrees of Freedom Signif. Between Groups Wilks' Lambda Equivalent F Example 6-7: SPSS Output (4)

Variables in the Analysis after Step Variable Tolerance F to Remove Wilks' Lambda ASSETS DEBT Variables not in the Analysis after Step Minimum Variable Tolerance Tolerance F to Enter Wilks' Lambda INCOME FAMSIZE JOB At step 3, FAMSIZE was included in the analysis. Degrees of Freedom Signif. Between Groups Wilks' Lambda Equivalent F Example 6-7: SPSS Output (5)

Variables in the Analysis after Step Variable Tolerance F to Remove Wilks' Lambda ASSETS DEBT FAMSIZE Variables not in the Analysis after Step Minimum Variable Tolerance Tolerance F to Enter Wilks' Lambda INCOME JOB Summary Table Action Vars Wilks' Step Entered Removed in Lambda Sig. Label 1 ASSETS DEBT FAMSIZE Example 6-7: SPSS Output (6)

Classification function coefficients (Fisher's linear discriminant functions) REPAY = 0 1 ASSETS DEBT FAMSIZE (Constant) Unstandardized canonical discriminant function coefficients Func 1 ASSETS DEBT FAMSIZE (Constant) Example 6-7: SPSS Output (7)

Case Mis Actual Highest Probability 2nd Highest Discrim Number Val Sel Group Group P(D/G) P(G/D) Group P(G/D) Scores ** ** ** ** ** ** ** ** ** Example 6-7: SPSS Output (8)

Classification results - No. of Predicted Group Membership Actual Group Cases Group % 28.6% Group % 72.2% Percent of "grouped" cases correctly classified: 71.88% Example 6-7: SPSS Output (9)

All-groups Stacked Histogram Canonical Discriminant Function | | F | | r e | 2 | q | 2 | u | 2 | e n | | c | | y | | | | X X out out Class Centroids 2 1 Example 6-7: SPSS Output (10)

First Component Second Component x y Total Variance Remaining After Extraction of First Second Third Component 6-12 Principal Components and Factor Analysis

The k original X i variables written as linear combinations of a smaller set of m common factors and a unique component for each variable: X 1 = b 11 F 1 + b 12 F b 1m F m + U 1 X 1 = b 21 F 1 + b 22 F b 2m F m + U 2. X k = b k1 F 1 + b k2 F b km F m + U k The F j are the common factors. Each U i is the unique component of variable X i. The coefficients b ij are called the factor loadings. Total variance in the data is decomposed into the communality, the common factor component, and the specific part. Factor Analysis

Rotation of Factors

Factor Loadings Satisfaction with: Communality Information Variety Closure Pay Factor Analysis of Satisfaction Items