Presentation is loading. Please wait.

Presentation is loading. Please wait.

Economics 173 Business Statistics Lectures 9 & 10 Summer, 2001 Professor J. Petry.

Similar presentations


Presentation on theme: "Economics 173 Business Statistics Lectures 9 & 10 Summer, 2001 Professor J. Petry."— Presentation transcript:

1 Economics 173 Business Statistics Lectures 9 & 10 Summer, 2001 Professor J. Petry

2 Analysis of Variance Chapter 14

3 14.1 Introduction Analysis of variance helps compare two or more populations of quantitative data. Specifically, we are interested in the relationships among the population means (are they equal or not). The procedure works by analyzing the sample variance.

4 The analysis of variance is a procedure that tests to determine whether differences exits among two or more population means. To do this, the technique analyzes the variance of the data. How can analyzing variance help us understand relationship between population means? If the ratio of the variance between samples compared to the variance within samples is large, then the means of the samples are likely to be unequal (i.e. reject H 0 ). 14.2 Single - Factor (One - Way) Analysis of Variance : Independent Samples

5 Example 14.1 –An apple juice manufacturer is planning to develop a new product -a liquid concentrate. –The marketing manager has to decide how to market the new product. –Three strategies are considered Emphasize convenience of using the product. Emphasize the quality of the product. Emphasize the product’s low price.

6 Example 14.1 - continued –An experiment was conducted as follows: In three cities an advertising campaign was launched. In each city only one of the three characteristics (convenience, quality, and price) was emphasized. The weekly sales were recorded for twenty weeks following the beginning of the campaigns.

7 Example 14.1 - continued –Data (see file XM14 -01.) Weekly sales Solution –The data are quantitative. –Our problem objective is to compare sales in three cities. –We hypothesize on the relationships among the three mean weekly sales:

8 H 0 :  1 =  2 =  3 H 1 : At least two means differ To perform the analysis of variance we need to build an “F” statistic. To more easily follow the process we use the following notation:

9 Independent samples are drawn from k populations. Each population is called a “treatment”. 12k X 11 x 21. X n1,1 X 12 x 22. X n2, 2 X 1k x 2k. X nk,k Sample size Sample mean First observation, first sample Second observation, second sample X is the “response variable”.. The variables’ values are called “responses”. The average of the sample means is the “grand mean”

10 The Test Statistic The test stems from the following rationale: –If the null hypothesis is true, we would expect all the sample means be close to one another (and as a result to the grand mean). –If the alternative hypothesis is true, at least some of the sample means would be different from one another.

11 20 1 12 19 9 25 30 7 Treatment 1Treatment 2 Treatment 3 10 Treatment 1Treatment 2Treatment 3 20 16 15 14 11 10 9 The sample means are the same as before, but the larger within-sample variability makes it harder to draw a conclusion about the population means. =noise=“error” A small variability within the samples makes it easier to draw a conclusion about the population means. If the b/n sample mean variance is large, relative to the within-sample variance, then the sample means are unequal.

12 The variability among the sample means is measured as the sum of squared distances between each mean and the grand mean. This sum is called the S um of S quares for T reatments SST 2 1 )( xxn k j jj    In our example treatments are represented by the different advertising strategies.

13 SST - Continued Note: When the averages are close to one another, their distance from the grand average is small, leading to a small SST. Thus, large SST indicates large variation among sample averages. There are k treatments The size of sample j The average of sample j The grand mean The grand mean is calculated by

14 The variability within samples is measured by adding all the squared distances between observations and their sample mean. This sum is called the S um of S quares for E rror - SSE. In our example this is the sum of all squared differences between sales in city j and the sample mean of city j (over all the three cities).

15 = 20(577.55 - 613.07 )2 + + 20(653.00 - 613.07) 2 + + 20(608.65 - 613.07) 2 = = 57,512.23 Calculation of SSTCalculation of SSE = (n 1 - 1)S 1 2 + (n 2 -1)S 2 2 + (n 3 -1)S 3 2 = (20 -1)10,774.44 + (20 -1)7238.61 + (20-1)8,669.47 = = 506,967.88 To perform the test we need to calculate the mean sums of squares mean sums of squares as follows:

16 Calculation of MST - M ean S quare for T reatments Calculation of MSE M ean S quare for E rror with the following degrees of freedom: v 1 =k -1 and v 2 =n-k We require that: 1. The populations tested are normally distributed. 2. The variances of all the populations tested are equal.

17 H 0 :  1 =  2 = …=  k H 1 : At least two means differ Test statistic: Rejection region: F>F  k-1,n-k Specifically in our advertisement problem Which in terms of our hypothesis test, looks like...

18 H o :  1 =  2 =  3 H 1 : At least two means differ Test statistic F= MST / MSE= 3.23 Since 3.23 > 3.15, there is sufficient evidence to reject H o in favor of H 1, and argue that at least one of the mean sales is different than the others.

19 SS(Total) = SST + SSE

20 Checking the required conditions The F test requires that the populations are normally distributed with equal variance. From the Excel printout we compare the sample variances: 10774, 7238, 8670. It seems the variances are equal (see section 14.7 for Bartlett’s test of equality of variances). To check the normality observe the histogram of each sample.

21 All the distributions seem to be normal.

22 14.3 Analysis of Variance Models Several elements may distinguish between one experimental design and others. –The number of factors. Each characteristic investigated is called a factor. Each factor has several levels.

23 Factor A Level 1Level2 Level 1 Factor B Level 3 Two - way ANOVA Level2 One - way ANOVA Treatment 3 Treatment 2 Response Treatment 1

24 –Independent samples or blocks. Groups of matched observations are formed into blocks, in order to remove the effects of “noise” variability. By doing so we improve the chances of detecting the variability of interest.

25 –Fixed and random effects models. If all levels of a factor included in our analysis are pre- determined, we have a fixed effect ANOVA. –The conclusion of a fixed effect ANOVA applies only to the levels studied. If the levels included in our analysis represent a random sample of all the possible levels, we have a random- effect ANOVA. –The conclusion of the random-effect ANOVA applies to all the levels (not only those studied). The calculation of the test statistic for fixed and random effects may differ for some ANOVA models.

26 14.4 Single-Factor Analysis of Variance: Randomized Blocks The purpose of designing a randomized block experiment is to reduce the within-treatments variation thus increasing the relative among- treatment variation. This helps in detecting differences among the treatment means more easily.

27 Treatment 4 Treatment 3 Treatment 2 Treatment 1 Block 1Block3Block2 Block all the observations with some commonality across treatments

28 Blocked samples from k populations (treatments)

29 The sum of square total is partitioned into three sources of variation –Treatments –Blocks –Within samples (Error) SS(Total) = SST + SSB + SSE Sum of square for treatmentsSum of square for blocksSum of square for error Recall: SS(Total) = SST + SSE

30 To perform hypothesis tests for treatments and blocks we need Mean square for treatments Mean square for blocks Mean square for error Test statistics for treatments Test statistics for blocks

31 Example 14.2 –A radio station manager wants to know if the amount of time his listeners spent listening to a radio per day is about the same every day of the week. –200 teenagers were asked to record how long they spend listening to a radio each day of the week. Solution –The problem objective is to compare seven populations. –The data are quantitative.

32 –Each day of the week can be considered a treatment. –Each 7 data points (per person) can be blocked, because they belong to the same person. –This procedure eliminates the variability in the “radio-times” among teenagers, and helps detect differences of the mean times teenagers listen to the radio among the days of the week.

33 Checking the required conditions Observing the histograms of the seven populations we can assume that all the distributions are approximately normally distributed. Sunday Monday The population variances seem to be equal. See the sample variances :

34 BlocksTreatmentsK-1b-1 MST / MSE MSB / MSE Conclusion: At 5% significance level there is sufficient evidence to reject the null hypothesis, and infer that mean “radio time” is different in at least one of the week days.

35 14.5 Two Factor Analysis of Variance: Independent Samples Example 14.3 –Suppose in example 14.1, two factors are to be examined: The effects of the marketing approach on sales. –Emphasis on convenience –Emphasis on quality –Emphasis on price The effects of the selected media on sales. –Advertise on TV –Advertise in newspapers

36 Example 14.3 - continued –The combinations of level, one for each factor define the treatments. –The hypotheses tested are: H 0 :  1 =  2 =  3 =  4 =  5 =  6 H 1 : At least two means differ. –We assume that the only existing levels are those studied. Thus, this is a fixed - effects factorial experiment. 1. Emphasize convenience+ advertise on TV. 2. Emphasize convenience+ advertise in newspaper.

37 We can design the experiment as follows: City 1City2City3City4City5City6 Convenience&Quality&Price & Convenience& Quality &Price & TVTVTVNewspaper Newspaper Newspaper This is a one - way ANOVA experimental design. The p-value =.045. We conclude that there is a strong evidence that differences exist in the mean weekly sales.

38 Are these differences caused by differences in the marketing approach? Are these differences caused by differences in the medium used for advertising? Are there combinations of these two factors that interact to affect the weekly sales? A new experimental design is needed to answer these questions.

39 City 1 sales City3 sales City 5 sales City 2 sales City 4 sales City 6 sales TV Newspapers ConvenienceQualityPrice Factor A: Marketing strategy Factor B: Advertising media Are there differences in the mean sales caused by different marketing strategies? Test whether mean sales of “Convenience”, “Quality”, and “Price” significantly differ from one another. Factor A: Marketing strategy Factor B: Advertising media Factor A: Marketing strategy Factor B: Advertising media Factor A: Marketing strategy Factor B: Advertising media

40 City 1 sales City 3 sales City 5 sales City 2 sales City 4 sales City 6 sales TV Newspapers ConvenienceQualityPrice Factor A: Marketing strategy Factor B: Advertising media Are there differences in the mean sales caused by different advertising media? Test whether mean sales of the “TV”, and “Newspapers” significantly differ from one another. Use SS(B).

41 City 1 sales City 5 sales City 2 sales City 4 sales City 6 sales TV Newspapers ConvenienceQualityPrice Factor A: Marketing strategy Factor B: Advertising media Are there differences in the mean sales caused by interaction between marketing strategy and advertising medium? Test whether mean sales of certain cells are different than the level expected. City 3 sales

42 Graphical description of the possible relationships between factors A and B.

43 Levels of factor A 123 Level 1 of factor B Level 2 of factor B 123 123123 Level 1and 2 of factor B Difference among the levels of factor A No difference among the levels of factor B Difference among the levels of factor A, and difference among the levels of factor B; no interaction Levels of factor A No difference among the levels of factor A. Difference among the levels of factor B Interaction M R e s a p n o n s e M R e s a p n o n s e M R e s a p n o n s e M R e s a p n o n s e

44 Sums of squares

45 F tests for the Two-way ANOVA Test for the difference among the levels of the main factors A and B F= MS(A) MSE F= MS(B) MSE Rejection region: F > F ,a-1,n-ab F > F , b-1, n-b Test for interaction between factors A and B F= MS(AB) MSE Rejection region: F > F ,a-1)(b-1),n-ab SS(A)/(a-1) SS(B)/(b-1) SS(AB)/(a-1)(b-1) SSE/(n-ab)

46 Example 14.3 - continued –Test of the difference in mean sales among the three marketing approaches H 0 :  conv. =  quality =  price H 1 : At least two mean sales are different F = MS(Marketing strategy)/MSE = 5.33 (see computer printout next.) F critical = F ,a-1,n-ab = F.05,3-1,60-(3)(2) = about 3.15 –At 5% significance level there is evidence to infer that differences in weekly sales exist among the marketing strategies.

47 Example 14.3 - continued –Test of the difference in mean sales between the two advertising media H 0 :  TV. =  Nespaper H 1 : The two mean sales differ F = MS(Media)/MSE = 1.42 (see computer printout next.) F critical = F  a-1,n-ab = F.05,2-1,60-(3)(2) = about 4.00 –At 5% significance level there is insufficient evidence to infer that differences in weekly sales exist between the two advertising media.

48 Example 14.3 - continued –Test for interaction between factor A and B H 0 :  TV*conv. =  TV*quality =…=  newsp.*price H 1 : At least two means differ F = MS(Marketing*Media)/MSE =.09 (see computer printout next.) F critical = F  a-1)(b-1),n-ab = F.05,(3-1)(2-1),60-(3)(2) = about 3.15 –At 5% significance level there is insufficient evidence to infer that the two factors interact to affect the mean weekly sales.

49 The two - way ANOVA Excel solution Factor A = Marketing strategies Factor B = Advertising media

50 14.7 Multiple Comparisons When the null hypothesis is rejected, it may be desirable to find which mean(s) is (are) different, and at what ranking order. Three statistical inference procedures, geared at doing this, are presented: –Fisher’s least significant difference (LSD) method –Bonferroni adjustment –Tukey’s multiple comparison method

51 Two means are considered different if the difference between the corresponding sample means is larger than a critical number. Then, the larger sample mean is believed to be associated with a larger population mean. Conditions common to all the methods here: –The ANOVA model is the independent-sample, single factor –The conditions required to perform the ANOVA are satisfied. –The experiment is fixed-effect

52 Fisher Least Significant Different (LSD) Method This method builds on the equal variance t-test of the difference between two means. The test statistic is improved by using MSE rather than s p 2. We can conclude that  i and  j differ (at  % significance level if |  i -  j | > LSD, where

53 The Bonferroni Adjustment The Fisher’s method may result in an increased probability of committing a type I error (  ). The Bonferroni adjustment determines the required type I error probability per pairwise comparison, to secure a pre-determined overall 

54 The procedure: –Compute the number of pairwise comparisons (C) [C=k(k-1)/2}], where k is the number of populations. –Set  =  E /C, where  E is the true probability of making at least one type I error (called experimentwise type I error). –We can conclude that  i and  j differ (at  /C% significance level if

55 Example 14.1 - continued –Rank the effectiveness of the marketing strategies (based on mean weekly sales). –Use the Fisher’s method, and the Bonferroni adjustment method Solution (the Fisher’s method) –The sample mean sales were 577.55, 653.0, 608.65. –Then,

56 Solution (the Bonferroni adjustment) –We calculate C=k(k-1)/2 to be 3(2)/2 = 3. –We set  =.05/3 =.0167, thus t.00833, 60-3 = 2.467 (Excel). Again, the significant difference is between  1 and  2.

57 The test procedure: –Find a critical number  as follows: k = the number of samples =degrees of freedom = n - k n g = number of observations per sample (recall, all the sample sizes are the same)  = significance level q  (k, ) = a critical value (the studentized range) obtained from a table The Tukey Multiple Comparisons

58 Repeat this procedure for each pair of samples. Rank the means if possible. Select a pair of means. Calculate the difference between the larger and the smaller mean. If there is sufficient evidence to conclude that  max >  min. If the sample sizes are different, use the above procedure provided the sizes are similar. For n g use the harmonic mean.

59 City 1 vs. City 2: 653 - 577.55 = 75.45 City 1 vs. City 3: 608.65 - 577.55 = 31.1 City 2 vs. City 3: 653 - 608.65 = 44.35 Example 14.1 - continued –We had three populations (three marketing strategies). K = 3, Sample sizes were equal. n 1 = n 2 = n 3 = 20,  = n-k = 60-3 = 57, MSE = 8894. Take q.05 (3,60) from the table. Population Sales - City 1 Sales - City 2 Sales - City 3 Mean 577.55 653 698.65

60 14.8 Bartlett’s Test This procedure is conducted when testing The test statistic is


Download ppt "Economics 173 Business Statistics Lectures 9 & 10 Summer, 2001 Professor J. Petry."

Similar presentations


Ads by Google